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AClB,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,KACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,KACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,KACL,EAAK,KACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,KACL,EAAK,KACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,KACL,EAAK,KACL,EAAK,IACL,EAAK,IACL,EAAK,KACL,EAAK,KACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,I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,MACC/uH,GAAQ1wD,GAAa6tF,SAAU1tF,EAAM,OAAW,GAChDuwD,GAAQ1wD,GAAa6tF,SAAU1tF,EAAM,OAAW,SAC7CpwD,EACA,mCAAoCiwD,sIAE1C,CArCqB0/K,CAAgBP,EAAQE,IAErC,CAAEx/E,OAAQw/E,EAClB,CCWKM,CAAwB,CAAE//K,SAAQI,gBAEnCjwB,IAEF,CAAE6vB,EAAQI,EAAYjwB,EAAWqqB,IAGlC,OAAO/jC,EAAAA,GAAAA,KAACy0G,GAAO,CAAC/6F,UAAY4rB,KAAe/oD,GAC5C,EclCC+1N,KAAI,GACJ95K,UAAS,GACT+wL,MCiBD,UAAgB,UACf7vM,EAAS,OACT8vM,EAAS,UAAS,SAClBjlO,KACGhI,IAEH,MAAM65H,EArBP,SAA2BozG,EAAiC,WAC3D,OAASA,GACR,IAAK,OACJ,OAAOplK,GACR,IAAK,UACJ,OAAOqlK,GACR,IAAK,UACJ,OAAOC,GACR,IAAK,QACJ,OAAOj8O,GACR,QACC,OAAO,KAEV,CAQck8O,CAAkBH,GACzBI,IAAaxzG,EAEnB,OACCvgF,EAAAA,GAAAA,MAAA,QACCnc,UAAYqc,EAAM,mBAAoBrc,EAAW,CAChD,CAAE,MAAO8vM,KAAaA,EACtB,WAAYI,OAERrtO,EAAKgI,SAAA,CAERqlO,IACD5pN,EAAAA,GAAAA,KAAC4vC,GAAI,CACJwmE,KAAOA,EACPvsI,KAAO,GACPwmE,KAAK,eACL32B,UAAU,4BAGZ1Z,EAAAA,GAAAA,KAAA,QAAM0Z,UAAU,4BAA2Bn1B,SAAGA,MAGjD,G","sources":["webpack://wp/webpack/runtime/create fake namespace object","webpack://wp/./node_modules/deepmerge/dist/cjs.js","webpack://wp/./node_modules/fast-deep-equal/es6/index.js","webpack://wp/./node_modules/fast-memoize/src/index.js","webpack://wp/./node_modules/gradient-parser/build/node.js","webpack://wp/../../../../../webpack/bootstrap 2a95070affdf3c0054f1","webpack://wp/../../../../../src/index.js","webpack://wp/../../../../../src/utils.js","webpack://wp/./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","webpack://wp/./node_modules/react-is/cjs/react-is.production.min.js","webpack://wp/./node_modules/react-is/index.js","webpack://wp/./node_modules/remove-accents/index.js","webpack://wp/./node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js","webpack://wp/./node_modules/use-sync-external-store/shim/index.js","webpack://wp/external window \"React\"","webpack://wp/webpack/bootstrap","webpack://wp/webpack/runtime/compat get default export","webpack://wp/webpack/runtime/define property getters","webpack://wp/webpack/runtime/hasOwnProperty shorthand","webpack://wp/webpack/runtime/make namespace object","webpack://wp/webpack/runtime/nonce","webpack://wp/external window [\"wp\",\"primitives\"]","webpack://wp/./node_modules/clsx/dist/clsx.mjs","webpack://wp/external window [\"wp\",\"i18n\"]","webpack://wp/external window [\"wp\",\"compose\"]","webpack://wp/external window [\"wp\",\"element\"]","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/3YLGPPWQ.js","webpack://wp/./node_modules/@ariakit/core/esm/__chunks/3YLGPPWQ.js","webpack://wp/./node_modules/@ariakit/core/esm/__chunks/PBFD2E7P.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/SK3NAZA3.js","webpack://wp/./node_modules/@ariakit/core/esm/__chunks/DTR5TSDJ.js","webpack://wp/./node_modules/@ariakit/core/esm/__chunks/QAGXQEUG.js","webpack://wp/./node_modules/@ariakit/core/esm/utils/events.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/ABQUS43J.js","webpack://wp/./node_modules/@ariakit/core/esm/__chunks/BCALMBPZ.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/YV4JVR4I.js","webpack://wp/./node_modules/@ariakit/core/esm/__chunks/CYQWQL4J.js","webpack://wp/./node_modules/@ariakit/core/esm/__chunks/7PRQYBBV.js","webpack://wp/./node_modules/@ariakit/core/esm/__chunks/AJZ4BYF3.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/4CMBR7SL.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/C3IKGW5T.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/5VQZOHHZ.js","webpack://wp/external window \"ReactJSXRuntime\"","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/LMDWO4NN.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/VDHZ5F7K.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/P7GR5CS5.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/SWN3JYXT.js","webpack://wp/./node_modules/@ariakit/core/esm/utils/focus.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/LVA2YJMS.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/ITI7HKP4.js","../../packages/components/src/composite/context.tsx","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/7HVFURXT.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/36LIF33V.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/YORGHBM4.js","../../packages/components/src/composite/group.tsx","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/YUOJWFSO.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/SWSPTQMT.js","../../packages/components/src/composite/group-label.tsx","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/UQQRIHDV.js","../../packages/components/src/composite/hover.tsx","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/RZ4GPYOB.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/KUU7WJ55.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/P2CTZE2T.js","../../packages/components/src/composite/item.tsx","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/J2LQO3EC.js","../../packages/components/src/composite/row.tsx","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/T7VMP3TM.js","../../packages/components/src/composite/typeahead.tsx","../../packages/components/src/composite/index.tsx","webpack://wp/./node_modules/@ariakit/core/esm/__chunks/RCQ5P4YE.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/WYCIER3C.js","webpack://wp/./node_modules/@ariakit/core/esm/__chunks/FZZ2AVHF.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/BM6PGYQY.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/O2PQ2652.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/FTXTWCCT.js","webpack://wp/./node_modules/@ariakit/core/esm/__chunks/ME2CUF3F.js","webpack://wp/./node_modules/@ariakit/core/esm/__chunks/JTLIIJ4U.js","webpack://wp/./node_modules/@ariakit/core/esm/tooltip/tooltip-store.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/XL7CSKGW.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/S6EF7IVO.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/RS7LB2H4.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/MTZPJQMC.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/EM5CXX6A.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/BYC7LY2E.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/F4IYJ42G.js","webpack://wp/./node_modules/@ariakit/react-core/esm/tooltip/tooltip-anchor.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/X7QOZUD3.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/63XF7ACK.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/K2ZF5NU7.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/AOUGVQZ3.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/2PGBN2Y4.js","webpack://wp/external window \"ReactDOM\"","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/VGCJ63VH.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/63FEHJZV.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/677M2CI3.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/KZAQFFOU.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/ESSM74HH.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/BGQ3KQ5M.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/YKJECYU7.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/TOU75OXH.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/WBDYNH73.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/ZWYATQFU.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/CZ4GFWYL.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/5M6RIVE2.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/XX67R432.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/W3VI7GFU.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/AOQQTIBO.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/O37CNYMR.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/JC64G2H7.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/HLTQOHKZ.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/6GXEOXGT.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/IGR4SXG2.js","webpack://wp/./node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs","webpack://wp/./node_modules/@floating-ui/core/dist/floating-ui.core.mjs","webpack://wp/./node_modules/@floating-ui/dom/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs","webpack://wp/./node_modules/@floating-ui/dom/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","webpack://wp/./node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/T6C2RYFI.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/KQKDTOT4.js","webpack://wp/./node_modules/@ariakit/react-core/esm/tooltip/tooltip.js","webpack://wp/external window [\"wp\",\"deprecated\"]","../../packages/components/src/shortcut/index.tsx","../../packages/components/src/popover/utils.ts","../../packages/components/src/tooltip/index.tsx","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/YTDK2NGG.js","webpack://wp/external window [\"wp\",\"warning\"]","webpack://wp/./node_modules/is-plain-object/dist/is-plain-object.mjs","../../packages/components/src/utils/hooks/use-update-effect.js","../../packages/components/src/context/context-system-provider.js","../../packages/components/src/context/constants.js","webpack://wp/./node_modules/tslib/tslib.es6.mjs","webpack://wp/./node_modules/lower-case/src/index.ts","webpack://wp/./node_modules/no-case/src/index.ts","webpack://wp/./node_modules/param-case/src/index.ts","webpack://wp/./node_modules/dot-case/src/index.ts","webpack://wp/./node_modules/memize/dist/index.js","../../packages/components/src/context/get-styled-class-name-from-key.ts","webpack://wp/./node_modules/@emotion/sheet/dist/emotion-sheet.browser.esm.js","webpack://wp/./node_modules/stylis/src/Utility.js","webpack://wp/./node_modules/stylis/src/Tokenizer.js","webpack://wp/./node_modules/stylis/src/Enum.js","webpack://wp/./node_modules/stylis/src/Serializer.js","webpack://wp/./node_modules/stylis/src/Prefixer.js","webpack://wp/./node_modules/stylis/src/Parser.js","webpack://wp/./node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js","webpack://wp/./node_modules/stylis/src/Middleware.js","webpack://wp/./node_modules/@emotion/unitless/dist/emotion-unitless.esm.js","webpack://wp/./node_modules/@emotion/serialize/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js","webpack://wp/./node_modules/@emotion/serialize/dist/emotion-serialize.browser.esm.js","webpack://wp/./node_modules/@emotion/hash/dist/emotion-hash.esm.js","webpack://wp/./node_modules/@emotion/react/dist/emotion-element-699e6908.browser.esm.js","webpack://wp/./node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js","webpack://wp/./node_modules/@emotion/css/create-instance/dist/emotion-css-create-instance.esm.js","webpack://wp/./node_modules/@emotion/css/dist/emotion-css.esm.js","../../packages/components/src/utils/hooks/use-cx.ts","../../packages/components/src/context/use-context-system.js","../../packages/components/src/context/utils.js","../../packages/components/src/context/context-connect.ts","../../packages/components/src/visually-hidden/styles.ts","webpack://wp/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://wp/./node_modules/@emotion/is-prop-valid/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js","webpack://wp/./node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js","webpack://wp/./node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js","../../packages/components/src/view/component.tsx","../../packages/components/src/visually-hidden/component.tsx","../../packages/components/src/alignment-matrix-control/utils.tsx","webpack://wp/./node_modules/@emotion/react/dist/emotion-react.browser.esm.js","../../packages/components/src/utils/space.ts","../../packages/components/src/utils/colors-values.js","../../packages/components/src/utils/config-values.js","../../packages/components/src/alignment-matrix-control/styles.ts","../../packages/components/src/alignment-matrix-control/cell.tsx","../../packages/components/src/alignment-matrix-control/icon.tsx","../../packages/components/src/alignment-matrix-control/index.tsx","../../packages/components/src/animate/index.tsx","webpack://wp/./node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs","webpack://wp/./node_modules/framer-motion/dist/es/context/MotionContext/index.mjs","webpack://wp/./node_modules/framer-motion/dist/es/context/PresenceContext.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/is-browser.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs","webpack://wp/./node_modules/framer-motion/dist/es/context/LazyContext.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/optimized-appear/data-id.mjs","webpack://wp/./node_modules/framer-motion/dist/es/frameloop/render-step.mjs","webpack://wp/./node_modules/framer-motion/dist/es/frameloop/batcher.mjs","webpack://wp/./node_modules/framer-motion/dist/es/frameloop/microtask.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/is-ref-object.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/utils/is-variant-label.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/utils/is-animation-controls.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/utils/variant-props.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/utils/is-controlling-variants.mjs","webpack://wp/./node_modules/framer-motion/dist/es/context/MotionContext/create.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/features/definitions.mjs","webpack://wp/./node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs","webpack://wp/./node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/utils/symbol.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/index.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/features/load-features.mjs","webpack://wp/./node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/motion-proxy.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/svg/lowercase-elements.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/styles/scale-correction.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/html/utils/transform.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs","webpack://wp/./node_modules/framer-motion/dist/es/value/utils/is-motion-value.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/html/utils/build-transform.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/utils/is-css-variable.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/value-types/get-as-type.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/clamp.mjs","webpack://wp/./node_modules/framer-motion/dist/es/value/types/numbers/index.mjs","webpack://wp/./node_modules/framer-motion/dist/es/value/types/utils.mjs","webpack://wp/./node_modules/framer-motion/dist/es/value/types/numbers/units.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/value-types/type-int.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/value-types/number.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/html/utils/build-styles.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/html/use-props.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/svg/utils/transform-origin.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/svg/utils/path.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/svg/use-props.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/use-render.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/html/utils/render.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/svg/utils/render.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/utils/resolve-variants.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/use-constant.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/resolve-value.mjs","webpack://wp/./node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/noop.mjs","webpack://wp/./node_modules/framer-motion/dist/es/frameloop/frame.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/svg/config-motion.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/html/config-motion.mjs","webpack://wp/./node_modules/framer-motion/dist/es/events/add-dom-event.mjs","webpack://wp/./node_modules/framer-motion/dist/es/events/utils/is-primary-pointer.mjs","webpack://wp/./node_modules/framer-motion/dist/es/events/event-info.mjs","webpack://wp/./node_modules/framer-motion/dist/es/events/add-pointer-event.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/pipe.mjs","webpack://wp/./node_modules/framer-motion/dist/es/gestures/drag/utils/lock.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/features/Feature.mjs","webpack://wp/./node_modules/framer-motion/dist/es/gestures/hover.mjs","webpack://wp/./node_modules/framer-motion/dist/es/gestures/utils/is-node-or-child.mjs","webpack://wp/./node_modules/framer-motion/dist/es/gestures/press.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/features/gestures.mjs","webpack://wp/./node_modules/framer-motion/dist/es/gestures/focus.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/shallow-compare.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/time-conversion.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/utils/default-transitions.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/utils/transitions.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/use-instant-transition-state.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs","webpack://wp/./node_modules/framer-motion/dist/es/frameloop/sync-time.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/is-zero-value-string.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/errors.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/is-numerical-string.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/utils/css-variables-conversion.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/utils/unit-conversion.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/value-types/test.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/value-types/dimensions.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/value-types/type-auto.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/utils/KeyframesResolver.mjs","webpack://wp/./node_modules/framer-motion/dist/es/value/types/color/utils.mjs","webpack://wp/./node_modules/framer-motion/dist/es/value/types/color/rgba.mjs","webpack://wp/./node_modules/framer-motion/dist/es/value/types/color/hex.mjs","webpack://wp/./node_modules/framer-motion/dist/es/value/types/color/hsla.mjs","webpack://wp/./node_modules/framer-motion/dist/es/value/types/color/index.mjs","webpack://wp/./node_modules/framer-motion/dist/es/value/types/complex/index.mjs","webpack://wp/./node_modules/framer-motion/dist/es/value/types/complex/filter.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/value-types/defaults.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/value-types/animatable-none.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/html/utils/make-none-animatable.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/DOMKeyframesResolver.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/utils/is-none.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/utils/is-animatable.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/animators/BaseAnimation.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/animators/utils/can-animate.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/velocity-per-second.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/generators/utils/velocity.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/generators/spring/find.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/generators/spring/index.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/generators/inertia.mjs","webpack://wp/./node_modules/framer-motion/dist/es/easing/cubic-bezier.mjs","webpack://wp/./node_modules/framer-motion/dist/es/easing/ease.mjs","webpack://wp/./node_modules/framer-motion/dist/es/easing/modifiers/mirror.mjs","webpack://wp/./node_modules/framer-motion/dist/es/easing/modifiers/reverse.mjs","webpack://wp/./node_modules/framer-motion/dist/es/easing/circ.mjs","webpack://wp/./node_modules/framer-motion/dist/es/easing/back.mjs","webpack://wp/./node_modules/framer-motion/dist/es/easing/utils/map.mjs","webpack://wp/./node_modules/framer-motion/dist/es/easing/anticipate.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/progress.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/mix/number.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/hsla-to-rgba.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/mix/color.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/mix/complex.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/mix/index.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/generators/keyframes.mjs","webpack://wp/./node_modules/framer-motion/dist/es/easing/utils/is-easing-array.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/offsets/time.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/offsets/default.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/offsets/fill.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/interpolate.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/animators/drivers/driver-frameloop.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/animators/MainThreadAnimation.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/generators/utils/calc-duration.mjs","webpack://wp/./node_modules/framer-motion/dist/es/easing/utils/is-bezier-definition.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/animators/waapi/easing.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/animators/AcceleratedAnimation.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/memo.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/animators/waapi/index.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/interfaces/motion-value.mjs","webpack://wp/./node_modules/framer-motion/dist/es/value/use-will-change/is.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/array.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/subscription-manager.mjs","webpack://wp/./node_modules/framer-motion/dist/es/value/index.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/utils/setters.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/interfaces/visual-element-variant.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/utils/animation-state.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/interfaces/visual-element.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/features/animations.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/features/animation/index.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/distance.mjs","webpack://wp/./node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/geometry/delta-calc.mjs","webpack://wp/./node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/geometry/models.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/utils/each-axis.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/geometry/conversion.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/utils/has-transform.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/geometry/delta-apply.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/utils/measure.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/get-context-window.mjs","webpack://wp/./node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs","webpack://wp/./node_modules/framer-motion/dist/es/gestures/pan/index.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/node/state.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/styles/scale-border-radius.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs","webpack://wp/./node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/animation/mix-values.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/geometry/copy.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/geometry/delta-remove.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/geometry/utils.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/shared/stack.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/styles/transform.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/utils/compare-by-depth.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/utils/flat-tree.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/node/create-projection-node.mjs","webpack://wp/./node_modules/framer-motion/dist/es/debug/record.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/utils/is-svg-element.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/delay.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/interfaces/single-value.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/features/drag.mjs","webpack://wp/./node_modules/framer-motion/dist/es/gestures/drag/index.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/reduced-motion/state.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/store.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/value-types/find.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/VisualElement.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/reduced-motion/index.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/utils/motion-values.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/DOMVisualElement.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/svg/SVGVisualElement.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/motion.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/features/layout.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/utils/create-config.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/use-is-mounted.mjs","webpack://wp/./node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs","webpack://wp/./node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs","webpack://wp/./node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/use-force-update.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/use-unmount-effect.mjs","../../packages/components/src/utils/use-responsive-value.ts","../../packages/components/src/flex/styles.ts","../../packages/components/src/flex/flex/hook.ts","../../packages/components/src/flex/context.ts","../../packages/components/src/flex/flex/component.tsx","../../packages/components/src/flex/flex-item/hook.ts","../../packages/components/src/flex/flex-block/component.tsx","../../packages/components/src/flex/flex-block/hook.ts","../../packages/components/src/utils/rtl.js","../../packages/components/src/spacer/hook.ts","../../packages/components/src/spacer/component.tsx","../../packages/icons/src/library/plus.js","../../packages/icons/src/library/reset.js","../../packages/components/src/flex/flex-item/component.tsx","../../packages/components/src/truncate/styles.ts","../../packages/components/src/utils/values.js","../../packages/components/src/truncate/utils.ts","../../packages/components/src/truncate/hook.ts","webpack://wp/./node_modules/colord/index.mjs","webpack://wp/./node_modules/colord/plugins/names.mjs","../../packages/components/src/utils/colors.js","../../packages/components/src/text/styles.ts","../../packages/components/src/text/utils.ts","../../packages/components/src/utils/font-size.ts","../../packages/components/src/text/hook.ts","../../packages/components/src/text/get-line-height.ts","../../packages/components/src/text/component.tsx","../../packages/components/src/utils/base-label.ts","../../packages/components/src/input-control/styles/input-control-styles.tsx","../../packages/components/src/input-control/backdrop.tsx","../../packages/components/src/input-control/label.tsx","../../packages/components/src/utils/use-deprecated-props.ts","../../packages/components/src/input-control/input-base.tsx","webpack://wp/./node_modules/@use-gesture/core/dist/maths-0ab39ae9.esm.js","webpack://wp/./node_modules/@use-gesture/core/dist/actions-fe213e88.esm.js","webpack://wp/./node_modules/@use-gesture/core/dist/use-gesture-core.esm.js","webpack://wp/./node_modules/@use-gesture/react/dist/use-gesture-react.esm.js","../../packages/components/src/input-control/reducer/state.ts","../../packages/components/src/input-control/reducer/actions.ts","../../packages/components/src/utils/with-ignore-ime-events.ts","../../packages/components/src/input-control/input-field.tsx","../../packages/components/src/input-control/reducer/reducer.ts","../../packages/components/src/input-control/utils.ts","../../packages/components/src/utils/font-values.js","../../packages/components/src/utils/font.js","../../packages/components/src/utils/box-sizing.ts","../../packages/components/src/base-control/styles/base-control-styles.ts","../../packages/components/src/base-control/index.tsx","../../packages/components/src/utils/deprecated-36px-size.ts","../../packages/components/src/input-control/index.tsx","../../packages/components/src/dashicon/index.tsx","../../packages/components/src/icon/index.tsx","../../packages/components/src/button/index.tsx","../../packages/components/src/number-control/styles/number-control-styles.ts","../../packages/components/src/utils/math.js","../../packages/components/src/h-stack/utils.ts","../../packages/components/src/utils/get-valid-children.ts","../../packages/components/src/h-stack/hook.tsx","../../packages/components/src/h-stack/component.tsx","../../packages/components/src/number-control/index.tsx","../../packages/components/src/angle-picker-control/styles/angle-picker-control-styles.tsx","../../packages/components/src/angle-picker-control/angle-circle.tsx","../../packages/components/src/angle-picker-control/index.tsx","webpack://wp/external window [\"wp\",\"richText\"]","webpack://wp/external window [\"wp\",\"a11y\"]","webpack://wp/external window [\"wp\",\"keycodes\"]","../../packages/components/src/utils/strings.ts","webpack://wp/./packages/components/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.esm.js","../../packages/icons/src/library/close.js","../../packages/components/src/scroll-lock/index.tsx","../../packages/components/src/slot-fill/bubbles-virtually/slot-fill-context.ts","../../packages/components/src/slot-fill/bubbles-virtually/use-slot.ts","../../packages/components/src/slot-fill/context.ts","../../packages/components/src/slot-fill/fill.ts","../../packages/components/src/slot-fill/slot.tsx","webpack://wp/./packages/components/node_modules/uuid/dist/esm-browser/rng.js","webpack://wp/./packages/components/node_modules/uuid/dist/esm-browser/regex.js","webpack://wp/./packages/components/node_modules/uuid/dist/esm-browser/stringify.js","webpack://wp/./packages/components/node_modules/uuid/dist/esm-browser/validate.js","webpack://wp/./packages/components/node_modules/uuid/dist/esm-browser/v4.js","../../packages/components/src/style-provider/index.tsx","../../packages/components/src/slot-fill/bubbles-virtually/fill.tsx","../../packages/components/src/slot-fill/bubbles-virtually/slot.tsx","webpack://wp/external window [\"wp\",\"isShallowEqual\"]","../../packages/components/src/slot-fill/bubbles-virtually/slot-fill-provider.tsx","../../packages/components/src/slot-fill/provider.tsx","../../packages/components/src/slot-fill/index.tsx","../../packages/components/src/popover/index.tsx","../../packages/components/src/popover/overlay-middlewares.tsx","../../packages/components/src/autocomplete/autocompleter-ui.tsx","../../packages/components/src/autocomplete/get-default-use-items.tsx","../../packages/components/src/autocomplete/index.tsx","../../packages/components/src/base-control/hooks.ts","../../packages/icons/src/library/link.js","../../packages/icons/src/library/link-off.js","../../packages/components/src/border-box-control/styles.ts","../../packages/components/src/border-box-control/border-box-control-linked-button/component.tsx","../../packages/components/src/border-box-control/border-box-control-linked-button/hook.ts","../../packages/components/src/border-box-control/border-box-control-visualizer/component.tsx","../../packages/components/src/border-box-control/border-box-control-visualizer/hook.ts","../../packages/icons/src/library/line-solid.js","../../packages/icons/src/library/line-dashed.js","../../packages/icons/src/library/line-dotted.js","../../packages/components/src/toggle-group-control/toggle-group-control/styles.ts","webpack://wp/./node_modules/@ariakit/core/esm/radio/radio-store.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/4BXJGRNH.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/UVUMR3WP.js","webpack://wp/./node_modules/@ariakit/react-core/esm/radio/radio-group.js","../../packages/components/src/toggle-group-control/context.ts","../../packages/components/src/toggle-group-control/toggle-group-control/utils.ts","../../packages/components/src/toggle-group-control/toggle-group-control/as-radio-group.tsx","../../packages/components/src/utils/hooks/use-controlled-value.ts","../../packages/components/src/toggle-group-control/toggle-group-control/as-button-group.tsx","../../packages/components/src/utils/element-rect.ts","../../packages/components/src/utils/hooks/use-animated-offset-rect.ts","../../packages/components/src/utils/hooks/use-on-value-update.ts","../../packages/components/src/toggle-group-control/toggle-group-control/component.tsx","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/NLEBE274.js","../../packages/components/src/toggle-group-control/toggle-group-control-option-base/styles.ts","../../packages/components/src/toggle-group-control/toggle-group-control-option-base/component.tsx","../../packages/components/src/toggle-group-control/toggle-group-control-option-icon/component.tsx","../../packages/components/src/border-control/border-control-style-picker/component.tsx","../../packages/components/src/color-indicator/index.tsx","webpack://wp/./node_modules/colord/plugins/a11y.mjs","../../packages/components/src/dropdown/index.tsx","../../packages/components/src/input-control/input-suffix-wrapper.tsx","../../packages/components/src/select-control/styles/select-control-styles.ts","../../packages/icons/src/icon/index.js","../../packages/icons/src/library/chevron-down.js","../../packages/components/src/select-control/chevron-down.tsx","../../packages/components/src/select-control/index.tsx","../../packages/components/src/utils/hooks/use-controlled-state.js","../../packages/components/src/range-control/utils.ts","../../packages/components/src/range-control/styles/range-control-styles.ts","../../packages/components/src/range-control/input-range.tsx","../../packages/components/src/range-control/mark.tsx","../../packages/components/src/range-control/rail.tsx","../../packages/components/src/range-control/tooltip.tsx","../../packages/components/src/range-control/index.tsx","../../packages/components/src/color-picker/styles.ts","../../packages/icons/src/library/copy.js","../../packages/components/src/color-picker/color-copy-button.tsx","../../packages/components/src/input-control/input-prefix-wrapper.tsx","../../packages/components/src/color-picker/input-with-slider.tsx","../../packages/components/src/color-picker/rgb-input.tsx","../../packages/components/src/color-picker/hsl-input.tsx","../../packages/components/src/color-picker/hex-input.tsx","../../packages/components/src/color-picker/color-input.tsx","webpack://wp/./node_modules/react-colorful/src/hooks/useEventCallback.ts","webpack://wp/./node_modules/react-colorful/src/utils/clamp.ts","webpack://wp/./node_modules/react-colorful/src/components/common/Interactive.tsx","webpack://wp/./node_modules/react-colorful/src/utils/format.ts","webpack://wp/./node_modules/react-colorful/src/components/common/Pointer.tsx","webpack://wp/./node_modules/react-colorful/src/utils/round.ts","webpack://wp/./node_modules/react-colorful/src/utils/convert.ts","webpack://wp/./node_modules/react-colorful/src/components/common/Hue.tsx","webpack://wp/./node_modules/react-colorful/src/components/common/Saturation.tsx","webpack://wp/./node_modules/react-colorful/src/utils/compare.ts","webpack://wp/./node_modules/react-colorful/src/hooks/useColorManipulation.ts","webpack://wp/./node_modules/react-colorful/src/hooks/useStyleSheet.ts","webpack://wp/./node_modules/react-colorful/src/hooks/useIsomorphicLayoutEffect.ts","webpack://wp/./node_modules/react-colorful/src/utils/nonce.ts","webpack://wp/./node_modules/react-colorful/src/components/common/ColorPicker.tsx","webpack://wp/./node_modules/react-colorful/src/components/common/Alpha.tsx","webpack://wp/./node_modules/react-colorful/src/components/common/AlphaColorPicker.tsx","webpack://wp/./node_modules/react-colorful/src/components/RgbaStringColorPicker.tsx","webpack://wp/./node_modules/react-colorful/src/components/RgbStringColorPicker.tsx","../../packages/components/src/color-picker/picker.tsx","../../packages/components/src/color-picker/component.tsx","../../packages/components/src/color-picker/use-deprecated-props.ts","../../packages/components/src/color-picker/legacy-adapter.tsx","../../packages/components/src/circular-option-picker/circular-option-picker-context.tsx","../../packages/icons/src/library/check.js","../../packages/components/src/circular-option-picker/circular-option-picker-option.tsx","../../packages/components/src/circular-option-picker/circular-option-picker.tsx","../../packages/components/src/circular-option-picker/circular-option-picker-option-group.tsx","../../packages/components/src/circular-option-picker/circular-option-picker-actions.tsx","../../packages/components/src/circular-option-picker/index.tsx","../../packages/components/src/v-stack/component.tsx","../../packages/components/src/v-stack/hook.ts","../../packages/components/src/truncate/component.tsx","../../packages/components/src/heading/component.tsx","../../packages/components/src/heading/hook.ts","../../packages/components/src/color-palette/styles.ts","../../packages/components/src/dropdown/styles.ts","../../packages/components/src/dropdown/dropdown-content-wrapper.tsx","../../packages/components/src/color-palette/utils.ts","../../packages/components/src/color-palette/index.tsx","../../packages/components/src/unit-control/styles/unit-control-styles.ts","../../packages/components/src/border-control/styles.ts","../../packages/components/src/unit-control/utils.ts","../../packages/components/src/border-control/border-control-dropdown/component.tsx","../../packages/components/src/border-control/border-control-dropdown/hook.ts","../../packages/components/src/unit-control/unit-select-control.tsx","../../packages/components/src/unit-control/index.tsx","../../packages/components/src/border-control/border-control/hook.ts","../../packages/components/src/border-control/border-control/component.tsx","../../packages/components/src/grid/utils.ts","../../packages/components/src/grid/component.tsx","../../packages/components/src/grid/hook.ts","../../packages/components/src/border-box-control/border-box-control-split-controls/component.tsx","../../packages/components/src/border-box-control/border-box-control-split-controls/hook.ts","../../packages/components/src/utils/unit-values.ts","../../packages/components/src/border-box-control/utils.ts","../../packages/components/src/border-box-control/border-box-control/hook.ts","../../packages/components/src/border-box-control/border-box-control/component.tsx","../../packages/icons/src/library/settings.js","../../packages/components/src/box-control/utils.ts","../../packages/components/src/box-control/styles/box-control-icon-styles.ts","../../packages/components/src/box-control/icon.tsx","../../packages/components/src/box-control/styles/box-control-styles.ts","../../packages/components/src/box-control/input-control.tsx","../../packages/components/src/box-control/linked-button.tsx","../../packages/components/src/box-control/index.tsx","../../packages/components/src/button-group/index.tsx","../../packages/components/src/elevation/styles.ts","../../packages/components/src/elevation/hook.ts","../../packages/components/src/elevation/component.tsx","../../packages/components/src/card/styles.ts","../../packages/components/src/surface/styles.ts","../../packages/components/src/surface/hook.ts","../../packages/components/src/card/card/component.tsx","../../packages/components/src/card/card/hook.ts","../../packages/components/src/scrollable/styles.ts","../../packages/components/src/scrollable/component.tsx","../../packages/components/src/scrollable/hook.ts","../../packages/components/src/card/card-body/component.tsx","../../packages/components/src/card/card-body/hook.ts","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/A3CZKICO.js","../../packages/components/src/divider/styles.ts","../../packages/components/src/divider/component.tsx","../../packages/components/src/card/card-divider/component.tsx","../../packages/components/src/card/card-divider/hook.ts","../../packages/components/src/card/card-footer/component.tsx","../../packages/components/src/card/card-footer/hook.ts","../../packages/components/src/card/card-header/component.tsx","../../packages/components/src/card/card-header/hook.ts","../../packages/components/src/card/card-media/component.tsx","../../packages/components/src/card/card-media/hook.ts","../../packages/components/src/checkbox-control/index.tsx","../../packages/components/src/clipboard-button/index.tsx","../../packages/icons/src/library/more-vertical.js","../../packages/components/src/item-group/styles.ts","../../packages/components/src/item-group/context.ts","../../packages/components/src/item-group/item/component.tsx","../../packages/components/src/item-group/item/hook.ts","../../packages/components/src/item-group/item-group/component.tsx","../../packages/components/src/item-group/item-group/hook.ts","../../packages/components/src/custom-gradient-picker/gradient-bar/constants.ts","../../packages/components/src/custom-gradient-picker/gradient-bar/utils.ts","../../packages/components/src/custom-gradient-picker/gradient-bar/control-points.tsx","../../packages/components/src/custom-gradient-picker/gradient-bar/index.tsx","../../packages/components/src/custom-gradient-picker/constants.ts","../../packages/components/src/custom-gradient-picker/serializer.ts","../../packages/components/src/custom-gradient-picker/utils.ts","../../packages/components/src/custom-gradient-picker/styles/custom-gradient-picker-styles.tsx","../../packages/components/src/custom-gradient-picker/index.tsx","../../packages/components/src/gradient-picker/index.tsx","../../packages/icons/src/library/menu.js","webpack://wp/external window [\"wp\",\"dom\"]","../../packages/components/src/navigable-container/container.tsx","../../packages/components/src/navigable-container/menu.tsx","../../packages/components/src/dropdown-menu/index.tsx","../../packages/components/src/palette-edit/styles.ts","../../packages/components/src/palette-edit/index.tsx","../../packages/icons/src/library/close-small.js","../../packages/components/src/combobox-control/styles.ts","../../packages/components/src/form-token-field/token-input.tsx","../../packages/components/src/form-token-field/suggestions-list.tsx","../../packages/components/src/higher-order/with-focus-outside/index.tsx","../../packages/components/src/combobox-control/index.tsx","../../packages/components/src/composite/legacy/index.tsx","../../packages/components/src/modal/aria-helper.ts","../../packages/components/src/modal/use-modal-exit-animation.ts","../../packages/components/src/modal/index.tsx","../../packages/components/src/confirm-dialog/styles.ts","../../packages/components/src/confirm-dialog/component.tsx","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/VEVQD5MH.js","webpack://wp/./node_modules/@ariakit/core/esm/select/select-store.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/KPEX55MY.js","webpack://wp/./node_modules/@ariakit/react-core/esm/select/select-label.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/X5NMLKT6.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/P4IRICAX.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/AXB53BZF.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/OMU7RWRV.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/QYJ6MIDR.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/DR55NYVS.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/UD53QJDV.js","webpack://wp/./node_modules/@ariakit/react-core/esm/select/select.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/XRBJGF7I.js","webpack://wp/./node_modules/@ariakit/react-core/esm/select/select-popover.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/YF2ICFG4.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/EYKMH5G5.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/5JCRYSSV.js","webpack://wp/./node_modules/@ariakit/react-core/esm/select/select-item-check.js","../../packages/components/src/custom-select-control-v2/styles.ts","../../packages/components/src/custom-select-control-v2/custom-select.tsx","../../packages/components/src/custom-select-control-v2/item.tsx","../../packages/components/src/custom-select-control/index.tsx","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/S5WQ44SQ.js","webpack://wp/./node_modules/date-fns/toDate.mjs","webpack://wp/./node_modules/date-fns/startOfDay.mjs","webpack://wp/./node_modules/date-fns/constructFrom.mjs","webpack://wp/./node_modules/date-fns/addMonths.mjs","webpack://wp/./node_modules/date-fns/subMonths.mjs","webpack://wp/./node_modules/date-fns/locale/en-US/_lib/formatDistance.mjs","webpack://wp/./node_modules/date-fns/locale/_lib/buildFormatLongFn.mjs","webpack://wp/./node_modules/date-fns/locale/en-US/_lib/formatLong.mjs","webpack://wp/./node_modules/date-fns/locale/en-US/_lib/formatRelative.mjs","webpack://wp/./node_modules/date-fns/locale/_lib/buildLocalizeFn.mjs","webpack://wp/./node_modules/date-fns/locale/en-US/_lib/localize.mjs","webpack://wp/./node_modules/date-fns/locale/_lib/buildMatchFn.mjs","webpack://wp/./node_modules/date-fns/locale/en-US/_lib/match.mjs","webpack://wp/./node_modules/date-fns/locale/_lib/buildMatchPatternFn.mjs","webpack://wp/./node_modules/date-fns/locale/en-US.mjs","webpack://wp/./node_modules/date-fns/_lib/defaultOptions.mjs","webpack://wp/./node_modules/date-fns/constants.mjs","webpack://wp/./node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.mjs","webpack://wp/./node_modules/date-fns/getDayOfYear.mjs","webpack://wp/./node_modules/date-fns/differenceInCalendarDays.mjs","webpack://wp/./node_modules/date-fns/startOfYear.mjs","webpack://wp/./node_modules/date-fns/startOfWeek.mjs","webpack://wp/./node_modules/date-fns/startOfISOWeek.mjs","webpack://wp/./node_modules/date-fns/getISOWeekYear.mjs","webpack://wp/./node_modules/date-fns/getISOWeek.mjs","webpack://wp/./node_modules/date-fns/startOfISOWeekYear.mjs","webpack://wp/./node_modules/date-fns/getWeekYear.mjs","webpack://wp/./node_modules/date-fns/getWeek.mjs","webpack://wp/./node_modules/date-fns/startOfWeekYear.mjs","webpack://wp/./node_modules/date-fns/_lib/addLeadingZeros.mjs","webpack://wp/./node_modules/date-fns/_lib/format/lightFormatters.mjs","webpack://wp/./node_modules/date-fns/_lib/format/formatters.mjs","webpack://wp/./node_modules/date-fns/_lib/format/longFormatters.mjs","webpack://wp/./node_modules/date-fns/_lib/protectedTokens.mjs","webpack://wp/./node_modules/date-fns/isValid.mjs","webpack://wp/./node_modules/date-fns/isDate.mjs","webpack://wp/./node_modules/date-fns/format.mjs","webpack://wp/./node_modules/date-fns/isSameMonth.mjs","webpack://wp/./node_modules/date-fns/isEqual.mjs","webpack://wp/./node_modules/date-fns/isSameDay.mjs","webpack://wp/./node_modules/date-fns/addDays.mjs","webpack://wp/./node_modules/date-fns/addWeeks.mjs","webpack://wp/./node_modules/date-fns/endOfWeek.mjs","../../packages/icons/src/library/arrow-right.js","../../packages/icons/src/library/arrow-left.js","webpack://wp/external window [\"wp\",\"date\"]","webpack://wp/./node_modules/date-fns/setMonth.mjs","webpack://wp/./node_modules/date-fns/getDaysInMonth.mjs","webpack://wp/./node_modules/date-fns/set.mjs","webpack://wp/./node_modules/date-fns/addYears.mjs","webpack://wp/./node_modules/date-fns/eachDayOfInterval.mjs","webpack://wp/./node_modules/date-fns/startOfMonth.mjs","webpack://wp/./node_modules/date-fns/endOfMonth.mjs","../../packages/components/src/date-time/date/use-lilius/index.ts","webpack://wp/./node_modules/date-fns/isAfter.mjs","webpack://wp/./node_modules/date-fns/isBefore.mjs","../../packages/components/src/date-time/date/styles.ts","../../packages/components/src/date-time/utils.ts","../../packages/components/src/date-time/constants.ts","../../packages/components/src/date-time/date/index.tsx","webpack://wp/./node_modules/date-fns/startOfToday.mjs","webpack://wp/./node_modules/date-fns/setYear.mjs","webpack://wp/./node_modules/date-fns/subYears.mjs","webpack://wp/./node_modules/date-fns/eachMonthOfInterval.mjs","webpack://wp/./node_modules/date-fns/eachWeekOfInterval.mjs","webpack://wp/./node_modules/date-fns/subWeeks.mjs","webpack://wp/./node_modules/date-fns/startOfMinute.mjs","../../packages/components/src/date-time/time/styles.ts","../../packages/components/src/date-time/time/timezone.tsx","../../packages/components/src/toggle-group-control/toggle-group-control-option/component.tsx","../../packages/components/src/date-time/time/time-input/index.tsx","../../packages/components/src/date-time/time/index.tsx","../../packages/components/src/date-time/date-time/styles.ts","../../packages/components/src/date-time/date-time/index.tsx","../../packages/components/src/date-time/index.ts","../../packages/components/src/dimension-control/sizes.ts","../../packages/components/src/dimension-control/index.tsx","../../packages/components/src/disabled/styles/disabled-styles.tsx","../../packages/components/src/disabled/index.tsx","../../packages/components/src/disclosure/index.tsx","../../packages/components/src/draggable/index.tsx","../../packages/icons/src/library/upload.js","../../packages/components/src/drop-zone/index.tsx","../../packages/components/src/drop-zone/provider.ts","../../packages/icons/src/library/swatch.js","../../packages/components/src/duotone-picker/utils.ts","../../packages/components/src/duotone-picker/duotone-swatch.tsx","../../packages/components/src/duotone-picker/color-list-picker/index.tsx","../../packages/components/src/duotone-picker/custom-duotone-bar.tsx","../../packages/components/src/duotone-picker/duotone-picker.tsx","../../packages/components/src/external-link/index.tsx","../../packages/components/src/focal-point-picker/utils.ts","../../packages/components/src/focal-point-picker/styles/focal-point-picker-style.ts","../../packages/components/src/focal-point-picker/controls.tsx","../../packages/components/src/focal-point-picker/styles/focal-point-style.ts","../../packages/components/src/focal-point-picker/focal-point.tsx","../../packages/components/src/focal-point-picker/grid.tsx","../../packages/components/src/focal-point-picker/media.tsx","../../packages/components/src/focal-point-picker/index.tsx","../../packages/components/src/focusable-iframe/index.tsx","../../packages/components/src/font-size-picker/utils.ts","../../packages/components/src/font-size-picker/styles.ts","../../packages/components/src/font-size-picker/font-size-picker-select.tsx","../../packages/components/src/font-size-picker/constants.ts","../../packages/components/src/font-size-picker/font-size-picker-toggle-group.tsx","../../packages/components/src/font-size-picker/index.tsx","../../packages/components/src/form-file-upload/index.tsx","../../packages/components/src/form-toggle/index.tsx","../../packages/components/src/form-token-field/token.tsx","../../packages/components/src/form-token-field/styles.ts","../../packages/components/src/form-token-field/index.tsx","../../packages/components/src/guide/icons.tsx","../../packages/components/src/guide/page-control.tsx","../../packages/components/src/guide/index.tsx","../../packages/components/src/guide/page.tsx","../../packages/components/src/button/deprecated.tsx","../../packages/components/src/keyboard-shortcuts/index.tsx","../../packages/components/src/menu-group/index.tsx","../../packages/components/src/menu-item/index.tsx","../../packages/components/src/menu-items-choice/index.tsx","../../packages/components/src/navigable-container/tabbable.tsx","../../packages/components/src/navigation/constants.tsx","../../packages/components/src/navigation/context.tsx","../../packages/components/src/navigation/styles/navigation-styles.tsx","../../packages/components/src/navigation/use-navigation-tree-nodes.tsx","../../packages/components/src/navigation/use-create-navigation-tree.tsx","../../packages/components/src/navigation/index.tsx","../../packages/icons/src/library/chevron-right.js","../../packages/icons/src/library/chevron-left.js","../../packages/components/src/navigation/back-button/index.tsx","../../packages/components/src/navigation/group/context.tsx","../../packages/components/src/navigation/group/index.tsx","../../packages/components/src/navigation/item/base-content.tsx","../../packages/components/src/navigation/menu/context.tsx","../../packages/components/src/navigation/utils.tsx","../../packages/components/src/navigation/item/base.tsx","../../packages/components/src/navigation/item/use-navigation-tree-item.tsx","../../packages/components/src/navigation/item/index.tsx","../../packages/icons/src/library/search.js","../../packages/components/src/higher-order/with-spoken-messages/index.tsx","../../packages/components/src/search-control/styles.ts","../../packages/components/src/search-control/index.tsx","../../packages/components/src/navigation/menu/menu-title-search.tsx","../../packages/components/src/navigation/menu/menu-title.tsx","../../packages/components/src/navigation/menu/search-no-results-found.tsx","../../packages/components/src/navigation/menu/index.tsx","../../packages/components/src/navigation/menu/use-navigation-tree-menu.tsx","webpack://wp/./packages/components/node_modules/path-to-regexp/src/index.ts","../../packages/components/src/navigator/utils/router.ts","../../packages/components/src/navigator/context.ts","../../packages/components/src/navigator/styles.ts","../../packages/components/src/navigator/navigator/component.tsx","webpack://wp/external window [\"wp\",\"escapeHtml\"]","../../packages/components/src/navigator/navigator-screen/component.tsx","../../packages/components/src/navigator/navigator-screen/use-screen-animate-presence.ts","../../packages/components/src/navigator/use-navigator.ts","../../packages/components/src/navigator/navigator-button/hook.ts","../../packages/components/src/navigator/navigator-button/component.tsx","../../packages/components/src/navigator/navigator-back-button/component.tsx","../../packages/components/src/navigator/navigator-back-button/hook.ts","../../packages/components/src/navigator/navigator-to-parent-button/component.tsx","../../packages/components/src/navigator/legacy.ts","../../packages/components/src/navigator/index.tsx","../../packages/components/src/notice/index.tsx","../../packages/components/src/notice/list.tsx","../../packages/components/src/panel/header.tsx","../../packages/components/src/panel/index.tsx","../../packages/icons/src/library/chevron-up.js","../../packages/components/src/panel/body.tsx","../../packages/components/src/panel/row.tsx","../../packages/components/src/placeholder/index.tsx","../../packages/components/src/progress-bar/styles.ts","../../packages/components/src/progress-bar/index.tsx","../../packages/components/src/query-controls/terms.ts","webpack://wp/external window [\"wp\",\"htmlEntities\"]","../../packages/components/src/tree-select/index.tsx","../../packages/components/src/query-controls/author-select.tsx","../../packages/components/src/query-controls/category-select.tsx","../../packages/components/src/query-controls/index.tsx","../../packages/components/src/radio-group/context.tsx","../../packages/components/src/radio-group/radio.tsx","../../packages/components/src/radio-group/index.tsx","../../packages/components/src/radio-control/index.tsx","webpack://wp/./node_modules/re-resizable/lib/resizer.js","webpack://wp/./node_modules/re-resizable/lib/index.js","../../packages/components/src/resizable-box/resize-tooltip/utils.ts","../../packages/components/src/resizable-box/resize-tooltip/styles/resize-tooltip.styles.ts","../../packages/components/src/resizable-box/resize-tooltip/label.tsx","../../packages/components/src/resizable-box/resize-tooltip/index.tsx","../../packages/components/src/resizable-box/index.tsx","../../packages/components/src/responsive-wrapper/index.tsx","../../packages/components/src/sandbox/index.tsx","../../packages/components/src/snackbar/index.tsx","../../packages/components/src/snackbar/list.tsx","../../packages/components/src/spinner/styles.ts","../../packages/components/src/spinner/index.tsx","../../packages/components/src/surface/component.tsx","webpack://wp/./node_modules/@ariakit/core/esm/tab/tab-store.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/PY4NZ6HS.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/UYGDZTLQ.js","webpack://wp/./node_modules/@ariakit/react-core/esm/tab/tab-list.js","webpack://wp/./node_modules/@ariakit/react-core/esm/tab/tab.js","webpack://wp/./node_modules/@ariakit/react-core/esm/tab/tab-panel.js","../../packages/components/src/tab-panel/index.tsx","../../packages/components/src/text-control/index.tsx","../../packages/components/src/textarea-control/styles/textarea-control-styles.ts","../../packages/components/src/utils/breakpoint.js","../../packages/components/src/textarea-control/index.tsx","../../packages/components/src/text-highlight/index.tsx","../../packages/icons/src/library/tip.js","../../packages/components/src/tip/index.tsx","../../packages/components/src/toggle-control/index.tsx","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/A3WPL2ZJ.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/BOLVLGVE.js","../../packages/components/src/toolbar/toolbar-context/index.ts","../../packages/components/src/toolbar/toolbar-item/index.tsx","../../packages/components/src/toolbar/toolbar-button/toolbar-button-container.tsx","../../packages/components/src/toolbar/toolbar-button/index.tsx","../../packages/components/src/toolbar/toolbar-group/toolbar-group-container.tsx","../../packages/components/src/toolbar/toolbar-group/toolbar-group-collapsed.tsx","../../packages/components/src/toolbar/toolbar-group/index.tsx","webpack://wp/./node_modules/@ariakit/core/esm/toolbar/toolbar-store.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/7M5THDKH.js","webpack://wp/./node_modules/@ariakit/react-core/esm/toolbar/toolbar.js","../../packages/components/src/toolbar/toolbar/toolbar-container.tsx","../../packages/components/src/toolbar/toolbar/index.tsx","../../packages/components/src/toolbar/toolbar-dropdown-menu/index.tsx","../../packages/components/src/tools-panel/styles.ts","../../packages/components/src/tools-panel/context.ts","../../packages/components/src/tools-panel/tools-panel-header/component.tsx","../../packages/components/src/tools-panel/tools-panel-header/hook.ts","../../packages/components/src/tools-panel/tools-panel/hook.ts","../../packages/components/src/tools-panel/tools-panel/component.tsx","../../packages/components/src/tools-panel/tools-panel-item/hook.ts","../../packages/components/src/tools-panel/tools-panel-item/component.tsx","../../packages/components/src/tree-grid/roving-tab-index-context.ts","../../packages/components/src/tree-grid/roving-tab-index.tsx","../../packages/components/src/tree-grid/index.tsx","../../packages/components/src/tree-grid/row.tsx","../../packages/components/src/tree-grid/roving-tab-index-item.tsx","../../packages/components/src/tree-grid/item.tsx","../../packages/components/src/tree-grid/cell.tsx","../../packages/components/src/isolated-event-container/index.tsx","../../packages/components/src/slot-fill/bubbles-virtually/use-slot-fills.ts","../../packages/components/src/z-stack/styles.ts","../../packages/components/src/z-stack/component.tsx","../../packages/components/src/higher-order/navigate-regions/index.tsx","../../packages/components/src/higher-order/with-constrained-tabbing/index.tsx","../../packages/components/src/higher-order/with-fallback-styles/index.tsx","webpack://wp/external window [\"wp\",\"hooks\"]","../../packages/components/src/higher-order/with-filters/index.tsx","../../packages/components/src/higher-order/with-focus-return/index.tsx","../../packages/components/src/higher-order/with-notices/index.tsx","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/B2J376ND.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/62UHHO2X.js","webpack://wp/./node_modules/@ariakit/core/esm/menu/menu-store.js","../../packages/components/src/menu/context.tsx","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/MVIULMNR.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/RNCDFVMF.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/ASMQKSDT.js","webpack://wp/./node_modules/@ariakit/core/esm/checkbox/checkbox-store.js","webpack://wp/./node_modules/@ariakit/react-core/esm/menu/menu-item-checkbox.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/HAVBGUA3.js","webpack://wp/./node_modules/@ariakit/react-core/esm/menu/menu-item-radio.js","webpack://wp/./node_modules/@ariakit/react-core/esm/menu/menu-group.js","webpack://wp/./node_modules/@ariakit/react-core/esm/menu/menu-group-label.js","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/TP7N7UIH.js","webpack://wp/./node_modules/@ariakit/react-core/esm/menu/menu-separator.js","../../packages/components/src/menu/styles.ts","../../packages/components/src/menu/item.tsx","webpack://wp/./node_modules/@ariakit/react-core/esm/menu/menu-item-check.js","../../packages/components/src/menu/checkbox-item.tsx","../../packages/components/src/menu/radio-item.tsx","../../packages/components/src/menu/group.tsx","../../packages/components/src/menu/group-label.tsx","../../packages/components/src/menu/separator.tsx","../../packages/components/src/menu/item-label.tsx","../../packages/components/src/menu/item-help-text.tsx","webpack://wp/./node_modules/@ariakit/react-core/esm/menu/menu-button.js","../../packages/components/src/menu/trigger-button.tsx","../../packages/icons/src/library/chevron-right-small.js","../../packages/components/src/menu/submenu-trigger-item.tsx","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/ASGALOAX.js","webpack://wp/./node_modules/@ariakit/react-core/esm/menu/menu.js","../../packages/components/src/menu/popover.tsx","../../packages/components/src/menu/index.tsx","webpack://wp/./node_modules/@ariakit/react-core/esm/__chunks/MRTXKBQF.js","../../packages/components/src/theme/styles.ts","../../packages/components/src/theme/color-algorithms.ts","../../packages/components/src/theme/index.tsx","../../packages/components/src/tabs/context.ts","../../packages/components/src/tabs/styles.ts","../../packages/components/src/tabs/tab.tsx","../../packages/components/src/tabs/tablist.tsx","../../packages/components/src/tabs/use-track-overflow.ts","../../packages/components/src/tabs/tabpanel.tsx","../../packages/components/src/tabs/index.tsx","webpack://wp/external window [\"wp\",\"privateApis\"]","../../packages/components/src/lock-unlock.js","../../packages/icons/src/library/info.js","../../packages/icons/src/library/published.js","../../packages/icons/src/library/caution.js","../../packages/icons/src/library/error.js","../../packages/components/src/private-apis.ts","../../packages/components/src/badge/index.tsx"],"sourcesContent":["var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));\n\t}\n\tdef['default'] = () => (value);\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn Object.propertyIsEnumerable.call(target, symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n","'use strict';\n\n// do not edit .js files directly - edit src/index.jst\n\n\n var envHasBigInt64Array = typeof BigInt64Array !== 'undefined';\n\n\nmodule.exports = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n if ((a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n for (i of a.entries())\n if (!b.has(i[0])) return false;\n for (i of a.entries())\n if (!equal(i[1], b.get(i[0]))) return false;\n return true;\n }\n\n if ((a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n for (i of a.entries())\n if (!b.has(i[0])) return false;\n return true;\n }\n\n if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n","//\n// Main\n//\n\nfunction memoize (fn, options) {\n var cache = options && options.cache\n ? options.cache\n : cacheDefault\n\n var serializer = options && options.serializer\n ? options.serializer\n : serializerDefault\n\n var strategy = options && options.strategy\n ? options.strategy\n : strategyDefault\n\n return strategy(fn, {\n cache: cache,\n serializer: serializer\n })\n}\n\n//\n// Strategy\n//\n\nfunction isPrimitive (value) {\n return value == null || typeof value === 'number' || typeof value === 'boolean' // || typeof value === \"string\" 'unsafe' primitive for our needs\n}\n\nfunction monadic (fn, cache, serializer, arg) {\n var cacheKey = isPrimitive(arg) ? arg : serializer(arg)\n\n var computedValue = cache.get(cacheKey)\n if (typeof computedValue === 'undefined') {\n computedValue = fn.call(this, arg)\n cache.set(cacheKey, computedValue)\n }\n\n return computedValue\n}\n\nfunction variadic (fn, cache, serializer) {\n var args = Array.prototype.slice.call(arguments, 3)\n var cacheKey = serializer(args)\n\n var computedValue = cache.get(cacheKey)\n if (typeof computedValue === 'undefined') {\n computedValue = fn.apply(this, args)\n cache.set(cacheKey, computedValue)\n }\n\n return computedValue\n}\n\nfunction assemble (fn, context, strategy, cache, serialize) {\n return strategy.bind(\n context,\n fn,\n cache,\n serialize\n )\n}\n\nfunction strategyDefault (fn, options) {\n var strategy = fn.length === 1 ? monadic : variadic\n\n return assemble(\n fn,\n this,\n strategy,\n options.cache.create(),\n options.serializer\n )\n}\n\nfunction strategyVariadic (fn, options) {\n var strategy = variadic\n\n return assemble(\n fn,\n this,\n strategy,\n options.cache.create(),\n options.serializer\n )\n}\n\nfunction strategyMonadic (fn, options) {\n var strategy = monadic\n\n return assemble(\n fn,\n this,\n strategy,\n options.cache.create(),\n options.serializer\n )\n}\n\n//\n// Serializer\n//\n\nfunction serializerDefault () {\n return JSON.stringify(arguments)\n}\n\n//\n// Cache\n//\n\nfunction ObjectWithoutPrototypeCache () {\n this.cache = Object.create(null)\n}\n\nObjectWithoutPrototypeCache.prototype.has = function (key) {\n return (key in this.cache)\n}\n\nObjectWithoutPrototypeCache.prototype.get = function (key) {\n return this.cache[key]\n}\n\nObjectWithoutPrototypeCache.prototype.set = function (key, value) {\n this.cache[key] = value\n}\n\nvar cacheDefault = {\n create: function create () {\n return new ObjectWithoutPrototypeCache()\n }\n}\n\n//\n// API\n//\n\nmodule.exports = memoize\nmodule.exports.strategies = {\n variadic: strategyVariadic,\n monadic: strategyMonadic\n}\n","// Copyright (c) 2014 Rafael Caricio. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nvar GradientParser = {};\n\nGradientParser.parse = (function() {\n\n var tokens = {\n linearGradient: /^(\\-(webkit|o|ms|moz)\\-)?(linear\\-gradient)/i,\n repeatingLinearGradient: /^(\\-(webkit|o|ms|moz)\\-)?(repeating\\-linear\\-gradient)/i,\n radialGradient: /^(\\-(webkit|o|ms|moz)\\-)?(radial\\-gradient)/i,\n repeatingRadialGradient: /^(\\-(webkit|o|ms|moz)\\-)?(repeating\\-radial\\-gradient)/i,\n sideOrCorner: /^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,\n extentKeywords: /^(closest\\-side|closest\\-corner|farthest\\-side|farthest\\-corner|contain|cover)/,\n positionKeywords: /^(left|center|right|top|bottom)/i,\n pixelValue: /^(-?(([0-9]*\\.[0-9]+)|([0-9]+\\.?)))px/,\n percentageValue: /^(-?(([0-9]*\\.[0-9]+)|([0-9]+\\.?)))\\%/,\n emValue: /^(-?(([0-9]*\\.[0-9]+)|([0-9]+\\.?)))em/,\n angleValue: /^(-?(([0-9]*\\.[0-9]+)|([0-9]+\\.?)))deg/,\n startCall: /^\\(/,\n endCall: /^\\)/,\n comma: /^,/,\n hexColor: /^\\#([0-9a-fA-F]+)/,\n literalColor: /^([a-zA-Z]+)/,\n rgbColor: /^rgb/i,\n rgbaColor: /^rgba/i,\n number: /^(([0-9]*\\.[0-9]+)|([0-9]+\\.?))/\n };\n\n var input = '';\n\n function error(msg) {\n var err = new Error(input + ': ' + msg);\n err.source = input;\n throw err;\n }\n\n function getAST() {\n var ast = matchListDefinitions();\n\n if (input.length > 0) {\n error('Invalid input not EOF');\n }\n\n return ast;\n }\n\n function matchListDefinitions() {\n return matchListing(matchDefinition);\n }\n\n function matchDefinition() {\n return matchGradient(\n 'linear-gradient',\n tokens.linearGradient,\n matchLinearOrientation) ||\n\n matchGradient(\n 'repeating-linear-gradient',\n tokens.repeatingLinearGradient,\n matchLinearOrientation) ||\n\n matchGradient(\n 'radial-gradient',\n tokens.radialGradient,\n matchListRadialOrientations) ||\n\n matchGradient(\n 'repeating-radial-gradient',\n tokens.repeatingRadialGradient,\n matchListRadialOrientations);\n }\n\n function matchGradient(gradientType, pattern, orientationMatcher) {\n return matchCall(pattern, function(captures) {\n\n var orientation = orientationMatcher();\n if (orientation) {\n if (!scan(tokens.comma)) {\n error('Missing comma before color stops');\n }\n }\n\n return {\n type: gradientType,\n orientation: orientation,\n colorStops: matchListing(matchColorStop)\n };\n });\n }\n\n function matchCall(pattern, callback) {\n var captures = scan(pattern);\n\n if (captures) {\n if (!scan(tokens.startCall)) {\n error('Missing (');\n }\n\n result = callback(captures);\n\n if (!scan(tokens.endCall)) {\n error('Missing )');\n }\n\n return result;\n }\n }\n\n function matchLinearOrientation() {\n return matchSideOrCorner() ||\n matchAngle();\n }\n\n function matchSideOrCorner() {\n return match('directional', tokens.sideOrCorner, 1);\n }\n\n function matchAngle() {\n return match('angular', tokens.angleValue, 1);\n }\n\n function matchListRadialOrientations() {\n var radialOrientations,\n radialOrientation = matchRadialOrientation(),\n lookaheadCache;\n\n if (radialOrientation) {\n radialOrientations = [];\n radialOrientations.push(radialOrientation);\n\n lookaheadCache = input;\n if (scan(tokens.comma)) {\n radialOrientation = matchRadialOrientation();\n if (radialOrientation) {\n radialOrientations.push(radialOrientation);\n } else {\n input = lookaheadCache;\n }\n }\n }\n\n return radialOrientations;\n }\n\n function matchRadialOrientation() {\n var radialType = matchCircle() ||\n matchEllipse();\n\n if (radialType) {\n radialType.at = matchAtPosition();\n } else {\n var defaultPosition = matchPositioning();\n if (defaultPosition) {\n radialType = {\n type: 'default-radial',\n at: defaultPosition\n };\n }\n }\n\n return radialType;\n }\n\n function matchCircle() {\n var circle = match('shape', /^(circle)/i, 0);\n\n if (circle) {\n circle.style = matchLength() || matchExtentKeyword();\n }\n\n return circle;\n }\n\n function matchEllipse() {\n var ellipse = match('shape', /^(ellipse)/i, 0);\n\n if (ellipse) {\n ellipse.style = matchDistance() || matchExtentKeyword();\n }\n\n return ellipse;\n }\n\n function matchExtentKeyword() {\n return match('extent-keyword', tokens.extentKeywords, 1);\n }\n\n function matchAtPosition() {\n if (match('position', /^at/, 0)) {\n var positioning = matchPositioning();\n\n if (!positioning) {\n error('Missing positioning value');\n }\n\n return positioning;\n }\n }\n\n function matchPositioning() {\n var location = matchCoordinates();\n\n if (location.x || location.y) {\n return {\n type: 'position',\n value: location\n };\n }\n }\n\n function matchCoordinates() {\n return {\n x: matchDistance(),\n y: matchDistance()\n };\n }\n\n function matchListing(matcher) {\n var captures = matcher(),\n result = [];\n\n if (captures) {\n result.push(captures);\n while (scan(tokens.comma)) {\n captures = matcher();\n if (captures) {\n result.push(captures);\n } else {\n error('One extra comma');\n }\n }\n }\n\n return result;\n }\n\n function matchColorStop() {\n var color = matchColor();\n\n if (!color) {\n error('Expected color definition');\n }\n\n color.length = matchDistance();\n return color;\n }\n\n function matchColor() {\n return matchHexColor() ||\n matchRGBAColor() ||\n matchRGBColor() ||\n matchLiteralColor();\n }\n\n function matchLiteralColor() {\n return match('literal', tokens.literalColor, 0);\n }\n\n function matchHexColor() {\n return match('hex', tokens.hexColor, 1);\n }\n\n function matchRGBColor() {\n return matchCall(tokens.rgbColor, function() {\n return {\n type: 'rgb',\n value: matchListing(matchNumber)\n };\n });\n }\n\n function matchRGBAColor() {\n return matchCall(tokens.rgbaColor, function() {\n return {\n type: 'rgba',\n value: matchListing(matchNumber)\n };\n });\n }\n\n function matchNumber() {\n return scan(tokens.number)[1];\n }\n\n function matchDistance() {\n return match('%', tokens.percentageValue, 1) ||\n matchPositionKeyword() ||\n matchLength();\n }\n\n function matchPositionKeyword() {\n return match('position-keyword', tokens.positionKeywords, 1);\n }\n\n function matchLength() {\n return match('px', tokens.pixelValue, 1) ||\n match('em', tokens.emValue, 1);\n }\n\n function match(type, pattern, captureIndex) {\n var captures = scan(pattern);\n if (captures) {\n return {\n type: type,\n value: captures[captureIndex]\n };\n }\n }\n\n function scan(regexp) {\n var captures,\n blankCaptures;\n\n blankCaptures = /^[\\n\\r\\t\\s]+/.exec(input);\n if (blankCaptures) {\n consume(blankCaptures[0].length);\n }\n\n captures = regexp.exec(input);\n if (captures) {\n consume(captures[0].length);\n }\n\n return captures;\n }\n\n function consume(size) {\n input = input.substr(size);\n }\n\n return function(code) {\n input = code.toString();\n return getAST();\n };\n})();\n\nexports.parse = (GradientParser || {}).parse;\n"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 2a95070affdf3c0054f1","// @flow\n\nexport { combineChunks, fillInChunks, findAll, findChunks } from './utils'\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","// @flow\n\nexport type Chunk = {|\n highlight: boolean,\n start: number,\n end: number,\n|};\n\n/**\n * Creates an array of chunk objects representing both higlightable and non highlightable pieces of text that match each search word.\n * @return Array of \"chunks\" (where a Chunk is { start:number, end:number, highlight:boolean })\n */\nexport const findAll = ({\n autoEscape,\n caseSensitive = false,\n findChunks = defaultFindChunks,\n sanitize,\n searchWords,\n textToHighlight\n}: {\n autoEscape?: boolean,\n caseSensitive?: boolean,\n findChunks?: typeof defaultFindChunks,\n sanitize?: typeof defaultSanitize,\n searchWords: Array<string>,\n textToHighlight: string,\n}): Array<Chunk> => (\n fillInChunks({\n chunksToHighlight: combineChunks({\n chunks: findChunks({\n autoEscape,\n caseSensitive,\n sanitize,\n searchWords,\n textToHighlight\n })\n }),\n totalLength: textToHighlight ? textToHighlight.length : 0\n })\n)\n\n/**\n * Takes an array of {start:number, end:number} objects and combines chunks that overlap into single chunks.\n * @return {start:number, end:number}[]\n */\nexport const combineChunks = ({\n chunks\n}: {\n chunks: Array<Chunk>,\n}): Array<Chunk> => {\n chunks = chunks\n .sort((first, second) => first.start - second.start)\n .reduce((processedChunks, nextChunk) => {\n // First chunk just goes straight in the array...\n if (processedChunks.length === 0) {\n return [nextChunk]\n } else {\n // ... subsequent chunks get checked to see if they overlap...\n const prevChunk = processedChunks.pop()\n if (nextChunk.start <= prevChunk.end) {\n // It may be the case that prevChunk completely surrounds nextChunk, so take the\n // largest of the end indeces.\n const endIndex = Math.max(prevChunk.end, nextChunk.end)\n processedChunks.push({highlight: false, start: prevChunk.start, end: endIndex})\n } else {\n processedChunks.push(prevChunk, nextChunk)\n }\n return processedChunks\n }\n }, [])\n\n return chunks\n}\n\n/**\n * Examine text for any matches.\n * If we find matches, add them to the returned array as a \"chunk\" object ({start:number, end:number}).\n * @return {start:number, end:number}[]\n */\nconst defaultFindChunks = ({\n autoEscape,\n caseSensitive,\n sanitize = defaultSanitize,\n searchWords,\n textToHighlight\n}: {\n autoEscape?: boolean,\n caseSensitive?: boolean,\n sanitize?: typeof defaultSanitize,\n searchWords: Array<string>,\n textToHighlight: string,\n}): Array<Chunk> => {\n textToHighlight = sanitize(textToHighlight)\n\n return searchWords\n .filter(searchWord => searchWord) // Remove empty words\n .reduce((chunks, searchWord) => {\n searchWord = sanitize(searchWord)\n\n if (autoEscape) {\n searchWord = escapeRegExpFn(searchWord)\n }\n\n const regex = new RegExp(searchWord, caseSensitive ? 'g' : 'gi')\n\n let match\n while ((match = regex.exec(textToHighlight))) {\n let start = match.index\n let end = regex.lastIndex\n // We do not return zero-length matches\n if (end > start) {\n chunks.push({highlight: false, start, end})\n }\n\n // Prevent browsers like Firefox from getting stuck in an infinite loop\n // See http://www.regexguru.com/2008/04/watch-out-for-zero-length-matches/\n if (match.index === regex.lastIndex) {\n regex.lastIndex++\n }\n }\n\n return chunks\n }, [])\n}\n// Allow the findChunks to be overridden in findAll,\n// but for backwards compatibility we export as the old name\nexport {defaultFindChunks as findChunks}\n\n/**\n * Given a set of chunks to highlight, create an additional set of chunks\n * to represent the bits of text between the highlighted text.\n * @param chunksToHighlight {start:number, end:number}[]\n * @param totalLength number\n * @return {start:number, end:number, highlight:boolean}[]\n */\nexport const fillInChunks = ({\n chunksToHighlight,\n totalLength\n}: {\n chunksToHighlight: Array<Chunk>,\n totalLength: number,\n}): Array<Chunk> => {\n const allChunks = []\n const append = (start, end, highlight) => {\n if (end - start > 0) {\n allChunks.push({\n start,\n end,\n highlight\n })\n }\n }\n\n if (chunksToHighlight.length === 0) {\n append(0, totalLength, false)\n } else {\n let lastIndex = 0\n chunksToHighlight.forEach((chunk) => {\n append(lastIndex, chunk.start, false)\n append(chunk.start, chunk.end, true)\n lastIndex = chunk.end\n })\n append(lastIndex, totalLength, false)\n }\n return allChunks\n}\n\nfunction defaultSanitize (string: string): string {\n return string\n}\n\nfunction escapeRegExpFn (string: string): string {\n return string.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, '\\\\$&')\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils.js","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","var characterMap = {\n\t\"À\": \"A\",\n\t\"Ã\": \"A\",\n\t\"Â\": \"A\",\n\t\"Ã\": \"A\",\n\t\"Ä\": \"A\",\n\t\"Ã…\": \"A\",\n\t\"Ấ\": \"A\",\n\t\"Ắ\": \"A\",\n\t\"Ẳ\": \"A\",\n\t\"Ẵ\": \"A\",\n\t\"Ặ\": \"A\",\n\t\"Æ\": \"AE\",\n\t\"Ầ\": \"A\",\n\t\"Ằ\": \"A\",\n\t\"È‚\": \"A\",\n\t\"Ả\": \"A\",\n\t\"Ạ\": \"A\",\n\t\"Ẩ\": \"A\",\n\t\"Ẫ\": \"A\",\n\t\"Ậ\": \"A\",\n\t\"Ç\": \"C\",\n\t\"Ḉ\": \"C\",\n\t\"È\": \"E\",\n\t\"É\": \"E\",\n\t\"Ê\": \"E\",\n\t\"Ë\": \"E\",\n\t\"Ế\": \"E\",\n\t\"Ḗ\": \"E\",\n\t\"Ề\": \"E\",\n\t\"Ḕ\": \"E\",\n\t\"Ḝ\": \"E\",\n\t\"Ȇ\": \"E\",\n\t\"Ẻ\": \"E\",\n\t\"Ẽ\": \"E\",\n\t\"Ẹ\": \"E\",\n\t\"Ể\": \"E\",\n\t\"Ễ\": \"E\",\n\t\"Ệ\": \"E\",\n\t\"ÃŒ\": \"I\",\n\t\"Ã\": \"I\",\n\t\"ÃŽ\": \"I\",\n\t\"Ã\": \"I\",\n\t\"Ḯ\": \"I\",\n\t\"ÈŠ\": \"I\",\n\t\"Ỉ\": \"I\",\n\t\"Ị\": \"I\",\n\t\"Ã\": \"D\",\n\t\"Ñ\": \"N\",\n\t\"Ã’\": \"O\",\n\t\"Ó\": \"O\",\n\t\"Ô\": \"O\",\n\t\"Õ\": \"O\",\n\t\"Ö\": \"O\",\n\t\"Ø\": \"O\",\n\t\"á»\": \"O\",\n\t\"Ṍ\": \"O\",\n\t\"á¹’\": \"O\",\n\t\"ÈŽ\": \"O\",\n\t\"Ỏ\": \"O\",\n\t\"Ọ\": \"O\",\n\t\"á»”\": \"O\",\n\t\"á»–\": \"O\",\n\t\"Ộ\": \"O\",\n\t\"Ờ\": \"O\",\n\t\"Ở\": \"O\",\n\t\"á» \": \"O\",\n\t\"Ớ\": \"O\",\n\t\"Ợ\": \"O\",\n\t\"Ù\": \"U\",\n\t\"Ú\": \"U\",\n\t\"Û\": \"U\",\n\t\"Ãœ\": \"U\",\n\t\"Ủ\": \"U\",\n\t\"Ụ\": \"U\",\n\t\"Ử\": \"U\",\n\t\"á»®\": \"U\",\n\t\"á»°\": \"U\",\n\t\"Ã\": \"Y\",\n\t\"à \": \"a\",\n\t\"á\": \"a\",\n\t\"â\": \"a\",\n\t\"ã\": \"a\",\n\t\"ä\": \"a\",\n\t\"Ã¥\": \"a\",\n\t\"ấ\": \"a\",\n\t\"ắ\": \"a\",\n\t\"ẳ\": \"a\",\n\t\"ẵ\": \"a\",\n\t\"ặ\": \"a\",\n\t\"æ\": \"ae\",\n\t\"ầ\": \"a\",\n\t\"ằ\": \"a\",\n\t\"ȃ\": \"a\",\n\t\"ả\": \"a\",\n\t\"ạ\": \"a\",\n\t\"ẩ\": \"a\",\n\t\"ẫ\": \"a\",\n\t\"áº\": \"a\",\n\t\"ç\": \"c\",\n\t\"ḉ\": \"c\",\n\t\"è\": \"e\",\n\t\"é\": \"e\",\n\t\"ê\": \"e\",\n\t\"ë\": \"e\",\n\t\"ế\": \"e\",\n\t\"ḗ\": \"e\",\n\t\"á»\": \"e\",\n\t\"ḕ\": \"e\",\n\t\"á¸\": \"e\",\n\t\"ȇ\": \"e\",\n\t\"ẻ\": \"e\",\n\t\"ẽ\": \"e\",\n\t\"ẹ\": \"e\",\n\t\"ể\": \"e\",\n\t\"á»…\": \"e\",\n\t\"ệ\": \"e\",\n\t\"ì\": \"i\",\n\t\"Ã\": \"i\",\n\t\"î\": \"i\",\n\t\"ï\": \"i\",\n\t\"ḯ\": \"i\",\n\t\"È‹\": \"i\",\n\t\"ỉ\": \"i\",\n\t\"ị\": \"i\",\n\t\"ð\": \"d\",\n\t\"ñ\": \"n\",\n\t\"ò\": \"o\",\n\t\"ó\": \"o\",\n\t\"ô\": \"o\",\n\t\"õ\": \"o\",\n\t\"ö\": \"o\",\n\t\"ø\": \"o\",\n\t\"ố\": \"o\",\n\t\"á¹\": \"o\",\n\t\"ṓ\": \"o\",\n\t\"È\": \"o\",\n\t\"á»\": \"o\",\n\t\"á»\": \"o\",\n\t\"ổ\": \"o\",\n\t\"á»—\": \"o\",\n\t\"á»™\": \"o\",\n\t\"á»\": \"o\",\n\t\"ở\": \"o\",\n\t\"ỡ\": \"o\",\n\t\"á»›\": \"o\",\n\t\"ợ\": \"o\",\n\t\"ù\": \"u\",\n\t\"ú\": \"u\",\n\t\"û\": \"u\",\n\t\"ü\": \"u\",\n\t\"ủ\": \"u\",\n\t\"ụ\": \"u\",\n\t\"á»\": \"u\",\n\t\"ữ\": \"u\",\n\t\"á»±\": \"u\",\n\t\"ý\": \"y\",\n\t\"ÿ\": \"y\",\n\t\"Ä€\": \"A\",\n\t\"Ä\": \"a\",\n\t\"Ä‚\": \"A\",\n\t\"ă\": \"a\",\n\t\"Ä„\": \"A\",\n\t\"Ä…\": \"a\",\n\t\"Ć\": \"C\",\n\t\"ć\": \"c\",\n\t\"Ĉ\": \"C\",\n\t\"ĉ\": \"c\",\n\t\"ÄŠ\": \"C\",\n\t\"Ä‹\": \"c\",\n\t\"ÄŒ\": \"C\",\n\t\"Ä\": \"c\",\n\t\"C̆\": \"C\",\n\t\"c̆\": \"c\",\n\t\"ÄŽ\": \"D\",\n\t\"Ä\": \"d\",\n\t\"Ä\": \"D\",\n\t\"Ä‘\": \"d\",\n\t\"Ä’\": \"E\",\n\t\"Ä“\": \"e\",\n\t\"Ä”\": \"E\",\n\t\"Ä•\": \"e\",\n\t\"Ä–\": \"E\",\n\t\"Ä—\": \"e\",\n\t\"Ę\": \"E\",\n\t\"Ä™\": \"e\",\n\t\"Äš\": \"E\",\n\t\"Ä›\": \"e\",\n\t\"Äœ\": \"G\",\n\t\"Ç´\": \"G\",\n\t\"Ä\": \"g\",\n\t\"ǵ\": \"g\",\n\t\"Äž\": \"G\",\n\t\"ÄŸ\": \"g\",\n\t\"Ä \": \"G\",\n\t\"Ä¡\": \"g\",\n\t\"Ä¢\": \"G\",\n\t\"Ä£\": \"g\",\n\t\"Ĥ\": \"H\",\n\t\"Ä¥\": \"h\",\n\t\"Ħ\": \"H\",\n\t\"ħ\": \"h\",\n\t\"Ḫ\": \"H\",\n\t\"ḫ\": \"h\",\n\t\"Ĩ\": \"I\",\n\t\"Ä©\": \"i\",\n\t\"Ī\": \"I\",\n\t\"Ä«\": \"i\",\n\t\"Ĭ\": \"I\",\n\t\"Ä\": \"i\",\n\t\"Ä®\": \"I\",\n\t\"į\": \"i\",\n\t\"Ä°\": \"I\",\n\t\"ı\": \"i\",\n\t\"IJ\": \"IJ\",\n\t\"ij\": \"ij\",\n\t\"Ä´\": \"J\",\n\t\"ĵ\": \"j\",\n\t\"Ķ\": \"K\",\n\t\"Ä·\": \"k\",\n\t\"Ḱ\": \"K\",\n\t\"ḱ\": \"k\",\n\t\"K̆\": \"K\",\n\t\"k̆\": \"k\",\n\t\"Ĺ\": \"L\",\n\t\"ĺ\": \"l\",\n\t\"Ä»\": \"L\",\n\t\"ļ\": \"l\",\n\t\"Ľ\": \"L\",\n\t\"ľ\": \"l\",\n\t\"Ä¿\": \"L\",\n\t\"Å€\": \"l\",\n\t\"Å\": \"l\",\n\t\"Å‚\": \"l\",\n\t\"Ḿ\": \"M\",\n\t\"ḿ\": \"m\",\n\t\"M̆\": \"M\",\n\t\"m̆\": \"m\",\n\t\"Ń\": \"N\",\n\t\"Å„\": \"n\",\n\t\"Å…\": \"N\",\n\t\"ņ\": \"n\",\n\t\"Ň\": \"N\",\n\t\"ň\": \"n\",\n\t\"ʼn\": \"n\",\n\t\"N̆\": \"N\",\n\t\"n̆\": \"n\",\n\t\"ÅŒ\": \"O\",\n\t\"Å\": \"o\",\n\t\"ÅŽ\": \"O\",\n\t\"Å\": \"o\",\n\t\"Å\": \"O\",\n\t\"Å‘\": \"o\",\n\t\"Å’\": \"OE\",\n\t\"Å“\": \"oe\",\n\t\"P̆\": \"P\",\n\t\"p̆\": \"p\",\n\t\"Å”\": \"R\",\n\t\"Å•\": \"r\",\n\t\"Å–\": \"R\",\n\t\"Å—\": \"r\",\n\t\"Ř\": \"R\",\n\t\"Å™\": \"r\",\n\t\"R̆\": \"R\",\n\t\"r̆\": \"r\",\n\t\"È’\": \"R\",\n\t\"È“\": \"r\",\n\t\"Åš\": \"S\",\n\t\"Å›\": \"s\",\n\t\"Åœ\": \"S\",\n\t\"Å\": \"s\",\n\t\"Åž\": \"S\",\n\t\"Ș\": \"S\",\n\t\"È™\": \"s\",\n\t\"ÅŸ\": \"s\",\n\t\"Å \": \"S\",\n\t\"Å¡\": \"s\",\n\t\"Å¢\": \"T\",\n\t\"Å£\": \"t\",\n\t\"È›\": \"t\",\n\t\"Èš\": \"T\",\n\t\"Ť\": \"T\",\n\t\"Å¥\": \"t\",\n\t\"Ŧ\": \"T\",\n\t\"ŧ\": \"t\",\n\t\"T̆\": \"T\",\n\t\"t̆\": \"t\",\n\t\"Ũ\": \"U\",\n\t\"Å©\": \"u\",\n\t\"Ū\": \"U\",\n\t\"Å«\": \"u\",\n\t\"Ŭ\": \"U\",\n\t\"Å\": \"u\",\n\t\"Å®\": \"U\",\n\t\"ů\": \"u\",\n\t\"Å°\": \"U\",\n\t\"ű\": \"u\",\n\t\"Ų\": \"U\",\n\t\"ų\": \"u\",\n\t\"È–\": \"U\",\n\t\"È—\": \"u\",\n\t\"V̆\": \"V\",\n\t\"v̆\": \"v\",\n\t\"Å´\": \"W\",\n\t\"ŵ\": \"w\",\n\t\"Ẃ\": \"W\",\n\t\"ẃ\": \"w\",\n\t\"X̆\": \"X\",\n\t\"x̆\": \"x\",\n\t\"Ŷ\": \"Y\",\n\t\"Å·\": \"y\",\n\t\"Ÿ\": \"Y\",\n\t\"Y̆\": \"Y\",\n\t\"y̆\": \"y\",\n\t\"Ź\": \"Z\",\n\t\"ź\": \"z\",\n\t\"Å»\": \"Z\",\n\t\"ż\": \"z\",\n\t\"Ž\": \"Z\",\n\t\"ž\": \"z\",\n\t\"Å¿\": \"s\",\n\t\"Æ’\": \"f\",\n\t\"Æ \": \"O\",\n\t\"Æ¡\": \"o\",\n\t\"Ư\": \"U\",\n\t\"Æ°\": \"u\",\n\t\"Ç\": \"A\",\n\t\"ÇŽ\": \"a\",\n\t\"Ç\": \"I\",\n\t\"Ç\": \"i\",\n\t\"Ç‘\": \"O\",\n\t\"Ç’\": \"o\",\n\t\"Ç“\": \"U\",\n\t\"Ç”\": \"u\",\n\t\"Ç•\": \"U\",\n\t\"Ç–\": \"u\",\n\t\"Ç—\": \"U\",\n\t\"ǘ\": \"u\",\n\t\"Ç™\": \"U\",\n\t\"Çš\": \"u\",\n\t\"Ç›\": \"U\",\n\t\"Çœ\": \"u\",\n\t\"Ứ\": \"U\",\n\t\"ứ\": \"u\",\n\t\"Ṹ\": \"U\",\n\t\"á¹¹\": \"u\",\n\t\"Ǻ\": \"A\",\n\t\"Ç»\": \"a\",\n\t\"Ǽ\": \"AE\",\n\t\"ǽ\": \"ae\",\n\t\"Ǿ\": \"O\",\n\t\"Ç¿\": \"o\",\n\t\"Þ\": \"TH\",\n\t\"þ\": \"th\",\n\t\"á¹”\": \"P\",\n\t\"ṕ\": \"p\",\n\t\"Ṥ\": \"S\",\n\t\"á¹¥\": \"s\",\n\t\"XÌ\": \"X\",\n\t\"xÌ\": \"x\",\n\t\"Ѓ\": \"Г\",\n\t\"Ñ“\": \"г\",\n\t\"ÐŒ\": \"К\",\n\t\"Ñœ\": \"к\",\n\t\"AÌ‹\": \"A\",\n\t\"aÌ‹\": \"a\",\n\t\"EÌ‹\": \"E\",\n\t\"eÌ‹\": \"e\",\n\t\"IÌ‹\": \"I\",\n\t\"iÌ‹\": \"i\",\n\t\"Ǹ\": \"N\",\n\t\"ǹ\": \"n\",\n\t\"á»’\": \"O\",\n\t\"ồ\": \"o\",\n\t\"á¹\": \"O\",\n\t\"ṑ\": \"o\",\n\t\"Ừ\": \"U\",\n\t\"ừ\": \"u\",\n\t\"Ẁ\": \"W\",\n\t\"áº\": \"w\",\n\t\"Ỳ\": \"Y\",\n\t\"ỳ\": \"y\",\n\t\"È€\": \"A\",\n\t\"È\": \"a\",\n\t\"È„\": \"E\",\n\t\"È…\": \"e\",\n\t\"Ȉ\": \"I\",\n\t\"ȉ\": \"i\",\n\t\"ÈŒ\": \"O\",\n\t\"È\": \"o\",\n\t\"È\": \"R\",\n\t\"È‘\": \"r\",\n\t\"È”\": \"U\",\n\t\"È•\": \"u\",\n\t\"BÌŒ\": \"B\",\n\t\"bÌŒ\": \"b\",\n\t\"Č̣\": \"C\",\n\t\"ÄÌ£\": \"c\",\n\t\"Ê̌\": \"E\",\n\t\"ê̌\": \"e\",\n\t\"FÌŒ\": \"F\",\n\t\"fÌŒ\": \"f\",\n\t\"Ǧ\": \"G\",\n\t\"ǧ\": \"g\",\n\t\"Èž\": \"H\",\n\t\"ÈŸ\": \"h\",\n\t\"JÌŒ\": \"J\",\n\t\"Ç°\": \"j\",\n\t\"Ǩ\": \"K\",\n\t\"Ç©\": \"k\",\n\t\"MÌŒ\": \"M\",\n\t\"mÌŒ\": \"m\",\n\t\"PÌŒ\": \"P\",\n\t\"pÌŒ\": \"p\",\n\t\"QÌŒ\": \"Q\",\n\t\"qÌŒ\": \"q\",\n\t\"Ř̩\": \"R\",\n\t\"ř̩\": \"r\",\n\t\"Ṧ\": \"S\",\n\t\"ṧ\": \"s\",\n\t\"VÌŒ\": \"V\",\n\t\"vÌŒ\": \"v\",\n\t\"WÌŒ\": \"W\",\n\t\"wÌŒ\": \"w\",\n\t\"XÌŒ\": \"X\",\n\t\"xÌŒ\": \"x\",\n\t\"YÌŒ\": \"Y\",\n\t\"yÌŒ\": \"y\",\n\t\"A̧\": \"A\",\n\t\"a̧\": \"a\",\n\t\"B̧\": \"B\",\n\t\"b̧\": \"b\",\n\t\"á¸\": \"D\",\n\t\"ḑ\": \"d\",\n\t\"Ȩ\": \"E\",\n\t\"È©\": \"e\",\n\t\"Æ̧\": \"E\",\n\t\"ɛ̧\": \"e\",\n\t\"Ḩ\": \"H\",\n\t\"ḩ\": \"h\",\n\t\"I̧\": \"I\",\n\t\"i̧\": \"i\",\n\t\"Ɨ̧\": \"I\",\n\t\"ɨ̧\": \"i\",\n\t\"M̧\": \"M\",\n\t\"m̧\": \"m\",\n\t\"O̧\": \"O\",\n\t\"o̧\": \"o\",\n\t\"Q̧\": \"Q\",\n\t\"q̧\": \"q\",\n\t\"U̧\": \"U\",\n\t\"u̧\": \"u\",\n\t\"X̧\": \"X\",\n\t\"x̧\": \"x\",\n\t\"Z̧\": \"Z\",\n\t\"z̧\": \"z\",\n\t\"й\":\"и\",\n\t\"Й\":\"И\",\n\t\"Ñ‘\":\"е\",\n\t\"Ð\":\"Е\",\n};\n\nvar chars = Object.keys(characterMap).join('|');\nvar allAccents = new RegExp(chars, 'g');\nvar firstAccent = new RegExp(chars, '');\n\nfunction matcher(match) {\n\treturn characterMap[match];\n}\n\nvar removeAccents = function(string) {\n\treturn string.replace(allAccents, matcher);\n};\n\nvar hasAccents = function(string) {\n\treturn !!string.match(firstAccent);\n};\n\nmodule.exports = removeAccents;\nmodule.exports.has = hasAccents;\nmodule.exports.remove = removeAccents;\n","/**\n * @license React\n * use-sync-external-store-shim.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var e=require(\"react\");function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k=\"function\"===typeof Object.is?Object.is:h,l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n(function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c})},[a,d,b]);m(function(){r(c)&&g({inst:c});return a(function(){r(c)&&g({inst:c})})},[a]);p(d);return d}\nfunction r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return!k(a,d)}catch(f){return!0}}function t(a,b){return b()}var u=\"undefined\"===typeof window||\"undefined\"===typeof window.document||\"undefined\"===typeof window.document.createElement?t:q;exports.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.min.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n","module.exports = window[\"React\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nc = undefined;","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"primitives\"];","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"i18n\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"compose\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"element\"];","\"use client\";\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\n\nexport {\n __spreadValues,\n __spreadProps,\n __objRest\n};\n","\"use client\";\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\n\nexport {\n __spreadValues,\n __spreadProps,\n __objRest\n};\n","\"use client\";\nimport {\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/utils/misc.ts\nfunction noop(..._) {\n}\nfunction shallowEqual(a, b) {\n if (a === b) return true;\n if (!a) return false;\n if (!b) return false;\n if (typeof a !== \"object\") return false;\n if (typeof b !== \"object\") return false;\n const aKeys = Object.keys(a);\n const bKeys = Object.keys(b);\n const { length } = aKeys;\n if (bKeys.length !== length) return false;\n for (const key of aKeys) {\n if (a[key] !== b[key]) {\n return false;\n }\n }\n return true;\n}\nfunction applyState(argument, currentValue) {\n if (isUpdater(argument)) {\n const value = isLazyValue(currentValue) ? currentValue() : currentValue;\n return argument(value);\n }\n return argument;\n}\nfunction isUpdater(argument) {\n return typeof argument === \"function\";\n}\nfunction isLazyValue(value) {\n return typeof value === \"function\";\n}\nfunction isObject(arg) {\n return typeof arg === \"object\" && arg != null;\n}\nfunction isEmpty(arg) {\n if (Array.isArray(arg)) return !arg.length;\n if (isObject(arg)) return !Object.keys(arg).length;\n if (arg == null) return true;\n if (arg === \"\") return true;\n return false;\n}\nfunction isInteger(arg) {\n if (typeof arg === \"number\") {\n return Math.floor(arg) === arg;\n }\n return String(Math.floor(Number(arg))) === arg;\n}\nfunction hasOwnProperty(object, prop) {\n if (typeof Object.hasOwn === \"function\") {\n return Object.hasOwn(object, prop);\n }\n return Object.prototype.hasOwnProperty.call(object, prop);\n}\nfunction chain(...fns) {\n return (...args) => {\n for (const fn of fns) {\n if (typeof fn === \"function\") {\n fn(...args);\n }\n }\n };\n}\nfunction cx(...args) {\n return args.filter(Boolean).join(\" \") || void 0;\n}\nfunction normalizeString(str) {\n return str.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\");\n}\nfunction omit(object, keys) {\n const result = __spreadValues({}, object);\n for (const key of keys) {\n if (hasOwnProperty(result, key)) {\n delete result[key];\n }\n }\n return result;\n}\nfunction pick(object, paths) {\n const result = {};\n for (const key of paths) {\n if (hasOwnProperty(object, key)) {\n result[key] = object[key];\n }\n }\n return result;\n}\nfunction identity(value) {\n return value;\n}\nfunction beforePaint(cb = noop) {\n const raf = requestAnimationFrame(cb);\n return () => cancelAnimationFrame(raf);\n}\nfunction afterPaint(cb = noop) {\n let raf = requestAnimationFrame(() => {\n raf = requestAnimationFrame(cb);\n });\n return () => cancelAnimationFrame(raf);\n}\nfunction invariant(condition, message) {\n if (condition) return;\n if (typeof message !== \"string\") throw new Error(\"Invariant failed\");\n throw new Error(message);\n}\nfunction getKeys(obj) {\n return Object.keys(obj);\n}\nfunction isFalsyBooleanCallback(booleanOrCallback, ...args) {\n const result = typeof booleanOrCallback === \"function\" ? booleanOrCallback(...args) : booleanOrCallback;\n if (result == null) return false;\n return !result;\n}\nfunction disabledFromProps(props) {\n return props.disabled || props[\"aria-disabled\"] === true || props[\"aria-disabled\"] === \"true\";\n}\nfunction removeUndefinedValues(obj) {\n const result = {};\n for (const key in obj) {\n if (obj[key] !== void 0) {\n result[key] = obj[key];\n }\n }\n return result;\n}\nfunction defaultValue(...values) {\n for (const value of values) {\n if (value !== void 0) return value;\n }\n return void 0;\n}\n\nexport {\n noop,\n shallowEqual,\n applyState,\n isObject,\n isEmpty,\n isInteger,\n hasOwnProperty,\n chain,\n cx,\n normalizeString,\n omit,\n pick,\n identity,\n beforePaint,\n afterPaint,\n invariant,\n getKeys,\n isFalsyBooleanCallback,\n disabledFromProps,\n removeUndefinedValues,\n defaultValue\n};\n","\"use client\";\nimport {\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/utils/misc.ts\nimport { hasOwnProperty } from \"@ariakit/core/utils/misc\";\nimport { isValidElement } from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}\nfunction isValidElementWithRef(element) {\n if (!element) return false;\n if (!isValidElement(element)) return false;\n if (\"ref\" in element.props) return true;\n if (\"ref\" in element) return true;\n return false;\n}\nfunction getRefProperty(element) {\n if (!isValidElementWithRef(element)) return null;\n const props = __spreadValues({}, element.props);\n return props.ref || element.ref;\n}\nfunction mergeProps(base, overrides) {\n const props = __spreadValues({}, base);\n for (const key in overrides) {\n if (!hasOwnProperty(overrides, key)) continue;\n if (key === \"className\") {\n const prop = \"className\";\n props[prop] = base[prop] ? `${base[prop]} ${overrides[prop]}` : overrides[prop];\n continue;\n }\n if (key === \"style\") {\n const prop = \"style\";\n props[prop] = base[prop] ? __spreadValues(__spreadValues({}, base[prop]), overrides[prop]) : overrides[prop];\n continue;\n }\n const overrideValue = overrides[key];\n if (typeof overrideValue === \"function\" && key.startsWith(\"on\")) {\n const baseValue = base[key];\n if (typeof baseValue === \"function\") {\n props[key] = (...args) => {\n overrideValue(...args);\n baseValue(...args);\n };\n continue;\n }\n }\n props[key] = overrideValue;\n }\n return props;\n}\n\nexport {\n setRef,\n isValidElementWithRef,\n getRefProperty,\n mergeProps\n};\n","\"use client\";\n\n// src/utils/dom.ts\nvar canUseDOM = checkIsBrowser();\nfunction checkIsBrowser() {\n var _a;\n return typeof window !== \"undefined\" && !!((_a = window.document) == null ? void 0 : _a.createElement);\n}\nfunction getDocument(node) {\n if (!node) return document;\n if (\"self\" in node) return node.document;\n return node.ownerDocument || document;\n}\nfunction getWindow(node) {\n if (!node) return self;\n if (\"self\" in node) return node.self;\n return getDocument(node).defaultView || window;\n}\nfunction getActiveElement(node, activeDescendant = false) {\n const { activeElement } = getDocument(node);\n if (!(activeElement == null ? void 0 : activeElement.nodeName)) {\n return null;\n }\n if (isFrame(activeElement) && activeElement.contentDocument) {\n return getActiveElement(\n activeElement.contentDocument.body,\n activeDescendant\n );\n }\n if (activeDescendant) {\n const id = activeElement.getAttribute(\"aria-activedescendant\");\n if (id) {\n const element = getDocument(activeElement).getElementById(id);\n if (element) {\n return element;\n }\n }\n }\n return activeElement;\n}\nfunction contains(parent, child) {\n return parent === child || parent.contains(child);\n}\nfunction isFrame(element) {\n return element.tagName === \"IFRAME\";\n}\nfunction isButton(element) {\n const tagName = element.tagName.toLowerCase();\n if (tagName === \"button\") return true;\n if (tagName === \"input\" && element.type) {\n return buttonInputTypes.indexOf(element.type) !== -1;\n }\n return false;\n}\nvar buttonInputTypes = [\n \"button\",\n \"color\",\n \"file\",\n \"image\",\n \"reset\",\n \"submit\"\n];\nfunction isVisible(element) {\n if (typeof element.checkVisibility === \"function\") {\n return element.checkVisibility();\n }\n const htmlElement = element;\n return htmlElement.offsetWidth > 0 || htmlElement.offsetHeight > 0 || element.getClientRects().length > 0;\n}\nfunction isTextField(element) {\n try {\n const isTextInput = element instanceof HTMLInputElement && element.selectionStart !== null;\n const isTextArea = element.tagName === \"TEXTAREA\";\n return isTextInput || isTextArea || false;\n } catch (error) {\n return false;\n }\n}\nfunction isTextbox(element) {\n return element.isContentEditable || isTextField(element);\n}\nfunction getTextboxValue(element) {\n if (isTextField(element)) {\n return element.value;\n }\n if (element.isContentEditable) {\n const range = getDocument(element).createRange();\n range.selectNodeContents(element);\n return range.toString();\n }\n return \"\";\n}\nfunction getTextboxSelection(element) {\n let start = 0;\n let end = 0;\n if (isTextField(element)) {\n start = element.selectionStart || 0;\n end = element.selectionEnd || 0;\n } else if (element.isContentEditable) {\n const selection = getDocument(element).getSelection();\n if ((selection == null ? void 0 : selection.rangeCount) && selection.anchorNode && contains(element, selection.anchorNode) && selection.focusNode && contains(element, selection.focusNode)) {\n const range = selection.getRangeAt(0);\n const nextRange = range.cloneRange();\n nextRange.selectNodeContents(element);\n nextRange.setEnd(range.startContainer, range.startOffset);\n start = nextRange.toString().length;\n nextRange.setEnd(range.endContainer, range.endOffset);\n end = nextRange.toString().length;\n }\n }\n return { start, end };\n}\nfunction getPopupRole(element, fallback) {\n const allowedPopupRoles = [\"dialog\", \"menu\", \"listbox\", \"tree\", \"grid\"];\n const role = element == null ? void 0 : element.getAttribute(\"role\");\n if (role && allowedPopupRoles.indexOf(role) !== -1) {\n return role;\n }\n return fallback;\n}\nfunction getPopupItemRole(element, fallback) {\n var _a;\n const itemRoleByPopupRole = {\n menu: \"menuitem\",\n listbox: \"option\",\n tree: \"treeitem\"\n };\n const popupRole = getPopupRole(element);\n if (!popupRole) return fallback;\n const key = popupRole;\n return (_a = itemRoleByPopupRole[key]) != null ? _a : fallback;\n}\nfunction scrollIntoViewIfNeeded(element, arg) {\n if (isPartiallyHidden(element) && \"scrollIntoView\" in element) {\n element.scrollIntoView(arg);\n }\n}\nfunction getScrollingElement(element) {\n if (!element) return null;\n const isScrollableOverflow = (overflow) => {\n if (overflow === \"auto\") return true;\n if (overflow === \"scroll\") return true;\n return false;\n };\n if (element.clientHeight && element.scrollHeight > element.clientHeight) {\n const { overflowY } = getComputedStyle(element);\n if (isScrollableOverflow(overflowY)) return element;\n } else if (element.clientWidth && element.scrollWidth > element.clientWidth) {\n const { overflowX } = getComputedStyle(element);\n if (isScrollableOverflow(overflowX)) return element;\n }\n return getScrollingElement(element.parentElement) || document.scrollingElement || document.body;\n}\nfunction isPartiallyHidden(element) {\n const elementRect = element.getBoundingClientRect();\n const scroller = getScrollingElement(element);\n if (!scroller) return false;\n const scrollerRect = scroller.getBoundingClientRect();\n const isHTML = scroller.tagName === \"HTML\";\n const scrollerTop = isHTML ? scrollerRect.top + scroller.scrollTop : scrollerRect.top;\n const scrollerBottom = isHTML ? scroller.clientHeight : scrollerRect.bottom;\n const scrollerLeft = isHTML ? scrollerRect.left + scroller.scrollLeft : scrollerRect.left;\n const scrollerRight = isHTML ? scroller.clientWidth : scrollerRect.right;\n const top = elementRect.top < scrollerTop;\n const left = elementRect.left < scrollerLeft;\n const bottom = elementRect.bottom > scrollerBottom;\n const right = elementRect.right > scrollerRight;\n return top || left || bottom || right;\n}\nfunction setSelectionRange(element, ...args) {\n if (/text|search|password|tel|url/i.test(element.type)) {\n element.setSelectionRange(...args);\n }\n}\nfunction sortBasedOnDOMPosition(items, getElement) {\n const pairs = items.map((item, index) => [index, item]);\n let isOrderDifferent = false;\n pairs.sort(([indexA, a], [indexB, b]) => {\n const elementA = getElement(a);\n const elementB = getElement(b);\n if (elementA === elementB) return 0;\n if (!elementA || !elementB) return 0;\n if (isElementPreceding(elementA, elementB)) {\n if (indexA > indexB) {\n isOrderDifferent = true;\n }\n return -1;\n }\n if (indexA < indexB) {\n isOrderDifferent = true;\n }\n return 1;\n });\n if (isOrderDifferent) {\n return pairs.map(([_, item]) => item);\n }\n return items;\n}\nfunction isElementPreceding(a, b) {\n return Boolean(\n b.compareDocumentPosition(a) & Node.DOCUMENT_POSITION_PRECEDING\n );\n}\n\nexport {\n canUseDOM,\n getDocument,\n getWindow,\n getActiveElement,\n contains,\n isFrame,\n isButton,\n isVisible,\n isTextField,\n isTextbox,\n getTextboxValue,\n getTextboxSelection,\n getPopupRole,\n getPopupItemRole,\n scrollIntoViewIfNeeded,\n getScrollingElement,\n isPartiallyHidden,\n setSelectionRange,\n sortBasedOnDOMPosition\n};\n","\"use client\";\nimport {\n canUseDOM\n} from \"./DTR5TSDJ.js\";\n\n// src/utils/platform.ts\nfunction isTouchDevice() {\n return canUseDOM && !!navigator.maxTouchPoints;\n}\nfunction isApple() {\n if (!canUseDOM) return false;\n return /mac|iphone|ipad|ipod/i.test(navigator.platform);\n}\nfunction isSafari() {\n return canUseDOM && isApple() && /apple/i.test(navigator.vendor);\n}\nfunction isFirefox() {\n return canUseDOM && /firefox\\//i.test(navigator.userAgent);\n}\nfunction isMac() {\n return canUseDOM && navigator.platform.startsWith(\"Mac\") && !isTouchDevice();\n}\n\nexport {\n isTouchDevice,\n isApple,\n isSafari,\n isFirefox,\n isMac\n};\n","\"use client\";\nimport {\n isApple\n} from \"../__chunks/QAGXQEUG.js\";\nimport {\n contains\n} from \"../__chunks/DTR5TSDJ.js\";\nimport {\n __spreadProps,\n __spreadValues\n} from \"../__chunks/3YLGPPWQ.js\";\n\n// src/utils/events.ts\nfunction isPortalEvent(event) {\n return Boolean(\n event.currentTarget && !contains(event.currentTarget, event.target)\n );\n}\nfunction isSelfTarget(event) {\n return event.target === event.currentTarget;\n}\nfunction isOpeningInNewTab(event) {\n const element = event.currentTarget;\n if (!element) return false;\n const isAppleDevice = isApple();\n if (isAppleDevice && !event.metaKey) return false;\n if (!isAppleDevice && !event.ctrlKey) return false;\n const tagName = element.tagName.toLowerCase();\n if (tagName === \"a\") return true;\n if (tagName === \"button\" && element.type === \"submit\") return true;\n if (tagName === \"input\" && element.type === \"submit\") return true;\n return false;\n}\nfunction isDownloading(event) {\n const element = event.currentTarget;\n if (!element) return false;\n const tagName = element.tagName.toLowerCase();\n if (!event.altKey) return false;\n if (tagName === \"a\") return true;\n if (tagName === \"button\" && element.type === \"submit\") return true;\n if (tagName === \"input\" && element.type === \"submit\") return true;\n return false;\n}\nfunction fireEvent(element, type, eventInit) {\n const event = new Event(type, eventInit);\n return element.dispatchEvent(event);\n}\nfunction fireBlurEvent(element, eventInit) {\n const event = new FocusEvent(\"blur\", eventInit);\n const defaultAllowed = element.dispatchEvent(event);\n const bubbleInit = __spreadProps(__spreadValues({}, eventInit), { bubbles: true });\n element.dispatchEvent(new FocusEvent(\"focusout\", bubbleInit));\n return defaultAllowed;\n}\nfunction fireFocusEvent(element, eventInit) {\n const event = new FocusEvent(\"focus\", eventInit);\n const defaultAllowed = element.dispatchEvent(event);\n const bubbleInit = __spreadProps(__spreadValues({}, eventInit), { bubbles: true });\n element.dispatchEvent(new FocusEvent(\"focusin\", bubbleInit));\n return defaultAllowed;\n}\nfunction fireKeyboardEvent(element, type, eventInit) {\n const event = new KeyboardEvent(type, eventInit);\n return element.dispatchEvent(event);\n}\nfunction fireClickEvent(element, eventInit) {\n const event = new MouseEvent(\"click\", eventInit);\n return element.dispatchEvent(event);\n}\nfunction isFocusEventOutside(event, container) {\n const containerElement = container || event.currentTarget;\n const relatedTarget = event.relatedTarget;\n return !relatedTarget || !contains(containerElement, relatedTarget);\n}\nfunction getInputType(event) {\n const nativeEvent = \"nativeEvent\" in event ? event.nativeEvent : event;\n if (!nativeEvent) return;\n if (!(\"inputType\" in nativeEvent)) return;\n if (typeof nativeEvent.inputType !== \"string\") return;\n return nativeEvent.inputType;\n}\nfunction queueBeforeEvent(element, type, callback, timeout) {\n const createTimer = (callback2) => {\n if (timeout) {\n const timerId2 = setTimeout(callback2, timeout);\n return () => clearTimeout(timerId2);\n }\n const timerId = requestAnimationFrame(callback2);\n return () => cancelAnimationFrame(timerId);\n };\n const cancelTimer = createTimer(() => {\n element.removeEventListener(type, callSync, true);\n callback();\n });\n const callSync = () => {\n cancelTimer();\n callback();\n };\n element.addEventListener(type, callSync, { once: true, capture: true });\n return cancelTimer;\n}\nfunction addGlobalEventListener(type, listener, options, scope = window) {\n const children = [];\n try {\n scope.document.addEventListener(type, listener, options);\n for (const frame of Array.from(scope.frames)) {\n children.push(addGlobalEventListener(type, listener, options, frame));\n }\n } catch (e) {\n }\n const removeEventListener = () => {\n try {\n scope.document.removeEventListener(type, listener, options);\n } catch (e) {\n }\n for (const remove of children) {\n remove();\n }\n };\n return removeEventListener;\n}\nexport {\n addGlobalEventListener,\n fireBlurEvent,\n fireClickEvent,\n fireEvent,\n fireFocusEvent,\n fireKeyboardEvent,\n getInputType,\n isDownloading,\n isFocusEventOutside,\n isOpeningInNewTab,\n isPortalEvent,\n isSelfTarget,\n queueBeforeEvent\n};\n","\"use client\";\nimport {\n setRef\n} from \"./SK3NAZA3.js\";\nimport {\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/utils/hooks.ts\nimport { canUseDOM } from \"@ariakit/core/utils/dom\";\nimport { addGlobalEventListener } from \"@ariakit/core/utils/events\";\nimport {\n useCallback,\n useEffect,\n useLayoutEffect,\n useMemo,\n useReducer,\n useRef,\n useState\n} from \"react\";\nimport * as React from \"react\";\nvar _React = __spreadValues({}, React);\nvar useReactId = _React.useId;\nvar useReactDeferredValue = _React.useDeferredValue;\nvar useReactInsertionEffect = _React.useInsertionEffect;\nvar useSafeLayoutEffect = canUseDOM ? useLayoutEffect : useEffect;\nfunction useInitialValue(value) {\n const [initialValue] = useState(value);\n return initialValue;\n}\nfunction useLazyValue(init) {\n const ref = useRef();\n if (ref.current === void 0) {\n ref.current = init();\n }\n return ref.current;\n}\nfunction useLiveRef(value) {\n const ref = useRef(value);\n useSafeLayoutEffect(() => {\n ref.current = value;\n });\n return ref;\n}\nfunction usePreviousValue(value) {\n const [previousValue, setPreviousValue] = useState(value);\n if (value !== previousValue) {\n setPreviousValue(value);\n }\n return previousValue;\n}\nfunction useEvent(callback) {\n const ref = useRef(() => {\n throw new Error(\"Cannot call an event handler while rendering.\");\n });\n if (useReactInsertionEffect) {\n useReactInsertionEffect(() => {\n ref.current = callback;\n });\n } else {\n ref.current = callback;\n }\n return useCallback((...args) => {\n var _a;\n return (_a = ref.current) == null ? void 0 : _a.call(ref, ...args);\n }, []);\n}\nfunction useTransactionState(callback) {\n const [state, setState] = useState(null);\n useSafeLayoutEffect(() => {\n if (state == null) return;\n if (!callback) return;\n let prevState = null;\n callback((prev) => {\n prevState = prev;\n return state;\n });\n return () => {\n callback(prevState);\n };\n }, [state, callback]);\n return [state, setState];\n}\nfunction useMergeRefs(...refs) {\n return useMemo(() => {\n if (!refs.some(Boolean)) return;\n return (value) => {\n for (const ref of refs) {\n setRef(ref, value);\n }\n };\n }, refs);\n}\nfunction useId(defaultId) {\n if (useReactId) {\n const reactId = useReactId();\n if (defaultId) return defaultId;\n return reactId;\n }\n const [id, setId] = useState(defaultId);\n useSafeLayoutEffect(() => {\n if (defaultId || id) return;\n const random = Math.random().toString(36).slice(2, 8);\n setId(`id-${random}`);\n }, [defaultId, id]);\n return defaultId || id;\n}\nfunction useDeferredValue(value) {\n if (useReactDeferredValue) {\n return useReactDeferredValue(value);\n }\n const [deferredValue, setDeferredValue] = useState(value);\n useEffect(() => {\n const raf = requestAnimationFrame(() => setDeferredValue(value));\n return () => cancelAnimationFrame(raf);\n }, [value]);\n return deferredValue;\n}\nfunction useTagName(refOrElement, type) {\n const stringOrUndefined = (type2) => {\n if (typeof type2 !== \"string\") return;\n return type2;\n };\n const [tagName, setTagName] = useState(() => stringOrUndefined(type));\n useSafeLayoutEffect(() => {\n const element = refOrElement && \"current\" in refOrElement ? refOrElement.current : refOrElement;\n setTagName((element == null ? void 0 : element.tagName.toLowerCase()) || stringOrUndefined(type));\n }, [refOrElement, type]);\n return tagName;\n}\nfunction useAttribute(refOrElement, attributeName, defaultValue) {\n const initialValue = useInitialValue(defaultValue);\n const [attribute, setAttribute] = useState(initialValue);\n useEffect(() => {\n const element = refOrElement && \"current\" in refOrElement ? refOrElement.current : refOrElement;\n if (!element) return;\n const callback = () => {\n const value = element.getAttribute(attributeName);\n setAttribute(value == null ? initialValue : value);\n };\n const observer = new MutationObserver(callback);\n observer.observe(element, { attributeFilter: [attributeName] });\n callback();\n return () => observer.disconnect();\n }, [refOrElement, attributeName, initialValue]);\n return attribute;\n}\nfunction useUpdateEffect(effect, deps) {\n const mounted = useRef(false);\n useEffect(() => {\n if (mounted.current) {\n return effect();\n }\n mounted.current = true;\n }, deps);\n useEffect(\n () => () => {\n mounted.current = false;\n },\n []\n );\n}\nfunction useUpdateLayoutEffect(effect, deps) {\n const mounted = useRef(false);\n useSafeLayoutEffect(() => {\n if (mounted.current) {\n return effect();\n }\n mounted.current = true;\n }, deps);\n useSafeLayoutEffect(\n () => () => {\n mounted.current = false;\n },\n []\n );\n}\nfunction useForceUpdate() {\n return useReducer(() => [], []);\n}\nfunction useBooleanEvent(booleanOrCallback) {\n return useEvent(\n typeof booleanOrCallback === \"function\" ? booleanOrCallback : () => booleanOrCallback\n );\n}\nfunction useWrapElement(props, callback, deps = []) {\n const wrapElement = useCallback(\n (element) => {\n if (props.wrapElement) {\n element = props.wrapElement(element);\n }\n return callback(element);\n },\n [...deps, props.wrapElement]\n );\n return __spreadProps(__spreadValues({}, props), { wrapElement });\n}\nfunction usePortalRef(portalProp = false, portalRefProp) {\n const [portalNode, setPortalNode] = useState(null);\n const portalRef = useMergeRefs(setPortalNode, portalRefProp);\n const domReady = !portalProp || portalNode;\n return { portalRef, portalNode, domReady };\n}\nfunction useMetadataProps(props, key, value) {\n const parent = props.onLoadedMetadataCapture;\n const onLoadedMetadataCapture = useMemo(() => {\n return Object.assign(() => {\n }, __spreadProps(__spreadValues({}, parent), { [key]: value }));\n }, [parent, key, value]);\n return [parent == null ? void 0 : parent[key], { onLoadedMetadataCapture }];\n}\nfunction useIsMouseMoving() {\n useEffect(() => {\n addGlobalEventListener(\"mousemove\", setMouseMoving, true);\n addGlobalEventListener(\"mousedown\", resetMouseMoving, true);\n addGlobalEventListener(\"mouseup\", resetMouseMoving, true);\n addGlobalEventListener(\"keydown\", resetMouseMoving, true);\n addGlobalEventListener(\"scroll\", resetMouseMoving, true);\n }, []);\n const isMouseMoving = useEvent(() => mouseMoving);\n return isMouseMoving;\n}\nvar mouseMoving = false;\nvar previousScreenX = 0;\nvar previousScreenY = 0;\nfunction hasMouseMovement(event) {\n const movementX = event.movementX || event.screenX - previousScreenX;\n const movementY = event.movementY || event.screenY - previousScreenY;\n previousScreenX = event.screenX;\n previousScreenY = event.screenY;\n return movementX || movementY || process.env.NODE_ENV === \"test\";\n}\nfunction setMouseMoving(event) {\n if (!hasMouseMovement(event)) return;\n mouseMoving = true;\n}\nfunction resetMouseMoving() {\n mouseMoving = false;\n}\n\nexport {\n useSafeLayoutEffect,\n useInitialValue,\n useLazyValue,\n useLiveRef,\n usePreviousValue,\n useEvent,\n useTransactionState,\n useMergeRefs,\n useId,\n useDeferredValue,\n useTagName,\n useAttribute,\n useUpdateEffect,\n useUpdateLayoutEffect,\n useForceUpdate,\n useBooleanEvent,\n useWrapElement,\n usePortalRef,\n useMetadataProps,\n useIsMouseMoving\n};\n","\"use client\";\nimport {\n applyState,\n chain,\n getKeys,\n hasOwnProperty,\n invariant,\n noop,\n omit,\n pick\n} from \"./PBFD2E7P.js\";\nimport {\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/utils/store.ts\nfunction getInternal(store, key) {\n const internals = store.__unstableInternals;\n invariant(internals, \"Invalid store\");\n return internals[key];\n}\nfunction createStore(initialState, ...stores) {\n let state = initialState;\n let prevStateBatch = state;\n let lastUpdate = Symbol();\n let destroy = noop;\n const instances = /* @__PURE__ */ new Set();\n const updatedKeys = /* @__PURE__ */ new Set();\n const setups = /* @__PURE__ */ new Set();\n const listeners = /* @__PURE__ */ new Set();\n const batchListeners = /* @__PURE__ */ new Set();\n const disposables = /* @__PURE__ */ new WeakMap();\n const listenerKeys = /* @__PURE__ */ new WeakMap();\n const storeSetup = (callback) => {\n setups.add(callback);\n return () => setups.delete(callback);\n };\n const storeInit = () => {\n const initialized = instances.size;\n const instance = Symbol();\n instances.add(instance);\n const maybeDestroy = () => {\n instances.delete(instance);\n if (instances.size) return;\n destroy();\n };\n if (initialized) return maybeDestroy;\n const desyncs = getKeys(state).map(\n (key) => chain(\n ...stores.map((store) => {\n var _a;\n const storeState = (_a = store == null ? void 0 : store.getState) == null ? void 0 : _a.call(store);\n if (!storeState) return;\n if (!hasOwnProperty(storeState, key)) return;\n return sync(store, [key], (state2) => {\n setState(\n key,\n state2[key],\n // @ts-expect-error - Not public API. This is just to prevent\n // infinite loops.\n true\n );\n });\n })\n )\n );\n const teardowns = [];\n for (const setup2 of setups) {\n teardowns.push(setup2());\n }\n const cleanups = stores.map(init);\n destroy = chain(...desyncs, ...teardowns, ...cleanups);\n return maybeDestroy;\n };\n const sub = (keys, listener, set = listeners) => {\n set.add(listener);\n listenerKeys.set(listener, keys);\n return () => {\n var _a;\n (_a = disposables.get(listener)) == null ? void 0 : _a();\n disposables.delete(listener);\n listenerKeys.delete(listener);\n set.delete(listener);\n };\n };\n const storeSubscribe = (keys, listener) => sub(keys, listener);\n const storeSync = (keys, listener) => {\n disposables.set(listener, listener(state, state));\n return sub(keys, listener);\n };\n const storeBatch = (keys, listener) => {\n disposables.set(listener, listener(state, prevStateBatch));\n return sub(keys, listener, batchListeners);\n };\n const storePick = (keys) => createStore(pick(state, keys), finalStore);\n const storeOmit = (keys) => createStore(omit(state, keys), finalStore);\n const getState = () => state;\n const setState = (key, value, fromStores = false) => {\n var _a;\n if (!hasOwnProperty(state, key)) return;\n const nextValue = applyState(value, state[key]);\n if (nextValue === state[key]) return;\n if (!fromStores) {\n for (const store of stores) {\n (_a = store == null ? void 0 : store.setState) == null ? void 0 : _a.call(store, key, nextValue);\n }\n }\n const prevState = state;\n state = __spreadProps(__spreadValues({}, state), { [key]: nextValue });\n const thisUpdate = Symbol();\n lastUpdate = thisUpdate;\n updatedKeys.add(key);\n const run = (listener, prev, uKeys) => {\n var _a2;\n const keys = listenerKeys.get(listener);\n const updated = (k) => uKeys ? uKeys.has(k) : k === key;\n if (!keys || keys.some(updated)) {\n (_a2 = disposables.get(listener)) == null ? void 0 : _a2();\n disposables.set(listener, listener(state, prev));\n }\n };\n for (const listener of listeners) {\n run(listener, prevState);\n }\n queueMicrotask(() => {\n if (lastUpdate !== thisUpdate) return;\n const snapshot = state;\n for (const listener of batchListeners) {\n run(listener, prevStateBatch, updatedKeys);\n }\n prevStateBatch = snapshot;\n updatedKeys.clear();\n });\n };\n const finalStore = {\n getState,\n setState,\n __unstableInternals: {\n setup: storeSetup,\n init: storeInit,\n subscribe: storeSubscribe,\n sync: storeSync,\n batch: storeBatch,\n pick: storePick,\n omit: storeOmit\n }\n };\n return finalStore;\n}\nfunction setup(store, ...args) {\n if (!store) return;\n return getInternal(store, \"setup\")(...args);\n}\nfunction init(store, ...args) {\n if (!store) return;\n return getInternal(store, \"init\")(...args);\n}\nfunction subscribe(store, ...args) {\n if (!store) return;\n return getInternal(store, \"subscribe\")(...args);\n}\nfunction sync(store, ...args) {\n if (!store) return;\n return getInternal(store, \"sync\")(...args);\n}\nfunction batch(store, ...args) {\n if (!store) return;\n return getInternal(store, \"batch\")(...args);\n}\nfunction omit2(store, ...args) {\n if (!store) return;\n return getInternal(store, \"omit\")(...args);\n}\nfunction pick2(store, ...args) {\n if (!store) return;\n return getInternal(store, \"pick\")(...args);\n}\nfunction mergeStore(...stores) {\n const initialState = stores.reduce((state, store2) => {\n var _a;\n const nextState = (_a = store2 == null ? void 0 : store2.getState) == null ? void 0 : _a.call(store2);\n if (!nextState) return state;\n return Object.assign(state, nextState);\n }, {});\n const store = createStore(initialState, ...stores);\n return Object.assign({}, ...stores, store);\n}\nfunction throwOnConflictingProps(props, store) {\n if (process.env.NODE_ENV === \"production\") return;\n if (!store) return;\n const defaultKeys = Object.entries(props).filter(([key, value]) => key.startsWith(\"default\") && value !== void 0).map(([key]) => {\n var _a;\n const stateKey = key.replace(\"default\", \"\");\n return `${((_a = stateKey[0]) == null ? void 0 : _a.toLowerCase()) || \"\"}${stateKey.slice(1)}`;\n });\n if (!defaultKeys.length) return;\n const storeState = store.getState();\n const conflictingProps = defaultKeys.filter(\n (key) => hasOwnProperty(storeState, key)\n );\n if (!conflictingProps.length) return;\n throw new Error(\n `Passing a store prop in conjunction with a default state is not supported.\n\nconst store = useSelectStore();\n<SelectProvider store={store} defaultValue=\"Apple\" />\n ^ ^\n\nInstead, pass the default state to the topmost store:\n\nconst store = useSelectStore({ defaultValue: \"Apple\" });\n<SelectProvider store={store} />\n\nSee https://github.com/ariakit/ariakit/pull/2745 for more details.\n\nIf there's a particular need for this, please submit a feature request at https://github.com/ariakit/ariakit\n`\n );\n}\n\nexport {\n createStore,\n setup,\n init,\n subscribe,\n sync,\n batch,\n omit2 as omit,\n pick2 as pick,\n mergeStore,\n throwOnConflictingProps\n};\n","\"use client\";\nimport {\n useEvent,\n useLiveRef,\n useSafeLayoutEffect\n} from \"./ABQUS43J.js\";\nimport {\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/utils/store.tsx\nimport { hasOwnProperty, identity } from \"@ariakit/core/utils/misc\";\nimport { batch, init, subscribe, sync } from \"@ariakit/core/utils/store\";\nimport * as React from \"react\";\nimport useSyncExternalStoreExports from \"use-sync-external-store/shim/index.js\";\nvar { useSyncExternalStore } = useSyncExternalStoreExports;\nvar noopSubscribe = () => () => {\n};\nfunction useStoreState(store, keyOrSelector = identity) {\n const storeSubscribe = React.useCallback(\n (callback) => {\n if (!store) return noopSubscribe();\n return subscribe(store, null, callback);\n },\n [store]\n );\n const getSnapshot = () => {\n const key = typeof keyOrSelector === \"string\" ? keyOrSelector : null;\n const selector = typeof keyOrSelector === \"function\" ? keyOrSelector : null;\n const state = store == null ? void 0 : store.getState();\n if (selector) return selector(state);\n if (!state) return;\n if (!key) return;\n if (!hasOwnProperty(state, key)) return;\n return state[key];\n };\n return useSyncExternalStore(storeSubscribe, getSnapshot, getSnapshot);\n}\nfunction useStoreStateObject(store, object) {\n const objRef = React.useRef(\n {}\n );\n const storeSubscribe = React.useCallback(\n (callback) => {\n if (!store) return noopSubscribe();\n return subscribe(store, null, callback);\n },\n [store]\n );\n const getSnapshot = () => {\n const state = store == null ? void 0 : store.getState();\n let updated = false;\n const obj = objRef.current;\n for (const prop in object) {\n const keyOrSelector = object[prop];\n if (typeof keyOrSelector === \"function\") {\n const value = keyOrSelector(state);\n if (value !== obj[prop]) {\n obj[prop] = value;\n updated = true;\n }\n }\n if (typeof keyOrSelector === \"string\") {\n if (!state) continue;\n if (!hasOwnProperty(state, keyOrSelector)) continue;\n const value = state[keyOrSelector];\n if (value !== obj[prop]) {\n obj[prop] = value;\n updated = true;\n }\n }\n }\n if (updated) {\n objRef.current = __spreadValues({}, obj);\n }\n return objRef.current;\n };\n return useSyncExternalStore(storeSubscribe, getSnapshot, getSnapshot);\n}\nfunction useStoreProps(store, props, key, setKey) {\n const value = hasOwnProperty(props, key) ? props[key] : void 0;\n const setValue = setKey ? props[setKey] : void 0;\n const propsRef = useLiveRef({ value, setValue });\n useSafeLayoutEffect(() => {\n return sync(store, [key], (state, prev) => {\n const { value: value2, setValue: setValue2 } = propsRef.current;\n if (!setValue2) return;\n if (state[key] === prev[key]) return;\n if (state[key] === value2) return;\n setValue2(state[key]);\n });\n }, [store, key]);\n useSafeLayoutEffect(() => {\n if (value === void 0) return;\n store.setState(key, value);\n return batch(store, [key], () => {\n if (value === void 0) return;\n store.setState(key, value);\n });\n });\n}\nfunction useStore(createStore, props) {\n const [store, setStore] = React.useState(() => createStore(props));\n useSafeLayoutEffect(() => init(store), [store]);\n const useState2 = React.useCallback(\n (keyOrSelector) => useStoreState(store, keyOrSelector),\n [store]\n );\n const memoizedStore = React.useMemo(\n () => __spreadProps(__spreadValues({}, store), { useState: useState2 }),\n [store, useState2]\n );\n const updateStore = useEvent(() => {\n setStore((store2) => createStore(__spreadValues(__spreadValues({}, props), store2.getState())));\n });\n return [memoizedStore, updateStore];\n}\n\nexport {\n useStoreState,\n useStoreStateObject,\n useStoreProps,\n useStore\n};\n","\"use client\";\nimport {\n batch,\n createStore,\n init,\n setup,\n throwOnConflictingProps\n} from \"./BCALMBPZ.js\";\nimport {\n chain,\n defaultValue\n} from \"./PBFD2E7P.js\";\nimport {\n getDocument,\n sortBasedOnDOMPosition\n} from \"./DTR5TSDJ.js\";\nimport {\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/collection/collection-store.ts\nfunction getCommonParent(items) {\n var _a;\n const firstItem = items.find((item) => !!item.element);\n const lastItem = [...items].reverse().find((item) => !!item.element);\n let parentElement = (_a = firstItem == null ? void 0 : firstItem.element) == null ? void 0 : _a.parentElement;\n while (parentElement && (lastItem == null ? void 0 : lastItem.element)) {\n const parent = parentElement;\n if (lastItem && parent.contains(lastItem.element)) {\n return parentElement;\n }\n parentElement = parentElement.parentElement;\n }\n return getDocument(parentElement).body;\n}\nfunction getPrivateStore(store) {\n return store == null ? void 0 : store.__unstablePrivateStore;\n}\nfunction createCollectionStore(props = {}) {\n var _a;\n throwOnConflictingProps(props, props.store);\n const syncState = (_a = props.store) == null ? void 0 : _a.getState();\n const items = defaultValue(\n props.items,\n syncState == null ? void 0 : syncState.items,\n props.defaultItems,\n []\n );\n const itemsMap = new Map(items.map((item) => [item.id, item]));\n const initialState = {\n items,\n renderedItems: defaultValue(syncState == null ? void 0 : syncState.renderedItems, [])\n };\n const syncPrivateStore = getPrivateStore(props.store);\n const privateStore = createStore(\n { items, renderedItems: initialState.renderedItems },\n syncPrivateStore\n );\n const collection = createStore(initialState, props.store);\n const sortItems = (renderedItems) => {\n const sortedItems = sortBasedOnDOMPosition(renderedItems, (i) => i.element);\n privateStore.setState(\"renderedItems\", sortedItems);\n collection.setState(\"renderedItems\", sortedItems);\n };\n setup(collection, () => init(privateStore));\n setup(privateStore, () => {\n return batch(privateStore, [\"items\"], (state) => {\n collection.setState(\"items\", state.items);\n });\n });\n setup(privateStore, () => {\n return batch(privateStore, [\"renderedItems\"], (state) => {\n let firstRun = true;\n let raf = requestAnimationFrame(() => {\n const { renderedItems } = collection.getState();\n if (state.renderedItems === renderedItems) return;\n sortItems(state.renderedItems);\n });\n if (typeof IntersectionObserver !== \"function\") {\n return () => cancelAnimationFrame(raf);\n }\n const ioCallback = () => {\n if (firstRun) {\n firstRun = false;\n return;\n }\n cancelAnimationFrame(raf);\n raf = requestAnimationFrame(() => sortItems(state.renderedItems));\n };\n const root = getCommonParent(state.renderedItems);\n const observer = new IntersectionObserver(ioCallback, { root });\n for (const item of state.renderedItems) {\n if (!item.element) continue;\n observer.observe(item.element);\n }\n return () => {\n cancelAnimationFrame(raf);\n observer.disconnect();\n };\n });\n });\n const mergeItem = (item, setItems, canDeleteFromMap = false) => {\n let prevItem;\n setItems((items2) => {\n const index = items2.findIndex(({ id }) => id === item.id);\n const nextItems = items2.slice();\n if (index !== -1) {\n prevItem = items2[index];\n const nextItem = __spreadValues(__spreadValues({}, prevItem), item);\n nextItems[index] = nextItem;\n itemsMap.set(item.id, nextItem);\n } else {\n nextItems.push(item);\n itemsMap.set(item.id, item);\n }\n return nextItems;\n });\n const unmergeItem = () => {\n setItems((items2) => {\n if (!prevItem) {\n if (canDeleteFromMap) {\n itemsMap.delete(item.id);\n }\n return items2.filter(({ id }) => id !== item.id);\n }\n const index = items2.findIndex(({ id }) => id === item.id);\n if (index === -1) return items2;\n const nextItems = items2.slice();\n nextItems[index] = prevItem;\n itemsMap.set(item.id, prevItem);\n return nextItems;\n });\n };\n return unmergeItem;\n };\n const registerItem = (item) => mergeItem(\n item,\n (getItems) => privateStore.setState(\"items\", getItems),\n true\n );\n return __spreadProps(__spreadValues({}, collection), {\n registerItem,\n renderItem: (item) => chain(\n registerItem(item),\n mergeItem(\n item,\n (getItems) => privateStore.setState(\"renderedItems\", getItems)\n )\n ),\n item: (id) => {\n if (!id) return null;\n let item = itemsMap.get(id);\n if (!item) {\n const { items: items2 } = privateStore.getState();\n item = items2.find((item2) => item2.id === id);\n if (item) {\n itemsMap.set(id, item);\n }\n }\n return item || null;\n },\n // @ts-expect-error Internal\n __unstablePrivateStore: privateStore\n });\n}\n\nexport {\n createCollectionStore\n};\n","\"use client\";\n\n// src/utils/array.ts\nfunction toArray(arg) {\n if (Array.isArray(arg)) {\n return arg;\n }\n return typeof arg !== \"undefined\" ? [arg] : [];\n}\nfunction addItemToArray(array, item, index = -1) {\n if (!(index in array)) {\n return [...array, item];\n }\n return [...array.slice(0, index), item, ...array.slice(index)];\n}\nfunction flatten2DArray(array) {\n const flattened = [];\n for (const row of array) {\n flattened.push(...row);\n }\n return flattened;\n}\nfunction reverseArray(array) {\n return array.slice().reverse();\n}\n\nexport {\n toArray,\n addItemToArray,\n flatten2DArray,\n reverseArray\n};\n","\"use client\";\nimport {\n createCollectionStore\n} from \"./CYQWQL4J.js\";\nimport {\n flatten2DArray,\n reverseArray\n} from \"./7PRQYBBV.js\";\nimport {\n createStore,\n setup,\n sync\n} from \"./BCALMBPZ.js\";\nimport {\n defaultValue\n} from \"./PBFD2E7P.js\";\nimport {\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/composite/composite-store.ts\nvar NULL_ITEM = { id: null };\nfunction findFirstEnabledItem(items, excludeId) {\n return items.find((item) => {\n if (excludeId) {\n return !item.disabled && item.id !== excludeId;\n }\n return !item.disabled;\n });\n}\nfunction getEnabledItems(items, excludeId) {\n return items.filter((item) => {\n if (excludeId) {\n return !item.disabled && item.id !== excludeId;\n }\n return !item.disabled;\n });\n}\nfunction getItemsInRow(items, rowId) {\n return items.filter((item) => item.rowId === rowId);\n}\nfunction flipItems(items, activeId, shouldInsertNullItem = false) {\n const index = items.findIndex((item) => item.id === activeId);\n return [\n ...items.slice(index + 1),\n ...shouldInsertNullItem ? [NULL_ITEM] : [],\n ...items.slice(0, index)\n ];\n}\nfunction groupItemsByRows(items) {\n const rows = [];\n for (const item of items) {\n const row = rows.find((currentRow) => {\n var _a;\n return ((_a = currentRow[0]) == null ? void 0 : _a.rowId) === item.rowId;\n });\n if (row) {\n row.push(item);\n } else {\n rows.push([item]);\n }\n }\n return rows;\n}\nfunction getMaxRowLength(array) {\n let maxLength = 0;\n for (const { length } of array) {\n if (length > maxLength) {\n maxLength = length;\n }\n }\n return maxLength;\n}\nfunction createEmptyItem(rowId) {\n return {\n id: \"__EMPTY_ITEM__\",\n disabled: true,\n rowId\n };\n}\nfunction normalizeRows(rows, activeId, focusShift) {\n const maxLength = getMaxRowLength(rows);\n for (const row of rows) {\n for (let i = 0; i < maxLength; i += 1) {\n const item = row[i];\n if (!item || focusShift && item.disabled) {\n const isFirst = i === 0;\n const previousItem = isFirst && focusShift ? findFirstEnabledItem(row) : row[i - 1];\n row[i] = previousItem && activeId !== previousItem.id && focusShift ? previousItem : createEmptyItem(previousItem == null ? void 0 : previousItem.rowId);\n }\n }\n }\n return rows;\n}\nfunction verticalizeItems(items) {\n const rows = groupItemsByRows(items);\n const maxLength = getMaxRowLength(rows);\n const verticalized = [];\n for (let i = 0; i < maxLength; i += 1) {\n for (const row of rows) {\n const item = row[i];\n if (item) {\n verticalized.push(__spreadProps(__spreadValues({}, item), {\n // If there's no rowId, it means that it's not a grid composite, but\n // a single row instead. So, instead of verticalizing it, that is,\n // assigning a different rowId based on the column index, we keep it\n // undefined so they will be part of the same row. This is useful\n // when using up/down on one-dimensional composites.\n rowId: item.rowId ? `${i}` : void 0\n }));\n }\n }\n }\n return verticalized;\n}\nfunction createCompositeStore(props = {}) {\n var _a;\n const syncState = (_a = props.store) == null ? void 0 : _a.getState();\n const collection = createCollectionStore(props);\n const activeId = defaultValue(\n props.activeId,\n syncState == null ? void 0 : syncState.activeId,\n props.defaultActiveId\n );\n const initialState = __spreadProps(__spreadValues({}, collection.getState()), {\n id: defaultValue(\n props.id,\n syncState == null ? void 0 : syncState.id,\n `id-${Math.random().toString(36).slice(2, 8)}`\n ),\n activeId,\n baseElement: defaultValue(syncState == null ? void 0 : syncState.baseElement, null),\n includesBaseElement: defaultValue(\n props.includesBaseElement,\n syncState == null ? void 0 : syncState.includesBaseElement,\n activeId === null\n ),\n moves: defaultValue(syncState == null ? void 0 : syncState.moves, 0),\n orientation: defaultValue(\n props.orientation,\n syncState == null ? void 0 : syncState.orientation,\n \"both\"\n ),\n rtl: defaultValue(props.rtl, syncState == null ? void 0 : syncState.rtl, false),\n virtualFocus: defaultValue(\n props.virtualFocus,\n syncState == null ? void 0 : syncState.virtualFocus,\n false\n ),\n focusLoop: defaultValue(props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, false),\n focusWrap: defaultValue(props.focusWrap, syncState == null ? void 0 : syncState.focusWrap, false),\n focusShift: defaultValue(props.focusShift, syncState == null ? void 0 : syncState.focusShift, false)\n });\n const composite = createStore(initialState, collection, props.store);\n setup(\n composite,\n () => sync(composite, [\"renderedItems\", \"activeId\"], (state) => {\n composite.setState(\"activeId\", (activeId2) => {\n var _a2;\n if (activeId2 !== void 0) return activeId2;\n return (_a2 = findFirstEnabledItem(state.renderedItems)) == null ? void 0 : _a2.id;\n });\n })\n );\n const getNextId = (direction = \"next\", options = {}) => {\n var _a2, _b;\n const defaultState = composite.getState();\n const {\n skip = 0,\n activeId: activeId2 = defaultState.activeId,\n focusShift = defaultState.focusShift,\n focusLoop = defaultState.focusLoop,\n focusWrap = defaultState.focusWrap,\n includesBaseElement = defaultState.includesBaseElement,\n renderedItems = defaultState.renderedItems,\n rtl = defaultState.rtl\n } = options;\n const isVerticalDirection = direction === \"up\" || direction === \"down\";\n const isNextDirection = direction === \"next\" || direction === \"down\";\n const canReverse = isNextDirection ? rtl && !isVerticalDirection : !rtl || isVerticalDirection;\n const canShift = focusShift && !skip;\n let items = !isVerticalDirection ? renderedItems : flatten2DArray(\n normalizeRows(groupItemsByRows(renderedItems), activeId2, canShift)\n );\n items = canReverse ? reverseArray(items) : items;\n items = isVerticalDirection ? verticalizeItems(items) : items;\n if (activeId2 == null) {\n return (_a2 = findFirstEnabledItem(items)) == null ? void 0 : _a2.id;\n }\n const activeItem = items.find((item) => item.id === activeId2);\n if (!activeItem) {\n return (_b = findFirstEnabledItem(items)) == null ? void 0 : _b.id;\n }\n const isGrid = items.some((item) => item.rowId);\n const activeIndex = items.indexOf(activeItem);\n const nextItems = items.slice(activeIndex + 1);\n const nextItemsInRow = getItemsInRow(nextItems, activeItem.rowId);\n if (skip) {\n const nextEnabledItemsInRow = getEnabledItems(nextItemsInRow, activeId2);\n const nextItem2 = nextEnabledItemsInRow.slice(skip)[0] || // If we can't find an item, just return the last one.\n nextEnabledItemsInRow[nextEnabledItemsInRow.length - 1];\n return nextItem2 == null ? void 0 : nextItem2.id;\n }\n const canLoop = focusLoop && (isVerticalDirection ? focusLoop !== \"horizontal\" : focusLoop !== \"vertical\");\n const canWrap = isGrid && focusWrap && (isVerticalDirection ? focusWrap !== \"horizontal\" : focusWrap !== \"vertical\");\n const hasNullItem = isNextDirection ? (!isGrid || isVerticalDirection) && canLoop && includesBaseElement : isVerticalDirection ? includesBaseElement : false;\n if (canLoop) {\n const loopItems = canWrap && !hasNullItem ? items : getItemsInRow(items, activeItem.rowId);\n const sortedItems = flipItems(loopItems, activeId2, hasNullItem);\n const nextItem2 = findFirstEnabledItem(sortedItems, activeId2);\n return nextItem2 == null ? void 0 : nextItem2.id;\n }\n if (canWrap) {\n const nextItem2 = findFirstEnabledItem(\n // We can use nextItems, which contains all the next items, including\n // items from other rows, to wrap between rows. However, if there is a\n // null item (the composite container), we'll only use the next items in\n // the row. So moving next from the last item will focus on the\n // composite container. On grid composites, horizontal navigation never\n // focuses on the composite container, only vertical.\n hasNullItem ? nextItemsInRow : nextItems,\n activeId2\n );\n const nextId = hasNullItem ? (nextItem2 == null ? void 0 : nextItem2.id) || null : nextItem2 == null ? void 0 : nextItem2.id;\n return nextId;\n }\n const nextItem = findFirstEnabledItem(nextItemsInRow, activeId2);\n if (!nextItem && hasNullItem) {\n return null;\n }\n return nextItem == null ? void 0 : nextItem.id;\n };\n return __spreadProps(__spreadValues(__spreadValues({}, collection), composite), {\n setBaseElement: (element) => composite.setState(\"baseElement\", element),\n setActiveId: (id) => composite.setState(\"activeId\", id),\n move: (id) => {\n if (id === void 0) return;\n composite.setState(\"activeId\", id);\n composite.setState(\"moves\", (moves) => moves + 1);\n },\n first: () => {\n var _a2;\n return (_a2 = findFirstEnabledItem(composite.getState().renderedItems)) == null ? void 0 : _a2.id;\n },\n last: () => {\n var _a2;\n return (_a2 = findFirstEnabledItem(reverseArray(composite.getState().renderedItems))) == null ? void 0 : _a2.id;\n },\n next: (options) => {\n if (options !== void 0 && typeof options === \"number\") {\n options = { skip: options };\n }\n return getNextId(\"next\", options);\n },\n previous: (options) => {\n if (options !== void 0 && typeof options === \"number\") {\n options = { skip: options };\n }\n return getNextId(\"previous\", options);\n },\n down: (options) => {\n if (options !== void 0 && typeof options === \"number\") {\n options = { skip: options };\n }\n return getNextId(\"down\", options);\n },\n up: (options) => {\n if (options !== void 0 && typeof options === \"number\") {\n options = { skip: options };\n }\n return getNextId(\"up\", options);\n }\n });\n}\n\nexport {\n createCompositeStore\n};\n","\"use client\";\nimport {\n useCollectionStoreProps\n} from \"./C3IKGW5T.js\";\nimport {\n useStore,\n useStoreProps\n} from \"./YV4JVR4I.js\";\nimport {\n useId\n} from \"./ABQUS43J.js\";\nimport {\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/composite/composite-store.ts\nimport * as Core from \"@ariakit/core/composite/composite-store\";\nfunction useCompositeStoreOptions(props) {\n const id = useId(props.id);\n return __spreadValues({ id }, props);\n}\nfunction useCompositeStoreProps(store, update, props) {\n store = useCollectionStoreProps(store, update, props);\n useStoreProps(store, props, \"activeId\", \"setActiveId\");\n useStoreProps(store, props, \"includesBaseElement\");\n useStoreProps(store, props, \"virtualFocus\");\n useStoreProps(store, props, \"orientation\");\n useStoreProps(store, props, \"rtl\");\n useStoreProps(store, props, \"focusLoop\");\n useStoreProps(store, props, \"focusWrap\");\n useStoreProps(store, props, \"focusShift\");\n return store;\n}\nfunction useCompositeStore(props = {}) {\n props = useCompositeStoreOptions(props);\n const [store, update] = useStore(Core.createCompositeStore, props);\n return useCompositeStoreProps(store, update, props);\n}\n\nexport {\n useCompositeStoreOptions,\n useCompositeStoreProps,\n useCompositeStore\n};\n","\"use client\";\nimport {\n useStore,\n useStoreProps\n} from \"./YV4JVR4I.js\";\nimport {\n useUpdateEffect\n} from \"./ABQUS43J.js\";\n\n// src/collection/collection-store.ts\nimport * as Core from \"@ariakit/core/collection/collection-store\";\nfunction useCollectionStoreProps(store, update, props) {\n useUpdateEffect(update, [props.store]);\n useStoreProps(store, props, \"items\", \"setItems\");\n return store;\n}\nfunction useCollectionStore(props = {}) {\n const [store, update] = useStore(Core.createCollectionStore, props);\n return useCollectionStoreProps(store, update, props);\n}\n\nexport {\n useCollectionStoreProps,\n useCollectionStore\n};\n","\"use client\";\n\n// src/composite/utils.ts\nimport { getDocument, isTextField } from \"@ariakit/core/utils/dom\";\nvar NULL_ITEM = { id: null };\nfunction flipItems(items, activeId, shouldInsertNullItem = false) {\n const index = items.findIndex((item) => item.id === activeId);\n return [\n ...items.slice(index + 1),\n ...shouldInsertNullItem ? [NULL_ITEM] : [],\n ...items.slice(0, index)\n ];\n}\nfunction findFirstEnabledItem(items, excludeId) {\n return items.find((item) => {\n if (excludeId) {\n return !item.disabled && item.id !== excludeId;\n }\n return !item.disabled;\n });\n}\nfunction getEnabledItem(store, id) {\n if (!id) return null;\n return store.item(id) || null;\n}\nfunction groupItemsByRows(items) {\n const rows = [];\n for (const item of items) {\n const row = rows.find((currentRow) => {\n var _a;\n return ((_a = currentRow[0]) == null ? void 0 : _a.rowId) === item.rowId;\n });\n if (row) {\n row.push(item);\n } else {\n rows.push([item]);\n }\n }\n return rows;\n}\nfunction selectTextField(element, collapseToEnd = false) {\n if (isTextField(element)) {\n element.setSelectionRange(\n collapseToEnd ? element.value.length : 0,\n element.value.length\n );\n } else if (element.isContentEditable) {\n const selection = getDocument(element).getSelection();\n selection == null ? void 0 : selection.selectAllChildren(element);\n if (collapseToEnd) {\n selection == null ? void 0 : selection.collapseToEnd();\n }\n }\n}\nvar FOCUS_SILENTLY = Symbol(\"FOCUS_SILENTLY\");\nfunction focusSilently(element) {\n element[FOCUS_SILENTLY] = true;\n element.focus({ preventScroll: true });\n}\nfunction silentlyFocused(element) {\n const isSilentlyFocused = element[FOCUS_SILENTLY];\n delete element[FOCUS_SILENTLY];\n return isSilentlyFocused;\n}\nfunction isItem(store, element, exclude) {\n if (!element) return false;\n if (element === exclude) return false;\n const item = store.item(element.id);\n if (!item) return false;\n if (exclude && item.element === exclude) return false;\n return true;\n}\n\nexport {\n flipItems,\n findFirstEnabledItem,\n getEnabledItem,\n groupItemsByRows,\n selectTextField,\n focusSilently,\n silentlyFocused,\n isItem\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"ReactJSXRuntime\"];","\"use client\";\nimport {\n useMergeRefs\n} from \"./ABQUS43J.js\";\nimport {\n getRefProperty,\n mergeProps\n} from \"./SK3NAZA3.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/utils/system.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction forwardRef2(render) {\n const Role = React.forwardRef((props, ref) => render(__spreadProps(__spreadValues({}, props), { ref })));\n Role.displayName = render.displayName || render.name;\n return Role;\n}\nfunction memo2(Component, propsAreEqual) {\n return React.memo(Component, propsAreEqual);\n}\nfunction createElement(Type, props) {\n const _a = props, { wrapElement, render } = _a, rest = __objRest(_a, [\"wrapElement\", \"render\"]);\n const mergedRef = useMergeRefs(props.ref, getRefProperty(render));\n let element;\n if (React.isValidElement(render)) {\n const renderProps = __spreadProps(__spreadValues({}, render.props), { ref: mergedRef });\n element = React.cloneElement(render, mergeProps(rest, renderProps));\n } else if (render) {\n element = render(rest);\n } else {\n element = /* @__PURE__ */ jsx(Type, __spreadValues({}, rest));\n }\n if (wrapElement) {\n return wrapElement(element);\n }\n return element;\n}\nfunction createHook(useProps) {\n const useRole = (props = {}) => {\n return useProps(props);\n };\n useRole.displayName = useProps.name;\n return useRole;\n}\nfunction createStoreContext(providers = [], scopedProviders = []) {\n const context = React.createContext(void 0);\n const scopedContext = React.createContext(void 0);\n const useContext2 = () => React.useContext(context);\n const useScopedContext = (onlyScoped = false) => {\n const scoped = React.useContext(scopedContext);\n const store = useContext2();\n if (onlyScoped) return scoped;\n return scoped || store;\n };\n const useProviderContext = () => {\n const scoped = React.useContext(scopedContext);\n const store = useContext2();\n if (scoped && scoped === store) return;\n return store;\n };\n const ContextProvider = (props) => {\n return providers.reduceRight(\n (children, Provider) => /* @__PURE__ */ jsx(Provider, __spreadProps(__spreadValues({}, props), { children })),\n /* @__PURE__ */ jsx(context.Provider, __spreadValues({}, props))\n );\n };\n const ScopedContextProvider = (props) => {\n return /* @__PURE__ */ jsx(ContextProvider, __spreadProps(__spreadValues({}, props), { children: scopedProviders.reduceRight(\n (children, Provider) => /* @__PURE__ */ jsx(Provider, __spreadProps(__spreadValues({}, props), { children })),\n /* @__PURE__ */ jsx(scopedContext.Provider, __spreadValues({}, props))\n ) }));\n };\n return {\n context,\n scopedContext,\n useContext: useContext2,\n useScopedContext,\n useProviderContext,\n ContextProvider,\n ScopedContextProvider\n };\n}\n\nexport {\n forwardRef2 as forwardRef,\n memo2 as memo,\n createElement,\n createHook,\n createStoreContext\n};\n","\"use client\";\nimport {\n createStoreContext\n} from \"./LMDWO4NN.js\";\n\n// src/collection/collection-context.tsx\nvar ctx = createStoreContext();\nvar useCollectionContext = ctx.useContext;\nvar useCollectionScopedContext = ctx.useScopedContext;\nvar useCollectionProviderContext = ctx.useProviderContext;\nvar CollectionContextProvider = ctx.ContextProvider;\nvar CollectionScopedContextProvider = ctx.ScopedContextProvider;\n\nexport {\n useCollectionContext,\n useCollectionScopedContext,\n useCollectionProviderContext,\n CollectionContextProvider,\n CollectionScopedContextProvider\n};\n","\"use client\";\nimport {\n CollectionContextProvider,\n CollectionScopedContextProvider\n} from \"./VDHZ5F7K.js\";\nimport {\n createStoreContext\n} from \"./LMDWO4NN.js\";\n\n// src/composite/composite-context.tsx\nimport { createContext } from \"react\";\nvar ctx = createStoreContext(\n [CollectionContextProvider],\n [CollectionScopedContextProvider]\n);\nvar useCompositeContext = ctx.useContext;\nvar useCompositeScopedContext = ctx.useScopedContext;\nvar useCompositeProviderContext = ctx.useProviderContext;\nvar CompositeContextProvider = ctx.ContextProvider;\nvar CompositeScopedContextProvider = ctx.ScopedContextProvider;\nvar CompositeItemContext = createContext(\n void 0\n);\nvar CompositeRowContext = createContext(\n void 0\n);\n\nexport {\n useCompositeContext,\n useCompositeScopedContext,\n useCompositeProviderContext,\n CompositeContextProvider,\n CompositeScopedContextProvider,\n CompositeItemContext,\n CompositeRowContext\n};\n","\"use client\";\n\n// src/focusable/focusable-context.tsx\nimport { createContext } from \"react\";\nvar FocusableContext = createContext(true);\n\nexport {\n FocusableContext\n};\n","\"use client\";\nimport {\n contains,\n getActiveElement,\n isFrame,\n isVisible\n} from \"../__chunks/DTR5TSDJ.js\";\nimport {\n __spreadValues\n} from \"../__chunks/3YLGPPWQ.js\";\n\n// src/utils/focus.ts\nvar selector = \"input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], summary, iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])\";\nfunction hasNegativeTabIndex(element) {\n const tabIndex = Number.parseInt(element.getAttribute(\"tabindex\") || \"0\", 10);\n return tabIndex < 0;\n}\nfunction isFocusable(element) {\n if (!element.matches(selector)) return false;\n if (!isVisible(element)) return false;\n if (element.closest(\"[inert]\")) return false;\n return true;\n}\nfunction isTabbable(element) {\n if (!isFocusable(element)) return false;\n if (hasNegativeTabIndex(element)) return false;\n if (!(\"form\" in element)) return true;\n if (!element.form) return true;\n if (element.checked) return true;\n if (element.type !== \"radio\") return true;\n const radioGroup = element.form.elements.namedItem(element.name);\n if (!radioGroup) return true;\n if (!(\"length\" in radioGroup)) return true;\n const activeElement = getActiveElement(element);\n if (!activeElement) return true;\n if (activeElement === element) return true;\n if (!(\"form\" in activeElement)) return true;\n if (activeElement.form !== element.form) return true;\n if (activeElement.name !== element.name) return true;\n return false;\n}\nfunction getAllFocusableIn(container, includeContainer) {\n const elements = Array.from(\n container.querySelectorAll(selector)\n );\n if (includeContainer) {\n elements.unshift(container);\n }\n const focusableElements = elements.filter(isFocusable);\n focusableElements.forEach((element, i) => {\n if (isFrame(element) && element.contentDocument) {\n const frameBody = element.contentDocument.body;\n focusableElements.splice(i, 1, ...getAllFocusableIn(frameBody));\n }\n });\n return focusableElements;\n}\nfunction getAllFocusable(includeBody) {\n return getAllFocusableIn(document.body, includeBody);\n}\nfunction getFirstFocusableIn(container, includeContainer) {\n const [first] = getAllFocusableIn(container, includeContainer);\n return first || null;\n}\nfunction getFirstFocusable(includeBody) {\n return getFirstFocusableIn(document.body, includeBody);\n}\nfunction getAllTabbableIn(container, includeContainer, fallbackToFocusable) {\n const elements = Array.from(\n container.querySelectorAll(selector)\n );\n const tabbableElements = elements.filter(isTabbable);\n if (includeContainer && isTabbable(container)) {\n tabbableElements.unshift(container);\n }\n tabbableElements.forEach((element, i) => {\n if (isFrame(element) && element.contentDocument) {\n const frameBody = element.contentDocument.body;\n const allFrameTabbable = getAllTabbableIn(\n frameBody,\n false,\n fallbackToFocusable\n );\n tabbableElements.splice(i, 1, ...allFrameTabbable);\n }\n });\n if (!tabbableElements.length && fallbackToFocusable) {\n return elements;\n }\n return tabbableElements;\n}\nfunction getAllTabbable(fallbackToFocusable) {\n return getAllTabbableIn(document.body, false, fallbackToFocusable);\n}\nfunction getFirstTabbableIn(container, includeContainer, fallbackToFocusable) {\n const [first] = getAllTabbableIn(\n container,\n includeContainer,\n fallbackToFocusable\n );\n return first || null;\n}\nfunction getFirstTabbable(fallbackToFocusable) {\n return getFirstTabbableIn(document.body, false, fallbackToFocusable);\n}\nfunction getLastTabbableIn(container, includeContainer, fallbackToFocusable) {\n const allTabbable = getAllTabbableIn(\n container,\n includeContainer,\n fallbackToFocusable\n );\n return allTabbable[allTabbable.length - 1] || null;\n}\nfunction getLastTabbable(fallbackToFocusable) {\n return getLastTabbableIn(document.body, false, fallbackToFocusable);\n}\nfunction getNextTabbableIn(container, includeContainer, fallbackToFirst, fallbackToFocusable) {\n const activeElement = getActiveElement(container);\n const allFocusable = getAllFocusableIn(container, includeContainer);\n const activeIndex = allFocusable.indexOf(activeElement);\n const nextFocusableElements = allFocusable.slice(activeIndex + 1);\n return nextFocusableElements.find(isTabbable) || (fallbackToFirst ? allFocusable.find(isTabbable) : null) || (fallbackToFocusable ? nextFocusableElements[0] : null) || null;\n}\nfunction getNextTabbable(fallbackToFirst, fallbackToFocusable) {\n return getNextTabbableIn(\n document.body,\n false,\n fallbackToFirst,\n fallbackToFocusable\n );\n}\nfunction getPreviousTabbableIn(container, includeContainer, fallbackToLast, fallbackToFocusable) {\n const activeElement = getActiveElement(container);\n const allFocusable = getAllFocusableIn(container, includeContainer).reverse();\n const activeIndex = allFocusable.indexOf(activeElement);\n const previousFocusableElements = allFocusable.slice(activeIndex + 1);\n return previousFocusableElements.find(isTabbable) || (fallbackToLast ? allFocusable.find(isTabbable) : null) || (fallbackToFocusable ? previousFocusableElements[0] : null) || null;\n}\nfunction getPreviousTabbable(fallbackToFirst, fallbackToFocusable) {\n return getPreviousTabbableIn(\n document.body,\n false,\n fallbackToFirst,\n fallbackToFocusable\n );\n}\nfunction getClosestFocusable(element) {\n while (element && !isFocusable(element)) {\n element = element.closest(selector);\n }\n return element || null;\n}\nfunction hasFocus(element) {\n const activeElement = getActiveElement(element);\n if (!activeElement) return false;\n if (activeElement === element) return true;\n const activeDescendant = activeElement.getAttribute(\"aria-activedescendant\");\n if (!activeDescendant) return false;\n return activeDescendant === element.id;\n}\nfunction hasFocusWithin(element) {\n const activeElement = getActiveElement(element);\n if (!activeElement) return false;\n if (contains(element, activeElement)) return true;\n const activeDescendant = activeElement.getAttribute(\"aria-activedescendant\");\n if (!activeDescendant) return false;\n if (!(\"id\" in element)) return false;\n if (activeDescendant === element.id) return true;\n return !!element.querySelector(`#${CSS.escape(activeDescendant)}`);\n}\nfunction focusIfNeeded(element) {\n if (!hasFocusWithin(element) && isFocusable(element)) {\n element.focus();\n }\n}\nfunction disableFocus(element) {\n var _a;\n const currentTabindex = (_a = element.getAttribute(\"tabindex\")) != null ? _a : \"\";\n element.setAttribute(\"data-tabindex\", currentTabindex);\n element.setAttribute(\"tabindex\", \"-1\");\n}\nfunction disableFocusIn(container, includeContainer) {\n const tabbableElements = getAllTabbableIn(container, includeContainer);\n for (const element of tabbableElements) {\n disableFocus(element);\n }\n}\nfunction restoreFocusIn(container) {\n const elements = container.querySelectorAll(\"[data-tabindex]\");\n const restoreTabIndex = (element) => {\n const tabindex = element.getAttribute(\"data-tabindex\");\n element.removeAttribute(\"data-tabindex\");\n if (tabindex) {\n element.setAttribute(\"tabindex\", tabindex);\n } else {\n element.removeAttribute(\"tabindex\");\n }\n };\n if (container.hasAttribute(\"data-tabindex\")) {\n restoreTabIndex(container);\n }\n for (const element of elements) {\n restoreTabIndex(element);\n }\n}\nfunction focusIntoView(element, options) {\n if (!(\"scrollIntoView\" in element)) {\n element.focus();\n } else {\n element.focus({ preventScroll: true });\n element.scrollIntoView(__spreadValues({ block: \"nearest\", inline: \"nearest\" }, options));\n }\n}\nexport {\n disableFocus,\n disableFocusIn,\n focusIfNeeded,\n focusIntoView,\n getAllFocusable,\n getAllFocusableIn,\n getAllTabbable,\n getAllTabbableIn,\n getClosestFocusable,\n getFirstFocusable,\n getFirstFocusableIn,\n getFirstTabbable,\n getFirstTabbableIn,\n getLastTabbable,\n getLastTabbableIn,\n getNextTabbable,\n getNextTabbableIn,\n getPreviousTabbable,\n getPreviousTabbableIn,\n hasFocus,\n hasFocusWithin,\n isFocusable,\n isTabbable,\n restoreFocusIn\n};\n","\"use client\";\nimport {\n FocusableContext\n} from \"./SWN3JYXT.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n useEvent,\n useMergeRefs,\n useTagName\n} from \"./ABQUS43J.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/focusable/focusable.tsx\nimport { isButton } from \"@ariakit/core/utils/dom\";\nimport {\n addGlobalEventListener,\n isFocusEventOutside,\n isPortalEvent,\n isSelfTarget,\n queueBeforeEvent\n} from \"@ariakit/core/utils/events\";\nimport {\n focusIfNeeded,\n getClosestFocusable,\n hasFocus,\n isFocusable\n} from \"@ariakit/core/utils/focus\";\nimport {\n disabledFromProps,\n removeUndefinedValues\n} from \"@ariakit/core/utils/misc\";\nimport { isSafari } from \"@ariakit/core/utils/platform\";\nimport { useContext, useEffect, useMemo, useRef, useState } from \"react\";\nvar TagName = \"div\";\nvar isSafariBrowser = isSafari();\nvar alwaysFocusVisibleInputTypes = [\n \"text\",\n \"search\",\n \"url\",\n \"tel\",\n \"email\",\n \"password\",\n \"number\",\n \"date\",\n \"month\",\n \"week\",\n \"time\",\n \"datetime\",\n \"datetime-local\"\n];\nvar safariFocusAncestorSymbol = Symbol(\"safariFocusAncestor\");\nfunction isSafariFocusAncestor(element) {\n if (!element) return false;\n return !!element[safariFocusAncestorSymbol];\n}\nfunction markSafariFocusAncestor(element, value) {\n if (!element) return;\n element[safariFocusAncestorSymbol] = value;\n}\nfunction isAlwaysFocusVisible(element) {\n const { tagName, readOnly, type } = element;\n if (tagName === \"TEXTAREA\" && !readOnly) return true;\n if (tagName === \"SELECT\" && !readOnly) return true;\n if (tagName === \"INPUT\" && !readOnly) {\n return alwaysFocusVisibleInputTypes.includes(type);\n }\n if (element.isContentEditable) return true;\n const role = element.getAttribute(\"role\");\n if (role === \"combobox\" && element.dataset.name) {\n return true;\n }\n return false;\n}\nfunction getLabels(element) {\n if (\"labels\" in element) {\n return element.labels;\n }\n return null;\n}\nfunction isNativeCheckboxOrRadio(element) {\n const tagName = element.tagName.toLowerCase();\n if (tagName === \"input\" && element.type) {\n return element.type === \"radio\" || element.type === \"checkbox\";\n }\n return false;\n}\nfunction isNativeTabbable(tagName) {\n if (!tagName) return true;\n return tagName === \"button\" || tagName === \"summary\" || tagName === \"input\" || tagName === \"select\" || tagName === \"textarea\" || tagName === \"a\";\n}\nfunction supportsDisabledAttribute(tagName) {\n if (!tagName) return true;\n return tagName === \"button\" || tagName === \"input\" || tagName === \"select\" || tagName === \"textarea\";\n}\nfunction getTabIndex(focusable, trulyDisabled, nativeTabbable, supportsDisabled, tabIndexProp) {\n if (!focusable) {\n return tabIndexProp;\n }\n if (trulyDisabled) {\n if (nativeTabbable && !supportsDisabled) {\n return -1;\n }\n return;\n }\n if (nativeTabbable) {\n return tabIndexProp;\n }\n return tabIndexProp || 0;\n}\nfunction useDisableEvent(onEvent, disabled) {\n return useEvent((event) => {\n onEvent == null ? void 0 : onEvent(event);\n if (event.defaultPrevented) return;\n if (disabled) {\n event.stopPropagation();\n event.preventDefault();\n }\n });\n}\nvar isKeyboardModality = true;\nfunction onGlobalMouseDown(event) {\n const target = event.target;\n if (target && \"hasAttribute\" in target) {\n if (!target.hasAttribute(\"data-focus-visible\")) {\n isKeyboardModality = false;\n }\n }\n}\nfunction onGlobalKeyDown(event) {\n if (event.metaKey) return;\n if (event.ctrlKey) return;\n if (event.altKey) return;\n isKeyboardModality = true;\n}\nvar useFocusable = createHook(\n function useFocusable2(_a) {\n var _b = _a, {\n focusable = true,\n accessibleWhenDisabled,\n autoFocus,\n onFocusVisible\n } = _b, props = __objRest(_b, [\n \"focusable\",\n \"accessibleWhenDisabled\",\n \"autoFocus\",\n \"onFocusVisible\"\n ]);\n const ref = useRef(null);\n useEffect(() => {\n if (!focusable) return;\n addGlobalEventListener(\"mousedown\", onGlobalMouseDown, true);\n addGlobalEventListener(\"keydown\", onGlobalKeyDown, true);\n }, [focusable]);\n if (isSafariBrowser) {\n useEffect(() => {\n if (!focusable) return;\n const element = ref.current;\n if (!element) return;\n if (!isNativeCheckboxOrRadio(element)) return;\n const labels = getLabels(element);\n if (!labels) return;\n const onMouseUp = () => queueMicrotask(() => element.focus());\n for (const label of labels) {\n label.addEventListener(\"mouseup\", onMouseUp);\n }\n return () => {\n for (const label of labels) {\n label.removeEventListener(\"mouseup\", onMouseUp);\n }\n };\n }, [focusable]);\n }\n const disabled = focusable && disabledFromProps(props);\n const trulyDisabled = !!disabled && !accessibleWhenDisabled;\n const [focusVisible, setFocusVisible] = useState(false);\n useEffect(() => {\n if (!focusable) return;\n if (trulyDisabled && focusVisible) {\n setFocusVisible(false);\n }\n }, [focusable, trulyDisabled, focusVisible]);\n useEffect(() => {\n if (!focusable) return;\n if (!focusVisible) return;\n const element = ref.current;\n if (!element) return;\n if (typeof IntersectionObserver === \"undefined\") return;\n const observer = new IntersectionObserver(() => {\n if (!isFocusable(element)) {\n setFocusVisible(false);\n }\n });\n observer.observe(element);\n return () => observer.disconnect();\n }, [focusable, focusVisible]);\n const onKeyPressCapture = useDisableEvent(\n props.onKeyPressCapture,\n disabled\n );\n const onMouseDownCapture = useDisableEvent(\n props.onMouseDownCapture,\n disabled\n );\n const onClickCapture = useDisableEvent(props.onClickCapture, disabled);\n const onMouseDownProp = props.onMouseDown;\n const onMouseDown = useEvent((event) => {\n onMouseDownProp == null ? void 0 : onMouseDownProp(event);\n if (event.defaultPrevented) return;\n if (!focusable) return;\n const element = event.currentTarget;\n if (!isSafariBrowser) return;\n if (isPortalEvent(event)) return;\n if (!isButton(element) && !isNativeCheckboxOrRadio(element)) return;\n let receivedFocus = false;\n const onFocus = () => {\n receivedFocus = true;\n };\n const options = { capture: true, once: true };\n element.addEventListener(\"focusin\", onFocus, options);\n const focusableContainer = getClosestFocusable(element.parentElement);\n markSafariFocusAncestor(focusableContainer, true);\n queueBeforeEvent(element, \"mouseup\", () => {\n element.removeEventListener(\"focusin\", onFocus, true);\n markSafariFocusAncestor(focusableContainer, false);\n if (receivedFocus) return;\n focusIfNeeded(element);\n });\n });\n const handleFocusVisible = (event, currentTarget) => {\n if (currentTarget) {\n event.currentTarget = currentTarget;\n }\n if (!focusable) return;\n const element = event.currentTarget;\n if (!element) return;\n if (!hasFocus(element)) return;\n onFocusVisible == null ? void 0 : onFocusVisible(event);\n if (event.defaultPrevented) return;\n element.dataset.focusVisible = \"true\";\n setFocusVisible(true);\n };\n const onKeyDownCaptureProp = props.onKeyDownCapture;\n const onKeyDownCapture = useEvent((event) => {\n onKeyDownCaptureProp == null ? void 0 : onKeyDownCaptureProp(event);\n if (event.defaultPrevented) return;\n if (!focusable) return;\n if (focusVisible) return;\n if (event.metaKey) return;\n if (event.altKey) return;\n if (event.ctrlKey) return;\n if (!isSelfTarget(event)) return;\n const element = event.currentTarget;\n const applyFocusVisible = () => handleFocusVisible(event, element);\n queueBeforeEvent(element, \"focusout\", applyFocusVisible);\n });\n const onFocusCaptureProp = props.onFocusCapture;\n const onFocusCapture = useEvent((event) => {\n onFocusCaptureProp == null ? void 0 : onFocusCaptureProp(event);\n if (event.defaultPrevented) return;\n if (!focusable) return;\n if (!isSelfTarget(event)) {\n setFocusVisible(false);\n return;\n }\n const element = event.currentTarget;\n const applyFocusVisible = () => handleFocusVisible(event, element);\n if (isKeyboardModality || isAlwaysFocusVisible(event.target)) {\n queueBeforeEvent(event.target, \"focusout\", applyFocusVisible);\n } else {\n setFocusVisible(false);\n }\n });\n const onBlurProp = props.onBlur;\n const onBlur = useEvent((event) => {\n onBlurProp == null ? void 0 : onBlurProp(event);\n if (!focusable) return;\n if (!isFocusEventOutside(event)) return;\n setFocusVisible(false);\n });\n const autoFocusOnShow = useContext(FocusableContext);\n const autoFocusRef = useEvent((element) => {\n if (!focusable) return;\n if (!autoFocus) return;\n if (!element) return;\n if (!autoFocusOnShow) return;\n queueMicrotask(() => {\n if (hasFocus(element)) return;\n if (!isFocusable(element)) return;\n element.focus();\n });\n });\n const tagName = useTagName(ref);\n const nativeTabbable = focusable && isNativeTabbable(tagName);\n const supportsDisabled = focusable && supportsDisabledAttribute(tagName);\n const styleProp = props.style;\n const style = useMemo(() => {\n if (trulyDisabled) {\n return __spreadValues({ pointerEvents: \"none\" }, styleProp);\n }\n return styleProp;\n }, [trulyDisabled, styleProp]);\n props = __spreadProps(__spreadValues({\n \"data-focus-visible\": focusable && focusVisible || void 0,\n \"data-autofocus\": autoFocus || void 0,\n \"aria-disabled\": disabled || void 0\n }, props), {\n ref: useMergeRefs(ref, autoFocusRef, props.ref),\n style,\n tabIndex: getTabIndex(\n focusable,\n trulyDisabled,\n nativeTabbable,\n supportsDisabled,\n props.tabIndex\n ),\n disabled: supportsDisabled && trulyDisabled ? true : void 0,\n // TODO: Test Focusable contentEditable.\n contentEditable: disabled ? void 0 : props.contentEditable,\n onKeyPressCapture,\n onClickCapture,\n onMouseDownCapture,\n onMouseDown,\n onKeyDownCapture,\n onFocusCapture,\n onBlur\n });\n return removeUndefinedValues(props);\n }\n);\nvar Focusable = forwardRef(function Focusable2(props) {\n const htmlProps = useFocusable(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n isSafariFocusAncestor,\n useFocusable,\n Focusable\n};\n","\"use client\";\nimport {\n findFirstEnabledItem,\n getEnabledItem,\n groupItemsByRows,\n isItem,\n silentlyFocused\n} from \"./5VQZOHHZ.js\";\nimport {\n CompositeContextProvider,\n useCompositeProviderContext\n} from \"./P7GR5CS5.js\";\nimport {\n useFocusable\n} from \"./LVA2YJMS.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n useBooleanEvent,\n useEvent,\n useMergeRefs,\n useSafeLayoutEffect,\n useTransactionState,\n useWrapElement\n} from \"./ABQUS43J.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/composite/composite.tsx\nimport { flatten2DArray, reverseArray } from \"@ariakit/core/utils/array\";\nimport { getActiveElement, isTextField } from \"@ariakit/core/utils/dom\";\nimport {\n fireBlurEvent,\n fireKeyboardEvent,\n isSelfTarget\n} from \"@ariakit/core/utils/events\";\nimport { focusIntoView, hasFocus } from \"@ariakit/core/utils/focus\";\nimport { invariant } from \"@ariakit/core/utils/misc\";\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"div\";\nfunction isGrid(items) {\n return items.some((item) => !!item.rowId);\n}\nfunction isPrintableKey(event) {\n const target = event.target;\n if (target && !isTextField(target)) return false;\n return event.key.length === 1 && !event.ctrlKey && !event.metaKey;\n}\nfunction isModifierKey(event) {\n return event.key === \"Shift\" || event.key === \"Control\" || event.key === \"Alt\" || event.key === \"Meta\";\n}\nfunction useKeyboardEventProxy(store, onKeyboardEvent, previousElementRef) {\n return useEvent((event) => {\n var _a;\n onKeyboardEvent == null ? void 0 : onKeyboardEvent(event);\n if (event.defaultPrevented) return;\n if (event.isPropagationStopped()) return;\n if (!isSelfTarget(event)) return;\n if (isModifierKey(event)) return;\n if (isPrintableKey(event)) return;\n const state = store.getState();\n const activeElement = (_a = getEnabledItem(store, state.activeId)) == null ? void 0 : _a.element;\n if (!activeElement) return;\n const _b = event, { view } = _b, eventInit = __objRest(_b, [\"view\"]);\n const previousElement = previousElementRef == null ? void 0 : previousElementRef.current;\n if (activeElement !== previousElement) {\n activeElement.focus();\n }\n if (!fireKeyboardEvent(activeElement, event.type, eventInit)) {\n event.preventDefault();\n }\n if (event.currentTarget.contains(activeElement)) {\n event.stopPropagation();\n }\n });\n}\nfunction findFirstEnabledItemInTheLastRow(items) {\n return findFirstEnabledItem(\n flatten2DArray(reverseArray(groupItemsByRows(items)))\n );\n}\nfunction useScheduleFocus(store) {\n const [scheduled, setScheduled] = useState(false);\n const schedule = useCallback(() => setScheduled(true), []);\n const activeItem = store.useState(\n (state) => getEnabledItem(store, state.activeId)\n );\n useEffect(() => {\n const activeElement = activeItem == null ? void 0 : activeItem.element;\n if (!scheduled) return;\n if (!activeElement) return;\n setScheduled(false);\n activeElement.focus({ preventScroll: true });\n }, [activeItem, scheduled]);\n return schedule;\n}\nvar useComposite = createHook(\n function useComposite2(_a) {\n var _b = _a, {\n store,\n composite = true,\n focusOnMove = composite,\n moveOnKeyPress = true\n } = _b, props = __objRest(_b, [\n \"store\",\n \"composite\",\n \"focusOnMove\",\n \"moveOnKeyPress\"\n ]);\n const context = useCompositeProviderContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"Composite must receive a `store` prop or be wrapped in a CompositeProvider component.\"\n );\n const ref = useRef(null);\n const previousElementRef = useRef(null);\n const scheduleFocus = useScheduleFocus(store);\n const moves = store.useState(\"moves\");\n const [, setBaseElement] = useTransactionState(\n composite ? store.setBaseElement : null\n );\n useEffect(() => {\n var _a2;\n if (!store) return;\n if (!moves) return;\n if (!composite) return;\n if (!focusOnMove) return;\n const { activeId: activeId2 } = store.getState();\n const itemElement = (_a2 = getEnabledItem(store, activeId2)) == null ? void 0 : _a2.element;\n if (!itemElement) return;\n focusIntoView(itemElement);\n }, [store, moves, composite, focusOnMove]);\n useSafeLayoutEffect(() => {\n if (!store) return;\n if (!moves) return;\n if (!composite) return;\n const { baseElement, activeId: activeId2 } = store.getState();\n const isSelfAcive = activeId2 === null;\n if (!isSelfAcive) return;\n if (!baseElement) return;\n const previousElement = previousElementRef.current;\n previousElementRef.current = null;\n if (previousElement) {\n fireBlurEvent(previousElement, { relatedTarget: baseElement });\n }\n if (!hasFocus(baseElement)) {\n baseElement.focus();\n }\n }, [store, moves, composite]);\n const activeId = store.useState(\"activeId\");\n const virtualFocus = store.useState(\"virtualFocus\");\n useSafeLayoutEffect(() => {\n var _a2;\n if (!store) return;\n if (!composite) return;\n if (!virtualFocus) return;\n const previousElement = previousElementRef.current;\n previousElementRef.current = null;\n if (!previousElement) return;\n const activeElement = (_a2 = getEnabledItem(store, activeId)) == null ? void 0 : _a2.element;\n const relatedTarget = activeElement || getActiveElement(previousElement);\n if (relatedTarget === previousElement) return;\n fireBlurEvent(previousElement, { relatedTarget });\n }, [store, activeId, virtualFocus, composite]);\n const onKeyDownCapture = useKeyboardEventProxy(\n store,\n props.onKeyDownCapture,\n previousElementRef\n );\n const onKeyUpCapture = useKeyboardEventProxy(\n store,\n props.onKeyUpCapture,\n previousElementRef\n );\n const onFocusCaptureProp = props.onFocusCapture;\n const onFocusCapture = useEvent((event) => {\n onFocusCaptureProp == null ? void 0 : onFocusCaptureProp(event);\n if (event.defaultPrevented) return;\n if (!store) return;\n const { virtualFocus: virtualFocus2 } = store.getState();\n if (!virtualFocus2) return;\n const previousActiveElement = event.relatedTarget;\n const isSilentlyFocused = silentlyFocused(event.currentTarget);\n if (isSelfTarget(event) && isSilentlyFocused) {\n event.stopPropagation();\n previousElementRef.current = previousActiveElement;\n }\n });\n const onFocusProp = props.onFocus;\n const onFocus = useEvent((event) => {\n onFocusProp == null ? void 0 : onFocusProp(event);\n if (event.defaultPrevented) return;\n if (!composite) return;\n if (!store) return;\n const { relatedTarget } = event;\n const { virtualFocus: virtualFocus2 } = store.getState();\n if (virtualFocus2) {\n if (isSelfTarget(event) && !isItem(store, relatedTarget)) {\n queueMicrotask(scheduleFocus);\n }\n } else if (isSelfTarget(event)) {\n store.setActiveId(null);\n }\n });\n const onBlurCaptureProp = props.onBlurCapture;\n const onBlurCapture = useEvent((event) => {\n var _a2;\n onBlurCaptureProp == null ? void 0 : onBlurCaptureProp(event);\n if (event.defaultPrevented) return;\n if (!store) return;\n const { virtualFocus: virtualFocus2, activeId: activeId2 } = store.getState();\n if (!virtualFocus2) return;\n const activeElement = (_a2 = getEnabledItem(store, activeId2)) == null ? void 0 : _a2.element;\n const nextActiveElement = event.relatedTarget;\n const nextActiveElementIsItem = isItem(store, nextActiveElement);\n const previousElement = previousElementRef.current;\n previousElementRef.current = null;\n if (isSelfTarget(event) && nextActiveElementIsItem) {\n if (nextActiveElement === activeElement) {\n if (previousElement && previousElement !== nextActiveElement) {\n fireBlurEvent(previousElement, event);\n }\n } else if (activeElement) {\n fireBlurEvent(activeElement, event);\n } else if (previousElement) {\n fireBlurEvent(previousElement, event);\n }\n event.stopPropagation();\n } else {\n const targetIsItem = isItem(store, event.target);\n if (!targetIsItem && activeElement) {\n fireBlurEvent(activeElement, event);\n }\n }\n });\n const onKeyDownProp = props.onKeyDown;\n const moveOnKeyPressProp = useBooleanEvent(moveOnKeyPress);\n const onKeyDown = useEvent((event) => {\n var _a2;\n onKeyDownProp == null ? void 0 : onKeyDownProp(event);\n if (event.defaultPrevented) return;\n if (!store) return;\n if (!isSelfTarget(event)) return;\n const { orientation, renderedItems, activeId: activeId2 } = store.getState();\n const activeItem = getEnabledItem(store, activeId2);\n if ((_a2 = activeItem == null ? void 0 : activeItem.element) == null ? void 0 : _a2.isConnected) return;\n const isVertical = orientation !== \"horizontal\";\n const isHorizontal = orientation !== \"vertical\";\n const grid = isGrid(renderedItems);\n const isHorizontalKey = event.key === \"ArrowLeft\" || event.key === \"ArrowRight\" || event.key === \"Home\" || event.key === \"End\";\n if (isHorizontalKey && isTextField(event.currentTarget)) return;\n const up = () => {\n if (grid) {\n const item = findFirstEnabledItemInTheLastRow(renderedItems);\n return item == null ? void 0 : item.id;\n }\n return store == null ? void 0 : store.last();\n };\n const keyMap = {\n ArrowUp: (grid || isVertical) && up,\n ArrowRight: (grid || isHorizontal) && store.first,\n ArrowDown: (grid || isVertical) && store.first,\n ArrowLeft: (grid || isHorizontal) && store.last,\n Home: store.first,\n End: store.last,\n PageUp: store.first,\n PageDown: store.last\n };\n const action = keyMap[event.key];\n if (action) {\n const id = action();\n if (id !== void 0) {\n if (!moveOnKeyPressProp(event)) return;\n event.preventDefault();\n store.move(id);\n }\n }\n });\n props = useWrapElement(\n props,\n (element) => /* @__PURE__ */ jsx(CompositeContextProvider, { value: store, children: element }),\n [store]\n );\n const activeDescendant = store.useState((state) => {\n var _a2;\n if (!store) return;\n if (!composite) return;\n if (!state.virtualFocus) return;\n return (_a2 = getEnabledItem(store, state.activeId)) == null ? void 0 : _a2.id;\n });\n props = __spreadProps(__spreadValues({\n \"aria-activedescendant\": activeDescendant\n }, props), {\n ref: useMergeRefs(ref, setBaseElement, props.ref),\n onKeyDownCapture,\n onKeyUpCapture,\n onFocusCapture,\n onFocus,\n onBlurCapture,\n onKeyDown\n });\n const focusable = store.useState(\n (state) => composite && (state.virtualFocus || state.activeId === null)\n );\n props = useFocusable(__spreadValues({ focusable }, props));\n return props;\n }\n);\nvar Composite = forwardRef(function Composite2(props) {\n const htmlProps = useComposite(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n useComposite,\n Composite\n};\n","/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { CompositeContextProps } from './types';\n\nexport const CompositeContext = createContext< CompositeContextProps >( {} );\n\nexport const useCompositeContext = () => useContext( CompositeContext );\n","\"use client\";\n\n// src/group/group-label-context.tsx\nimport { createContext } from \"react\";\nvar GroupLabelContext = createContext(void 0);\n\nexport {\n GroupLabelContext\n};\n","\"use client\";\nimport {\n GroupLabelContext\n} from \"./7HVFURXT.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n useWrapElement\n} from \"./ABQUS43J.js\";\nimport {\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/group/group.tsx\nimport { removeUndefinedValues } from \"@ariakit/core/utils/misc\";\nimport { useState } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"div\";\nvar useGroup = createHook(\n function useGroup2(props) {\n const [labelId, setLabelId] = useState();\n props = useWrapElement(\n props,\n (element) => /* @__PURE__ */ jsx(GroupLabelContext.Provider, { value: setLabelId, children: element }),\n []\n );\n props = __spreadValues({\n role: \"group\",\n \"aria-labelledby\": labelId\n }, props);\n return removeUndefinedValues(props);\n }\n);\nvar Group = forwardRef(function Group2(props) {\n const htmlProps = useGroup(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n useGroup,\n Group\n};\n","\"use client\";\nimport {\n useGroup\n} from \"./36LIF33V.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n __objRest\n} from \"./3YLGPPWQ.js\";\n\n// src/composite/composite-group.tsx\nvar TagName = \"div\";\nvar useCompositeGroup = createHook(\n function useCompositeGroup2(_a) {\n var _b = _a, { store } = _b, props = __objRest(_b, [\"store\"]);\n props = useGroup(props);\n return props;\n }\n);\nvar CompositeGroup = forwardRef(function CompositeGroup2(props) {\n const htmlProps = useCompositeGroup(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n useCompositeGroup,\n CompositeGroup\n};\n","/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { useCompositeContext } from './context';\nimport type { CompositeGroupProps } from './types';\n\nexport const CompositeGroup = forwardRef<\n\tHTMLDivElement,\n\tWordPressComponentProps< CompositeGroupProps, 'div', false >\n>( function CompositeGroup( props, ref ) {\n\tconst context = useCompositeContext();\n\n\t// @ts-expect-error The store prop is undocumented and only used by the\n\t// legacy compat layer. The `store` prop is documented, but its type is\n\t// obfuscated to discourage its use outside of the component's internals.\n\tconst store = ( props.store ?? context.store ) as Ariakit.CompositeStore;\n\n\treturn <Ariakit.CompositeGroup store={ store } { ...props } ref={ ref } />;\n} );\n","\"use client\";\nimport {\n GroupLabelContext\n} from \"./7HVFURXT.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n useId,\n useSafeLayoutEffect\n} from \"./ABQUS43J.js\";\nimport {\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/group/group-label.tsx\nimport { removeUndefinedValues } from \"@ariakit/core/utils/misc\";\nimport { useContext } from \"react\";\nvar TagName = \"div\";\nvar useGroupLabel = createHook(\n function useGroupLabel2(props) {\n const setLabelId = useContext(GroupLabelContext);\n const id = useId(props.id);\n useSafeLayoutEffect(() => {\n setLabelId == null ? void 0 : setLabelId(id);\n return () => setLabelId == null ? void 0 : setLabelId(void 0);\n }, [setLabelId, id]);\n props = __spreadValues({\n id,\n \"aria-hidden\": true\n }, props);\n return removeUndefinedValues(props);\n }\n);\nvar GroupLabel = forwardRef(function GroupLabel2(props) {\n const htmlProps = useGroupLabel(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n useGroupLabel,\n GroupLabel\n};\n","\"use client\";\nimport {\n useGroupLabel\n} from \"./YUOJWFSO.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n __objRest\n} from \"./3YLGPPWQ.js\";\n\n// src/composite/composite-group-label.tsx\nvar TagName = \"div\";\nvar useCompositeGroupLabel = createHook(function useCompositeGroupLabel2(_a) {\n var _b = _a, { store } = _b, props = __objRest(_b, [\"store\"]);\n props = useGroupLabel(props);\n return props;\n});\nvar CompositeGroupLabel = forwardRef(function CompositeGroupLabel2(props) {\n const htmlProps = useCompositeGroupLabel(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n useCompositeGroupLabel,\n CompositeGroupLabel\n};\n","/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { useCompositeContext } from './context';\nimport type { CompositeGroupLabelProps } from './types';\n\nexport const CompositeGroupLabel = forwardRef<\n\tHTMLDivElement,\n\tWordPressComponentProps< CompositeGroupLabelProps, 'div', false >\n>( function CompositeGroupLabel( props, ref ) {\n\tconst context = useCompositeContext();\n\n\t// @ts-expect-error The store prop is undocumented and only used by the\n\t// legacy compat layer. The `store` prop is documented, but its type is\n\t// obfuscated to discourage its use outside of the component's internals.\n\tconst store = ( props.store ?? context.store ) as Ariakit.CompositeStore;\n\n\treturn (\n\t\t<Ariakit.CompositeGroupLabel store={ store } { ...props } ref={ ref } />\n\t);\n} );\n","\"use client\";\nimport {\n useCompositeContext\n} from \"./P7GR5CS5.js\";\nimport {\n createElement,\n createHook,\n forwardRef,\n memo\n} from \"./LMDWO4NN.js\";\nimport {\n useBooleanEvent,\n useEvent,\n useIsMouseMoving,\n useMergeRefs\n} from \"./ABQUS43J.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/composite/composite-hover.tsx\nimport { contains } from \"@ariakit/core/utils/dom\";\nimport { hasFocus, hasFocusWithin } from \"@ariakit/core/utils/focus\";\nimport {\n hasOwnProperty,\n invariant,\n removeUndefinedValues\n} from \"@ariakit/core/utils/misc\";\nimport { useCallback } from \"react\";\nvar TagName = \"div\";\nfunction getMouseDestination(event) {\n const relatedTarget = event.relatedTarget;\n if ((relatedTarget == null ? void 0 : relatedTarget.nodeType) === Node.ELEMENT_NODE) {\n return relatedTarget;\n }\n return null;\n}\nfunction hoveringInside(event) {\n const nextElement = getMouseDestination(event);\n if (!nextElement) return false;\n return contains(event.currentTarget, nextElement);\n}\nvar symbol = Symbol(\"composite-hover\");\nfunction movingToAnotherItem(event) {\n let dest = getMouseDestination(event);\n if (!dest) return false;\n do {\n if (hasOwnProperty(dest, symbol) && dest[symbol]) return true;\n dest = dest.parentElement;\n } while (dest);\n return false;\n}\nvar useCompositeHover = createHook(\n function useCompositeHover2(_a) {\n var _b = _a, {\n store,\n focusOnHover = true,\n blurOnHoverEnd = !!focusOnHover\n } = _b, props = __objRest(_b, [\n \"store\",\n \"focusOnHover\",\n \"blurOnHoverEnd\"\n ]);\n const context = useCompositeContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"CompositeHover must be wrapped in a Composite component.\"\n );\n const isMouseMoving = useIsMouseMoving();\n const onMouseMoveProp = props.onMouseMove;\n const focusOnHoverProp = useBooleanEvent(focusOnHover);\n const onMouseMove = useEvent((event) => {\n onMouseMoveProp == null ? void 0 : onMouseMoveProp(event);\n if (event.defaultPrevented) return;\n if (!isMouseMoving()) return;\n if (!focusOnHoverProp(event)) return;\n if (!hasFocusWithin(event.currentTarget)) {\n const baseElement = store == null ? void 0 : store.getState().baseElement;\n if (baseElement && !hasFocus(baseElement)) {\n baseElement.focus();\n }\n }\n store == null ? void 0 : store.setActiveId(event.currentTarget.id);\n });\n const onMouseLeaveProp = props.onMouseLeave;\n const blurOnHoverEndProp = useBooleanEvent(blurOnHoverEnd);\n const onMouseLeave = useEvent((event) => {\n var _a2;\n onMouseLeaveProp == null ? void 0 : onMouseLeaveProp(event);\n if (event.defaultPrevented) return;\n if (!isMouseMoving()) return;\n if (hoveringInside(event)) return;\n if (movingToAnotherItem(event)) return;\n if (!focusOnHoverProp(event)) return;\n if (!blurOnHoverEndProp(event)) return;\n store == null ? void 0 : store.setActiveId(null);\n (_a2 = store == null ? void 0 : store.getState().baseElement) == null ? void 0 : _a2.focus();\n });\n const ref = useCallback((element) => {\n if (!element) return;\n element[symbol] = true;\n }, []);\n props = __spreadProps(__spreadValues({}, props), {\n ref: useMergeRefs(ref, props.ref),\n onMouseMove,\n onMouseLeave\n });\n return removeUndefinedValues(props);\n }\n);\nvar CompositeHover = memo(\n forwardRef(function CompositeHover2(props) {\n const htmlProps = useCompositeHover(props);\n return createElement(TagName, htmlProps);\n })\n);\n\nexport {\n useCompositeHover,\n CompositeHover\n};\n","/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { useCompositeContext } from './context';\nimport type { CompositeHoverProps } from './types';\n\nexport const CompositeHover = forwardRef<\n\tHTMLDivElement,\n\tWordPressComponentProps< CompositeHoverProps, 'div', false >\n>( function CompositeHover( props, ref ) {\n\tconst context = useCompositeContext();\n\n\t// @ts-expect-error The store prop is undocumented and only used by the\n\t// legacy compat layer. The `store` prop is documented, but its type is\n\t// obfuscated to discourage its use outside of the component's internals.\n\tconst store = ( props.store ?? context.store ) as Ariakit.CompositeStore;\n\n\treturn <Ariakit.CompositeHover store={ store } { ...props } ref={ ref } />;\n} );\n","\"use client\";\nimport {\n useCollectionContext\n} from \"./VDHZ5F7K.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n useId,\n useMergeRefs\n} from \"./ABQUS43J.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/collection/collection-item.tsx\nimport { identity, removeUndefinedValues } from \"@ariakit/core/utils/misc\";\nimport { useEffect, useRef } from \"react\";\nvar TagName = \"div\";\nvar useCollectionItem = createHook(\n function useCollectionItem2(_a) {\n var _b = _a, {\n store,\n shouldRegisterItem = true,\n getItem = identity,\n element: element\n } = _b, props = __objRest(_b, [\n \"store\",\n \"shouldRegisterItem\",\n \"getItem\",\n // @ts-expect-error This prop may come from a collection renderer.\n \"element\"\n ]);\n const context = useCollectionContext();\n store = store || context;\n const id = useId(props.id);\n const ref = useRef(element);\n useEffect(() => {\n const element2 = ref.current;\n if (!id) return;\n if (!element2) return;\n if (!shouldRegisterItem) return;\n const item = getItem({ id, element: element2 });\n return store == null ? void 0 : store.renderItem(item);\n }, [id, shouldRegisterItem, getItem, store]);\n props = __spreadProps(__spreadValues({}, props), {\n ref: useMergeRefs(ref, props.ref)\n });\n return removeUndefinedValues(props);\n }\n);\nvar CollectionItem = forwardRef(function CollectionItem2(props) {\n const htmlProps = useCollectionItem(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n useCollectionItem,\n CollectionItem\n};\n","\"use client\";\nimport {\n useFocusable\n} from \"./LVA2YJMS.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n useEvent,\n useMergeRefs,\n useMetadataProps\n} from \"./ABQUS43J.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/command/command.tsx\nimport { isButton, isTextField } from \"@ariakit/core/utils/dom\";\nimport {\n fireClickEvent,\n isSelfTarget,\n queueBeforeEvent\n} from \"@ariakit/core/utils/events\";\nimport { disabledFromProps } from \"@ariakit/core/utils/misc\";\nimport { isFirefox } from \"@ariakit/core/utils/platform\";\nimport { useEffect, useRef, useState } from \"react\";\nvar TagName = \"button\";\nfunction isNativeClick(event) {\n if (!event.isTrusted) return false;\n const element = event.currentTarget;\n if (event.key === \"Enter\") {\n return isButton(element) || element.tagName === \"SUMMARY\" || element.tagName === \"A\";\n }\n if (event.key === \" \") {\n return isButton(element) || element.tagName === \"SUMMARY\" || element.tagName === \"INPUT\" || element.tagName === \"SELECT\";\n }\n return false;\n}\nvar symbol = Symbol(\"command\");\nvar useCommand = createHook(\n function useCommand2(_a) {\n var _b = _a, { clickOnEnter = true, clickOnSpace = true } = _b, props = __objRest(_b, [\"clickOnEnter\", \"clickOnSpace\"]);\n const ref = useRef(null);\n const [isNativeButton, setIsNativeButton] = useState(false);\n useEffect(() => {\n if (!ref.current) return;\n setIsNativeButton(isButton(ref.current));\n }, []);\n const [active, setActive] = useState(false);\n const activeRef = useRef(false);\n const disabled = disabledFromProps(props);\n const [isDuplicate, metadataProps] = useMetadataProps(props, symbol, true);\n const onKeyDownProp = props.onKeyDown;\n const onKeyDown = useEvent((event) => {\n onKeyDownProp == null ? void 0 : onKeyDownProp(event);\n const element = event.currentTarget;\n if (event.defaultPrevented) return;\n if (isDuplicate) return;\n if (disabled) return;\n if (!isSelfTarget(event)) return;\n if (isTextField(element)) return;\n if (element.isContentEditable) return;\n const isEnter = clickOnEnter && event.key === \"Enter\";\n const isSpace = clickOnSpace && event.key === \" \";\n const shouldPreventEnter = event.key === \"Enter\" && !clickOnEnter;\n const shouldPreventSpace = event.key === \" \" && !clickOnSpace;\n if (shouldPreventEnter || shouldPreventSpace) {\n event.preventDefault();\n return;\n }\n if (isEnter || isSpace) {\n const nativeClick = isNativeClick(event);\n if (isEnter) {\n if (!nativeClick) {\n event.preventDefault();\n const _a2 = event, { view } = _a2, eventInit = __objRest(_a2, [\"view\"]);\n const click = () => fireClickEvent(element, eventInit);\n if (isFirefox()) {\n queueBeforeEvent(element, \"keyup\", click);\n } else {\n queueMicrotask(click);\n }\n }\n } else if (isSpace) {\n activeRef.current = true;\n if (!nativeClick) {\n event.preventDefault();\n setActive(true);\n }\n }\n }\n });\n const onKeyUpProp = props.onKeyUp;\n const onKeyUp = useEvent((event) => {\n onKeyUpProp == null ? void 0 : onKeyUpProp(event);\n if (event.defaultPrevented) return;\n if (isDuplicate) return;\n if (disabled) return;\n if (event.metaKey) return;\n const isSpace = clickOnSpace && event.key === \" \";\n if (activeRef.current && isSpace) {\n activeRef.current = false;\n if (!isNativeClick(event)) {\n event.preventDefault();\n setActive(false);\n const element = event.currentTarget;\n const _a2 = event, { view } = _a2, eventInit = __objRest(_a2, [\"view\"]);\n queueMicrotask(() => fireClickEvent(element, eventInit));\n }\n }\n });\n props = __spreadProps(__spreadValues(__spreadValues({\n \"data-active\": active || void 0,\n type: isNativeButton ? \"button\" : void 0\n }, metadataProps), props), {\n ref: useMergeRefs(ref, props.ref),\n onKeyDown,\n onKeyUp\n });\n props = useFocusable(props);\n return props;\n }\n);\nvar Command = forwardRef(function Command2(props) {\n const htmlProps = useCommand(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n useCommand,\n Command\n};\n","\"use client\";\nimport {\n useCollectionItem\n} from \"./RZ4GPYOB.js\";\nimport {\n useCommand\n} from \"./KUU7WJ55.js\";\nimport {\n focusSilently,\n getEnabledItem,\n isItem,\n selectTextField\n} from \"./5VQZOHHZ.js\";\nimport {\n CompositeItemContext,\n CompositeRowContext,\n useCompositeContext\n} from \"./P7GR5CS5.js\";\nimport {\n createElement,\n createHook,\n forwardRef,\n memo\n} from \"./LMDWO4NN.js\";\nimport {\n useStoreStateObject\n} from \"./YV4JVR4I.js\";\nimport {\n useBooleanEvent,\n useEvent,\n useId,\n useMergeRefs,\n useWrapElement\n} from \"./ABQUS43J.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/composite/composite-item.tsx\nimport {\n getScrollingElement,\n getTextboxSelection,\n getTextboxValue,\n isButton,\n isTextField,\n isTextbox\n} from \"@ariakit/core/utils/dom\";\nimport { isPortalEvent, isSelfTarget } from \"@ariakit/core/utils/events\";\nimport {\n disabledFromProps,\n removeUndefinedValues\n} from \"@ariakit/core/utils/misc\";\nimport { isSafari } from \"@ariakit/core/utils/platform\";\nimport { useCallback, useContext, useMemo, useRef } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"button\";\nfunction isEditableElement(element) {\n if (isTextbox(element)) return true;\n return element.tagName === \"INPUT\" && !isButton(element);\n}\nfunction getNextPageOffset(scrollingElement, pageUp = false) {\n const height = scrollingElement.clientHeight;\n const { top } = scrollingElement.getBoundingClientRect();\n const pageSize = Math.max(height * 0.875, height - 40) * 1.5;\n const pageOffset = pageUp ? height - pageSize + top : pageSize + top;\n if (scrollingElement.tagName === \"HTML\") {\n return pageOffset + scrollingElement.scrollTop;\n }\n return pageOffset;\n}\nfunction getItemOffset(itemElement, pageUp = false) {\n const { top } = itemElement.getBoundingClientRect();\n if (pageUp) {\n return top + itemElement.clientHeight;\n }\n return top;\n}\nfunction findNextPageItemId(element, store, next, pageUp = false) {\n var _a;\n if (!store) return;\n if (!next) return;\n const { renderedItems } = store.getState();\n const scrollingElement = getScrollingElement(element);\n if (!scrollingElement) return;\n const nextPageOffset = getNextPageOffset(scrollingElement, pageUp);\n let id;\n let prevDifference;\n for (let i = 0; i < renderedItems.length; i += 1) {\n const previousId = id;\n id = next(i);\n if (!id) break;\n if (id === previousId) continue;\n const itemElement = (_a = getEnabledItem(store, id)) == null ? void 0 : _a.element;\n if (!itemElement) continue;\n const itemOffset = getItemOffset(itemElement, pageUp);\n const difference = itemOffset - nextPageOffset;\n const absDifference = Math.abs(difference);\n if (pageUp && difference <= 0 || !pageUp && difference >= 0) {\n if (prevDifference !== void 0 && prevDifference < absDifference) {\n id = previousId;\n }\n break;\n }\n prevDifference = absDifference;\n }\n return id;\n}\nfunction targetIsAnotherItem(event, store) {\n if (isSelfTarget(event)) return false;\n return isItem(store, event.target);\n}\nvar useCompositeItem = createHook(\n function useCompositeItem2(_a) {\n var _b = _a, {\n store,\n rowId: rowIdProp,\n preventScrollOnKeyDown = false,\n moveOnKeyPress = true,\n tabbable = false,\n getItem: getItemProp,\n \"aria-setsize\": ariaSetSizeProp,\n \"aria-posinset\": ariaPosInSetProp\n } = _b, props = __objRest(_b, [\n \"store\",\n \"rowId\",\n \"preventScrollOnKeyDown\",\n \"moveOnKeyPress\",\n \"tabbable\",\n \"getItem\",\n \"aria-setsize\",\n \"aria-posinset\"\n ]);\n const context = useCompositeContext();\n store = store || context;\n const id = useId(props.id);\n const ref = useRef(null);\n const row = useContext(CompositeRowContext);\n const disabled = disabledFromProps(props);\n const trulyDisabled = disabled && !props.accessibleWhenDisabled;\n const {\n rowId,\n baseElement,\n isActiveItem,\n ariaSetSize,\n ariaPosInSet,\n isTabbable\n } = useStoreStateObject(store, {\n rowId(state) {\n if (rowIdProp) return rowIdProp;\n if (!state) return;\n if (!(row == null ? void 0 : row.baseElement)) return;\n if (row.baseElement !== state.baseElement) return;\n return row.id;\n },\n baseElement(state) {\n return (state == null ? void 0 : state.baseElement) || void 0;\n },\n isActiveItem(state) {\n return !!state && state.activeId === id;\n },\n ariaSetSize(state) {\n if (ariaSetSizeProp != null) return ariaSetSizeProp;\n if (!state) return;\n if (!(row == null ? void 0 : row.ariaSetSize)) return;\n if (row.baseElement !== state.baseElement) return;\n return row.ariaSetSize;\n },\n ariaPosInSet(state) {\n if (ariaPosInSetProp != null) return ariaPosInSetProp;\n if (!state) return;\n if (!(row == null ? void 0 : row.ariaPosInSet)) return;\n if (row.baseElement !== state.baseElement) return;\n const itemsInRow = state.renderedItems.filter(\n (item) => item.rowId === rowId\n );\n return row.ariaPosInSet + itemsInRow.findIndex((item) => item.id === id);\n },\n isTabbable(state) {\n if (!(state == null ? void 0 : state.renderedItems.length)) return true;\n if (state.virtualFocus) return false;\n if (tabbable) return true;\n if (state.activeId === null) return false;\n const item = store == null ? void 0 : store.item(state.activeId);\n if (item == null ? void 0 : item.disabled) return true;\n if (!(item == null ? void 0 : item.element)) return true;\n return state.activeId === id;\n }\n });\n const getItem = useCallback(\n (item) => {\n var _a2;\n const nextItem = __spreadProps(__spreadValues({}, item), {\n id: id || item.id,\n rowId,\n disabled: !!trulyDisabled,\n children: (_a2 = item.element) == null ? void 0 : _a2.textContent\n });\n if (getItemProp) {\n return getItemProp(nextItem);\n }\n return nextItem;\n },\n [id, rowId, trulyDisabled, getItemProp]\n );\n const onFocusProp = props.onFocus;\n const hasFocusedComposite = useRef(false);\n const onFocus = useEvent((event) => {\n onFocusProp == null ? void 0 : onFocusProp(event);\n if (event.defaultPrevented) return;\n if (isPortalEvent(event)) return;\n if (!id) return;\n if (!store) return;\n if (targetIsAnotherItem(event, store)) return;\n const { virtualFocus, baseElement: baseElement2 } = store.getState();\n store.setActiveId(id);\n if (isTextbox(event.currentTarget)) {\n selectTextField(event.currentTarget);\n }\n if (!virtualFocus) return;\n if (!isSelfTarget(event)) return;\n if (isEditableElement(event.currentTarget)) return;\n if (!(baseElement2 == null ? void 0 : baseElement2.isConnected)) return;\n if (isSafari() && event.currentTarget.hasAttribute(\"data-autofocus\")) {\n event.currentTarget.scrollIntoView({\n block: \"nearest\",\n inline: \"nearest\"\n });\n }\n hasFocusedComposite.current = true;\n const fromComposite = event.relatedTarget === baseElement2 || isItem(store, event.relatedTarget);\n if (fromComposite) {\n focusSilently(baseElement2);\n } else {\n baseElement2.focus();\n }\n });\n const onBlurCaptureProp = props.onBlurCapture;\n const onBlurCapture = useEvent((event) => {\n onBlurCaptureProp == null ? void 0 : onBlurCaptureProp(event);\n if (event.defaultPrevented) return;\n const state = store == null ? void 0 : store.getState();\n if ((state == null ? void 0 : state.virtualFocus) && hasFocusedComposite.current) {\n hasFocusedComposite.current = false;\n event.preventDefault();\n event.stopPropagation();\n }\n });\n const onKeyDownProp = props.onKeyDown;\n const preventScrollOnKeyDownProp = useBooleanEvent(preventScrollOnKeyDown);\n const moveOnKeyPressProp = useBooleanEvent(moveOnKeyPress);\n const onKeyDown = useEvent((event) => {\n onKeyDownProp == null ? void 0 : onKeyDownProp(event);\n if (event.defaultPrevented) return;\n if (!isSelfTarget(event)) return;\n if (!store) return;\n const { currentTarget } = event;\n const state = store.getState();\n const item = store.item(id);\n const isGrid = !!(item == null ? void 0 : item.rowId);\n const isVertical = state.orientation !== \"horizontal\";\n const isHorizontal = state.orientation !== \"vertical\";\n const canHomeEnd = () => {\n if (isGrid) return true;\n if (isHorizontal) return true;\n if (!state.baseElement) return true;\n if (!isTextField(state.baseElement)) return true;\n return false;\n };\n const keyMap = {\n ArrowUp: (isGrid || isVertical) && store.up,\n ArrowRight: (isGrid || isHorizontal) && store.next,\n ArrowDown: (isGrid || isVertical) && store.down,\n ArrowLeft: (isGrid || isHorizontal) && store.previous,\n Home: () => {\n if (!canHomeEnd()) return;\n if (!isGrid || event.ctrlKey) {\n return store == null ? void 0 : store.first();\n }\n return store == null ? void 0 : store.previous(-1);\n },\n End: () => {\n if (!canHomeEnd()) return;\n if (!isGrid || event.ctrlKey) {\n return store == null ? void 0 : store.last();\n }\n return store == null ? void 0 : store.next(-1);\n },\n PageUp: () => {\n return findNextPageItemId(currentTarget, store, store == null ? void 0 : store.up, true);\n },\n PageDown: () => {\n return findNextPageItemId(currentTarget, store, store == null ? void 0 : store.down);\n }\n };\n const action = keyMap[event.key];\n if (action) {\n if (isTextbox(currentTarget)) {\n const selection = getTextboxSelection(currentTarget);\n const isLeft = isHorizontal && event.key === \"ArrowLeft\";\n const isRight = isHorizontal && event.key === \"ArrowRight\";\n const isUp = isVertical && event.key === \"ArrowUp\";\n const isDown = isVertical && event.key === \"ArrowDown\";\n if (isRight || isDown) {\n const { length: valueLength } = getTextboxValue(currentTarget);\n if (selection.end !== valueLength) return;\n } else if ((isLeft || isUp) && selection.start !== 0) return;\n }\n const nextId = action();\n if (preventScrollOnKeyDownProp(event) || nextId !== void 0) {\n if (!moveOnKeyPressProp(event)) return;\n event.preventDefault();\n store.move(nextId);\n }\n }\n });\n const providerValue = useMemo(\n () => ({ id, baseElement }),\n [id, baseElement]\n );\n props = useWrapElement(\n props,\n (element) => /* @__PURE__ */ jsx(CompositeItemContext.Provider, { value: providerValue, children: element }),\n [providerValue]\n );\n props = __spreadProps(__spreadValues({\n id,\n \"data-active-item\": isActiveItem || void 0\n }, props), {\n ref: useMergeRefs(ref, props.ref),\n tabIndex: isTabbable ? props.tabIndex : -1,\n onFocus,\n onBlurCapture,\n onKeyDown\n });\n props = useCommand(props);\n props = useCollectionItem(__spreadProps(__spreadValues({\n store\n }, props), {\n getItem,\n shouldRegisterItem: id ? props.shouldRegisterItem : false\n }));\n return removeUndefinedValues(__spreadProps(__spreadValues({}, props), {\n \"aria-setsize\": ariaSetSize,\n \"aria-posinset\": ariaPosInSet\n }));\n }\n);\nvar CompositeItem = memo(\n forwardRef(function CompositeItem2(props) {\n const htmlProps = useCompositeItem(props);\n return createElement(TagName, htmlProps);\n })\n);\n\nexport {\n useCompositeItem,\n CompositeItem\n};\n","/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { useCompositeContext } from './context';\nimport type { CompositeItemProps } from './types';\n\nexport const CompositeItem = forwardRef<\n\tHTMLButtonElement,\n\tWordPressComponentProps< CompositeItemProps, 'button', false >\n>( function CompositeItem( props, ref ) {\n\tconst context = useCompositeContext();\n\n\t// @ts-expect-error The store prop is undocumented and only used by the\n\t// legacy compat layer. The `store` prop is documented, but its type is\n\t// obfuscated to discourage its use outside of the component's internals.\n\tconst store = ( props.store ?? context.store ) as Ariakit.CompositeStore;\n\n\treturn <Ariakit.CompositeItem store={ store } { ...props } ref={ ref } />;\n} );\n","\"use client\";\nimport {\n CompositeRowContext,\n useCompositeContext\n} from \"./P7GR5CS5.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n useId,\n useWrapElement\n} from \"./ABQUS43J.js\";\nimport {\n __objRest,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/composite/composite-row.tsx\nimport { invariant, removeUndefinedValues } from \"@ariakit/core/utils/misc\";\nimport { useMemo } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"div\";\nvar useCompositeRow = createHook(\n function useCompositeRow2(_a) {\n var _b = _a, {\n store,\n \"aria-setsize\": ariaSetSize,\n \"aria-posinset\": ariaPosInSet\n } = _b, props = __objRest(_b, [\n \"store\",\n \"aria-setsize\",\n \"aria-posinset\"\n ]);\n const context = useCompositeContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"CompositeRow must be wrapped in a Composite component.\"\n );\n const id = useId(props.id);\n const baseElement = store.useState(\n (state) => state.baseElement || void 0\n );\n const providerValue = useMemo(\n () => ({ id, baseElement, ariaSetSize, ariaPosInSet }),\n [id, baseElement, ariaSetSize, ariaPosInSet]\n );\n props = useWrapElement(\n props,\n (element) => /* @__PURE__ */ jsx(CompositeRowContext.Provider, { value: providerValue, children: element }),\n [providerValue]\n );\n props = __spreadValues({ id }, props);\n return removeUndefinedValues(props);\n }\n);\nvar CompositeRow = forwardRef(function CompositeRow2(props) {\n const htmlProps = useCompositeRow(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n useCompositeRow,\n CompositeRow\n};\n","/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { useCompositeContext } from './context';\nimport type { CompositeRowProps } from './types';\n\nexport const CompositeRow = forwardRef<\n\tHTMLDivElement,\n\tWordPressComponentProps< CompositeRowProps, 'div', false >\n>( function CompositeRow( props, ref ) {\n\tconst context = useCompositeContext();\n\n\t// @ts-expect-error The store prop is undocumented and only used by the\n\t// legacy compat layer. The `store` prop is documented, but its type is\n\t// obfuscated to discourage its use outside of the component's internals.\n\tconst store = ( props.store ?? context.store ) as Ariakit.CompositeStore;\n\n\treturn <Ariakit.CompositeRow store={ store } { ...props } ref={ ref } />;\n} );\n","\"use client\";\nimport {\n flipItems\n} from \"./5VQZOHHZ.js\";\nimport {\n useCompositeContext\n} from \"./P7GR5CS5.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n useEvent\n} from \"./ABQUS43J.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/composite/composite-typeahead.tsx\nimport {\n getDocument,\n isTextField,\n sortBasedOnDOMPosition\n} from \"@ariakit/core/utils/dom\";\nimport { isSelfTarget } from \"@ariakit/core/utils/events\";\nimport {\n invariant,\n normalizeString,\n removeUndefinedValues\n} from \"@ariakit/core/utils/misc\";\nimport { useRef } from \"react\";\nvar TagName = \"div\";\nvar chars = \"\";\nfunction clearChars() {\n chars = \"\";\n}\nfunction isValidTypeaheadEvent(event) {\n const target = event.target;\n if (target && isTextField(target)) return false;\n if (event.key === \" \" && chars.length) return true;\n return event.key.length === 1 && !event.ctrlKey && !event.altKey && !event.metaKey && /^[\\p{Letter}\\p{Number}]$/u.test(event.key);\n}\nfunction isSelfTargetOrItem(event, items) {\n if (isSelfTarget(event)) return true;\n const target = event.target;\n if (!target) return false;\n const isItem = items.some((item) => item.element === target);\n return isItem;\n}\nfunction getEnabledItems(items) {\n return items.filter((item) => !item.disabled);\n}\nfunction itemTextStartsWith(item, text) {\n var _a;\n const itemText = ((_a = item.element) == null ? void 0 : _a.textContent) || item.children || // The composite item object itself doesn't include a value property, but\n // other components like Select do. Since CompositeTypeahead is a generic\n // component that can be used with those as well, we also consider the value\n // property as a fallback for the typeahead text content.\n \"value\" in item && item.value;\n if (!itemText) return false;\n return normalizeString(itemText).trim().toLowerCase().startsWith(text.toLowerCase());\n}\nfunction getSameInitialItems(items, char, activeId) {\n if (!activeId) return items;\n const activeItem = items.find((item) => item.id === activeId);\n if (!activeItem) return items;\n if (!itemTextStartsWith(activeItem, char)) return items;\n if (chars !== char && itemTextStartsWith(activeItem, chars)) return items;\n chars = char;\n return flipItems(\n items.filter((item) => itemTextStartsWith(item, chars)),\n activeId\n ).filter((item) => item.id !== activeId);\n}\nvar useCompositeTypeahead = createHook(function useCompositeTypeahead2(_a) {\n var _b = _a, { store, typeahead = true } = _b, props = __objRest(_b, [\"store\", \"typeahead\"]);\n const context = useCompositeContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"CompositeTypeahead must be a Composite component\"\n );\n const onKeyDownCaptureProp = props.onKeyDownCapture;\n const cleanupTimeoutRef = useRef(0);\n const onKeyDownCapture = useEvent((event) => {\n onKeyDownCaptureProp == null ? void 0 : onKeyDownCaptureProp(event);\n if (event.defaultPrevented) return;\n if (!typeahead) return;\n if (!store) return;\n if (!isValidTypeaheadEvent(event)) {\n return clearChars();\n }\n const { renderedItems, items, activeId, id } = store.getState();\n let enabledItems = getEnabledItems(\n items.length > renderedItems.length ? items : renderedItems\n );\n const document = getDocument(event.currentTarget);\n const selector = `[data-offscreen-id=\"${id}\"]`;\n const offscreenItems = document.querySelectorAll(selector);\n for (const element of offscreenItems) {\n const disabled = element.ariaDisabled === \"true\" || \"disabled\" in element && !!element.disabled;\n enabledItems.push({ id: element.id, element, disabled });\n }\n if (offscreenItems.length) {\n enabledItems = sortBasedOnDOMPosition(enabledItems, (i) => i.element);\n }\n if (!isSelfTargetOrItem(event, enabledItems)) return clearChars();\n event.preventDefault();\n window.clearTimeout(cleanupTimeoutRef.current);\n cleanupTimeoutRef.current = window.setTimeout(() => {\n chars = \"\";\n }, 500);\n const char = event.key.toLowerCase();\n chars += char;\n enabledItems = getSameInitialItems(enabledItems, char, activeId);\n const item = enabledItems.find((item2) => itemTextStartsWith(item2, chars));\n if (item) {\n store.move(item.id);\n } else {\n clearChars();\n }\n });\n props = __spreadProps(__spreadValues({}, props), {\n onKeyDownCapture\n });\n return removeUndefinedValues(props);\n});\nvar CompositeTypeahead = forwardRef(function CompositeTypeahead2(props) {\n const htmlProps = useCompositeTypeahead(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n useCompositeTypeahead,\n CompositeTypeahead\n};\n","/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { useCompositeContext } from './context';\nimport type { CompositeTypeaheadProps } from './types';\n\nexport const CompositeTypeahead = forwardRef<\n\tHTMLDivElement,\n\tWordPressComponentProps< CompositeTypeaheadProps, 'div', false >\n>( function CompositeTypeahead( props, ref ) {\n\tconst context = useCompositeContext();\n\n\t// @ts-expect-error The store prop is undocumented and only used by the\n\t// legacy compat layer. The `store` prop is documented, but its type is\n\t// obfuscated to discourage its use outside of the component's internals.\n\tconst store = ( props.store ?? context.store ) as Ariakit.CompositeStore;\n\n\treturn (\n\t\t<Ariakit.CompositeTypeahead store={ store } { ...props } ref={ ref } />\n\t);\n} );\n","/**\n * Composite is a component that may contain navigable items represented by\n * Composite.Item. It's inspired by the WAI-ARIA Composite Role and implements\n * all the keyboard navigation mechanisms to ensure that there's only one\n * tab stop for the whole Composite element. This means that it can behave as\n * a roving tabindex or aria-activedescendant container.\n *\n * @see https://ariakit.org/components/composite\n */\n\n/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { isRTL } from '@wordpress/i18n';\nimport { useMemo, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { CompositeContext } from './context';\nimport { CompositeGroup } from './group';\nimport { CompositeGroupLabel } from './group-label';\nimport { CompositeHover } from './hover';\nimport { CompositeItem } from './item';\nimport { CompositeRow } from './row';\nimport { CompositeTypeahead } from './typeahead';\nimport type { CompositeProps } from './types';\n\n/**\n * Renders a widget based on the WAI-ARIA [`composite`](https://w3c.github.io/aria/#composite)\n * role, which provides a single tab stop on the page and arrow key navigation\n * through the focusable descendants.\n *\n * @example\n * ```jsx\n * import { Composite } from '@wordpress/components';\n *\n * <Composite>\n * <Composite.Item>Item 1</Composite.Item>\n * <Composite.Item>Item 2</Composite.Item>\n * </Composite>\n * ```\n */\nexport const Composite = Object.assign(\n\tforwardRef<\n\t\tHTMLDivElement,\n\t\tWordPressComponentProps< CompositeProps, 'div', false >\n\t>( function Composite(\n\t\t{\n\t\t\t// Composite store props\n\t\t\tactiveId,\n\t\t\tdefaultActiveId,\n\t\t\tsetActiveId,\n\t\t\tfocusLoop = false,\n\t\t\tfocusWrap = false,\n\t\t\tfocusShift = false,\n\t\t\tvirtualFocus = false,\n\t\t\torientation = 'both',\n\t\t\trtl = isRTL(),\n\n\t\t\t// Composite component props\n\t\t\tchildren,\n\t\t\tdisabled = false,\n\n\t\t\t// Rest props\n\t\t\t...props\n\t\t},\n\t\tref\n\t) {\n\t\t// @ts-expect-error The store prop is undocumented and only used by the\n\t\t// legacy compat layer.\n\t\tconst storeProp = props.store as Ariakit.CompositeStore;\n\t\tconst internalStore = Ariakit.useCompositeStore( {\n\t\t\tactiveId,\n\t\t\tdefaultActiveId,\n\t\t\tsetActiveId,\n\t\t\tfocusLoop,\n\t\t\tfocusWrap,\n\t\t\tfocusShift,\n\t\t\tvirtualFocus,\n\t\t\torientation,\n\t\t\trtl,\n\t\t} );\n\n\t\tconst store = storeProp ?? internalStore;\n\n\t\tconst contextValue = useMemo(\n\t\t\t() => ( {\n\t\t\t\tstore,\n\t\t\t} ),\n\t\t\t[ store ]\n\t\t);\n\n\t\treturn (\n\t\t\t<Ariakit.Composite\n\t\t\t\tdisabled={ disabled }\n\t\t\t\tstore={ store }\n\t\t\t\t{ ...props }\n\t\t\t\tref={ ref }\n\t\t\t>\n\t\t\t\t<CompositeContext.Provider value={ contextValue }>\n\t\t\t\t\t{ children }\n\t\t\t\t</CompositeContext.Provider>\n\t\t\t</Ariakit.Composite>\n\t\t);\n\t} ),\n\t{\n\t\t/**\n\t\t * Renders a group element for composite items.\n\t\t *\n\t\t * @example\n\t\t * ```jsx\n\t\t * import { Composite } from '@wordpress/components';\n\t\t *\n\t\t * <Composite>\n\t\t * <Composite.Group>\n\t\t * <Composite.GroupLabel>Label</Composite.GroupLabel>\n\t\t * <Composite.Item>Item 1</Composite.Item>\n\t\t * <Composite.Item>Item 2</Composite.Item>\n\t\t * </CompositeGroup>\n\t\t * </Composite>\n\t\t * ```\n\t\t */\n\t\tGroup: Object.assign( CompositeGroup, {\n\t\t\tdisplayName: 'Composite.Group',\n\t\t} ),\n\t\t/**\n\t\t * Renders a label in a composite group. This component must be wrapped with\n\t\t * `Composite.Group` so the `aria-labelledby` prop is properly set on the\n\t\t * composite group element.\n\t\t *\n\t\t * @example\n\t\t * ```jsx\n\t\t * import { Composite } from '@wordpress/components';\n\t\t *\n\t\t * <Composite>\n\t\t * <Composite.Group>\n\t\t * <Composite.GroupLabel>Label</Composite.GroupLabel>\n\t\t * <Composite.Item>Item 1</Composite.Item>\n\t\t * <Composite.Item>Item 2</Composite.Item>\n\t\t * </CompositeGroup>\n\t\t * </Composite>\n\t\t * ```\n\t\t */\n\t\tGroupLabel: Object.assign( CompositeGroupLabel, {\n\t\t\tdisplayName: 'Composite.GroupLabel',\n\t\t} ),\n\t\t/**\n\t\t * Renders a composite item.\n\t\t *\n\t\t * @example\n\t\t * ```jsx\n\t\t * import { Composite } from '@wordpress/components';\n\t\t *\n\t\t * <Composite>\n\t\t * <Composite.Item>Item 1</Composite.Item>\n\t\t * <Composite.Item>Item 2</Composite.Item>\n\t\t * <Composite.Item>Item 3</Composite.Item>\n\t\t * </Composite>\n\t\t * ```\n\t\t */\n\t\tItem: Object.assign( CompositeItem, { displayName: 'Composite.Item' } ),\n\t\t/**\n\t\t * Renders a composite row. Wrapping `Composite.Item` elements within\n\t\t * `Composite.Row` will create a two-dimensional composite widget, such as a\n\t\t * grid.\n\t\t *\n\t\t * @example\n\t\t * ```jsx\n\t\t * import { Composite } from '@wordpress/components';\n\t\t *\n\t\t * <Composite>\n\t\t * <Composite.Row>\n\t\t * <Composite.Item>Item 1.1</Composite.Item>\n\t\t * <Composite.Item>Item 1.2</Composite.Item>\n\t\t * <Composite.Item>Item 1.3</Composite.Item>\n\t\t * </Composite.Row>\n\t\t * <Composite.Row>\n\t\t * <Composite.Item>Item 2.1</Composite.Item>\n\t\t * <Composite.Item>Item 2.2</Composite.Item>\n\t\t * <Composite.Item>Item 2.3</Composite.Item>\n\t\t * </Composite.Row>\n\t\t * </Composite>\n\t\t * ```\n\t\t */\n\t\tRow: Object.assign( CompositeRow, { displayName: 'Composite.Row' } ),\n\t\t/**\n\t\t * Renders an element in a composite widget that receives focus on mouse move\n\t\t * and loses focus to the composite base element on mouse leave. This should\n\t\t * be combined with the `Composite.Item` component.\n\t\t *\n\t\t * @example\n\t\t * ```jsx\n\t\t * import { Composite } from '@wordpress/components';\n\t\t *\n\t\t * <Composite>\n\t\t * <Composite.Hover render={ <Composite.Item /> }>\n\t\t * Item 1\n\t\t * </Composite.Hover>\n\t\t * <Composite.Hover render={ <Composite.Item /> }>\n\t\t * Item 2\n\t\t * </Composite.Hover>\n\t\t * </Composite>\n\t\t * ```\n\t\t */\n\t\tHover: Object.assign( CompositeHover, {\n\t\t\tdisplayName: 'Composite.Hover',\n\t\t} ),\n\t\t/**\n\t\t * Renders a component that adds typeahead functionality to composite\n\t\t * components. Hitting printable character keys will move focus to the next\n\t\t * composite item that begins with the input characters.\n\t\t *\n\t\t * @example\n\t\t * ```jsx\n\t\t * import { Composite } from '@wordpress/components';\n\t\t *\n\t\t * <Composite render={ <CompositeTypeahead /> }>\n\t\t * <Composite.Item>Item 1</Composite.Item>\n\t\t * <Composite.Item>Item 2</Composite.Item>\n\t\t * </Composite>\n\t\t * ```\n\t\t */\n\t\tTypeahead: Object.assign( CompositeTypeahead, {\n\t\t\tdisplayName: 'Composite.Typeahead',\n\t\t} ),\n\t\t/**\n\t\t * The React context used by the composite components. It can be used by\n\t\t * to access the composite store, and to forward the context when composite\n\t\t * sub-components are rendered across portals (ie. `SlotFill` components)\n\t\t * that would not otherwise forward the context to the `Fill` children.\n\t\t *\n\t\t * @example\n\t\t * ```jsx\n\t\t * import { Composite } from '@wordpress/components';\n\t\t * import { useContext } from '@wordpress/element';\n\t\t *\n\t\t * const compositeContext = useContext( Composite.Context );\n\t\t * ```\n\t\t */\n\t\tContext: Object.assign( CompositeContext, {\n\t\t\tdisplayName: 'Composite.Context',\n\t\t} ),\n\t}\n);\n","\"use client\";\nimport {\n createStore,\n mergeStore,\n omit,\n setup,\n subscribe,\n sync,\n throwOnConflictingProps\n} from \"./BCALMBPZ.js\";\nimport {\n defaultValue\n} from \"./PBFD2E7P.js\";\nimport {\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/disclosure/disclosure-store.ts\nfunction createDisclosureStore(props = {}) {\n const store = mergeStore(\n props.store,\n omit(props.disclosure, [\"contentElement\", \"disclosureElement\"])\n );\n throwOnConflictingProps(props, store);\n const syncState = store == null ? void 0 : store.getState();\n const open = defaultValue(\n props.open,\n syncState == null ? void 0 : syncState.open,\n props.defaultOpen,\n false\n );\n const animated = defaultValue(props.animated, syncState == null ? void 0 : syncState.animated, false);\n const initialState = {\n open,\n animated,\n animating: !!animated && open,\n mounted: open,\n contentElement: defaultValue(syncState == null ? void 0 : syncState.contentElement, null),\n disclosureElement: defaultValue(syncState == null ? void 0 : syncState.disclosureElement, null)\n };\n const disclosure = createStore(initialState, store);\n setup(\n disclosure,\n () => sync(disclosure, [\"animated\", \"animating\"], (state) => {\n if (state.animated) return;\n disclosure.setState(\"animating\", false);\n })\n );\n setup(\n disclosure,\n () => subscribe(disclosure, [\"open\"], () => {\n if (!disclosure.getState().animated) return;\n disclosure.setState(\"animating\", true);\n })\n );\n setup(\n disclosure,\n () => sync(disclosure, [\"open\", \"animating\"], (state) => {\n disclosure.setState(\"mounted\", state.open || state.animating);\n })\n );\n return __spreadProps(__spreadValues({}, disclosure), {\n disclosure: props.disclosure,\n setOpen: (value) => disclosure.setState(\"open\", value),\n show: () => disclosure.setState(\"open\", true),\n hide: () => disclosure.setState(\"open\", false),\n toggle: () => disclosure.setState(\"open\", (open2) => !open2),\n stopAnimation: () => disclosure.setState(\"animating\", false),\n setContentElement: (value) => disclosure.setState(\"contentElement\", value),\n setDisclosureElement: (value) => disclosure.setState(\"disclosureElement\", value)\n });\n}\n\nexport {\n createDisclosureStore\n};\n","\"use client\";\nimport {\n useStore,\n useStoreProps\n} from \"./YV4JVR4I.js\";\nimport {\n useUpdateEffect\n} from \"./ABQUS43J.js\";\n\n// src/disclosure/disclosure-store.ts\nimport * as Core from \"@ariakit/core/disclosure/disclosure-store\";\nfunction useDisclosureStoreProps(store, update, props) {\n useUpdateEffect(update, [props.store, props.disclosure]);\n useStoreProps(store, props, \"open\", \"setOpen\");\n useStoreProps(store, props, \"mounted\", \"setMounted\");\n useStoreProps(store, props, \"animated\");\n return Object.assign(store, { disclosure: props.disclosure });\n}\nfunction useDisclosureStore(props = {}) {\n const [store, update] = useStore(Core.createDisclosureStore, props);\n return useDisclosureStoreProps(store, update, props);\n}\n\nexport {\n useDisclosureStoreProps,\n useDisclosureStore\n};\n","\"use client\";\nimport {\n createDisclosureStore\n} from \"./RCQ5P4YE.js\";\n\n// src/dialog/dialog-store.ts\nfunction createDialogStore(props = {}) {\n return createDisclosureStore(props);\n}\n\nexport {\n createDialogStore\n};\n","\"use client\";\nimport {\n useDisclosureStoreProps\n} from \"./WYCIER3C.js\";\nimport {\n useStore\n} from \"./YV4JVR4I.js\";\n\n// src/dialog/dialog-store.ts\nimport * as Core from \"@ariakit/core/dialog/dialog-store\";\nfunction useDialogStoreProps(store, update, props) {\n return useDisclosureStoreProps(store, update, props);\n}\nfunction useDialogStore(props = {}) {\n const [store, update] = useStore(Core.createDialogStore, props);\n return useDialogStoreProps(store, update, props);\n}\n\nexport {\n useDialogStoreProps,\n useDialogStore\n};\n","\"use client\";\nimport {\n useDialogStoreProps\n} from \"./BM6PGYQY.js\";\nimport {\n useStore,\n useStoreProps\n} from \"./YV4JVR4I.js\";\nimport {\n useUpdateEffect\n} from \"./ABQUS43J.js\";\n\n// src/popover/popover-store.ts\nimport * as Core from \"@ariakit/core/popover/popover-store\";\nfunction usePopoverStoreProps(store, update, props) {\n useUpdateEffect(update, [props.popover]);\n useStoreProps(store, props, \"placement\");\n return useDialogStoreProps(store, update, props);\n}\nfunction usePopoverStore(props = {}) {\n const [store, update] = useStore(Core.createPopoverStore, props);\n return usePopoverStoreProps(store, update, props);\n}\n\nexport {\n usePopoverStoreProps,\n usePopoverStore\n};\n","\"use client\";\nimport {\n usePopoverStoreProps\n} from \"./O2PQ2652.js\";\nimport {\n useStore,\n useStoreProps\n} from \"./YV4JVR4I.js\";\n\n// src/hovercard/hovercard-store.ts\nimport * as Core from \"@ariakit/core/hovercard/hovercard-store\";\nfunction useHovercardStoreProps(store, update, props) {\n useStoreProps(store, props, \"timeout\");\n useStoreProps(store, props, \"showTimeout\");\n useStoreProps(store, props, \"hideTimeout\");\n return usePopoverStoreProps(store, update, props);\n}\nfunction useHovercardStore(props = {}) {\n const [store, update] = useStore(Core.createHovercardStore, props);\n return useHovercardStoreProps(store, update, props);\n}\n\nexport {\n useHovercardStoreProps,\n useHovercardStore\n};\n","\"use client\";\nimport {\n createDialogStore\n} from \"./FZZ2AVHF.js\";\nimport {\n createStore,\n mergeStore,\n omit,\n throwOnConflictingProps\n} from \"./BCALMBPZ.js\";\nimport {\n defaultValue\n} from \"./PBFD2E7P.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/popover/popover-store.ts\nfunction createPopoverStore(_a = {}) {\n var _b = _a, {\n popover: otherPopover\n } = _b, props = __objRest(_b, [\n \"popover\"\n ]);\n const store = mergeStore(\n props.store,\n omit(otherPopover, [\n \"arrowElement\",\n \"anchorElement\",\n \"contentElement\",\n \"popoverElement\",\n \"disclosureElement\"\n ])\n );\n throwOnConflictingProps(props, store);\n const syncState = store == null ? void 0 : store.getState();\n const dialog = createDialogStore(__spreadProps(__spreadValues({}, props), { store }));\n const placement = defaultValue(\n props.placement,\n syncState == null ? void 0 : syncState.placement,\n \"bottom\"\n );\n const initialState = __spreadProps(__spreadValues({}, dialog.getState()), {\n placement,\n currentPlacement: placement,\n anchorElement: defaultValue(syncState == null ? void 0 : syncState.anchorElement, null),\n popoverElement: defaultValue(syncState == null ? void 0 : syncState.popoverElement, null),\n arrowElement: defaultValue(syncState == null ? void 0 : syncState.arrowElement, null),\n rendered: Symbol(\"rendered\")\n });\n const popover = createStore(initialState, dialog, store);\n return __spreadProps(__spreadValues(__spreadValues({}, dialog), popover), {\n setAnchorElement: (element) => popover.setState(\"anchorElement\", element),\n setPopoverElement: (element) => popover.setState(\"popoverElement\", element),\n setArrowElement: (element) => popover.setState(\"arrowElement\", element),\n render: () => popover.setState(\"rendered\", Symbol(\"rendered\"))\n });\n}\n\nexport {\n createPopoverStore\n};\n","\"use client\";\nimport {\n createPopoverStore\n} from \"./ME2CUF3F.js\";\nimport {\n createStore\n} from \"./BCALMBPZ.js\";\nimport {\n defaultValue\n} from \"./PBFD2E7P.js\";\nimport {\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/hovercard/hovercard-store.ts\nfunction createHovercardStore(props = {}) {\n var _a;\n const syncState = (_a = props.store) == null ? void 0 : _a.getState();\n const popover = createPopoverStore(__spreadProps(__spreadValues({}, props), {\n placement: defaultValue(\n props.placement,\n syncState == null ? void 0 : syncState.placement,\n \"bottom\"\n )\n }));\n const timeout = defaultValue(props.timeout, syncState == null ? void 0 : syncState.timeout, 500);\n const initialState = __spreadProps(__spreadValues({}, popover.getState()), {\n timeout,\n showTimeout: defaultValue(props.showTimeout, syncState == null ? void 0 : syncState.showTimeout),\n hideTimeout: defaultValue(props.hideTimeout, syncState == null ? void 0 : syncState.hideTimeout),\n autoFocusOnShow: defaultValue(syncState == null ? void 0 : syncState.autoFocusOnShow, false)\n });\n const hovercard = createStore(initialState, popover, props.store);\n return __spreadProps(__spreadValues(__spreadValues({}, popover), hovercard), {\n setAutoFocusOnShow: (value) => hovercard.setState(\"autoFocusOnShow\", value)\n });\n}\n\nexport {\n createHovercardStore\n};\n","\"use client\";\nimport {\n createHovercardStore\n} from \"../__chunks/JTLIIJ4U.js\";\nimport \"../__chunks/ME2CUF3F.js\";\nimport \"../__chunks/FZZ2AVHF.js\";\nimport \"../__chunks/RCQ5P4YE.js\";\nimport {\n createStore\n} from \"../__chunks/BCALMBPZ.js\";\nimport {\n defaultValue\n} from \"../__chunks/PBFD2E7P.js\";\nimport {\n __spreadProps,\n __spreadValues\n} from \"../__chunks/3YLGPPWQ.js\";\n\n// src/tooltip/tooltip-store.ts\nfunction createTooltipStore(props = {}) {\n var _a;\n if (process.env.NODE_ENV !== \"production\") {\n if (props.type === \"label\") {\n console.warn(\n \"The `type` option on the tooltip store is deprecated.\",\n \"Render a visually hidden label or use the `aria-label` or `aria-labelledby` attributes on the anchor element instead.\",\n \"See https://ariakit.org/components/tooltip#tooltip-anchors-must-have-accessible-names\"\n );\n }\n }\n const syncState = (_a = props.store) == null ? void 0 : _a.getState();\n const hovercard = createHovercardStore(__spreadProps(__spreadValues({}, props), {\n placement: defaultValue(\n props.placement,\n syncState == null ? void 0 : syncState.placement,\n \"top\"\n ),\n hideTimeout: defaultValue(props.hideTimeout, syncState == null ? void 0 : syncState.hideTimeout, 0)\n }));\n const initialState = __spreadProps(__spreadValues({}, hovercard.getState()), {\n type: defaultValue(props.type, syncState == null ? void 0 : syncState.type, \"description\"),\n skipTimeout: defaultValue(props.skipTimeout, syncState == null ? void 0 : syncState.skipTimeout, 300)\n });\n const tooltip = createStore(initialState, hovercard, props.store);\n return __spreadValues(__spreadValues({}, hovercard), tooltip);\n}\nexport {\n createTooltipStore\n};\n","\"use client\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\n\n// src/role/role.tsx\nvar TagName = \"div\";\nvar elements = [\n \"a\",\n \"button\",\n \"details\",\n \"dialog\",\n \"div\",\n \"form\",\n \"h1\",\n \"h2\",\n \"h3\",\n \"h4\",\n \"h5\",\n \"h6\",\n \"header\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"section\",\n \"select\",\n \"span\",\n \"summary\",\n \"textarea\",\n \"ul\",\n \"svg\"\n];\nvar useRole = createHook(\n function useRole2(props) {\n return props;\n }\n);\nvar Role = forwardRef(\n // @ts-expect-error\n function Role2(props) {\n return createElement(TagName, props);\n }\n);\nObject.assign(\n Role,\n elements.reduce((acc, element) => {\n acc[element] = forwardRef(function Role3(props) {\n return createElement(element, props);\n });\n return acc;\n }, {})\n);\n\nexport {\n useRole,\n Role\n};\n","\"use client\";\nimport {\n createStoreContext\n} from \"./LMDWO4NN.js\";\n\n// src/disclosure/disclosure-context.tsx\nvar ctx = createStoreContext();\nvar useDisclosureContext = ctx.useContext;\nvar useDisclosureScopedContext = ctx.useScopedContext;\nvar useDisclosureProviderContext = ctx.useProviderContext;\nvar DisclosureContextProvider = ctx.ContextProvider;\nvar DisclosureScopedContextProvider = ctx.ScopedContextProvider;\n\nexport {\n useDisclosureContext,\n useDisclosureScopedContext,\n useDisclosureProviderContext,\n DisclosureContextProvider,\n DisclosureScopedContextProvider\n};\n","\"use client\";\nimport {\n DisclosureContextProvider,\n DisclosureScopedContextProvider\n} from \"./S6EF7IVO.js\";\nimport {\n createStoreContext\n} from \"./LMDWO4NN.js\";\n\n// src/dialog/dialog-context.tsx\nimport { createContext } from \"react\";\nvar ctx = createStoreContext(\n [DisclosureContextProvider],\n [DisclosureScopedContextProvider]\n);\nvar useDialogContext = ctx.useContext;\nvar useDialogScopedContext = ctx.useScopedContext;\nvar useDialogProviderContext = ctx.useProviderContext;\nvar DialogContextProvider = ctx.ContextProvider;\nvar DialogScopedContextProvider = ctx.ScopedContextProvider;\nvar DialogHeadingContext = createContext(void 0);\nvar DialogDescriptionContext = createContext(void 0);\n\nexport {\n useDialogContext,\n useDialogScopedContext,\n useDialogProviderContext,\n DialogContextProvider,\n DialogScopedContextProvider,\n DialogHeadingContext,\n DialogDescriptionContext\n};\n","\"use client\";\nimport {\n DialogContextProvider,\n DialogScopedContextProvider\n} from \"./RS7LB2H4.js\";\nimport {\n createStoreContext\n} from \"./LMDWO4NN.js\";\n\n// src/popover/popover-context.tsx\nvar ctx = createStoreContext(\n [DialogContextProvider],\n [DialogScopedContextProvider]\n);\nvar usePopoverContext = ctx.useContext;\nvar usePopoverScopedContext = ctx.useScopedContext;\nvar usePopoverProviderContext = ctx.useProviderContext;\nvar PopoverContextProvider = ctx.ContextProvider;\nvar PopoverScopedContextProvider = ctx.ScopedContextProvider;\n\nexport {\n usePopoverContext,\n usePopoverScopedContext,\n usePopoverProviderContext,\n PopoverContextProvider,\n PopoverScopedContextProvider\n};\n","\"use client\";\nimport {\n PopoverContextProvider,\n PopoverScopedContextProvider\n} from \"./MTZPJQMC.js\";\nimport {\n createStoreContext\n} from \"./LMDWO4NN.js\";\n\n// src/hovercard/hovercard-context.tsx\nvar ctx = createStoreContext(\n [PopoverContextProvider],\n [PopoverScopedContextProvider]\n);\nvar useHovercardContext = ctx.useContext;\nvar useHovercardScopedContext = ctx.useScopedContext;\nvar useHovercardProviderContext = ctx.useProviderContext;\nvar HovercardContextProvider = ctx.ContextProvider;\nvar HovercardScopedContextProvider = ctx.ScopedContextProvider;\n\nexport {\n useHovercardContext,\n useHovercardScopedContext,\n useHovercardProviderContext,\n HovercardContextProvider,\n HovercardScopedContextProvider\n};\n","\"use client\";\nimport {\n useHovercardProviderContext\n} from \"./EM5CXX6A.js\";\nimport {\n useFocusable\n} from \"./LVA2YJMS.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n useBooleanEvent,\n useEvent,\n useIsMouseMoving,\n useMergeRefs\n} from \"./ABQUS43J.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/hovercard/hovercard-anchor.tsx\nimport { addGlobalEventListener } from \"@ariakit/core/utils/events\";\nimport { disabledFromProps, invariant } from \"@ariakit/core/utils/misc\";\nimport { useCallback, useEffect, useRef } from \"react\";\nvar TagName = \"a\";\nvar useHovercardAnchor = createHook(\n function useHovercardAnchor2(_a) {\n var _b = _a, { store, showOnHover = true } = _b, props = __objRest(_b, [\"store\", \"showOnHover\"]);\n const context = useHovercardProviderContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"HovercardAnchor must receive a `store` prop or be wrapped in a HovercardProvider component.\"\n );\n const disabled = disabledFromProps(props);\n const showTimeoutRef = useRef(0);\n useEffect(() => () => window.clearTimeout(showTimeoutRef.current), []);\n useEffect(() => {\n const onMouseLeave = (event) => {\n if (!store) return;\n const { anchorElement } = store.getState();\n if (!anchorElement) return;\n if (event.target !== anchorElement) return;\n window.clearTimeout(showTimeoutRef.current);\n showTimeoutRef.current = 0;\n };\n return addGlobalEventListener(\"mouseleave\", onMouseLeave, true);\n }, [store]);\n const onMouseMoveProp = props.onMouseMove;\n const showOnHoverProp = useBooleanEvent(showOnHover);\n const isMouseMoving = useIsMouseMoving();\n const onMouseMove = useEvent((event) => {\n onMouseMoveProp == null ? void 0 : onMouseMoveProp(event);\n if (disabled) return;\n if (!store) return;\n if (event.defaultPrevented) return;\n if (showTimeoutRef.current) return;\n if (!isMouseMoving()) return;\n if (!showOnHoverProp(event)) return;\n const element = event.currentTarget;\n store.setAnchorElement(element);\n store.setDisclosureElement(element);\n const { showTimeout, timeout } = store.getState();\n const showHovercard = () => {\n showTimeoutRef.current = 0;\n if (!isMouseMoving()) return;\n store == null ? void 0 : store.setAnchorElement(element);\n store == null ? void 0 : store.show();\n queueMicrotask(() => {\n store == null ? void 0 : store.setDisclosureElement(element);\n });\n };\n const timeoutMs = showTimeout != null ? showTimeout : timeout;\n if (timeoutMs === 0) {\n showHovercard();\n } else {\n showTimeoutRef.current = window.setTimeout(showHovercard, timeoutMs);\n }\n });\n const onClickProp = props.onClick;\n const onClick = useEvent((event) => {\n onClickProp == null ? void 0 : onClickProp(event);\n if (!store) return;\n window.clearTimeout(showTimeoutRef.current);\n showTimeoutRef.current = 0;\n });\n const ref = useCallback(\n (element) => {\n if (!store) return;\n const { anchorElement } = store.getState();\n if (anchorElement == null ? void 0 : anchorElement.isConnected) return;\n store.setAnchorElement(element);\n },\n [store]\n );\n props = __spreadProps(__spreadValues({}, props), {\n ref: useMergeRefs(ref, props.ref),\n onMouseMove,\n onClick\n });\n props = useFocusable(props);\n return props;\n }\n);\nvar HovercardAnchor = forwardRef(function HovercardAnchor2(props) {\n const htmlProps = useHovercardAnchor(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n useHovercardAnchor,\n HovercardAnchor\n};\n","\"use client\";\nimport {\n HovercardContextProvider,\n HovercardScopedContextProvider\n} from \"./EM5CXX6A.js\";\nimport {\n createStoreContext\n} from \"./LMDWO4NN.js\";\n\n// src/tooltip/tooltip-context.tsx\nvar ctx = createStoreContext(\n [HovercardContextProvider],\n [HovercardScopedContextProvider]\n);\nvar useTooltipContext = ctx.useContext;\nvar useTooltipScopedContext = ctx.useScopedContext;\nvar useTooltipProviderContext = ctx.useProviderContext;\nvar TooltipContextProvider = ctx.ContextProvider;\nvar TooltipScopedContextProvider = ctx.ScopedContextProvider;\n\nexport {\n useTooltipContext,\n useTooltipScopedContext,\n useTooltipProviderContext,\n TooltipContextProvider,\n TooltipScopedContextProvider\n};\n","\"use client\";\nimport {\n useHovercardAnchor\n} from \"../__chunks/BYC7LY2E.js\";\nimport {\n useTooltipProviderContext\n} from \"../__chunks/F4IYJ42G.js\";\nimport \"../__chunks/EM5CXX6A.js\";\nimport \"../__chunks/MTZPJQMC.js\";\nimport \"../__chunks/RS7LB2H4.js\";\nimport \"../__chunks/S6EF7IVO.js\";\nimport \"../__chunks/LVA2YJMS.js\";\nimport \"../__chunks/SWN3JYXT.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"../__chunks/LMDWO4NN.js\";\nimport {\n useEvent\n} from \"../__chunks/ABQUS43J.js\";\nimport \"../__chunks/SK3NAZA3.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"../__chunks/3YLGPPWQ.js\";\n\n// src/tooltip/tooltip-anchor.tsx\nimport {\n chain,\n invariant,\n isFalsyBooleanCallback\n} from \"@ariakit/core/utils/misc\";\nimport { createStore, sync } from \"@ariakit/core/utils/store\";\nimport { useEffect, useRef } from \"react\";\nvar TagName = \"div\";\nvar globalStore = createStore({\n activeStore: null\n});\nfunction createRemoveStoreCallback(store) {\n return () => {\n const { activeStore } = globalStore.getState();\n if (activeStore !== store) return;\n globalStore.setState(\"activeStore\", null);\n };\n}\nvar useTooltipAnchor = createHook(\n function useTooltipAnchor2(_a) {\n var _b = _a, { store, showOnHover = true } = _b, props = __objRest(_b, [\"store\", \"showOnHover\"]);\n const context = useTooltipProviderContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"TooltipAnchor must receive a `store` prop or be wrapped in a TooltipProvider component.\"\n );\n const canShowOnHoverRef = useRef(false);\n useEffect(() => {\n return sync(store, [\"mounted\"], (state) => {\n if (state.mounted) return;\n canShowOnHoverRef.current = false;\n });\n }, [store]);\n useEffect(() => {\n if (!store) return;\n return chain(\n // Immediately remove the current store from the global store when\n // the component unmounts. This is useful, for example, to avoid\n // showing tooltips immediately on serial tests.\n createRemoveStoreCallback(store),\n sync(store, [\"mounted\", \"skipTimeout\"], (state) => {\n if (!store) return;\n if (state.mounted) {\n const { activeStore } = globalStore.getState();\n if (activeStore !== store) {\n activeStore == null ? void 0 : activeStore.hide();\n }\n return globalStore.setState(\"activeStore\", store);\n }\n const id = setTimeout(\n createRemoveStoreCallback(store),\n state.skipTimeout\n );\n return () => clearTimeout(id);\n })\n );\n }, [store]);\n const onMouseEnterProp = props.onMouseEnter;\n const onMouseEnter = useEvent((event) => {\n onMouseEnterProp == null ? void 0 : onMouseEnterProp(event);\n canShowOnHoverRef.current = true;\n });\n const onFocusVisibleProp = props.onFocusVisible;\n const onFocusVisible = useEvent((event) => {\n onFocusVisibleProp == null ? void 0 : onFocusVisibleProp(event);\n if (event.defaultPrevented) return;\n store == null ? void 0 : store.setAnchorElement(event.currentTarget);\n store == null ? void 0 : store.show();\n });\n const onBlurProp = props.onBlur;\n const onBlur = useEvent((event) => {\n onBlurProp == null ? void 0 : onBlurProp(event);\n if (event.defaultPrevented) return;\n const { activeStore } = globalStore.getState();\n canShowOnHoverRef.current = false;\n if (activeStore === store) {\n globalStore.setState(\"activeStore\", null);\n }\n });\n const type = store.useState(\"type\");\n const contentId = store.useState((state) => {\n var _a2;\n return (_a2 = state.contentElement) == null ? void 0 : _a2.id;\n });\n props = __spreadProps(__spreadValues({\n \"aria-labelledby\": type === \"label\" ? contentId : void 0\n }, props), {\n onMouseEnter,\n onFocusVisible,\n onBlur\n });\n props = useHovercardAnchor(__spreadValues({\n store,\n showOnHover(event) {\n if (!canShowOnHoverRef.current) return false;\n if (isFalsyBooleanCallback(showOnHover, event)) return false;\n const { activeStore } = globalStore.getState();\n if (!activeStore) return true;\n store == null ? void 0 : store.show();\n return false;\n }\n }, props));\n return props;\n }\n);\nvar TooltipAnchor = forwardRef(function TooltipAnchor2(props) {\n const htmlProps = useTooltipAnchor(props);\n return createElement(TagName, htmlProps);\n});\nexport {\n TooltipAnchor,\n useTooltipAnchor\n};\n","\"use client\";\n\n// src/hovercard/utils/polygon.ts\nfunction getEventPoint(event) {\n return [event.clientX, event.clientY];\n}\nfunction isPointInPolygon(point, polygon) {\n const [x, y] = point;\n let inside = false;\n const length = polygon.length;\n for (let l = length, i = 0, j = l - 1; i < l; j = i++) {\n const [xi, yi] = polygon[i];\n const [xj, yj] = polygon[j];\n const [, vy] = polygon[j === 0 ? l - 1 : j - 1] || [0, 0];\n const where = (yi - yj) * (x - xi) - (xi - xj) * (y - yi);\n if (yj < yi) {\n if (y >= yj && y < yi) {\n if (where === 0) return true;\n if (where > 0) {\n if (y === yj) {\n if (y > vy) {\n inside = !inside;\n }\n } else {\n inside = !inside;\n }\n }\n }\n } else if (yi < yj) {\n if (y > yi && y <= yj) {\n if (where === 0) return true;\n if (where < 0) {\n if (y === yj) {\n if (y < vy) {\n inside = !inside;\n }\n } else {\n inside = !inside;\n }\n }\n }\n } else if (y === yi && (x >= xj && x <= xi || x >= xi && x <= xj)) {\n return true;\n }\n }\n return inside;\n}\nfunction getEnterPointPlacement(enterPoint, rect) {\n const { top, right, bottom, left } = rect;\n const [x, y] = enterPoint;\n const placementX = x < left ? \"left\" : x > right ? \"right\" : null;\n const placementY = y < top ? \"top\" : y > bottom ? \"bottom\" : null;\n return [placementX, placementY];\n}\nfunction getElementPolygon(element, enterPoint) {\n const rect = element.getBoundingClientRect();\n const { top, right, bottom, left } = rect;\n const [x, y] = getEnterPointPlacement(enterPoint, rect);\n const polygon = [enterPoint];\n if (x) {\n if (y !== \"top\") {\n polygon.push([x === \"left\" ? left : right, top]);\n }\n polygon.push([x === \"left\" ? right : left, top]);\n polygon.push([x === \"left\" ? right : left, bottom]);\n if (y !== \"bottom\") {\n polygon.push([x === \"left\" ? left : right, bottom]);\n }\n } else if (y === \"top\") {\n polygon.push([left, top]);\n polygon.push([left, bottom]);\n polygon.push([right, bottom]);\n polygon.push([right, top]);\n } else {\n polygon.push([left, bottom]);\n polygon.push([left, top]);\n polygon.push([right, top]);\n polygon.push([right, bottom]);\n }\n return polygon;\n}\n\nexport {\n getEventPoint,\n isPointInPolygon,\n getElementPolygon\n};\n","\"use client\";\n\n// src/dialog/utils/is-backdrop.ts\nfunction isBackdrop(element, ...ids) {\n if (!element) return false;\n const backdrop = element.getAttribute(\"data-backdrop\");\n if (backdrop == null) return false;\n if (backdrop === \"\") return true;\n if (backdrop === \"true\") return true;\n if (!ids.length) return true;\n return ids.some((id) => backdrop === id);\n}\n\nexport {\n isBackdrop\n};\n","\"use client\";\n\n// src/dialog/utils/orchestrate.ts\nvar cleanups = /* @__PURE__ */ new WeakMap();\nfunction orchestrate(element, key, setup) {\n if (!cleanups.has(element)) {\n cleanups.set(element, /* @__PURE__ */ new Map());\n }\n const elementCleanups = cleanups.get(element);\n const prevCleanup = elementCleanups.get(key);\n if (!prevCleanup) {\n elementCleanups.set(key, setup());\n return () => {\n var _a;\n (_a = elementCleanups.get(key)) == null ? void 0 : _a();\n elementCleanups.delete(key);\n };\n }\n const cleanup = setup();\n const nextCleanup = () => {\n cleanup();\n prevCleanup();\n elementCleanups.delete(key);\n };\n elementCleanups.set(key, nextCleanup);\n return () => {\n const isCurrent = elementCleanups.get(key) === nextCleanup;\n if (!isCurrent) return;\n cleanup();\n elementCleanups.set(key, prevCleanup);\n };\n}\nfunction setAttribute(element, attr, value) {\n const setup = () => {\n const previousValue = element.getAttribute(attr);\n element.setAttribute(attr, value);\n return () => {\n if (previousValue == null) {\n element.removeAttribute(attr);\n } else {\n element.setAttribute(attr, previousValue);\n }\n };\n };\n return orchestrate(element, attr, setup);\n}\nfunction setProperty(element, property, value) {\n const setup = () => {\n const exists = property in element;\n const previousValue = element[property];\n element[property] = value;\n return () => {\n if (!exists) {\n delete element[property];\n } else {\n element[property] = previousValue;\n }\n };\n };\n return orchestrate(element, property, setup);\n}\nfunction assignStyle(element, style) {\n if (!element) return () => {\n };\n const setup = () => {\n const prevStyle = element.style.cssText;\n Object.assign(element.style, style);\n return () => {\n element.style.cssText = prevStyle;\n };\n };\n return orchestrate(element, \"style\", setup);\n}\nfunction setCSSProperty(element, property, value) {\n if (!element) return () => {\n };\n const setup = () => {\n const previousValue = element.style.getPropertyValue(property);\n element.style.setProperty(property, value);\n return () => {\n if (previousValue) {\n element.style.setProperty(property, previousValue);\n } else {\n element.style.removeProperty(property);\n }\n };\n };\n return orchestrate(element, property, setup);\n}\n\nexport {\n orchestrate,\n setAttribute,\n setProperty,\n assignStyle,\n setCSSProperty\n};\n","\"use client\";\nimport {\n setProperty\n} from \"./K2ZF5NU7.js\";\n\n// src/dialog/utils/walk-tree-outside.ts\nimport { contains, getDocument } from \"@ariakit/core/utils/dom\";\nimport { chain } from \"@ariakit/core/utils/misc\";\nvar ignoreTags = [\"SCRIPT\", \"STYLE\"];\nfunction getSnapshotPropertyName(id) {\n return `__ariakit-dialog-snapshot-${id}`;\n}\nfunction inSnapshot(id, element) {\n const doc = getDocument(element);\n const propertyName = getSnapshotPropertyName(id);\n if (!doc.body[propertyName]) return true;\n do {\n if (element === doc.body) return false;\n if (element[propertyName]) return true;\n if (!element.parentElement) return false;\n element = element.parentElement;\n } while (true);\n}\nfunction isValidElement(id, element, ignoredElements) {\n if (ignoreTags.includes(element.tagName)) return false;\n if (!inSnapshot(id, element)) return false;\n return !ignoredElements.some(\n (enabledElement) => enabledElement && contains(element, enabledElement)\n );\n}\nfunction walkTreeOutside(id, elements, callback, ancestorCallback) {\n for (let element of elements) {\n if (!(element == null ? void 0 : element.isConnected)) continue;\n const hasAncestorAlready = elements.some((maybeAncestor) => {\n if (!maybeAncestor) return false;\n if (maybeAncestor === element) return false;\n return maybeAncestor.contains(element);\n });\n const doc = getDocument(element);\n const originalElement = element;\n while (element.parentElement && element !== doc.body) {\n ancestorCallback == null ? void 0 : ancestorCallback(element.parentElement, originalElement);\n if (!hasAncestorAlready) {\n for (const child of element.parentElement.children) {\n if (isValidElement(id, child, elements)) {\n callback(child, originalElement);\n }\n }\n }\n element = element.parentElement;\n }\n }\n}\nfunction createWalkTreeSnapshot(id, elements) {\n const { body } = getDocument(elements[0]);\n const cleanups = [];\n const markElement = (element) => {\n cleanups.push(setProperty(element, getSnapshotPropertyName(id), true));\n };\n walkTreeOutside(id, elements, markElement);\n return chain(setProperty(body, getSnapshotPropertyName(id), true), () => {\n for (const cleanup of cleanups) {\n cleanup();\n }\n });\n}\n\nexport {\n isValidElement,\n walkTreeOutside,\n createWalkTreeSnapshot\n};\n","\"use client\";\nimport {\n isBackdrop\n} from \"./63XF7ACK.js\";\nimport {\n walkTreeOutside\n} from \"./AOUGVQZ3.js\";\nimport {\n setProperty\n} from \"./K2ZF5NU7.js\";\n\n// src/dialog/utils/mark-tree-outside.ts\nimport { chain } from \"@ariakit/core/utils/misc\";\nfunction getPropertyName(id = \"\", ancestor = false) {\n return `__ariakit-dialog-${ancestor ? \"ancestor\" : \"outside\"}${id ? `-${id}` : \"\"}`;\n}\nfunction markElement(element, id = \"\") {\n return chain(\n setProperty(element, getPropertyName(), true),\n setProperty(element, getPropertyName(id), true)\n );\n}\nfunction markAncestor(element, id = \"\") {\n return chain(\n setProperty(element, getPropertyName(\"\", true), true),\n setProperty(element, getPropertyName(id, true), true)\n );\n}\nfunction isElementMarked(element, id) {\n const ancestorProperty = getPropertyName(id, true);\n if (element[ancestorProperty]) return true;\n const elementProperty = getPropertyName(id);\n do {\n if (element[elementProperty]) return true;\n if (!element.parentElement) return false;\n element = element.parentElement;\n } while (true);\n}\nfunction markTreeOutside(id, elements) {\n const cleanups = [];\n const ids = elements.map((el) => el == null ? void 0 : el.id);\n walkTreeOutside(\n id,\n elements,\n (element) => {\n if (isBackdrop(element, ...ids)) return;\n cleanups.unshift(markElement(element, id));\n },\n (ancestor, element) => {\n const isAnotherDialogAncestor = element.hasAttribute(\"data-dialog\") && element.id !== id;\n if (isAnotherDialogAncestor) return;\n cleanups.unshift(markAncestor(ancestor, id));\n }\n );\n const restoreAccessibilityTree = () => {\n for (const cleanup of cleanups) {\n cleanup();\n }\n };\n return restoreAccessibilityTree;\n}\n\nexport {\n markElement,\n markAncestor,\n isElementMarked,\n markTreeOutside\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"ReactDOM\"];","\"use client\";\nimport {\n DialogScopedContextProvider\n} from \"./RS7LB2H4.js\";\nimport {\n useDisclosureProviderContext\n} from \"./S6EF7IVO.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n useStoreState\n} from \"./YV4JVR4I.js\";\nimport {\n useId,\n useMergeRefs,\n useSafeLayoutEffect,\n useWrapElement\n} from \"./ABQUS43J.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/disclosure/disclosure-content.tsx\nimport { invariant, removeUndefinedValues } from \"@ariakit/core/utils/misc\";\nimport { useMemo, useRef, useState } from \"react\";\nimport { flushSync } from \"react-dom\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"div\";\nfunction afterTimeout(timeoutMs, cb) {\n const timeoutId = setTimeout(cb, timeoutMs);\n return () => clearTimeout(timeoutId);\n}\nfunction afterPaint(cb) {\n let raf = requestAnimationFrame(() => {\n raf = requestAnimationFrame(cb);\n });\n return () => cancelAnimationFrame(raf);\n}\nfunction parseCSSTime(...times) {\n return times.join(\", \").split(\", \").reduce((longestTime, currentTimeString) => {\n const multiplier = currentTimeString.endsWith(\"ms\") ? 1 : 1e3;\n const currentTime = Number.parseFloat(currentTimeString || \"0s\") * multiplier;\n if (currentTime > longestTime) return currentTime;\n return longestTime;\n }, 0);\n}\nfunction isHidden(mounted, hidden, alwaysVisible) {\n return !alwaysVisible && hidden !== false && (!mounted || !!hidden);\n}\nvar useDisclosureContent = createHook(function useDisclosureContent2(_a) {\n var _b = _a, { store, alwaysVisible } = _b, props = __objRest(_b, [\"store\", \"alwaysVisible\"]);\n const context = useDisclosureProviderContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"DisclosureContent must receive a `store` prop or be wrapped in a DisclosureProvider component.\"\n );\n const ref = useRef(null);\n const id = useId(props.id);\n const [transition, setTransition] = useState(null);\n const open = store.useState(\"open\");\n const mounted = store.useState(\"mounted\");\n const animated = store.useState(\"animated\");\n const contentElement = store.useState(\"contentElement\");\n const otherElement = useStoreState(store.disclosure, \"contentElement\");\n useSafeLayoutEffect(() => {\n if (!ref.current) return;\n store == null ? void 0 : store.setContentElement(ref.current);\n }, [store]);\n useSafeLayoutEffect(() => {\n let previousAnimated;\n store == null ? void 0 : store.setState(\"animated\", (animated2) => {\n previousAnimated = animated2;\n return true;\n });\n return () => {\n if (previousAnimated === void 0) return;\n store == null ? void 0 : store.setState(\"animated\", previousAnimated);\n };\n }, [store]);\n useSafeLayoutEffect(() => {\n if (!animated) return;\n if (!(contentElement == null ? void 0 : contentElement.isConnected)) {\n setTransition(null);\n return;\n }\n return afterPaint(() => {\n setTransition(open ? \"enter\" : mounted ? \"leave\" : null);\n });\n }, [animated, contentElement, open, mounted]);\n useSafeLayoutEffect(() => {\n if (!store) return;\n if (!animated) return;\n if (!transition) return;\n if (!contentElement) return;\n const stopAnimation = () => store == null ? void 0 : store.setState(\"animating\", false);\n const stopAnimationSync = () => flushSync(stopAnimation);\n if (transition === \"leave\" && open) return;\n if (transition === \"enter\" && !open) return;\n if (typeof animated === \"number\") {\n const timeout2 = animated;\n return afterTimeout(timeout2, stopAnimationSync);\n }\n const {\n transitionDuration,\n animationDuration,\n transitionDelay,\n animationDelay\n } = getComputedStyle(contentElement);\n const {\n transitionDuration: transitionDuration2 = \"0\",\n animationDuration: animationDuration2 = \"0\",\n transitionDelay: transitionDelay2 = \"0\",\n animationDelay: animationDelay2 = \"0\"\n } = otherElement ? getComputedStyle(otherElement) : {};\n const delay = parseCSSTime(\n transitionDelay,\n animationDelay,\n transitionDelay2,\n animationDelay2\n );\n const duration = parseCSSTime(\n transitionDuration,\n animationDuration,\n transitionDuration2,\n animationDuration2\n );\n const timeout = delay + duration;\n if (!timeout) {\n if (transition === \"enter\") {\n store.setState(\"animated\", false);\n }\n stopAnimation();\n return;\n }\n const frameRate = 1e3 / 60;\n const maxTimeout = Math.max(timeout - frameRate, 0);\n return afterTimeout(maxTimeout, stopAnimationSync);\n }, [store, animated, contentElement, otherElement, open, transition]);\n props = useWrapElement(\n props,\n (element) => /* @__PURE__ */ jsx(DialogScopedContextProvider, { value: store, children: element }),\n [store]\n );\n const hidden = isHidden(mounted, props.hidden, alwaysVisible);\n const styleProp = props.style;\n const style = useMemo(() => {\n if (hidden) {\n return __spreadProps(__spreadValues({}, styleProp), { display: \"none\" });\n }\n return styleProp;\n }, [hidden, styleProp]);\n props = __spreadProps(__spreadValues({\n id,\n \"data-open\": open || void 0,\n \"data-enter\": transition === \"enter\" || void 0,\n \"data-leave\": transition === \"leave\" || void 0,\n hidden\n }, props), {\n ref: useMergeRefs(id ? store.setContentElement : null, ref, props.ref),\n style\n });\n return removeUndefinedValues(props);\n});\nvar DisclosureContentImpl = forwardRef(function DisclosureContentImpl2(props) {\n const htmlProps = useDisclosureContent(props);\n return createElement(TagName, htmlProps);\n});\nvar DisclosureContent = forwardRef(function DisclosureContent2(_a) {\n var _b = _a, {\n unmountOnHide\n } = _b, props = __objRest(_b, [\n \"unmountOnHide\"\n ]);\n const context = useDisclosureProviderContext();\n const store = props.store || context;\n const mounted = useStoreState(\n store,\n (state) => !unmountOnHide || (state == null ? void 0 : state.mounted)\n );\n if (mounted === false) return null;\n return /* @__PURE__ */ jsx(DisclosureContentImpl, __spreadValues({}, props));\n});\n\nexport {\n isHidden,\n useDisclosureContent,\n DisclosureContent\n};\n","\"use client\";\nimport {\n markAncestor\n} from \"./2PGBN2Y4.js\";\nimport {\n useDisclosureContent\n} from \"./VGCJ63VH.js\";\nimport {\n Role\n} from \"./XL7CSKGW.js\";\nimport {\n useDisclosureStore\n} from \"./WYCIER3C.js\";\nimport {\n useStoreState\n} from \"./YV4JVR4I.js\";\nimport {\n useSafeLayoutEffect\n} from \"./ABQUS43J.js\";\nimport {\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/dialog/dialog-backdrop.tsx\nimport { isValidElement, useEffect, useRef } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction DialogBackdrop({\n store,\n backdrop,\n alwaysVisible,\n hidden\n}) {\n const ref = useRef(null);\n const disclosure = useDisclosureStore({ disclosure: store });\n const contentElement = useStoreState(store, \"contentElement\");\n useEffect(() => {\n const backdrop2 = ref.current;\n const dialog = contentElement;\n if (!backdrop2) return;\n if (!dialog) return;\n backdrop2.style.zIndex = getComputedStyle(dialog).zIndex;\n }, [contentElement]);\n useSafeLayoutEffect(() => {\n const id = contentElement == null ? void 0 : contentElement.id;\n if (!id) return;\n const backdrop2 = ref.current;\n if (!backdrop2) return;\n return markAncestor(backdrop2, id);\n }, [contentElement]);\n const props = useDisclosureContent({\n ref,\n store: disclosure,\n role: \"presentation\",\n \"data-backdrop\": (contentElement == null ? void 0 : contentElement.id) || \"\",\n alwaysVisible,\n hidden: hidden != null ? hidden : void 0,\n style: {\n position: \"fixed\",\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n }\n });\n if (!backdrop) return null;\n if (isValidElement(backdrop)) {\n return /* @__PURE__ */ jsx(Role, __spreadProps(__spreadValues({}, props), { render: backdrop }));\n }\n const Component = typeof backdrop !== \"boolean\" ? backdrop : \"div\";\n return /* @__PURE__ */ jsx(Role, __spreadProps(__spreadValues({}, props), { render: /* @__PURE__ */ jsx(Component, {}) }));\n}\n\nexport {\n DialogBackdrop\n};\n","\"use client\";\n\n// src/dialog/utils/supports-inert.ts\nfunction supportsInert() {\n return \"inert\" in HTMLElement.prototype;\n}\n\nexport {\n supportsInert\n};\n","\"use client\";\nimport {\n isFocusTrap\n} from \"./IGR4SXG2.js\";\nimport {\n hideElementFromAccessibilityTree\n} from \"./ESSM74HH.js\";\nimport {\n isBackdrop\n} from \"./63XF7ACK.js\";\nimport {\n supportsInert\n} from \"./677M2CI3.js\";\nimport {\n walkTreeOutside\n} from \"./AOUGVQZ3.js\";\nimport {\n assignStyle,\n orchestrate,\n setAttribute,\n setProperty\n} from \"./K2ZF5NU7.js\";\n\n// src/dialog/utils/disable-tree.ts\nimport { contains } from \"@ariakit/core/utils/dom\";\nimport { getAllTabbableIn } from \"@ariakit/core/utils/focus\";\nimport { chain, noop } from \"@ariakit/core/utils/misc\";\nfunction disableTree(element, ignoredElements) {\n if (!(\"style\" in element)) return noop;\n if (supportsInert()) {\n return setProperty(element, \"inert\", true);\n }\n const tabbableElements = getAllTabbableIn(element, true);\n const enableElements = tabbableElements.map((element2) => {\n if (ignoredElements == null ? void 0 : ignoredElements.some((el) => el && contains(el, element2))) return noop;\n const restoreFocusMethod = orchestrate(element2, \"focus\", () => {\n element2.focus = noop;\n return () => {\n delete element2.focus;\n };\n });\n return chain(setAttribute(element2, \"tabindex\", \"-1\"), restoreFocusMethod);\n });\n return chain(\n ...enableElements,\n hideElementFromAccessibilityTree(element),\n assignStyle(element, {\n pointerEvents: \"none\",\n userSelect: \"none\",\n cursor: \"default\"\n })\n );\n}\nfunction disableTreeOutside(id, elements) {\n const cleanups = [];\n const ids = elements.map((el) => el == null ? void 0 : el.id);\n walkTreeOutside(\n id,\n elements,\n (element) => {\n if (isBackdrop(element, ...ids)) return;\n if (isFocusTrap(element, ...ids)) return;\n cleanups.unshift(disableTree(element, elements));\n },\n (element) => {\n if (!element.hasAttribute(\"role\")) return;\n if (elements.some((el) => el && contains(el, element))) return;\n cleanups.unshift(setAttribute(element, \"role\", \"none\"));\n }\n );\n const restoreTreeOutside = () => {\n for (const cleanup of cleanups) {\n cleanup();\n }\n };\n return restoreTreeOutside;\n}\n\nexport {\n disableTree,\n disableTreeOutside\n};\n","\"use client\";\nimport {\n isBackdrop\n} from \"./63XF7ACK.js\";\nimport {\n walkTreeOutside\n} from \"./AOUGVQZ3.js\";\nimport {\n setAttribute\n} from \"./K2ZF5NU7.js\";\n\n// src/dialog/utils/disable-accessibility-tree-outside.ts\nfunction hideElementFromAccessibilityTree(element) {\n return setAttribute(element, \"aria-hidden\", \"true\");\n}\nfunction disableAccessibilityTreeOutside(id, elements) {\n const cleanups = [];\n const ids = elements.map((el) => el == null ? void 0 : el.id);\n walkTreeOutside(id, elements, (element) => {\n if (isBackdrop(element, ...ids)) return;\n cleanups.unshift(hideElementFromAccessibilityTree(element));\n });\n const restoreAccessibilityTree = () => {\n for (const cleanup of cleanups) {\n cleanup();\n }\n };\n return restoreAccessibilityTree;\n}\n\nexport {\n hideElementFromAccessibilityTree,\n disableAccessibilityTreeOutside\n};\n","\"use client\";\nimport {\n useRootDialog\n} from \"./YKJECYU7.js\";\nimport {\n assignStyle,\n setCSSProperty\n} from \"./K2ZF5NU7.js\";\n\n// src/dialog/utils/use-prevent-body-scroll.ts\nimport { getDocument, getWindow } from \"@ariakit/core/utils/dom\";\nimport { chain } from \"@ariakit/core/utils/misc\";\nimport { isApple, isMac } from \"@ariakit/core/utils/platform\";\nimport { useEffect } from \"react\";\nfunction getPaddingProperty(documentElement) {\n const documentLeft = documentElement.getBoundingClientRect().left;\n const scrollbarX = Math.round(documentLeft) + documentElement.scrollLeft;\n return scrollbarX ? \"paddingLeft\" : \"paddingRight\";\n}\nfunction usePreventBodyScroll(contentElement, contentId, enabled) {\n const isRootDialog = useRootDialog({\n attribute: \"data-dialog-prevent-body-scroll\",\n contentElement,\n contentId,\n enabled\n });\n useEffect(() => {\n if (!isRootDialog()) return;\n if (!contentElement) return;\n const doc = getDocument(contentElement);\n const win = getWindow(contentElement);\n const { documentElement, body } = doc;\n const cssScrollbarWidth = documentElement.style.getPropertyValue(\"--scrollbar-width\");\n const scrollbarWidth = cssScrollbarWidth ? Number.parseInt(cssScrollbarWidth) : win.innerWidth - documentElement.clientWidth;\n const setScrollbarWidthProperty = () => setCSSProperty(\n documentElement,\n \"--scrollbar-width\",\n `${scrollbarWidth}px`\n );\n const paddingProperty = getPaddingProperty(documentElement);\n const setStyle = () => assignStyle(body, {\n overflow: \"hidden\",\n [paddingProperty]: `${scrollbarWidth}px`\n });\n const setIOSStyle = () => {\n var _a, _b;\n const { scrollX, scrollY, visualViewport } = win;\n const offsetLeft = (_a = visualViewport == null ? void 0 : visualViewport.offsetLeft) != null ? _a : 0;\n const offsetTop = (_b = visualViewport == null ? void 0 : visualViewport.offsetTop) != null ? _b : 0;\n const restoreStyle = assignStyle(body, {\n position: \"fixed\",\n overflow: \"hidden\",\n top: `${-(scrollY - Math.floor(offsetTop))}px`,\n left: `${-(scrollX - Math.floor(offsetLeft))}px`,\n right: \"0\",\n [paddingProperty]: `${scrollbarWidth}px`\n });\n return () => {\n restoreStyle();\n if (process.env.NODE_ENV !== \"test\") {\n win.scrollTo({ left: scrollX, top: scrollY, behavior: \"instant\" });\n }\n };\n };\n const isIOS = isApple() && !isMac();\n return chain(\n setScrollbarWidthProperty(),\n isIOS ? setIOSStyle() : setStyle()\n );\n }, [isRootDialog, contentElement]);\n}\n\nexport {\n usePreventBodyScroll\n};\n","\"use client\";\nimport {\n useForceUpdate\n} from \"./ABQUS43J.js\";\n\n// src/dialog/utils/use-root-dialog.ts\nimport { getDocument } from \"@ariakit/core/utils/dom\";\nimport { useCallback, useEffect } from \"react\";\nimport { flushSync } from \"react-dom\";\nfunction useRootDialog({\n attribute,\n contentId,\n contentElement,\n enabled\n}) {\n const [updated, retry] = useForceUpdate();\n const isRootDialog = useCallback(() => {\n if (!enabled) return false;\n if (!contentElement) return false;\n const { body } = getDocument(contentElement);\n const id = body.getAttribute(attribute);\n return !id || id === contentId;\n }, [updated, enabled, contentElement, attribute, contentId]);\n useEffect(() => {\n if (!enabled) return;\n if (!contentId) return;\n if (!contentElement) return;\n const { body } = getDocument(contentElement);\n if (isRootDialog()) {\n body.setAttribute(attribute, contentId);\n return () => body.removeAttribute(attribute);\n }\n const observer = new MutationObserver(() => flushSync(retry));\n observer.observe(body, { attributeFilter: [attribute] });\n return () => observer.disconnect();\n }, [updated, enabled, contentId, contentElement, isRootDialog, attribute]);\n return isRootDialog;\n}\n\nexport {\n useRootDialog\n};\n","\"use client\";\nimport {\n useSafeLayoutEffect\n} from \"./ABQUS43J.js\";\n\n// src/dialog/utils/use-nested-dialogs.tsx\nimport { chain } from \"@ariakit/core/utils/misc\";\nimport { sync } from \"@ariakit/core/utils/store\";\nimport {\n createContext,\n useCallback,\n useContext,\n useMemo,\n useState\n} from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NestedDialogsContext = createContext({});\nfunction useNestedDialogs(store) {\n const context = useContext(NestedDialogsContext);\n const [dialogs, setDialogs] = useState([]);\n const add = useCallback(\n (dialog) => {\n var _a;\n setDialogs((dialogs2) => [...dialogs2, dialog]);\n return chain((_a = context.add) == null ? void 0 : _a.call(context, dialog), () => {\n setDialogs((dialogs2) => dialogs2.filter((d) => d !== dialog));\n });\n },\n [context]\n );\n useSafeLayoutEffect(() => {\n return sync(store, [\"open\", \"contentElement\"], (state) => {\n var _a;\n if (!state.open) return;\n if (!state.contentElement) return;\n return (_a = context.add) == null ? void 0 : _a.call(context, store);\n });\n }, [store, context]);\n const providerValue = useMemo(() => ({ store, add }), [store, add]);\n const wrapElement = useCallback(\n (element) => /* @__PURE__ */ jsx(NestedDialogsContext.Provider, { value: providerValue, children: element }),\n [providerValue]\n );\n return { wrapElement, nestedDialogs: dialogs };\n}\n\nexport {\n useNestedDialogs\n};\n","\"use client\";\nimport {\n isElementMarked\n} from \"./2PGBN2Y4.js\";\nimport {\n usePreviousMouseDownRef\n} from \"./HLTQOHKZ.js\";\nimport {\n isSafariFocusAncestor\n} from \"./LVA2YJMS.js\";\nimport {\n useStoreState\n} from \"./YV4JVR4I.js\";\nimport {\n useEvent,\n useSafeLayoutEffect\n} from \"./ABQUS43J.js\";\nimport {\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/dialog/utils/use-hide-on-interact-outside.ts\nimport { contains, getDocument, isVisible } from \"@ariakit/core/utils/dom\";\nimport { addGlobalEventListener } from \"@ariakit/core/utils/events\";\nimport { useEffect, useRef } from \"react\";\nfunction isInDocument(target) {\n if (target.tagName === \"HTML\") return true;\n return contains(getDocument(target).body, target);\n}\nfunction isDisclosure(disclosure, target) {\n if (!disclosure) return false;\n if (contains(disclosure, target)) return true;\n const activeId = target.getAttribute(\"aria-activedescendant\");\n if (activeId) {\n const activeElement = getDocument(disclosure).getElementById(activeId);\n if (activeElement) {\n return contains(disclosure, activeElement);\n }\n }\n return false;\n}\nfunction isMouseEventOnDialog(event, dialog) {\n if (!(\"clientY\" in event)) return false;\n const rect = dialog.getBoundingClientRect();\n if (rect.width === 0 || rect.height === 0) return false;\n return rect.top <= event.clientY && event.clientY <= rect.top + rect.height && rect.left <= event.clientX && event.clientX <= rect.left + rect.width;\n}\nfunction useEventOutside({\n store,\n type,\n listener,\n capture,\n domReady\n}) {\n const callListener = useEvent(listener);\n const open = useStoreState(store, \"open\");\n const focusedRef = useRef(false);\n useSafeLayoutEffect(() => {\n if (!open) return;\n if (!domReady) return;\n const { contentElement } = store.getState();\n if (!contentElement) return;\n const onFocus = () => {\n focusedRef.current = true;\n };\n contentElement.addEventListener(\"focusin\", onFocus, true);\n return () => contentElement.removeEventListener(\"focusin\", onFocus, true);\n }, [store, open, domReady]);\n useEffect(() => {\n if (!open) return;\n const onEvent = (event) => {\n const { contentElement, disclosureElement } = store.getState();\n const target = event.target;\n if (!contentElement) return;\n if (!target) return;\n if (!isInDocument(target)) return;\n if (contains(contentElement, target)) return;\n if (isDisclosure(disclosureElement, target)) return;\n if (target.hasAttribute(\"data-focus-trap\")) return;\n if (isMouseEventOnDialog(event, contentElement)) return;\n const focused = focusedRef.current;\n if (focused && !isElementMarked(target, contentElement.id)) return;\n if (isSafariFocusAncestor(target)) return;\n callListener(event);\n };\n return addGlobalEventListener(type, onEvent, capture);\n }, [open, capture]);\n}\nfunction shouldHideOnInteractOutside(hideOnInteractOutside, event) {\n if (typeof hideOnInteractOutside === \"function\") {\n return hideOnInteractOutside(event);\n }\n return !!hideOnInteractOutside;\n}\nfunction useHideOnInteractOutside(store, hideOnInteractOutside, domReady) {\n const open = useStoreState(store, \"open\");\n const previousMouseDownRef = usePreviousMouseDownRef(open);\n const props = { store, domReady, capture: true };\n useEventOutside(__spreadProps(__spreadValues({}, props), {\n type: \"click\",\n listener: (event) => {\n const { contentElement } = store.getState();\n const previousMouseDown = previousMouseDownRef.current;\n if (!previousMouseDown) return;\n if (!isVisible(previousMouseDown)) return;\n if (!isElementMarked(previousMouseDown, contentElement == null ? void 0 : contentElement.id)) return;\n if (!shouldHideOnInteractOutside(hideOnInteractOutside, event)) return;\n store.hide();\n }\n }));\n useEventOutside(__spreadProps(__spreadValues({}, props), {\n type: \"focusin\",\n listener: (event) => {\n const { contentElement } = store.getState();\n if (!contentElement) return;\n if (event.target === getDocument(contentElement)) return;\n if (!shouldHideOnInteractOutside(hideOnInteractOutside, event)) return;\n store.hide();\n }\n }));\n useEventOutside(__spreadProps(__spreadValues({}, props), {\n type: \"contextmenu\",\n listener: (event) => {\n if (!shouldHideOnInteractOutside(hideOnInteractOutside, event)) return;\n store.hide();\n }\n }));\n}\n\nexport {\n useHideOnInteractOutside\n};\n","\"use client\";\nimport {\n FocusableContext\n} from \"./SWN3JYXT.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n useWrapElement\n} from \"./ABQUS43J.js\";\nimport {\n __objRest\n} from \"./3YLGPPWQ.js\";\n\n// src/focusable/focusable-container.tsx\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"div\";\nvar useFocusableContainer = createHook(function useFocusableContainer2(_a) {\n var _b = _a, { autoFocusOnShow = true } = _b, props = __objRest(_b, [\"autoFocusOnShow\"]);\n props = useWrapElement(\n props,\n (element) => /* @__PURE__ */ jsx(FocusableContext.Provider, { value: autoFocusOnShow, children: element }),\n [autoFocusOnShow]\n );\n return props;\n});\nvar FocusableContainer = forwardRef(function FocusableContainer2(props) {\n const htmlProps = useFocusableContainer(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n useFocusableContainer,\n FocusableContainer\n};\n","\"use client\";\n\n// src/heading/heading-context.tsx\nimport { createContext } from \"react\";\nvar HeadingContext = createContext(0);\n\nexport {\n HeadingContext\n};\n","\"use client\";\nimport {\n HeadingContext\n} from \"./CZ4GFWYL.js\";\n\n// src/heading/heading-level.tsx\nimport { useContext } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction HeadingLevel({ level, children }) {\n const contextLevel = useContext(HeadingContext);\n const nextLevel = Math.max(\n Math.min(level || contextLevel + 1, 6),\n 1\n );\n return /* @__PURE__ */ jsx(HeadingContext.Provider, { value: nextLevel, children });\n}\n\nexport {\n HeadingLevel\n};\n","\"use client\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/visually-hidden/visually-hidden.tsx\nvar TagName = \"span\";\nvar useVisuallyHidden = createHook(\n function useVisuallyHidden2(props) {\n props = __spreadProps(__spreadValues({}, props), {\n style: __spreadValues({\n border: 0,\n clip: \"rect(0 0 0 0)\",\n height: \"1px\",\n margin: \"-1px\",\n overflow: \"hidden\",\n padding: 0,\n position: \"absolute\",\n whiteSpace: \"nowrap\",\n width: \"1px\"\n }, props.style)\n });\n return props;\n }\n);\nvar VisuallyHidden = forwardRef(function VisuallyHidden2(props) {\n const htmlProps = useVisuallyHidden(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n useVisuallyHidden,\n VisuallyHidden\n};\n","\"use client\";\nimport {\n useVisuallyHidden\n} from \"./XX67R432.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/focus-trap/focus-trap.tsx\nvar TagName = \"span\";\nvar useFocusTrap = createHook(\n function useFocusTrap2(props) {\n props = __spreadProps(__spreadValues({\n \"data-focus-trap\": \"\",\n tabIndex: 0,\n \"aria-hidden\": true\n }, props), {\n style: __spreadValues({\n // Prevents unintended scroll jumps.\n position: \"fixed\",\n top: 0,\n left: 0\n }, props.style)\n });\n props = useVisuallyHidden(props);\n return props;\n }\n);\nvar FocusTrap = forwardRef(function FocusTrap2(props) {\n const htmlProps = useFocusTrap(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n useFocusTrap,\n FocusTrap\n};\n","\"use client\";\n\n// src/portal/portal-context.tsx\nimport { createContext } from \"react\";\nvar PortalContext = createContext(null);\n\nexport {\n PortalContext\n};\n","\"use client\";\nimport {\n FocusTrap\n} from \"./W3VI7GFU.js\";\nimport {\n PortalContext\n} from \"./AOQQTIBO.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n useMergeRefs,\n useSafeLayoutEffect,\n useWrapElement\n} from \"./ABQUS43J.js\";\nimport {\n setRef\n} from \"./SK3NAZA3.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/portal/portal.tsx\nimport { getDocument } from \"@ariakit/core/utils/dom\";\nimport { isFocusEventOutside } from \"@ariakit/core/utils/events\";\nimport {\n disableFocusIn,\n getNextTabbable,\n getPreviousTabbable,\n restoreFocusIn\n} from \"@ariakit/core/utils/focus\";\nimport { useContext, useEffect, useRef, useState } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar TagName = \"div\";\nfunction getRootElement(element) {\n return getDocument(element).body;\n}\nfunction getPortalElement(element, portalElement) {\n if (!portalElement) {\n return getDocument(element).createElement(\"div\");\n }\n if (typeof portalElement === \"function\") {\n return portalElement(element);\n }\n return portalElement;\n}\nfunction getRandomId(prefix = \"id\") {\n return `${prefix ? `${prefix}-` : \"\"}${Math.random().toString(36).slice(2, 8)}`;\n}\nfunction queueFocus(element) {\n queueMicrotask(() => {\n element == null ? void 0 : element.focus();\n });\n}\nvar usePortal = createHook(function usePortal2(_a) {\n var _b = _a, {\n preserveTabOrder,\n preserveTabOrderAnchor,\n portalElement,\n portalRef,\n portal = true\n } = _b, props = __objRest(_b, [\n \"preserveTabOrder\",\n \"preserveTabOrderAnchor\",\n \"portalElement\",\n \"portalRef\",\n \"portal\"\n ]);\n const ref = useRef(null);\n const refProp = useMergeRefs(ref, props.ref);\n const context = useContext(PortalContext);\n const [portalNode, setPortalNode] = useState(null);\n const [anchorPortalNode, setAnchorPortalNode] = useState(\n null\n );\n const outerBeforeRef = useRef(null);\n const innerBeforeRef = useRef(null);\n const innerAfterRef = useRef(null);\n const outerAfterRef = useRef(null);\n useSafeLayoutEffect(() => {\n const element = ref.current;\n if (!element || !portal) {\n setPortalNode(null);\n return;\n }\n const portalEl = getPortalElement(element, portalElement);\n if (!portalEl) {\n setPortalNode(null);\n return;\n }\n const isPortalInDocument = portalEl.isConnected;\n if (!isPortalInDocument) {\n const rootElement = context || getRootElement(element);\n rootElement.appendChild(portalEl);\n }\n if (!portalEl.id) {\n portalEl.id = element.id ? `portal/${element.id}` : getRandomId();\n }\n setPortalNode(portalEl);\n setRef(portalRef, portalEl);\n if (isPortalInDocument) return;\n return () => {\n portalEl.remove();\n setRef(portalRef, null);\n };\n }, [portal, portalElement, context, portalRef]);\n useSafeLayoutEffect(() => {\n if (!portal) return;\n if (!preserveTabOrder) return;\n if (!preserveTabOrderAnchor) return;\n const doc = getDocument(preserveTabOrderAnchor);\n const element = doc.createElement(\"span\");\n element.style.position = \"fixed\";\n preserveTabOrderAnchor.insertAdjacentElement(\"afterend\", element);\n setAnchorPortalNode(element);\n return () => {\n element.remove();\n setAnchorPortalNode(null);\n };\n }, [portal, preserveTabOrder, preserveTabOrderAnchor]);\n useEffect(() => {\n if (!portalNode) return;\n if (!preserveTabOrder) return;\n let raf = 0;\n const onFocus = (event) => {\n if (!isFocusEventOutside(event)) return;\n const focusing = event.type === \"focusin\";\n cancelAnimationFrame(raf);\n if (focusing) {\n return restoreFocusIn(portalNode);\n }\n raf = requestAnimationFrame(() => {\n disableFocusIn(portalNode, true);\n });\n };\n portalNode.addEventListener(\"focusin\", onFocus, true);\n portalNode.addEventListener(\"focusout\", onFocus, true);\n return () => {\n cancelAnimationFrame(raf);\n portalNode.removeEventListener(\"focusin\", onFocus, true);\n portalNode.removeEventListener(\"focusout\", onFocus, true);\n };\n }, [portalNode, preserveTabOrder]);\n props = useWrapElement(\n props,\n (element) => {\n element = // While the portal node is not in the DOM, we need to pass the\n // current context to the portal context, otherwise it's going to\n // reset to the body element on nested portals.\n /* @__PURE__ */ jsx(PortalContext.Provider, { value: portalNode || context, children: element });\n if (!portal) return element;\n if (!portalNode) {\n return /* @__PURE__ */ jsx(\n \"span\",\n {\n ref: refProp,\n id: props.id,\n style: { position: \"fixed\" },\n hidden: true\n }\n );\n }\n element = /* @__PURE__ */ jsxs(Fragment, { children: [\n preserveTabOrder && portalNode && /* @__PURE__ */ jsx(\n FocusTrap,\n {\n ref: innerBeforeRef,\n \"data-focus-trap\": props.id,\n className: \"__focus-trap-inner-before\",\n onFocus: (event) => {\n if (isFocusEventOutside(event, portalNode)) {\n queueFocus(getNextTabbable());\n } else {\n queueFocus(outerBeforeRef.current);\n }\n }\n }\n ),\n element,\n preserveTabOrder && portalNode && /* @__PURE__ */ jsx(\n FocusTrap,\n {\n ref: innerAfterRef,\n \"data-focus-trap\": props.id,\n className: \"__focus-trap-inner-after\",\n onFocus: (event) => {\n if (isFocusEventOutside(event, portalNode)) {\n queueFocus(getPreviousTabbable());\n } else {\n queueFocus(outerAfterRef.current);\n }\n }\n }\n )\n ] });\n if (portalNode) {\n element = createPortal(element, portalNode);\n }\n let preserveTabOrderElement = /* @__PURE__ */ jsxs(Fragment, { children: [\n preserveTabOrder && portalNode && /* @__PURE__ */ jsx(\n FocusTrap,\n {\n ref: outerBeforeRef,\n \"data-focus-trap\": props.id,\n className: \"__focus-trap-outer-before\",\n onFocus: (event) => {\n const fromOuter = event.relatedTarget === outerAfterRef.current;\n if (!fromOuter && isFocusEventOutside(event, portalNode)) {\n queueFocus(innerBeforeRef.current);\n } else {\n queueFocus(getPreviousTabbable());\n }\n }\n }\n ),\n preserveTabOrder && // We're using position: fixed here so that the browser doesn't\n // add margin to the element when setting gap on a parent element.\n /* @__PURE__ */ jsx(\"span\", { \"aria-owns\": portalNode == null ? void 0 : portalNode.id, style: { position: \"fixed\" } }),\n preserveTabOrder && portalNode && /* @__PURE__ */ jsx(\n FocusTrap,\n {\n ref: outerAfterRef,\n \"data-focus-trap\": props.id,\n className: \"__focus-trap-outer-after\",\n onFocus: (event) => {\n if (isFocusEventOutside(event, portalNode)) {\n queueFocus(innerAfterRef.current);\n } else {\n const nextTabbable = getNextTabbable();\n if (nextTabbable === innerBeforeRef.current) {\n requestAnimationFrame(() => {\n var _a2;\n return (_a2 = getNextTabbable()) == null ? void 0 : _a2.focus();\n });\n return;\n }\n queueFocus(nextTabbable);\n }\n }\n }\n )\n ] });\n if (anchorPortalNode && preserveTabOrder) {\n preserveTabOrderElement = createPortal(\n preserveTabOrderElement,\n anchorPortalNode\n );\n }\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n preserveTabOrderElement,\n element\n ] });\n },\n [portalNode, context, portal, props.id, preserveTabOrder, anchorPortalNode]\n );\n props = __spreadProps(__spreadValues({}, props), {\n ref: refProp\n });\n return props;\n});\nvar Portal = forwardRef(function Portal2(props) {\n const htmlProps = usePortal(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n usePortal,\n Portal\n};\n","\"use client\";\nimport {\n DialogBackdrop\n} from \"./63FEHJZV.js\";\nimport {\n disableTree,\n disableTreeOutside\n} from \"./KZAQFFOU.js\";\nimport {\n usePreventBodyScroll\n} from \"./BGQ3KQ5M.js\";\nimport {\n useNestedDialogs\n} from \"./TOU75OXH.js\";\nimport {\n useHideOnInteractOutside\n} from \"./WBDYNH73.js\";\nimport {\n isElementMarked,\n markTreeOutside\n} from \"./2PGBN2Y4.js\";\nimport {\n supportsInert\n} from \"./677M2CI3.js\";\nimport {\n prependHiddenDismiss\n} from \"./6GXEOXGT.js\";\nimport {\n createWalkTreeSnapshot\n} from \"./AOUGVQZ3.js\";\nimport {\n useFocusableContainer\n} from \"./ZWYATQFU.js\";\nimport {\n HeadingLevel\n} from \"./5M6RIVE2.js\";\nimport {\n usePortal\n} from \"./O37CNYMR.js\";\nimport {\n isHidden,\n useDisclosureContent\n} from \"./VGCJ63VH.js\";\nimport {\n DialogDescriptionContext,\n DialogHeadingContext,\n DialogScopedContextProvider,\n useDialogProviderContext\n} from \"./RS7LB2H4.js\";\nimport {\n useFocusable\n} from \"./LVA2YJMS.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n useDialogStore\n} from \"./BM6PGYQY.js\";\nimport {\n useStoreState\n} from \"./YV4JVR4I.js\";\nimport {\n useBooleanEvent,\n useEvent,\n useId,\n useMergeRefs,\n usePortalRef,\n useSafeLayoutEffect,\n useWrapElement\n} from \"./ABQUS43J.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/dialog/dialog.tsx\nimport {\n contains,\n getActiveElement,\n getDocument,\n getWindow,\n isButton\n} from \"@ariakit/core/utils/dom\";\nimport {\n addGlobalEventListener,\n queueBeforeEvent\n} from \"@ariakit/core/utils/events\";\nimport {\n focusIfNeeded,\n getFirstTabbableIn,\n isFocusable\n} from \"@ariakit/core/utils/focus\";\nimport { chain } from \"@ariakit/core/utils/misc\";\nimport { isSafari } from \"@ariakit/core/utils/platform\";\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar TagName = \"div\";\nvar isSafariBrowser = isSafari();\nfunction isAlreadyFocusingAnotherElement(dialog) {\n const activeElement = getActiveElement();\n if (!activeElement) return false;\n if (dialog && contains(dialog, activeElement)) return false;\n if (isFocusable(activeElement)) return true;\n return false;\n}\nfunction getElementFromProp(prop, focusable = false) {\n if (!prop) return null;\n const element = \"current\" in prop ? prop.current : prop;\n if (!element) return null;\n if (focusable) return isFocusable(element) ? element : null;\n return element;\n}\nvar useDialog = createHook(function useDialog2(_a) {\n var _b = _a, {\n store: storeProp,\n open: openProp,\n onClose,\n focusable = true,\n modal = true,\n portal = !!modal,\n backdrop = !!modal,\n hideOnEscape = true,\n hideOnInteractOutside = true,\n getPersistentElements,\n preventBodyScroll = !!modal,\n autoFocusOnShow = true,\n autoFocusOnHide = true,\n initialFocus,\n finalFocus,\n unmountOnHide,\n unstable_treeSnapshotKey\n } = _b, props = __objRest(_b, [\n \"store\",\n \"open\",\n \"onClose\",\n \"focusable\",\n \"modal\",\n \"portal\",\n \"backdrop\",\n \"hideOnEscape\",\n \"hideOnInteractOutside\",\n \"getPersistentElements\",\n \"preventBodyScroll\",\n \"autoFocusOnShow\",\n \"autoFocusOnHide\",\n \"initialFocus\",\n \"finalFocus\",\n \"unmountOnHide\",\n \"unstable_treeSnapshotKey\"\n ]);\n const context = useDialogProviderContext();\n const ref = useRef(null);\n const store = useDialogStore({\n store: storeProp || context,\n open: openProp,\n setOpen(open2) {\n if (open2) return;\n const dialog = ref.current;\n if (!dialog) return;\n const event = new Event(\"close\", { bubbles: false, cancelable: true });\n if (onClose) {\n dialog.addEventListener(\"close\", onClose, { once: true });\n }\n dialog.dispatchEvent(event);\n if (!event.defaultPrevented) return;\n store.setOpen(true);\n }\n });\n const { portalRef, domReady } = usePortalRef(portal, props.portalRef);\n const preserveTabOrderProp = props.preserveTabOrder;\n const preserveTabOrder = useStoreState(\n store,\n (state) => preserveTabOrderProp && !modal && state.mounted\n );\n const id = useId(props.id);\n const open = useStoreState(store, \"open\");\n const mounted = useStoreState(store, \"mounted\");\n const contentElement = useStoreState(store, \"contentElement\");\n const hidden = isHidden(mounted, props.hidden, props.alwaysVisible);\n usePreventBodyScroll(contentElement, id, preventBodyScroll && !hidden);\n useHideOnInteractOutside(store, hideOnInteractOutside, domReady);\n const { wrapElement, nestedDialogs } = useNestedDialogs(store);\n props = useWrapElement(props, wrapElement, [wrapElement]);\n useSafeLayoutEffect(() => {\n if (!open) return;\n const dialog = ref.current;\n const activeElement = getActiveElement(dialog, true);\n if (!activeElement) return;\n if (activeElement.tagName === \"BODY\") return;\n if (dialog && contains(dialog, activeElement)) return;\n store.setDisclosureElement(activeElement);\n }, [store, open]);\n if (isSafariBrowser) {\n useEffect(() => {\n if (!mounted) return;\n const { disclosureElement } = store.getState();\n if (!disclosureElement) return;\n if (!isButton(disclosureElement)) return;\n const onMouseDown = () => {\n let receivedFocus = false;\n const onFocus = () => {\n receivedFocus = true;\n };\n const options = { capture: true, once: true };\n disclosureElement.addEventListener(\"focusin\", onFocus, options);\n queueBeforeEvent(disclosureElement, \"mouseup\", () => {\n disclosureElement.removeEventListener(\"focusin\", onFocus, true);\n if (receivedFocus) return;\n focusIfNeeded(disclosureElement);\n });\n };\n disclosureElement.addEventListener(\"mousedown\", onMouseDown);\n return () => {\n disclosureElement.removeEventListener(\"mousedown\", onMouseDown);\n };\n }, [store, mounted]);\n }\n useEffect(() => {\n if (!mounted) return;\n if (!domReady) return;\n const dialog = ref.current;\n if (!dialog) return;\n const win = getWindow(dialog);\n const viewport = win.visualViewport || win;\n const setViewportHeight = () => {\n var _a2, _b2;\n const height = (_b2 = (_a2 = win.visualViewport) == null ? void 0 : _a2.height) != null ? _b2 : win.innerHeight;\n dialog.style.setProperty(\"--dialog-viewport-height\", `${height}px`);\n };\n setViewportHeight();\n viewport.addEventListener(\"resize\", setViewportHeight);\n return () => {\n viewport.removeEventListener(\"resize\", setViewportHeight);\n };\n }, [mounted, domReady]);\n useEffect(() => {\n if (!modal) return;\n if (!mounted) return;\n if (!domReady) return;\n const dialog = ref.current;\n if (!dialog) return;\n const existingDismiss = dialog.querySelector(\"[data-dialog-dismiss]\");\n if (existingDismiss) return;\n return prependHiddenDismiss(dialog, store.hide);\n }, [store, modal, mounted, domReady]);\n useSafeLayoutEffect(() => {\n if (!supportsInert()) return;\n if (open) return;\n if (!mounted) return;\n if (!domReady) return;\n const dialog = ref.current;\n if (!dialog) return;\n return disableTree(dialog);\n }, [open, mounted, domReady]);\n const canTakeTreeSnapshot = open && domReady;\n useSafeLayoutEffect(() => {\n if (!id) return;\n if (!canTakeTreeSnapshot) return;\n const dialog = ref.current;\n return createWalkTreeSnapshot(id, [dialog]);\n }, [id, canTakeTreeSnapshot, unstable_treeSnapshotKey]);\n const getPersistentElementsProp = useEvent(getPersistentElements);\n useSafeLayoutEffect(() => {\n if (!id) return;\n if (!canTakeTreeSnapshot) return;\n const { disclosureElement } = store.getState();\n const dialog = ref.current;\n const persistentElements = getPersistentElementsProp() || [];\n const allElements = [\n dialog,\n ...persistentElements,\n ...nestedDialogs.map((dialog2) => dialog2.getState().contentElement)\n ];\n if (modal) {\n return chain(\n markTreeOutside(id, allElements),\n disableTreeOutside(id, allElements)\n );\n }\n return markTreeOutside(id, [disclosureElement, ...allElements]);\n }, [\n id,\n store,\n canTakeTreeSnapshot,\n getPersistentElementsProp,\n nestedDialogs,\n modal,\n unstable_treeSnapshotKey\n ]);\n const mayAutoFocusOnShow = !!autoFocusOnShow;\n const autoFocusOnShowProp = useBooleanEvent(autoFocusOnShow);\n const [autoFocusEnabled, setAutoFocusEnabled] = useState(false);\n useEffect(() => {\n if (!open) return;\n if (!mayAutoFocusOnShow) return;\n if (!domReady) return;\n if (!(contentElement == null ? void 0 : contentElement.isConnected)) return;\n const element = getElementFromProp(initialFocus, true) || // If no initial focus is specified, we try to focus the first element\n // with the autofocus attribute. If it's an Ariakit component, the\n // Focusable component will consume the autoFocus prop and add the\n // data-autofocus attribute to the element instead.\n contentElement.querySelector(\n \"[data-autofocus=true],[autofocus]\"\n ) || // We have to fallback to the first focusable element otherwise portaled\n // dialogs with preserveTabOrder set to true will not receive focus\n // properly because the elements aren't tabbable until the dialog receives\n // focus.\n getFirstTabbableIn(contentElement, true, portal && preserveTabOrder) || // Finally, we fallback to the dialog element itself.\n contentElement;\n const isElementFocusable = isFocusable(element);\n if (!autoFocusOnShowProp(isElementFocusable ? element : null)) return;\n setAutoFocusEnabled(true);\n queueMicrotask(() => {\n element.focus();\n if (!isSafariBrowser) return;\n element.scrollIntoView({ block: \"nearest\", inline: \"nearest\" });\n });\n }, [\n open,\n mayAutoFocusOnShow,\n domReady,\n contentElement,\n initialFocus,\n portal,\n preserveTabOrder,\n autoFocusOnShowProp\n ]);\n const mayAutoFocusOnHide = !!autoFocusOnHide;\n const autoFocusOnHideProp = useBooleanEvent(autoFocusOnHide);\n const [hasOpened, setHasOpened] = useState(false);\n useEffect(() => {\n if (!open) return;\n setHasOpened(true);\n return () => setHasOpened(false);\n }, [open]);\n const focusOnHide = useCallback(\n (dialog, retry = true) => {\n const { disclosureElement } = store.getState();\n if (isAlreadyFocusingAnotherElement(dialog)) return;\n let element = getElementFromProp(finalFocus) || disclosureElement;\n if (element == null ? void 0 : element.id) {\n const doc = getDocument(element);\n const selector = `[aria-activedescendant=\"${element.id}\"]`;\n const composite = doc.querySelector(selector);\n if (composite) {\n element = composite;\n }\n }\n if (element && !isFocusable(element)) {\n const maybeParentDialog = element.closest(\"[data-dialog]\");\n if (maybeParentDialog == null ? void 0 : maybeParentDialog.id) {\n const doc = getDocument(maybeParentDialog);\n const selector = `[aria-controls~=\"${maybeParentDialog.id}\"]`;\n const control = doc.querySelector(selector);\n if (control) {\n element = control;\n }\n }\n }\n const isElementFocusable = element && isFocusable(element);\n if (!isElementFocusable && retry) {\n requestAnimationFrame(() => focusOnHide(dialog, false));\n return;\n }\n if (!autoFocusOnHideProp(isElementFocusable ? element : null)) return;\n if (!isElementFocusable) return;\n element == null ? void 0 : element.focus();\n },\n [store, finalFocus, autoFocusOnHideProp]\n );\n const focusedOnHideRef = useRef(false);\n useSafeLayoutEffect(() => {\n if (open) return;\n if (!hasOpened) return;\n if (!mayAutoFocusOnHide) return;\n const dialog = ref.current;\n focusedOnHideRef.current = true;\n focusOnHide(dialog);\n }, [open, hasOpened, domReady, mayAutoFocusOnHide, focusOnHide]);\n useEffect(() => {\n if (!hasOpened) return;\n if (!mayAutoFocusOnHide) return;\n const dialog = ref.current;\n return () => {\n if (focusedOnHideRef.current) {\n focusedOnHideRef.current = false;\n return;\n }\n focusOnHide(dialog);\n };\n }, [hasOpened, mayAutoFocusOnHide, focusOnHide]);\n const hideOnEscapeProp = useBooleanEvent(hideOnEscape);\n useEffect(() => {\n if (!domReady) return;\n if (!mounted) return;\n const onKeyDown = (event) => {\n if (event.key !== \"Escape\") return;\n if (event.defaultPrevented) return;\n const dialog = ref.current;\n if (!dialog) return;\n if (isElementMarked(dialog)) return;\n const target = event.target;\n if (!target) return;\n const { disclosureElement } = store.getState();\n const isValidTarget = () => {\n if (target.tagName === \"BODY\") return true;\n if (contains(dialog, target)) return true;\n if (!disclosureElement) return true;\n if (contains(disclosureElement, target)) return true;\n return false;\n };\n if (!isValidTarget()) return;\n if (!hideOnEscapeProp(event)) return;\n store.hide();\n };\n return addGlobalEventListener(\"keydown\", onKeyDown, true);\n }, [store, domReady, mounted, hideOnEscapeProp]);\n props = useWrapElement(\n props,\n (element) => /* @__PURE__ */ jsx(HeadingLevel, { level: modal ? 1 : void 0, children: element }),\n [modal]\n );\n const hiddenProp = props.hidden;\n const alwaysVisible = props.alwaysVisible;\n props = useWrapElement(\n props,\n (element) => {\n if (!backdrop) return element;\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n DialogBackdrop,\n {\n store,\n backdrop,\n hidden: hiddenProp,\n alwaysVisible\n }\n ),\n element\n ] });\n },\n [store, backdrop, hiddenProp, alwaysVisible]\n );\n const [headingId, setHeadingId] = useState();\n const [descriptionId, setDescriptionId] = useState();\n props = useWrapElement(\n props,\n (element) => /* @__PURE__ */ jsx(DialogScopedContextProvider, { value: store, children: /* @__PURE__ */ jsx(DialogHeadingContext.Provider, { value: setHeadingId, children: /* @__PURE__ */ jsx(DialogDescriptionContext.Provider, { value: setDescriptionId, children: element }) }) }),\n [store]\n );\n props = __spreadProps(__spreadValues({\n id,\n \"data-dialog\": \"\",\n role: \"dialog\",\n tabIndex: focusable ? -1 : void 0,\n \"aria-labelledby\": headingId,\n \"aria-describedby\": descriptionId\n }, props), {\n ref: useMergeRefs(ref, props.ref)\n });\n props = useFocusableContainer(__spreadProps(__spreadValues({}, props), {\n autoFocusOnShow: autoFocusEnabled\n }));\n props = useDisclosureContent(__spreadValues({ store }, props));\n props = useFocusable(__spreadProps(__spreadValues({}, props), { focusable }));\n props = usePortal(__spreadProps(__spreadValues({ portal }, props), { portalRef, preserveTabOrder }));\n return props;\n});\nfunction createDialogComponent(Component, useProviderContext = useDialogProviderContext) {\n return forwardRef(function DialogComponent(props) {\n const context = useProviderContext();\n const store = props.store || context;\n const mounted = useStoreState(\n store,\n (state) => !props.unmountOnHide || (state == null ? void 0 : state.mounted) || !!props.open\n );\n if (!mounted) return null;\n return /* @__PURE__ */ jsx(Component, __spreadValues({}, props));\n });\n}\nvar Dialog = createDialogComponent(\n forwardRef(function Dialog2(props) {\n const htmlProps = useDialog(props);\n return createElement(TagName, htmlProps);\n }),\n useDialogProviderContext\n);\n\nexport {\n useDialog,\n createDialogComponent,\n Dialog\n};\n","\"use client\";\n\n// src/dialog/utils/use-previous-mouse-down-ref.ts\nimport { addGlobalEventListener } from \"@ariakit/core/utils/events\";\nimport { useEffect, useRef } from \"react\";\nfunction usePreviousMouseDownRef(enabled) {\n const previousMouseDownRef = useRef();\n useEffect(() => {\n if (!enabled) {\n previousMouseDownRef.current = null;\n return;\n }\n const onMouseDown = (event) => {\n previousMouseDownRef.current = event.target;\n };\n return addGlobalEventListener(\"mousedown\", onMouseDown, true);\n }, [enabled]);\n return previousMouseDownRef;\n}\n\nexport {\n usePreviousMouseDownRef\n};\n","\"use client\";\n\n// src/dialog/utils/prepend-hidden-dismiss.ts\nimport { getDocument } from \"@ariakit/core/utils/dom\";\nfunction prependHiddenDismiss(container, onClick) {\n const document = getDocument(container);\n const button = document.createElement(\"button\");\n button.type = \"button\";\n button.tabIndex = -1;\n button.textContent = \"Dismiss popup\";\n Object.assign(button.style, {\n border: \"0px\",\n clip: \"rect(0 0 0 0)\",\n height: \"1px\",\n margin: \"-1px\",\n overflow: \"hidden\",\n padding: \"0px\",\n position: \"absolute\",\n whiteSpace: \"nowrap\",\n width: \"1px\"\n });\n button.addEventListener(\"click\", onClick);\n container.prepend(button);\n const removeHiddenDismiss = () => {\n button.removeEventListener(\"click\", onClick);\n button.remove();\n };\n return removeHiddenDismiss;\n}\n\nexport {\n prependHiddenDismiss\n};\n","\"use client\";\n\n// src/dialog/utils/is-focus-trap.ts\nfunction isFocusTrap(element, ...ids) {\n if (!element) return false;\n const attr = element.getAttribute(\"data-focus-trap\");\n if (attr == null) return false;\n if (!ids.length) return true;\n if (attr === \"\") return false;\n return ids.some((id) => attr === id);\n}\n\nexport {\n isFocusTrap\n};\n","const sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nconst oppositeAlignmentMap = {\n start: 'end',\n end: 'start'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nfunction getSideAxis(placement) {\n return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);\n}\nfunction getSideList(side, isStart, rtl) {\n const lr = ['left', 'right'];\n const rl = ['right', 'left'];\n const tb = ['top', 'bottom'];\n const bt = ['bottom', 'top'];\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rl : lr;\n return isStart ? lr : rl;\n case 'left':\n case 'right':\n return isStart ? tb : bt;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n return {\n ...rect,\n top: rect.y,\n left: rect.x,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n","import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n let {\n reference,\n floating\n } = _ref;\n const sideAxis = getSideAxis(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const alignLength = getAxisLength(alignmentAxis);\n const side = getSide(placement);\n const isVertical = sideAxis === 'y';\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n let coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n switch (getAlignment(placement)) {\n case 'start':\n coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n case 'end':\n coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n }\n return coords;\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a reference element when it is given a certain positioning strategy.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n const validMiddleware = middleware.filter(Boolean);\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement(rects, placement, rtl);\n let statefulPlacement = placement;\n let middlewareData = {};\n let resetCount = 0;\n for (let i = 0; i < validMiddleware.length; i++) {\n const {\n name,\n fn\n } = validMiddleware[i];\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform,\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData = {\n ...middlewareData,\n [name]: {\n ...middlewareData[name],\n ...data\n }\n };\n if (reset && resetCount <= 50) {\n resetCount++;\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n ({\n x,\n y\n } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n continue;\n }\n }\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n var _await$platform$isEle;\n if (options === void 0) {\n options = {};\n }\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = state;\n const {\n boundary = 'clippingAncestors',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = evaluate(options, state);\n const paddingObject = getPaddingObject(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n boundary,\n rootBoundary,\n strategy\n }));\n const rect = elementContext === 'floating' ? {\n ...rects.floating,\n x,\n y\n } : rects.reference;\n const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n x: 1,\n y: 1\n } : {\n x: 1,\n y: 1\n };\n const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n rect,\n offsetParent,\n strategy\n }) : rect);\n return {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n };\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const min$1 = minPadding;\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(min$1, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. This stops `shift()` from taking action, but can\n // be worked around by calling it again after the `arrow()` if desired.\n const shouldAddOffset = getAlignment(placement) != null && center != offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < min$1 ? min$1 - center : max - center : 0;\n return {\n [axis]: coords[axis] - alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset + alignmentOffset\n }\n };\n }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n return true;\n });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'autoPlacement',\n options,\n async fn(state) {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n const {\n rects,\n middlewareData,\n placement,\n platform,\n elements\n } = state;\n const {\n crossAxis = false,\n alignment,\n allowedPlacements = placements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n const currentPlacement = placements$1[currentIndex];\n if (currentPlacement == null) {\n return {};\n }\n const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n\n // Make `computeCoords` start from the right place.\n if (placement !== currentPlacement) {\n return {\n reset: {\n placement: placements$1[0]\n }\n };\n }\n const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements$1[currentIndex + 1];\n\n // There are more placements to check.\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n const placementsSortedByMostSpace = allOverflows.map(d => {\n const alignment = getAlignment(d.placement);\n return [d.placement, alignment && crossAxis ?\n // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n // Check only the mainAxis.\n d.overflows[0], d.overflows];\n }).sort((a, b) => a[1] - b[1]);\n const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n // Aligned placements should not check their opposite crossAxis\n // side.\n getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n if (resetPlacement !== placement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n return {};\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options,\n async fn(state) {\n var _middlewareData$flip;\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement,\n platform,\n elements\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n fallbackAxisSideDirection = 'none',\n flipAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n const side = getSide(placement);\n const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== 'none') {\n fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n }\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n const sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }];\n\n // One or more sides is overflowing.\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip2, _overflowsData$filter;\n const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n const nextPlacement = placements[nextIndex];\n if (nextPlacement) {\n // Try next placement and re-run the lifecycle.\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n 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;\n\n // Otherwise fallback.\n if (!resetPlacement) {\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$map$so;\n const placement = (_overflowsData$map$so = overflowsData.map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0];\n if (placement) {\n resetPlacement = placement;\n }\n break;\n }\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n }\n if (placement !== resetPlacement) {\n return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n }\n return {};\n }\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\nfunction isAnySideFullyClipped(overflow) {\n return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'hide',\n options,\n async fn(state) {\n const {\n rects\n } = state;\n const {\n strategy = 'referenceHidden',\n ...detectOverflowOptions\n } = evaluate(options, state);\n switch (strategy) {\n case 'referenceHidden':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const offsets = getSideOffsets(overflow, rects.reference);\n return {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: isAnySideFullyClipped(offsets)\n }\n };\n }\n case 'escaped':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n altBoundary: true\n });\n const offsets = getSideOffsets(overflow, rects.floating);\n return {\n data: {\n escapedOffsets: offsets,\n escaped: isAnySideFullyClipped(offsets)\n }\n };\n }\n default:\n {\n return {};\n }\n }\n }\n };\n};\n\nfunction getBoundingRect(rects) {\n const minX = min(...rects.map(rect => rect.left));\n const minY = min(...rects.map(rect => rect.top));\n const maxX = max(...rects.map(rect => rect.right));\n const maxY = max(...rects.map(rect => rect.bottom));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction getRectsByLine(rects) {\n const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n const groups = [];\n let prevRect = null;\n for (let i = 0; i < sortedRects.length; i++) {\n const rect = sortedRects[i];\n if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n groups.push([rect]);\n } else {\n groups[groups.length - 1].push(rect);\n }\n prevRect = rect;\n }\n return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'inline',\n options,\n async fn(state) {\n const {\n placement,\n elements,\n rects,\n platform,\n strategy\n } = state;\n // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n const {\n padding = 2,\n x,\n y\n } = evaluate(options, state);\n const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n const clientRects = getRectsByLine(nativeClientRects);\n const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n const paddingObject = getPaddingObject(padding);\n function getBoundingClientRect() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n // Find the first rect in which the point is fully inside.\n return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n }\n\n // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if (getSideAxis(placement) === 'y') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getSide(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n const isLeftSide = getSide(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n const left = minLeft;\n const right = maxRight;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n return fallback;\n }\n const resetRects = await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n });\n if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n return {\n reset: {\n rects: resetRects\n }\n };\n }\n return {};\n }\n };\n};\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\nasync function convertValueToCoords(state, options) {\n const {\n placement,\n platform,\n elements\n } = state;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isVertical = getSideAxis(placement) === 'y';\n const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = evaluate(options, state);\n\n // eslint-disable-next-line prefer-const\n let {\n mainAxis,\n crossAxis,\n alignmentAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: 0,\n crossAxis: 0,\n alignmentAxis: null,\n ...rawValue\n };\n if (alignment && typeof alignmentAxis === 'number') {\n crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n }\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: 'offset',\n options,\n async fn(state) {\n const {\n x,\n y\n } = state;\n const diffCoords = await convertValueToCoords(state, options);\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: diffCoords\n };\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const crossAxis = getSideAxis(getSide(placement));\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n if (checkMainAxis) {\n const minSide = mainAxis === 'y' ? 'top' : 'left';\n const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n const min = mainAxisCoord + overflow[minSide];\n const max = mainAxisCoord - overflow[maxSide];\n mainAxisCoord = clamp(min, mainAxisCoord, max);\n }\n if (checkCrossAxis) {\n const minSide = crossAxis === 'y' ? 'top' : 'left';\n const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n const min = crossAxisCoord + overflow[minSide];\n const max = crossAxisCoord - overflow[maxSide];\n crossAxisCoord = clamp(min, crossAxisCoord, max);\n }\n const limitedCoords = limiter.fn({\n ...state,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return {\n ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y\n }\n };\n }\n };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options,\n fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = state;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = evaluate(offset, state);\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: 0,\n crossAxis: 0,\n ...rawOffset\n };\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = ['top', 'left'].includes(getSide(placement));\n 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);\n 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);\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'size',\n options,\n async fn(state) {\n const {\n placement,\n rects,\n platform,\n elements\n } = state;\n const {\n apply = () => {},\n ...detectOverflowOptions\n } = evaluate(options, state);\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isYAxis = getSideAxis(placement) === 'y';\n const {\n width,\n height\n } = rects.floating;\n let heightSide;\n let widthSide;\n if (side === 'top' || side === 'bottom') {\n heightSide = side;\n widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n } else {\n widthSide = side;\n heightSide = alignment === 'end' ? 'top' : 'bottom';\n }\n const overflowAvailableHeight = height - overflow[heightSide];\n const overflowAvailableWidth = width - overflow[widthSide];\n const noShift = !state.middlewareData.shift;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if (isYAxis) {\n const maximumClippingWidth = width - overflow.left - overflow.right;\n availableWidth = alignment || noShift ? min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;\n } else {\n const maximumClippingHeight = height - overflow.top - overflow.bottom;\n availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;\n }\n if (noShift && !alignment) {\n const xMin = max(overflow.left, 0);\n const xMax = max(overflow.right, 0);\n const yMin = max(overflow.top, 0);\n const yMax = max(overflow.bottom, 0);\n if (isYAxis) {\n availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));\n } else {\n availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));\n }\n }\n await apply({\n ...state,\n availableWidth,\n availableHeight\n });\n const nextDimensions = await platform.getDimensions(elements.floating);\n if (width !== nextDimensions.width || height !== nextDimensions.height) {\n return {\n reset: {\n rects: true\n }\n };\n }\n return {};\n }\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n","/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nconst oppositeAlignmentMap = {\n start: 'end',\n end: 'start'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nfunction getSideAxis(placement) {\n return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);\n}\nfunction getSideList(side, isStart, rtl) {\n const lr = ['left', 'right'];\n const rl = ['right', 'left'];\n const tb = ['top', 'bottom'];\n const bt = ['bottom', 'top'];\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rl : lr;\n return isStart ? lr : rl;\n case 'left':\n case 'right':\n return isStart ? tb : bt;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n const {\n x,\n y,\n width,\n height\n } = rect;\n return {\n width,\n height,\n top: y,\n left: x,\n right: x + width,\n bottom: y + height,\n x,\n y\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n","function hasWindow() {\n return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);\n}\nfunction isTableElement(element) {\n return ['table', 'td', 'th'].includes(getNodeName(element));\n}\nfunction isTopLayer(element) {\n return [':popover-open', ':modal'].some(selector => {\n try {\n return element.matches(selector);\n } catch (e) {\n return false;\n }\n });\n}\nfunction isContainingBlock(elementOrCss) {\n const webkit = isWebKit();\n const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else if (isTopLayer(currentNode)) {\n return null;\n }\n currentNode = getParentNode(currentNode);\n }\n return null;\n}\nfunction isWebKit() {\n if (typeof CSS === 'undefined' || !CSS.supports) return false;\n return CSS.supports('-webkit-backdrop-filter', 'none');\n}\nfunction isLastTraversableNode(node) {\n return ['html', 'body', '#document'].includes(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.scrollX,\n scrollTop: element.scrollY\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n const frameElement = getFrameElement(win);\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n }\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\nfunction getFrameElement(win) {\n return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n","import { rectToClientRect, autoPlacement as autoPlacement$1, shift as shift$1, flip as flip$1, size as size$1, hide as hide$1, arrow as arrow$1, inline as inline$1, limitShift as limitShift$1, computePosition as computePosition$1 } from '@floating-ui/core';\nexport { detectOverflow, offset } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle, isHTMLElement, isElement, getWindow, isWebKit, getDocumentElement, getNodeName, isOverflowElement, getNodeScroll, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n const css = getComputedStyle(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\n\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n return false;\n }\n return isFixed;\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement) {\n const win = getWindow(domElement);\n const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentWin = win;\n let currentIFrame = currentWin.frameElement;\n while (currentIFrame && offsetParent && offsetWin !== currentWin) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentWin = getWindow(currentIFrame);\n currentIFrame = currentWin.frameElement;\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\n\nconst topLayerSelectors = [':popover-open', ':modal'];\nfunction isTopLayer(floating) {\n return topLayerSelectors.some(selector => {\n try {\n return floating.matches(selector);\n } catch (e) {\n return false;\n }\n });\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n elements,\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isFixed = strategy === 'fixed';\n const documentElement = getDocumentElement(offsetParent);\n const topLayer = elements ? isTopLayer(elements.floating) : false;\n if (offsetParent === documentElement || topLayer && isFixed) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isHTMLElement(offsetParent)) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y\n };\n}\n\nfunction getClientRects(element) {\n return Array.from(element.getClientRects());\n}\n\nfunction getWindowScrollBarX(element) {\n // If <html> has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = element.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n if (getComputedStyle(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\nfunction getViewportRect(element, strategy) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n const visualViewportBased = isWebKit();\n if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport') {\n rect = getViewportRect(element, strategy);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n ...clippingAncestor,\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y\n };\n }\n return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n const parentNode = getParentNode(element);\n if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n return false;\n }\n return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n let currentContainingBlockComputedStyle = null;\n const elementIsFixed = getComputedStyle(element).position === 'fixed';\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n currentContainingBlockComputedStyle = null;\n }\n const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // Record last containing block for next iteration.\n currentContainingBlockComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstClippingAncestor = clippingAncestors[0];\n const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));\n return {\n width: clippingRect.right - clippingRect.left,\n height: clippingRect.bottom - clippingRect.top,\n x: clippingRect.left,\n y: clippingRect.top\n };\n}\n\nfunction getDimensions(element) {\n const {\n width,\n height\n } = getCssDimensions(element);\n return {\n width,\n height\n };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n const x = rect.left + scroll.scrollLeft - offsets.x;\n const y = rect.top + scroll.scrollTop - offsets.y;\n return {\n x,\n y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n return element.offsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n const window = getWindow(element);\n if (!isHTMLElement(element) || isTopLayer(element)) {\n return window;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {\n return window;\n }\n return offsetParent || getContainingBlock(element) || window;\n}\n\nconst getElementRects = async function (data) {\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n return {\n reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n floating: {\n x: 0,\n y: 0,\n ...(await getDimensionsFn(data.floating))\n }\n };\n};\n\nfunction isRTL(element) {\n return getComputedStyle(element).direction === 'rtl';\n}\n\nconst platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n var _io;\n clearTimeout(timeoutId);\n (_io = io) == null || _io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const {\n left,\n top,\n width,\n height\n } = element.getBoundingClientRect();\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 100);\n } else {\n refresh(false, ratio);\n }\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle <iframe>s\n root: root.ownerDocument\n });\n } catch (e) {\n io = new IntersectionObserver(handleObserve, options);\n }\n io.observe(element);\n }\n refresh(true);\n return cleanup;\n}\n\n/**\n * Automatically updates the position of the floating element when necessary.\n * Should only be called when the floating element is mounted on the DOM or\n * visible on the screen.\n * @returns cleanup function that should be invoked when the floating element is\n * removed from the DOM or hidden from the screen.\n * @see https://floating-ui.com/docs/autoUpdate\n */\nfunction autoUpdate(reference, floating, update, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n ancestorScroll = true,\n ancestorResize = true,\n elementResize = typeof ResizeObserver === 'function',\n layoutShift = typeof IntersectionObserver === 'function',\n animationFrame = false\n } = options;\n const referenceEl = unwrapElement(reference);\n const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.addEventListener('scroll', update, {\n passive: true\n });\n ancestorResize && ancestor.addEventListener('resize', update);\n });\n const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;\n let reobserveFrame = -1;\n let resizeObserver = null;\n if (elementResize) {\n resizeObserver = new ResizeObserver(_ref => {\n let [firstEntry] = _ref;\n if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {\n // Prevent update loops when using the `size` middleware.\n // https://github.com/floating-ui/floating-ui/issues/1740\n resizeObserver.unobserve(floating);\n cancelAnimationFrame(reobserveFrame);\n reobserveFrame = requestAnimationFrame(() => {\n var _resizeObserver;\n (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);\n });\n }\n update();\n });\n if (referenceEl && !animationFrame) {\n resizeObserver.observe(referenceEl);\n }\n resizeObserver.observe(floating);\n }\n let frameId;\n let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;\n if (animationFrame) {\n frameLoop();\n }\n function frameLoop() {\n const nextRefRect = getBoundingClientRect(reference);\n if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {\n update();\n }\n prevRefRect = nextRefRect;\n frameId = requestAnimationFrame(frameLoop);\n }\n update();\n return () => {\n var _resizeObserver2;\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.removeEventListener('scroll', update);\n ancestorResize && ancestor.removeEventListener('resize', update);\n });\n cleanupIo == null || cleanupIo();\n (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();\n resizeObserver = null;\n if (animationFrame) {\n cancelAnimationFrame(frameId);\n }\n };\n}\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = autoPlacement$1;\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = shift$1;\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = flip$1;\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = size$1;\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = hide$1;\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = arrow$1;\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = inline$1;\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = limitShift$1;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n */\nconst computePosition = (reference, floating, options) => {\n // This caches the expensive `getClippingElementAncestors` function so that\n // multiple lifecycle resets re-use the same result. It only lives for a\n // single call. If other functions become expensive, we can add them as well.\n const cache = new Map();\n const mergedOptions = {\n platform,\n ...options\n };\n const platformWithCache = {\n ...mergedOptions.platform,\n _c: cache\n };\n return computePosition$1(reference, floating, {\n ...mergedOptions,\n platform: platformWithCache\n });\n};\n\nexport { arrow, autoPlacement, autoUpdate, computePosition, flip, hide, inline, limitShift, platform, shift, size };\n","\"use client\";\nimport {\n createDialogComponent,\n useDialog\n} from \"./JC64G2H7.js\";\nimport {\n PopoverScopedContextProvider,\n usePopoverProviderContext\n} from \"./MTZPJQMC.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n useEvent,\n usePortalRef,\n useSafeLayoutEffect,\n useWrapElement\n} from \"./ABQUS43J.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/popover/popover.tsx\nimport { invariant } from \"@ariakit/core/utils/misc\";\nimport {\n arrow,\n autoUpdate,\n computePosition,\n flip,\n limitShift,\n offset,\n shift,\n size\n} from \"@floating-ui/dom\";\nimport { useRef, useState } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"div\";\nfunction createDOMRect(x = 0, y = 0, width = 0, height = 0) {\n if (typeof DOMRect === \"function\") {\n return new DOMRect(x, y, width, height);\n }\n const rect = {\n x,\n y,\n width,\n height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x\n };\n return __spreadProps(__spreadValues({}, rect), { toJSON: () => rect });\n}\nfunction getDOMRect(anchorRect) {\n if (!anchorRect) return createDOMRect();\n const { x, y, width, height } = anchorRect;\n return createDOMRect(x, y, width, height);\n}\nfunction getAnchorElement(anchorElement, getAnchorRect) {\n const contextElement = anchorElement || void 0;\n return {\n contextElement,\n getBoundingClientRect: () => {\n const anchor = anchorElement;\n const anchorRect = getAnchorRect == null ? void 0 : getAnchorRect(anchor);\n if (anchorRect || !anchor) {\n return getDOMRect(anchorRect);\n }\n return anchor.getBoundingClientRect();\n }\n };\n}\nfunction isValidPlacement(flip2) {\n return /^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(flip2);\n}\nfunction roundByDPR(value) {\n const dpr = window.devicePixelRatio || 1;\n return Math.round(value * dpr) / dpr;\n}\nfunction getOffsetMiddleware(arrowElement, props) {\n return offset(({ placement }) => {\n var _a;\n const arrowOffset = ((arrowElement == null ? void 0 : arrowElement.clientHeight) || 0) / 2;\n const finalGutter = typeof props.gutter === \"number\" ? props.gutter + arrowOffset : (_a = props.gutter) != null ? _a : arrowOffset;\n const hasAlignment = !!placement.split(\"-\")[1];\n return {\n crossAxis: !hasAlignment ? props.shift : void 0,\n mainAxis: finalGutter,\n alignmentAxis: props.shift\n };\n });\n}\nfunction getFlipMiddleware(props) {\n if (props.flip === false) return;\n const fallbackPlacements = typeof props.flip === \"string\" ? props.flip.split(\" \") : void 0;\n invariant(\n !fallbackPlacements || fallbackPlacements.every(isValidPlacement),\n process.env.NODE_ENV !== \"production\" && \"`flip` expects a spaced-delimited list of placements\"\n );\n return flip({\n padding: props.overflowPadding,\n fallbackPlacements\n });\n}\nfunction getShiftMiddleware(props) {\n if (!props.slide && !props.overlap) return;\n return shift({\n mainAxis: props.slide,\n crossAxis: props.overlap,\n padding: props.overflowPadding,\n limiter: limitShift()\n });\n}\nfunction getSizeMiddleware(props) {\n return size({\n padding: props.overflowPadding,\n apply({ elements, availableWidth, availableHeight, rects }) {\n const wrapper = elements.floating;\n const referenceWidth = Math.round(rects.reference.width);\n availableWidth = Math.floor(availableWidth);\n availableHeight = Math.floor(availableHeight);\n wrapper.style.setProperty(\n \"--popover-anchor-width\",\n `${referenceWidth}px`\n );\n wrapper.style.setProperty(\n \"--popover-available-width\",\n `${availableWidth}px`\n );\n wrapper.style.setProperty(\n \"--popover-available-height\",\n `${availableHeight}px`\n );\n if (props.sameWidth) {\n wrapper.style.width = `${referenceWidth}px`;\n }\n if (props.fitViewport) {\n wrapper.style.maxWidth = `${availableWidth}px`;\n wrapper.style.maxHeight = `${availableHeight}px`;\n }\n }\n });\n}\nfunction getArrowMiddleware(arrowElement, props) {\n if (!arrowElement) return;\n return arrow({\n element: arrowElement,\n padding: props.arrowPadding\n });\n}\nvar usePopover = createHook(\n function usePopover2(_a) {\n var _b = _a, {\n store,\n modal = false,\n portal = !!modal,\n preserveTabOrder = true,\n autoFocusOnShow = true,\n wrapperProps,\n fixed = false,\n flip: flip2 = true,\n shift: shift2 = 0,\n slide = true,\n overlap = false,\n sameWidth = false,\n fitViewport = false,\n gutter,\n arrowPadding = 4,\n overflowPadding = 8,\n getAnchorRect,\n updatePosition\n } = _b, props = __objRest(_b, [\n \"store\",\n \"modal\",\n \"portal\",\n \"preserveTabOrder\",\n \"autoFocusOnShow\",\n \"wrapperProps\",\n \"fixed\",\n \"flip\",\n \"shift\",\n \"slide\",\n \"overlap\",\n \"sameWidth\",\n \"fitViewport\",\n \"gutter\",\n \"arrowPadding\",\n \"overflowPadding\",\n \"getAnchorRect\",\n \"updatePosition\"\n ]);\n const context = usePopoverProviderContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"Popover must receive a `store` prop or be wrapped in a PopoverProvider component.\"\n );\n const arrowElement = store.useState(\"arrowElement\");\n const anchorElement = store.useState(\"anchorElement\");\n const disclosureElement = store.useState(\"disclosureElement\");\n const popoverElement = store.useState(\"popoverElement\");\n const contentElement = store.useState(\"contentElement\");\n const placement = store.useState(\"placement\");\n const mounted = store.useState(\"mounted\");\n const rendered = store.useState(\"rendered\");\n const defaultArrowElementRef = useRef(null);\n const [positioned, setPositioned] = useState(false);\n const { portalRef, domReady } = usePortalRef(portal, props.portalRef);\n const getAnchorRectProp = useEvent(getAnchorRect);\n const updatePositionProp = useEvent(updatePosition);\n const hasCustomUpdatePosition = !!updatePosition;\n useSafeLayoutEffect(() => {\n if (!(popoverElement == null ? void 0 : popoverElement.isConnected)) return;\n popoverElement.style.setProperty(\n \"--popover-overflow-padding\",\n `${overflowPadding}px`\n );\n const anchor = getAnchorElement(anchorElement, getAnchorRectProp);\n const updatePosition2 = async () => {\n if (!mounted) return;\n if (!arrowElement) {\n defaultArrowElementRef.current = defaultArrowElementRef.current || document.createElement(\"div\");\n }\n const arrow2 = arrowElement || defaultArrowElementRef.current;\n const middleware = [\n getOffsetMiddleware(arrow2, { gutter, shift: shift2 }),\n getFlipMiddleware({ flip: flip2, overflowPadding }),\n getShiftMiddleware({ slide, shift: shift2, overlap, overflowPadding }),\n getArrowMiddleware(arrow2, { arrowPadding }),\n getSizeMiddleware({\n sameWidth,\n fitViewport,\n overflowPadding\n })\n ];\n const pos = await computePosition(anchor, popoverElement, {\n placement,\n strategy: fixed ? \"fixed\" : \"absolute\",\n middleware\n });\n store == null ? void 0 : store.setState(\"currentPlacement\", pos.placement);\n setPositioned(true);\n const x = roundByDPR(pos.x);\n const y = roundByDPR(pos.y);\n Object.assign(popoverElement.style, {\n top: \"0\",\n left: \"0\",\n transform: `translate3d(${x}px,${y}px,0)`\n });\n if (arrow2 && pos.middlewareData.arrow) {\n const { x: arrowX, y: arrowY } = pos.middlewareData.arrow;\n const side = pos.placement.split(\"-\")[0];\n const centerX = arrow2.clientWidth / 2;\n const centerY = arrow2.clientHeight / 2;\n const originX = arrowX != null ? arrowX + centerX : -centerX;\n const originY = arrowY != null ? arrowY + centerY : -centerY;\n popoverElement.style.setProperty(\n \"--popover-transform-origin\",\n {\n top: `${originX}px calc(100% + ${centerY}px)`,\n bottom: `${originX}px ${-centerY}px`,\n left: `calc(100% + ${centerX}px) ${originY}px`,\n right: `${-centerX}px ${originY}px`\n }[side]\n );\n Object.assign(arrow2.style, {\n left: arrowX != null ? `${arrowX}px` : \"\",\n top: arrowY != null ? `${arrowY}px` : \"\",\n [side]: \"100%\"\n });\n }\n };\n const update = async () => {\n if (hasCustomUpdatePosition) {\n await updatePositionProp({ updatePosition: updatePosition2 });\n setPositioned(true);\n } else {\n await updatePosition2();\n }\n };\n const cancelAutoUpdate = autoUpdate(anchor, popoverElement, update, {\n // JSDOM doesn't support ResizeObserver\n elementResize: typeof ResizeObserver === \"function\"\n });\n return () => {\n setPositioned(false);\n cancelAutoUpdate();\n };\n }, [\n store,\n rendered,\n popoverElement,\n arrowElement,\n anchorElement,\n popoverElement,\n placement,\n mounted,\n domReady,\n fixed,\n flip2,\n shift2,\n slide,\n overlap,\n sameWidth,\n fitViewport,\n gutter,\n arrowPadding,\n overflowPadding,\n getAnchorRectProp,\n hasCustomUpdatePosition,\n updatePositionProp\n ]);\n useSafeLayoutEffect(() => {\n if (!mounted) return;\n if (!domReady) return;\n if (!(popoverElement == null ? void 0 : popoverElement.isConnected)) return;\n if (!(contentElement == null ? void 0 : contentElement.isConnected)) return;\n const applyZIndex = () => {\n popoverElement.style.zIndex = getComputedStyle(contentElement).zIndex;\n };\n applyZIndex();\n let raf = requestAnimationFrame(() => {\n raf = requestAnimationFrame(applyZIndex);\n });\n return () => cancelAnimationFrame(raf);\n }, [mounted, domReady, popoverElement, contentElement]);\n const position = fixed ? \"fixed\" : \"absolute\";\n props = useWrapElement(\n props,\n (element) => /* @__PURE__ */ jsx(\n \"div\",\n __spreadProps(__spreadValues({}, wrapperProps), {\n style: __spreadValues({\n // https://floating-ui.com/docs/computeposition#initial-layout\n position,\n top: 0,\n left: 0,\n width: \"max-content\"\n }, wrapperProps == null ? void 0 : wrapperProps.style),\n ref: store == null ? void 0 : store.setPopoverElement,\n children: element\n })\n ),\n [store, position, wrapperProps]\n );\n props = useWrapElement(\n props,\n (element) => /* @__PURE__ */ jsx(PopoverScopedContextProvider, { value: store, children: element }),\n [store]\n );\n props = __spreadProps(__spreadValues({\n // data-placing is not part of the public API. We're setting this here so\n // we can wait for the popover to be positioned before other components\n // move focus into it. For example, this attribute is observed by the\n // Combobox component with the autoSelect behavior.\n \"data-placing\": !positioned || void 0\n }, props), {\n style: __spreadValues({\n position: \"relative\"\n }, props.style)\n });\n props = useDialog(__spreadProps(__spreadValues({\n store,\n modal,\n portal,\n preserveTabOrder,\n preserveTabOrderAnchor: disclosureElement || anchorElement,\n autoFocusOnShow: positioned && autoFocusOnShow\n }, props), {\n portalRef\n }));\n return props;\n }\n);\nvar Popover = createDialogComponent(\n forwardRef(function Popover2(props) {\n const htmlProps = usePopover(props);\n return createElement(TagName, htmlProps);\n }),\n usePopoverProviderContext\n);\n\nexport {\n usePopover,\n Popover\n};\n","\"use client\";\nimport {\n getElementPolygon,\n getEventPoint,\n isPointInPolygon\n} from \"./X7QOZUD3.js\";\nimport {\n usePopover\n} from \"./T6C2RYFI.js\";\nimport {\n createDialogComponent\n} from \"./JC64G2H7.js\";\nimport {\n HovercardScopedContextProvider,\n useHovercardProviderContext\n} from \"./EM5CXX6A.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n useBooleanEvent,\n useEvent,\n useIsMouseMoving,\n useLiveRef,\n useMergeRefs,\n usePortalRef,\n useSafeLayoutEffect,\n useWrapElement\n} from \"./ABQUS43J.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/hovercard/hovercard.tsx\nimport { contains } from \"@ariakit/core/utils/dom\";\nimport { addGlobalEventListener } from \"@ariakit/core/utils/events\";\nimport { hasFocusWithin } from \"@ariakit/core/utils/focus\";\nimport {\n chain,\n invariant,\n isFalsyBooleanCallback\n} from \"@ariakit/core/utils/misc\";\nimport { sync } from \"@ariakit/core/utils/store\";\nimport {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useRef,\n useState\n} from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"div\";\nfunction isMovingOnHovercard(target, card, anchor, nested) {\n if (hasFocusWithin(card)) return true;\n if (!target) return false;\n if (contains(card, target)) return true;\n if (anchor && contains(anchor, target)) return true;\n if (nested == null ? void 0 : nested.some((card2) => isMovingOnHovercard(target, card2, anchor))) {\n return true;\n }\n return false;\n}\nfunction useAutoFocusOnHide(_a) {\n var _b = _a, {\n store\n } = _b, props = __objRest(_b, [\n \"store\"\n ]);\n const [autoFocusOnHide, setAutoFocusOnHide] = useState(false);\n const mounted = store.useState(\"mounted\");\n useEffect(() => {\n if (!mounted) {\n setAutoFocusOnHide(false);\n }\n }, [mounted]);\n const onFocusProp = props.onFocus;\n const onFocus = useEvent((event) => {\n onFocusProp == null ? void 0 : onFocusProp(event);\n if (event.defaultPrevented) return;\n setAutoFocusOnHide(true);\n });\n const finalFocusRef = useRef(null);\n useEffect(() => {\n return sync(store, [\"anchorElement\"], (state) => {\n finalFocusRef.current = state.anchorElement;\n });\n }, []);\n props = __spreadProps(__spreadValues({\n autoFocusOnHide,\n finalFocus: finalFocusRef\n }, props), {\n onFocus\n });\n return props;\n}\nvar NestedHovercardContext = createContext(null);\nvar useHovercard = createHook(\n function useHovercard2(_a) {\n var _b = _a, {\n store,\n modal = false,\n portal = !!modal,\n hideOnEscape = true,\n hideOnHoverOutside = true,\n disablePointerEventsOnApproach = !!hideOnHoverOutside\n } = _b, props = __objRest(_b, [\n \"store\",\n \"modal\",\n \"portal\",\n \"hideOnEscape\",\n \"hideOnHoverOutside\",\n \"disablePointerEventsOnApproach\"\n ]);\n const context = useHovercardProviderContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"Hovercard must receive a `store` prop or be wrapped in a HovercardProvider component.\"\n );\n const ref = useRef(null);\n const [nestedHovercards, setNestedHovercards] = useState([]);\n const hideTimeoutRef = useRef(0);\n const enterPointRef = useRef(null);\n const { portalRef, domReady } = usePortalRef(portal, props.portalRef);\n const isMouseMoving = useIsMouseMoving();\n const mayHideOnHoverOutside = !!hideOnHoverOutside;\n const hideOnHoverOutsideProp = useBooleanEvent(hideOnHoverOutside);\n const mayDisablePointerEvents = !!disablePointerEventsOnApproach;\n const disablePointerEventsProp = useBooleanEvent(\n disablePointerEventsOnApproach\n );\n const open = store.useState(\"open\");\n const mounted = store.useState(\"mounted\");\n useEffect(() => {\n if (!domReady) return;\n if (!mounted) return;\n if (!mayHideOnHoverOutside && !mayDisablePointerEvents) return;\n const element = ref.current;\n if (!element) return;\n const onMouseMove = (event) => {\n if (!store) return;\n if (!isMouseMoving()) return;\n const { anchorElement, hideTimeout, timeout } = store.getState();\n const enterPoint = enterPointRef.current;\n const [target] = event.composedPath();\n const anchor = anchorElement;\n if (isMovingOnHovercard(target, element, anchor, nestedHovercards)) {\n enterPointRef.current = target && anchor && contains(anchor, target) ? getEventPoint(event) : null;\n window.clearTimeout(hideTimeoutRef.current);\n hideTimeoutRef.current = 0;\n return;\n }\n if (hideTimeoutRef.current) return;\n if (enterPoint) {\n const currentPoint = getEventPoint(event);\n const polygon = getElementPolygon(element, enterPoint);\n if (isPointInPolygon(currentPoint, polygon)) {\n enterPointRef.current = currentPoint;\n if (!disablePointerEventsProp(event)) return;\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n }\n if (!hideOnHoverOutsideProp(event)) return;\n hideTimeoutRef.current = window.setTimeout(() => {\n hideTimeoutRef.current = 0;\n store == null ? void 0 : store.hide();\n }, hideTimeout != null ? hideTimeout : timeout);\n };\n return chain(\n addGlobalEventListener(\"mousemove\", onMouseMove, true),\n () => clearTimeout(hideTimeoutRef.current)\n );\n }, [\n store,\n isMouseMoving,\n domReady,\n mounted,\n mayHideOnHoverOutside,\n mayDisablePointerEvents,\n nestedHovercards,\n disablePointerEventsProp,\n hideOnHoverOutsideProp\n ]);\n useEffect(() => {\n if (!domReady) return;\n if (!mounted) return;\n if (!mayDisablePointerEvents) return;\n const disableEvent = (event) => {\n const element = ref.current;\n if (!element) return;\n const enterPoint = enterPointRef.current;\n if (!enterPoint) return;\n const polygon = getElementPolygon(element, enterPoint);\n if (isPointInPolygon(getEventPoint(event), polygon)) {\n if (!disablePointerEventsProp(event)) return;\n event.preventDefault();\n event.stopPropagation();\n }\n };\n return chain(\n // Note: we may need to add pointer events here in the future.\n addGlobalEventListener(\"mouseenter\", disableEvent, true),\n addGlobalEventListener(\"mouseover\", disableEvent, true),\n addGlobalEventListener(\"mouseout\", disableEvent, true),\n addGlobalEventListener(\"mouseleave\", disableEvent, true)\n );\n }, [domReady, mounted, mayDisablePointerEvents, disablePointerEventsProp]);\n useEffect(() => {\n if (!domReady) return;\n if (open) return;\n store == null ? void 0 : store.setAutoFocusOnShow(false);\n }, [store, domReady, open]);\n const openRef = useLiveRef(open);\n useEffect(() => {\n if (!domReady) return;\n return () => {\n if (!openRef.current) {\n store == null ? void 0 : store.setAutoFocusOnShow(false);\n }\n };\n }, [store, domReady]);\n const registerOnParent = useContext(NestedHovercardContext);\n useSafeLayoutEffect(() => {\n if (modal) return;\n if (!portal) return;\n if (!mounted) return;\n if (!domReady) return;\n const element = ref.current;\n if (!element) return;\n return registerOnParent == null ? void 0 : registerOnParent(element);\n }, [modal, portal, mounted, domReady]);\n const registerNestedHovercard = useCallback(\n (element) => {\n setNestedHovercards((prevElements) => [...prevElements, element]);\n const parentUnregister = registerOnParent == null ? void 0 : registerOnParent(element);\n return () => {\n setNestedHovercards(\n (prevElements) => prevElements.filter((item) => item !== element)\n );\n parentUnregister == null ? void 0 : parentUnregister();\n };\n },\n [registerOnParent]\n );\n props = useWrapElement(\n props,\n (element) => /* @__PURE__ */ jsx(HovercardScopedContextProvider, { value: store, children: /* @__PURE__ */ jsx(NestedHovercardContext.Provider, { value: registerNestedHovercard, children: element }) }),\n [store, registerNestedHovercard]\n );\n props = __spreadProps(__spreadValues({}, props), {\n ref: useMergeRefs(ref, props.ref)\n });\n props = useAutoFocusOnHide(__spreadValues({ store }, props));\n const autoFocusOnShow = store.useState(\n (state) => modal || state.autoFocusOnShow\n );\n props = usePopover(__spreadProps(__spreadValues({\n store,\n modal,\n portal,\n autoFocusOnShow\n }, props), {\n portalRef,\n hideOnEscape(event) {\n if (isFalsyBooleanCallback(hideOnEscape, event)) return false;\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n store == null ? void 0 : store.hide();\n });\n });\n return true;\n }\n }));\n return props;\n }\n);\nvar Hovercard = createDialogComponent(\n forwardRef(function Hovercard2(props) {\n const htmlProps = useHovercard(props);\n return createElement(TagName, htmlProps);\n }),\n useHovercardProviderContext\n);\n\nexport {\n useHovercard,\n Hovercard\n};\n","\"use client\";\nimport {\n useHovercard\n} from \"../__chunks/KQKDTOT4.js\";\nimport \"../__chunks/X7QOZUD3.js\";\nimport \"../__chunks/T6C2RYFI.js\";\nimport {\n createDialogComponent\n} from \"../__chunks/JC64G2H7.js\";\nimport \"../__chunks/63FEHJZV.js\";\nimport \"../__chunks/KZAQFFOU.js\";\nimport \"../__chunks/IGR4SXG2.js\";\nimport \"../__chunks/ESSM74HH.js\";\nimport \"../__chunks/BGQ3KQ5M.js\";\nimport \"../__chunks/YKJECYU7.js\";\nimport \"../__chunks/TOU75OXH.js\";\nimport \"../__chunks/WBDYNH73.js\";\nimport \"../__chunks/2PGBN2Y4.js\";\nimport \"../__chunks/63XF7ACK.js\";\nimport \"../__chunks/HLTQOHKZ.js\";\nimport \"../__chunks/677M2CI3.js\";\nimport \"../__chunks/6GXEOXGT.js\";\nimport \"../__chunks/AOUGVQZ3.js\";\nimport \"../__chunks/K2ZF5NU7.js\";\nimport \"../__chunks/ZWYATQFU.js\";\nimport \"../__chunks/5M6RIVE2.js\";\nimport \"../__chunks/O37CNYMR.js\";\nimport \"../__chunks/W3VI7GFU.js\";\nimport \"../__chunks/AOQQTIBO.js\";\nimport \"../__chunks/CZ4GFWYL.js\";\nimport \"../__chunks/VGCJ63VH.js\";\nimport \"../__chunks/XL7CSKGW.js\";\nimport {\n TooltipScopedContextProvider,\n useTooltipProviderContext\n} from \"../__chunks/F4IYJ42G.js\";\nimport \"../__chunks/EM5CXX6A.js\";\nimport \"../__chunks/MTZPJQMC.js\";\nimport \"../__chunks/RS7LB2H4.js\";\nimport \"../__chunks/S6EF7IVO.js\";\nimport \"../__chunks/LVA2YJMS.js\";\nimport \"../__chunks/SWN3JYXT.js\";\nimport \"../__chunks/XX67R432.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"../__chunks/LMDWO4NN.js\";\nimport \"../__chunks/BM6PGYQY.js\";\nimport \"../__chunks/WYCIER3C.js\";\nimport \"../__chunks/YV4JVR4I.js\";\nimport {\n useWrapElement\n} from \"../__chunks/ABQUS43J.js\";\nimport \"../__chunks/SK3NAZA3.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"../__chunks/3YLGPPWQ.js\";\n\n// src/tooltip/tooltip.tsx\nimport { contains } from \"@ariakit/core/utils/dom\";\nimport { invariant, isFalsyBooleanCallback } from \"@ariakit/core/utils/misc\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"div\";\nvar useTooltip = createHook(\n function useTooltip2(_a) {\n var _b = _a, {\n store,\n portal = true,\n gutter = 8,\n preserveTabOrder = false,\n hideOnHoverOutside = true,\n hideOnInteractOutside = true\n } = _b, props = __objRest(_b, [\n \"store\",\n \"portal\",\n \"gutter\",\n \"preserveTabOrder\",\n \"hideOnHoverOutside\",\n \"hideOnInteractOutside\"\n ]);\n const context = useTooltipProviderContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"Tooltip must receive a `store` prop or be wrapped in a TooltipProvider component.\"\n );\n props = useWrapElement(\n props,\n (element) => /* @__PURE__ */ jsx(TooltipScopedContextProvider, { value: store, children: element }),\n [store]\n );\n const role = store.useState(\n (state) => state.type === \"description\" ? \"tooltip\" : \"none\"\n );\n props = __spreadValues({ role }, props);\n props = useHovercard(__spreadProps(__spreadValues({}, props), {\n store,\n portal,\n gutter,\n preserveTabOrder,\n hideOnHoverOutside(event) {\n if (isFalsyBooleanCallback(hideOnHoverOutside, event)) return false;\n const anchorElement = store == null ? void 0 : store.getState().anchorElement;\n if (!anchorElement) return true;\n if (\"focusVisible\" in anchorElement.dataset) return false;\n return true;\n },\n hideOnInteractOutside: (event) => {\n if (isFalsyBooleanCallback(hideOnInteractOutside, event)) return false;\n const anchorElement = store == null ? void 0 : store.getState().anchorElement;\n if (!anchorElement) return true;\n if (contains(anchorElement, event.target)) return false;\n return true;\n }\n }));\n return props;\n }\n);\nvar Tooltip = createDialogComponent(\n forwardRef(function Tooltip2(props) {\n const htmlProps = useTooltip(props);\n return createElement(TagName, htmlProps);\n }),\n useTooltipProviderContext\n);\nexport {\n Tooltip,\n useTooltip\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"deprecated\"];","/**\n * Internal dependencies\n */\nimport type { ShortcutProps } from './types';\n\n/**\n * Shortcut component is used to display keyboard shortcuts, and it can be customized with a custom display and aria label if needed.\n *\n * ```jsx\n * import { Shortcut } from '@wordpress/components';\n *\n * const MyShortcut = () => {\n * \treturn (\n * \t\t<Shortcut shortcut={{ display: 'Ctrl + S', ariaLabel: 'Save' }} />\n * \t);\n * };\n * ```\n */\nfunction Shortcut( props: ShortcutProps ) {\n\tconst { shortcut, className } = props;\n\n\tif ( ! shortcut ) {\n\t\treturn null;\n\t}\n\n\tlet displayText;\n\tlet ariaLabel;\n\n\tif ( typeof shortcut === 'string' ) {\n\t\tdisplayText = shortcut;\n\t}\n\n\tif ( shortcut !== null && typeof shortcut === 'object' ) {\n\t\tdisplayText = shortcut.display;\n\t\tariaLabel = shortcut.ariaLabel;\n\t}\n\n\treturn (\n\t\t<span className={ className } aria-label={ ariaLabel }>\n\t\t\t{ displayText }\n\t\t</span>\n\t);\n}\n\nexport default Shortcut;\n","/**\n * External dependencies\n */\nimport type { MotionProps } from 'framer-motion';\nimport type { Placement, ReferenceType } from '@floating-ui/react-dom';\n\n/**\n * Internal dependencies\n */\nimport type {\n\tPopoverProps,\n\tPopoverAnchorRefReference,\n\tPopoverAnchorRefTopBottom,\n} from './types';\n\nconst POSITION_TO_PLACEMENT: Record<\n\tNonNullable< PopoverProps[ 'position' ] >,\n\tPlacement\n> = {\n\tbottom: 'bottom',\n\ttop: 'top',\n\t'middle left': 'left',\n\t'middle right': 'right',\n\t'bottom left': 'bottom-end',\n\t'bottom center': 'bottom',\n\t'bottom right': 'bottom-start',\n\t'top left': 'top-end',\n\t'top center': 'top',\n\t'top right': 'top-start',\n\t'middle left left': 'left',\n\t'middle left right': 'left',\n\t'middle left bottom': 'left-end',\n\t'middle left top': 'left-start',\n\t'middle right left': 'right',\n\t'middle right right': 'right',\n\t'middle right bottom': 'right-end',\n\t'middle right top': 'right-start',\n\t'bottom left left': 'bottom-end',\n\t'bottom left right': 'bottom-end',\n\t'bottom left bottom': 'bottom-end',\n\t'bottom left top': 'bottom-end',\n\t'bottom center left': 'bottom',\n\t'bottom center right': 'bottom',\n\t'bottom center bottom': 'bottom',\n\t'bottom center top': 'bottom',\n\t'bottom right left': 'bottom-start',\n\t'bottom right right': 'bottom-start',\n\t'bottom right bottom': 'bottom-start',\n\t'bottom right top': 'bottom-start',\n\t'top left left': 'top-end',\n\t'top left right': 'top-end',\n\t'top left bottom': 'top-end',\n\t'top left top': 'top-end',\n\t'top center left': 'top',\n\t'top center right': 'top',\n\t'top center bottom': 'top',\n\t'top center top': 'top',\n\t'top right left': 'top-start',\n\t'top right right': 'top-start',\n\t'top right bottom': 'top-start',\n\t'top right top': 'top-start',\n\t// `middle`/`middle center [corner?]` positions are associated to a fallback\n\t// `bottom` placement because there aren't any corresponding placement values.\n\tmiddle: 'bottom',\n\t'middle center': 'bottom',\n\t'middle center bottom': 'bottom',\n\t'middle center left': 'bottom',\n\t'middle center right': 'bottom',\n\t'middle center top': 'bottom',\n};\n\n/**\n * Converts the `Popover`'s legacy \"position\" prop to the new \"placement\" prop\n * (used by `floating-ui`).\n *\n * @param position The legacy position\n * @return The corresponding placement\n */\nexport const positionToPlacement = (\n\tposition: NonNullable< PopoverProps[ 'position' ] >\n) => POSITION_TO_PLACEMENT[ position ] ?? 'bottom';\n\n/**\n * @typedef AnimationOrigin\n * @type {Object}\n * @property {number} originX A number between 0 and 1 (in CSS logical properties jargon, 0 is \"start\", 0.5 is \"center\", and 1 is \"end\")\n * @property {number} originY A number between 0 and 1 (0 is top, 0.5 is center, and 1 is bottom)\n */\n\nconst PLACEMENT_TO_ANIMATION_ORIGIN: Record<\n\tNonNullable< PopoverProps[ 'placement' ] >,\n\t{ originX: number; originY: number }\n> = {\n\ttop: { originX: 0.5, originY: 1 }, // open from bottom, center\n\t'top-start': { originX: 0, originY: 1 }, // open from bottom, left\n\t'top-end': { originX: 1, originY: 1 }, // open from bottom, right\n\tright: { originX: 0, originY: 0.5 }, // open from middle, left\n\t'right-start': { originX: 0, originY: 0 }, // open from top, left\n\t'right-end': { originX: 0, originY: 1 }, // open from bottom, left\n\tbottom: { originX: 0.5, originY: 0 }, // open from top, center\n\t'bottom-start': { originX: 0, originY: 0 }, // open from top, left\n\t'bottom-end': { originX: 1, originY: 0 }, // open from top, right\n\tleft: { originX: 1, originY: 0.5 }, // open from middle, right\n\t'left-start': { originX: 1, originY: 0 }, // open from top, right\n\t'left-end': { originX: 1, originY: 1 }, // open from bottom, right\n\toverlay: { originX: 0.5, originY: 0.5 }, // open from center, center\n};\n\n/**\n * Given the floating-ui `placement`, compute the framer-motion props for the\n * popover's entry animation.\n *\n * @param placement A placement string from floating ui\n * @return The object containing the motion props\n */\nexport const placementToMotionAnimationProps = (\n\tplacement: NonNullable< PopoverProps[ 'placement' ] >\n): MotionProps => {\n\tconst translateProp =\n\t\tplacement.startsWith( 'top' ) || placement.startsWith( 'bottom' )\n\t\t\t? 'translateY'\n\t\t\t: 'translateX';\n\tconst translateDirection =\n\t\tplacement.startsWith( 'top' ) || placement.startsWith( 'left' )\n\t\t\t? 1\n\t\t\t: -1;\n\n\treturn {\n\t\tstyle: PLACEMENT_TO_ANIMATION_ORIGIN[ placement ],\n\t\tinitial: {\n\t\t\topacity: 0,\n\t\t\tscale: 0,\n\t\t\t[ translateProp ]: `${ 2 * translateDirection }em`,\n\t\t},\n\t\tanimate: { opacity: 1, scale: 1, [ translateProp ]: 0 },\n\t\ttransition: { duration: 0.1, ease: [ 0, 0, 0.2, 1 ] },\n\t};\n};\n\nfunction isTopBottom(\n\tanchorRef: PopoverProps[ 'anchorRef' ]\n): anchorRef is PopoverAnchorRefTopBottom {\n\treturn !! ( anchorRef as PopoverAnchorRefTopBottom )?.top;\n}\n\nfunction isRef(\n\tanchorRef: PopoverProps[ 'anchorRef' ]\n): anchorRef is PopoverAnchorRefReference {\n\treturn !! ( anchorRef as PopoverAnchorRefReference )?.current;\n}\n\nexport const getReferenceElement = ( {\n\tanchor,\n\tanchorRef,\n\tanchorRect,\n\tgetAnchorRect,\n\tfallbackReferenceElement,\n}: Pick<\n\tPopoverProps,\n\t'anchorRef' | 'anchorRect' | 'getAnchorRect' | 'anchor'\n> & {\n\tfallbackReferenceElement: Element | null;\n} ): ReferenceType | null => {\n\tlet referenceElement = null;\n\n\tif ( anchor ) {\n\t\treferenceElement = anchor;\n\t} else if ( isTopBottom( anchorRef ) ) {\n\t\t// Create a virtual element for the ref. The expectation is that\n\t\t// if anchorRef.top is defined, then anchorRef.bottom is defined too.\n\t\t// Seems to be used by the block toolbar, when multiple blocks are selected\n\t\t// (top and bottom blocks are used to calculate the resulting rect).\n\t\treferenceElement = {\n\t\t\tgetBoundingClientRect() {\n\t\t\t\tconst topRect = anchorRef.top.getBoundingClientRect();\n\t\t\t\tconst bottomRect = anchorRef.bottom.getBoundingClientRect();\n\t\t\t\treturn new window.DOMRect(\n\t\t\t\t\ttopRect.x,\n\t\t\t\t\ttopRect.y,\n\t\t\t\t\ttopRect.width,\n\t\t\t\t\tbottomRect.bottom - topRect.top\n\t\t\t\t);\n\t\t\t},\n\t\t};\n\t} else if ( isRef( anchorRef ) ) {\n\t\t// Standard React ref.\n\t\treferenceElement = anchorRef.current;\n\t} else if ( anchorRef ) {\n\t\t// If `anchorRef` holds directly the element's value (no `current` key)\n\t\t// This is a weird scenario and should be deprecated.\n\t\treferenceElement = anchorRef as Element;\n\t} else if ( anchorRect ) {\n\t\t// Create a virtual element for the ref.\n\t\treferenceElement = {\n\t\t\tgetBoundingClientRect() {\n\t\t\t\treturn anchorRect;\n\t\t\t},\n\t\t};\n\t} else if ( getAnchorRect ) {\n\t\t// Create a virtual element for the ref.\n\t\treferenceElement = {\n\t\t\tgetBoundingClientRect() {\n\t\t\t\tconst rect = getAnchorRect( fallbackReferenceElement );\n\t\t\t\treturn new window.DOMRect(\n\t\t\t\t\trect.x ?? rect.left,\n\t\t\t\t\trect.y ?? rect.top,\n\t\t\t\t\trect.width ?? rect.right - rect.left,\n\t\t\t\t\trect.height ?? rect.bottom - rect.top\n\t\t\t\t);\n\t\t\t},\n\t\t};\n\t} else if ( fallbackReferenceElement ) {\n\t\t// If no explicit ref is passed via props, fall back to\n\t\t// anchoring to the popover's parent node.\n\t\treferenceElement = fallbackReferenceElement.parentElement;\n\t}\n\n\t// Convert any `undefined` value to `null`.\n\treturn referenceElement ?? null;\n};\n\n/**\n * Computes the final coordinate that needs to be applied to the floating\n * element when applying transform inline styles, defaulting to `undefined`\n * if the provided value is `null` or `NaN`.\n *\n * @param c input coordinate (usually as returned from floating-ui)\n * @return The coordinate's value to be used for inline styles. An `undefined`\n * return value means \"no style set\" for this coordinate.\n */\nexport const computePopoverPosition = ( c: number | null ) =>\n\tc === null || Number.isNaN( c ) ? undefined : Math.round( c );\n","/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport {\n\tChildren,\n\tuseContext,\n\tcreateContext,\n\tforwardRef,\n\tcloneElement,\n} from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport type {\n\tTooltipProps,\n\tTooltipInternalContext as TooltipInternalContextType,\n} from './types';\nimport Shortcut from '../shortcut';\nimport { positionToPlacement } from '../popover/utils';\n\nconst TooltipInternalContext = createContext< TooltipInternalContextType >( {\n\tisNestedInTooltip: false,\n} );\n\n/**\n * Time over anchor to wait before showing tooltip\n */\nexport const TOOLTIP_DELAY = 700;\n\nconst CONTEXT_VALUE = {\n\tisNestedInTooltip: true,\n};\n\nfunction UnforwardedTooltip(\n\tprops: TooltipProps,\n\tref: React.ForwardedRef< any >\n) {\n\tconst {\n\t\tchildren,\n\t\tclassName,\n\t\tdelay = TOOLTIP_DELAY,\n\t\thideOnClick = true,\n\t\tplacement,\n\t\tposition,\n\t\tshortcut,\n\t\ttext,\n\n\t\t...restProps\n\t} = props;\n\n\tconst { isNestedInTooltip } = useContext( TooltipInternalContext );\n\n\tconst baseId = useInstanceId( Tooltip, 'tooltip' );\n\tconst describedById = text || shortcut ? baseId : undefined;\n\n\tconst isOnlyChild = Children.count( children ) === 1;\n\t// console error if more than one child element is added\n\tif ( ! isOnlyChild ) {\n\t\tif ( 'development' === process.env.NODE_ENV ) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.error(\n\t\t\t\t'wp-components.Tooltip should be called with only a single child element.'\n\t\t\t);\n\t\t}\n\t}\n\n\t// Compute tooltip's placement:\n\t// - give priority to `placement` prop, if defined\n\t// - otherwise, compute it from the legacy `position` prop (if defined)\n\t// - finally, fallback to the default placement: 'bottom'\n\tlet computedPlacement;\n\tif ( placement !== undefined ) {\n\t\tcomputedPlacement = placement;\n\t} else if ( position !== undefined ) {\n\t\tcomputedPlacement = positionToPlacement( position );\n\t\tdeprecated( '`position` prop in wp.components.tooltip', {\n\t\t\tsince: '6.4',\n\t\t\talternative: '`placement` prop',\n\t\t} );\n\t}\n\tcomputedPlacement = computedPlacement || 'bottom';\n\n\tconst tooltipStore = Ariakit.useTooltipStore( {\n\t\tplacement: computedPlacement,\n\t\tshowTimeout: delay,\n\t} );\n\tconst mounted = Ariakit.useStoreState( tooltipStore, 'mounted' );\n\n\tif ( isNestedInTooltip ) {\n\t\treturn isOnlyChild ? (\n\t\t\t<Ariakit.Role { ...restProps } render={ children } />\n\t\t) : (\n\t\t\tchildren\n\t\t);\n\t}\n\n\t// TODO: this is a temporary workaround to minimize the effects of the\n\t// Ariakit upgrade. Ariakit doesn't pass the `aria-describedby` prop to\n\t// the tooltip anchor anymore since 0.4.0, so we need to add it manually.\n\t// The `aria-describedby` attribute is added only if the anchor doesn't have\n\t// one already, and if the tooltip text is not the same as the anchor's\n\t// `aria-label`\n\t// See: https://github.com/WordPress/gutenberg/pull/64066\n\t// See: https://github.com/WordPress/gutenberg/pull/65989\n\tfunction addDescribedById( element: React.ReactElement ) {\n\t\treturn describedById &&\n\t\t\tmounted &&\n\t\t\telement.props[ 'aria-describedby' ] === undefined &&\n\t\t\telement.props[ 'aria-label' ] !== text\n\t\t\t? cloneElement( element, { 'aria-describedby': describedById } )\n\t\t\t: element;\n\t}\n\n\treturn (\n\t\t<TooltipInternalContext.Provider value={ CONTEXT_VALUE }>\n\t\t\t<Ariakit.TooltipAnchor\n\t\t\t\tonClick={ hideOnClick ? tooltipStore.hide : undefined }\n\t\t\t\tstore={ tooltipStore }\n\t\t\t\trender={\n\t\t\t\t\tisOnlyChild ? addDescribedById( children ) : undefined\n\t\t\t\t}\n\t\t\t\tref={ ref }\n\t\t\t>\n\t\t\t\t{ isOnlyChild ? undefined : children }\n\t\t\t</Ariakit.TooltipAnchor>\n\t\t\t{ isOnlyChild && ( text || shortcut ) && (\n\t\t\t\t<Ariakit.Tooltip\n\t\t\t\t\t{ ...restProps }\n\t\t\t\t\tclassName={ clsx( 'components-tooltip', className ) }\n\t\t\t\t\tunmountOnHide\n\t\t\t\t\tgutter={ 4 }\n\t\t\t\t\tid={ describedById }\n\t\t\t\t\toverflowPadding={ 0.5 }\n\t\t\t\t\tstore={ tooltipStore }\n\t\t\t\t>\n\t\t\t\t\t{ text }\n\t\t\t\t\t{ shortcut && (\n\t\t\t\t\t\t<Shortcut\n\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\ttext ? 'components-tooltip__shortcut' : ''\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tshortcut={ shortcut }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Ariakit.Tooltip>\n\t\t\t) }\n\t\t</TooltipInternalContext.Provider>\n\t);\n}\nexport const Tooltip = forwardRef( UnforwardedTooltip );\n\nexport default Tooltip;\n","\"use client\";\nimport {\n useHovercardStoreProps\n} from \"./FTXTWCCT.js\";\nimport {\n useStore,\n useStoreProps\n} from \"./YV4JVR4I.js\";\n\n// src/tooltip/tooltip-store.ts\nimport * as Core from \"@ariakit/core/tooltip/tooltip-store\";\nfunction useTooltipStoreProps(store, update, props) {\n useStoreProps(store, props, \"type\");\n useStoreProps(store, props, \"skipTimeout\");\n return useHovercardStoreProps(store, update, props);\n}\nfunction useTooltipStore(props = {}) {\n const [store, update] = useStore(Core.createTooltipStore, props);\n return useTooltipStoreProps(store, update, props);\n}\n\nexport {\n useTooltipStoreProps,\n useTooltipStore\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"warning\"];","/*!\n * is-plain-object <https://github.com/jonschlinkert/is-plain-object>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\nfunction isObject(o) {\n return Object.prototype.toString.call(o) === '[object Object]';\n}\n\nfunction isPlainObject(o) {\n var ctor,prot;\n\n if (isObject(o) === false) return false;\n\n // If has modified constructor\n ctor = o.constructor;\n if (ctor === undefined) return true;\n\n // If has modified prototype\n prot = ctor.prototype;\n if (isObject(prot) === false) return false;\n\n // If constructor does not have an Object-specific method\n if (prot.hasOwnProperty('isPrototypeOf') === false) {\n return false;\n }\n\n // Most likely a plain Object\n return true;\n}\n\nexport { isPlainObject };\n","/**\n * WordPress dependencies\n */\nimport { useRef, useEffect } from '@wordpress/element';\n\n/**\n * A `React.useEffect` that will not run on the first render.\n * Source:\n * https://github.com/ariakit/ariakit/blob/main/packages/ariakit-react-core/src/utils/hooks.ts\n *\n * @param {import('react').EffectCallback} effect\n * @param {import('react').DependencyList} deps\n */\nfunction useUpdateEffect( effect, deps ) {\n\tconst mountedRef = useRef( false );\n\tuseEffect( () => {\n\t\tif ( mountedRef.current ) {\n\t\t\treturn effect();\n\t\t}\n\t\tmountedRef.current = true;\n\t\treturn undefined;\n\t\t// 1. This hook needs to pass a dep list that isn't an array literal\n\t\t// 2. `effect` is missing from the array, and will need to be added carefully to avoid additional warnings\n\t\t// see https://github.com/WordPress/gutenberg/pull/41166\n\t}, deps );\n\n\tuseEffect(\n\t\t() => () => {\n\t\t\tmountedRef.current = false;\n\t\t},\n\t\t[]\n\t);\n}\n\nexport default useUpdateEffect;\n","/**\n * External dependencies\n */\nimport deepmerge from 'deepmerge';\nimport fastDeepEqual from 'fast-deep-equal/es6';\nimport { isPlainObject } from 'is-plain-object';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tcreateContext,\n\tuseContext,\n\tuseRef,\n\tuseMemo,\n\tmemo,\n} from '@wordpress/element';\nimport warn from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport { useUpdateEffect } from '../utils';\n\nexport const ComponentsContext = createContext(\n\t/** @type {Record<string, any>} */ ( {} )\n);\nexport const useComponentsContext = () => useContext( ComponentsContext );\n\n/**\n * Consolidates incoming ContextSystem values with a (potential) parent ContextSystem value.\n *\n * Note: This function will warn if it detects an un-memoized `value`\n *\n * @param {Object} props\n * @param {Record<string, any>} props.value\n * @return {Record<string, any>} The consolidated value.\n */\nfunction useContextSystemBridge( { value } ) {\n\tconst parentContext = useComponentsContext();\n\n\tconst valueRef = useRef( value );\n\n\tuseUpdateEffect( () => {\n\t\tif (\n\t\t\t// Objects are equivalent.\n\t\t\tfastDeepEqual( valueRef.current, value ) &&\n\t\t\t// But not the same reference.\n\t\t\tvalueRef.current !== value\n\t\t) {\n\t\t\twarn( `Please memoize your context: ${ JSON.stringify( value ) }` );\n\t\t}\n\t}, [ value ] );\n\n\t// `parentContext` will always be memoized (i.e., the result of this hook itself)\n\t// or the default value from when the `ComponentsContext` was originally\n\t// initialized (which will never change, it's a static variable)\n\t// so this memoization will prevent `deepmerge()` from rerunning unless\n\t// the references to `value` change OR the `parentContext` has an actual material change\n\t// (because again, it's guaranteed to be memoized or a static reference to the empty object\n\t// so we know that the only changes for `parentContext` are material ones... i.e., why we\n\t// don't have to warn in the `useUpdateEffect` hook above for `parentContext` and we only\n\t// need to bother with the `value`). The `useUpdateEffect` above will ensure that we are\n\t// correctly warning when the `value` isn't being properly memoized. All of that to say\n\t// that this should be super safe to assume that `useMemo` will only run on actual\n\t// changes to the two dependencies, therefore saving us calls to `deepmerge()`!\n\tconst config = useMemo( () => {\n\t\t// Deep clone `parentContext` to avoid mutating it later.\n\t\treturn deepmerge( parentContext ?? {}, value ?? {}, {\n\t\t\tisMergeableObject: isPlainObject,\n\t\t} );\n\t}, [ parentContext, value ] );\n\n\treturn config;\n}\n\n/**\n * A Provider component that can modify props for connected components within\n * the Context system.\n *\n * @example\n * ```jsx\n * <ContextSystemProvider value={{ Button: { size: 'small' }}}>\n * <Button>...</Button>\n * </ContextSystemProvider>\n * ```\n *\n * @template {Record<string, any>} T\n * @param {Object} options\n * @param {import('react').ReactNode} options.children Children to render.\n * @param {T} options.value Props to render into connected components.\n * @return {JSX.Element} A Provider wrapped component.\n */\nconst BaseContextSystemProvider = ( { children, value } ) => {\n\tconst contextValue = useContextSystemBridge( { value } );\n\n\treturn (\n\t\t<ComponentsContext.Provider value={ contextValue }>\n\t\t\t{ children }\n\t\t</ComponentsContext.Provider>\n\t);\n};\n\nexport const ContextSystemProvider = memo( BaseContextSystemProvider );\n","export const COMPONENT_NAMESPACE = 'data-wp-component';\nexport const CONNECTED_NAMESPACE = 'data-wp-c16t';\n\n/**\n * Special key where the connected namespaces are stored.\n * This is attached to Context connected components as a static property.\n */\nexport const CONNECT_STATIC_NAMESPACE = '__contextSystemKey__';\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n","/**\n * Locale character mapping rules.\n */\ninterface Locale {\n regexp: RegExp;\n map: Record<string, string>;\n}\n\n/**\n * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt\n */\nconst SUPPORTED_LOCALE: Record<string, Locale> = {\n tr: {\n regexp: /\\u0130|\\u0049|\\u0049\\u0307/g,\n map: {\n Ä°: \"\\u0069\",\n I: \"\\u0131\",\n İ: \"\\u0069\",\n },\n },\n az: {\n regexp: /\\u0130/g,\n map: {\n Ä°: \"\\u0069\",\n I: \"\\u0131\",\n İ: \"\\u0069\",\n },\n },\n lt: {\n regexp: /\\u0049|\\u004A|\\u012E|\\u00CC|\\u00CD|\\u0128/g,\n map: {\n I: \"\\u0069\\u0307\",\n J: \"\\u006A\\u0307\",\n Ä®: \"\\u012F\\u0307\",\n ÃŒ: \"\\u0069\\u0307\\u0300\",\n Ã: \"\\u0069\\u0307\\u0301\",\n Ĩ: \"\\u0069\\u0307\\u0303\",\n },\n },\n};\n\n/**\n * Localized lower case.\n */\nexport function localeLowerCase(str: string, locale: string) {\n const lang = SUPPORTED_LOCALE[locale.toLowerCase()];\n if (lang) return lowerCase(str.replace(lang.regexp, (m) => lang.map[m]));\n return lowerCase(str);\n}\n\n/**\n * Lower case as a function.\n */\nexport function lowerCase(str: string) {\n return str.toLowerCase();\n}\n","import { lowerCase } from \"lower-case\";\n\nexport interface Options {\n splitRegexp?: RegExp | RegExp[];\n stripRegexp?: RegExp | RegExp[];\n delimiter?: string;\n transform?: (part: string, index: number, parts: string[]) => string;\n}\n\n// Support camel case (\"camelCase\" -> \"camel Case\" and \"CAMELCase\" -> \"CAMEL Case\").\nconst DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];\n\n// Remove all non-word characters.\nconst DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;\n\n/**\n * Normalize the string into something other libraries can manipulate easier.\n */\nexport function noCase(input: string, options: Options = {}) {\n const {\n splitRegexp = DEFAULT_SPLIT_REGEXP,\n stripRegexp = DEFAULT_STRIP_REGEXP,\n transform = lowerCase,\n delimiter = \" \",\n } = options;\n\n let result = replace(\n replace(input, splitRegexp, \"$1\\0$2\"),\n stripRegexp,\n \"\\0\"\n );\n let start = 0;\n let end = result.length;\n\n // Trim the delimiter from around the output string.\n while (result.charAt(start) === \"\\0\") start++;\n while (result.charAt(end - 1) === \"\\0\") end--;\n\n // Transform each token independently.\n return result.slice(start, end).split(\"\\0\").map(transform).join(delimiter);\n}\n\n/**\n * Replace `re` in the input string with the replacement value.\n */\nfunction replace(input: string, re: RegExp | RegExp[], value: string) {\n if (re instanceof RegExp) return input.replace(re, value);\n return re.reduce((input, re) => input.replace(re, value), input);\n}\n","import { dotCase, Options } from \"dot-case\";\n\nexport { Options };\n\nexport function paramCase(input: string, options: Options = {}) {\n return dotCase(input, {\n delimiter: \"-\",\n ...options,\n });\n}\n","import { noCase, Options } from \"no-case\";\n\nexport { Options };\n\nexport function dotCase(input: string, options: Options = {}) {\n return noCase(input, {\n delimiter: \".\",\n ...options,\n });\n}\n","/**\n * Memize options object.\n *\n * @typedef MemizeOptions\n *\n * @property {number} [maxSize] Maximum size of the cache.\n */\n\n/**\n * Internal cache entry.\n *\n * @typedef MemizeCacheNode\n *\n * @property {?MemizeCacheNode|undefined} [prev] Previous node.\n * @property {?MemizeCacheNode|undefined} [next] Next node.\n * @property {Array<*>} args Function arguments for cache\n * entry.\n * @property {*} val Function result.\n */\n\n/**\n * Properties of the enhanced function for controlling cache.\n *\n * @typedef MemizeMemoizedFunction\n *\n * @property {()=>void} clear Clear the cache.\n */\n\n/**\n * Accepts a function to be memoized, and returns a new memoized function, with\n * optional options.\n *\n * @template {(...args: any[]) => any} F\n *\n * @param {F} fn Function to memoize.\n * @param {MemizeOptions} [options] Options object.\n *\n * @return {((...args: Parameters<F>) => ReturnType<F>) & MemizeMemoizedFunction} Memoized function.\n */\nfunction memize(fn, options) {\n\tvar size = 0;\n\n\t/** @type {?MemizeCacheNode|undefined} */\n\tvar head;\n\n\t/** @type {?MemizeCacheNode|undefined} */\n\tvar tail;\n\n\toptions = options || {};\n\n\tfunction memoized(/* ...args */) {\n\t\tvar node = head,\n\t\t\tlen = arguments.length,\n\t\t\targs,\n\t\t\ti;\n\n\t\tsearchCache: while (node) {\n\t\t\t// Perform a shallow equality test to confirm that whether the node\n\t\t\t// under test is a candidate for the arguments passed. Two arrays\n\t\t\t// are shallowly equal if their length matches and each entry is\n\t\t\t// strictly equal between the two sets. Avoid abstracting to a\n\t\t\t// function which could incur an arguments leaking deoptimization.\n\n\t\t\t// Check whether node arguments match arguments length\n\t\t\tif (node.args.length !== arguments.length) {\n\t\t\t\tnode = node.next;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Check whether node arguments match arguments values\n\t\t\tfor (i = 0; i < len; i++) {\n\t\t\t\tif (node.args[i] !== arguments[i]) {\n\t\t\t\t\tnode = node.next;\n\t\t\t\t\tcontinue searchCache;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// At this point we can assume we've found a match\n\n\t\t\t// Surface matched node to head if not already\n\t\t\tif (node !== head) {\n\t\t\t\t// As tail, shift to previous. Must only shift if not also\n\t\t\t\t// head, since if both head and tail, there is no previous.\n\t\t\t\tif (node === tail) {\n\t\t\t\t\ttail = node.prev;\n\t\t\t\t}\n\n\t\t\t\t// Adjust siblings to point to each other. If node was tail,\n\t\t\t\t// this also handles new tail's empty `next` assignment.\n\t\t\t\t/** @type {MemizeCacheNode} */ (node.prev).next = node.next;\n\t\t\t\tif (node.next) {\n\t\t\t\t\tnode.next.prev = node.prev;\n\t\t\t\t}\n\n\t\t\t\tnode.next = head;\n\t\t\t\tnode.prev = null;\n\t\t\t\t/** @type {MemizeCacheNode} */ (head).prev = node;\n\t\t\t\thead = node;\n\t\t\t}\n\n\t\t\t// Return immediately\n\t\t\treturn node.val;\n\t\t}\n\n\t\t// No cached value found. Continue to insertion phase:\n\n\t\t// Create a copy of arguments (avoid leaking deoptimization)\n\t\targs = new Array(len);\n\t\tfor (i = 0; i < len; i++) {\n\t\t\targs[i] = arguments[i];\n\t\t}\n\n\t\tnode = {\n\t\t\targs: args,\n\n\t\t\t// Generate the result from original function\n\t\t\tval: fn.apply(null, args),\n\t\t};\n\n\t\t// Don't need to check whether node is already head, since it would\n\t\t// have been returned above already if it was\n\n\t\t// Shift existing head down list\n\t\tif (head) {\n\t\t\thead.prev = node;\n\t\t\tnode.next = head;\n\t\t} else {\n\t\t\t// If no head, follows that there's no tail (at initial or reset)\n\t\t\ttail = node;\n\t\t}\n\n\t\t// Trim tail if we're reached max size and are pending cache insertion\n\t\tif (size === /** @type {MemizeOptions} */ (options).maxSize) {\n\t\t\ttail = /** @type {MemizeCacheNode} */ (tail).prev;\n\t\t\t/** @type {MemizeCacheNode} */ (tail).next = null;\n\t\t} else {\n\t\t\tsize++;\n\t\t}\n\n\t\thead = node;\n\n\t\treturn node.val;\n\t}\n\n\tmemoized.clear = function () {\n\t\thead = null;\n\t\ttail = null;\n\t\tsize = 0;\n\t};\n\n\t// Ignore reason: There's not a clear solution to create an intersection of\n\t// the function with additional properties, where the goal is to retain the\n\t// function signature of the incoming argument and add control properties\n\t// on the return value.\n\n\t// @ts-ignore\n\treturn memoized;\n}\n\nexport { memize as default };\n","/**\n * External dependencies\n */\nimport { paramCase as kebabCase } from 'change-case';\nimport memoize from 'memize';\n\n/**\n * Generates the connected component CSS className based on the namespace.\n *\n * @param namespace The name of the connected component.\n * @return The generated CSS className.\n */\nfunction getStyledClassName( namespace: string ): string {\n\tconst kebab = kebabCase( namespace );\n\treturn `components-${ kebab }`;\n}\n\nexport const getStyledClassNameFromKey = memoize( getStyledClassName );\n","/*\n\nBased off glamor's StyleSheet, thanks Sunil â¤ï¸\n\nhigh performance StyleSheet for css-in-js systems\n\n- uses multiple style tags behind the scenes for millions of rules\n- uses `insertRule` for appending in production for *much* faster performance\n\n// usage\n\nimport { StyleSheet } from '@emotion/sheet'\n\nlet styleSheet = new StyleSheet({ key: '', container: document.head })\n\nstyleSheet.insert('#box { border: 1px solid red; }')\n- appends a css rule into the stylesheet\n\nstyleSheet.flush()\n- empties the stylesheet of all its contents\n\n*/\n// $FlowFixMe\nfunction sheetForTag(tag) {\n if (tag.sheet) {\n // $FlowFixMe\n return tag.sheet;\n } // this weirdness brought to you by firefox\n\n /* istanbul ignore next */\n\n\n for (var i = 0; i < document.styleSheets.length; i++) {\n if (document.styleSheets[i].ownerNode === tag) {\n // $FlowFixMe\n return document.styleSheets[i];\n }\n }\n}\n\nfunction createStyleElement(options) {\n var tag = document.createElement('style');\n tag.setAttribute('data-emotion', options.key);\n\n if (options.nonce !== undefined) {\n tag.setAttribute('nonce', options.nonce);\n }\n\n tag.appendChild(document.createTextNode(''));\n tag.setAttribute('data-s', '');\n return tag;\n}\n\nvar StyleSheet = /*#__PURE__*/function () {\n function StyleSheet(options) {\n var _this = this;\n\n this._insertTag = function (tag) {\n var before;\n\n if (_this.tags.length === 0) {\n if (_this.insertionPoint) {\n before = _this.insertionPoint.nextSibling;\n } else if (_this.prepend) {\n before = _this.container.firstChild;\n } else {\n before = _this.before;\n }\n } else {\n before = _this.tags[_this.tags.length - 1].nextSibling;\n }\n\n _this.container.insertBefore(tag, before);\n\n _this.tags.push(tag);\n };\n\n this.isSpeedy = options.speedy === undefined ? process.env.NODE_ENV === 'production' : options.speedy;\n this.tags = [];\n this.ctr = 0;\n this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets\n\n this.key = options.key;\n this.container = options.container;\n this.prepend = options.prepend;\n this.insertionPoint = options.insertionPoint;\n this.before = null;\n }\n\n var _proto = StyleSheet.prototype;\n\n _proto.hydrate = function hydrate(nodes) {\n nodes.forEach(this._insertTag);\n };\n\n _proto.insert = function insert(rule) {\n // the max length is how many rules we have per style tag, it's 65000 in speedy mode\n // it's 1 in dev because we insert source maps that map a single rule to a location\n // and you can only have one source map per style tag\n if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {\n this._insertTag(createStyleElement(this));\n }\n\n var tag = this.tags[this.tags.length - 1];\n\n if (process.env.NODE_ENV !== 'production') {\n var isImportRule = rule.charCodeAt(0) === 64 && rule.charCodeAt(1) === 105;\n\n if (isImportRule && this._alreadyInsertedOrderInsensitiveRule) {\n // this would only cause problem in speedy mode\n // but we don't want enabling speedy to affect the observable behavior\n // so we report this error at all times\n console.error(\"You're attempting to insert the following rule:\\n\" + rule + '\\n\\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules.');\n }\n this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !isImportRule;\n }\n\n if (this.isSpeedy) {\n var sheet = sheetForTag(tag);\n\n try {\n // this is the ultrafast version, works across browsers\n // the big drawback is that the css won't be editable in devtools\n sheet.insertRule(rule, sheet.cssRules.length);\n } catch (e) {\n if (process.env.NODE_ENV !== 'production' && !/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear){/.test(rule)) {\n console.error(\"There was a problem inserting the following rule: \\\"\" + rule + \"\\\"\", e);\n }\n }\n } else {\n tag.appendChild(document.createTextNode(rule));\n }\n\n this.ctr++;\n };\n\n _proto.flush = function flush() {\n // $FlowFixMe\n this.tags.forEach(function (tag) {\n return tag.parentNode && tag.parentNode.removeChild(tag);\n });\n this.tags = [];\n this.ctr = 0;\n\n if (process.env.NODE_ENV !== 'production') {\n this._alreadyInsertedOrderInsensitiveRule = false;\n }\n };\n\n return StyleSheet;\n}();\n\nexport { StyleSheet };\n","/**\n * @param {number}\n * @return {number}\n */\nexport var abs = Math.abs\n\n/**\n * @param {number}\n * @return {string}\n */\nexport var from = String.fromCharCode\n\n/**\n * @param {object}\n * @return {object}\n */\nexport var assign = Object.assign\n\n/**\n * @param {string} value\n * @param {number} length\n * @return {number}\n */\nexport function hash (value, length) {\n\treturn (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3)\n}\n\n/**\n * @param {string} value\n * @return {string}\n */\nexport function trim (value) {\n\treturn value.trim()\n}\n\n/**\n * @param {string} value\n * @param {RegExp} pattern\n * @return {string?}\n */\nexport function match (value, pattern) {\n\treturn (value = pattern.exec(value)) ? value[0] : value\n}\n\n/**\n * @param {string} value\n * @param {(string|RegExp)} pattern\n * @param {string} replacement\n * @return {string}\n */\nexport function replace (value, pattern, replacement) {\n\treturn value.replace(pattern, replacement)\n}\n\n/**\n * @param {string} value\n * @param {string} search\n * @return {number}\n */\nexport function indexof (value, search) {\n\treturn value.indexOf(search)\n}\n\n/**\n * @param {string} value\n * @param {number} index\n * @return {number}\n */\nexport function charat (value, index) {\n\treturn value.charCodeAt(index) | 0\n}\n\n/**\n * @param {string} value\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function substr (value, begin, end) {\n\treturn value.slice(begin, end)\n}\n\n/**\n * @param {string} value\n * @return {number}\n */\nexport function strlen (value) {\n\treturn value.length\n}\n\n/**\n * @param {any[]} value\n * @return {number}\n */\nexport function sizeof (value) {\n\treturn value.length\n}\n\n/**\n * @param {any} value\n * @param {any[]} array\n * @return {any}\n */\nexport function append (value, array) {\n\treturn array.push(value), value\n}\n\n/**\n * @param {string[]} array\n * @param {function} callback\n * @return {string}\n */\nexport function combine (array, callback) {\n\treturn array.map(callback).join('')\n}\n","import {from, trim, charat, strlen, substr, append, assign} from './Utility.js'\n\nexport var line = 1\nexport var column = 1\nexport var length = 0\nexport var position = 0\nexport var character = 0\nexport var characters = ''\n\n/**\n * @param {string} value\n * @param {object | null} root\n * @param {object | null} parent\n * @param {string} type\n * @param {string[] | string} props\n * @param {object[] | string} children\n * @param {number} length\n */\nexport function node (value, root, parent, type, props, children, length) {\n\treturn {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: ''}\n}\n\n/**\n * @param {object} root\n * @param {object} props\n * @return {object}\n */\nexport function copy (root, props) {\n\treturn assign(node('', null, null, '', null, null, 0), root, {length: -root.length}, props)\n}\n\n/**\n * @return {number}\n */\nexport function char () {\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function prev () {\n\tcharacter = position > 0 ? charat(characters, --position) : 0\n\n\tif (column--, character === 10)\n\t\tcolumn = 1, line--\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function next () {\n\tcharacter = position < length ? charat(characters, position++) : 0\n\n\tif (column++, character === 10)\n\t\tcolumn = 1, line++\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function peek () {\n\treturn charat(characters, position)\n}\n\n/**\n * @return {number}\n */\nexport function caret () {\n\treturn position\n}\n\n/**\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function slice (begin, end) {\n\treturn substr(characters, begin, end)\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function token (type) {\n\tswitch (type) {\n\t\t// \\0 \\t \\n \\r \\s whitespace token\n\t\tcase 0: case 9: case 10: case 13: case 32:\n\t\t\treturn 5\n\t\t// ! + , / > @ ~ isolate token\n\t\tcase 33: case 43: case 44: case 47: case 62: case 64: case 126:\n\t\t// ; { } breakpoint token\n\t\tcase 59: case 123: case 125:\n\t\t\treturn 4\n\t\t// : accompanied token\n\t\tcase 58:\n\t\t\treturn 3\n\t\t// \" ' ( [ opening delimit token\n\t\tcase 34: case 39: case 40: case 91:\n\t\t\treturn 2\n\t\t// ) ] closing delimit token\n\t\tcase 41: case 93:\n\t\t\treturn 1\n\t}\n\n\treturn 0\n}\n\n/**\n * @param {string} value\n * @return {any[]}\n */\nexport function alloc (value) {\n\treturn line = column = 1, length = strlen(characters = value), position = 0, []\n}\n\n/**\n * @param {any} value\n * @return {any}\n */\nexport function dealloc (value) {\n\treturn characters = '', value\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function delimit (type) {\n\treturn trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))\n}\n\n/**\n * @param {string} value\n * @return {string[]}\n */\nexport function tokenize (value) {\n\treturn dealloc(tokenizer(alloc(value)))\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function whitespace (type) {\n\twhile (character = peek())\n\t\tif (character < 33)\n\t\t\tnext()\n\t\telse\n\t\t\tbreak\n\n\treturn token(type) > 2 || token(character) > 3 ? '' : ' '\n}\n\n/**\n * @param {string[]} children\n * @return {string[]}\n */\nexport function tokenizer (children) {\n\twhile (next())\n\t\tswitch (token(character)) {\n\t\t\tcase 0: append(identifier(position - 1), children)\n\t\t\t\tbreak\n\t\t\tcase 2: append(delimit(character), children)\n\t\t\t\tbreak\n\t\t\tdefault: append(from(character), children)\n\t\t}\n\n\treturn children\n}\n\n/**\n * @param {number} index\n * @param {number} count\n * @return {string}\n */\nexport function escaping (index, count) {\n\twhile (--count && next())\n\t\t// not 0-9 A-F a-f\n\t\tif (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))\n\t\t\tbreak\n\n\treturn slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function delimiter (type) {\n\twhile (next())\n\t\tswitch (character) {\n\t\t\t// ] ) \" '\n\t\t\tcase type:\n\t\t\t\treturn position\n\t\t\t// \" '\n\t\t\tcase 34: case 39:\n\t\t\t\tif (type !== 34 && type !== 39)\n\t\t\t\t\tdelimiter(character)\n\t\t\t\tbreak\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (type === 41)\n\t\t\t\t\tdelimiter(type)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tnext()\n\t\t\t\tbreak\n\t\t}\n\n\treturn position\n}\n\n/**\n * @param {number} type\n * @param {number} index\n * @return {number}\n */\nexport function commenter (type, index) {\n\twhile (next())\n\t\t// //\n\t\tif (type + character === 47 + 10)\n\t\t\tbreak\n\t\t// /*\n\t\telse if (type + character === 42 + 42 && peek() === 47)\n\t\t\tbreak\n\n\treturn '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())\n}\n\n/**\n * @param {number} index\n * @return {string}\n */\nexport function identifier (index) {\n\twhile (!token(peek()))\n\t\tnext()\n\n\treturn slice(index, position)\n}\n","export var MS = '-ms-'\nexport var MOZ = '-moz-'\nexport var WEBKIT = '-webkit-'\n\nexport var COMMENT = 'comm'\nexport var RULESET = 'rule'\nexport var DECLARATION = 'decl'\n\nexport var PAGE = '@page'\nexport var MEDIA = '@media'\nexport var IMPORT = '@import'\nexport var CHARSET = '@charset'\nexport var VIEWPORT = '@viewport'\nexport var SUPPORTS = '@supports'\nexport var DOCUMENT = '@document'\nexport var NAMESPACE = '@namespace'\nexport var KEYFRAMES = '@keyframes'\nexport var FONT_FACE = '@font-face'\nexport var COUNTER_STYLE = '@counter-style'\nexport var FONT_FEATURE_VALUES = '@font-feature-values'\n","import {IMPORT, COMMENT, RULESET, DECLARATION, KEYFRAMES} from './Enum.js'\nimport {strlen, sizeof} from './Utility.js'\n\n/**\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function serialize (children, callback) {\n\tvar output = ''\n\tvar length = sizeof(children)\n\n\tfor (var i = 0; i < length; i++)\n\t\toutput += callback(children[i], i, children, callback) || ''\n\n\treturn output\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function stringify (element, index, children, callback) {\n\tswitch (element.type) {\n\t\tcase IMPORT: case DECLARATION: return element.return = element.return || element.value\n\t\tcase COMMENT: return ''\n\t\tcase KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'\n\t\tcase RULESET: element.value = element.props.join(',')\n\t}\n\n\treturn strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''\n}\n","import {MS, MOZ, WEBKIT} from './Enum.js'\nimport {hash, charat, strlen, indexof, replace} from './Utility.js'\n\n/**\n * @param {string} value\n * @param {number} length\n * @return {string}\n */\nexport function prefix (value, length) {\n\tswitch (hash(value, length)) {\n\t\t// color-adjust\n\t\tcase 5103:\n\t\t\treturn WEBKIT + 'print-' + value + value\n\t\t// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)\n\t\tcase 5737: case 4201: case 3177: case 3433: case 1641: case 4457: case 2921:\n\t\t// text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break\n\t\tcase 5572: case 6356: case 5844: case 3191: case 6645: case 3005:\n\t\t// mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,\n\t\tcase 6391: case 5879: case 5623: case 6135: case 4599: case 4855:\n\t\t// background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)\n\t\tcase 4215: case 6389: case 5109: case 5365: case 5621: case 3829:\n\t\t\treturn WEBKIT + value + value\n\t\t// appearance, user-select, transform, hyphens, text-size-adjust\n\t\tcase 5349: case 4246: case 4810: case 6968: case 2756:\n\t\t\treturn WEBKIT + value + MOZ + value + MS + value + value\n\t\t// flex, flex-direction\n\t\tcase 6828: case 4268:\n\t\t\treturn WEBKIT + value + MS + value + value\n\t\t// order\n\t\tcase 6165:\n\t\t\treturn WEBKIT + value + MS + 'flex-' + value + value\n\t\t// align-items\n\t\tcase 5187:\n\t\t\treturn WEBKIT + value + replace(value, /(\\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value\n\t\t// align-self\n\t\tcase 5443:\n\t\t\treturn WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value\n\t\t// align-content\n\t\tcase 4675:\n\t\t\treturn WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value\n\t\t// flex-shrink\n\t\tcase 5548:\n\t\t\treturn WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value\n\t\t// flex-basis\n\t\tcase 5292:\n\t\t\treturn WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value\n\t\t// flex-grow\n\t\tcase 6060:\n\t\t\treturn WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value\n\t\t// transition\n\t\tcase 4554:\n\t\t\treturn WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value\n\t\t// cursor\n\t\tcase 6187:\n\t\t\treturn replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value\n\t\t// background, background-image\n\t\tcase 5495: case 3959:\n\t\t\treturn replace(value, /(image-set\\([^]*)/, WEBKIT + '$1' + '$`$1')\n\t\t// justify-content\n\t\tcase 4968:\n\t\t\treturn replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value\n\t\t// (margin|padding)-inline-(start|end)\n\t\tcase 4095: case 3583: case 4068: case 2532:\n\t\t\treturn replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value\n\t\t// (min|max)?(width|height|inline-size|block-size)\n\t\tcase 8116: case 7059: case 5753: case 5535:\n\t\tcase 5445: case 5701: case 4933: case 4677:\n\t\tcase 5533: case 5789: case 5021: case 4765:\n\t\t\t// stretch, max-content, min-content, fill-available\n\t\t\tif (strlen(value) - 1 - length > 6)\n\t\t\t\tswitch (charat(value, length + 1)) {\n\t\t\t\t\t// (m)ax-content, (m)in-content\n\t\t\t\t\tcase 109:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (charat(value, length + 4) !== 45)\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t// (f)ill-available, (f)it-content\n\t\t\t\t\tcase 102:\n\t\t\t\t\t\treturn replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value\n\t\t\t\t\t// (s)tretch\n\t\t\t\t\tcase 115:\n\t\t\t\t\t\treturn ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value\n\t\t\t\t}\n\t\t\tbreak\n\t\t// position: sticky\n\t\tcase 4949:\n\t\t\t// (s)ticky?\n\t\t\tif (charat(value, length + 1) !== 115)\n\t\t\t\tbreak\n\t\t// display: (flex|inline-flex)\n\t\tcase 6444:\n\t\t\tswitch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {\n\t\t\t\t// stic(k)y\n\t\t\t\tcase 107:\n\t\t\t\t\treturn replace(value, ':', ':' + WEBKIT) + value\n\t\t\t\t// (inline-)?fl(e)x\n\t\t\t\tcase 101:\n\t\t\t\t\treturn replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value\n\t\t\t}\n\t\t\tbreak\n\t\t// writing-mode\n\t\tcase 5936:\n\t\t\tswitch (charat(value, length + 11)) {\n\t\t\t\t// vertical-l(r)\n\t\t\t\tcase 114:\n\t\t\t\t\treturn WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb') + value\n\t\t\t\t// vertical-r(l)\n\t\t\t\tcase 108:\n\t\t\t\t\treturn WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb-rl') + value\n\t\t\t\t// horizontal(-)tb\n\t\t\t\tcase 45:\n\t\t\t\t\treturn WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'lr') + value\n\t\t\t}\n\n\t\t\treturn WEBKIT + value + MS + value + value\n\t}\n\n\treturn value\n}\n","import {COMMENT, RULESET, DECLARATION} from './Enum.js'\nimport {abs, trim, from, sizeof, strlen, substr, append, replace, indexof} from './Utility.js'\nimport {node, char, prev, next, peek, caret, alloc, dealloc, delimit, whitespace, escaping, identifier, commenter} from './Tokenizer.js'\n\n/**\n * @param {string} value\n * @return {object[]}\n */\nexport function compile (value) {\n\treturn dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {string[]} rule\n * @param {string[]} rules\n * @param {string[]} rulesets\n * @param {number[]} pseudo\n * @param {number[]} points\n * @param {string[]} declarations\n * @return {object}\n */\nexport function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {\n\tvar index = 0\n\tvar offset = 0\n\tvar length = pseudo\n\tvar atrule = 0\n\tvar property = 0\n\tvar previous = 0\n\tvar variable = 1\n\tvar scanning = 1\n\tvar ampersand = 1\n\tvar character = 0\n\tvar type = ''\n\tvar props = rules\n\tvar children = rulesets\n\tvar reference = rule\n\tvar characters = type\n\n\twhile (scanning)\n\t\tswitch (previous = character, character = next()) {\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (previous != 108 && characters.charCodeAt(length - 1) == 58) {\n\t\t\t\t\tif (indexof(characters += replace(delimit(character), '&', '&\\f'), '&\\f') != -1)\n\t\t\t\t\t\tampersand = -1\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t// \" ' [\n\t\t\tcase 34: case 39: case 91:\n\t\t\t\tcharacters += delimit(character)\n\t\t\t\tbreak\n\t\t\t// \\t \\n \\r \\s\n\t\t\tcase 9: case 10: case 13: case 32:\n\t\t\t\tcharacters += whitespace(previous)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tcharacters += escaping(caret() - 1, 7)\n\t\t\t\tcontinue\n\t\t\t// /\n\t\t\tcase 47:\n\t\t\t\tswitch (peek()) {\n\t\t\t\t\tcase 42: case 47:\n\t\t\t\t\t\tappend(comment(commenter(next(), caret()), root, parent), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcharacters += '/'\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t// {\n\t\t\tcase 123 * variable:\n\t\t\t\tpoints[index++] = strlen(characters) * ampersand\n\t\t\t// } ; \\0\n\t\t\tcase 125 * variable: case 59: case 0:\n\t\t\t\tswitch (character) {\n\t\t\t\t\t// \\0 }\n\t\t\t\t\tcase 0: case 125: scanning = 0\n\t\t\t\t\t// ;\n\t\t\t\t\tcase 59 + offset:\n\t\t\t\t\t\tif (property > 0 && (strlen(characters) - length))\n\t\t\t\t\t\t\tappend(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @ ;\n\t\t\t\t\tcase 59: characters += ';'\n\t\t\t\t\t// { rule/at-rule\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tappend(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length), rulesets)\n\n\t\t\t\t\t\tif (character === 123)\n\t\t\t\t\t\t\tif (offset === 0)\n\t\t\t\t\t\t\t\tparse(characters, root, reference, reference, props, rulesets, length, points, children)\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tswitch (atrule) {\n\t\t\t\t\t\t\t\t\t// d m s\n\t\t\t\t\t\t\t\t\tcase 100: case 109: case 115:\n\t\t\t\t\t\t\t\t\t\tparse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length), children), rules, children, length, points, rule ? props : children)\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\tparse(characters, reference, reference, reference, [''], children, 0, points, children)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tindex = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo\n\t\t\t\tbreak\n\t\t\t// :\n\t\t\tcase 58:\n\t\t\t\tlength = 1 + strlen(characters), property = previous\n\t\t\tdefault:\n\t\t\t\tif (variable < 1)\n\t\t\t\t\tif (character == 123)\n\t\t\t\t\t\t--variable\n\t\t\t\t\telse if (character == 125 && variable++ == 0 && prev() == 125)\n\t\t\t\t\t\tcontinue\n\n\t\t\t\tswitch (characters += from(character), character * variable) {\n\t\t\t\t\t// &\n\t\t\t\t\tcase 38:\n\t\t\t\t\t\tampersand = offset > 0 ? 1 : (characters += '\\f', -1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// ,\n\t\t\t\t\tcase 44:\n\t\t\t\t\t\tpoints[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @\n\t\t\t\t\tcase 64:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (peek() === 45)\n\t\t\t\t\t\t\tcharacters += delimit(next())\n\n\t\t\t\t\t\tatrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// -\n\t\t\t\t\tcase 45:\n\t\t\t\t\t\tif (previous === 45 && strlen(characters) == 2)\n\t\t\t\t\t\t\tvariable = 0\n\t\t\t\t}\n\t\t}\n\n\treturn rulesets\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} index\n * @param {number} offset\n * @param {string[]} rules\n * @param {number[]} points\n * @param {string} type\n * @param {string[]} props\n * @param {string[]} children\n * @param {number} length\n * @return {object}\n */\nexport function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length) {\n\tvar post = offset - 1\n\tvar rule = offset === 0 ? rules : ['']\n\tvar size = sizeof(rule)\n\n\tfor (var i = 0, j = 0, k = 0; i < index; ++i)\n\t\tfor (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)\n\t\t\tif (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\\f/g, rule[x])))\n\t\t\t\tprops[k++] = z\n\n\treturn node(value, root, parent, offset === 0 ? RULESET : type, props, children, length)\n}\n\n/**\n * @param {number} value\n * @param {object} root\n * @param {object?} parent\n * @return {object}\n */\nexport function comment (value, root, parent) {\n\treturn node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0)\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} length\n * @return {object}\n */\nexport function declaration (value, root, parent, length) {\n\treturn node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length)\n}\n","import { StyleSheet } from '@emotion/sheet';\nimport { dealloc, alloc, next, token, from, peek, delimit, slice, position, stringify, COMMENT, rulesheet, middleware, prefixer, serialize, compile } from 'stylis';\nimport '@emotion/weak-memoize';\nimport '@emotion/memoize';\n\nvar last = function last(arr) {\n return arr.length ? arr[arr.length - 1] : null;\n}; // based on https://github.com/thysultan/stylis.js/blob/e6843c373ebcbbfade25ebcc23f540ed8508da0a/src/Tokenizer.js#L239-L244\n\n\nvar identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {\n var previous = 0;\n var character = 0;\n\n while (true) {\n previous = character;\n character = peek(); // &\\f\n\n if (previous === 38 && character === 12) {\n points[index] = 1;\n }\n\n if (token(character)) {\n break;\n }\n\n next();\n }\n\n return slice(begin, position);\n};\n\nvar toRules = function toRules(parsed, points) {\n // pretend we've started with a comma\n var index = -1;\n var character = 44;\n\n do {\n switch (token(character)) {\n case 0:\n // &\\f\n if (character === 38 && peek() === 12) {\n // this is not 100% correct, we don't account for literal sequences here - like for example quoted strings\n // stylis inserts \\f after & to know when & where it should replace this sequence with the context selector\n // and when it should just concatenate the outer and inner selectors\n // it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here\n points[index] = 1;\n }\n\n parsed[index] += identifierWithPointTracking(position - 1, points, index);\n break;\n\n case 2:\n parsed[index] += delimit(character);\n break;\n\n case 4:\n // comma\n if (character === 44) {\n // colon\n parsed[++index] = peek() === 58 ? '&\\f' : '';\n points[index] = parsed[index].length;\n break;\n }\n\n // fallthrough\n\n default:\n parsed[index] += from(character);\n }\n } while (character = next());\n\n return parsed;\n};\n\nvar getRules = function getRules(value, points) {\n return dealloc(toRules(alloc(value), points));\n}; // WeakSet would be more appropriate, but only WeakMap is supported in IE11\n\n\nvar fixedElements = /* #__PURE__ */new WeakMap();\nvar compat = function compat(element) {\n if (element.type !== 'rule' || !element.parent || // positive .length indicates that this rule contains pseudo\n // negative .length indicates that this rule has been already prefixed\n element.length < 1) {\n return;\n }\n\n var value = element.value,\n parent = element.parent;\n var isImplicitRule = element.column === parent.column && element.line === parent.line;\n\n while (parent.type !== 'rule') {\n parent = parent.parent;\n if (!parent) return;\n } // short-circuit for the simplest case\n\n\n if (element.props.length === 1 && value.charCodeAt(0) !== 58\n /* colon */\n && !fixedElements.get(parent)) {\n return;\n } // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)\n // then the props has already been manipulated beforehand as they that array is shared between it and its \"rule parent\"\n\n\n if (isImplicitRule) {\n return;\n }\n\n fixedElements.set(element, true);\n var points = [];\n var rules = getRules(value, points);\n var parentRules = parent.props;\n\n for (var i = 0, k = 0; i < rules.length; i++) {\n for (var j = 0; j < parentRules.length; j++, k++) {\n element.props[k] = points[i] ? rules[i].replace(/&\\f/g, parentRules[j]) : parentRules[j] + \" \" + rules[i];\n }\n }\n};\nvar removeLabel = function removeLabel(element) {\n if (element.type === 'decl') {\n var value = element.value;\n\n if ( // charcode for l\n value.charCodeAt(0) === 108 && // charcode for b\n value.charCodeAt(2) === 98) {\n // this ignores label\n element[\"return\"] = '';\n element.value = '';\n }\n }\n};\nvar ignoreFlag = 'emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason';\n\nvar isIgnoringComment = function isIgnoringComment(element) {\n return !!element && element.type === 'comm' && element.children.indexOf(ignoreFlag) > -1;\n};\n\nvar createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm(cache) {\n return function (element, index, children) {\n if (element.type !== 'rule') return;\n var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g);\n\n if (unsafePseudoClasses && cache.compat !== true) {\n var prevElement = index > 0 ? children[index - 1] : null;\n\n if (prevElement && isIgnoringComment(last(prevElement.children))) {\n return;\n }\n\n unsafePseudoClasses.forEach(function (unsafePseudoClass) {\n console.error(\"The pseudo class \\\"\" + unsafePseudoClass + \"\\\" is potentially unsafe when doing server-side rendering. Try changing it to \\\"\" + unsafePseudoClass.split('-child')[0] + \"-of-type\\\".\");\n });\n }\n };\n};\n\nvar isImportRule = function isImportRule(element) {\n return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64;\n};\n\nvar isPrependedWithRegularRules = function isPrependedWithRegularRules(index, children) {\n for (var i = index - 1; i >= 0; i--) {\n if (!isImportRule(children[i])) {\n return true;\n }\n }\n\n return false;\n}; // use this to remove incorrect elements from further processing\n// so they don't get handed to the `sheet` (or anything else)\n// as that could potentially lead to additional logs which in turn could be overhelming to the user\n\n\nvar nullifyElement = function nullifyElement(element) {\n element.type = '';\n element.value = '';\n element[\"return\"] = '';\n element.children = '';\n element.props = '';\n};\n\nvar incorrectImportAlarm = function incorrectImportAlarm(element, index, children) {\n if (!isImportRule(element)) {\n return;\n }\n\n if (element.parent) {\n console.error(\"`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles.\");\n nullifyElement(element);\n } else if (isPrependedWithRegularRules(index, children)) {\n console.error(\"`@import` rules can't be after other rules. Please put your `@import` rules before your other rules.\");\n nullifyElement(element);\n }\n};\n\nvar defaultStylisPlugins = [prefixer];\n\nvar createCache = function createCache(options) {\n var key = options.key;\n\n if (process.env.NODE_ENV !== 'production' && !key) {\n throw new Error(\"You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\\n\" + \"If multiple caches share the same key they might \\\"fight\\\" for each other's style elements.\");\n }\n\n if ( key === 'css') {\n var ssrStyles = document.querySelectorAll(\"style[data-emotion]:not([data-s])\"); // get SSRed styles out of the way of React's hydration\n // document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)\n // note this very very intentionally targets all style elements regardless of the key to ensure\n // that creating a cache works inside of render of a React component\n\n Array.prototype.forEach.call(ssrStyles, function (node) {\n // we want to only move elements which have a space in the data-emotion attribute value\n // because that indicates that it is an Emotion 11 server-side rendered style elements\n // while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector\n // Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)\n // so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles\n // will not result in the Emotion 10 styles being destroyed\n var dataEmotionAttribute = node.getAttribute('data-emotion');\n\n if (dataEmotionAttribute.indexOf(' ') === -1) {\n return;\n }\n document.head.appendChild(node);\n node.setAttribute('data-s', '');\n });\n }\n\n var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;\n\n if (process.env.NODE_ENV !== 'production') {\n // $FlowFixMe\n if (/[^a-z-]/.test(key)) {\n throw new Error(\"Emotion key must only contain lower case alphabetical characters and - but \\\"\" + key + \"\\\" was passed\");\n }\n }\n\n var inserted = {}; // $FlowFixMe\n\n var container;\n var nodesToHydrate = [];\n\n {\n container = options.container || document.head;\n Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which\n // means that the style elements we're looking at are only Emotion 11 server-rendered style elements\n document.querySelectorAll(\"style[data-emotion^=\\\"\" + key + \" \\\"]\"), function (node) {\n var attrib = node.getAttribute(\"data-emotion\").split(' '); // $FlowFixMe\n\n for (var i = 1; i < attrib.length; i++) {\n inserted[attrib[i]] = true;\n }\n\n nodesToHydrate.push(node);\n });\n }\n\n var _insert;\n\n var omnipresentPlugins = [compat, removeLabel];\n\n if (process.env.NODE_ENV !== 'production') {\n omnipresentPlugins.push(createUnsafeSelectorsAlarm({\n get compat() {\n return cache.compat;\n }\n\n }), incorrectImportAlarm);\n }\n\n {\n var currentSheet;\n var finalizingPlugins = [stringify, process.env.NODE_ENV !== 'production' ? function (element) {\n if (!element.root) {\n if (element[\"return\"]) {\n currentSheet.insert(element[\"return\"]);\n } else if (element.value && element.type !== COMMENT) {\n // insert empty rule in non-production environments\n // so @emotion/jest can grab `key` from the (JS)DOM for caches without any rules inserted yet\n currentSheet.insert(element.value + \"{}\");\n }\n }\n } : rulesheet(function (rule) {\n currentSheet.insert(rule);\n })];\n var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));\n\n var stylis = function stylis(styles) {\n return serialize(compile(styles), serializer);\n };\n\n _insert = function insert(selector, serialized, sheet, shouldCache) {\n currentSheet = sheet;\n\n if (process.env.NODE_ENV !== 'production' && serialized.map !== undefined) {\n currentSheet = {\n insert: function insert(rule) {\n sheet.insert(rule + serialized.map);\n }\n };\n }\n\n stylis(selector ? selector + \"{\" + serialized.styles + \"}\" : serialized.styles);\n\n if (shouldCache) {\n cache.inserted[serialized.name] = true;\n }\n };\n }\n\n var cache = {\n key: key,\n sheet: new StyleSheet({\n key: key,\n container: container,\n nonce: options.nonce,\n speedy: options.speedy,\n prepend: options.prepend,\n insertionPoint: options.insertionPoint\n }),\n nonce: options.nonce,\n inserted: inserted,\n registered: {},\n insert: _insert\n };\n cache.sheet.hydrate(nodesToHydrate);\n return cache;\n};\n\nexport default createCache;\n","import {MS, MOZ, WEBKIT, RULESET, KEYFRAMES, DECLARATION} from './Enum.js'\nimport {match, charat, substr, strlen, sizeof, replace, combine} from './Utility.js'\nimport {copy, tokenize} from './Tokenizer.js'\nimport {serialize} from './Serializer.js'\nimport {prefix} from './Prefixer.js'\n\n/**\n * @param {function[]} collection\n * @return {function}\n */\nexport function middleware (collection) {\n\tvar length = sizeof(collection)\n\n\treturn function (element, index, children, callback) {\n\t\tvar output = ''\n\n\t\tfor (var i = 0; i < length; i++)\n\t\t\toutput += collection[i](element, index, children, callback) || ''\n\n\t\treturn output\n\t}\n}\n\n/**\n * @param {function} callback\n * @return {function}\n */\nexport function rulesheet (callback) {\n\treturn function (element) {\n\t\tif (!element.root)\n\t\t\tif (element = element.return)\n\t\t\t\tcallback(element)\n\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n */\nexport function prefixer (element, index, children, callback) {\n\tif (element.length > -1)\n\t\tif (!element.return)\n\t\t\tswitch (element.type) {\n\t\t\t\tcase DECLARATION: element.return = prefix(element.value, element.length)\n\t\t\t\t\tbreak\n\t\t\t\tcase KEYFRAMES:\n\t\t\t\t\treturn serialize([copy(element, {value: replace(element.value, '@', '@' + WEBKIT)})], callback)\n\t\t\t\tcase RULESET:\n\t\t\t\t\tif (element.length)\n\t\t\t\t\t\treturn combine(element.props, function (value) {\n\t\t\t\t\t\t\tswitch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n\t\t\t\t\t\t\t\t// :read-(only|write)\n\t\t\t\t\t\t\t\tcase ':read-only': case ':read-write':\n\t\t\t\t\t\t\t\t\treturn serialize([copy(element, {props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]})], callback)\n\t\t\t\t\t\t\t\t// :placeholder\n\t\t\t\t\t\t\t\tcase '::placeholder':\n\t\t\t\t\t\t\t\t\treturn serialize([\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]}),\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]}),\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]})\n\t\t\t\t\t\t\t\t\t], callback)\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn ''\n\t\t\t\t\t\t})\n\t\t\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n */\nexport function namespace (element) {\n\tswitch (element.type) {\n\t\tcase RULESET:\n\t\t\telement.props = element.props.map(function (value) {\n\t\t\t\treturn combine(tokenize(value), function (value, index, children) {\n\t\t\t\t\tswitch (charat(value, 0)) {\n\t\t\t\t\t\t// \\f\n\t\t\t\t\t\tcase 12:\n\t\t\t\t\t\t\treturn substr(value, 1, strlen(value))\n\t\t\t\t\t\t// \\0 ( + > ~\n\t\t\t\t\t\tcase 0: case 40: case 43: case 62: case 126:\n\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t// :\n\t\t\t\t\t\tcase 58:\n\t\t\t\t\t\t\tif (children[++index] === 'global')\n\t\t\t\t\t\t\t\tchildren[index] = '', children[++index] = '\\f' + substr(children[index], index = 1, -1)\n\t\t\t\t\t\t// \\s\n\t\t\t\t\t\tcase 32:\n\t\t\t\t\t\t\treturn index === 1 ? '' : value\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tswitch (index) {\n\t\t\t\t\t\t\t\tcase 0: element = value\n\t\t\t\t\t\t\t\t\treturn sizeof(children) > 1 ? '' : value\n\t\t\t\t\t\t\t\tcase index = sizeof(children) - 1: case 2:\n\t\t\t\t\t\t\t\t\treturn index === 2 ? value + element + element : value + element\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\t}\n}\n","var unitlessKeys = {\n animationIterationCount: 1,\n aspectRatio: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\n\nexport { unitlessKeys as default };\n","function memoize(fn) {\n var cache = Object.create(null);\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport { memoize as default };\n","import hashString from '@emotion/hash';\nimport unitless from '@emotion/unitless';\nimport memoize from '@emotion/memoize';\n\nvar ILLEGAL_ESCAPE_SEQUENCE_ERROR = \"You have illegal escape sequence in your template literal, most likely inside content's property value.\\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \\\"content: '\\\\00d7';\\\" should become \\\"content: '\\\\\\\\00d7';\\\".\\nYou can read more about this here:\\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences\";\nvar UNDEFINED_AS_OBJECT_KEY_ERROR = \"You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).\";\nvar hyphenateRegex = /[A-Z]|^ms/g;\nvar animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;\n\nvar isCustomProperty = function isCustomProperty(property) {\n return property.charCodeAt(1) === 45;\n};\n\nvar isProcessableValue = function isProcessableValue(value) {\n return value != null && typeof value !== 'boolean';\n};\n\nvar processStyleName = /* #__PURE__ */memoize(function (styleName) {\n return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();\n});\n\nvar processStyleValue = function processStyleValue(key, value) {\n switch (key) {\n case 'animation':\n case 'animationName':\n {\n if (typeof value === 'string') {\n return value.replace(animationRegex, function (match, p1, p2) {\n cursor = {\n name: p1,\n styles: p2,\n next: cursor\n };\n return p1;\n });\n }\n }\n }\n\n if (unitless[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {\n return value + 'px';\n }\n\n return value;\n};\n\nif (process.env.NODE_ENV !== 'production') {\n var contentValuePattern = /(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\\(|(no-)?(open|close)-quote/;\n var contentValues = ['normal', 'none', 'initial', 'inherit', 'unset'];\n var oldProcessStyleValue = processStyleValue;\n var msPattern = /^-ms-/;\n var hyphenPattern = /-(.)/g;\n var hyphenatedCache = {};\n\n processStyleValue = function processStyleValue(key, value) {\n if (key === 'content') {\n if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '\"' && value.charAt(0) !== \"'\")) {\n throw new Error(\"You seem to be using a value for 'content' without quotes, try replacing it with `content: '\\\"\" + value + \"\\\"'`\");\n }\n }\n\n var processed = oldProcessStyleValue(key, value);\n\n if (processed !== '' && !isCustomProperty(key) && key.indexOf('-') !== -1 && hyphenatedCache[key] === undefined) {\n hyphenatedCache[key] = true;\n console.error(\"Using kebab-case for css properties in objects is not supported. Did you mean \" + key.replace(msPattern, 'ms-').replace(hyphenPattern, function (str, _char) {\n return _char.toUpperCase();\n }) + \"?\");\n }\n\n return processed;\n };\n}\n\nvar noComponentSelectorMessage = 'Component selectors can only be used in conjunction with ' + '@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ' + 'compiler transform.';\n\nfunction handleInterpolation(mergedProps, registered, interpolation) {\n if (interpolation == null) {\n return '';\n }\n\n if (interpolation.__emotion_styles !== undefined) {\n if (process.env.NODE_ENV !== 'production' && interpolation.toString() === 'NO_COMPONENT_SELECTOR') {\n throw new Error(noComponentSelectorMessage);\n }\n\n return interpolation;\n }\n\n switch (typeof interpolation) {\n case 'boolean':\n {\n return '';\n }\n\n case 'object':\n {\n if (interpolation.anim === 1) {\n cursor = {\n name: interpolation.name,\n styles: interpolation.styles,\n next: cursor\n };\n return interpolation.name;\n }\n\n if (interpolation.styles !== undefined) {\n var next = interpolation.next;\n\n if (next !== undefined) {\n // not the most efficient thing ever but this is a pretty rare case\n // and there will be very few iterations of this generally\n while (next !== undefined) {\n cursor = {\n name: next.name,\n styles: next.styles,\n next: cursor\n };\n next = next.next;\n }\n }\n\n var styles = interpolation.styles + \";\";\n\n if (process.env.NODE_ENV !== 'production' && interpolation.map !== undefined) {\n styles += interpolation.map;\n }\n\n return styles;\n }\n\n return createStringFromObject(mergedProps, registered, interpolation);\n }\n\n case 'function':\n {\n if (mergedProps !== undefined) {\n var previousCursor = cursor;\n var result = interpolation(mergedProps);\n cursor = previousCursor;\n return handleInterpolation(mergedProps, registered, result);\n } else if (process.env.NODE_ENV !== 'production') {\n console.error('Functions that are interpolated in css calls will be stringified.\\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\\n' + 'It can be called directly with props or interpolated in a styled call like this\\n' + \"let SomeComponent = styled('div')`${dynamicStyle}`\");\n }\n\n break;\n }\n\n case 'string':\n if (process.env.NODE_ENV !== 'production') {\n var matched = [];\n var replaced = interpolation.replace(animationRegex, function (match, p1, p2) {\n var fakeVarName = \"animation\" + matched.length;\n matched.push(\"const \" + fakeVarName + \" = keyframes`\" + p2.replace(/^@keyframes animation-\\w+/, '') + \"`\");\n return \"${\" + fakeVarName + \"}\";\n });\n\n if (matched.length) {\n console.error('`keyframes` output got interpolated into plain string, please wrap it with `css`.\\n\\n' + 'Instead of doing this:\\n\\n' + [].concat(matched, [\"`\" + replaced + \"`\"]).join('\\n') + '\\n\\nYou should wrap it with `css` like this:\\n\\n' + (\"css`\" + replaced + \"`\"));\n }\n }\n\n break;\n } // finalize string values (regular strings and functions interpolated into css calls)\n\n\n if (registered == null) {\n return interpolation;\n }\n\n var cached = registered[interpolation];\n return cached !== undefined ? cached : interpolation;\n}\n\nfunction createStringFromObject(mergedProps, registered, obj) {\n var string = '';\n\n if (Array.isArray(obj)) {\n for (var i = 0; i < obj.length; i++) {\n string += handleInterpolation(mergedProps, registered, obj[i]) + \";\";\n }\n } else {\n for (var _key in obj) {\n var value = obj[_key];\n\n if (typeof value !== 'object') {\n if (registered != null && registered[value] !== undefined) {\n string += _key + \"{\" + registered[value] + \"}\";\n } else if (isProcessableValue(value)) {\n string += processStyleName(_key) + \":\" + processStyleValue(_key, value) + \";\";\n }\n } else {\n if (_key === 'NO_COMPONENT_SELECTOR' && process.env.NODE_ENV !== 'production') {\n throw new Error(noComponentSelectorMessage);\n }\n\n if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {\n for (var _i = 0; _i < value.length; _i++) {\n if (isProcessableValue(value[_i])) {\n string += processStyleName(_key) + \":\" + processStyleValue(_key, value[_i]) + \";\";\n }\n }\n } else {\n var interpolated = handleInterpolation(mergedProps, registered, value);\n\n switch (_key) {\n case 'animation':\n case 'animationName':\n {\n string += processStyleName(_key) + \":\" + interpolated + \";\";\n break;\n }\n\n default:\n {\n if (process.env.NODE_ENV !== 'production' && _key === 'undefined') {\n console.error(UNDEFINED_AS_OBJECT_KEY_ERROR);\n }\n\n string += _key + \"{\" + interpolated + \"}\";\n }\n }\n }\n }\n }\n }\n\n return string;\n}\n\nvar labelPattern = /label:\\s*([^\\s;\\n{]+)\\s*(;|$)/g;\nvar sourceMapPattern;\n\nif (process.env.NODE_ENV !== 'production') {\n sourceMapPattern = /\\/\\*#\\ssourceMappingURL=data:application\\/json;\\S+\\s+\\*\\//g;\n} // this is the cursor for keyframes\n// keyframes are stored on the SerializedStyles object as a linked list\n\n\nvar cursor;\nvar serializeStyles = function serializeStyles(args, registered, mergedProps) {\n if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {\n return args[0];\n }\n\n var stringMode = true;\n var styles = '';\n cursor = undefined;\n var strings = args[0];\n\n if (strings == null || strings.raw === undefined) {\n stringMode = false;\n styles += handleInterpolation(mergedProps, registered, strings);\n } else {\n if (process.env.NODE_ENV !== 'production' && strings[0] === undefined) {\n console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n }\n\n styles += strings[0];\n } // we start at 1 since we've already handled the first arg\n\n\n for (var i = 1; i < args.length; i++) {\n styles += handleInterpolation(mergedProps, registered, args[i]);\n\n if (stringMode) {\n if (process.env.NODE_ENV !== 'production' && strings[i] === undefined) {\n console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n }\n\n styles += strings[i];\n }\n }\n\n var sourceMap;\n\n if (process.env.NODE_ENV !== 'production') {\n styles = styles.replace(sourceMapPattern, function (match) {\n sourceMap = match;\n return '';\n });\n } // using a global regex with .exec is stateful so lastIndex has to be reset each time\n\n\n labelPattern.lastIndex = 0;\n var identifierName = '';\n var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5\n\n while ((match = labelPattern.exec(styles)) !== null) {\n identifierName += '-' + // $FlowFixMe we know it's not null\n match[1];\n }\n\n var name = hashString(styles) + identifierName;\n\n if (process.env.NODE_ENV !== 'production') {\n // $FlowFixMe SerializedStyles type doesn't have toString property (and we don't want to add it)\n return {\n name: name,\n styles: styles,\n map: sourceMap,\n next: cursor,\n toString: function toString() {\n return \"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).\";\n }\n };\n }\n\n return {\n name: name,\n styles: styles,\n next: cursor\n };\n};\n\nexport { serializeStyles };\n","/* eslint-disable */\n// Inspired by https://github.com/garycourt/murmurhash-js\n// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86\nfunction murmur2(str) {\n // 'm' and 'r' are mixing constants generated offline.\n // They're not really 'magic', they just happen to work well.\n // const m = 0x5bd1e995;\n // const r = 24;\n // Initialize the hash\n var h = 0; // Mix 4 bytes at a time into the hash\n\n var k,\n i = 0,\n len = str.length;\n\n for (; len >= 4; ++i, len -= 4) {\n k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n k =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);\n k ^=\n /* k >>> r: */\n k >>> 24;\n h =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Handle the last few bytes of the input array\n\n\n switch (len) {\n case 3:\n h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n\n case 2:\n h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n\n case 1:\n h ^= str.charCodeAt(i) & 0xff;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Do a few final mixes of the hash to ensure the last few\n // bytes are well-incorporated.\n\n\n h ^= h >>> 13;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n return ((h ^ h >>> 15) >>> 0).toString(36);\n}\n\nexport { murmur2 as default };\n","import { createContext, useContext, forwardRef, createElement, Fragment } from 'react';\nimport createCache from '@emotion/cache';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport weakMemoize from '@emotion/weak-memoize';\nimport hoistNonReactStatics from '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js';\nimport { getRegisteredStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\n\nvar hasOwnProperty = {}.hasOwnProperty;\n\nvar EmotionCacheContext = /* #__PURE__ */createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case\n// because this module is primarily intended for the browser and node\n// but it's also required in react native and similar environments sometimes\n// and we could have a special build just for that\n// but this is much easier and the native packages\n// might use a different theme context in the future anyway\ntypeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({\n key: 'css'\n}) : null);\n\nif (process.env.NODE_ENV !== 'production') {\n EmotionCacheContext.displayName = 'EmotionCacheContext';\n}\n\nvar CacheProvider = EmotionCacheContext.Provider;\nvar __unsafe_useEmotionCache = function useEmotionCache() {\n return useContext(EmotionCacheContext);\n};\n\nvar withEmotionCache = function withEmotionCache(func) {\n // $FlowFixMe\n return /*#__PURE__*/forwardRef(function (props, ref) {\n // the cache will never be null in the browser\n var cache = useContext(EmotionCacheContext);\n return func(props, cache, ref);\n });\n};\n\nvar ThemeContext = /* #__PURE__ */createContext({});\n\nif (process.env.NODE_ENV !== 'production') {\n ThemeContext.displayName = 'EmotionThemeContext';\n}\n\nvar useTheme = function useTheme() {\n return useContext(ThemeContext);\n};\n\nvar getTheme = function getTheme(outerTheme, theme) {\n if (typeof theme === 'function') {\n var mergedTheme = theme(outerTheme);\n\n if (process.env.NODE_ENV !== 'production' && (mergedTheme == null || typeof mergedTheme !== 'object' || Array.isArray(mergedTheme))) {\n throw new Error('[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!');\n }\n\n return mergedTheme;\n }\n\n if (process.env.NODE_ENV !== 'production' && (theme == null || typeof theme !== 'object' || Array.isArray(theme))) {\n throw new Error('[ThemeProvider] Please make your theme prop a plain object');\n }\n\n return _extends({}, outerTheme, theme);\n};\n\nvar createCacheWithTheme = /* #__PURE__ */weakMemoize(function (outerTheme) {\n return weakMemoize(function (theme) {\n return getTheme(outerTheme, theme);\n });\n});\nvar ThemeProvider = function ThemeProvider(props) {\n var theme = useContext(ThemeContext);\n\n if (props.theme !== theme) {\n theme = createCacheWithTheme(theme)(props.theme);\n }\n\n return /*#__PURE__*/createElement(ThemeContext.Provider, {\n value: theme\n }, props.children);\n};\nfunction withTheme(Component) {\n var componentName = Component.displayName || Component.name || 'Component';\n\n var render = function render(props, ref) {\n var theme = useContext(ThemeContext);\n return /*#__PURE__*/createElement(Component, _extends({\n theme: theme,\n ref: ref\n }, props));\n }; // $FlowFixMe\n\n\n var WithTheme = /*#__PURE__*/forwardRef(render);\n WithTheme.displayName = \"WithTheme(\" + componentName + \")\";\n return hoistNonReactStatics(WithTheme, Component);\n}\n\nvar getFunctionNameFromStackTraceLine = function getFunctionNameFromStackTraceLine(line) {\n // V8\n var match = /^\\s+at\\s+([A-Za-z0-9$.]+)\\s/.exec(line);\n\n if (match) {\n // The match may be something like 'Object.createEmotionProps'\n var parts = match[1].split('.');\n return parts[parts.length - 1];\n } // Safari / Firefox\n\n\n match = /^([A-Za-z0-9$.]+)@/.exec(line);\n if (match) return match[1];\n return undefined;\n};\n\nvar internalReactFunctionNames = /* #__PURE__ */new Set(['renderWithHooks', 'processChild', 'finishClassComponent', 'renderToString']); // These identifiers come from error stacks, so they have to be valid JS\n// identifiers, thus we only need to replace what is a valid character for JS,\n// but not for CSS.\n\nvar sanitizeIdentifier = function sanitizeIdentifier(identifier) {\n return identifier.replace(/\\$/g, '-');\n};\n\nvar getLabelFromStackTrace = function getLabelFromStackTrace(stackTrace) {\n if (!stackTrace) return undefined;\n var lines = stackTrace.split('\\n');\n\n for (var i = 0; i < lines.length; i++) {\n var functionName = getFunctionNameFromStackTraceLine(lines[i]); // The first line of V8 stack traces is just \"Error\"\n\n if (!functionName) continue; // If we reach one of these, we have gone too far and should quit\n\n if (internalReactFunctionNames.has(functionName)) break; // The component name is the first function in the stack that starts with an\n // uppercase letter\n\n if (/^[A-Z]/.test(functionName)) return sanitizeIdentifier(functionName);\n }\n\n return undefined;\n};\n\nvar typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';\nvar labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';\nvar createEmotionProps = function createEmotionProps(type, props) {\n if (process.env.NODE_ENV !== 'production' && typeof props.css === 'string' && // check if there is a css declaration\n props.css.indexOf(':') !== -1) {\n throw new Error(\"Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`\" + props.css + \"`\");\n }\n\n var newProps = {};\n\n for (var key in props) {\n if (hasOwnProperty.call(props, key)) {\n newProps[key] = props[key];\n }\n }\n\n newProps[typePropName] = type; // For performance, only call getLabelFromStackTrace in development and when\n // the label hasn't already been computed\n\n if (process.env.NODE_ENV !== 'production' && !!props.css && (typeof props.css !== 'object' || typeof props.css.name !== 'string' || props.css.name.indexOf('-') === -1)) {\n var label = getLabelFromStackTrace(new Error().stack);\n if (label) newProps[labelPropName] = label;\n }\n\n return newProps;\n};\n\nvar Noop = function Noop() {\n return null;\n};\n\nvar Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {\n var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works\n // not passing the registered cache to serializeStyles because it would\n // make certain babel optimisations not possible\n\n if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {\n cssProp = cache.registered[cssProp];\n }\n\n var type = props[typePropName];\n var registeredStyles = [cssProp];\n var className = '';\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, registeredStyles, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(registeredStyles, undefined, useContext(ThemeContext));\n\n if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {\n var labelFromStack = props[labelPropName];\n\n if (labelFromStack) {\n serialized = serializeStyles([serialized, 'label:' + labelFromStack + ';']);\n }\n }\n\n var rules = insertStyles(cache, serialized, typeof type === 'string');\n className += cache.key + \"-\" + serialized.name;\n var newProps = {};\n\n for (var key in props) {\n if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {\n newProps[key] = props[key];\n }\n }\n\n newProps.ref = ref;\n newProps.className = className;\n var ele = /*#__PURE__*/createElement(type, newProps);\n var possiblyStyleElement = /*#__PURE__*/createElement(Noop, null);\n\n\n return /*#__PURE__*/createElement(Fragment, null, possiblyStyleElement, ele);\n});\n\nif (process.env.NODE_ENV !== 'production') {\n Emotion.displayName = 'EmotionCssPropInternal';\n}\n\nexport { CacheProvider as C, Emotion as E, ThemeContext as T, __unsafe_useEmotionCache as _, ThemeProvider as a, withTheme as b, createEmotionProps as c, hasOwnProperty as h, useTheme as u, withEmotionCache as w };\n","var isBrowser = \"object\" !== 'undefined';\nfunction getRegisteredStyles(registered, registeredStyles, classNames) {\n var rawClassName = '';\n classNames.split(' ').forEach(function (className) {\n if (registered[className] !== undefined) {\n registeredStyles.push(registered[className] + \";\");\n } else {\n rawClassName += className + \" \";\n }\n });\n return rawClassName;\n}\nvar registerStyles = function registerStyles(cache, serialized, isStringTag) {\n var className = cache.key + \"-\" + serialized.name;\n\n if ( // we only need to add the styles to the registered cache if the\n // class name could be used further down\n // the tree but if it's a string tag, we know it won't\n // so we don't have to add it to registered cache.\n // this improves memory usage since we can avoid storing the whole style string\n (isStringTag === false || // we need to always store it if we're in compat mode and\n // in node since emotion-server relies on whether a style is in\n // the registered cache to know whether a style is global or not\n // also, note that this check will be dead code eliminated in the browser\n isBrowser === false ) && cache.registered[className] === undefined) {\n cache.registered[className] = serialized.styles;\n }\n};\nvar insertStyles = function insertStyles(cache, serialized, isStringTag) {\n registerStyles(cache, serialized, isStringTag);\n var className = cache.key + \"-\" + serialized.name;\n\n if (cache.inserted[serialized.name] === undefined) {\n var current = serialized;\n\n do {\n cache.insert(serialized === current ? \".\" + className : '', current, cache.sheet, true);\n\n current = current.next;\n } while (current !== undefined);\n }\n};\n\nexport { getRegisteredStyles, insertStyles, registerStyles };\n","import createCache from '@emotion/cache';\nimport { serializeStyles } from '@emotion/serialize';\nimport { getRegisteredStyles, insertStyles } from '@emotion/utils';\n\nfunction insertWithoutScoping(cache, serialized) {\n if (cache.inserted[serialized.name] === undefined) {\n return cache.insert('', serialized, cache.sheet, true);\n }\n}\n\nfunction merge(registered, css, className) {\n var registeredStyles = [];\n var rawClassName = getRegisteredStyles(registered, registeredStyles, className);\n\n if (registeredStyles.length < 2) {\n return className;\n }\n\n return rawClassName + css(registeredStyles);\n}\n\nvar createEmotion = function createEmotion(options) {\n var cache = createCache(options); // $FlowFixMe\n\n cache.sheet.speedy = function (value) {\n if (process.env.NODE_ENV !== 'production' && this.ctr !== 0) {\n throw new Error('speedy must be changed before any rules are inserted');\n }\n\n this.isSpeedy = value;\n };\n\n cache.compat = true;\n\n var css = function css() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var serialized = serializeStyles(args, cache.registered, undefined);\n insertStyles(cache, serialized, false);\n return cache.key + \"-\" + serialized.name;\n };\n\n var keyframes = function keyframes() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n var serialized = serializeStyles(args, cache.registered);\n var animation = \"animation-\" + serialized.name;\n insertWithoutScoping(cache, {\n name: serialized.name,\n styles: \"@keyframes \" + animation + \"{\" + serialized.styles + \"}\"\n });\n return animation;\n };\n\n var injectGlobal = function injectGlobal() {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n var serialized = serializeStyles(args, cache.registered);\n insertWithoutScoping(cache, serialized);\n };\n\n var cx = function cx() {\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n\n return merge(cache.registered, css, classnames(args));\n };\n\n return {\n css: css,\n cx: cx,\n injectGlobal: injectGlobal,\n keyframes: keyframes,\n hydrate: function hydrate(ids) {\n ids.forEach(function (key) {\n cache.inserted[key] = true;\n });\n },\n flush: function flush() {\n cache.registered = {};\n cache.inserted = {};\n cache.sheet.flush();\n },\n // $FlowFixMe\n sheet: cache.sheet,\n cache: cache,\n getRegisteredStyles: getRegisteredStyles.bind(null, cache.registered),\n merge: merge.bind(null, cache.registered, css)\n };\n};\n\nvar classnames = function classnames(args) {\n var cls = '';\n\n for (var i = 0; i < args.length; i++) {\n var arg = args[i];\n if (arg == null) continue;\n var toAdd = void 0;\n\n switch (typeof arg) {\n case 'boolean':\n break;\n\n case 'object':\n {\n if (Array.isArray(arg)) {\n toAdd = classnames(arg);\n } else {\n toAdd = '';\n\n for (var k in arg) {\n if (arg[k] && k) {\n toAdd && (toAdd += ' ');\n toAdd += k;\n }\n }\n }\n\n break;\n }\n\n default:\n {\n toAdd = arg;\n }\n }\n\n if (toAdd) {\n cls && (cls += ' ');\n cls += toAdd;\n }\n }\n\n return cls;\n};\n\nexport default createEmotion;\n","import '@emotion/cache';\nimport '@emotion/serialize';\nimport '@emotion/utils';\nimport createEmotion from '../create-instance/dist/emotion-css-create-instance.esm.js';\n\nvar _createEmotion = createEmotion({\n key: 'css'\n}),\n flush = _createEmotion.flush,\n hydrate = _createEmotion.hydrate,\n cx = _createEmotion.cx,\n merge = _createEmotion.merge,\n getRegisteredStyles = _createEmotion.getRegisteredStyles,\n injectGlobal = _createEmotion.injectGlobal,\n keyframes = _createEmotion.keyframes,\n css = _createEmotion.css,\n sheet = _createEmotion.sheet,\n cache = _createEmotion.cache;\n\nexport { cache, css, cx, flush, getRegisteredStyles, hydrate, injectGlobal, keyframes, merge, sheet };\n","/**\n * External dependencies\n */\nimport { __unsafe_useEmotionCache as useEmotionCache } from '@emotion/react';\nimport type { SerializedStyles } from '@emotion/serialize';\nimport { insertStyles } from '@emotion/utils';\n// eslint-disable-next-line no-restricted-imports\nimport type { ClassNamesArg } from '@emotion/css';\n// eslint-disable-next-line no-restricted-imports\nimport { cx as innerCx } from '@emotion/css';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback } from '@wordpress/element';\n\nconst isSerializedStyles = ( o: any ): o is SerializedStyles =>\n\ttypeof o !== 'undefined' &&\n\to !== null &&\n\t[ 'name', 'styles' ].every( ( p ) => typeof o[ p ] !== 'undefined' );\n\n/**\n * Retrieve a `cx` function that knows how to handle `SerializedStyles`\n * returned by the `@emotion/react` `css` function in addition to what\n * `cx` normally knows how to handle. It also hooks into the Emotion\n * Cache, allowing `css` calls to work inside iframes.\n *\n * ```jsx\n * import { css } from '@emotion/react';\n *\n * const styles = css`\n * \tcolor: red\n * `;\n *\n * function RedText( { className, ...props } ) {\n * \tconst cx = useCx();\n *\n * \tconst classes = cx(styles, className);\n *\n * \treturn <span className={classes} {...props} />;\n * }\n * ```\n */\nexport const useCx = () => {\n\tconst cache = useEmotionCache();\n\n\tconst cx = useCallback(\n\t\t( ...classNames: ( ClassNamesArg | SerializedStyles )[] ) => {\n\t\t\tif ( cache === null ) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t'The `useCx` hook should be only used within a valid Emotion Cache Context'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn innerCx(\n\t\t\t\t...classNames.map( ( arg ) => {\n\t\t\t\t\tif ( isSerializedStyles( arg ) ) {\n\t\t\t\t\t\tinsertStyles( cache, arg, false );\n\t\t\t\t\t\treturn `${ cache.key }-${ arg.name }`;\n\t\t\t\t\t}\n\t\t\t\t\treturn arg;\n\t\t\t\t} )\n\t\t\t);\n\t\t},\n\t\t[ cache ]\n\t);\n\n\treturn cx;\n};\n","/**\n * WordPress dependencies\n */\nimport warn from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport { useComponentsContext } from './context-system-provider';\nimport { getNamespace, getConnectedNamespace } from './utils';\nimport { getStyledClassNameFromKey } from './get-styled-class-name-from-key';\nimport { useCx } from '../utils/hooks/use-cx';\n\n/**\n * @template TProps\n * @typedef {TProps & { className: string }} ConnectedProps\n */\n\n/**\n * Custom hook that derives registered props from the Context system.\n * These derived props are then consolidated with incoming component props.\n *\n * @template {{ className?: string }} P\n * @param {P} props Incoming props from the component.\n * @param {string} namespace The namespace to register and to derive context props from.\n * @return {ConnectedProps<P>} The connected props.\n */\nexport function useContextSystem( props, namespace ) {\n\tconst contextSystemProps = useComponentsContext();\n\tif ( typeof namespace === 'undefined' ) {\n\t\twarn( 'useContextSystem: Please provide a namespace' );\n\t}\n\n\tconst contextProps = contextSystemProps?.[ namespace ] || {};\n\n\t/* eslint-disable jsdoc/no-undefined-types */\n\t/** @type {ConnectedProps<P>} */\n\t// @ts-ignore We fill in the missing properties below\n\tconst finalComponentProps = {\n\t\t...getConnectedNamespace(),\n\t\t...getNamespace( namespace ),\n\t};\n\t/* eslint-enable jsdoc/no-undefined-types */\n\n\tconst { _overrides: overrideProps, ...otherContextProps } = contextProps;\n\n\tconst initialMergedProps = Object.entries( otherContextProps ).length\n\t\t? Object.assign( {}, otherContextProps, props )\n\t\t: props;\n\n\tconst cx = useCx();\n\n\tconst classes = cx(\n\t\tgetStyledClassNameFromKey( namespace ),\n\t\tprops.className\n\t);\n\n\t// Provides the ability to customize the render of the component.\n\tconst rendered =\n\t\ttypeof initialMergedProps.renderChildren === 'function'\n\t\t\t? initialMergedProps.renderChildren( initialMergedProps )\n\t\t\t: initialMergedProps.children;\n\n\tfor ( const key in initialMergedProps ) {\n\t\t// @ts-ignore filling in missing props\n\t\tfinalComponentProps[ key ] = initialMergedProps[ key ];\n\t}\n\n\tfor ( const key in overrideProps ) {\n\t\t// @ts-ignore filling in missing props\n\t\tfinalComponentProps[ key ] = overrideProps[ key ];\n\t}\n\n\t// Setting an `undefined` explicitly can cause unintended overwrites\n\t// when a `cloneElement()` is involved.\n\tif ( rendered !== undefined ) {\n\t\t// @ts-ignore\n\t\tfinalComponentProps.children = rendered;\n\t}\n\n\tfinalComponentProps.className = classes;\n\n\treturn finalComponentProps;\n}\n","/**\n * Internal dependencies\n */\nimport { CONNECTED_NAMESPACE, COMPONENT_NAMESPACE } from './constants';\n\n/**\n * Creates a dedicated context namespace HTML attribute for components.\n * ns is short for \"namespace\"\n *\n * @example\n * ```jsx\n * <div {...ns('Container')} />\n * ```\n *\n * @param {string} componentName The name for the component.\n * @return {Record<string, any>} A props object with the namespaced HTML attribute.\n */\nexport function getNamespace( componentName ) {\n\treturn { [ COMPONENT_NAMESPACE ]: componentName };\n}\n\n/**\n * Creates a dedicated connected context namespace HTML attribute for components.\n * ns is short for \"namespace\"\n *\n * @example\n * ```jsx\n * <div {...cns()} />\n * ```\n *\n * @return {Record<string, any>} A props object with the namespaced HTML attribute.\n */\nexport function getConnectedNamespace() {\n\treturn { [ CONNECTED_NAMESPACE ]: true };\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef, ReactChild, ReactNode } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport warn from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport { CONNECT_STATIC_NAMESPACE } from './constants';\nimport { getStyledClassNameFromKey } from './get-styled-class-name-from-key';\nimport type { WordPressComponentFromProps } from '.';\n\ntype AcceptsTwoArgs<\n\tF extends ( ...args: any ) => any,\n\tErrorMessage = never,\n> = Parameters< F >[ 'length' ] extends 2 ? {} : ErrorMessage;\n\ntype ContextConnectOptions = {\n\tforwardsRef?: boolean;\n};\n\n/**\n * Forwards ref (React.ForwardRef) and \"Connects\" (or registers) a component\n * within the Context system under a specified namespace.\n *\n * @param Component The component to register into the Context system.\n * @param namespace The namespace to register the component under.\n * @return The connected WordPressComponent\n */\nexport function contextConnect<\n\tC extends ( props: any, ref: ForwardedRef< any > ) => JSX.Element | null,\n>(\n\tComponent: C &\n\t\tAcceptsTwoArgs<\n\t\t\tC,\n\t\t\t'Warning: Your component function does not take a ref as the second argument. Did you mean to use `contextConnectWithoutRef`?'\n\t\t>,\n\tnamespace: string\n) {\n\treturn _contextConnect( Component, namespace, { forwardsRef: true } );\n}\n\n/**\n * \"Connects\" (or registers) a component within the Context system under a specified namespace.\n * Does not forward a ref.\n *\n * @param Component The component to register into the Context system.\n * @param namespace The namespace to register the component under.\n * @return The connected WordPressComponent\n */\nexport function contextConnectWithoutRef< P >(\n\tComponent: ( props: P ) => JSX.Element | null,\n\tnamespace: string\n) {\n\treturn _contextConnect( Component, namespace );\n}\n\n// This is an (experimental) evolution of the initial connect() HOC.\n// The hope is that we can improve render performance by removing functional\n// component wrappers.\nfunction _contextConnect<\n\tC extends ( props: any, ref: ForwardedRef< any > ) => JSX.Element | null,\n\tO extends ContextConnectOptions,\n>(\n\tComponent: C,\n\tnamespace: string,\n\toptions?: O\n): WordPressComponentFromProps<\n\tParameters< C >[ 0 ],\n\tO[ 'forwardsRef' ] extends true ? true : false\n> {\n\tconst WrappedComponent = options?.forwardsRef\n\t\t? forwardRef< any, Parameters< C >[ 0 ] >( Component )\n\t\t: Component;\n\n\tif ( typeof namespace === 'undefined' ) {\n\t\twarn( 'contextConnect: Please provide a namespace' );\n\t}\n\n\t// @ts-expect-error internal property\n\tlet mergedNamespace = WrappedComponent[ CONNECT_STATIC_NAMESPACE ] || [\n\t\tnamespace,\n\t];\n\n\t/**\n\t * Consolidate (merge) namespaces before attaching it to the WrappedComponent.\n\t */\n\tif ( Array.isArray( namespace ) ) {\n\t\tmergedNamespace = [ ...mergedNamespace, ...namespace ];\n\t}\n\tif ( typeof namespace === 'string' ) {\n\t\tmergedNamespace = [ ...mergedNamespace, namespace ];\n\t}\n\n\t// @ts-expect-error We can't rely on inferred types here because of the\n\t// `as` prop polymorphism we're handling in https://github.com/WordPress/gutenberg/blob/4f3a11243c365f94892e479bff0b922ccc4ccda3/packages/components/src/context/wordpress-component.ts#L32-L33\n\treturn Object.assign( WrappedComponent, {\n\t\t[ CONNECT_STATIC_NAMESPACE ]: [ ...new Set( mergedNamespace ) ],\n\t\tdisplayName: namespace,\n\t\tselector: `.${ getStyledClassNameFromKey( namespace ) }`,\n\t} );\n}\n\n/**\n * Attempts to retrieve the connected namespace from a component.\n *\n * @param Component The component to retrieve a namespace from.\n * @return The connected namespaces.\n */\nexport function getConnectNamespace(\n\tComponent: ReactChild | undefined | {}\n): string[] {\n\tif ( ! Component ) {\n\t\treturn [];\n\t}\n\n\tlet namespaces = [];\n\n\t// @ts-ignore internal property\n\tif ( Component[ CONNECT_STATIC_NAMESPACE ] ) {\n\t\t// @ts-ignore internal property\n\t\tnamespaces = Component[ CONNECT_STATIC_NAMESPACE ];\n\t}\n\n\t// @ts-ignore\n\tif ( Component.type && Component.type[ CONNECT_STATIC_NAMESPACE ] ) {\n\t\t// @ts-ignore\n\t\tnamespaces = Component.type[ CONNECT_STATIC_NAMESPACE ];\n\t}\n\n\treturn namespaces;\n}\n\n/**\n * Checks to see if a component is connected within the Context system.\n *\n * @param Component The component to retrieve a namespace from.\n * @param match The namespace to check.\n */\nexport function hasConnectNamespace(\n\tComponent: ReactNode,\n\tmatch: string[] | string\n): boolean {\n\tif ( ! Component ) {\n\t\treturn false;\n\t}\n\n\tif ( typeof match === 'string' ) {\n\t\treturn getConnectNamespace( Component ).includes( match );\n\t}\n\tif ( Array.isArray( match ) ) {\n\t\treturn match.some( ( result ) =>\n\t\t\tgetConnectNamespace( Component ).includes( result )\n\t\t);\n\t}\n\n\treturn false;\n}\n","/**\n * External dependencies\n */\nimport type { CSSProperties } from 'react';\n\nexport const visuallyHidden: CSSProperties = {\n\tborder: 0,\n\tclip: 'rect(1px, 1px, 1px, 1px)',\n\tWebkitClipPath: 'inset( 50% )',\n\tclipPath: 'inset( 50% )',\n\theight: '1px',\n\tmargin: '-1px',\n\toverflow: 'hidden',\n\tpadding: 0,\n\tposition: 'absolute',\n\twidth: '1px',\n\twordWrap: 'normal',\n};\n","function _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","function memoize(fn) {\n var cache = Object.create(null);\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport { memoize as default };\n","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar isPropValid = /* #__PURE__ */memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport { isPropValid as default };\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport { useContext, createElement, Fragment } from 'react';\nimport isPropValid from '@emotion/is-prop-valid';\nimport { withEmotionCache, ThemeContext } from '@emotion/react';\nimport { getRegisteredStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\n\nvar testOmitPropsOnStringTag = isPropValid;\n\nvar testOmitPropsOnComponent = function testOmitPropsOnComponent(key) {\n return key !== 'theme';\n};\n\nvar getDefaultShouldForwardProp = function getDefaultShouldForwardProp(tag) {\n return typeof tag === 'string' && // 96 is one less than the char code\n // for \"a\" so this is checking that\n // it's a lowercase character\n tag.charCodeAt(0) > 96 ? testOmitPropsOnStringTag : testOmitPropsOnComponent;\n};\nvar composeShouldForwardProps = function composeShouldForwardProps(tag, options, isReal) {\n var shouldForwardProp;\n\n if (options) {\n var optionsShouldForwardProp = options.shouldForwardProp;\n shouldForwardProp = tag.__emotion_forwardProp && optionsShouldForwardProp ? function (propName) {\n return tag.__emotion_forwardProp(propName) && optionsShouldForwardProp(propName);\n } : optionsShouldForwardProp;\n }\n\n if (typeof shouldForwardProp !== 'function' && isReal) {\n shouldForwardProp = tag.__emotion_forwardProp;\n }\n\n return shouldForwardProp;\n};\n\nvar ILLEGAL_ESCAPE_SEQUENCE_ERROR = \"You have illegal escape sequence in your template literal, most likely inside content's property value.\\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \\\"content: '\\\\00d7';\\\" should become \\\"content: '\\\\\\\\00d7';\\\".\\nYou can read more about this here:\\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences\";\n\nvar Noop = function Noop() {\n return null;\n};\n\nvar createStyled = function createStyled(tag, options) {\n if (process.env.NODE_ENV !== 'production') {\n if (tag === undefined) {\n throw new Error('You are trying to create a styled element with an undefined component.\\nYou may have forgotten to import it.');\n }\n }\n\n var isReal = tag.__emotion_real === tag;\n var baseTag = isReal && tag.__emotion_base || tag;\n var identifierName;\n var targetClassName;\n\n if (options !== undefined) {\n identifierName = options.label;\n targetClassName = options.target;\n }\n\n var shouldForwardProp = composeShouldForwardProps(tag, options, isReal);\n var defaultShouldForwardProp = shouldForwardProp || getDefaultShouldForwardProp(baseTag);\n var shouldUseAs = !defaultShouldForwardProp('as');\n return function () {\n var args = arguments;\n var styles = isReal && tag.__emotion_styles !== undefined ? tag.__emotion_styles.slice(0) : [];\n\n if (identifierName !== undefined) {\n styles.push(\"label:\" + identifierName + \";\");\n }\n\n if (args[0] == null || args[0].raw === undefined) {\n styles.push.apply(styles, args);\n } else {\n if (process.env.NODE_ENV !== 'production' && args[0][0] === undefined) {\n console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n }\n\n styles.push(args[0][0]);\n var len = args.length;\n var i = 1;\n\n for (; i < len; i++) {\n if (process.env.NODE_ENV !== 'production' && args[0][i] === undefined) {\n console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n }\n\n styles.push(args[i], args[0][i]);\n }\n } // $FlowFixMe: we need to cast StatelessFunctionalComponent to our PrivateStyledComponent class\n\n\n var Styled = withEmotionCache(function (props, cache, ref) {\n var finalTag = shouldUseAs && props.as || baseTag;\n var className = '';\n var classInterpolations = [];\n var mergedProps = props;\n\n if (props.theme == null) {\n mergedProps = {};\n\n for (var key in props) {\n mergedProps[key] = props[key];\n }\n\n mergedProps.theme = useContext(ThemeContext);\n }\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, classInterpolations, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(styles.concat(classInterpolations), cache.registered, mergedProps);\n var rules = insertStyles(cache, serialized, typeof finalTag === 'string');\n className += cache.key + \"-\" + serialized.name;\n\n if (targetClassName !== undefined) {\n className += \" \" + targetClassName;\n }\n\n var finalShouldForwardProp = shouldUseAs && shouldForwardProp === undefined ? getDefaultShouldForwardProp(finalTag) : defaultShouldForwardProp;\n var newProps = {};\n\n for (var _key in props) {\n if (shouldUseAs && _key === 'as') continue;\n\n if ( // $FlowFixMe\n finalShouldForwardProp(_key)) {\n newProps[_key] = props[_key];\n }\n }\n\n newProps.className = className;\n newProps.ref = ref;\n var ele = /*#__PURE__*/createElement(finalTag, newProps);\n var possiblyStyleElement = /*#__PURE__*/createElement(Noop, null);\n\n\n return /*#__PURE__*/createElement(Fragment, null, possiblyStyleElement, ele);\n });\n Styled.displayName = identifierName !== undefined ? identifierName : \"Styled(\" + (typeof baseTag === 'string' ? baseTag : baseTag.displayName || baseTag.name || 'Component') + \")\";\n Styled.defaultProps = tag.defaultProps;\n Styled.__emotion_real = Styled;\n Styled.__emotion_base = baseTag;\n Styled.__emotion_styles = styles;\n Styled.__emotion_forwardProp = shouldForwardProp;\n Object.defineProperty(Styled, 'toString', {\n value: function value() {\n if (targetClassName === undefined && process.env.NODE_ENV !== 'production') {\n return 'NO_COMPONENT_SELECTOR';\n } // $FlowFixMe: coerce undefined to string\n\n\n return \".\" + targetClassName;\n }\n });\n\n Styled.withComponent = function (nextTag, nextOptions) {\n return createStyled(nextTag, _extends({}, options, nextOptions, {\n shouldForwardProp: composeShouldForwardProps(Styled, nextOptions, true)\n })).apply(void 0, styles);\n };\n\n return Styled;\n };\n};\n\nexport default createStyled;\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\n\nconst PolymorphicDiv = styled.div``;\n\nfunction UnforwardedView< T extends React.ElementType = 'div' >(\n\t{ as, ...restProps }: WordPressComponentProps< {}, T >,\n\tref: React.ForwardedRef< any >\n) {\n\treturn <PolymorphicDiv as={ as } ref={ ref } { ...restProps } />;\n}\n\n/**\n * `View` is a core component that renders everything in the library.\n * It is the principle component in the entire library.\n *\n * ```jsx\n * import { View } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<View>\n * \t\t\t Code is Poetry\n * \t\t</View>\n * \t);\n * }\n * ```\n */\nexport const View = Object.assign( forwardRef( UnforwardedView ), {\n\tselector: '.components-view',\n} );\n\nexport default View;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { useContextSystem, contextConnect } from '../context';\nimport { visuallyHidden } from './styles';\nimport { View } from '../view';\nimport type { VisuallyHiddenProps } from './types';\n\nfunction UnconnectedVisuallyHidden(\n\tprops: WordPressComponentProps< VisuallyHiddenProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst { style: styleProp, ...contextProps } = useContextSystem(\n\t\tprops,\n\t\t'VisuallyHidden'\n\t);\n\treturn (\n\t\t<View\n\t\t\tref={ forwardedRef }\n\t\t\t{ ...contextProps }\n\t\t\tstyle={ { ...visuallyHidden, ...( styleProp || {} ) } }\n\t\t/>\n\t);\n}\n\n/**\n * `VisuallyHidden` is a component used to render text intended to be visually\n * hidden, but will show for alternate devices, for example a screen reader.\n *\n * ```jsx\n * import { VisuallyHidden } from `@wordpress/components`;\n *\n * function Example() {\n * return (\n * <VisuallyHidden>\n * <label>Code is Poetry</label>\n * </VisuallyHidden>\n * );\n * }\n * ```\n */\nexport const VisuallyHidden = contextConnect(\n\tUnconnectedVisuallyHidden,\n\t'VisuallyHidden'\n);\n\nexport default VisuallyHidden;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { AlignmentMatrixControlValue } from './types';\n\nexport const GRID: AlignmentMatrixControlValue[][] = [\n\t[ 'top left', 'top center', 'top right' ],\n\t[ 'center left', 'center center', 'center right' ],\n\t[ 'bottom left', 'bottom center', 'bottom right' ],\n];\n\n// Stored as map as i18n __() only accepts strings (not variables)\nexport const ALIGNMENT_LABEL: Record< AlignmentMatrixControlValue, string > = {\n\t'top left': __( 'Top Left' ),\n\t'top center': __( 'Top Center' ),\n\t'top right': __( 'Top Right' ),\n\t'center left': __( 'Center Left' ),\n\t'center center': __( 'Center' ),\n\tcenter: __( 'Center' ),\n\t'center right': __( 'Center Right' ),\n\t'bottom left': __( 'Bottom Left' ),\n\t'bottom center': __( 'Bottom Center' ),\n\t'bottom right': __( 'Bottom Right' ),\n};\n\n// Transforms GRID into a flat Array of values.\nexport const ALIGNMENTS = GRID.flat();\n\n/**\n * Normalizes and transforms an incoming value to better match the alignment values\n *\n * @param value An alignment value to parse.\n *\n * @return The parsed value.\n */\nfunction normalize( value?: string | null ) {\n\tconst normalized = value === 'center' ? 'center center' : value;\n\n\t// Strictly speaking, this could be `string | null | undefined`,\n\t// but will be validated shortly, so we're typecasting to an\n\t// `AlignmentMatrixControlValue` to keep TypeScript happy.\n\tconst transformed = normalized?.replace(\n\t\t'-',\n\t\t' '\n\t) as AlignmentMatrixControlValue;\n\n\treturn ALIGNMENTS.includes( transformed ) ? transformed : undefined;\n}\n\n/**\n * Creates an item ID based on a prefix ID and an alignment value.\n *\n * @param prefixId An ID to prefix.\n * @param value An alignment value.\n *\n * @return The item id.\n */\nexport function getItemId(\n\tprefixId: string,\n\tvalue?: AlignmentMatrixControlValue\n) {\n\tconst normalized = normalize( value );\n\tif ( ! normalized ) {\n\t\treturn;\n\t}\n\n\tconst id = normalized.replace( ' ', '-' );\n\treturn `${ prefixId }-${ id }`;\n}\n\n/**\n * Extracts an item value from its ID\n *\n * @param prefixId An ID prefix to remove\n * @param id An item ID\n * @return The item value\n */\nexport function getItemValue( prefixId: string, id?: string | null ) {\n\tconst value = id?.replace( prefixId + '-', '' );\n\treturn normalize( value );\n}\n\n/**\n * Retrieves the alignment index from a value.\n *\n * @param alignment Value to check.\n *\n * @return The index of a matching alignment.\n */\nexport function getAlignmentIndex(\n\talignment: AlignmentMatrixControlValue = 'center'\n) {\n\tconst normalized = normalize( alignment );\n\tif ( ! normalized ) {\n\t\treturn undefined;\n\t}\n\n\tconst index = ALIGNMENTS.indexOf( normalized );\n\treturn index > -1 ? index : undefined;\n}\n","import { createElement, useContext, useRef, useLayoutEffect, Fragment } from 'react';\nimport '@emotion/cache';\nimport { h as hasOwnProperty, E as Emotion, c as createEmotionProps, w as withEmotionCache, T as ThemeContext } from './emotion-element-699e6908.browser.esm.js';\nexport { C as CacheProvider, T as ThemeContext, a as ThemeProvider, _ as __unsafe_useEmotionCache, u as useTheme, w as withEmotionCache, b as withTheme } from './emotion-element-699e6908.browser.esm.js';\nimport '@babel/runtime/helpers/extends';\nimport '@emotion/weak-memoize';\nimport 'hoist-non-react-statics';\nimport '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js';\nimport { insertStyles, getRegisteredStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\nimport { StyleSheet } from '@emotion/sheet';\n\nvar pkg = {\n\tname: \"@emotion/react\",\n\tversion: \"11.7.1\",\n\tmain: \"dist/emotion-react.cjs.js\",\n\tmodule: \"dist/emotion-react.esm.js\",\n\tbrowser: {\n\t\t\"./dist/emotion-react.cjs.js\": \"./dist/emotion-react.browser.cjs.js\",\n\t\t\"./dist/emotion-react.esm.js\": \"./dist/emotion-react.browser.esm.js\"\n\t},\n\ttypes: \"types/index.d.ts\",\n\tfiles: [\n\t\t\"src\",\n\t\t\"dist\",\n\t\t\"jsx-runtime\",\n\t\t\"jsx-dev-runtime\",\n\t\t\"_isolated-hnrs\",\n\t\t\"types/*.d.ts\",\n\t\t\"macro.js\",\n\t\t\"macro.d.ts\",\n\t\t\"macro.js.flow\"\n\t],\n\tsideEffects: false,\n\tauthor: \"mitchellhamilton <mitchell@mitchellhamilton.me>\",\n\tlicense: \"MIT\",\n\tscripts: {\n\t\t\"test:typescript\": \"dtslint types\"\n\t},\n\tdependencies: {\n\t\t\"@babel/runtime\": \"^7.13.10\",\n\t\t\"@emotion/cache\": \"^11.7.1\",\n\t\t\"@emotion/serialize\": \"^1.0.2\",\n\t\t\"@emotion/sheet\": \"^1.1.0\",\n\t\t\"@emotion/utils\": \"^1.0.0\",\n\t\t\"@emotion/weak-memoize\": \"^0.2.5\",\n\t\t\"hoist-non-react-statics\": \"^3.3.1\"\n\t},\n\tpeerDependencies: {\n\t\t\"@babel/core\": \"^7.0.0\",\n\t\treact: \">=16.8.0\"\n\t},\n\tpeerDependenciesMeta: {\n\t\t\"@babel/core\": {\n\t\t\toptional: true\n\t\t},\n\t\t\"@types/react\": {\n\t\t\toptional: true\n\t\t}\n\t},\n\tdevDependencies: {\n\t\t\"@babel/core\": \"^7.13.10\",\n\t\t\"@emotion/css\": \"11.7.1\",\n\t\t\"@emotion/css-prettifier\": \"1.0.1\",\n\t\t\"@emotion/server\": \"11.4.0\",\n\t\t\"@emotion/styled\": \"11.6.0\",\n\t\t\"@types/react\": \"^16.9.11\",\n\t\tdtslint: \"^0.3.0\",\n\t\t\"html-tag-names\": \"^1.1.2\",\n\t\treact: \"16.14.0\",\n\t\t\"svg-tag-names\": \"^1.1.1\"\n\t},\n\trepository: \"https://github.com/emotion-js/emotion/tree/main/packages/react\",\n\tpublishConfig: {\n\t\taccess: \"public\"\n\t},\n\t\"umd:main\": \"dist/emotion-react.umd.min.js\",\n\tpreconstruct: {\n\t\tentrypoints: [\n\t\t\t\"./index.js\",\n\t\t\t\"./jsx-runtime.js\",\n\t\t\t\"./jsx-dev-runtime.js\",\n\t\t\t\"./_isolated-hnrs.js\"\n\t\t],\n\t\tumdName: \"emotionReact\"\n\t}\n};\n\nvar jsx = function jsx(type, props) {\n var args = arguments;\n\n if (props == null || !hasOwnProperty.call(props, 'css')) {\n // $FlowFixMe\n return createElement.apply(undefined, args);\n }\n\n var argsLength = args.length;\n var createElementArgArray = new Array(argsLength);\n createElementArgArray[0] = Emotion;\n createElementArgArray[1] = createEmotionProps(type, props);\n\n for (var i = 2; i < argsLength; i++) {\n createElementArgArray[i] = args[i];\n } // $FlowFixMe\n\n\n return createElement.apply(null, createElementArgArray);\n};\n\nvar warnedAboutCssPropForGlobal = false; // maintain place over rerenders.\n// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild\n// initial client-side render from SSR, use place of hydrating tag\n\nvar Global = /* #__PURE__ */withEmotionCache(function (props, cache) {\n if (process.env.NODE_ENV !== 'production' && !warnedAboutCssPropForGlobal && ( // check for className as well since the user is\n // probably using the custom createElement which\n // means it will be turned into a className prop\n // $FlowFixMe I don't really want to add it to the type since it shouldn't be used\n props.className || props.css)) {\n console.error(\"It looks like you're using the css prop on Global, did you mean to use the styles prop instead?\");\n warnedAboutCssPropForGlobal = true;\n }\n\n var styles = props.styles;\n var serialized = serializeStyles([styles], undefined, useContext(ThemeContext));\n // but it is based on a constant that will never change at runtime\n // it's effectively like having two implementations and switching them out\n // so it's not actually breaking anything\n\n\n var sheetRef = useRef();\n useLayoutEffect(function () {\n var key = cache.key + \"-global\";\n var sheet = new StyleSheet({\n key: key,\n nonce: cache.sheet.nonce,\n container: cache.sheet.container,\n speedy: cache.sheet.isSpeedy\n });\n var rehydrating = false; // $FlowFixMe\n\n var node = document.querySelector(\"style[data-emotion=\\\"\" + key + \" \" + serialized.name + \"\\\"]\");\n\n if (cache.sheet.tags.length) {\n sheet.before = cache.sheet.tags[0];\n }\n\n if (node !== null) {\n rehydrating = true; // clear the hash so this node won't be recognizable as rehydratable by other <Global/>s\n\n node.setAttribute('data-emotion', key);\n sheet.hydrate([node]);\n }\n\n sheetRef.current = [sheet, rehydrating];\n return function () {\n sheet.flush();\n };\n }, [cache]);\n useLayoutEffect(function () {\n var sheetRefCurrent = sheetRef.current;\n var sheet = sheetRefCurrent[0],\n rehydrating = sheetRefCurrent[1];\n\n if (rehydrating) {\n sheetRefCurrent[1] = false;\n return;\n }\n\n if (serialized.next !== undefined) {\n // insert keyframes\n insertStyles(cache, serialized.next, true);\n }\n\n if (sheet.tags.length) {\n // if this doesn't exist then it will be null so the style element will be appended\n var element = sheet.tags[sheet.tags.length - 1].nextElementSibling;\n sheet.before = element;\n sheet.flush();\n }\n\n cache.insert(\"\", serialized, sheet, false);\n }, [cache, serialized.name]);\n return null;\n});\n\nif (process.env.NODE_ENV !== 'production') {\n Global.displayName = 'EmotionGlobal';\n}\n\nfunction css() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return serializeStyles(args);\n}\n\nvar keyframes = function keyframes() {\n var insertable = css.apply(void 0, arguments);\n var name = \"animation-\" + insertable.name; // $FlowFixMe\n\n return {\n name: name,\n styles: \"@keyframes \" + name + \"{\" + insertable.styles + \"}\",\n anim: 1,\n toString: function toString() {\n return \"_EMO_\" + this.name + \"_\" + this.styles + \"_EMO_\";\n }\n };\n};\n\nvar classnames = function classnames(args) {\n var len = args.length;\n var i = 0;\n var cls = '';\n\n for (; i < len; i++) {\n var arg = args[i];\n if (arg == null) continue;\n var toAdd = void 0;\n\n switch (typeof arg) {\n case 'boolean':\n break;\n\n case 'object':\n {\n if (Array.isArray(arg)) {\n toAdd = classnames(arg);\n } else {\n if (process.env.NODE_ENV !== 'production' && arg.styles !== undefined && arg.name !== undefined) {\n console.error('You have passed styles created with `css` from `@emotion/react` package to the `cx`.\\n' + '`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component.');\n }\n\n toAdd = '';\n\n for (var k in arg) {\n if (arg[k] && k) {\n toAdd && (toAdd += ' ');\n toAdd += k;\n }\n }\n }\n\n break;\n }\n\n default:\n {\n toAdd = arg;\n }\n }\n\n if (toAdd) {\n cls && (cls += ' ');\n cls += toAdd;\n }\n }\n\n return cls;\n};\n\nfunction merge(registered, css, className) {\n var registeredStyles = [];\n var rawClassName = getRegisteredStyles(registered, registeredStyles, className);\n\n if (registeredStyles.length < 2) {\n return className;\n }\n\n return rawClassName + css(registeredStyles);\n}\n\nvar Noop = function Noop() {\n return null;\n};\n\nvar ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {\n var hasRendered = false;\n\n var css = function css() {\n if (hasRendered && process.env.NODE_ENV !== 'production') {\n throw new Error('css can only be used during render');\n }\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var serialized = serializeStyles(args, cache.registered);\n\n {\n insertStyles(cache, serialized, false);\n }\n\n return cache.key + \"-\" + serialized.name;\n };\n\n var cx = function cx() {\n if (hasRendered && process.env.NODE_ENV !== 'production') {\n throw new Error('cx can only be used during render');\n }\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return merge(cache.registered, css, classnames(args));\n };\n\n var content = {\n css: css,\n cx: cx,\n theme: useContext(ThemeContext)\n };\n var ele = props.children(content);\n hasRendered = true;\n var possiblyStyleElement = /*#__PURE__*/createElement(Noop, null);\n\n\n return /*#__PURE__*/createElement(Fragment, null, possiblyStyleElement, ele);\n});\n\nif (process.env.NODE_ENV !== 'production') {\n ClassNames.displayName = 'EmotionClassNames';\n}\n\nif (process.env.NODE_ENV !== 'production') {\n var isBrowser = \"object\" !== 'undefined'; // #1727 for some reason Jest evaluates modules twice if some consuming module gets mocked with jest.mock\n\n var isJest = typeof jest !== 'undefined';\n\n if (isBrowser && !isJest) {\n // globalThis has wide browser support - https://caniuse.com/?search=globalThis, Node.js 12 and later\n var globalContext = // $FlowIgnore\n typeof globalThis !== 'undefined' ? globalThis // eslint-disable-line no-undef\n : isBrowser ? window : global;\n var globalKey = \"__EMOTION_REACT_\" + pkg.version.split('.')[0] + \"__\";\n\n if (globalContext[globalKey]) {\n console.warn('You are loading @emotion/react when it is already loaded. Running ' + 'multiple instances may cause problems. This can happen if multiple ' + 'versions are used, or if multiple builds of the same version are ' + 'used.');\n }\n\n globalContext[globalKey] = true;\n }\n}\n\nexport { ClassNames, Global, jsx as createElement, css, jsx, keyframes };\n","/**\n * The argument value for the `space()` utility function.\n *\n * When this is a number or a numeric string, it will be interpreted as a\n * multiplier for the grid base value (4px). For example, `space( 2 )` will be 8px.\n *\n * Otherwise, it will be interpreted as a literal CSS length value. For example,\n * `space( 'auto' )` will be 'auto', and `space( '2px' )` will be 2px.\n */\nexport type SpaceInput = number | string;\n\nconst GRID_BASE = '4px';\n\n/**\n * A function that handles numbers, numeric strings, and unit values.\n *\n * When given a number or a numeric string, it will return the grid-based\n * value as a factor of GRID_BASE, defined above.\n *\n * When given a unit value or one of the named CSS values like `auto`,\n * it will simply return the value back.\n *\n * @param value A number, numeric string, or a unit value.\n */\nexport function space( value?: SpaceInput ): string | undefined {\n\tif ( typeof value === 'undefined' ) {\n\t\treturn undefined;\n\t}\n\n\t// Handle empty strings, if it's the number 0 this still works.\n\tif ( ! value ) {\n\t\treturn '0';\n\t}\n\n\tconst asInt = typeof value === 'number' ? value : Number( value );\n\n\t// Test if the input has a unit, was NaN, or was one of the named CSS values (like `auto`), in which case just use that value.\n\tif (\n\t\t( typeof window !== 'undefined' &&\n\t\t\twindow.CSS?.supports?.( 'margin', value.toString() ) ) ||\n\t\tNumber.isNaN( asInt )\n\t) {\n\t\treturn value.toString();\n\t}\n\n\treturn `calc(${ GRID_BASE } * ${ value })`;\n}\n","/**\n * Internal dependencies\n */\nconst white = '#fff';\n\n// Matches the grays in @wordpress/base-styles\nconst GRAY = {\n\t900: '#1e1e1e',\n\t800: '#2f2f2f',\n\t/** Meets 4.6:1 text contrast against white. */\n\t700: '#757575',\n\t/** Meets 3:1 UI or large text contrast against white. */\n\t600: '#949494',\n\t400: '#ccc',\n\t/** Used for most borders. */\n\t300: '#ddd',\n\t/** Used sparingly for light borders. */\n\t200: '#e0e0e0',\n\t/** Used for light gray backgrounds. */\n\t100: '#f0f0f0',\n};\n\n// Matches @wordpress/base-styles\nconst ALERT = {\n\tyellow: '#f0b849',\n\tred: '#d94f4f',\n\tgreen: '#4ab866',\n};\n\n// Should match packages/components/src/utils/theme-variables.scss\nconst THEME = {\n\taccent: `var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9))`,\n\taccentDarker10: `var(--wp-components-color-accent-darker-10, var(--wp-admin-theme-color-darker-10, #2145e6))`,\n\taccentDarker20: `var(--wp-components-color-accent-darker-20, var(--wp-admin-theme-color-darker-20, #183ad6))`,\n\t/** Used when placing text on the accent color. */\n\taccentInverted: `var(--wp-components-color-accent-inverted, ${ white })`,\n\n\tbackground: `var(--wp-components-color-background, ${ white })`,\n\n\tforeground: `var(--wp-components-color-foreground, ${ GRAY[ 900 ] })`,\n\t/** Used when placing text on the foreground color. */\n\tforegroundInverted: `var(--wp-components-color-foreground-inverted, ${ white })`,\n\n\tgray: {\n\t\t/** @deprecated Use `COLORS.theme.foreground` instead. */\n\t\t900: `var(--wp-components-color-foreground, ${ GRAY[ 900 ] })`,\n\t\t800: `var(--wp-components-color-gray-800, ${ GRAY[ 800 ] })`,\n\t\t700: `var(--wp-components-color-gray-700, ${ GRAY[ 700 ] })`,\n\t\t600: `var(--wp-components-color-gray-600, ${ GRAY[ 600 ] })`,\n\t\t400: `var(--wp-components-color-gray-400, ${ GRAY[ 400 ] })`,\n\t\t300: `var(--wp-components-color-gray-300, ${ GRAY[ 300 ] })`,\n\t\t200: `var(--wp-components-color-gray-200, ${ GRAY[ 200 ] })`,\n\t\t100: `var(--wp-components-color-gray-100, ${ GRAY[ 100 ] })`,\n\t},\n};\n\nconst UI = {\n\tbackground: THEME.background,\n\tbackgroundDisabled: THEME.gray[ 100 ],\n\tborder: THEME.gray[ 600 ],\n\tborderHover: THEME.gray[ 700 ],\n\tborderFocus: THEME.accent,\n\tborderDisabled: THEME.gray[ 400 ],\n\ttextDisabled: THEME.gray[ 600 ],\n\n\t// Matches @wordpress/base-styles\n\tdarkGrayPlaceholder: `color-mix(in srgb, ${ THEME.foreground }, transparent 38%)`,\n\tlightGrayPlaceholder: `color-mix(in srgb, ${ THEME.background }, transparent 35%)`,\n};\n\nexport const COLORS = Object.freeze( {\n\t/**\n\t * The main gray color object.\n\t *\n\t * @deprecated Use semantic aliases in `COLORS.ui` or theme-ready variables in `COLORS.theme.gray`.\n\t */\n\tgray: GRAY, // TODO: Stop exporting this when everything is migrated to `theme` or `ui`\n\t/**\n\t * @deprecated Prefer theme-ready variables in `COLORS.theme`.\n\t */\n\twhite,\n\talert: ALERT,\n\t/**\n\t * Theme-ready variables with fallbacks.\n\t *\n\t * Prefer semantic aliases in `COLORS.ui` when applicable.\n\t */\n\ttheme: THEME,\n\t/**\n\t * Semantic aliases (prefer these over raw variables when applicable).\n\t */\n\tui: UI,\n} );\n\nexport default COLORS;\n","/**\n * Internal dependencies\n */\nimport { space } from './space';\nimport { COLORS } from './colors-values';\n\nconst CONTROL_HEIGHT = '36px';\n\nconst CONTROL_PROPS = {\n\t// These values should be shared with TextControl.\n\tcontrolPaddingX: 12,\n\tcontrolPaddingXSmall: 8,\n\tcontrolPaddingXLarge: 12 * 1.3334, // TODO: Deprecate\n\n\tcontrolBoxShadowFocus: `0 0 0 0.5px ${ COLORS.theme.accent }`,\n\tcontrolHeight: CONTROL_HEIGHT,\n\tcontrolHeightXSmall: `calc( ${ CONTROL_HEIGHT } * 0.6 )`,\n\tcontrolHeightSmall: `calc( ${ CONTROL_HEIGHT } * 0.8 )`,\n\tcontrolHeightLarge: `calc( ${ CONTROL_HEIGHT } * 1.2 )`,\n\tcontrolHeightXLarge: `calc( ${ CONTROL_HEIGHT } * 1.4 )`,\n};\n\n// Using Object.assign to avoid creating circular references when emitting\n// TypeScript type declarations.\nexport default Object.assign( {}, CONTROL_PROPS, {\n\tcolorDivider: 'rgba(0, 0, 0, 0.1)',\n\tcolorScrollbarThumb: 'rgba(0, 0, 0, 0.2)',\n\tcolorScrollbarThumbHover: 'rgba(0, 0, 0, 0.5)',\n\tcolorScrollbarTrack: 'rgba(0, 0, 0, 0.04)',\n\televationIntensity: 1,\n\tradiusXSmall: '1px',\n\tradiusSmall: '2px',\n\tradiusMedium: '4px',\n\tradiusLarge: '8px',\n\tradiusFull: '9999px',\n\tradiusRound: '50%',\n\tborderWidth: '1px',\n\tborderWidthFocus: '1.5px',\n\tborderWidthTab: '4px',\n\tspinnerSize: 16,\n\tfontSize: '13px',\n\tfontSizeH1: 'calc(2.44 * 13px)',\n\tfontSizeH2: 'calc(1.95 * 13px)',\n\tfontSizeH3: 'calc(1.56 * 13px)',\n\tfontSizeH4: 'calc(1.25 * 13px)',\n\tfontSizeH5: '13px',\n\tfontSizeH6: 'calc(0.8 * 13px)',\n\tfontSizeInputMobile: '16px',\n\tfontSizeMobile: '15px',\n\tfontSizeSmall: 'calc(0.92 * 13px)',\n\tfontSizeXSmall: 'calc(0.75 * 13px)',\n\tfontLineHeightBase: '1.4',\n\tfontWeight: 'normal',\n\tfontWeightHeading: '600',\n\tgridBase: '4px',\n\tcardPaddingXSmall: `${ space( 2 ) }`,\n\tcardPaddingSmall: `${ space( 4 ) }`,\n\tcardPaddingMedium: `${ space( 4 ) } ${ space( 6 ) }`,\n\tcardPaddingLarge: `${ space( 6 ) } ${ space( 8 ) }`,\n\televationXSmall: `0 1px 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02), 0 3px 3px rgba(0, 0, 0, 0.02), 0 4px 4px rgba(0, 0, 0, 0.01)`,\n\televationSmall: `0 1px 2px rgba(0, 0, 0, 0.05), 0 2px 3px rgba(0, 0, 0, 0.04), 0 6px 6px rgba(0, 0, 0, 0.03), 0 8px 8px rgba(0, 0, 0, 0.02)`,\n\televationMedium: `0 2px 3px rgba(0, 0, 0, 0.05), 0 4px 5px rgba(0, 0, 0, 0.04), 0 12px 12px rgba(0, 0, 0, 0.03), 0 16px 16px rgba(0, 0, 0, 0.02)`,\n\televationLarge: `0 5px 15px rgba(0, 0, 0, 0.08), 0 15px 27px rgba(0, 0, 0, 0.07), 0 30px 36px rgba(0, 0, 0, 0.04), 0 50px 43px rgba(0, 0, 0, 0.02)`,\n\tsurfaceBackgroundColor: COLORS.white,\n\tsurfaceBackgroundSubtleColor: '#F3F3F3',\n\tsurfaceBackgroundTintColor: '#F5F5F5',\n\tsurfaceBorderColor: 'rgba(0, 0, 0, 0.1)',\n\tsurfaceBorderBoldColor: 'rgba(0, 0, 0, 0.15)',\n\tsurfaceBorderSubtleColor: 'rgba(0, 0, 0, 0.05)',\n\tsurfaceBackgroundTertiaryColor: COLORS.white,\n\tsurfaceColor: COLORS.white,\n\ttransitionDuration: '200ms',\n\ttransitionDurationFast: '160ms',\n\ttransitionDurationFaster: '120ms',\n\ttransitionDurationFastest: '100ms',\n\ttransitionTimingFunction: 'cubic-bezier(0.08, 0.52, 0.52, 1)',\n\ttransitionTimingFunctionControl: 'cubic-bezier(0.12, 0.8, 0.32, 1)',\n} );\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { COLORS, CONFIG } from '../utils';\nimport type {\n\tAlignmentMatrixControlProps,\n\tAlignmentMatrixControlIconProps,\n} from './types';\n\n// Grid structure\n\nconst rootBase = ( { size = 92 } ) => css`\n\tdirection: ltr;\n\n\tdisplay: grid;\n\tgrid-template-columns: repeat( 3, 1fr );\n\tgrid-template-rows: repeat( 3, 1fr );\n\n\tbox-sizing: border-box;\n\twidth: ${ size }px;\n\taspect-ratio: 1;\n\n\tborder-radius: ${ CONFIG.radiusMedium };\n\toutline: none;\n`;\n\nexport const GridContainer = styled.div< {\n\tsize?: AlignmentMatrixControlProps[ 'width' ];\n\tdisablePointerEvents?: AlignmentMatrixControlIconProps[ 'disablePointerEvents' ];\n} >`\n\t${ rootBase }\n\n\tborder: 1px solid transparent;\n\n\t${ ( props ) =>\n\t\tprops.disablePointerEvents\n\t\t\t? css``\n\t\t\t: css`\n\t\t\t\t\tcursor: pointer;\n\t\t\t ` }\n`;\n\nexport const GridRow = styled.div`\n\tgrid-column: 1 / -1;\n\n\tbox-sizing: border-box;\n\tdisplay: grid;\n\tgrid-template-columns: repeat( 3, 1fr );\n`;\n\n// Cell\nexport const Cell = styled.span`\n\tposition: relative;\n\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\n\tbox-sizing: border-box;\n\tmargin: 0;\n\tpadding: 0;\n\n\tappearance: none;\n\tborder: none;\n\toutline: none;\n`;\n\nconst POINT_SIZE = 6;\nexport const Point = styled.span`\n\tdisplay: block;\n\tcontain: strict;\n\n\tbox-sizing: border-box;\n\twidth: ${ POINT_SIZE }px;\n\taspect-ratio: 1;\n\n\tmargin: auto;\n\n\tcolor: ${ COLORS.theme.gray[ 400 ] };\n\n\t/* Use border instead of background color so that the point shows\n\tin Windows High Contrast Mode */\n\tborder: ${ POINT_SIZE / 2 }px solid currentColor;\n\n\t/* Highlight active item */\n\t${ Cell }[data-active-item] & {\n\t\tcolor: ${ COLORS.gray[ 900 ] };\n\t\ttransform: scale( calc( 5 / 3 ) );\n\t}\n\n\t/* Hover styles for non-active items */\n\t${ Cell }:not([data-active-item]):hover & {\n\t\tcolor: ${ COLORS.theme.accent };\n\t}\n\n\t/* Show an outline only when interacting with keyboard */\n\t${ Cell }[data-focus-visible] & {\n\t\toutline: 1px solid ${ COLORS.theme.accent };\n\t\toutline-offset: 1px;\n\t}\n\n\t@media not ( prefers-reduced-motion ) {\n\t\ttransition-property: color, transform;\n\t\ttransition-duration: 120ms;\n\t\ttransition-timing-function: linear;\n\t}\n`;\n","/**\n * Internal dependencies\n */\nimport { Composite } from '../composite';\nimport Tooltip from '../tooltip';\nimport { VisuallyHidden } from '../visually-hidden';\n\n/**\n * Internal dependencies\n */\nimport { ALIGNMENT_LABEL } from './utils';\nimport { Cell as CellView, Point } from './styles';\nimport type { AlignmentMatrixControlCellProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nexport default function Cell( {\n\tid,\n\tvalue,\n\t...props\n}: WordPressComponentProps< AlignmentMatrixControlCellProps, 'span', false > ) {\n\treturn (\n\t\t<Tooltip text={ ALIGNMENT_LABEL[ value ] }>\n\t\t\t<Composite.Item\n\t\t\t\tid={ id }\n\t\t\t\trender={ <CellView { ...props } role=\"gridcell\" /> }\n\t\t\t>\n\t\t\t\t{ /* VoiceOver needs a text content to be rendered within grid cell,\n\t\t\totherwise it'll announce the content as \"blank\". So we use a visually\n\t\t\thidden element instead of aria-label. */ }\n\t\t\t\t<VisuallyHidden>{ value }</VisuallyHidden>\n\t\t\t\t<Point role=\"presentation\" />\n\t\t\t</Composite.Item>\n\t\t</Tooltip>\n\t);\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Rect, SVG } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport { ALIGNMENTS, getAlignmentIndex } from './utils';\nimport type { AlignmentMatrixControlIconProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nconst BASE_SIZE = 24;\nconst GRID_CELL_SIZE = 7;\nconst GRID_PADDING = ( BASE_SIZE - 3 * GRID_CELL_SIZE ) / 2;\nconst DOT_SIZE = 2;\nconst DOT_SIZE_SELECTED = 4;\n\nfunction AlignmentMatrixControlIcon( {\n\tclassName,\n\tdisablePointerEvents = true,\n\tsize,\n\twidth,\n\theight,\n\tstyle = {},\n\tvalue = 'center',\n\t...props\n}: WordPressComponentProps< AlignmentMatrixControlIconProps, 'svg', false > ) {\n\treturn (\n\t\t<SVG\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\tviewBox={ `0 0 ${ BASE_SIZE } ${ BASE_SIZE }` }\n\t\t\twidth={ size ?? width ?? BASE_SIZE }\n\t\t\theight={ size ?? height ?? BASE_SIZE }\n\t\t\trole=\"presentation\"\n\t\t\tclassName={ clsx(\n\t\t\t\t'component-alignment-matrix-control-icon',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\tstyle={ {\n\t\t\t\tpointerEvents: disablePointerEvents ? 'none' : undefined,\n\t\t\t\t...style,\n\t\t\t} }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ ALIGNMENTS.map( ( align, index ) => {\n\t\t\t\tconst dotSize =\n\t\t\t\t\tgetAlignmentIndex( value ) === index\n\t\t\t\t\t\t? DOT_SIZE_SELECTED\n\t\t\t\t\t\t: DOT_SIZE;\n\n\t\t\t\treturn (\n\t\t\t\t\t<Rect\n\t\t\t\t\t\tkey={ align }\n\t\t\t\t\t\tx={\n\t\t\t\t\t\t\tGRID_PADDING +\n\t\t\t\t\t\t\t( index % 3 ) * GRID_CELL_SIZE +\n\t\t\t\t\t\t\t( GRID_CELL_SIZE - dotSize ) / 2\n\t\t\t\t\t\t}\n\t\t\t\t\t\ty={\n\t\t\t\t\t\t\tGRID_PADDING +\n\t\t\t\t\t\t\tMath.floor( index / 3 ) * GRID_CELL_SIZE +\n\t\t\t\t\t\t\t( GRID_CELL_SIZE - dotSize ) / 2\n\t\t\t\t\t\t}\n\t\t\t\t\t\twidth={ dotSize }\n\t\t\t\t\t\theight={ dotSize }\n\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</SVG>\n\t);\n}\n\nexport default AlignmentMatrixControlIcon;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Cell from './cell';\nimport { Composite } from '../composite';\nimport { GridContainer, GridRow } from './styles';\nimport AlignmentMatrixControlIcon from './icon';\nimport { GRID, getItemId, getItemValue } from './utils';\nimport type { WordPressComponentProps } from '../context';\nimport type { AlignmentMatrixControlProps } from './types';\n\nfunction UnforwardedAlignmentMatrixControl( {\n\tclassName,\n\tid,\n\tlabel = __( 'Alignment Matrix Control' ),\n\tdefaultValue = 'center center',\n\tvalue,\n\tonChange,\n\twidth = 92,\n\t...props\n}: WordPressComponentProps< AlignmentMatrixControlProps, 'div', false > ) {\n\tconst baseId = useInstanceId(\n\t\tUnforwardedAlignmentMatrixControl,\n\t\t'alignment-matrix-control',\n\t\tid\n\t);\n\n\tconst setActiveId = useCallback<\n\t\tNonNullable< React.ComponentProps< typeof Composite >[ 'setActiveId' ] >\n\t>(\n\t\t( nextActiveId ) => {\n\t\t\tconst nextValue = getItemValue( baseId, nextActiveId );\n\t\t\tif ( nextValue ) {\n\t\t\t\tonChange?.( nextValue );\n\t\t\t}\n\t\t},\n\t\t[ baseId, onChange ]\n\t);\n\n\tconst classes = clsx( 'component-alignment-matrix-control', className );\n\n\treturn (\n\t\t<Composite\n\t\t\tdefaultActiveId={ getItemId( baseId, defaultValue ) }\n\t\t\tactiveId={ getItemId( baseId, value ) }\n\t\t\tsetActiveId={ setActiveId }\n\t\t\trtl={ isRTL() }\n\t\t\trender={\n\t\t\t\t<GridContainer\n\t\t\t\t\t{ ...props }\n\t\t\t\t\taria-label={ label }\n\t\t\t\t\tclassName={ classes }\n\t\t\t\t\tid={ baseId }\n\t\t\t\t\trole=\"grid\"\n\t\t\t\t\tsize={ width }\n\t\t\t\t/>\n\t\t\t}\n\t\t>\n\t\t\t{ GRID.map( ( cells, index ) => (\n\t\t\t\t<Composite.Row render={ <GridRow role=\"row\" /> } key={ index }>\n\t\t\t\t\t{ cells.map( ( cell ) => (\n\t\t\t\t\t\t<Cell\n\t\t\t\t\t\t\tid={ getItemId( baseId, cell ) }\n\t\t\t\t\t\t\tkey={ cell }\n\t\t\t\t\t\t\tvalue={ cell }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t</Composite.Row>\n\t\t\t) ) }\n\t\t</Composite>\n\t);\n}\n\n/**\n * AlignmentMatrixControl components enable adjustments to horizontal and vertical alignments for UI.\n *\n * ```jsx\n * import { AlignmentMatrixControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const Example = () => {\n * \tconst [ alignment, setAlignment ] = useState( 'center center' );\n *\n * \treturn (\n * \t\t<AlignmentMatrixControl\n * \t\t\tvalue={ alignment }\n * \t\t\tonChange={ setAlignment }\n * \t\t/>\n * \t);\n * };\n * ```\n */\nexport const AlignmentMatrixControl = Object.assign(\n\tUnforwardedAlignmentMatrixControl,\n\t{\n\t\t/**\n\t\t * Render an alignment matrix as an icon.\n\t\t *\n\t\t * ```jsx\n\t\t * import { AlignmentMatrixControl } from '@wordpress/components';\n\t\t *\n\t\t * <Icon icon={<AlignmentMatrixControl.Icon value=\"top left\" />} />\n\t\t * ```\n\t\t */\n\t\tIcon: Object.assign( AlignmentMatrixControlIcon, {\n\t\t\tdisplayName: 'AlignmentMatrixControl.Icon',\n\t\t} ),\n\t}\n);\n\nexport default AlignmentMatrixControl;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * Internal dependencies\n */\nimport type { AnimateProps, GetAnimateOptions } from './types';\n\n/**\n * @param type The animation type\n * @return Default origin\n */\nfunction getDefaultOrigin( type?: GetAnimateOptions[ 'type' ] ) {\n\treturn type === 'appear' ? 'top' : 'left';\n}\n\n/**\n * @param options\n *\n * @return ClassName that applies the animations\n */\nexport function getAnimateClassName( options: GetAnimateOptions ) {\n\tif ( options.type === 'loading' ) {\n\t\treturn 'components-animate__loading';\n\t}\n\n\tconst { type, origin = getDefaultOrigin( type ) } = options;\n\n\tif ( type === 'appear' ) {\n\t\tconst [ yAxis, xAxis = 'center' ] = origin.split( ' ' );\n\t\treturn clsx( 'components-animate__appear', {\n\t\t\t[ 'is-from-' + xAxis ]: xAxis !== 'center',\n\t\t\t[ 'is-from-' + yAxis ]: yAxis !== 'middle',\n\t\t} );\n\t}\n\n\tif ( type === 'slide-in' ) {\n\t\treturn clsx( 'components-animate__slide-in', 'is-from-' + origin );\n\t}\n\n\treturn undefined;\n}\n\n/**\n * Simple interface to introduce animations to components.\n *\n * ```jsx\n * import { Animate, Notice } from '@wordpress/components';\n *\n * const MyAnimatedNotice = () => (\n * \t<Animate type=\"slide-in\" options={ { origin: 'top' } }>\n * \t\t{ ( { className } ) => (\n * \t\t\t<Notice className={ className } status=\"success\">\n * \t\t\t\t<p>Animation finished.</p>\n * \t\t\t</Notice>\n * \t\t) }\n * \t</Animate>\n * );\n * ```\n */\nexport function Animate( { type, options = {}, children }: AnimateProps ) {\n\treturn children( {\n\t\tclassName: getAnimateClassName( {\n\t\t\ttype,\n\t\t\t...options,\n\t\t} as GetAnimateOptions ),\n\t} );\n}\n\nexport default Animate;\n","import { createContext } from 'react';\n\n/**\n * @public\n */\nconst MotionConfigContext = createContext({\n transformPagePoint: (p) => p,\n isStatic: false,\n reducedMotion: \"never\",\n});\n\nexport { MotionConfigContext };\n","import { createContext } from 'react';\n\nconst MotionContext = createContext({});\n\nexport { MotionContext };\n","import { createContext } from 'react';\n\n/**\n * @public\n */\nconst PresenceContext = createContext(null);\n\nexport { PresenceContext };\n","const isBrowser = typeof document !== \"undefined\";\n\nexport { isBrowser };\n","import { useLayoutEffect, useEffect } from 'react';\nimport { isBrowser } from './is-browser.mjs';\n\nconst useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect;\n\nexport { useIsomorphicLayoutEffect };\n","import { createContext } from 'react';\n\nconst LazyContext = createContext({ strict: false });\n\nexport { LazyContext };\n","/**\n * Convert camelCase to dash-case properties.\n */\nconst camelToDash = (str) => str.replace(/([a-z])([A-Z])/gu, \"$1-$2\").toLowerCase();\n\nexport { camelToDash };\n","import { camelToDash } from '../../render/dom/utils/camel-to-dash.mjs';\n\nconst optimizedAppearDataId = \"framerAppearId\";\nconst optimizedAppearDataAttribute = \"data-\" + camelToDash(optimizedAppearDataId);\n\nexport { optimizedAppearDataAttribute, optimizedAppearDataId };\n","class Queue {\n constructor() {\n this.order = [];\n this.scheduled = new Set();\n }\n add(process) {\n if (!this.scheduled.has(process)) {\n this.scheduled.add(process);\n this.order.push(process);\n return true;\n }\n }\n remove(process) {\n const index = this.order.indexOf(process);\n if (index !== -1) {\n this.order.splice(index, 1);\n this.scheduled.delete(process);\n }\n }\n clear() {\n this.order.length = 0;\n this.scheduled.clear();\n }\n}\nfunction createRenderStep(runNextFrame) {\n /**\n * We create and reuse two queues, one to queue jobs for the current frame\n * and one for the next. We reuse to avoid triggering GC after x frames.\n */\n let thisFrame = new Queue();\n let nextFrame = new Queue();\n let numToRun = 0;\n /**\n * Track whether we're currently processing jobs in this step. This way\n * we can decide whether to schedule new jobs for this frame or next.\n */\n let isProcessing = false;\n let flushNextFrame = false;\n /**\n * A set of processes which were marked keepAlive when scheduled.\n */\n const toKeepAlive = new WeakSet();\n const step = {\n /**\n * Schedule a process to run on the next frame.\n */\n schedule: (callback, keepAlive = false, immediate = false) => {\n const addToCurrentFrame = immediate && isProcessing;\n const queue = addToCurrentFrame ? thisFrame : nextFrame;\n if (keepAlive)\n toKeepAlive.add(callback);\n if (queue.add(callback) && addToCurrentFrame && isProcessing) {\n // If we're adding it to the currently running queue, update its measured size\n numToRun = thisFrame.order.length;\n }\n return callback;\n },\n /**\n * Cancel the provided callback from running on the next frame.\n */\n cancel: (callback) => {\n nextFrame.remove(callback);\n toKeepAlive.delete(callback);\n },\n /**\n * Execute all schedule callbacks.\n */\n process: (frameData) => {\n /**\n * If we're already processing we've probably been triggered by a flushSync\n * inside an existing process. Instead of executing, mark flushNextFrame\n * as true and ensure we flush the following frame at the end of this one.\n */\n if (isProcessing) {\n flushNextFrame = true;\n return;\n }\n isProcessing = true;\n [thisFrame, nextFrame] = [nextFrame, thisFrame];\n // Clear the next frame queue\n nextFrame.clear();\n // Execute this frame\n numToRun = thisFrame.order.length;\n if (numToRun) {\n for (let i = 0; i < numToRun; i++) {\n const callback = thisFrame.order[i];\n if (toKeepAlive.has(callback)) {\n step.schedule(callback);\n runNextFrame();\n }\n callback(frameData);\n }\n }\n isProcessing = false;\n if (flushNextFrame) {\n flushNextFrame = false;\n step.process(frameData);\n }\n },\n };\n return step;\n}\n\nexport { createRenderStep };\n","import { MotionGlobalConfig } from '../utils/GlobalConfig.mjs';\nimport { createRenderStep } from './render-step.mjs';\n\nconst stepsOrder = [\n \"read\", // Read\n \"resolveKeyframes\", // Write/Read/Write/Read\n \"update\", // Compute\n \"preRender\", // Compute\n \"render\", // Write\n \"postRender\", // Compute\n];\nconst maxElapsed = 40;\nfunction createRenderBatcher(scheduleNextBatch, allowKeepAlive) {\n let runNextFrame = false;\n let useDefaultElapsed = true;\n const state = {\n delta: 0,\n timestamp: 0,\n isProcessing: false,\n };\n const steps = stepsOrder.reduce((acc, key) => {\n acc[key] = createRenderStep(() => (runNextFrame = true));\n return acc;\n }, {});\n const processStep = (stepId) => {\n steps[stepId].process(state);\n };\n const processBatch = () => {\n const timestamp = MotionGlobalConfig.useManualTiming\n ? state.timestamp\n : performance.now();\n runNextFrame = false;\n state.delta = useDefaultElapsed\n ? 1000 / 60\n : Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1);\n state.timestamp = timestamp;\n state.isProcessing = true;\n stepsOrder.forEach(processStep);\n state.isProcessing = false;\n if (runNextFrame && allowKeepAlive) {\n useDefaultElapsed = false;\n scheduleNextBatch(processBatch);\n }\n };\n const wake = () => {\n runNextFrame = true;\n useDefaultElapsed = true;\n if (!state.isProcessing) {\n scheduleNextBatch(processBatch);\n }\n };\n const schedule = stepsOrder.reduce((acc, key) => {\n const step = steps[key];\n acc[key] = (process, keepAlive = false, immediate = false) => {\n if (!runNextFrame)\n wake();\n return step.schedule(process, keepAlive, immediate);\n };\n return acc;\n }, {});\n const cancel = (process) => stepsOrder.forEach((key) => steps[key].cancel(process));\n return { schedule, cancel, state, steps };\n}\n\nexport { createRenderBatcher, stepsOrder };\n","import { createRenderBatcher } from './batcher.mjs';\n\nconst { schedule: microtask, cancel: cancelMicrotask } = createRenderBatcher(queueMicrotask, false);\n\nexport { cancelMicrotask, microtask };\n","function isRefObject(ref) {\n return (ref &&\n typeof ref === \"object\" &&\n Object.prototype.hasOwnProperty.call(ref, \"current\"));\n}\n\nexport { isRefObject };\n","import { useCallback } from 'react';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\n\n/**\n * Creates a ref function that, when called, hydrates the provided\n * external ref and VisualElement.\n */\nfunction useMotionRef(visualState, visualElement, externalRef) {\n return useCallback((instance) => {\n instance && visualState.mount && visualState.mount(instance);\n if (visualElement) {\n instance\n ? visualElement.mount(instance)\n : visualElement.unmount();\n }\n if (externalRef) {\n if (typeof externalRef === \"function\") {\n externalRef(instance);\n }\n else if (isRefObject(externalRef)) {\n externalRef.current = instance;\n }\n }\n }, \n /**\n * Only pass a new ref callback to React if we've received a visual element\n * factory. Otherwise we'll be mounting/remounting every time externalRef\n * or other dependencies change.\n */\n [visualElement]);\n}\n\nexport { useMotionRef };\n","/**\n * Decides if the supplied variable is variant label\n */\nfunction isVariantLabel(v) {\n return typeof v === \"string\" || Array.isArray(v);\n}\n\nexport { isVariantLabel };\n","function isAnimationControls(v) {\n return (v !== null &&\n typeof v === \"object\" &&\n typeof v.start === \"function\");\n}\n\nexport { isAnimationControls };\n","const variantPriorityOrder = [\n \"animate\",\n \"whileInView\",\n \"whileFocus\",\n \"whileHover\",\n \"whileTap\",\n \"whileDrag\",\n \"exit\",\n];\nconst variantProps = [\"initial\", ...variantPriorityOrder];\n\nexport { variantPriorityOrder, variantProps };\n","import { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { isVariantLabel } from './is-variant-label.mjs';\nimport { variantProps } from './variant-props.mjs';\n\nfunction isControllingVariants(props) {\n return (isAnimationControls(props.animate) ||\n variantProps.some((name) => isVariantLabel(props[name])));\n}\nfunction isVariantNode(props) {\n return Boolean(isControllingVariants(props) || props.variants);\n}\n\nexport { isControllingVariants, isVariantNode };\n","import { useContext, useMemo } from 'react';\nimport { MotionContext } from './index.mjs';\nimport { getCurrentTreeVariants } from './utils.mjs';\n\nfunction useCreateMotionContext(props) {\n const { initial, animate } = getCurrentTreeVariants(props, useContext(MotionContext));\n return useMemo(() => ({ initial, animate }), [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)]);\n}\nfunction variantLabelsAsDependency(prop) {\n return Array.isArray(prop) ? prop.join(\" \") : prop;\n}\n\nexport { useCreateMotionContext };\n","const featureProps = {\n animation: [\n \"animate\",\n \"variants\",\n \"whileHover\",\n \"whileTap\",\n \"exit\",\n \"whileInView\",\n \"whileFocus\",\n \"whileDrag\",\n ],\n exit: [\"exit\"],\n drag: [\"drag\", \"dragControls\"],\n focus: [\"whileFocus\"],\n hover: [\"whileHover\", \"onHoverStart\", \"onHoverEnd\"],\n tap: [\"whileTap\", \"onTap\", \"onTapStart\", \"onTapCancel\"],\n pan: [\"onPan\", \"onPanStart\", \"onPanSessionStart\", \"onPanEnd\"],\n inView: [\"whileInView\", \"onViewportEnter\", \"onViewportLeave\"],\n layout: [\"layout\", \"layoutId\"],\n};\nconst featureDefinitions = {};\nfor (const key in featureProps) {\n featureDefinitions[key] = {\n isEnabled: (props) => featureProps[key].some((name) => !!props[name]),\n };\n}\n\nexport { featureDefinitions };\n","import { createContext } from 'react';\n\nconst LayoutGroupContext = createContext({});\n\nexport { LayoutGroupContext };\n","import { createContext } from 'react';\n\n/**\n * Internal, exported only for usage in Framer\n */\nconst SwitchLayoutGroupContext = createContext({});\n\nexport { SwitchLayoutGroupContext };\n","const motionComponentSymbol = Symbol.for(\"motionComponentSymbol\");\n\nexport { motionComponentSymbol };\n","import { jsxs, jsx } from 'react/jsx-runtime';\nimport { forwardRef, useContext } from 'react';\nimport { MotionConfigContext } from '../context/MotionConfigContext.mjs';\nimport { MotionContext } from '../context/MotionContext/index.mjs';\nimport { useVisualElement } from './utils/use-visual-element.mjs';\nimport { useMotionRef } from './utils/use-motion-ref.mjs';\nimport { useCreateMotionContext } from '../context/MotionContext/create.mjs';\nimport { loadFeatures } from './features/load-features.mjs';\nimport { isBrowser } from '../utils/is-browser.mjs';\nimport { LayoutGroupContext } from '../context/LayoutGroupContext.mjs';\nimport { LazyContext } from '../context/LazyContext.mjs';\nimport { SwitchLayoutGroupContext } from '../context/SwitchLayoutGroupContext.mjs';\nimport { motionComponentSymbol } from './utils/symbol.mjs';\n\n/**\n * Create a `motion` component.\n *\n * This function accepts a Component argument, which can be either a string (ie \"div\"\n * for `motion.div`), or an actual React component.\n *\n * Alongside this is a config option which provides a way of rendering the provided\n * component \"offline\", or outside the React render cycle.\n */\nfunction createMotionComponent({ preloadedFeatures, createVisualElement, useRender, useVisualState, Component, }) {\n preloadedFeatures && loadFeatures(preloadedFeatures);\n function MotionComponent(props, externalRef) {\n /**\n * If we need to measure the element we load this functionality in a\n * separate class component in order to gain access to getSnapshotBeforeUpdate.\n */\n let MeasureLayout;\n const configAndProps = {\n ...useContext(MotionConfigContext),\n ...props,\n layoutId: useLayoutId(props),\n };\n const { isStatic } = configAndProps;\n const context = useCreateMotionContext(props);\n const visualState = useVisualState(props, isStatic);\n if (!isStatic && isBrowser) {\n /**\n * Create a VisualElement for this component. A VisualElement provides a common\n * interface to renderer-specific APIs (ie DOM/Three.js etc) as well as\n * providing a way of rendering to these APIs outside of the React render loop\n * for more performant animations and interactions\n */\n context.visualElement = useVisualElement(Component, visualState, configAndProps, createVisualElement);\n /**\n * Load Motion gesture and animation features. These are rendered as renderless\n * components so each feature can optionally make use of React lifecycle methods.\n */\n const initialLayoutGroupConfig = useContext(SwitchLayoutGroupContext);\n const isStrict = useContext(LazyContext).strict;\n if (context.visualElement) {\n MeasureLayout = context.visualElement.loadFeatures(\n // Note: Pass the full new combined props to correctly re-render dynamic feature components.\n configAndProps, isStrict, preloadedFeatures, initialLayoutGroupConfig);\n }\n }\n /**\n * The mount order and hierarchy is specific to ensure our element ref\n * is hydrated by the time features fire their effects.\n */\n return (jsxs(MotionContext.Provider, { value: context, children: [MeasureLayout && context.visualElement ? (jsx(MeasureLayout, { visualElement: context.visualElement, ...configAndProps })) : null, useRender(Component, props, useMotionRef(visualState, context.visualElement, externalRef), visualState, isStatic, context.visualElement)] }));\n }\n const ForwardRefComponent = forwardRef(MotionComponent);\n ForwardRefComponent[motionComponentSymbol] = Component;\n return ForwardRefComponent;\n}\nfunction useLayoutId({ layoutId }) {\n const layoutGroupId = useContext(LayoutGroupContext).id;\n return layoutGroupId && layoutId !== undefined\n ? layoutGroupId + \"-\" + layoutId\n : layoutId;\n}\n\nexport { createMotionComponent };\n","import { featureDefinitions } from './definitions.mjs';\n\nfunction loadFeatures(features) {\n for (const key in features) {\n featureDefinitions[key] = {\n ...featureDefinitions[key],\n ...features[key],\n };\n }\n}\n\nexport { loadFeatures };\n","import { isVariantLabel } from '../../render/utils/is-variant-label.mjs';\nimport { isControllingVariants } from '../../render/utils/is-controlling-variants.mjs';\n\nfunction getCurrentTreeVariants(props, context) {\n if (isControllingVariants(props)) {\n const { initial, animate } = props;\n return {\n initial: initial === false || isVariantLabel(initial)\n ? initial\n : undefined,\n animate: isVariantLabel(animate) ? animate : undefined,\n };\n }\n return props.inherit !== false ? context : {};\n}\n\nexport { getCurrentTreeVariants };\n","import { useContext, useRef, useInsertionEffect, useEffect } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { MotionContext } from '../../context/MotionContext/index.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { LazyContext } from '../../context/LazyContext.mjs';\nimport { MotionConfigContext } from '../../context/MotionConfigContext.mjs';\nimport { optimizedAppearDataAttribute } from '../../animation/optimized-appear/data-id.mjs';\nimport { microtask } from '../../frameloop/microtask.mjs';\n\nfunction useVisualElement(Component, visualState, props, createVisualElement) {\n const { visualElement: parent } = useContext(MotionContext);\n const lazyContext = useContext(LazyContext);\n const presenceContext = useContext(PresenceContext);\n const reducedMotionConfig = useContext(MotionConfigContext).reducedMotion;\n const visualElementRef = useRef();\n /**\n * If we haven't preloaded a renderer, check to see if we have one lazy-loaded\n */\n createVisualElement = createVisualElement || lazyContext.renderer;\n if (!visualElementRef.current && createVisualElement) {\n visualElementRef.current = createVisualElement(Component, {\n visualState,\n parent,\n props,\n presenceContext,\n blockInitialAnimation: presenceContext\n ? presenceContext.initial === false\n : false,\n reducedMotionConfig,\n });\n }\n const visualElement = visualElementRef.current;\n useInsertionEffect(() => {\n visualElement && visualElement.update(props, presenceContext);\n });\n /**\n * Cache this value as we want to know whether HandoffAppearAnimations\n * was present on initial render - it will be deleted after this.\n */\n const wantsHandoff = useRef(Boolean(props[optimizedAppearDataAttribute] &&\n !window.HandoffComplete));\n useIsomorphicLayoutEffect(() => {\n if (!visualElement)\n return;\n microtask.postRender(visualElement.render);\n /**\n * Ideally this function would always run in a useEffect.\n *\n * However, if we have optimised appear animations to handoff from,\n * it needs to happen synchronously to ensure there's no flash of\n * incorrect styles in the event of a hydration error.\n *\n * So if we detect a situtation where optimised appear animations\n * are running, we use useLayoutEffect to trigger animations.\n */\n if (wantsHandoff.current && visualElement.animationState) {\n visualElement.animationState.animateChanges();\n }\n });\n useEffect(() => {\n if (!visualElement)\n return;\n visualElement.updateFeatures();\n if (!wantsHandoff.current && visualElement.animationState) {\n visualElement.animationState.animateChanges();\n }\n if (wantsHandoff.current) {\n wantsHandoff.current = false;\n // This ensures all future calls to animateChanges() will run in useEffect\n window.HandoffComplete = true;\n }\n });\n return visualElement;\n}\n\nexport { useVisualElement };\n","import { createMotionComponent } from '../../motion/index.mjs';\n\n/**\n * Convert any React component into a `motion` component. The provided component\n * **must** use `React.forwardRef` to the underlying DOM component you want to animate.\n *\n * ```jsx\n * const Component = React.forwardRef((props, ref) => {\n * return <div ref={ref} />\n * })\n *\n * const MotionComponent = motion(Component)\n * ```\n *\n * @public\n */\nfunction createMotionProxy(createConfig) {\n function custom(Component, customMotionComponentConfig = {}) {\n return createMotionComponent(createConfig(Component, customMotionComponentConfig));\n }\n if (typeof Proxy === \"undefined\") {\n return custom;\n }\n /**\n * A cache of generated `motion` components, e.g `motion.div`, `motion.input` etc.\n * Rather than generating them anew every render.\n */\n const componentCache = new Map();\n return new Proxy(custom, {\n /**\n * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.\n * The prop name is passed through as `key` and we can use that to generate a `motion`\n * DOM component with that name.\n */\n get: (_target, key) => {\n /**\n * If this element doesn't exist in the component cache, create it and cache.\n */\n if (!componentCache.has(key)) {\n componentCache.set(key, custom(key));\n }\n return componentCache.get(key);\n },\n });\n}\n\nexport { createMotionProxy };\n","/**\n * We keep these listed seperately as we use the lowercase tag names as part\n * of the runtime bundle to detect SVG components\n */\nconst lowercaseSVGElements = [\n \"animate\",\n \"circle\",\n \"defs\",\n \"desc\",\n \"ellipse\",\n \"g\",\n \"image\",\n \"line\",\n \"filter\",\n \"marker\",\n \"mask\",\n \"metadata\",\n \"path\",\n \"pattern\",\n \"polygon\",\n \"polyline\",\n \"rect\",\n \"stop\",\n \"switch\",\n \"symbol\",\n \"svg\",\n \"text\",\n \"tspan\",\n \"use\",\n \"view\",\n];\n\nexport { lowercaseSVGElements };\n","import { lowercaseSVGElements } from '../../svg/lowercase-elements.mjs';\n\nfunction isSVGComponent(Component) {\n if (\n /**\n * If it's not a string, it's a custom React component. Currently we only support\n * HTML custom React components.\n */\n typeof Component !== \"string\" ||\n /**\n * If it contains a dash, the element is a custom HTML webcomponent.\n */\n Component.includes(\"-\")) {\n return false;\n }\n else if (\n /**\n * If it's in our list of lowercase SVG tags, it's an SVG component\n */\n lowercaseSVGElements.indexOf(Component) > -1 ||\n /**\n * If it contains a capital letter, it's an SVG component\n */\n /[A-Z]/u.test(Component)) {\n return true;\n }\n return false;\n}\n\nexport { isSVGComponent };\n","const scaleCorrectors = {};\nfunction addScaleCorrector(correctors) {\n Object.assign(scaleCorrectors, correctors);\n}\n\nexport { addScaleCorrector, scaleCorrectors };\n","/**\n * Generate a list of every possible transform key.\n */\nconst transformPropOrder = [\n \"transformPerspective\",\n \"x\",\n \"y\",\n \"z\",\n \"translateX\",\n \"translateY\",\n \"translateZ\",\n \"scale\",\n \"scaleX\",\n \"scaleY\",\n \"rotate\",\n \"rotateX\",\n \"rotateY\",\n \"rotateZ\",\n \"skew\",\n \"skewX\",\n \"skewY\",\n];\n/**\n * A quick lookup for transform props.\n */\nconst transformProps = new Set(transformPropOrder);\n\nexport { transformPropOrder, transformProps };\n","import { scaleCorrectors } from '../../projection/styles/scale-correction.mjs';\nimport { transformProps } from '../../render/html/utils/transform.mjs';\n\nfunction isForcedMotionValue(key, { layout, layoutId }) {\n return (transformProps.has(key) ||\n key.startsWith(\"origin\") ||\n ((layout || layoutId !== undefined) &&\n (!!scaleCorrectors[key] || key === \"opacity\")));\n}\n\nexport { isForcedMotionValue };\n","const isMotionValue = (value) => Boolean(value && value.getVelocity);\n\nexport { isMotionValue };\n","import { transformPropOrder } from './transform.mjs';\n\nconst translateAlias = {\n x: \"translateX\",\n y: \"translateY\",\n z: \"translateZ\",\n transformPerspective: \"perspective\",\n};\nconst numTransforms = transformPropOrder.length;\n/**\n * Build a CSS transform style from individual x/y/scale etc properties.\n *\n * This outputs with a default order of transforms/scales/rotations, this can be customised by\n * providing a transformTemplate function.\n */\nfunction buildTransform(transform, { enableHardwareAcceleration = true, allowTransformNone = true, }, transformIsDefault, transformTemplate) {\n // The transform string we're going to build into.\n let transformString = \"\";\n /**\n * Loop over all possible transforms in order, adding the ones that\n * are present to the transform string.\n */\n for (let i = 0; i < numTransforms; i++) {\n const key = transformPropOrder[i];\n if (transform[key] !== undefined) {\n const transformName = translateAlias[key] || key;\n transformString += `${transformName}(${transform[key]}) `;\n }\n }\n if (enableHardwareAcceleration && !transform.z) {\n transformString += \"translateZ(0)\";\n }\n transformString = transformString.trim();\n // If we have a custom `transform` template, pass our transform values and\n // generated transformString to that before returning\n if (transformTemplate) {\n transformString = transformTemplate(transform, transformIsDefault ? \"\" : transformString);\n }\n else if (allowTransformNone && transformIsDefault) {\n transformString = \"none\";\n }\n return transformString;\n}\n\nexport { buildTransform };\n","const checkStringStartsWith = (token) => (key) => typeof key === \"string\" && key.startsWith(token);\nconst isCSSVariableName = checkStringStartsWith(\"--\");\nconst startsAsVariableToken = checkStringStartsWith(\"var(--\");\nconst isCSSVariableToken = (value) => {\n const startsWithToken = startsAsVariableToken(value);\n if (!startsWithToken)\n return false;\n // Ensure any comments are stripped from the value as this can harm performance of the regex.\n return singleCssVariableRegex.test(value.split(\"/*\")[0].trim());\n};\nconst singleCssVariableRegex = /var\\(--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)$/iu;\n\nexport { isCSSVariableName, isCSSVariableToken };\n","/**\n * Provided a value and a ValueType, returns the value as that value type.\n */\nconst getValueAsType = (value, type) => {\n return type && typeof value === \"number\"\n ? type.transform(value)\n : value;\n};\n\nexport { getValueAsType };\n","const clamp = (min, max, v) => {\n if (v > max)\n return max;\n if (v < min)\n return min;\n return v;\n};\n\nexport { clamp };\n","import { clamp } from '../../../utils/clamp.mjs';\n\nconst number = {\n test: (v) => typeof v === \"number\",\n parse: parseFloat,\n transform: (v) => v,\n};\nconst alpha = {\n ...number,\n transform: (v) => clamp(0, 1, v),\n};\nconst scale = {\n ...number,\n default: 1,\n};\n\nexport { alpha, number, scale };\n","/**\n * TODO: When we move from string as a source of truth to data models\n * everything in this folder should probably be referred to as models vs types\n */\n// If this number is a decimal, make it just five decimal places\n// to avoid exponents\nconst sanitize = (v) => Math.round(v * 100000) / 100000;\nconst floatRegex = /-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/gu;\nconst colorRegex = /(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))/giu;\nconst singleColorRegex = /^(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))$/iu;\nfunction isString(v) {\n return typeof v === \"string\";\n}\n\nexport { colorRegex, floatRegex, isString, sanitize, singleColorRegex };\n","import { isString } from '../utils.mjs';\n\nconst createUnitType = (unit) => ({\n test: (v) => isString(v) && v.endsWith(unit) && v.split(\" \").length === 1,\n parse: parseFloat,\n transform: (v) => `${v}${unit}`,\n});\nconst degrees = createUnitType(\"deg\");\nconst percent = createUnitType(\"%\");\nconst px = createUnitType(\"px\");\nconst vh = createUnitType(\"vh\");\nconst vw = createUnitType(\"vw\");\nconst progressPercentage = {\n ...percent,\n parse: (v) => percent.parse(v) / 100,\n transform: (v) => percent.transform(v * 100),\n};\n\nexport { degrees, percent, progressPercentage, px, vh, vw };\n","import { number } from '../../../value/types/numbers/index.mjs';\n\nconst int = {\n ...number,\n transform: Math.round,\n};\n\nexport { int };\n","import { scale, alpha } from '../../../value/types/numbers/index.mjs';\nimport { px, degrees, progressPercentage } from '../../../value/types/numbers/units.mjs';\nimport { int } from './type-int.mjs';\n\nconst numberValueTypes = {\n // Border props\n borderWidth: px,\n borderTopWidth: px,\n borderRightWidth: px,\n borderBottomWidth: px,\n borderLeftWidth: px,\n borderRadius: px,\n radius: px,\n borderTopLeftRadius: px,\n borderTopRightRadius: px,\n borderBottomRightRadius: px,\n borderBottomLeftRadius: px,\n // Positioning props\n width: px,\n maxWidth: px,\n height: px,\n maxHeight: px,\n size: px,\n top: px,\n right: px,\n bottom: px,\n left: px,\n // Spacing props\n padding: px,\n paddingTop: px,\n paddingRight: px,\n paddingBottom: px,\n paddingLeft: px,\n margin: px,\n marginTop: px,\n marginRight: px,\n marginBottom: px,\n marginLeft: px,\n // Transform props\n rotate: degrees,\n rotateX: degrees,\n rotateY: degrees,\n rotateZ: degrees,\n scale,\n scaleX: scale,\n scaleY: scale,\n scaleZ: scale,\n skew: degrees,\n skewX: degrees,\n skewY: degrees,\n distance: px,\n translateX: px,\n translateY: px,\n translateZ: px,\n x: px,\n y: px,\n z: px,\n perspective: px,\n transformPerspective: px,\n opacity: alpha,\n originX: progressPercentage,\n originY: progressPercentage,\n originZ: px,\n // Misc\n zIndex: int,\n backgroundPositionX: px,\n backgroundPositionY: px,\n // SVG\n fillOpacity: alpha,\n strokeOpacity: alpha,\n numOctaves: int,\n};\n\nexport { numberValueTypes };\n","import { buildTransform } from './build-transform.mjs';\nimport { isCSSVariableName } from '../../dom/utils/is-css-variable.mjs';\nimport { transformProps } from './transform.mjs';\nimport { getValueAsType } from '../../dom/value-types/get-as-type.mjs';\nimport { numberValueTypes } from '../../dom/value-types/number.mjs';\n\nfunction buildHTMLStyles(state, latestValues, options, transformTemplate) {\n const { style, vars, transform, transformOrigin } = state;\n // Track whether we encounter any transform or transformOrigin values.\n let hasTransform = false;\n let hasTransformOrigin = false;\n // Does the calculated transform essentially equal \"none\"?\n let transformIsNone = true;\n /**\n * Loop over all our latest animated values and decide whether to handle them\n * as a style or CSS variable.\n *\n * Transforms and transform origins are kept seperately for further processing.\n */\n for (const key in latestValues) {\n const value = latestValues[key];\n /**\n * If this is a CSS variable we don't do any further processing.\n */\n if (isCSSVariableName(key)) {\n vars[key] = value;\n continue;\n }\n // Convert the value to its default value type, ie 0 -> \"0px\"\n const valueType = numberValueTypes[key];\n const valueAsType = getValueAsType(value, valueType);\n if (transformProps.has(key)) {\n // If this is a transform, flag to enable further transform processing\n hasTransform = true;\n transform[key] = valueAsType;\n // If we already know we have a non-default transform, early return\n if (!transformIsNone)\n continue;\n // Otherwise check to see if this is a default transform\n if (value !== (valueType.default || 0))\n transformIsNone = false;\n }\n else if (key.startsWith(\"origin\")) {\n // If this is a transform origin, flag and enable further transform-origin processing\n hasTransformOrigin = true;\n transformOrigin[key] = valueAsType;\n }\n else {\n style[key] = valueAsType;\n }\n }\n if (!latestValues.transform) {\n if (hasTransform || transformTemplate) {\n style.transform = buildTransform(state.transform, options, transformIsNone, transformTemplate);\n }\n else if (style.transform) {\n /**\n * If we have previously created a transform but currently don't have any,\n * reset transform style to none.\n */\n style.transform = \"none\";\n }\n }\n /**\n * Build a transformOrigin style. Uses the same defaults as the browser for\n * undefined origins.\n */\n if (hasTransformOrigin) {\n const { originX = \"50%\", originY = \"50%\", originZ = 0, } = transformOrigin;\n style.transformOrigin = `${originX} ${originY} ${originZ}`;\n }\n}\n\nexport { buildHTMLStyles };\n","const createHtmlRenderState = () => ({\n style: {},\n transform: {},\n transformOrigin: {},\n vars: {},\n});\n\nexport { createHtmlRenderState };\n","import { useMemo } from 'react';\nimport { isForcedMotionValue } from '../../motion/utils/is-forced-motion-value.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\nimport { buildHTMLStyles } from './utils/build-styles.mjs';\nimport { createHtmlRenderState } from './utils/create-render-state.mjs';\n\nfunction copyRawValuesOnly(target, source, props) {\n for (const key in source) {\n if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) {\n target[key] = source[key];\n }\n }\n}\nfunction useInitialMotionValues({ transformTemplate }, visualState, isStatic) {\n return useMemo(() => {\n const state = createHtmlRenderState();\n buildHTMLStyles(state, visualState, { enableHardwareAcceleration: !isStatic }, transformTemplate);\n return Object.assign({}, state.vars, state.style);\n }, [visualState]);\n}\nfunction useStyle(props, visualState, isStatic) {\n const styleProp = props.style || {};\n const style = {};\n /**\n * Copy non-Motion Values straight into style\n */\n copyRawValuesOnly(style, styleProp, props);\n Object.assign(style, useInitialMotionValues(props, visualState, isStatic));\n return style;\n}\nfunction useHTMLProps(props, visualState, isStatic) {\n // The `any` isn't ideal but it is the type of createElement props argument\n const htmlProps = {};\n const style = useStyle(props, visualState, isStatic);\n if (props.drag && props.dragListener !== false) {\n // Disable the ghost element when a user drags\n htmlProps.draggable = false;\n // Disable text selection\n style.userSelect =\n style.WebkitUserSelect =\n style.WebkitTouchCallout =\n \"none\";\n // Disable scrolling on the draggable direction\n style.touchAction =\n props.drag === true\n ? \"none\"\n : `pan-${props.drag === \"x\" ? \"y\" : \"x\"}`;\n }\n if (props.tabIndex === undefined &&\n (props.onTap || props.onTapStart || props.whileTap)) {\n htmlProps.tabIndex = 0;\n }\n htmlProps.style = style;\n return htmlProps;\n}\n\nexport { copyRawValuesOnly, useHTMLProps };\n","/**\n * A list of all valid MotionProps.\n *\n * @privateRemarks\n * This doesn't throw if a `MotionProp` name is missing - it should.\n */\nconst validMotionProps = new Set([\n \"animate\",\n \"exit\",\n \"variants\",\n \"initial\",\n \"style\",\n \"values\",\n \"variants\",\n \"transition\",\n \"transformTemplate\",\n \"custom\",\n \"inherit\",\n \"onBeforeLayoutMeasure\",\n \"onAnimationStart\",\n \"onAnimationComplete\",\n \"onUpdate\",\n \"onDragStart\",\n \"onDrag\",\n \"onDragEnd\",\n \"onMeasureDragConstraints\",\n \"onDirectionLock\",\n \"onDragTransitionEnd\",\n \"_dragX\",\n \"_dragY\",\n \"onHoverStart\",\n \"onHoverEnd\",\n \"onViewportEnter\",\n \"onViewportLeave\",\n \"globalTapTarget\",\n \"ignoreStrict\",\n \"viewport\",\n]);\n/**\n * Check whether a prop name is a valid `MotionProp` key.\n *\n * @param key - Name of the property to check\n * @returns `true` is key is a valid `MotionProp`.\n *\n * @public\n */\nfunction isValidMotionProp(key) {\n return (key.startsWith(\"while\") ||\n (key.startsWith(\"drag\") && key !== \"draggable\") ||\n key.startsWith(\"layout\") ||\n key.startsWith(\"onTap\") ||\n key.startsWith(\"onPan\") ||\n key.startsWith(\"onLayout\") ||\n validMotionProps.has(key));\n}\n\nexport { isValidMotionProp };\n","import { isValidMotionProp } from '../../../motion/utils/valid-prop.mjs';\n\nlet shouldForward = (key) => !isValidMotionProp(key);\nfunction loadExternalIsValidProp(isValidProp) {\n if (!isValidProp)\n return;\n // Explicitly filter our events\n shouldForward = (key) => key.startsWith(\"on\") ? !isValidMotionProp(key) : isValidProp(key);\n}\n/**\n * Emotion and Styled Components both allow users to pass through arbitrary props to their components\n * to dynamically generate CSS. They both use the `@emotion/is-prop-valid` package to determine which\n * of these should be passed to the underlying DOM node.\n *\n * However, when styling a Motion component `styled(motion.div)`, both packages pass through *all* props\n * as it's seen as an arbitrary component rather than a DOM node. Motion only allows arbitrary props\n * passed through the `custom` prop so it doesn't *need* the payload or computational overhead of\n * `@emotion/is-prop-valid`, however to fix this problem we need to use it.\n *\n * By making it an optionalDependency we can offer this functionality only in the situations where it's\n * actually required.\n */\ntry {\n /**\n * We attempt to import this package but require won't be defined in esm environments, in that case\n * isPropValid will have to be provided via `MotionContext`. In a 6.0.0 this should probably be removed\n * in favour of explicit injection.\n */\n loadExternalIsValidProp(require(\"@emotion/is-prop-valid\").default);\n}\ncatch (_a) {\n // We don't need to actually do anything here - the fallback is the existing `isPropValid`.\n}\nfunction filterProps(props, isDom, forwardMotionProps) {\n const filteredProps = {};\n for (const key in props) {\n /**\n * values is considered a valid prop by Emotion, so if it's present\n * this will be rendered out to the DOM unless explicitly filtered.\n *\n * We check the type as it could be used with the `feColorMatrix`\n * element, which we support.\n */\n if (key === \"values\" && typeof props.values === \"object\")\n continue;\n if (shouldForward(key) ||\n (forwardMotionProps === true && isValidMotionProp(key)) ||\n (!isDom && !isValidMotionProp(key)) ||\n // If trying to use native HTML drag events, forward drag listeners\n (props[\"draggable\"] &&\n key.startsWith(\"onDrag\"))) {\n filteredProps[key] =\n props[key];\n }\n }\n return filteredProps;\n}\n\nexport { filterProps, loadExternalIsValidProp };\n","import { px } from '../../../value/types/numbers/units.mjs';\n\nfunction calcOrigin(origin, offset, size) {\n return typeof origin === \"string\"\n ? origin\n : px.transform(offset + size * origin);\n}\n/**\n * The SVG transform origin defaults are different to CSS and is less intuitive,\n * so we use the measured dimensions of the SVG to reconcile these.\n */\nfunction calcSVGTransformOrigin(dimensions, originX, originY) {\n const pxOriginX = calcOrigin(originX, dimensions.x, dimensions.width);\n const pxOriginY = calcOrigin(originY, dimensions.y, dimensions.height);\n return `${pxOriginX} ${pxOriginY}`;\n}\n\nexport { calcSVGTransformOrigin };\n","import { px } from '../../../value/types/numbers/units.mjs';\n\nconst dashKeys = {\n offset: \"stroke-dashoffset\",\n array: \"stroke-dasharray\",\n};\nconst camelKeys = {\n offset: \"strokeDashoffset\",\n array: \"strokeDasharray\",\n};\n/**\n * Build SVG path properties. Uses the path's measured length to convert\n * our custom pathLength, pathSpacing and pathOffset into stroke-dashoffset\n * and stroke-dasharray attributes.\n *\n * This function is mutative to reduce per-frame GC.\n */\nfunction buildSVGPath(attrs, length, spacing = 1, offset = 0, useDashCase = true) {\n // Normalise path length by setting SVG attribute pathLength to 1\n attrs.pathLength = 1;\n // We use dash case when setting attributes directly to the DOM node and camel case\n // when defining props on a React component.\n const keys = useDashCase ? dashKeys : camelKeys;\n // Build the dash offset\n attrs[keys.offset] = px.transform(-offset);\n // Build the dash array\n const pathLength = px.transform(length);\n const pathSpacing = px.transform(spacing);\n attrs[keys.array] = `${pathLength} ${pathSpacing}`;\n}\n\nexport { buildSVGPath };\n","import { buildHTMLStyles } from '../../html/utils/build-styles.mjs';\nimport { calcSVGTransformOrigin } from './transform-origin.mjs';\nimport { buildSVGPath } from './path.mjs';\n\n/**\n * Build SVG visual attrbutes, like cx and style.transform\n */\nfunction buildSVGAttrs(state, { attrX, attrY, attrScale, originX, originY, pathLength, pathSpacing = 1, pathOffset = 0, \n// This is object creation, which we try to avoid per-frame.\n...latest }, options, isSVGTag, transformTemplate) {\n buildHTMLStyles(state, latest, options, transformTemplate);\n /**\n * For svg tags we just want to make sure viewBox is animatable and treat all the styles\n * as normal HTML tags.\n */\n if (isSVGTag) {\n if (state.style.viewBox) {\n state.attrs.viewBox = state.style.viewBox;\n }\n return;\n }\n state.attrs = state.style;\n state.style = {};\n const { attrs, style, dimensions } = state;\n /**\n * However, we apply transforms as CSS transforms. So if we detect a transform we take it from attrs\n * and copy it into style.\n */\n if (attrs.transform) {\n if (dimensions)\n style.transform = attrs.transform;\n delete attrs.transform;\n }\n // Parse transformOrigin\n if (dimensions &&\n (originX !== undefined || originY !== undefined || style.transform)) {\n style.transformOrigin = calcSVGTransformOrigin(dimensions, originX !== undefined ? originX : 0.5, originY !== undefined ? originY : 0.5);\n }\n // Render attrX/attrY/attrScale as attributes\n if (attrX !== undefined)\n attrs.x = attrX;\n if (attrY !== undefined)\n attrs.y = attrY;\n if (attrScale !== undefined)\n attrs.scale = attrScale;\n // Build SVG path if one has been defined\n if (pathLength !== undefined) {\n buildSVGPath(attrs, pathLength, pathSpacing, pathOffset, false);\n }\n}\n\nexport { buildSVGAttrs };\n","import { createHtmlRenderState } from '../../html/utils/create-render-state.mjs';\n\nconst createSvgRenderState = () => ({\n ...createHtmlRenderState(),\n attrs: {},\n});\n\nexport { createSvgRenderState };\n","const isSVGTag = (tag) => typeof tag === \"string\" && tag.toLowerCase() === \"svg\";\n\nexport { isSVGTag };\n","import { useMemo } from 'react';\nimport { copyRawValuesOnly } from '../html/use-props.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\nimport { createSvgRenderState } from './utils/create-render-state.mjs';\nimport { isSVGTag } from './utils/is-svg-tag.mjs';\n\nfunction useSVGProps(props, visualState, _isStatic, Component) {\n const visualProps = useMemo(() => {\n const state = createSvgRenderState();\n buildSVGAttrs(state, visualState, { enableHardwareAcceleration: false }, isSVGTag(Component), props.transformTemplate);\n return {\n ...state.attrs,\n style: { ...state.style },\n };\n }, [visualState]);\n if (props.style) {\n const rawStyles = {};\n copyRawValuesOnly(rawStyles, props.style, props);\n visualProps.style = { ...rawStyles, ...visualProps.style };\n }\n return visualProps;\n}\n\nexport { useSVGProps };\n","import { Fragment, useMemo, createElement } from 'react';\nimport { useHTMLProps } from '../html/use-props.mjs';\nimport { filterProps } from './utils/filter-props.mjs';\nimport { isSVGComponent } from './utils/is-svg-component.mjs';\nimport { useSVGProps } from '../svg/use-props.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\nfunction createUseRender(forwardMotionProps = false) {\n const useRender = (Component, props, ref, { latestValues }, isStatic) => {\n const useVisualProps = isSVGComponent(Component)\n ? useSVGProps\n : useHTMLProps;\n const visualProps = useVisualProps(props, latestValues, isStatic, Component);\n const filteredProps = filterProps(props, typeof Component === \"string\", forwardMotionProps);\n const elementProps = Component !== Fragment\n ? { ...filteredProps, ...visualProps, ref }\n : {};\n /**\n * If component has been handed a motion value as its child,\n * memoise its initial value and render that. Subsequent updates\n * will be handled by the onChange handler\n */\n const { children } = props;\n const renderedChildren = useMemo(() => (isMotionValue(children) ? children.get() : children), [children]);\n return createElement(Component, {\n ...elementProps,\n children: renderedChildren,\n });\n };\n return useRender;\n}\n\nexport { createUseRender };\n","function renderHTML(element, { style, vars }, styleProp, projection) {\n Object.assign(element.style, style, projection && projection.getProjectionStyles(styleProp));\n // Loop over any CSS variables and assign those.\n for (const key in vars) {\n element.style.setProperty(key, vars[key]);\n }\n}\n\nexport { renderHTML };\n","/**\n * A set of attribute names that are always read/written as camel case.\n */\nconst camelCaseAttributes = new Set([\n \"baseFrequency\",\n \"diffuseConstant\",\n \"kernelMatrix\",\n \"kernelUnitLength\",\n \"keySplines\",\n \"keyTimes\",\n \"limitingConeAngle\",\n \"markerHeight\",\n \"markerWidth\",\n \"numOctaves\",\n \"targetX\",\n \"targetY\",\n \"surfaceScale\",\n \"specularConstant\",\n \"specularExponent\",\n \"stdDeviation\",\n \"tableValues\",\n \"viewBox\",\n \"gradientTransform\",\n \"pathLength\",\n \"startOffset\",\n \"textLength\",\n \"lengthAdjust\",\n]);\n\nexport { camelCaseAttributes };\n","import { camelToDash } from '../../dom/utils/camel-to-dash.mjs';\nimport { renderHTML } from '../../html/utils/render.mjs';\nimport { camelCaseAttributes } from './camel-case-attrs.mjs';\n\nfunction renderSVG(element, renderState, _styleProp, projection) {\n renderHTML(element, renderState, undefined, projection);\n for (const key in renderState.attrs) {\n element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]);\n }\n}\n\nexport { renderSVG };\n","import { isForcedMotionValue } from '../../../motion/utils/is-forced-motion-value.mjs';\nimport { isMotionValue } from '../../../value/utils/is-motion-value.mjs';\n\nfunction scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n var _a;\n const { style } = props;\n const newValues = {};\n for (const key in style) {\n if (isMotionValue(style[key]) ||\n (prevProps.style &&\n isMotionValue(prevProps.style[key])) ||\n isForcedMotionValue(key, props) ||\n ((_a = visualElement === null || visualElement === void 0 ? void 0 : visualElement.getValue(key)) === null || _a === void 0 ? void 0 : _a.liveStyle) !== undefined) {\n newValues[key] = style[key];\n }\n }\n return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n","import { isMotionValue } from '../../../value/utils/is-motion-value.mjs';\nimport { scrapeMotionValuesFromProps as scrapeMotionValuesFromProps$1 } from '../../html/utils/scrape-motion-values.mjs';\nimport { transformPropOrder } from '../../html/utils/transform.mjs';\n\nfunction scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n const newValues = scrapeMotionValuesFromProps$1(props, prevProps, visualElement);\n for (const key in props) {\n if (isMotionValue(props[key]) ||\n isMotionValue(prevProps[key])) {\n const targetKey = transformPropOrder.indexOf(key) !== -1\n ? \"attr\" + key.charAt(0).toUpperCase() + key.substring(1)\n : key;\n newValues[targetKey] = props[key];\n }\n }\n return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n","function resolveVariantFromProps(props, definition, custom, currentValues = {}, currentVelocity = {}) {\n /**\n * If the variant definition is a function, resolve.\n */\n if (typeof definition === \"function\") {\n definition = definition(custom !== undefined ? custom : props.custom, currentValues, currentVelocity);\n }\n /**\n * If the variant definition is a variant label, or\n * the function returned a variant label, resolve.\n */\n if (typeof definition === \"string\") {\n definition = props.variants && props.variants[definition];\n }\n /**\n * At this point we've resolved both functions and variant labels,\n * but the resolved variant label might itself have been a function.\n * If so, resolve. This can only have returned a valid target object.\n */\n if (typeof definition === \"function\") {\n definition = definition(custom !== undefined ? custom : props.custom, currentValues, currentVelocity);\n }\n return definition;\n}\n\nexport { resolveVariantFromProps };\n","import { useRef } from 'react';\n\n/**\n * Creates a constant value over the lifecycle of a component.\n *\n * Even if `useMemo` is provided an empty array as its final argument, it doesn't offer\n * a guarantee that it won't re-run for performance reasons later on. By using `useConstant`\n * you can ensure that initialisers don't execute twice or more.\n */\nfunction useConstant(init) {\n const ref = useRef(null);\n if (ref.current === null) {\n ref.current = init();\n }\n return ref.current;\n}\n\nexport { useConstant };\n","const isKeyframesTarget = (v) => {\n return Array.isArray(v);\n};\n\nexport { isKeyframesTarget };\n","import { isKeyframesTarget } from '../animation/utils/is-keyframes-target.mjs';\n\nconst isCustomValue = (v) => {\n return Boolean(v && typeof v === \"object\" && v.mix && v.toValue);\n};\nconst resolveFinalValueInKeyframes = (v) => {\n // TODO maybe throw if v.length - 1 is placeholder token?\n return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v;\n};\n\nexport { isCustomValue, resolveFinalValueInKeyframes };\n","import { isCustomValue } from '../../utils/resolve-value.mjs';\nimport { isMotionValue } from './is-motion-value.mjs';\n\n/**\n * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself\n *\n * TODO: Remove and move to library\n */\nfunction resolveMotionValue(value) {\n const unwrappedValue = isMotionValue(value) ? value.get() : value;\n return isCustomValue(unwrappedValue)\n ? unwrappedValue.toValue()\n : unwrappedValue;\n}\n\nexport { resolveMotionValue };\n","import { useContext } from 'react';\nimport { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { resolveVariantFromProps } from '../../render/utils/resolve-variants.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { resolveMotionValue } from '../../value/utils/resolve-motion-value.mjs';\nimport { MotionContext } from '../../context/MotionContext/index.mjs';\nimport { isControllingVariants, isVariantNode } from '../../render/utils/is-controlling-variants.mjs';\n\nfunction makeState({ scrapeMotionValuesFromProps, createRenderState, onMount, }, props, context, presenceContext) {\n const state = {\n latestValues: makeLatestValues(props, context, presenceContext, scrapeMotionValuesFromProps),\n renderState: createRenderState(),\n };\n if (onMount) {\n state.mount = (instance) => onMount(props, instance, state);\n }\n return state;\n}\nconst makeUseVisualState = (config) => (props, isStatic) => {\n const context = useContext(MotionContext);\n const presenceContext = useContext(PresenceContext);\n const make = () => makeState(config, props, context, presenceContext);\n return isStatic ? make() : useConstant(make);\n};\nfunction makeLatestValues(props, context, presenceContext, scrapeMotionValues) {\n const values = {};\n const motionValues = scrapeMotionValues(props, {});\n for (const key in motionValues) {\n values[key] = resolveMotionValue(motionValues[key]);\n }\n let { initial, animate } = props;\n const isControllingVariants$1 = isControllingVariants(props);\n const isVariantNode$1 = isVariantNode(props);\n if (context &&\n isVariantNode$1 &&\n !isControllingVariants$1 &&\n props.inherit !== false) {\n if (initial === undefined)\n initial = context.initial;\n if (animate === undefined)\n animate = context.animate;\n }\n let isInitialAnimationBlocked = presenceContext\n ? presenceContext.initial === false\n : false;\n isInitialAnimationBlocked = isInitialAnimationBlocked || initial === false;\n const variantToSet = isInitialAnimationBlocked ? animate : initial;\n if (variantToSet &&\n typeof variantToSet !== \"boolean\" &&\n !isAnimationControls(variantToSet)) {\n const list = Array.isArray(variantToSet) ? variantToSet : [variantToSet];\n list.forEach((definition) => {\n const resolved = resolveVariantFromProps(props, definition);\n if (!resolved)\n return;\n const { transitionEnd, transition, ...target } = resolved;\n for (const key in target) {\n let valueTarget = target[key];\n if (Array.isArray(valueTarget)) {\n /**\n * Take final keyframe if the initial animation is blocked because\n * we want to initialise at the end of that blocked animation.\n */\n const index = isInitialAnimationBlocked\n ? valueTarget.length - 1\n : 0;\n valueTarget = valueTarget[index];\n }\n if (valueTarget !== null) {\n values[key] = valueTarget;\n }\n }\n for (const key in transitionEnd)\n values[key] = transitionEnd[key];\n });\n }\n return values;\n}\n\nexport { makeUseVisualState };\n","const noop = (any) => any;\n\nexport { noop };\n","import { noop } from '../utils/noop.mjs';\nimport { createRenderBatcher } from './batcher.mjs';\n\nconst { schedule: frame, cancel: cancelFrame, state: frameData, steps, } = createRenderBatcher(typeof requestAnimationFrame !== \"undefined\" ? requestAnimationFrame : noop, true);\n\nexport { cancelFrame, frame, frameData, steps };\n","import { renderSVG } from './utils/render.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { makeUseVisualState } from '../../motion/utils/use-visual-state.mjs';\nimport { createSvgRenderState } from './utils/create-render-state.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\nimport { isSVGTag } from './utils/is-svg-tag.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst svgMotionConfig = {\n useVisualState: makeUseVisualState({\n scrapeMotionValuesFromProps: scrapeMotionValuesFromProps,\n createRenderState: createSvgRenderState,\n onMount: (props, instance, { renderState, latestValues }) => {\n frame.read(() => {\n try {\n renderState.dimensions =\n typeof instance.getBBox ===\n \"function\"\n ? instance.getBBox()\n : instance.getBoundingClientRect();\n }\n catch (e) {\n // Most likely trying to measure an unrendered element under Firefox\n renderState.dimensions = {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n };\n }\n });\n frame.render(() => {\n buildSVGAttrs(renderState, latestValues, { enableHardwareAcceleration: false }, isSVGTag(instance.tagName), props.transformTemplate);\n renderSVG(instance, renderState);\n });\n },\n }),\n};\n\nexport { svgMotionConfig };\n","import { makeUseVisualState } from '../../motion/utils/use-visual-state.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { createHtmlRenderState } from './utils/create-render-state.mjs';\n\nconst htmlMotionConfig = {\n useVisualState: makeUseVisualState({\n scrapeMotionValuesFromProps,\n createRenderState: createHtmlRenderState,\n }),\n};\n\nexport { htmlMotionConfig };\n","function addDomEvent(target, eventName, handler, options = { passive: true }) {\n target.addEventListener(eventName, handler, options);\n return () => target.removeEventListener(eventName, handler);\n}\n\nexport { addDomEvent };\n","const isPrimaryPointer = (event) => {\n if (event.pointerType === \"mouse\") {\n return typeof event.button !== \"number\" || event.button <= 0;\n }\n else {\n /**\n * isPrimary is true for all mice buttons, whereas every touch point\n * is regarded as its own input. So subsequent concurrent touch points\n * will be false.\n *\n * Specifically match against false here as incomplete versions of\n * PointerEvents in very old browser might have it set as undefined.\n */\n return event.isPrimary !== false;\n }\n};\n\nexport { isPrimaryPointer };\n","import { isPrimaryPointer } from './utils/is-primary-pointer.mjs';\n\nfunction extractEventInfo(event, pointType = \"page\") {\n return {\n point: {\n x: event[`${pointType}X`],\n y: event[`${pointType}Y`],\n },\n };\n}\nconst addPointerInfo = (handler) => {\n return (event) => isPrimaryPointer(event) && handler(event, extractEventInfo(event));\n};\n\nexport { addPointerInfo, extractEventInfo };\n","import { addDomEvent } from './add-dom-event.mjs';\nimport { addPointerInfo } from './event-info.mjs';\n\nfunction addPointerEvent(target, eventName, handler, options) {\n return addDomEvent(target, eventName, addPointerInfo(handler), options);\n}\n\nexport { addPointerEvent };\n","/**\n * Pipe\n * Compose other transformers to run linearily\n * pipe(min(20), max(40))\n * @param {...functions} transformers\n * @return {function}\n */\nconst combineFunctions = (a, b) => (v) => b(a(v));\nconst pipe = (...transformers) => transformers.reduce(combineFunctions);\n\nexport { pipe };\n","function createLock(name) {\n let lock = null;\n return () => {\n const openLock = () => {\n lock = null;\n };\n if (lock === null) {\n lock = name;\n return openLock;\n }\n return false;\n };\n}\nconst globalHorizontalLock = createLock(\"dragHorizontal\");\nconst globalVerticalLock = createLock(\"dragVertical\");\nfunction getGlobalLock(drag) {\n let lock = false;\n if (drag === \"y\") {\n lock = globalVerticalLock();\n }\n else if (drag === \"x\") {\n lock = globalHorizontalLock();\n }\n else {\n const openHorizontal = globalHorizontalLock();\n const openVertical = globalVerticalLock();\n if (openHorizontal && openVertical) {\n lock = () => {\n openHorizontal();\n openVertical();\n };\n }\n else {\n // Release the locks because we don't use them\n if (openHorizontal)\n openHorizontal();\n if (openVertical)\n openVertical();\n }\n }\n return lock;\n}\nfunction isDragActive() {\n // Check the gesture lock - if we get it, it means no drag gesture is active\n // and we can safely fire the tap gesture.\n const openGestureLock = getGlobalLock(true);\n if (!openGestureLock)\n return true;\n openGestureLock();\n return false;\n}\n\nexport { createLock, getGlobalLock, isDragActive };\n","class Feature {\n constructor(node) {\n this.isMounted = false;\n this.node = node;\n }\n update() { }\n}\n\nexport { Feature };\n","import { addPointerEvent } from '../events/add-pointer-event.mjs';\nimport { pipe } from '../utils/pipe.mjs';\nimport { isDragActive } from './drag/utils/lock.mjs';\nimport { Feature } from '../motion/features/Feature.mjs';\nimport { frame } from '../frameloop/frame.mjs';\n\nfunction addHoverEvent(node, isActive) {\n const eventName = isActive ? \"pointerenter\" : \"pointerleave\";\n const callbackName = isActive ? \"onHoverStart\" : \"onHoverEnd\";\n const handleEvent = (event, info) => {\n if (event.pointerType === \"touch\" || isDragActive())\n return;\n const props = node.getProps();\n if (node.animationState && props.whileHover) {\n node.animationState.setActive(\"whileHover\", isActive);\n }\n const callback = props[callbackName];\n if (callback) {\n frame.postRender(() => callback(event, info));\n }\n };\n return addPointerEvent(node.current, eventName, handleEvent, {\n passive: !node.getProps()[callbackName],\n });\n}\nclass HoverGesture extends Feature {\n mount() {\n this.unmount = pipe(addHoverEvent(this.node, true), addHoverEvent(this.node, false));\n }\n unmount() { }\n}\n\nexport { HoverGesture };\n","/**\n * Recursively traverse up the tree to check whether the provided child node\n * is the parent or a descendant of it.\n *\n * @param parent - Element to find\n * @param child - Element to test against parent\n */\nconst isNodeOrChild = (parent, child) => {\n if (!child) {\n return false;\n }\n else if (parent === child) {\n return true;\n }\n else {\n return isNodeOrChild(parent, child.parentElement);\n }\n};\n\nexport { isNodeOrChild };\n","import { extractEventInfo } from '../events/event-info.mjs';\nimport { addDomEvent } from '../events/add-dom-event.mjs';\nimport { addPointerEvent } from '../events/add-pointer-event.mjs';\nimport { Feature } from '../motion/features/Feature.mjs';\nimport { pipe } from '../utils/pipe.mjs';\nimport { isDragActive } from './drag/utils/lock.mjs';\nimport { isNodeOrChild } from './utils/is-node-or-child.mjs';\nimport { noop } from '../utils/noop.mjs';\nimport { frame } from '../frameloop/frame.mjs';\n\nfunction fireSyntheticPointerEvent(name, handler) {\n if (!handler)\n return;\n const syntheticPointerEvent = new PointerEvent(\"pointer\" + name);\n handler(syntheticPointerEvent, extractEventInfo(syntheticPointerEvent));\n}\nclass PressGesture extends Feature {\n constructor() {\n super(...arguments);\n this.removeStartListeners = noop;\n this.removeEndListeners = noop;\n this.removeAccessibleListeners = noop;\n this.startPointerPress = (startEvent, startInfo) => {\n if (this.isPressing)\n return;\n this.removeEndListeners();\n const props = this.node.getProps();\n const endPointerPress = (endEvent, endInfo) => {\n if (!this.checkPressEnd())\n return;\n const { onTap, onTapCancel, globalTapTarget } = this.node.getProps();\n /**\n * We only count this as a tap gesture if the event.target is the same\n * as, or a child of, this component's element\n */\n const handler = !globalTapTarget &&\n !isNodeOrChild(this.node.current, endEvent.target)\n ? onTapCancel\n : onTap;\n if (handler) {\n frame.update(() => handler(endEvent, endInfo));\n }\n };\n const removePointerUpListener = addPointerEvent(window, \"pointerup\", endPointerPress, {\n passive: !(props.onTap || props[\"onPointerUp\"]),\n });\n const removePointerCancelListener = addPointerEvent(window, \"pointercancel\", (cancelEvent, cancelInfo) => this.cancelPress(cancelEvent, cancelInfo), {\n passive: !(props.onTapCancel ||\n props[\"onPointerCancel\"]),\n });\n this.removeEndListeners = pipe(removePointerUpListener, removePointerCancelListener);\n this.startPress(startEvent, startInfo);\n };\n this.startAccessiblePress = () => {\n const handleKeydown = (keydownEvent) => {\n if (keydownEvent.key !== \"Enter\" || this.isPressing)\n return;\n const handleKeyup = (keyupEvent) => {\n if (keyupEvent.key !== \"Enter\" || !this.checkPressEnd())\n return;\n fireSyntheticPointerEvent(\"up\", (event, info) => {\n const { onTap } = this.node.getProps();\n if (onTap) {\n frame.postRender(() => onTap(event, info));\n }\n });\n };\n this.removeEndListeners();\n this.removeEndListeners = addDomEvent(this.node.current, \"keyup\", handleKeyup);\n fireSyntheticPointerEvent(\"down\", (event, info) => {\n this.startPress(event, info);\n });\n };\n const removeKeydownListener = addDomEvent(this.node.current, \"keydown\", handleKeydown);\n const handleBlur = () => {\n if (!this.isPressing)\n return;\n fireSyntheticPointerEvent(\"cancel\", (cancelEvent, cancelInfo) => this.cancelPress(cancelEvent, cancelInfo));\n };\n const removeBlurListener = addDomEvent(this.node.current, \"blur\", handleBlur);\n this.removeAccessibleListeners = pipe(removeKeydownListener, removeBlurListener);\n };\n }\n startPress(event, info) {\n this.isPressing = true;\n const { onTapStart, whileTap } = this.node.getProps();\n /**\n * Ensure we trigger animations before firing event callback\n */\n if (whileTap && this.node.animationState) {\n this.node.animationState.setActive(\"whileTap\", true);\n }\n if (onTapStart) {\n frame.postRender(() => onTapStart(event, info));\n }\n }\n checkPressEnd() {\n this.removeEndListeners();\n this.isPressing = false;\n const props = this.node.getProps();\n if (props.whileTap && this.node.animationState) {\n this.node.animationState.setActive(\"whileTap\", false);\n }\n return !isDragActive();\n }\n cancelPress(event, info) {\n if (!this.checkPressEnd())\n return;\n const { onTapCancel } = this.node.getProps();\n if (onTapCancel) {\n frame.postRender(() => onTapCancel(event, info));\n }\n }\n mount() {\n const props = this.node.getProps();\n const removePointerListener = addPointerEvent(props.globalTapTarget ? window : this.node.current, \"pointerdown\", this.startPointerPress, {\n passive: !(props.onTapStart ||\n props[\"onPointerStart\"]),\n });\n const removeFocusListener = addDomEvent(this.node.current, \"focus\", this.startAccessiblePress);\n this.removeStartListeners = pipe(removePointerListener, removeFocusListener);\n }\n unmount() {\n this.removeStartListeners();\n this.removeEndListeners();\n this.removeAccessibleListeners();\n }\n}\n\nexport { PressGesture };\n","/**\n * Map an IntersectionHandler callback to an element. We only ever make one handler for one\n * element, so even though these handlers might all be triggered by different\n * observers, we can keep them in the same map.\n */\nconst observerCallbacks = new WeakMap();\n/**\n * Multiple observers can be created for multiple element/document roots. Each with\n * different settings. So here we store dictionaries of observers to each root,\n * using serialised settings (threshold/margin) as lookup keys.\n */\nconst observers = new WeakMap();\nconst fireObserverCallback = (entry) => {\n const callback = observerCallbacks.get(entry.target);\n callback && callback(entry);\n};\nconst fireAllObserverCallbacks = (entries) => {\n entries.forEach(fireObserverCallback);\n};\nfunction initIntersectionObserver({ root, ...options }) {\n const lookupRoot = root || document;\n /**\n * If we don't have an observer lookup map for this root, create one.\n */\n if (!observers.has(lookupRoot)) {\n observers.set(lookupRoot, {});\n }\n const rootObservers = observers.get(lookupRoot);\n const key = JSON.stringify(options);\n /**\n * If we don't have an observer for this combination of root and settings,\n * create one.\n */\n if (!rootObservers[key]) {\n rootObservers[key] = new IntersectionObserver(fireAllObserverCallbacks, { root, ...options });\n }\n return rootObservers[key];\n}\nfunction observeIntersection(element, options, callback) {\n const rootInteresectionObserver = initIntersectionObserver(options);\n observerCallbacks.set(element, callback);\n rootInteresectionObserver.observe(element);\n return () => {\n observerCallbacks.delete(element);\n rootInteresectionObserver.unobserve(element);\n };\n}\n\nexport { observeIntersection };\n","import { Feature } from '../Feature.mjs';\nimport { observeIntersection } from './observers.mjs';\n\nconst thresholdNames = {\n some: 0,\n all: 1,\n};\nclass InViewFeature extends Feature {\n constructor() {\n super(...arguments);\n this.hasEnteredView = false;\n this.isInView = false;\n }\n startObserver() {\n this.unmount();\n const { viewport = {} } = this.node.getProps();\n const { root, margin: rootMargin, amount = \"some\", once } = viewport;\n const options = {\n root: root ? root.current : undefined,\n rootMargin,\n threshold: typeof amount === \"number\" ? amount : thresholdNames[amount],\n };\n const onIntersectionUpdate = (entry) => {\n const { isIntersecting } = entry;\n /**\n * If there's been no change in the viewport state, early return.\n */\n if (this.isInView === isIntersecting)\n return;\n this.isInView = isIntersecting;\n /**\n * Handle hasEnteredView. If this is only meant to run once, and\n * element isn't visible, early return. Otherwise set hasEnteredView to true.\n */\n if (once && !isIntersecting && this.hasEnteredView) {\n return;\n }\n else if (isIntersecting) {\n this.hasEnteredView = true;\n }\n if (this.node.animationState) {\n this.node.animationState.setActive(\"whileInView\", isIntersecting);\n }\n /**\n * Use the latest committed props rather than the ones in scope\n * when this observer is created\n */\n const { onViewportEnter, onViewportLeave } = this.node.getProps();\n const callback = isIntersecting ? onViewportEnter : onViewportLeave;\n callback && callback(entry);\n };\n return observeIntersection(this.node.current, options, onIntersectionUpdate);\n }\n mount() {\n this.startObserver();\n }\n update() {\n if (typeof IntersectionObserver === \"undefined\")\n return;\n const { props, prevProps } = this.node;\n const hasOptionsChanged = [\"amount\", \"margin\", \"root\"].some(hasViewportOptionChanged(props, prevProps));\n if (hasOptionsChanged) {\n this.startObserver();\n }\n }\n unmount() { }\n}\nfunction hasViewportOptionChanged({ viewport = {} }, { viewport: prevViewport = {} } = {}) {\n return (name) => viewport[name] !== prevViewport[name];\n}\n\nexport { InViewFeature };\n","import { HoverGesture } from '../../gestures/hover.mjs';\nimport { FocusGesture } from '../../gestures/focus.mjs';\nimport { PressGesture } from '../../gestures/press.mjs';\nimport { InViewFeature } from './viewport/index.mjs';\n\nconst gestureAnimations = {\n inView: {\n Feature: InViewFeature,\n },\n tap: {\n Feature: PressGesture,\n },\n focus: {\n Feature: FocusGesture,\n },\n hover: {\n Feature: HoverGesture,\n },\n};\n\nexport { gestureAnimations };\n","import { addDomEvent } from '../events/add-dom-event.mjs';\nimport { Feature } from '../motion/features/Feature.mjs';\nimport { pipe } from '../utils/pipe.mjs';\n\nclass FocusGesture extends Feature {\n constructor() {\n super(...arguments);\n this.isActive = false;\n }\n onFocus() {\n let isFocusVisible = false;\n /**\n * If this element doesn't match focus-visible then don't\n * apply whileHover. But, if matches throws that focus-visible\n * is not a valid selector then in that browser outline styles will be applied\n * to the element by default and we want to match that behaviour with whileFocus.\n */\n try {\n isFocusVisible = this.node.current.matches(\":focus-visible\");\n }\n catch (e) {\n isFocusVisible = true;\n }\n if (!isFocusVisible || !this.node.animationState)\n return;\n this.node.animationState.setActive(\"whileFocus\", true);\n this.isActive = true;\n }\n onBlur() {\n if (!this.isActive || !this.node.animationState)\n return;\n this.node.animationState.setActive(\"whileFocus\", false);\n this.isActive = false;\n }\n mount() {\n this.unmount = pipe(addDomEvent(this.node.current, \"focus\", () => this.onFocus()), addDomEvent(this.node.current, \"blur\", () => this.onBlur()));\n }\n unmount() { }\n}\n\nexport { FocusGesture };\n","function shallowCompare(next, prev) {\n if (!Array.isArray(prev))\n return false;\n const prevLength = prev.length;\n if (prevLength !== next.length)\n return false;\n for (let i = 0; i < prevLength; i++) {\n if (prev[i] !== next[i])\n return false;\n }\n return true;\n}\n\nexport { shallowCompare };\n","import { resolveVariantFromProps } from './resolve-variants.mjs';\n\n/**\n * Creates an object containing the latest state of every MotionValue on a VisualElement\n */\nfunction getCurrent(visualElement) {\n const current = {};\n visualElement.values.forEach((value, key) => (current[key] = value.get()));\n return current;\n}\n/**\n * Creates an object containing the latest velocity of every MotionValue on a VisualElement\n */\nfunction getVelocity(visualElement) {\n const velocity = {};\n visualElement.values.forEach((value, key) => (velocity[key] = value.getVelocity()));\n return velocity;\n}\nfunction resolveVariant(visualElement, definition, custom) {\n const props = visualElement.getProps();\n return resolveVariantFromProps(props, definition, custom !== undefined ? custom : props.custom, getCurrent(visualElement), getVelocity(visualElement));\n}\n\nexport { resolveVariant };\n","/**\n * Converts seconds to milliseconds\n *\n * @param seconds - Time in seconds.\n * @return milliseconds - Converted time in milliseconds.\n */\nconst secondsToMilliseconds = (seconds) => seconds * 1000;\nconst millisecondsToSeconds = (milliseconds) => milliseconds / 1000;\n\nexport { millisecondsToSeconds, secondsToMilliseconds };\n","import { transformProps } from '../../render/html/utils/transform.mjs';\n\nconst underDampedSpring = {\n type: \"spring\",\n stiffness: 500,\n damping: 25,\n restSpeed: 10,\n};\nconst criticallyDampedSpring = (target) => ({\n type: \"spring\",\n stiffness: 550,\n damping: target === 0 ? 2 * Math.sqrt(550) : 30,\n restSpeed: 10,\n});\nconst keyframesTransition = {\n type: \"keyframes\",\n duration: 0.8,\n};\n/**\n * Default easing curve is a slightly shallower version of\n * the default browser easing curve.\n */\nconst ease = {\n type: \"keyframes\",\n ease: [0.25, 0.1, 0.35, 1],\n duration: 0.3,\n};\nconst getDefaultTransition = (valueKey, { keyframes }) => {\n if (keyframes.length > 2) {\n return keyframesTransition;\n }\n else if (transformProps.has(valueKey)) {\n return valueKey.startsWith(\"scale\")\n ? criticallyDampedSpring(keyframes[1])\n : underDampedSpring;\n }\n return ease;\n};\n\nexport { getDefaultTransition };\n","/**\n * Decide whether a transition is defined on a given Transition.\n * This filters out orchestration options and returns true\n * if any options are left.\n */\nfunction isTransitionDefined({ when, delay: _delay, delayChildren, staggerChildren, staggerDirection, repeat, repeatType, repeatDelay, from, elapsed, ...transition }) {\n return !!Object.keys(transition).length;\n}\nfunction getValueTransition(transition, key) {\n return (transition[key] ||\n transition[\"default\"] ||\n transition);\n}\n\nexport { getValueTransition, isTransitionDefined };\n","const instantAnimationState = {\n current: false,\n};\n\nexport { instantAnimationState };\n","const isNotNull = (value) => value !== null;\nfunction getFinalKeyframe(keyframes, { repeat, repeatType = \"loop\" }, finalKeyframe) {\n const resolvedKeyframes = keyframes.filter(isNotNull);\n const index = repeat && repeatType !== \"loop\" && repeat % 2 === 1\n ? 0\n : resolvedKeyframes.length - 1;\n return !index || finalKeyframe === undefined\n ? resolvedKeyframes[index]\n : finalKeyframe;\n}\n\nexport { getFinalKeyframe };\n","import { MotionGlobalConfig } from '../utils/GlobalConfig.mjs';\nimport { frameData } from './frame.mjs';\n\nlet now;\nfunction clearTime() {\n now = undefined;\n}\n/**\n * An eventloop-synchronous alternative to performance.now().\n *\n * Ensures that time measurements remain consistent within a synchronous context.\n * Usually calling performance.now() twice within the same synchronous context\n * will return different values which isn't useful for animations when we're usually\n * trying to sync animations to the same frame.\n */\nconst time = {\n now: () => {\n if (now === undefined) {\n time.set(frameData.isProcessing || MotionGlobalConfig.useManualTiming\n ? frameData.timestamp\n : performance.now());\n }\n return now;\n },\n set: (newTime) => {\n now = newTime;\n queueMicrotask(clearTime);\n },\n};\n\nexport { time };\n","/**\n * Check if the value is a zero value string like \"0px\" or \"0%\"\n */\nconst isZeroValueString = (v) => /^0[^.\\s]+$/u.test(v);\n\nexport { isZeroValueString };\n","import { noop } from './noop.mjs';\n\nlet warning = noop;\nlet invariant = noop;\nif (process.env.NODE_ENV !== \"production\") {\n warning = (check, message) => {\n if (!check && typeof console !== \"undefined\") {\n console.warn(message);\n }\n };\n invariant = (check, message) => {\n if (!check) {\n throw new Error(message);\n }\n };\n}\n\nexport { invariant, warning };\n","/**\n * Check if value is a numerical string, ie a string that is purely a number eg \"100\" or \"-100.1\"\n */\nconst isNumericalString = (v) => /^-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)$/u.test(v);\n\nexport { isNumericalString };\n","import { invariant } from '../../../utils/errors.mjs';\nimport { isNumericalString } from '../../../utils/is-numerical-string.mjs';\nimport { isCSSVariableToken } from './is-css-variable.mjs';\n\n/**\n * Parse Framer's special CSS variable format into a CSS token and a fallback.\n *\n * ```\n * `var(--foo, #fff)` => [`--foo`, '#fff']\n * ```\n *\n * @param current\n */\nconst splitCSSVariableRegex = \n// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words\n/^var\\(--(?:([\\w-]+)|([\\w-]+), ?([a-zA-Z\\d ()%#.,-]+))\\)/u;\nfunction parseCSSVariable(current) {\n const match = splitCSSVariableRegex.exec(current);\n if (!match)\n return [,];\n const [, token1, token2, fallback] = match;\n return [`--${token1 !== null && token1 !== void 0 ? token1 : token2}`, fallback];\n}\nconst maxDepth = 4;\nfunction getVariableValue(current, element, depth = 1) {\n invariant(depth <= maxDepth, `Max CSS variable fallback depth detected in property \"${current}\". This may indicate a circular fallback dependency.`);\n const [token, fallback] = parseCSSVariable(current);\n // No CSS variable detected\n if (!token)\n return;\n // Attempt to read this CSS variable off the element\n const resolved = window.getComputedStyle(element).getPropertyValue(token);\n if (resolved) {\n const trimmed = resolved.trim();\n return isNumericalString(trimmed) ? parseFloat(trimmed) : trimmed;\n }\n return isCSSVariableToken(fallback)\n ? getVariableValue(fallback, element, depth + 1)\n : fallback;\n}\n\nexport { getVariableValue, parseCSSVariable };\n","import { transformPropOrder } from '../../html/utils/transform.mjs';\nimport { number } from '../../../value/types/numbers/index.mjs';\nimport { px } from '../../../value/types/numbers/units.mjs';\n\nconst positionalKeys = new Set([\n \"width\",\n \"height\",\n \"top\",\n \"left\",\n \"right\",\n \"bottom\",\n \"x\",\n \"y\",\n \"translateX\",\n \"translateY\",\n]);\nconst isNumOrPxType = (v) => v === number || v === px;\nconst getPosFromMatrix = (matrix, pos) => parseFloat(matrix.split(\", \")[pos]);\nconst getTranslateFromMatrix = (pos2, pos3) => (_bbox, { transform }) => {\n if (transform === \"none\" || !transform)\n return 0;\n const matrix3d = transform.match(/^matrix3d\\((.+)\\)$/u);\n if (matrix3d) {\n return getPosFromMatrix(matrix3d[1], pos3);\n }\n else {\n const matrix = transform.match(/^matrix\\((.+)\\)$/u);\n if (matrix) {\n return getPosFromMatrix(matrix[1], pos2);\n }\n else {\n return 0;\n }\n }\n};\nconst transformKeys = new Set([\"x\", \"y\", \"z\"]);\nconst nonTranslationalTransformKeys = transformPropOrder.filter((key) => !transformKeys.has(key));\nfunction removeNonTranslationalTransform(visualElement) {\n const removedTransforms = [];\n nonTranslationalTransformKeys.forEach((key) => {\n const value = visualElement.getValue(key);\n if (value !== undefined) {\n removedTransforms.push([key, value.get()]);\n value.set(key.startsWith(\"scale\") ? 1 : 0);\n }\n });\n return removedTransforms;\n}\nconst positionalValues = {\n // Dimensions\n width: ({ x }, { paddingLeft = \"0\", paddingRight = \"0\" }) => x.max - x.min - parseFloat(paddingLeft) - parseFloat(paddingRight),\n height: ({ y }, { paddingTop = \"0\", paddingBottom = \"0\" }) => y.max - y.min - parseFloat(paddingTop) - parseFloat(paddingBottom),\n top: (_bbox, { top }) => parseFloat(top),\n left: (_bbox, { left }) => parseFloat(left),\n bottom: ({ y }, { top }) => parseFloat(top) + (y.max - y.min),\n right: ({ x }, { left }) => parseFloat(left) + (x.max - x.min),\n // Transform\n x: getTranslateFromMatrix(4, 13),\n y: getTranslateFromMatrix(5, 14),\n};\n// Alias translate longform names\npositionalValues.translateX = positionalValues.x;\npositionalValues.translateY = positionalValues.y;\n\nexport { isNumOrPxType, positionalKeys, positionalValues, removeNonTranslationalTransform };\n","/**\n * Tests a provided value against a ValueType\n */\nconst testValueType = (v) => (type) => type.test(v);\n\nexport { testValueType };\n","import { number } from '../../../value/types/numbers/index.mjs';\nimport { px, percent, degrees, vw, vh } from '../../../value/types/numbers/units.mjs';\nimport { testValueType } from './test.mjs';\nimport { auto } from './type-auto.mjs';\n\n/**\n * A list of value types commonly used for dimensions\n */\nconst dimensionValueTypes = [number, px, percent, degrees, vw, vh, auto];\n/**\n * Tests a dimensional value against the list of dimension ValueTypes\n */\nconst findDimensionValueType = (v) => dimensionValueTypes.find(testValueType(v));\n\nexport { dimensionValueTypes, findDimensionValueType };\n","/**\n * ValueType for \"auto\"\n */\nconst auto = {\n test: (v) => v === \"auto\",\n parse: (v) => v,\n};\n\nexport { auto };\n","import { removeNonTranslationalTransform } from '../dom/utils/unit-conversion.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst toResolve = new Set();\nlet isScheduled = false;\nlet anyNeedsMeasurement = false;\nfunction measureAllKeyframes() {\n if (anyNeedsMeasurement) {\n const resolversToMeasure = Array.from(toResolve).filter((resolver) => resolver.needsMeasurement);\n const elementsToMeasure = new Set(resolversToMeasure.map((resolver) => resolver.element));\n const transformsToRestore = new Map();\n /**\n * Write pass\n * If we're measuring elements we want to remove bounding box-changing transforms.\n */\n elementsToMeasure.forEach((element) => {\n const removedTransforms = removeNonTranslationalTransform(element);\n if (!removedTransforms.length)\n return;\n transformsToRestore.set(element, removedTransforms);\n element.render();\n });\n // Read\n resolversToMeasure.forEach((resolver) => resolver.measureInitialState());\n // Write\n elementsToMeasure.forEach((element) => {\n element.render();\n const restore = transformsToRestore.get(element);\n if (restore) {\n restore.forEach(([key, value]) => {\n var _a;\n (_a = element.getValue(key)) === null || _a === void 0 ? void 0 : _a.set(value);\n });\n }\n });\n // Read\n resolversToMeasure.forEach((resolver) => resolver.measureEndState());\n // Write\n resolversToMeasure.forEach((resolver) => {\n if (resolver.suspendedScrollY !== undefined) {\n window.scrollTo(0, resolver.suspendedScrollY);\n }\n });\n }\n anyNeedsMeasurement = false;\n isScheduled = false;\n toResolve.forEach((resolver) => resolver.complete());\n toResolve.clear();\n}\nfunction readAllKeyframes() {\n toResolve.forEach((resolver) => {\n resolver.readKeyframes();\n if (resolver.needsMeasurement) {\n anyNeedsMeasurement = true;\n }\n });\n}\nfunction flushKeyframeResolvers() {\n readAllKeyframes();\n measureAllKeyframes();\n}\nclass KeyframeResolver {\n constructor(unresolvedKeyframes, onComplete, name, motionValue, element, isAsync = false) {\n /**\n * Track whether this resolver has completed. Once complete, it never\n * needs to attempt keyframe resolution again.\n */\n this.isComplete = false;\n /**\n * Track whether this resolver is async. If it is, it'll be added to the\n * resolver queue and flushed in the next frame. Resolvers that aren't going\n * to trigger read/write thrashing don't need to be async.\n */\n this.isAsync = false;\n /**\n * Track whether this resolver needs to perform a measurement\n * to resolve its keyframes.\n */\n this.needsMeasurement = false;\n /**\n * Track whether this resolver is currently scheduled to resolve\n * to allow it to be cancelled and resumed externally.\n */\n this.isScheduled = false;\n this.unresolvedKeyframes = [...unresolvedKeyframes];\n this.onComplete = onComplete;\n this.name = name;\n this.motionValue = motionValue;\n this.element = element;\n this.isAsync = isAsync;\n }\n scheduleResolve() {\n this.isScheduled = true;\n if (this.isAsync) {\n toResolve.add(this);\n if (!isScheduled) {\n isScheduled = true;\n frame.read(readAllKeyframes);\n frame.resolveKeyframes(measureAllKeyframes);\n }\n }\n else {\n this.readKeyframes();\n this.complete();\n }\n }\n readKeyframes() {\n const { unresolvedKeyframes, name, element, motionValue } = this;\n /**\n * If a keyframe is null, we hydrate it either by reading it from\n * the instance, or propagating from previous keyframes.\n */\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n if (unresolvedKeyframes[i] === null) {\n /**\n * If the first keyframe is null, we need to find its value by sampling the element\n */\n if (i === 0) {\n const currentValue = motionValue === null || motionValue === void 0 ? void 0 : motionValue.get();\n const finalKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];\n if (currentValue !== undefined) {\n unresolvedKeyframes[0] = currentValue;\n }\n else if (element && name) {\n const valueAsRead = element.readValue(name, finalKeyframe);\n if (valueAsRead !== undefined && valueAsRead !== null) {\n unresolvedKeyframes[0] = valueAsRead;\n }\n }\n if (unresolvedKeyframes[0] === undefined) {\n unresolvedKeyframes[0] = finalKeyframe;\n }\n if (motionValue && currentValue === undefined) {\n motionValue.set(unresolvedKeyframes[0]);\n }\n }\n else {\n unresolvedKeyframes[i] = unresolvedKeyframes[i - 1];\n }\n }\n }\n }\n setFinalKeyframe() { }\n measureInitialState() { }\n renderEndStyles() { }\n measureEndState() { }\n complete() {\n this.isComplete = true;\n this.onComplete(this.unresolvedKeyframes, this.finalKeyframe);\n toResolve.delete(this);\n }\n cancel() {\n if (!this.isComplete) {\n this.isScheduled = false;\n toResolve.delete(this);\n }\n }\n resume() {\n if (!this.isComplete)\n this.scheduleResolve();\n }\n}\n\nexport { KeyframeResolver, flushKeyframeResolvers };\n","import { isString, singleColorRegex, floatRegex } from '../utils.mjs';\n\n/**\n * Returns true if the provided string is a color, ie rgba(0,0,0,0) or #000,\n * but false if a number or multiple colors\n */\nconst isColorString = (type, testProp) => (v) => {\n return Boolean((isString(v) && singleColorRegex.test(v) && v.startsWith(type)) ||\n (testProp && Object.prototype.hasOwnProperty.call(v, testProp)));\n};\nconst splitColor = (aName, bName, cName) => (v) => {\n if (!isString(v))\n return v;\n const [a, b, c, alpha] = v.match(floatRegex);\n return {\n [aName]: parseFloat(a),\n [bName]: parseFloat(b),\n [cName]: parseFloat(c),\n alpha: alpha !== undefined ? parseFloat(alpha) : 1,\n };\n};\n\nexport { isColorString, splitColor };\n","import { clamp } from '../../../utils/clamp.mjs';\nimport { number, alpha } from '../numbers/index.mjs';\nimport { sanitize } from '../utils.mjs';\nimport { isColorString, splitColor } from './utils.mjs';\n\nconst clampRgbUnit = (v) => clamp(0, 255, v);\nconst rgbUnit = {\n ...number,\n transform: (v) => Math.round(clampRgbUnit(v)),\n};\nconst rgba = {\n test: isColorString(\"rgb\", \"red\"),\n parse: splitColor(\"red\", \"green\", \"blue\"),\n transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => \"rgba(\" +\n rgbUnit.transform(red) +\n \", \" +\n rgbUnit.transform(green) +\n \", \" +\n rgbUnit.transform(blue) +\n \", \" +\n sanitize(alpha.transform(alpha$1)) +\n \")\",\n};\n\nexport { rgbUnit, rgba };\n","import { rgba } from './rgba.mjs';\nimport { isColorString } from './utils.mjs';\n\nfunction parseHex(v) {\n let r = \"\";\n let g = \"\";\n let b = \"\";\n let a = \"\";\n // If we have 6 characters, ie #FF0000\n if (v.length > 5) {\n r = v.substring(1, 3);\n g = v.substring(3, 5);\n b = v.substring(5, 7);\n a = v.substring(7, 9);\n // Or we have 3 characters, ie #F00\n }\n else {\n r = v.substring(1, 2);\n g = v.substring(2, 3);\n b = v.substring(3, 4);\n a = v.substring(4, 5);\n r += r;\n g += g;\n b += b;\n a += a;\n }\n return {\n red: parseInt(r, 16),\n green: parseInt(g, 16),\n blue: parseInt(b, 16),\n alpha: a ? parseInt(a, 16) / 255 : 1,\n };\n}\nconst hex = {\n test: isColorString(\"#\"),\n parse: parseHex,\n transform: rgba.transform,\n};\n\nexport { hex };\n","import { alpha } from '../numbers/index.mjs';\nimport { percent } from '../numbers/units.mjs';\nimport { sanitize } from '../utils.mjs';\nimport { isColorString, splitColor } from './utils.mjs';\n\nconst hsla = {\n test: isColorString(\"hsl\", \"hue\"),\n parse: splitColor(\"hue\", \"saturation\", \"lightness\"),\n transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => {\n return (\"hsla(\" +\n Math.round(hue) +\n \", \" +\n percent.transform(sanitize(saturation)) +\n \", \" +\n percent.transform(sanitize(lightness)) +\n \", \" +\n sanitize(alpha.transform(alpha$1)) +\n \")\");\n },\n};\n\nexport { hsla };\n","import { isString } from '../utils.mjs';\nimport { hex } from './hex.mjs';\nimport { hsla } from './hsla.mjs';\nimport { rgba } from './rgba.mjs';\n\nconst color = {\n test: (v) => rgba.test(v) || hex.test(v) || hsla.test(v),\n parse: (v) => {\n if (rgba.test(v)) {\n return rgba.parse(v);\n }\n else if (hsla.test(v)) {\n return hsla.parse(v);\n }\n else {\n return hex.parse(v);\n }\n },\n transform: (v) => {\n return isString(v)\n ? v\n : v.hasOwnProperty(\"red\")\n ? rgba.transform(v)\n : hsla.transform(v);\n },\n};\n\nexport { color };\n","import { color } from '../color/index.mjs';\nimport { isString, floatRegex, colorRegex, sanitize } from '../utils.mjs';\n\nfunction test(v) {\n var _a, _b;\n return (isNaN(v) &&\n isString(v) &&\n (((_a = v.match(floatRegex)) === null || _a === void 0 ? void 0 : _a.length) || 0) +\n (((_b = v.match(colorRegex)) === null || _b === void 0 ? void 0 : _b.length) || 0) >\n 0);\n}\nconst NUMBER_TOKEN = \"number\";\nconst COLOR_TOKEN = \"color\";\nconst VAR_TOKEN = \"var\";\nconst VAR_FUNCTION_TOKEN = \"var(\";\nconst SPLIT_TOKEN = \"${}\";\n// this regex consists of the `singleCssVariableRegex|rgbHSLValueRegex|digitRegex`\nconst complexRegex = /var\\s*\\(\\s*--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)|#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\)|-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/giu;\nfunction analyseComplexValue(value) {\n const originalValue = value.toString();\n const values = [];\n const indexes = {\n color: [],\n number: [],\n var: [],\n };\n const types = [];\n let i = 0;\n const tokenised = originalValue.replace(complexRegex, (parsedValue) => {\n if (color.test(parsedValue)) {\n indexes.color.push(i);\n types.push(COLOR_TOKEN);\n values.push(color.parse(parsedValue));\n }\n else if (parsedValue.startsWith(VAR_FUNCTION_TOKEN)) {\n indexes.var.push(i);\n types.push(VAR_TOKEN);\n values.push(parsedValue);\n }\n else {\n indexes.number.push(i);\n types.push(NUMBER_TOKEN);\n values.push(parseFloat(parsedValue));\n }\n ++i;\n return SPLIT_TOKEN;\n });\n const split = tokenised.split(SPLIT_TOKEN);\n return { values, split, indexes, types };\n}\nfunction parseComplexValue(v) {\n return analyseComplexValue(v).values;\n}\nfunction createTransformer(source) {\n const { split, types } = analyseComplexValue(source);\n const numSections = split.length;\n return (v) => {\n let output = \"\";\n for (let i = 0; i < numSections; i++) {\n output += split[i];\n if (v[i] !== undefined) {\n const type = types[i];\n if (type === NUMBER_TOKEN) {\n output += sanitize(v[i]);\n }\n else if (type === COLOR_TOKEN) {\n output += color.transform(v[i]);\n }\n else {\n output += v[i];\n }\n }\n }\n return output;\n };\n}\nconst convertNumbersToZero = (v) => typeof v === \"number\" ? 0 : v;\nfunction getAnimatableNone(v) {\n const parsed = parseComplexValue(v);\n const transformer = createTransformer(v);\n return transformer(parsed.map(convertNumbersToZero));\n}\nconst complex = {\n test,\n parse: parseComplexValue,\n createTransformer,\n getAnimatableNone,\n};\n\nexport { analyseComplexValue, complex };\n","import { complex } from './index.mjs';\nimport { floatRegex } from '../utils.mjs';\n\n/**\n * Properties that should default to 1 or 100%\n */\nconst maxDefaults = new Set([\"brightness\", \"contrast\", \"saturate\", \"opacity\"]);\nfunction applyDefaultFilter(v) {\n const [name, value] = v.slice(0, -1).split(\"(\");\n if (name === \"drop-shadow\")\n return v;\n const [number] = value.match(floatRegex) || [];\n if (!number)\n return v;\n const unit = value.replace(number, \"\");\n let defaultValue = maxDefaults.has(name) ? 1 : 0;\n if (number !== value)\n defaultValue *= 100;\n return name + \"(\" + defaultValue + unit + \")\";\n}\nconst functionRegex = /\\b([a-z-]*)\\(.*?\\)/gu;\nconst filter = {\n ...complex,\n getAnimatableNone: (v) => {\n const functions = v.match(functionRegex);\n return functions ? functions.map(applyDefaultFilter).join(\" \") : v;\n },\n};\n\nexport { filter };\n","import { color } from '../../../value/types/color/index.mjs';\nimport { filter } from '../../../value/types/complex/filter.mjs';\nimport { numberValueTypes } from './number.mjs';\n\n/**\n * A map of default value types for common values\n */\nconst defaultValueTypes = {\n ...numberValueTypes,\n // Color props\n color,\n backgroundColor: color,\n outlineColor: color,\n fill: color,\n stroke: color,\n // Border props\n borderColor: color,\n borderTopColor: color,\n borderRightColor: color,\n borderBottomColor: color,\n borderLeftColor: color,\n filter,\n WebkitFilter: filter,\n};\n/**\n * Gets the default ValueType for the provided value key\n */\nconst getDefaultValueType = (key) => defaultValueTypes[key];\n\nexport { defaultValueTypes, getDefaultValueType };\n","import { complex } from '../../../value/types/complex/index.mjs';\nimport { filter } from '../../../value/types/complex/filter.mjs';\nimport { getDefaultValueType } from './defaults.mjs';\n\nfunction getAnimatableNone(key, value) {\n let defaultValueType = getDefaultValueType(key);\n if (defaultValueType !== filter)\n defaultValueType = complex;\n // If value is not recognised as animatable, ie \"none\", create an animatable version origin based on the target\n return defaultValueType.getAnimatableNone\n ? defaultValueType.getAnimatableNone(value)\n : undefined;\n}\n\nexport { getAnimatableNone };\n","import { getAnimatableNone } from '../../dom/value-types/animatable-none.mjs';\n\n/**\n * If we encounter keyframes like \"none\" or \"0\" and we also have keyframes like\n * \"#fff\" or \"200px 200px\" we want to find a keyframe to serve as a template for\n * the \"none\" keyframes. In this case \"#fff\" or \"200px 200px\" - then these get turned into\n * zero equivalents, i.e. \"#fff0\" or \"0px 0px\".\n */\nconst invalidTemplates = new Set([\"auto\", \"none\", \"0\"]);\nfunction makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name) {\n let i = 0;\n let animatableTemplate = undefined;\n while (i < unresolvedKeyframes.length && !animatableTemplate) {\n const keyframe = unresolvedKeyframes[i];\n if (typeof keyframe === \"string\" && !invalidTemplates.has(keyframe)) {\n animatableTemplate = unresolvedKeyframes[i];\n }\n i++;\n }\n if (animatableTemplate && name) {\n for (const noneIndex of noneKeyframeIndexes) {\n unresolvedKeyframes[noneIndex] = getAnimatableNone(name, animatableTemplate);\n }\n }\n}\n\nexport { makeNoneKeyframesAnimatable };\n","import { isNone } from '../../animation/utils/is-none.mjs';\nimport { getVariableValue } from './utils/css-variables-conversion.mjs';\nimport { isCSSVariableToken } from './utils/is-css-variable.mjs';\nimport { positionalKeys, isNumOrPxType, positionalValues } from './utils/unit-conversion.mjs';\nimport { findDimensionValueType } from './value-types/dimensions.mjs';\nimport { KeyframeResolver } from '../utils/KeyframesResolver.mjs';\nimport { makeNoneKeyframesAnimatable } from '../html/utils/make-none-animatable.mjs';\n\nclass DOMKeyframesResolver extends KeyframeResolver {\n constructor(unresolvedKeyframes, onComplete, name, motionValue) {\n super(unresolvedKeyframes, onComplete, name, motionValue, motionValue === null || motionValue === void 0 ? void 0 : motionValue.owner, true);\n }\n readKeyframes() {\n const { unresolvedKeyframes, element, name } = this;\n if (!element.current)\n return;\n super.readKeyframes();\n /**\n * If any keyframe is a CSS variable, we need to find its value by sampling the element\n */\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n const keyframe = unresolvedKeyframes[i];\n if (typeof keyframe === \"string\" && isCSSVariableToken(keyframe)) {\n const resolved = getVariableValue(keyframe, element.current);\n if (resolved !== undefined) {\n unresolvedKeyframes[i] = resolved;\n }\n if (i === unresolvedKeyframes.length - 1) {\n this.finalKeyframe = keyframe;\n }\n }\n }\n /**\n * Resolve \"none\" values. We do this potentially twice - once before and once after measuring keyframes.\n * This could be seen as inefficient but it's a trade-off to avoid measurements in more situations, which\n * have a far bigger performance impact.\n */\n this.resolveNoneKeyframes();\n /**\n * Check to see if unit type has changed. If so schedule jobs that will\n * temporarily set styles to the destination keyframes.\n * Skip if we have more than two keyframes or this isn't a positional value.\n * TODO: We can throw if there are multiple keyframes and the value type changes.\n */\n if (!positionalKeys.has(name) || unresolvedKeyframes.length !== 2) {\n return;\n }\n const [origin, target] = unresolvedKeyframes;\n const originType = findDimensionValueType(origin);\n const targetType = findDimensionValueType(target);\n /**\n * Either we don't recognise these value types or we can animate between them.\n */\n if (originType === targetType)\n return;\n /**\n * If both values are numbers or pixels, we can animate between them by\n * converting them to numbers.\n */\n if (isNumOrPxType(originType) && isNumOrPxType(targetType)) {\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n const value = unresolvedKeyframes[i];\n if (typeof value === \"string\") {\n unresolvedKeyframes[i] = parseFloat(value);\n }\n }\n }\n else {\n /**\n * Else, the only way to resolve this is by measuring the element.\n */\n this.needsMeasurement = true;\n }\n }\n resolveNoneKeyframes() {\n const { unresolvedKeyframes, name } = this;\n const noneKeyframeIndexes = [];\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n if (isNone(unresolvedKeyframes[i])) {\n noneKeyframeIndexes.push(i);\n }\n }\n if (noneKeyframeIndexes.length) {\n makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name);\n }\n }\n measureInitialState() {\n const { element, unresolvedKeyframes, name } = this;\n if (!element.current)\n return;\n if (name === \"height\") {\n this.suspendedScrollY = window.pageYOffset;\n }\n this.measuredOrigin = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current));\n unresolvedKeyframes[0] = this.measuredOrigin;\n // Set final key frame to measure after next render\n const measureKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];\n if (measureKeyframe !== undefined) {\n element.getValue(name, measureKeyframe).jump(measureKeyframe, false);\n }\n }\n measureEndState() {\n var _a;\n const { element, name, unresolvedKeyframes } = this;\n if (!element.current)\n return;\n const value = element.getValue(name);\n value && value.jump(this.measuredOrigin, false);\n const finalKeyframeIndex = unresolvedKeyframes.length - 1;\n const finalKeyframe = unresolvedKeyframes[finalKeyframeIndex];\n unresolvedKeyframes[finalKeyframeIndex] = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current));\n if (finalKeyframe !== null && this.finalKeyframe === undefined) {\n this.finalKeyframe = finalKeyframe;\n }\n // If we removed transform values, reapply them before the next render\n if ((_a = this.removedTransforms) === null || _a === void 0 ? void 0 : _a.length) {\n this.removedTransforms.forEach(([unsetTransformName, unsetTransformValue]) => {\n element\n .getValue(unsetTransformName)\n .set(unsetTransformValue);\n });\n }\n this.resolveNoneKeyframes();\n }\n}\n\nexport { DOMKeyframesResolver };\n","import { isZeroValueString } from '../../utils/is-zero-value-string.mjs';\n\nfunction isNone(value) {\n if (typeof value === \"number\") {\n return value === 0;\n }\n else if (value !== null) {\n return value === \"none\" || value === \"0\" || isZeroValueString(value);\n }\n else {\n return true;\n }\n}\n\nexport { isNone };\n","import { complex } from '../../value/types/complex/index.mjs';\n\n/**\n * Check if a value is animatable. Examples:\n *\n * ✅: 100, \"100px\", \"#fff\"\n * âŒ: \"block\", \"url(2.jpg)\"\n * @param value\n *\n * @internal\n */\nconst isAnimatable = (value, name) => {\n // If the list of keys tat might be non-animatable grows, replace with Set\n if (name === \"zIndex\")\n return false;\n // If it's a number or a keyframes array, we can animate it. We might at some point\n // need to do a deep isAnimatable check of keyframes, or let Popmotion handle this,\n // but for now lets leave it like this for performance reasons\n if (typeof value === \"number\" || Array.isArray(value))\n return true;\n if (typeof value === \"string\" && // It's animatable if we have a string\n (complex.test(value) || value === \"0\") && // And it contains numbers and/or colors\n !value.startsWith(\"url(\") // Unless it starts with \"url(\"\n ) {\n return true;\n }\n return false;\n};\n\nexport { isAnimatable };\n","import { flushKeyframeResolvers } from '../../render/utils/KeyframesResolver.mjs';\nimport { instantAnimationState } from '../../utils/use-instant-transition-state.mjs';\nimport { canAnimate } from './utils/can-animate.mjs';\nimport { getFinalKeyframe } from './waapi/utils/get-final-keyframe.mjs';\n\nclass BaseAnimation {\n constructor({ autoplay = true, delay = 0, type = \"keyframes\", repeat = 0, repeatDelay = 0, repeatType = \"loop\", ...options }) {\n // Track whether the animation has been stopped. Stopped animations won't restart.\n this.isStopped = false;\n this.hasAttemptedResolve = false;\n this.options = {\n autoplay,\n delay,\n type,\n repeat,\n repeatDelay,\n repeatType,\n ...options,\n };\n this.updateFinishedPromise();\n }\n /**\n * A getter for resolved data. If keyframes are not yet resolved, accessing\n * this.resolved will synchronously flush all pending keyframe resolvers.\n * This is a deoptimisation, but at its worst still batches read/writes.\n */\n get resolved() {\n if (!this._resolved && !this.hasAttemptedResolve) {\n flushKeyframeResolvers();\n }\n return this._resolved;\n }\n /**\n * A method to be called when the keyframes resolver completes. This method\n * will check if its possible to run the animation and, if not, skip it.\n * Otherwise, it will call initPlayback on the implementing class.\n */\n onKeyframesResolved(keyframes, finalKeyframe) {\n this.hasAttemptedResolve = true;\n const { name, type, velocity, delay, onComplete, onUpdate, isGenerator, } = this.options;\n /**\n * If we can't animate this value with the resolved keyframes\n * then we should complete it immediately.\n */\n if (!isGenerator && !canAnimate(keyframes, name, type, velocity)) {\n // Finish immediately\n if (instantAnimationState.current || !delay) {\n onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(getFinalKeyframe(keyframes, this.options, finalKeyframe));\n onComplete === null || onComplete === void 0 ? void 0 : onComplete();\n this.resolveFinishedPromise();\n return;\n }\n // Finish after a delay\n else {\n this.options.duration = 0;\n }\n }\n const resolvedAnimation = this.initPlayback(keyframes, finalKeyframe);\n if (resolvedAnimation === false)\n return;\n this._resolved = {\n keyframes,\n finalKeyframe,\n ...resolvedAnimation,\n };\n this.onPostResolved();\n }\n onPostResolved() { }\n /**\n * Allows the returned animation to be awaited or promise-chained. Currently\n * resolves when the animation finishes at all but in a future update could/should\n * reject if its cancels.\n */\n then(resolve, reject) {\n return this.currentFinishedPromise.then(resolve, reject);\n }\n updateFinishedPromise() {\n this.currentFinishedPromise = new Promise((resolve) => {\n this.resolveFinishedPromise = resolve;\n });\n }\n}\n\nexport { BaseAnimation };\n","import { warning } from '../../../utils/errors.mjs';\nimport { isAnimatable } from '../../utils/is-animatable.mjs';\n\nfunction hasKeyframesChanged(keyframes) {\n const current = keyframes[0];\n if (keyframes.length === 1)\n return true;\n for (let i = 0; i < keyframes.length; i++) {\n if (keyframes[i] !== current)\n return true;\n }\n}\nfunction canAnimate(keyframes, name, type, velocity) {\n /**\n * Check if we're able to animate between the start and end keyframes,\n * and throw a warning if we're attempting to animate between one that's\n * animatable and another that isn't.\n */\n const originKeyframe = keyframes[0];\n if (originKeyframe === null)\n return false;\n const targetKeyframe = keyframes[keyframes.length - 1];\n const isOriginAnimatable = isAnimatable(originKeyframe, name);\n const isTargetAnimatable = isAnimatable(targetKeyframe, name);\n warning(isOriginAnimatable === isTargetAnimatable, `You are trying to animate ${name} from \"${originKeyframe}\" to \"${targetKeyframe}\". ${originKeyframe} is not an animatable value - to enable this animation set ${originKeyframe} to a value animatable to ${targetKeyframe} via the \\`style\\` property.`);\n // Always skip if any of these are true\n if (!isOriginAnimatable || !isTargetAnimatable) {\n return false;\n }\n return hasKeyframesChanged(keyframes) || (type === \"spring\" && velocity);\n}\n\nexport { canAnimate };\n","/*\n Convert velocity into velocity per second\n\n @param [number]: Unit per frame\n @param [number]: Frame duration in ms\n*/\nfunction velocityPerSecond(velocity, frameDuration) {\n return frameDuration ? velocity * (1000 / frameDuration) : 0;\n}\n\nexport { velocityPerSecond };\n","import { velocityPerSecond } from '../../../utils/velocity-per-second.mjs';\n\nconst velocitySampleDuration = 5; // ms\nfunction calcGeneratorVelocity(resolveValue, t, current) {\n const prevT = Math.max(t - velocitySampleDuration, 0);\n return velocityPerSecond(current - resolveValue(prevT), t - prevT);\n}\n\nexport { calcGeneratorVelocity };\n","import { warning } from '../../../utils/errors.mjs';\nimport { clamp } from '../../../utils/clamp.mjs';\nimport { secondsToMilliseconds, millisecondsToSeconds } from '../../../utils/time-conversion.mjs';\n\nconst safeMin = 0.001;\nconst minDuration = 0.01;\nconst maxDuration = 10.0;\nconst minDamping = 0.05;\nconst maxDamping = 1;\nfunction findSpring({ duration = 800, bounce = 0.25, velocity = 0, mass = 1, }) {\n let envelope;\n let derivative;\n warning(duration <= secondsToMilliseconds(maxDuration), \"Spring duration must be 10 seconds or less\");\n let dampingRatio = 1 - bounce;\n /**\n * Restrict dampingRatio and duration to within acceptable ranges.\n */\n dampingRatio = clamp(minDamping, maxDamping, dampingRatio);\n duration = clamp(minDuration, maxDuration, millisecondsToSeconds(duration));\n if (dampingRatio < 1) {\n /**\n * Underdamped spring\n */\n envelope = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const a = exponentialDecay - velocity;\n const b = calcAngularFreq(undampedFreq, dampingRatio);\n const c = Math.exp(-delta);\n return safeMin - (a / b) * c;\n };\n derivative = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const d = delta * velocity + velocity;\n const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration;\n const f = Math.exp(-delta);\n const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio);\n const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1;\n return (factor * ((d - e) * f)) / g;\n };\n }\n else {\n /**\n * Critically-damped spring\n */\n envelope = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (undampedFreq - velocity) * duration + 1;\n return -safeMin + a * b;\n };\n derivative = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (velocity - undampedFreq) * (duration * duration);\n return a * b;\n };\n }\n const initialGuess = 5 / duration;\n const undampedFreq = approximateRoot(envelope, derivative, initialGuess);\n duration = secondsToMilliseconds(duration);\n if (isNaN(undampedFreq)) {\n return {\n stiffness: 100,\n damping: 10,\n duration,\n };\n }\n else {\n const stiffness = Math.pow(undampedFreq, 2) * mass;\n return {\n stiffness,\n damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),\n duration,\n };\n }\n}\nconst rootIterations = 12;\nfunction approximateRoot(envelope, derivative, initialGuess) {\n let result = initialGuess;\n for (let i = 1; i < rootIterations; i++) {\n result = result - envelope(result) / derivative(result);\n }\n return result;\n}\nfunction calcAngularFreq(undampedFreq, dampingRatio) {\n return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);\n}\n\nexport { calcAngularFreq, findSpring, maxDamping, maxDuration, minDamping, minDuration };\n","import { millisecondsToSeconds } from '../../../utils/time-conversion.mjs';\nimport { calcGeneratorVelocity } from '../utils/velocity.mjs';\nimport { findSpring, calcAngularFreq } from './find.mjs';\n\nconst durationKeys = [\"duration\", \"bounce\"];\nconst physicsKeys = [\"stiffness\", \"damping\", \"mass\"];\nfunction isSpringType(options, keys) {\n return keys.some((key) => options[key] !== undefined);\n}\nfunction getSpringOptions(options) {\n let springOptions = {\n velocity: 0.0,\n stiffness: 100,\n damping: 10,\n mass: 1.0,\n isResolvedFromDuration: false,\n ...options,\n };\n // stiffness/damping/mass overrides duration/bounce\n if (!isSpringType(options, physicsKeys) &&\n isSpringType(options, durationKeys)) {\n const derived = findSpring(options);\n springOptions = {\n ...springOptions,\n ...derived,\n mass: 1.0,\n };\n springOptions.isResolvedFromDuration = true;\n }\n return springOptions;\n}\nfunction spring({ keyframes, restDelta, restSpeed, ...options }) {\n const origin = keyframes[0];\n const target = keyframes[keyframes.length - 1];\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state = { done: false, value: origin };\n const { stiffness, damping, mass, duration, velocity, isResolvedFromDuration, } = getSpringOptions({\n ...options,\n velocity: -millisecondsToSeconds(options.velocity || 0),\n });\n const initialVelocity = velocity || 0.0;\n const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));\n const initialDelta = target - origin;\n const undampedAngularFreq = millisecondsToSeconds(Math.sqrt(stiffness / mass));\n /**\n * If we're working on a granular scale, use smaller defaults for determining\n * when the spring is finished.\n *\n * These defaults have been selected emprically based on what strikes a good\n * ratio between feeling good and finishing as soon as changes are imperceptible.\n */\n const isGranularScale = Math.abs(initialDelta) < 5;\n restSpeed || (restSpeed = isGranularScale ? 0.01 : 2);\n restDelta || (restDelta = isGranularScale ? 0.005 : 0.5);\n let resolveSpring;\n if (dampingRatio < 1) {\n const angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio);\n // Underdamped spring\n resolveSpring = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n return (target -\n envelope *\n (((initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) /\n angularFreq) *\n Math.sin(angularFreq * t) +\n initialDelta * Math.cos(angularFreq * t)));\n };\n }\n else if (dampingRatio === 1) {\n // Critically damped spring\n resolveSpring = (t) => target -\n Math.exp(-undampedAngularFreq * t) *\n (initialDelta +\n (initialVelocity + undampedAngularFreq * initialDelta) * t);\n }\n else {\n // Overdamped spring\n const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);\n resolveSpring = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n // When performing sinh or cosh values can hit Infinity so we cap them here\n const freqForT = Math.min(dampedAngularFreq * t, 300);\n return (target -\n (envelope *\n ((initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) *\n Math.sinh(freqForT) +\n dampedAngularFreq *\n initialDelta *\n Math.cosh(freqForT))) /\n dampedAngularFreq);\n };\n }\n return {\n calculatedDuration: isResolvedFromDuration ? duration || null : null,\n next: (t) => {\n const current = resolveSpring(t);\n if (!isResolvedFromDuration) {\n let currentVelocity = initialVelocity;\n if (t !== 0) {\n /**\n * We only need to calculate velocity for under-damped springs\n * as over- and critically-damped springs can't overshoot, so\n * checking only for displacement is enough.\n */\n if (dampingRatio < 1) {\n currentVelocity = calcGeneratorVelocity(resolveSpring, t, current);\n }\n else {\n currentVelocity = 0;\n }\n }\n const isBelowVelocityThreshold = Math.abs(currentVelocity) <= restSpeed;\n const isBelowDisplacementThreshold = Math.abs(target - current) <= restDelta;\n state.done =\n isBelowVelocityThreshold && isBelowDisplacementThreshold;\n }\n else {\n state.done = t >= duration;\n }\n state.value = state.done ? target : current;\n return state;\n },\n };\n}\n\nexport { spring };\n","import { spring } from './spring/index.mjs';\nimport { calcGeneratorVelocity } from './utils/velocity.mjs';\n\nfunction inertia({ keyframes, velocity = 0.0, power = 0.8, timeConstant = 325, bounceDamping = 10, bounceStiffness = 500, modifyTarget, min, max, restDelta = 0.5, restSpeed, }) {\n const origin = keyframes[0];\n const state = {\n done: false,\n value: origin,\n };\n const isOutOfBounds = (v) => (min !== undefined && v < min) || (max !== undefined && v > max);\n const nearestBoundary = (v) => {\n if (min === undefined)\n return max;\n if (max === undefined)\n return min;\n return Math.abs(min - v) < Math.abs(max - v) ? min : max;\n };\n let amplitude = power * velocity;\n const ideal = origin + amplitude;\n const target = modifyTarget === undefined ? ideal : modifyTarget(ideal);\n /**\n * If the target has changed we need to re-calculate the amplitude, otherwise\n * the animation will start from the wrong position.\n */\n if (target !== ideal)\n amplitude = target - origin;\n const calcDelta = (t) => -amplitude * Math.exp(-t / timeConstant);\n const calcLatest = (t) => target + calcDelta(t);\n const applyFriction = (t) => {\n const delta = calcDelta(t);\n const latest = calcLatest(t);\n state.done = Math.abs(delta) <= restDelta;\n state.value = state.done ? target : latest;\n };\n /**\n * Ideally this would resolve for t in a stateless way, we could\n * do that by always precalculating the animation but as we know\n * this will be done anyway we can assume that spring will\n * be discovered during that.\n */\n let timeReachedBoundary;\n let spring$1;\n const checkCatchBoundary = (t) => {\n if (!isOutOfBounds(state.value))\n return;\n timeReachedBoundary = t;\n spring$1 = spring({\n keyframes: [state.value, nearestBoundary(state.value)],\n velocity: calcGeneratorVelocity(calcLatest, t, state.value), // TODO: This should be passing * 1000\n damping: bounceDamping,\n stiffness: bounceStiffness,\n restDelta,\n restSpeed,\n });\n };\n checkCatchBoundary(0);\n return {\n calculatedDuration: null,\n next: (t) => {\n /**\n * We need to resolve the friction to figure out if we need a\n * spring but we don't want to do this twice per frame. So here\n * we flag if we updated for this frame and later if we did\n * we can skip doing it again.\n */\n let hasUpdatedFrame = false;\n if (!spring$1 && timeReachedBoundary === undefined) {\n hasUpdatedFrame = true;\n applyFriction(t);\n checkCatchBoundary(t);\n }\n /**\n * If we have a spring and the provided t is beyond the moment the friction\n * animation crossed the min/max boundary, use the spring.\n */\n if (timeReachedBoundary !== undefined && t >= timeReachedBoundary) {\n return spring$1.next(t - timeReachedBoundary);\n }\n else {\n !hasUpdatedFrame && applyFriction(t);\n return state;\n }\n },\n };\n}\n\nexport { inertia };\n","import { noop } from '../utils/noop.mjs';\n\n/*\n Bezier function generator\n This has been modified from Gaëtan Renaudeau's BezierEasing\n https://github.com/gre/bezier-easing/blob/master/src/index.js\n https://github.com/gre/bezier-easing/blob/master/LICENSE\n \n I've removed the newtonRaphsonIterate algo because in benchmarking it\n wasn't noticiably faster than binarySubdivision, indeed removing it\n usually improved times, depending on the curve.\n I also removed the lookup table, as for the added bundle size and loop we're\n only cutting ~4 or so subdivision iterations. I bumped the max iterations up\n to 12 to compensate and this still tended to be faster for no perceivable\n loss in accuracy.\n Usage\n const easeOut = cubicBezier(.17,.67,.83,.67);\n const x = easeOut(0.5); // returns 0.627...\n*/\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\nconst calcBezier = (t, a1, a2) => (((1.0 - 3.0 * a2 + 3.0 * a1) * t + (3.0 * a2 - 6.0 * a1)) * t + 3.0 * a1) *\n t;\nconst subdivisionPrecision = 0.0000001;\nconst subdivisionMaxIterations = 12;\nfunction binarySubdivide(x, lowerBound, upperBound, mX1, mX2) {\n let currentX;\n let currentT;\n let i = 0;\n do {\n currentT = lowerBound + (upperBound - lowerBound) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - x;\n if (currentX > 0.0) {\n upperBound = currentT;\n }\n else {\n lowerBound = currentT;\n }\n } while (Math.abs(currentX) > subdivisionPrecision &&\n ++i < subdivisionMaxIterations);\n return currentT;\n}\nfunction cubicBezier(mX1, mY1, mX2, mY2) {\n // If this is a linear gradient, return linear easing\n if (mX1 === mY1 && mX2 === mY2)\n return noop;\n const getTForX = (aX) => binarySubdivide(aX, 0, 1, mX1, mX2);\n // If animation is at start/end, return t without easing\n return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);\n}\n\nexport { cubicBezier };\n","import { cubicBezier } from './cubic-bezier.mjs';\n\nconst easeIn = cubicBezier(0.42, 0, 1, 1);\nconst easeOut = cubicBezier(0, 0, 0.58, 1);\nconst easeInOut = cubicBezier(0.42, 0, 0.58, 1);\n\nexport { easeIn, easeInOut, easeOut };\n","// Accepts an easing function and returns a new one that outputs mirrored values for\n// the second half of the animation. Turns easeIn into easeInOut.\nconst mirrorEasing = (easing) => (p) => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;\n\nexport { mirrorEasing };\n","// Accepts an easing function and returns a new one that outputs reversed values.\n// Turns easeIn into easeOut.\nconst reverseEasing = (easing) => (p) => 1 - easing(1 - p);\n\nexport { reverseEasing };\n","import { mirrorEasing } from './modifiers/mirror.mjs';\nimport { reverseEasing } from './modifiers/reverse.mjs';\n\nconst circIn = (p) => 1 - Math.sin(Math.acos(p));\nconst circOut = reverseEasing(circIn);\nconst circInOut = mirrorEasing(circIn);\n\nexport { circIn, circInOut, circOut };\n","import { cubicBezier } from './cubic-bezier.mjs';\nimport { mirrorEasing } from './modifiers/mirror.mjs';\nimport { reverseEasing } from './modifiers/reverse.mjs';\n\nconst backOut = cubicBezier(0.33, 1.53, 0.69, 0.99);\nconst backIn = reverseEasing(backOut);\nconst backInOut = mirrorEasing(backIn);\n\nexport { backIn, backInOut, backOut };\n","import { invariant } from '../../utils/errors.mjs';\nimport { cubicBezier } from '../cubic-bezier.mjs';\nimport { noop } from '../../utils/noop.mjs';\nimport { easeIn, easeInOut, easeOut } from '../ease.mjs';\nimport { circIn, circInOut, circOut } from '../circ.mjs';\nimport { backIn, backInOut, backOut } from '../back.mjs';\nimport { anticipate } from '../anticipate.mjs';\n\nconst easingLookup = {\n linear: noop,\n easeIn,\n easeInOut,\n easeOut,\n circIn,\n circInOut,\n circOut,\n backIn,\n backInOut,\n backOut,\n anticipate,\n};\nconst easingDefinitionToFunction = (definition) => {\n if (Array.isArray(definition)) {\n // If cubic bezier definition, create bezier curve\n invariant(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`);\n const [x1, y1, x2, y2] = definition;\n return cubicBezier(x1, y1, x2, y2);\n }\n else if (typeof definition === \"string\") {\n // Else lookup from table\n invariant(easingLookup[definition] !== undefined, `Invalid easing type '${definition}'`);\n return easingLookup[definition];\n }\n return definition;\n};\n\nexport { easingDefinitionToFunction };\n","import { backIn } from './back.mjs';\n\nconst anticipate = (p) => (p *= 2) < 1 ? 0.5 * backIn(p) : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));\n\nexport { anticipate };\n","/*\n Progress within given range\n\n Given a lower limit and an upper limit, we return the progress\n (expressed as a number 0-1) represented by the given value, and\n limit that progress to within 0-1.\n\n @param [number]: Lower limit\n @param [number]: Upper limit\n @param [number]: Value to find progress within given range\n @return [number]: Progress of value within range as expressed 0-1\n*/\nconst progress = (from, to, value) => {\n const toFromDifference = to - from;\n return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;\n};\n\nexport { progress };\n","/*\n Value in range from progress\n\n Given a lower limit and an upper limit, we return the value within\n that range as expressed by progress (usually a number from 0 to 1)\n\n So progress = 0.5 would change\n\n from -------- to\n\n to\n\n from ---- to\n\n E.g. from = 10, to = 20, progress = 0.5 => 15\n\n @param [number]: Lower limit of range\n @param [number]: Upper limit of range\n @param [number]: The progress between lower and upper limits expressed 0-1\n @return [number]: Value as calculated from progress within range (not limited within range)\n*/\nconst mixNumber = (from, to, progress) => {\n return from + (to - from) * progress;\n};\n\nexport { mixNumber };\n","// Adapted from https://gist.github.com/mjackson/5311256\nfunction hueToRgb(p, q, t) {\n if (t < 0)\n t += 1;\n if (t > 1)\n t -= 1;\n if (t < 1 / 6)\n return p + (q - p) * 6 * t;\n if (t < 1 / 2)\n return q;\n if (t < 2 / 3)\n return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n}\nfunction hslaToRgba({ hue, saturation, lightness, alpha }) {\n hue /= 360;\n saturation /= 100;\n lightness /= 100;\n let red = 0;\n let green = 0;\n let blue = 0;\n if (!saturation) {\n red = green = blue = lightness;\n }\n else {\n const q = lightness < 0.5\n ? lightness * (1 + saturation)\n : lightness + saturation - lightness * saturation;\n const p = 2 * lightness - q;\n red = hueToRgb(p, q, hue + 1 / 3);\n green = hueToRgb(p, q, hue);\n blue = hueToRgb(p, q, hue - 1 / 3);\n }\n return {\n red: Math.round(red * 255),\n green: Math.round(green * 255),\n blue: Math.round(blue * 255),\n alpha,\n };\n}\n\nexport { hslaToRgba };\n","import { mixNumber } from './number.mjs';\nimport { invariant } from '../errors.mjs';\nimport { hslaToRgba } from '../hsla-to-rgba.mjs';\nimport { hex } from '../../value/types/color/hex.mjs';\nimport { rgba } from '../../value/types/color/rgba.mjs';\nimport { hsla } from '../../value/types/color/hsla.mjs';\n\n// Linear color space blending\n// Explained https://www.youtube.com/watch?v=LKnqECcg6Gw\n// Demonstrated http://codepen.io/osublake/pen/xGVVaN\nconst mixLinearColor = (from, to, v) => {\n const fromExpo = from * from;\n const expo = v * (to * to - fromExpo) + fromExpo;\n return expo < 0 ? 0 : Math.sqrt(expo);\n};\nconst colorTypes = [hex, rgba, hsla];\nconst getColorType = (v) => colorTypes.find((type) => type.test(v));\nfunction asRGBA(color) {\n const type = getColorType(color);\n invariant(Boolean(type), `'${color}' is not an animatable color. Use the equivalent color code instead.`);\n let model = type.parse(color);\n if (type === hsla) {\n // TODO Remove this cast - needed since Framer Motion's stricter typing\n model = hslaToRgba(model);\n }\n return model;\n}\nconst mixColor = (from, to) => {\n const fromRGBA = asRGBA(from);\n const toRGBA = asRGBA(to);\n const blended = { ...fromRGBA };\n return (v) => {\n blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v);\n blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v);\n blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v);\n blended.alpha = mixNumber(fromRGBA.alpha, toRGBA.alpha, v);\n return rgba.transform(blended);\n };\n};\n\nexport { mixColor, mixLinearColor };\n","import { mixNumber as mixNumber$1 } from './number.mjs';\nimport { mixColor } from './color.mjs';\nimport { pipe } from '../pipe.mjs';\nimport { warning } from '../errors.mjs';\nimport { color } from '../../value/types/color/index.mjs';\nimport { complex, analyseComplexValue } from '../../value/types/complex/index.mjs';\nimport { isCSSVariableToken } from '../../render/dom/utils/is-css-variable.mjs';\n\nfunction mixImmediate(a, b) {\n return (p) => (p > 0 ? b : a);\n}\nfunction mixNumber(a, b) {\n return (p) => mixNumber$1(a, b, p);\n}\nfunction getMixer(a) {\n if (typeof a === \"number\") {\n return mixNumber;\n }\n else if (typeof a === \"string\") {\n return isCSSVariableToken(a)\n ? mixImmediate\n : color.test(a)\n ? mixColor\n : mixComplex;\n }\n else if (Array.isArray(a)) {\n return mixArray;\n }\n else if (typeof a === \"object\") {\n return color.test(a) ? mixColor : mixObject;\n }\n return mixImmediate;\n}\nfunction mixArray(a, b) {\n const output = [...a];\n const numValues = output.length;\n const blendValue = a.map((v, i) => getMixer(v)(v, b[i]));\n return (p) => {\n for (let i = 0; i < numValues; i++) {\n output[i] = blendValue[i](p);\n }\n return output;\n };\n}\nfunction mixObject(a, b) {\n const output = { ...a, ...b };\n const blendValue = {};\n for (const key in output) {\n if (a[key] !== undefined && b[key] !== undefined) {\n blendValue[key] = getMixer(a[key])(a[key], b[key]);\n }\n }\n return (v) => {\n for (const key in blendValue) {\n output[key] = blendValue[key](v);\n }\n return output;\n };\n}\nfunction matchOrder(origin, target) {\n var _a;\n const orderedOrigin = [];\n const pointers = { color: 0, var: 0, number: 0 };\n for (let i = 0; i < target.values.length; i++) {\n const type = target.types[i];\n const originIndex = origin.indexes[type][pointers[type]];\n const originValue = (_a = origin.values[originIndex]) !== null && _a !== void 0 ? _a : 0;\n orderedOrigin[i] = originValue;\n pointers[type]++;\n }\n return orderedOrigin;\n}\nconst mixComplex = (origin, target) => {\n const template = complex.createTransformer(target);\n const originStats = analyseComplexValue(origin);\n const targetStats = analyseComplexValue(target);\n const canInterpolate = originStats.indexes.var.length === targetStats.indexes.var.length &&\n originStats.indexes.color.length === targetStats.indexes.color.length &&\n originStats.indexes.number.length >= targetStats.indexes.number.length;\n if (canInterpolate) {\n return pipe(mixArray(matchOrder(originStats, targetStats), targetStats.values), template);\n }\n else {\n warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`);\n return mixImmediate(origin, target);\n }\n};\n\nexport { getMixer, mixArray, mixComplex, mixObject };\n","import { getMixer } from './complex.mjs';\nimport { mixNumber } from './number.mjs';\n\nfunction mix(from, to, p) {\n if (typeof from === \"number\" &&\n typeof to === \"number\" &&\n typeof p === \"number\") {\n return mixNumber(from, to, p);\n }\n const mixer = getMixer(from);\n return mixer(from, to);\n}\n\nexport { mix };\n","import { easeInOut } from '../../easing/ease.mjs';\nimport { isEasingArray } from '../../easing/utils/is-easing-array.mjs';\nimport { easingDefinitionToFunction } from '../../easing/utils/map.mjs';\nimport { interpolate } from '../../utils/interpolate.mjs';\nimport { defaultOffset } from '../../utils/offsets/default.mjs';\nimport { convertOffsetToTimes } from '../../utils/offsets/time.mjs';\n\nfunction defaultEasing(values, easing) {\n return values.map(() => easing || easeInOut).splice(0, values.length - 1);\n}\nfunction keyframes({ duration = 300, keyframes: keyframeValues, times, ease = \"easeInOut\", }) {\n /**\n * Easing functions can be externally defined as strings. Here we convert them\n * into actual functions.\n */\n const easingFunctions = isEasingArray(ease)\n ? ease.map(easingDefinitionToFunction)\n : easingDefinitionToFunction(ease);\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state = {\n done: false,\n value: keyframeValues[0],\n };\n /**\n * Create a times array based on the provided 0-1 offsets\n */\n const absoluteTimes = convertOffsetToTimes(\n // Only use the provided offsets if they're the correct length\n // TODO Maybe we should warn here if there's a length mismatch\n times && times.length === keyframeValues.length\n ? times\n : defaultOffset(keyframeValues), duration);\n const mapTimeToKeyframe = interpolate(absoluteTimes, keyframeValues, {\n ease: Array.isArray(easingFunctions)\n ? easingFunctions\n : defaultEasing(keyframeValues, easingFunctions),\n });\n return {\n calculatedDuration: duration,\n next: (t) => {\n state.value = mapTimeToKeyframe(t);\n state.done = t >= duration;\n return state;\n },\n };\n}\n\nexport { defaultEasing, keyframes };\n","const isEasingArray = (ease) => {\n return Array.isArray(ease) && typeof ease[0] !== \"number\";\n};\n\nexport { isEasingArray };\n","function convertOffsetToTimes(offset, duration) {\n return offset.map((o) => o * duration);\n}\n\nexport { convertOffsetToTimes };\n","import { fillOffset } from './fill.mjs';\n\nfunction defaultOffset(arr) {\n const offset = [0];\n fillOffset(offset, arr.length - 1);\n return offset;\n}\n\nexport { defaultOffset };\n","import { mixNumber } from '../mix/number.mjs';\nimport { progress } from '../progress.mjs';\n\nfunction fillOffset(offset, remaining) {\n const min = offset[offset.length - 1];\n for (let i = 1; i <= remaining; i++) {\n const offsetProgress = progress(0, remaining, i);\n offset.push(mixNumber(min, 1, offsetProgress));\n }\n}\n\nexport { fillOffset };\n","import { invariant } from './errors.mjs';\nimport { clamp } from './clamp.mjs';\nimport { pipe } from './pipe.mjs';\nimport { progress } from './progress.mjs';\nimport { noop } from './noop.mjs';\nimport { mix } from './mix/index.mjs';\n\nfunction createMixers(output, ease, customMixer) {\n const mixers = [];\n const mixerFactory = customMixer || mix;\n const numMixers = output.length - 1;\n for (let i = 0; i < numMixers; i++) {\n let mixer = mixerFactory(output[i], output[i + 1]);\n if (ease) {\n const easingFunction = Array.isArray(ease) ? ease[i] || noop : ease;\n mixer = pipe(easingFunction, mixer);\n }\n mixers.push(mixer);\n }\n return mixers;\n}\n/**\n * Create a function that maps from a numerical input array to a generic output array.\n *\n * Accepts:\n * - Numbers\n * - Colors (hex, hsl, hsla, rgb, rgba)\n * - Complex (combinations of one or more numbers or strings)\n *\n * ```jsx\n * const mixColor = interpolate([0, 1], ['#fff', '#000'])\n *\n * mixColor(0.5) // 'rgba(128, 128, 128, 1)'\n * ```\n *\n * TODO Revist this approach once we've moved to data models for values,\n * probably not needed to pregenerate mixer functions.\n *\n * @public\n */\nfunction interpolate(input, output, { clamp: isClamp = true, ease, mixer } = {}) {\n const inputLength = input.length;\n invariant(inputLength === output.length, \"Both input and output ranges must be the same length\");\n /**\n * If we're only provided a single input, we can just make a function\n * that returns the output.\n */\n if (inputLength === 1)\n return () => output[0];\n if (inputLength === 2 && input[0] === input[1])\n return () => output[1];\n // If input runs highest -> lowest, reverse both arrays\n if (input[0] > input[inputLength - 1]) {\n input = [...input].reverse();\n output = [...output].reverse();\n }\n const mixers = createMixers(output, ease, mixer);\n const numMixers = mixers.length;\n const interpolator = (v) => {\n let i = 0;\n if (numMixers > 1) {\n for (; i < input.length - 2; i++) {\n if (v < input[i + 1])\n break;\n }\n }\n const progressInRange = progress(input[i], input[i + 1], v);\n return mixers[i](progressInRange);\n };\n return isClamp\n ? (v) => interpolator(clamp(input[0], input[inputLength - 1], v))\n : interpolator;\n}\n\nexport { interpolate };\n","import { time } from '../../../frameloop/sync-time.mjs';\nimport { frame, cancelFrame, frameData } from '../../../frameloop/frame.mjs';\n\nconst frameloopDriver = (update) => {\n const passTimestamp = ({ timestamp }) => update(timestamp);\n return {\n start: () => frame.update(passTimestamp, true),\n stop: () => cancelFrame(passTimestamp),\n /**\n * If we're processing this frame we can use the\n * framelocked timestamp to keep things in sync.\n */\n now: () => (frameData.isProcessing ? frameData.timestamp : time.now()),\n };\n};\n\nexport { frameloopDriver };\n","import { KeyframeResolver } from '../../render/utils/KeyframesResolver.mjs';\nimport { spring } from '../generators/spring/index.mjs';\nimport { inertia } from '../generators/inertia.mjs';\nimport { keyframes } from '../generators/keyframes.mjs';\nimport { BaseAnimation } from './BaseAnimation.mjs';\nimport { pipe } from '../../utils/pipe.mjs';\nimport { mix } from '../../utils/mix/index.mjs';\nimport { calcGeneratorDuration } from '../generators/utils/calc-duration.mjs';\nimport { millisecondsToSeconds, secondsToMilliseconds } from '../../utils/time-conversion.mjs';\nimport { clamp } from '../../utils/clamp.mjs';\nimport { invariant } from '../../utils/errors.mjs';\nimport { frameloopDriver } from './drivers/driver-frameloop.mjs';\nimport { getFinalKeyframe } from './waapi/utils/get-final-keyframe.mjs';\n\nconst generators = {\n decay: inertia,\n inertia,\n tween: keyframes,\n keyframes: keyframes,\n spring,\n};\nconst percentToProgress = (percent) => percent / 100;\n/**\n * Animation that runs on the main thread. Designed to be WAAPI-spec in the subset of\n * features we expose publically. Mostly the compatibility is to ensure visual identity\n * between both WAAPI and main thread animations.\n */\nclass MainThreadAnimation extends BaseAnimation {\n constructor({ KeyframeResolver: KeyframeResolver$1 = KeyframeResolver, ...options }) {\n super(options);\n /**\n * The time at which the animation was paused.\n */\n this.holdTime = null;\n /**\n * The time at which the animation was started.\n */\n this.startTime = null;\n /**\n * The time at which the animation was cancelled.\n */\n this.cancelTime = null;\n /**\n * The current time of the animation.\n */\n this.currentTime = 0;\n /**\n * Playback speed as a factor. 0 would be stopped, -1 reverse and 2 double speed.\n */\n this.playbackSpeed = 1;\n /**\n * The state of the animation to apply when the animation is resolved. This\n * allows calls to the public API to control the animation before it is resolved,\n * without us having to resolve it first.\n */\n this.pendingPlayState = \"running\";\n this.state = \"idle\";\n /**\n * This method is bound to the instance to fix a pattern where\n * animation.stop is returned as a reference from a useEffect.\n */\n this.stop = () => {\n this.resolver.cancel();\n this.isStopped = true;\n if (this.state === \"idle\")\n return;\n this.teardown();\n const { onStop } = this.options;\n onStop && onStop();\n };\n const { name, motionValue, keyframes } = this.options;\n const onResolved = (resolvedKeyframes, finalKeyframe) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe);\n if (name && motionValue && motionValue.owner) {\n this.resolver = motionValue.owner.resolveKeyframes(keyframes, onResolved, name, motionValue);\n }\n else {\n this.resolver = new KeyframeResolver$1(keyframes, onResolved, name, motionValue);\n }\n this.resolver.scheduleResolve();\n }\n initPlayback(keyframes$1) {\n const { type = \"keyframes\", repeat = 0, repeatDelay = 0, repeatType, velocity = 0, } = this.options;\n const generatorFactory = generators[type] || keyframes;\n /**\n * If our generator doesn't support mixing numbers, we need to replace keyframes with\n * [0, 100] and then make a function that maps that to the actual keyframes.\n *\n * 100 is chosen instead of 1 as it works nicer with spring animations.\n */\n let mapPercentToKeyframes;\n let mirroredGenerator;\n if (generatorFactory !== keyframes &&\n typeof keyframes$1[0] !== \"number\") {\n if (process.env.NODE_ENV !== \"production\") {\n invariant(keyframes$1.length === 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes$1}`);\n }\n mapPercentToKeyframes = pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1]));\n keyframes$1 = [0, 100];\n }\n const generator = generatorFactory({ ...this.options, keyframes: keyframes$1 });\n /**\n * If we have a mirror repeat type we need to create a second generator that outputs the\n * mirrored (not reversed) animation and later ping pong between the two generators.\n */\n if (repeatType === \"mirror\") {\n mirroredGenerator = generatorFactory({\n ...this.options,\n keyframes: [...keyframes$1].reverse(),\n velocity: -velocity,\n });\n }\n /**\n * If duration is undefined and we have repeat options,\n * we need to calculate a duration from the generator.\n *\n * We set it to the generator itself to cache the duration.\n * Any timeline resolver will need to have already precalculated\n * the duration by this step.\n */\n if (generator.calculatedDuration === null) {\n generator.calculatedDuration = calcGeneratorDuration(generator);\n }\n const { calculatedDuration } = generator;\n const resolvedDuration = calculatedDuration + repeatDelay;\n const totalDuration = resolvedDuration * (repeat + 1) - repeatDelay;\n return {\n generator,\n mirroredGenerator,\n mapPercentToKeyframes,\n calculatedDuration,\n resolvedDuration,\n totalDuration,\n };\n }\n onPostResolved() {\n const { autoplay = true } = this.options;\n this.play();\n if (this.pendingPlayState === \"paused\" || !autoplay) {\n this.pause();\n }\n else {\n this.state = this.pendingPlayState;\n }\n }\n tick(timestamp, sample = false) {\n const { resolved } = this;\n // If the animations has failed to resolve, return the final keyframe.\n if (!resolved) {\n const { keyframes } = this.options;\n return { done: true, value: keyframes[keyframes.length - 1] };\n }\n const { finalKeyframe, generator, mirroredGenerator, mapPercentToKeyframes, keyframes, calculatedDuration, totalDuration, resolvedDuration, } = resolved;\n if (this.startTime === null)\n return generator.next(0);\n const { delay, repeat, repeatType, repeatDelay, onUpdate } = this.options;\n /**\n * requestAnimationFrame timestamps can come through as lower than\n * the startTime as set by performance.now(). Here we prevent this,\n * though in the future it could be possible to make setting startTime\n * a pending operation that gets resolved here.\n */\n if (this.speed > 0) {\n this.startTime = Math.min(this.startTime, timestamp);\n }\n else if (this.speed < 0) {\n this.startTime = Math.min(timestamp - totalDuration / this.speed, this.startTime);\n }\n // Update currentTime\n if (sample) {\n this.currentTime = timestamp;\n }\n else if (this.holdTime !== null) {\n this.currentTime = this.holdTime;\n }\n else {\n // Rounding the time because floating point arithmetic is not always accurate, e.g. 3000.367 - 1000.367 =\n // 2000.0000000000002. This is a problem when we are comparing the currentTime with the duration, for\n // example.\n this.currentTime =\n Math.round(timestamp - this.startTime) * this.speed;\n }\n // Rebase on delay\n const timeWithoutDelay = this.currentTime - delay * (this.speed >= 0 ? 1 : -1);\n const isInDelayPhase = this.speed >= 0\n ? timeWithoutDelay < 0\n : timeWithoutDelay > totalDuration;\n this.currentTime = Math.max(timeWithoutDelay, 0);\n // If this animation has finished, set the current time to the total duration.\n if (this.state === \"finished\" && this.holdTime === null) {\n this.currentTime = totalDuration;\n }\n let elapsed = this.currentTime;\n let frameGenerator = generator;\n if (repeat) {\n /**\n * Get the current progress (0-1) of the animation. If t is >\n * than duration we'll get values like 2.5 (midway through the\n * third iteration)\n */\n const progress = Math.min(this.currentTime, totalDuration) / resolvedDuration;\n /**\n * Get the current iteration (0 indexed). For instance the floor of\n * 2.5 is 2.\n */\n let currentIteration = Math.floor(progress);\n /**\n * Get the current progress of the iteration by taking the remainder\n * so 2.5 is 0.5 through iteration 2\n */\n let iterationProgress = progress % 1.0;\n /**\n * If iteration progress is 1 we count that as the end\n * of the previous iteration.\n */\n if (!iterationProgress && progress >= 1) {\n iterationProgress = 1;\n }\n iterationProgress === 1 && currentIteration--;\n currentIteration = Math.min(currentIteration, repeat + 1);\n /**\n * Reverse progress if we're not running in \"normal\" direction\n */\n const isOddIteration = Boolean(currentIteration % 2);\n if (isOddIteration) {\n if (repeatType === \"reverse\") {\n iterationProgress = 1 - iterationProgress;\n if (repeatDelay) {\n iterationProgress -= repeatDelay / resolvedDuration;\n }\n }\n else if (repeatType === \"mirror\") {\n frameGenerator = mirroredGenerator;\n }\n }\n elapsed = clamp(0, 1, iterationProgress) * resolvedDuration;\n }\n /**\n * If we're in negative time, set state as the initial keyframe.\n * This prevents delay: x, duration: 0 animations from finishing\n * instantly.\n */\n const state = isInDelayPhase\n ? { done: false, value: keyframes[0] }\n : frameGenerator.next(elapsed);\n if (mapPercentToKeyframes) {\n state.value = mapPercentToKeyframes(state.value);\n }\n let { done } = state;\n if (!isInDelayPhase && calculatedDuration !== null) {\n done =\n this.speed >= 0\n ? this.currentTime >= totalDuration\n : this.currentTime <= 0;\n }\n const isAnimationFinished = this.holdTime === null &&\n (this.state === \"finished\" || (this.state === \"running\" && done));\n if (isAnimationFinished && finalKeyframe !== undefined) {\n state.value = getFinalKeyframe(keyframes, this.options, finalKeyframe);\n }\n if (onUpdate) {\n onUpdate(state.value);\n }\n if (isAnimationFinished) {\n this.finish();\n }\n return state;\n }\n get duration() {\n const { resolved } = this;\n return resolved ? millisecondsToSeconds(resolved.calculatedDuration) : 0;\n }\n get time() {\n return millisecondsToSeconds(this.currentTime);\n }\n set time(newTime) {\n newTime = secondsToMilliseconds(newTime);\n this.currentTime = newTime;\n if (this.holdTime !== null || this.speed === 0) {\n this.holdTime = newTime;\n }\n else if (this.driver) {\n this.startTime = this.driver.now() - newTime / this.speed;\n }\n }\n get speed() {\n return this.playbackSpeed;\n }\n set speed(newSpeed) {\n const hasChanged = this.playbackSpeed !== newSpeed;\n this.playbackSpeed = newSpeed;\n if (hasChanged) {\n this.time = millisecondsToSeconds(this.currentTime);\n }\n }\n play() {\n if (!this.resolver.isScheduled) {\n this.resolver.resume();\n }\n if (!this._resolved) {\n this.pendingPlayState = \"running\";\n return;\n }\n if (this.isStopped)\n return;\n const { driver = frameloopDriver, onPlay } = this.options;\n if (!this.driver) {\n this.driver = driver((timestamp) => this.tick(timestamp));\n }\n onPlay && onPlay();\n const now = this.driver.now();\n if (this.holdTime !== null) {\n this.startTime = now - this.holdTime;\n }\n else if (!this.startTime || this.state === \"finished\") {\n this.startTime = now;\n }\n if (this.state === \"finished\") {\n this.updateFinishedPromise();\n }\n this.cancelTime = this.startTime;\n this.holdTime = null;\n /**\n * Set playState to running only after we've used it in\n * the previous logic.\n */\n this.state = \"running\";\n this.driver.start();\n }\n pause() {\n var _a;\n if (!this._resolved) {\n this.pendingPlayState = \"paused\";\n return;\n }\n this.state = \"paused\";\n this.holdTime = (_a = this.currentTime) !== null && _a !== void 0 ? _a : 0;\n }\n complete() {\n if (this.state !== \"running\") {\n this.play();\n }\n this.pendingPlayState = this.state = \"finished\";\n this.holdTime = null;\n }\n finish() {\n this.teardown();\n this.state = \"finished\";\n const { onComplete } = this.options;\n onComplete && onComplete();\n }\n cancel() {\n if (this.cancelTime !== null) {\n this.tick(this.cancelTime);\n }\n this.teardown();\n this.updateFinishedPromise();\n }\n teardown() {\n this.state = \"idle\";\n this.stopDriver();\n this.resolveFinishedPromise();\n this.updateFinishedPromise();\n this.startTime = this.cancelTime = null;\n this.resolver.cancel();\n }\n stopDriver() {\n if (!this.driver)\n return;\n this.driver.stop();\n this.driver = undefined;\n }\n sample(time) {\n this.startTime = 0;\n return this.tick(time, true);\n }\n}\n// Legacy interface\nfunction animateValue(options) {\n return new MainThreadAnimation(options);\n}\n\nexport { MainThreadAnimation, animateValue };\n","/**\n * Implement a practical max duration for keyframe generation\n * to prevent infinite loops\n */\nconst maxGeneratorDuration = 20000;\nfunction calcGeneratorDuration(generator) {\n let duration = 0;\n const timeStep = 50;\n let state = generator.next(duration);\n while (!state.done && duration < maxGeneratorDuration) {\n duration += timeStep;\n state = generator.next(duration);\n }\n return duration >= maxGeneratorDuration ? Infinity : duration;\n}\n\nexport { calcGeneratorDuration, maxGeneratorDuration };\n","const isBezierDefinition = (easing) => Array.isArray(easing) && typeof easing[0] === \"number\";\n\nexport { isBezierDefinition };\n","import { isBezierDefinition } from '../../../easing/utils/is-bezier-definition.mjs';\n\nfunction isWaapiSupportedEasing(easing) {\n return Boolean(!easing ||\n (typeof easing === \"string\" && easing in supportedWaapiEasing) ||\n isBezierDefinition(easing) ||\n (Array.isArray(easing) && easing.every(isWaapiSupportedEasing)));\n}\nconst cubicBezierAsString = ([a, b, c, d]) => `cubic-bezier(${a}, ${b}, ${c}, ${d})`;\nconst supportedWaapiEasing = {\n linear: \"linear\",\n ease: \"ease\",\n easeIn: \"ease-in\",\n easeOut: \"ease-out\",\n easeInOut: \"ease-in-out\",\n circIn: cubicBezierAsString([0, 0.65, 0.55, 1]),\n circOut: cubicBezierAsString([0.55, 0, 1, 0.45]),\n backIn: cubicBezierAsString([0.31, 0.01, 0.66, -0.59]),\n backOut: cubicBezierAsString([0.33, 1.53, 0.69, 0.99]),\n};\nfunction mapEasingToNativeEasingWithDefault(easing) {\n return (mapEasingToNativeEasing(easing) ||\n supportedWaapiEasing.easeOut);\n}\nfunction mapEasingToNativeEasing(easing) {\n if (!easing) {\n return undefined;\n }\n else if (isBezierDefinition(easing)) {\n return cubicBezierAsString(easing);\n }\n else if (Array.isArray(easing)) {\n return easing.map(mapEasingToNativeEasingWithDefault);\n }\n else {\n return supportedWaapiEasing[easing];\n }\n}\n\nexport { cubicBezierAsString, isWaapiSupportedEasing, mapEasingToNativeEasing, supportedWaapiEasing };\n","import { time } from '../../frameloop/sync-time.mjs';\nimport { DOMKeyframesResolver } from '../../render/dom/DOMKeyframesResolver.mjs';\nimport { memo } from '../../utils/memo.mjs';\nimport { noop } from '../../utils/noop.mjs';\nimport { millisecondsToSeconds, secondsToMilliseconds } from '../../utils/time-conversion.mjs';\nimport { BaseAnimation } from './BaseAnimation.mjs';\nimport { MainThreadAnimation } from './MainThreadAnimation.mjs';\nimport { animateStyle } from './waapi/index.mjs';\nimport { isWaapiSupportedEasing } from './waapi/easing.mjs';\nimport { getFinalKeyframe } from './waapi/utils/get-final-keyframe.mjs';\n\nconst supportsWaapi = memo(() => Object.hasOwnProperty.call(Element.prototype, \"animate\"));\n/**\n * A list of values that can be hardware-accelerated.\n */\nconst acceleratedValues = new Set([\n \"opacity\",\n \"clipPath\",\n \"filter\",\n \"transform\",\n // TODO: Can be accelerated but currently disabled until https://issues.chromium.org/issues/41491098 is resolved\n // or until we implement support for linear() easing.\n // \"background-color\"\n]);\n/**\n * 10ms is chosen here as it strikes a balance between smooth\n * results (more than one keyframe per frame at 60fps) and\n * keyframe quantity.\n */\nconst sampleDelta = 10; //ms\n/**\n * Implement a practical max duration for keyframe generation\n * to prevent infinite loops\n */\nconst maxDuration = 20000;\n/**\n * Check if an animation can run natively via WAAPI or requires pregenerated keyframes.\n * WAAPI doesn't support spring or function easings so we run these as JS animation before\n * handing off.\n */\nfunction requiresPregeneratedKeyframes(options) {\n return (options.type === \"spring\" ||\n options.name === \"backgroundColor\" ||\n !isWaapiSupportedEasing(options.ease));\n}\nfunction pregenerateKeyframes(keyframes, options) {\n /**\n * Create a main-thread animation to pregenerate keyframes.\n * We sample this at regular intervals to generate keyframes that we then\n * linearly interpolate between.\n */\n const sampleAnimation = new MainThreadAnimation({\n ...options,\n keyframes,\n repeat: 0,\n delay: 0,\n isGenerator: true,\n });\n let state = { done: false, value: keyframes[0] };\n const pregeneratedKeyframes = [];\n /**\n * Bail after 20 seconds of pre-generated keyframes as it's likely\n * we're heading for an infinite loop.\n */\n let t = 0;\n while (!state.done && t < maxDuration) {\n state = sampleAnimation.sample(t);\n pregeneratedKeyframes.push(state.value);\n t += sampleDelta;\n }\n return {\n times: undefined,\n keyframes: pregeneratedKeyframes,\n duration: t - sampleDelta,\n ease: \"linear\",\n };\n}\nclass AcceleratedAnimation extends BaseAnimation {\n constructor(options) {\n super(options);\n const { name, motionValue, keyframes } = this.options;\n this.resolver = new DOMKeyframesResolver(keyframes, (resolvedKeyframes, finalKeyframe) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe), name, motionValue);\n this.resolver.scheduleResolve();\n }\n initPlayback(keyframes, finalKeyframe) {\n var _a;\n let { duration = 300, times, ease, type, motionValue, name, } = this.options;\n /**\n * If element has since been unmounted, return false to indicate\n * the animation failed to initialised.\n */\n if (!((_a = motionValue.owner) === null || _a === void 0 ? void 0 : _a.current)) {\n return false;\n }\n /**\n * If this animation needs pre-generated keyframes then generate.\n */\n if (requiresPregeneratedKeyframes(this.options)) {\n const { onComplete, onUpdate, motionValue, ...options } = this.options;\n const pregeneratedAnimation = pregenerateKeyframes(keyframes, options);\n keyframes = pregeneratedAnimation.keyframes;\n // If this is a very short animation, ensure we have\n // at least two keyframes to animate between as older browsers\n // can't animate between a single keyframe.\n if (keyframes.length === 1) {\n keyframes[1] = keyframes[0];\n }\n duration = pregeneratedAnimation.duration;\n times = pregeneratedAnimation.times;\n ease = pregeneratedAnimation.ease;\n type = \"keyframes\";\n }\n const animation = animateStyle(motionValue.owner.current, name, keyframes, { ...this.options, duration, times, ease });\n // Override the browser calculated startTime with one synchronised to other JS\n // and WAAPI animations starting this event loop.\n animation.startTime = time.now();\n if (this.pendingTimeline) {\n animation.timeline = this.pendingTimeline;\n this.pendingTimeline = undefined;\n }\n else {\n /**\n * Prefer the `onfinish` prop as it's more widely supported than\n * the `finished` promise.\n *\n * Here, we synchronously set the provided MotionValue to the end\n * keyframe. If we didn't, when the WAAPI animation is finished it would\n * be removed from the element which would then revert to its old styles.\n */\n animation.onfinish = () => {\n const { onComplete } = this.options;\n motionValue.set(getFinalKeyframe(keyframes, this.options, finalKeyframe));\n onComplete && onComplete();\n this.cancel();\n this.resolveFinishedPromise();\n };\n }\n return {\n animation,\n duration,\n times,\n type,\n ease,\n keyframes: keyframes,\n };\n }\n get duration() {\n const { resolved } = this;\n if (!resolved)\n return 0;\n const { duration } = resolved;\n return millisecondsToSeconds(duration);\n }\n get time() {\n const { resolved } = this;\n if (!resolved)\n return 0;\n const { animation } = resolved;\n return millisecondsToSeconds(animation.currentTime || 0);\n }\n set time(newTime) {\n const { resolved } = this;\n if (!resolved)\n return;\n const { animation } = resolved;\n animation.currentTime = secondsToMilliseconds(newTime);\n }\n get speed() {\n const { resolved } = this;\n if (!resolved)\n return 1;\n const { animation } = resolved;\n return animation.playbackRate;\n }\n set speed(newSpeed) {\n const { resolved } = this;\n if (!resolved)\n return;\n const { animation } = resolved;\n animation.playbackRate = newSpeed;\n }\n get state() {\n const { resolved } = this;\n if (!resolved)\n return \"idle\";\n const { animation } = resolved;\n return animation.playState;\n }\n /**\n * Replace the default DocumentTimeline with another AnimationTimeline.\n * Currently used for scroll animations.\n */\n attachTimeline(timeline) {\n if (!this._resolved) {\n this.pendingTimeline = timeline;\n }\n else {\n const { resolved } = this;\n if (!resolved)\n return noop;\n const { animation } = resolved;\n animation.timeline = timeline;\n animation.onfinish = null;\n }\n return noop;\n }\n play() {\n if (this.isStopped)\n return;\n const { resolved } = this;\n if (!resolved)\n return;\n const { animation } = resolved;\n if (animation.playState === \"finished\") {\n this.updateFinishedPromise();\n }\n animation.play();\n }\n pause() {\n const { resolved } = this;\n if (!resolved)\n return;\n const { animation } = resolved;\n animation.pause();\n }\n stop() {\n this.resolver.cancel();\n this.isStopped = true;\n if (this.state === \"idle\")\n return;\n const { resolved } = this;\n if (!resolved)\n return;\n const { animation, keyframes, duration, type, ease, times } = resolved;\n if (animation.playState === \"idle\" ||\n animation.playState === \"finished\") {\n return;\n }\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * Rather than read commited styles back out of the DOM, we can\n * create a renderless JS animation and sample it twice to calculate\n * its current value, \"previous\" value, and therefore allow\n * Motion to calculate velocity for any subsequent animation.\n */\n if (this.time) {\n const { motionValue, onUpdate, onComplete, ...options } = this.options;\n const sampleAnimation = new MainThreadAnimation({\n ...options,\n keyframes,\n duration,\n type,\n ease,\n times,\n isGenerator: true,\n });\n const sampleTime = secondsToMilliseconds(this.time);\n motionValue.setWithVelocity(sampleAnimation.sample(sampleTime - sampleDelta).value, sampleAnimation.sample(sampleTime).value, sampleDelta);\n }\n this.cancel();\n }\n complete() {\n const { resolved } = this;\n if (!resolved)\n return;\n resolved.animation.finish();\n }\n cancel() {\n const { resolved } = this;\n if (!resolved)\n return;\n resolved.animation.cancel();\n }\n static supports(options) {\n const { motionValue, name, repeatDelay, repeatType, damping, type } = options;\n return (supportsWaapi() &&\n name &&\n acceleratedValues.has(name) &&\n motionValue &&\n motionValue.owner &&\n motionValue.owner.current instanceof HTMLElement &&\n /**\n * If we're outputting values to onUpdate then we can't use WAAPI as there's\n * no way to read the value from WAAPI every frame.\n */\n !motionValue.owner.getProps().onUpdate &&\n !repeatDelay &&\n repeatType !== \"mirror\" &&\n damping !== 0 &&\n type !== \"inertia\");\n }\n}\n\nexport { AcceleratedAnimation };\n","function memo(callback) {\n let result;\n return () => {\n if (result === undefined)\n result = callback();\n return result;\n };\n}\n\nexport { memo };\n","import { mapEasingToNativeEasing } from './easing.mjs';\n\nfunction animateStyle(element, valueName, keyframes, { delay = 0, duration = 300, repeat = 0, repeatType = \"loop\", ease, times, } = {}) {\n const keyframeOptions = { [valueName]: keyframes };\n if (times)\n keyframeOptions.offset = times;\n const easing = mapEasingToNativeEasing(ease);\n /**\n * If this is an easing array, apply to keyframes, not animation as a whole\n */\n if (Array.isArray(easing))\n keyframeOptions.easing = easing;\n return element.animate(keyframeOptions, {\n delay,\n duration,\n easing: !Array.isArray(easing) ? easing : \"linear\",\n fill: \"both\",\n iterations: repeat + 1,\n direction: repeatType === \"reverse\" ? \"alternate\" : \"normal\",\n });\n}\n\nexport { animateStyle };\n","import { secondsToMilliseconds } from '../../utils/time-conversion.mjs';\nimport { getDefaultTransition } from '../utils/default-transitions.mjs';\nimport { getValueTransition, isTransitionDefined } from '../utils/transitions.mjs';\nimport { MotionGlobalConfig } from '../../utils/GlobalConfig.mjs';\nimport { instantAnimationState } from '../../utils/use-instant-transition-state.mjs';\nimport { getFinalKeyframe } from '../animators/waapi/utils/get-final-keyframe.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\nimport { AcceleratedAnimation } from '../animators/AcceleratedAnimation.mjs';\nimport { MainThreadAnimation } from '../animators/MainThreadAnimation.mjs';\n\nconst animateMotionValue = (name, value, target, transition = {}, element, isHandoff) => (onComplete) => {\n const valueTransition = getValueTransition(transition, name) || {};\n /**\n * Most transition values are currently completely overwritten by value-specific\n * transitions. In the future it'd be nicer to blend these transitions. But for now\n * delay actually does inherit from the root transition if not value-specific.\n */\n const delay = valueTransition.delay || transition.delay || 0;\n /**\n * Elapsed isn't a public transition option but can be passed through from\n * optimized appear effects in milliseconds.\n */\n let { elapsed = 0 } = transition;\n elapsed = elapsed - secondsToMilliseconds(delay);\n let options = {\n keyframes: Array.isArray(target) ? target : [null, target],\n ease: \"easeOut\",\n velocity: value.getVelocity(),\n ...valueTransition,\n delay: -elapsed,\n onUpdate: (v) => {\n value.set(v);\n valueTransition.onUpdate && valueTransition.onUpdate(v);\n },\n onComplete: () => {\n onComplete();\n valueTransition.onComplete && valueTransition.onComplete();\n },\n name,\n motionValue: value,\n element: isHandoff ? undefined : element,\n };\n /**\n * If there's no transition defined for this value, we can generate\n * unqiue transition settings for this value.\n */\n if (!isTransitionDefined(valueTransition)) {\n options = {\n ...options,\n ...getDefaultTransition(name, options),\n };\n }\n /**\n * Both WAAPI and our internal animation functions use durations\n * as defined by milliseconds, while our external API defines them\n * as seconds.\n */\n if (options.duration) {\n options.duration = secondsToMilliseconds(options.duration);\n }\n if (options.repeatDelay) {\n options.repeatDelay = secondsToMilliseconds(options.repeatDelay);\n }\n if (options.from !== undefined) {\n options.keyframes[0] = options.from;\n }\n let shouldSkip = false;\n if (options.type === false ||\n (options.duration === 0 && !options.repeatDelay)) {\n options.duration = 0;\n if (options.delay === 0) {\n shouldSkip = true;\n }\n }\n if (instantAnimationState.current ||\n MotionGlobalConfig.skipAnimations) {\n shouldSkip = true;\n options.duration = 0;\n options.delay = 0;\n }\n /**\n * If we can or must skip creating the animation, and apply only\n * the final keyframe, do so. We also check once keyframes are resolved but\n * this early check prevents the need to create an animation at all.\n */\n if (shouldSkip && !isHandoff && value.get() !== undefined) {\n const finalKeyframe = getFinalKeyframe(options.keyframes, valueTransition);\n if (finalKeyframe !== undefined) {\n frame.update(() => {\n options.onUpdate(finalKeyframe);\n options.onComplete();\n });\n return;\n }\n }\n /**\n * Animate via WAAPI if possible. If this is a handoff animation, the optimised animation will be running via\n * WAAPI. Therefore, this animation must be JS to ensure it runs \"under\" the\n * optimised animation.\n */\n if (!isHandoff && AcceleratedAnimation.supports(options)) {\n return new AcceleratedAnimation(options);\n }\n else {\n return new MainThreadAnimation(options);\n }\n};\n\nexport { animateMotionValue };\n","import { isMotionValue } from '../utils/is-motion-value.mjs';\n\nfunction isWillChangeMotionValue(value) {\n return Boolean(isMotionValue(value) && value.add);\n}\n\nexport { isWillChangeMotionValue };\n","function addUniqueItem(arr, item) {\n if (arr.indexOf(item) === -1)\n arr.push(item);\n}\nfunction removeItem(arr, item) {\n const index = arr.indexOf(item);\n if (index > -1)\n arr.splice(index, 1);\n}\n// Adapted from array-move\nfunction moveItem([...arr], fromIndex, toIndex) {\n const startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex;\n if (startIndex >= 0 && startIndex < arr.length) {\n const endIndex = toIndex < 0 ? arr.length + toIndex : toIndex;\n const [item] = arr.splice(fromIndex, 1);\n arr.splice(endIndex, 0, item);\n }\n return arr;\n}\n\nexport { addUniqueItem, moveItem, removeItem };\n","import { addUniqueItem, removeItem } from './array.mjs';\n\nclass SubscriptionManager {\n constructor() {\n this.subscriptions = [];\n }\n add(handler) {\n addUniqueItem(this.subscriptions, handler);\n return () => removeItem(this.subscriptions, handler);\n }\n notify(a, b, c) {\n const numSubscriptions = this.subscriptions.length;\n if (!numSubscriptions)\n return;\n if (numSubscriptions === 1) {\n /**\n * If there's only a single handler we can just call it without invoking a loop.\n */\n this.subscriptions[0](a, b, c);\n }\n else {\n for (let i = 0; i < numSubscriptions; i++) {\n /**\n * Check whether the handler exists before firing as it's possible\n * the subscriptions were modified during this loop running.\n */\n const handler = this.subscriptions[i];\n handler && handler(a, b, c);\n }\n }\n }\n getSize() {\n return this.subscriptions.length;\n }\n clear() {\n this.subscriptions.length = 0;\n }\n}\n\nexport { SubscriptionManager };\n","import { SubscriptionManager } from '../utils/subscription-manager.mjs';\nimport { velocityPerSecond } from '../utils/velocity-per-second.mjs';\nimport { warnOnce } from '../utils/warn-once.mjs';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { frame } from '../frameloop/frame.mjs';\n\n/**\n * Maximum time between the value of two frames, beyond which we\n * assume the velocity has since been 0.\n */\nconst MAX_VELOCITY_DELTA = 30;\nconst isFloat = (value) => {\n return !isNaN(parseFloat(value));\n};\nconst collectMotionValues = {\n current: undefined,\n};\n/**\n * `MotionValue` is used to track the state and velocity of motion values.\n *\n * @public\n */\nclass MotionValue {\n /**\n * @param init - The initiating value\n * @param config - Optional configuration options\n *\n * - `transformer`: A function to transform incoming values with.\n *\n * @internal\n */\n constructor(init, options = {}) {\n /**\n * This will be replaced by the build step with the latest version number.\n * When MotionValues are provided to motion components, warn if versions are mixed.\n */\n this.version = \"11.1.9\";\n /**\n * Tracks whether this value can output a velocity. Currently this is only true\n * if the value is numerical, but we might be able to widen the scope here and support\n * other value types.\n *\n * @internal\n */\n this.canTrackVelocity = false;\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n this.events = {};\n this.updateAndNotify = (v, render = true) => {\n const currentTime = time.now();\n /**\n * If we're updating the value during another frame or eventloop\n * than the previous frame, then the we set the previous frame value\n * to current.\n */\n if (this.updatedAt !== currentTime) {\n this.setPrevFrameValue();\n }\n this.prev = this.current;\n this.setCurrent(v);\n // Update update subscribers\n if (this.current !== this.prev && this.events.change) {\n this.events.change.notify(this.current);\n }\n // Update render subscribers\n if (render && this.events.renderRequest) {\n this.events.renderRequest.notify(this.current);\n }\n };\n this.hasAnimated = false;\n this.setCurrent(init);\n this.canTrackVelocity = isFloat(this.current);\n this.owner = options.owner;\n }\n setCurrent(current) {\n this.current = current;\n this.updatedAt = time.now();\n }\n setPrevFrameValue(prevFrameValue = this.current) {\n this.prevFrameValue = prevFrameValue;\n this.prevUpdatedAt = this.updatedAt;\n }\n /**\n * Adds a function that will be notified when the `MotionValue` is updated.\n *\n * It returns a function that, when called, will cancel the subscription.\n *\n * When calling `onChange` inside a React component, it should be wrapped with the\n * `useEffect` hook. As it returns an unsubscribe function, this should be returned\n * from the `useEffect` function to ensure you don't add duplicate subscribers..\n *\n * ```jsx\n * export const MyComponent = () => {\n * const x = useMotionValue(0)\n * const y = useMotionValue(0)\n * const opacity = useMotionValue(1)\n *\n * useEffect(() => {\n * function updateOpacity() {\n * const maxXY = Math.max(x.get(), y.get())\n * const newOpacity = transform(maxXY, [0, 100], [1, 0])\n * opacity.set(newOpacity)\n * }\n *\n * const unsubscribeX = x.on(\"change\", updateOpacity)\n * const unsubscribeY = y.on(\"change\", updateOpacity)\n *\n * return () => {\n * unsubscribeX()\n * unsubscribeY()\n * }\n * }, [])\n *\n * return <motion.div style={{ x }} />\n * }\n * ```\n *\n * @param subscriber - A function that receives the latest value.\n * @returns A function that, when called, will cancel this subscription.\n *\n * @deprecated\n */\n onChange(subscription) {\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(false, `value.onChange(callback) is deprecated. Switch to value.on(\"change\", callback).`);\n }\n return this.on(\"change\", subscription);\n }\n on(eventName, callback) {\n if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager();\n }\n const unsubscribe = this.events[eventName].add(callback);\n if (eventName === \"change\") {\n return () => {\n unsubscribe();\n /**\n * If we have no more change listeners by the start\n * of the next frame, stop active animations.\n */\n frame.read(() => {\n if (!this.events.change.getSize()) {\n this.stop();\n }\n });\n };\n }\n return unsubscribe;\n }\n clearListeners() {\n for (const eventManagers in this.events) {\n this.events[eventManagers].clear();\n }\n }\n /**\n * Attaches a passive effect to the `MotionValue`.\n *\n * @internal\n */\n attach(passiveEffect, stopPassiveEffect) {\n this.passiveEffect = passiveEffect;\n this.stopPassiveEffect = stopPassiveEffect;\n }\n /**\n * Sets the state of the `MotionValue`.\n *\n * @remarks\n *\n * ```jsx\n * const x = useMotionValue(0)\n * x.set(10)\n * ```\n *\n * @param latest - Latest value to set.\n * @param render - Whether to notify render subscribers. Defaults to `true`\n *\n * @public\n */\n set(v, render = true) {\n if (!render || !this.passiveEffect) {\n this.updateAndNotify(v, render);\n }\n else {\n this.passiveEffect(v, this.updateAndNotify);\n }\n }\n setWithVelocity(prev, current, delta) {\n this.set(current);\n this.prev = undefined;\n this.prevFrameValue = prev;\n this.prevUpdatedAt = this.updatedAt - delta;\n }\n /**\n * Set the state of the `MotionValue`, stopping any active animations,\n * effects, and resets velocity to `0`.\n */\n jump(v, endAnimation = true) {\n this.updateAndNotify(v);\n this.prev = v;\n this.prevUpdatedAt = this.prevFrameValue = undefined;\n endAnimation && this.stop();\n if (this.stopPassiveEffect)\n this.stopPassiveEffect();\n }\n /**\n * Returns the latest state of `MotionValue`\n *\n * @returns - The latest state of `MotionValue`\n *\n * @public\n */\n get() {\n if (collectMotionValues.current) {\n collectMotionValues.current.push(this);\n }\n return this.current;\n }\n /**\n * @public\n */\n getPrevious() {\n return this.prev;\n }\n /**\n * Returns the latest velocity of `MotionValue`\n *\n * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.\n *\n * @public\n */\n getVelocity() {\n const currentTime = time.now();\n if (!this.canTrackVelocity ||\n this.prevFrameValue === undefined ||\n currentTime - this.updatedAt > MAX_VELOCITY_DELTA) {\n return 0;\n }\n const delta = Math.min(this.updatedAt - this.prevUpdatedAt, MAX_VELOCITY_DELTA);\n // Casts because of parseFloat's poor typing\n return velocityPerSecond(parseFloat(this.current) -\n parseFloat(this.prevFrameValue), delta);\n }\n /**\n * Registers a new animation to control this `MotionValue`. Only one\n * animation can drive a `MotionValue` at one time.\n *\n * ```jsx\n * value.start()\n * ```\n *\n * @param animation - A function that starts the provided animation\n *\n * @internal\n */\n start(startAnimation) {\n this.stop();\n return new Promise((resolve) => {\n this.hasAnimated = true;\n this.animation = startAnimation(resolve);\n if (this.events.animationStart) {\n this.events.animationStart.notify();\n }\n }).then(() => {\n if (this.events.animationComplete) {\n this.events.animationComplete.notify();\n }\n this.clearAnimation();\n });\n }\n /**\n * Stop the currently active animation.\n *\n * @public\n */\n stop() {\n if (this.animation) {\n this.animation.stop();\n if (this.events.animationCancel) {\n this.events.animationCancel.notify();\n }\n }\n this.clearAnimation();\n }\n /**\n * Returns `true` if this value is currently animating.\n *\n * @public\n */\n isAnimating() {\n return !!this.animation;\n }\n clearAnimation() {\n delete this.animation;\n }\n /**\n * Destroy and clean up subscribers to this `MotionValue`.\n *\n * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically\n * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually\n * created a `MotionValue` via the `motionValue` function.\n *\n * @public\n */\n destroy() {\n this.clearListeners();\n this.stop();\n if (this.stopPassiveEffect) {\n this.stopPassiveEffect();\n }\n }\n}\nfunction motionValue(init, options) {\n return new MotionValue(init, options);\n}\n\nexport { MotionValue, collectMotionValues, motionValue };\n","import { resolveFinalValueInKeyframes } from '../../utils/resolve-value.mjs';\nimport { motionValue } from '../../value/index.mjs';\nimport { resolveVariant } from './resolve-dynamic-variants.mjs';\n\n/**\n * Set VisualElement's MotionValue, creating a new MotionValue for it if\n * it doesn't exist.\n */\nfunction setMotionValue(visualElement, key, value) {\n if (visualElement.hasValue(key)) {\n visualElement.getValue(key).set(value);\n }\n else {\n visualElement.addValue(key, motionValue(value));\n }\n}\nfunction setTarget(visualElement, definition) {\n const resolved = resolveVariant(visualElement, definition);\n let { transitionEnd = {}, transition = {}, ...target } = resolved || {};\n target = { ...target, ...transitionEnd };\n for (const key in target) {\n const value = resolveFinalValueInKeyframes(target[key]);\n setMotionValue(visualElement, key, value);\n }\n}\n\nexport { setTarget };\n","import { transformProps } from '../../render/html/utils/transform.mjs';\nimport { optimizedAppearDataAttribute } from '../optimized-appear/data-id.mjs';\nimport { animateMotionValue } from './motion-value.mjs';\nimport { isWillChangeMotionValue } from '../../value/use-will-change/is.mjs';\nimport { setTarget } from '../../render/utils/setters.mjs';\nimport { getValueTransition } from '../utils/transitions.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\n/**\n * Decide whether we should block this animation. Previously, we achieved this\n * just by checking whether the key was listed in protectedKeys, but this\n * posed problems if an animation was triggered by afterChildren and protectedKeys\n * had been set to true in the meantime.\n */\nfunction shouldBlockAnimation({ protectedKeys, needsAnimating }, key) {\n const shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true;\n needsAnimating[key] = false;\n return shouldBlock;\n}\nfunction animateTarget(visualElement, targetAndTransition, { delay = 0, transitionOverride, type } = {}) {\n var _a;\n let { transition = visualElement.getDefaultTransition(), transitionEnd, ...target } = targetAndTransition;\n const willChange = visualElement.getValue(\"willChange\");\n if (transitionOverride)\n transition = transitionOverride;\n const animations = [];\n const animationTypeState = type &&\n visualElement.animationState &&\n visualElement.animationState.getState()[type];\n for (const key in target) {\n const value = visualElement.getValue(key, (_a = visualElement.latestValues[key]) !== null && _a !== void 0 ? _a : null);\n const valueTarget = target[key];\n if (valueTarget === undefined ||\n (animationTypeState &&\n shouldBlockAnimation(animationTypeState, key))) {\n continue;\n }\n const valueTransition = {\n delay,\n elapsed: 0,\n ...getValueTransition(transition || {}, key),\n };\n /**\n * If this is the first time a value is being animated, check\n * to see if we're handling off from an existing animation.\n */\n let isHandoff = false;\n if (window.HandoffAppearAnimations) {\n const props = visualElement.getProps();\n const appearId = props[optimizedAppearDataAttribute];\n if (appearId) {\n const elapsed = window.HandoffAppearAnimations(appearId, key);\n if (elapsed !== null) {\n valueTransition.elapsed = elapsed;\n isHandoff = true;\n }\n }\n }\n value.start(animateMotionValue(key, value, valueTarget, visualElement.shouldReduceMotion && transformProps.has(key)\n ? { type: false }\n : valueTransition, visualElement, isHandoff));\n const animation = value.animation;\n if (animation) {\n if (isWillChangeMotionValue(willChange)) {\n willChange.add(key);\n animation.then(() => willChange.remove(key));\n }\n animations.push(animation);\n }\n }\n if (transitionEnd) {\n Promise.all(animations).then(() => {\n frame.update(() => {\n transitionEnd && setTarget(visualElement, transitionEnd);\n });\n });\n }\n return animations;\n}\n\nexport { animateTarget };\n","import { resolveVariant } from '../../render/utils/resolve-dynamic-variants.mjs';\nimport { animateTarget } from './visual-element-target.mjs';\n\nfunction animateVariant(visualElement, variant, options = {}) {\n var _a;\n const resolved = resolveVariant(visualElement, variant, options.type === \"exit\"\n ? (_a = visualElement.presenceContext) === null || _a === void 0 ? void 0 : _a.custom\n : undefined);\n let { transition = visualElement.getDefaultTransition() || {} } = resolved || {};\n if (options.transitionOverride) {\n transition = options.transitionOverride;\n }\n /**\n * If we have a variant, create a callback that runs it as an animation.\n * Otherwise, we resolve a Promise immediately for a composable no-op.\n */\n const getAnimation = resolved\n ? () => Promise.all(animateTarget(visualElement, resolved, options))\n : () => Promise.resolve();\n /**\n * If we have children, create a callback that runs all their animations.\n * Otherwise, we resolve a Promise immediately for a composable no-op.\n */\n const getChildAnimations = visualElement.variantChildren && visualElement.variantChildren.size\n ? (forwardDelay = 0) => {\n const { delayChildren = 0, staggerChildren, staggerDirection, } = transition;\n return animateChildren(visualElement, variant, delayChildren + forwardDelay, staggerChildren, staggerDirection, options);\n }\n : () => Promise.resolve();\n /**\n * If the transition explicitly defines a \"when\" option, we need to resolve either\n * this animation or all children animations before playing the other.\n */\n const { when } = transition;\n if (when) {\n const [first, last] = when === \"beforeChildren\"\n ? [getAnimation, getChildAnimations]\n : [getChildAnimations, getAnimation];\n return first().then(() => last());\n }\n else {\n return Promise.all([getAnimation(), getChildAnimations(options.delay)]);\n }\n}\nfunction animateChildren(visualElement, variant, delayChildren = 0, staggerChildren = 0, staggerDirection = 1, options) {\n const animations = [];\n const maxStaggerDuration = (visualElement.variantChildren.size - 1) * staggerChildren;\n const generateStaggerDuration = staggerDirection === 1\n ? (i = 0) => i * staggerChildren\n : (i = 0) => maxStaggerDuration - i * staggerChildren;\n Array.from(visualElement.variantChildren)\n .sort(sortByTreeOrder)\n .forEach((child, i) => {\n child.notify(\"AnimationStart\", variant);\n animations.push(animateVariant(child, variant, {\n ...options,\n delay: delayChildren + generateStaggerDuration(i),\n }).then(() => child.notify(\"AnimationComplete\", variant)));\n });\n return Promise.all(animations);\n}\nfunction sortByTreeOrder(a, b) {\n return a.sortNodePosition(b);\n}\n\nexport { animateVariant, sortByTreeOrder };\n","import { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { isKeyframesTarget } from '../../animation/utils/is-keyframes-target.mjs';\nimport { shallowCompare } from '../../utils/shallow-compare.mjs';\nimport { isVariantLabel } from './is-variant-label.mjs';\nimport { resolveVariant } from './resolve-dynamic-variants.mjs';\nimport { variantPriorityOrder } from './variant-props.mjs';\nimport { animateVisualElement } from '../../animation/interfaces/visual-element.mjs';\n\nconst reversePriorityOrder = [...variantPriorityOrder].reverse();\nconst numAnimationTypes = variantPriorityOrder.length;\nfunction animateList(visualElement) {\n return (animations) => Promise.all(animations.map(({ animation, options }) => animateVisualElement(visualElement, animation, options)));\n}\nfunction createAnimationState(visualElement) {\n let animate = animateList(visualElement);\n const state = createState();\n let isInitialRender = true;\n /**\n * This function will be used to reduce the animation definitions for\n * each active animation type into an object of resolved values for it.\n */\n const buildResolvedTypeValues = (type) => (acc, definition) => {\n var _a;\n const resolved = resolveVariant(visualElement, definition, type === \"exit\"\n ? (_a = visualElement.presenceContext) === null || _a === void 0 ? void 0 : _a.custom\n : undefined);\n if (resolved) {\n const { transition, transitionEnd, ...target } = resolved;\n acc = { ...acc, ...target, ...transitionEnd };\n }\n return acc;\n };\n /**\n * This just allows us to inject mocked animation functions\n * @internal\n */\n function setAnimateFunction(makeAnimator) {\n animate = makeAnimator(visualElement);\n }\n /**\n * When we receive new props, we need to:\n * 1. Create a list of protected keys for each type. This is a directory of\n * value keys that are currently being \"handled\" by types of a higher priority\n * so that whenever an animation is played of a given type, these values are\n * protected from being animated.\n * 2. Determine if an animation type needs animating.\n * 3. Determine if any values have been removed from a type and figure out\n * what to animate those to.\n */\n function animateChanges(changedActiveType) {\n const props = visualElement.getProps();\n const context = visualElement.getVariantContext(true) || {};\n /**\n * A list of animations that we'll build into as we iterate through the animation\n * types. This will get executed at the end of the function.\n */\n const animations = [];\n /**\n * Keep track of which values have been removed. Then, as we hit lower priority\n * animation types, we can check if they contain removed values and animate to that.\n */\n const removedKeys = new Set();\n /**\n * A dictionary of all encountered keys. This is an object to let us build into and\n * copy it without iteration. Each time we hit an animation type we set its protected\n * keys - the keys its not allowed to animate - to the latest version of this object.\n */\n let encounteredKeys = {};\n /**\n * If a variant has been removed at a given index, and this component is controlling\n * variant animations, we want to ensure lower-priority variants are forced to animate.\n */\n let removedVariantIndex = Infinity;\n /**\n * Iterate through all animation types in reverse priority order. For each, we want to\n * detect which values it's handling and whether or not they've changed (and therefore\n * need to be animated). If any values have been removed, we want to detect those in\n * lower priority props and flag for animation.\n */\n for (let i = 0; i < numAnimationTypes; i++) {\n const type = reversePriorityOrder[i];\n const typeState = state[type];\n const prop = props[type] !== undefined\n ? props[type]\n : context[type];\n const propIsVariant = isVariantLabel(prop);\n /**\n * If this type has *just* changed isActive status, set activeDelta\n * to that status. Otherwise set to null.\n */\n const activeDelta = type === changedActiveType ? typeState.isActive : null;\n if (activeDelta === false)\n removedVariantIndex = i;\n /**\n * If this prop is an inherited variant, rather than been set directly on the\n * component itself, we want to make sure we allow the parent to trigger animations.\n *\n * TODO: Can probably change this to a !isControllingVariants check\n */\n let isInherited = prop === context[type] &&\n prop !== props[type] &&\n propIsVariant;\n /**\n *\n */\n if (isInherited &&\n isInitialRender &&\n visualElement.manuallyAnimateOnMount) {\n isInherited = false;\n }\n /**\n * Set all encountered keys so far as the protected keys for this type. This will\n * be any key that has been animated or otherwise handled by active, higher-priortiy types.\n */\n typeState.protectedKeys = { ...encounteredKeys };\n // Check if we can skip analysing this prop early\n if (\n // If it isn't active and hasn't *just* been set as inactive\n (!typeState.isActive && activeDelta === null) ||\n // If we didn't and don't have any defined prop for this animation type\n (!prop && !typeState.prevProp) ||\n // Or if the prop doesn't define an animation\n isAnimationControls(prop) ||\n typeof prop === \"boolean\") {\n continue;\n }\n /**\n * As we go look through the values defined on this type, if we detect\n * a changed value or a value that was removed in a higher priority, we set\n * this to true and add this prop to the animation list.\n */\n const variantDidChange = checkVariantsDidChange(typeState.prevProp, prop);\n let shouldAnimateType = variantDidChange ||\n // If we're making this variant active, we want to always make it active\n (type === changedActiveType &&\n typeState.isActive &&\n !isInherited &&\n propIsVariant) ||\n // If we removed a higher-priority variant (i is in reverse order)\n (i > removedVariantIndex && propIsVariant);\n let handledRemovedValues = false;\n /**\n * As animations can be set as variant lists, variants or target objects, we\n * coerce everything to an array if it isn't one already\n */\n const definitionList = Array.isArray(prop) ? prop : [prop];\n /**\n * Build an object of all the resolved values. We'll use this in the subsequent\n * animateChanges calls to determine whether a value has changed.\n */\n let resolvedValues = definitionList.reduce(buildResolvedTypeValues(type), {});\n if (activeDelta === false)\n resolvedValues = {};\n /**\n * Now we need to loop through all the keys in the prev prop and this prop,\n * and decide:\n * 1. If the value has changed, and needs animating\n * 2. If it has been removed, and needs adding to the removedKeys set\n * 3. If it has been removed in a higher priority type and needs animating\n * 4. If it hasn't been removed in a higher priority but hasn't changed, and\n * needs adding to the type's protectedKeys list.\n */\n const { prevResolvedValues = {} } = typeState;\n const allKeys = {\n ...prevResolvedValues,\n ...resolvedValues,\n };\n const markToAnimate = (key) => {\n shouldAnimateType = true;\n if (removedKeys.has(key)) {\n handledRemovedValues = true;\n removedKeys.delete(key);\n }\n typeState.needsAnimating[key] = true;\n const motionValue = visualElement.getValue(key);\n if (motionValue)\n motionValue.liveStyle = false;\n };\n for (const key in allKeys) {\n const next = resolvedValues[key];\n const prev = prevResolvedValues[key];\n // If we've already handled this we can just skip ahead\n if (encounteredKeys.hasOwnProperty(key))\n continue;\n /**\n * If the value has changed, we probably want to animate it.\n */\n let valueHasChanged = false;\n if (isKeyframesTarget(next) && isKeyframesTarget(prev)) {\n valueHasChanged = !shallowCompare(next, prev);\n }\n else {\n valueHasChanged = next !== prev;\n }\n if (valueHasChanged) {\n if (next !== undefined && next !== null) {\n // If next is defined and doesn't equal prev, it needs animating\n markToAnimate(key);\n }\n else {\n // If it's undefined, it's been removed.\n removedKeys.add(key);\n }\n }\n else if (next !== undefined && removedKeys.has(key)) {\n /**\n * If next hasn't changed and it isn't undefined, we want to check if it's\n * been removed by a higher priority\n */\n markToAnimate(key);\n }\n else {\n /**\n * If it hasn't changed, we add it to the list of protected values\n * to ensure it doesn't get animated.\n */\n typeState.protectedKeys[key] = true;\n }\n }\n /**\n * Update the typeState so next time animateChanges is called we can compare the\n * latest prop and resolvedValues to these.\n */\n typeState.prevProp = prop;\n typeState.prevResolvedValues = resolvedValues;\n /**\n *\n */\n if (typeState.isActive) {\n encounteredKeys = { ...encounteredKeys, ...resolvedValues };\n }\n if (isInitialRender && visualElement.blockInitialAnimation) {\n shouldAnimateType = false;\n }\n /**\n * If this is an inherited prop we want to hard-block animations\n */\n if (shouldAnimateType && (!isInherited || handledRemovedValues)) {\n animations.push(...definitionList.map((animation) => ({\n animation: animation,\n options: { type },\n })));\n }\n }\n /**\n * If there are some removed value that haven't been dealt with,\n * we need to create a new animation that falls back either to the value\n * defined in the style prop, or the last read value.\n */\n if (removedKeys.size) {\n const fallbackAnimation = {};\n removedKeys.forEach((key) => {\n const fallbackTarget = visualElement.getBaseTarget(key);\n const motionValue = visualElement.getValue(key);\n if (motionValue)\n motionValue.liveStyle = true;\n // @ts-expect-error - @mattgperry to figure if we should do something here\n fallbackAnimation[key] = fallbackTarget !== null && fallbackTarget !== void 0 ? fallbackTarget : null;\n });\n animations.push({ animation: fallbackAnimation });\n }\n let shouldAnimate = Boolean(animations.length);\n if (isInitialRender &&\n (props.initial === false || props.initial === props.animate) &&\n !visualElement.manuallyAnimateOnMount) {\n shouldAnimate = false;\n }\n isInitialRender = false;\n return shouldAnimate ? animate(animations) : Promise.resolve();\n }\n /**\n * Change whether a certain animation type is active.\n */\n function setActive(type, isActive) {\n var _a;\n // If the active state hasn't changed, we can safely do nothing here\n if (state[type].isActive === isActive)\n return Promise.resolve();\n // Propagate active change to children\n (_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.forEach((child) => { var _a; return (_a = child.animationState) === null || _a === void 0 ? void 0 : _a.setActive(type, isActive); });\n state[type].isActive = isActive;\n const animations = animateChanges(type);\n for (const key in state) {\n state[key].protectedKeys = {};\n }\n return animations;\n }\n return {\n animateChanges,\n setActive,\n setAnimateFunction,\n getState: () => state,\n };\n}\nfunction checkVariantsDidChange(prev, next) {\n if (typeof next === \"string\") {\n return next !== prev;\n }\n else if (Array.isArray(next)) {\n return !shallowCompare(next, prev);\n }\n return false;\n}\nfunction createTypeState(isActive = false) {\n return {\n isActive,\n protectedKeys: {},\n needsAnimating: {},\n prevResolvedValues: {},\n };\n}\nfunction createState() {\n return {\n animate: createTypeState(true),\n whileInView: createTypeState(),\n whileHover: createTypeState(),\n whileTap: createTypeState(),\n whileDrag: createTypeState(),\n whileFocus: createTypeState(),\n exit: createTypeState(),\n };\n}\n\nexport { checkVariantsDidChange, createAnimationState };\n","import { resolveVariant } from '../../render/utils/resolve-dynamic-variants.mjs';\nimport { animateTarget } from './visual-element-target.mjs';\nimport { animateVariant } from './visual-element-variant.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nfunction animateVisualElement(visualElement, definition, options = {}) {\n visualElement.notify(\"AnimationStart\", definition);\n let animation;\n if (Array.isArray(definition)) {\n const animations = definition.map((variant) => animateVariant(visualElement, variant, options));\n animation = Promise.all(animations);\n }\n else if (typeof definition === \"string\") {\n animation = animateVariant(visualElement, definition, options);\n }\n else {\n const resolvedDefinition = typeof definition === \"function\"\n ? resolveVariant(visualElement, definition, options.custom)\n : definition;\n animation = Promise.all(animateTarget(visualElement, resolvedDefinition, options));\n }\n return animation.then(() => {\n frame.postRender(() => {\n visualElement.notify(\"AnimationComplete\", definition);\n });\n });\n}\n\nexport { animateVisualElement };\n","import { Feature } from '../Feature.mjs';\n\nlet id = 0;\nclass ExitAnimationFeature extends Feature {\n constructor() {\n super(...arguments);\n this.id = id++;\n }\n update() {\n if (!this.node.presenceContext)\n return;\n const { isPresent, onExitComplete } = this.node.presenceContext;\n const { isPresent: prevIsPresent } = this.node.prevPresenceContext || {};\n if (!this.node.animationState || isPresent === prevIsPresent) {\n return;\n }\n const exitAnimation = this.node.animationState.setActive(\"exit\", !isPresent);\n if (onExitComplete && !isPresent) {\n exitAnimation.then(() => onExitComplete(this.id));\n }\n }\n mount() {\n const { register } = this.node.presenceContext || {};\n if (register) {\n this.unmount = register(this.id);\n }\n }\n unmount() { }\n}\n\nexport { ExitAnimationFeature };\n","import { AnimationFeature } from './animation/index.mjs';\nimport { ExitAnimationFeature } from './animation/exit.mjs';\n\nconst animations = {\n animation: {\n Feature: AnimationFeature,\n },\n exit: {\n Feature: ExitAnimationFeature,\n },\n};\n\nexport { animations };\n","import { isAnimationControls } from '../../../animation/utils/is-animation-controls.mjs';\nimport { createAnimationState } from '../../../render/utils/animation-state.mjs';\nimport { Feature } from '../Feature.mjs';\n\nclass AnimationFeature extends Feature {\n /**\n * We dynamically generate the AnimationState manager as it contains a reference\n * to the underlying animation library. We only want to load that if we load this,\n * so people can optionally code split it out using the `m` component.\n */\n constructor(node) {\n super(node);\n node.animationState || (node.animationState = createAnimationState(node));\n }\n updateAnimationControlsSubscription() {\n const { animate } = this.node.getProps();\n this.unmount();\n if (isAnimationControls(animate)) {\n this.unmount = animate.subscribe(this.node);\n }\n }\n /**\n * Subscribe any provided AnimationControls to the component's VisualElement\n */\n mount() {\n this.updateAnimationControlsSubscription();\n }\n update() {\n const { animate } = this.node.getProps();\n const { animate: prevAnimate } = this.node.prevProps || {};\n if (animate !== prevAnimate) {\n this.updateAnimationControlsSubscription();\n }\n }\n unmount() { }\n}\n\nexport { AnimationFeature };\n","const distance = (a, b) => Math.abs(a - b);\nfunction distance2D(a, b) {\n // Multi-dimensional\n const xDelta = distance(a.x, b.x);\n const yDelta = distance(a.y, b.y);\n return Math.sqrt(xDelta ** 2 + yDelta ** 2);\n}\n\nexport { distance, distance2D };\n","import { extractEventInfo } from '../../events/event-info.mjs';\nimport { secondsToMilliseconds, millisecondsToSeconds } from '../../utils/time-conversion.mjs';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { pipe } from '../../utils/pipe.mjs';\nimport { distance2D } from '../../utils/distance.mjs';\nimport { isPrimaryPointer } from '../../events/utils/is-primary-pointer.mjs';\nimport { frame, cancelFrame, frameData } from '../../frameloop/frame.mjs';\n\n/**\n * @internal\n */\nclass PanSession {\n constructor(event, handlers, { transformPagePoint, contextWindow, dragSnapToOrigin = false } = {}) {\n /**\n * @internal\n */\n this.startEvent = null;\n /**\n * @internal\n */\n this.lastMoveEvent = null;\n /**\n * @internal\n */\n this.lastMoveEventInfo = null;\n /**\n * @internal\n */\n this.handlers = {};\n /**\n * @internal\n */\n this.contextWindow = window;\n this.updatePoint = () => {\n if (!(this.lastMoveEvent && this.lastMoveEventInfo))\n return;\n const info = getPanInfo(this.lastMoveEventInfo, this.history);\n const isPanStarted = this.startEvent !== null;\n // Only start panning if the offset is larger than 3 pixels. If we make it\n // any larger than this we'll want to reset the pointer history\n // on the first update to avoid visual snapping to the cursoe.\n const isDistancePastThreshold = distance2D(info.offset, { x: 0, y: 0 }) >= 3;\n if (!isPanStarted && !isDistancePastThreshold)\n return;\n const { point } = info;\n const { timestamp } = frameData;\n this.history.push({ ...point, timestamp });\n const { onStart, onMove } = this.handlers;\n if (!isPanStarted) {\n onStart && onStart(this.lastMoveEvent, info);\n this.startEvent = this.lastMoveEvent;\n }\n onMove && onMove(this.lastMoveEvent, info);\n };\n this.handlePointerMove = (event, info) => {\n this.lastMoveEvent = event;\n this.lastMoveEventInfo = transformPoint(info, this.transformPagePoint);\n // Throttle mouse move event to once per frame\n frame.update(this.updatePoint, true);\n };\n this.handlePointerUp = (event, info) => {\n this.end();\n const { onEnd, onSessionEnd, resumeAnimation } = this.handlers;\n if (this.dragSnapToOrigin)\n resumeAnimation && resumeAnimation();\n if (!(this.lastMoveEvent && this.lastMoveEventInfo))\n return;\n const panInfo = getPanInfo(event.type === \"pointercancel\"\n ? this.lastMoveEventInfo\n : transformPoint(info, this.transformPagePoint), this.history);\n if (this.startEvent && onEnd) {\n onEnd(event, panInfo);\n }\n onSessionEnd && onSessionEnd(event, panInfo);\n };\n // If we have more than one touch, don't start detecting this gesture\n if (!isPrimaryPointer(event))\n return;\n this.dragSnapToOrigin = dragSnapToOrigin;\n this.handlers = handlers;\n this.transformPagePoint = transformPagePoint;\n this.contextWindow = contextWindow || window;\n const info = extractEventInfo(event);\n const initialInfo = transformPoint(info, this.transformPagePoint);\n const { point } = initialInfo;\n const { timestamp } = frameData;\n this.history = [{ ...point, timestamp }];\n const { onSessionStart } = handlers;\n onSessionStart &&\n onSessionStart(event, getPanInfo(initialInfo, this.history));\n this.removeListeners = pipe(addPointerEvent(this.contextWindow, \"pointermove\", this.handlePointerMove), addPointerEvent(this.contextWindow, \"pointerup\", this.handlePointerUp), addPointerEvent(this.contextWindow, \"pointercancel\", this.handlePointerUp));\n }\n updateHandlers(handlers) {\n this.handlers = handlers;\n }\n end() {\n this.removeListeners && this.removeListeners();\n cancelFrame(this.updatePoint);\n }\n}\nfunction transformPoint(info, transformPagePoint) {\n return transformPagePoint ? { point: transformPagePoint(info.point) } : info;\n}\nfunction subtractPoint(a, b) {\n return { x: a.x - b.x, y: a.y - b.y };\n}\nfunction getPanInfo({ point }, history) {\n return {\n point,\n delta: subtractPoint(point, lastDevicePoint(history)),\n offset: subtractPoint(point, startDevicePoint(history)),\n velocity: getVelocity(history, 0.1),\n };\n}\nfunction startDevicePoint(history) {\n return history[0];\n}\nfunction lastDevicePoint(history) {\n return history[history.length - 1];\n}\nfunction getVelocity(history, timeDelta) {\n if (history.length < 2) {\n return { x: 0, y: 0 };\n }\n let i = history.length - 1;\n let timestampedPoint = null;\n const lastPoint = lastDevicePoint(history);\n while (i >= 0) {\n timestampedPoint = history[i];\n if (lastPoint.timestamp - timestampedPoint.timestamp >\n secondsToMilliseconds(timeDelta)) {\n break;\n }\n i--;\n }\n if (!timestampedPoint) {\n return { x: 0, y: 0 };\n }\n const time = millisecondsToSeconds(lastPoint.timestamp - timestampedPoint.timestamp);\n if (time === 0) {\n return { x: 0, y: 0 };\n }\n const currentVelocity = {\n x: (lastPoint.x - timestampedPoint.x) / time,\n y: (lastPoint.y - timestampedPoint.y) / time,\n };\n if (currentVelocity.x === Infinity) {\n currentVelocity.x = 0;\n }\n if (currentVelocity.y === Infinity) {\n currentVelocity.y = 0;\n }\n return currentVelocity;\n}\n\nexport { PanSession };\n","import { mixNumber } from '../../utils/mix/number.mjs';\n\nfunction calcLength(axis) {\n return axis.max - axis.min;\n}\nfunction isNear(value, target = 0, maxDistance = 0.01) {\n return Math.abs(value - target) <= maxDistance;\n}\nfunction calcAxisDelta(delta, source, target, origin = 0.5) {\n delta.origin = origin;\n delta.originPoint = mixNumber(source.min, source.max, delta.origin);\n delta.scale = calcLength(target) / calcLength(source);\n if (isNear(delta.scale, 1, 0.0001) || isNaN(delta.scale))\n delta.scale = 1;\n delta.translate =\n mixNumber(target.min, target.max, delta.origin) - delta.originPoint;\n if (isNear(delta.translate) || isNaN(delta.translate))\n delta.translate = 0;\n}\nfunction calcBoxDelta(delta, source, target, origin) {\n calcAxisDelta(delta.x, source.x, target.x, origin ? origin.originX : undefined);\n calcAxisDelta(delta.y, source.y, target.y, origin ? origin.originY : undefined);\n}\nfunction calcRelativeAxis(target, relative, parent) {\n target.min = parent.min + relative.min;\n target.max = target.min + calcLength(relative);\n}\nfunction calcRelativeBox(target, relative, parent) {\n calcRelativeAxis(target.x, relative.x, parent.x);\n calcRelativeAxis(target.y, relative.y, parent.y);\n}\nfunction calcRelativeAxisPosition(target, layout, parent) {\n target.min = layout.min - parent.min;\n target.max = target.min + calcLength(layout);\n}\nfunction calcRelativePosition(target, layout, parent) {\n calcRelativeAxisPosition(target.x, layout.x, parent.x);\n calcRelativeAxisPosition(target.y, layout.y, parent.y);\n}\n\nexport { calcAxisDelta, calcBoxDelta, calcLength, calcRelativeAxis, calcRelativeAxisPosition, calcRelativeBox, calcRelativePosition, isNear };\n","import { progress } from '../../../utils/progress.mjs';\nimport { calcLength } from '../../../projection/geometry/delta-calc.mjs';\nimport { clamp } from '../../../utils/clamp.mjs';\nimport { mixNumber } from '../../../utils/mix/number.mjs';\n\n/**\n * Apply constraints to a point. These constraints are both physical along an\n * axis, and an elastic factor that determines how much to constrain the point\n * by if it does lie outside the defined parameters.\n */\nfunction applyConstraints(point, { min, max }, elastic) {\n if (min !== undefined && point < min) {\n // If we have a min point defined, and this is outside of that, constrain\n point = elastic\n ? mixNumber(min, point, elastic.min)\n : Math.max(point, min);\n }\n else if (max !== undefined && point > max) {\n // If we have a max point defined, and this is outside of that, constrain\n point = elastic\n ? mixNumber(max, point, elastic.max)\n : Math.min(point, max);\n }\n return point;\n}\n/**\n * Calculate constraints in terms of the viewport when defined relatively to the\n * measured axis. This is measured from the nearest edge, so a max constraint of 200\n * on an axis with a max value of 300 would return a constraint of 500 - axis length\n */\nfunction calcRelativeAxisConstraints(axis, min, max) {\n return {\n min: min !== undefined ? axis.min + min : undefined,\n max: max !== undefined\n ? axis.max + max - (axis.max - axis.min)\n : undefined,\n };\n}\n/**\n * Calculate constraints in terms of the viewport when\n * defined relatively to the measured bounding box.\n */\nfunction calcRelativeConstraints(layoutBox, { top, left, bottom, right }) {\n return {\n x: calcRelativeAxisConstraints(layoutBox.x, left, right),\n y: calcRelativeAxisConstraints(layoutBox.y, top, bottom),\n };\n}\n/**\n * Calculate viewport constraints when defined as another viewport-relative axis\n */\nfunction calcViewportAxisConstraints(layoutAxis, constraintsAxis) {\n let min = constraintsAxis.min - layoutAxis.min;\n let max = constraintsAxis.max - layoutAxis.max;\n // If the constraints axis is actually smaller than the layout axis then we can\n // flip the constraints\n if (constraintsAxis.max - constraintsAxis.min <\n layoutAxis.max - layoutAxis.min) {\n [min, max] = [max, min];\n }\n return { min, max };\n}\n/**\n * Calculate viewport constraints when defined as another viewport-relative box\n */\nfunction calcViewportConstraints(layoutBox, constraintsBox) {\n return {\n x: calcViewportAxisConstraints(layoutBox.x, constraintsBox.x),\n y: calcViewportAxisConstraints(layoutBox.y, constraintsBox.y),\n };\n}\n/**\n * Calculate a transform origin relative to the source axis, between 0-1, that results\n * in an asthetically pleasing scale/transform needed to project from source to target.\n */\nfunction calcOrigin(source, target) {\n let origin = 0.5;\n const sourceLength = calcLength(source);\n const targetLength = calcLength(target);\n if (targetLength > sourceLength) {\n origin = progress(target.min, target.max - sourceLength, source.min);\n }\n else if (sourceLength > targetLength) {\n origin = progress(source.min, source.max - targetLength, target.min);\n }\n return clamp(0, 1, origin);\n}\n/**\n * Rebase the calculated viewport constraints relative to the layout.min point.\n */\nfunction rebaseAxisConstraints(layout, constraints) {\n const relativeConstraints = {};\n if (constraints.min !== undefined) {\n relativeConstraints.min = constraints.min - layout.min;\n }\n if (constraints.max !== undefined) {\n relativeConstraints.max = constraints.max - layout.min;\n }\n return relativeConstraints;\n}\nconst defaultElastic = 0.35;\n/**\n * Accepts a dragElastic prop and returns resolved elastic values for each axis.\n */\nfunction resolveDragElastic(dragElastic = defaultElastic) {\n if (dragElastic === false) {\n dragElastic = 0;\n }\n else if (dragElastic === true) {\n dragElastic = defaultElastic;\n }\n return {\n x: resolveAxisElastic(dragElastic, \"left\", \"right\"),\n y: resolveAxisElastic(dragElastic, \"top\", \"bottom\"),\n };\n}\nfunction resolveAxisElastic(dragElastic, minLabel, maxLabel) {\n return {\n min: resolvePointElastic(dragElastic, minLabel),\n max: resolvePointElastic(dragElastic, maxLabel),\n };\n}\nfunction resolvePointElastic(dragElastic, label) {\n return typeof dragElastic === \"number\"\n ? dragElastic\n : dragElastic[label] || 0;\n}\n\nexport { applyConstraints, calcOrigin, calcRelativeAxisConstraints, calcRelativeConstraints, calcViewportAxisConstraints, calcViewportConstraints, defaultElastic, rebaseAxisConstraints, resolveAxisElastic, resolveDragElastic, resolvePointElastic };\n","const createAxisDelta = () => ({\n translate: 0,\n scale: 1,\n origin: 0,\n originPoint: 0,\n});\nconst createDelta = () => ({\n x: createAxisDelta(),\n y: createAxisDelta(),\n});\nconst createAxis = () => ({ min: 0, max: 0 });\nconst createBox = () => ({\n x: createAxis(),\n y: createAxis(),\n});\n\nexport { createAxis, createAxisDelta, createBox, createDelta };\n","function eachAxis(callback) {\n return [callback(\"x\"), callback(\"y\")];\n}\n\nexport { eachAxis };\n","/**\n * Bounding boxes tend to be defined as top, left, right, bottom. For various operations\n * it's easier to consider each axis individually. This function returns a bounding box\n * as a map of single-axis min/max values.\n */\nfunction convertBoundingBoxToBox({ top, left, right, bottom, }) {\n return {\n x: { min: left, max: right },\n y: { min: top, max: bottom },\n };\n}\nfunction convertBoxToBoundingBox({ x, y }) {\n return { top: y.min, right: x.max, bottom: y.max, left: x.min };\n}\n/**\n * Applies a TransformPoint function to a bounding box. TransformPoint is usually a function\n * provided by Framer to allow measured points to be corrected for device scaling. This is used\n * when measuring DOM elements and DOM event points.\n */\nfunction transformBoxPoints(point, transformPoint) {\n if (!transformPoint)\n return point;\n const topLeft = transformPoint({ x: point.left, y: point.top });\n const bottomRight = transformPoint({ x: point.right, y: point.bottom });\n return {\n top: topLeft.y,\n left: topLeft.x,\n bottom: bottomRight.y,\n right: bottomRight.x,\n };\n}\n\nexport { convertBoundingBoxToBox, convertBoxToBoundingBox, transformBoxPoints };\n","function isIdentityScale(scale) {\n return scale === undefined || scale === 1;\n}\nfunction hasScale({ scale, scaleX, scaleY }) {\n return (!isIdentityScale(scale) ||\n !isIdentityScale(scaleX) ||\n !isIdentityScale(scaleY));\n}\nfunction hasTransform(values) {\n return (hasScale(values) ||\n has2DTranslate(values) ||\n values.z ||\n values.rotate ||\n values.rotateX ||\n values.rotateY ||\n values.skewX ||\n values.skewY);\n}\nfunction has2DTranslate(values) {\n return is2DTranslate(values.x) || is2DTranslate(values.y);\n}\nfunction is2DTranslate(value) {\n return value && value !== \"0%\";\n}\n\nexport { has2DTranslate, hasScale, hasTransform };\n","import { mixNumber } from '../../utils/mix/number.mjs';\nimport { hasTransform } from '../utils/has-transform.mjs';\n\n/**\n * Scales a point based on a factor and an originPoint\n */\nfunction scalePoint(point, scale, originPoint) {\n const distanceFromOrigin = point - originPoint;\n const scaled = scale * distanceFromOrigin;\n return originPoint + scaled;\n}\n/**\n * Applies a translate/scale delta to a point\n */\nfunction applyPointDelta(point, translate, scale, originPoint, boxScale) {\n if (boxScale !== undefined) {\n point = scalePoint(point, boxScale, originPoint);\n }\n return scalePoint(point, scale, originPoint) + translate;\n}\n/**\n * Applies a translate/scale delta to an axis\n */\nfunction applyAxisDelta(axis, translate = 0, scale = 1, originPoint, boxScale) {\n axis.min = applyPointDelta(axis.min, translate, scale, originPoint, boxScale);\n axis.max = applyPointDelta(axis.max, translate, scale, originPoint, boxScale);\n}\n/**\n * Applies a translate/scale delta to a box\n */\nfunction applyBoxDelta(box, { x, y }) {\n applyAxisDelta(box.x, x.translate, x.scale, x.originPoint);\n applyAxisDelta(box.y, y.translate, y.scale, y.originPoint);\n}\n/**\n * Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms\n * in a tree upon our box before then calculating how to project it into our desired viewport-relative box\n *\n * This is the final nested loop within updateLayoutDelta for future refactoring\n */\nfunction applyTreeDeltas(box, treeScale, treePath, isSharedTransition = false) {\n const treeLength = treePath.length;\n if (!treeLength)\n return;\n // Reset the treeScale\n treeScale.x = treeScale.y = 1;\n let node;\n let delta;\n for (let i = 0; i < treeLength; i++) {\n node = treePath[i];\n delta = node.projectionDelta;\n /**\n * TODO: Prefer to remove this, but currently we have motion components with\n * display: contents in Framer.\n */\n const instance = node.instance;\n if (instance &&\n instance.style &&\n instance.style.display === \"contents\") {\n continue;\n }\n if (isSharedTransition &&\n node.options.layoutScroll &&\n node.scroll &&\n node !== node.root) {\n transformBox(box, {\n x: -node.scroll.offset.x,\n y: -node.scroll.offset.y,\n });\n }\n if (delta) {\n // Incoporate each ancestor's scale into a culmulative treeScale for this component\n treeScale.x *= delta.x.scale;\n treeScale.y *= delta.y.scale;\n // Apply each ancestor's calculated delta into this component's recorded layout box\n applyBoxDelta(box, delta);\n }\n if (isSharedTransition && hasTransform(node.latestValues)) {\n transformBox(box, node.latestValues);\n }\n }\n /**\n * Snap tree scale back to 1 if it's within a non-perceivable threshold.\n * This will help reduce useless scales getting rendered.\n */\n treeScale.x = snapToDefault(treeScale.x);\n treeScale.y = snapToDefault(treeScale.y);\n}\nfunction snapToDefault(scale) {\n if (Number.isInteger(scale))\n return scale;\n return scale > 1.0000000000001 || scale < 0.999999999999 ? scale : 1;\n}\nfunction translateAxis(axis, distance) {\n axis.min = axis.min + distance;\n axis.max = axis.max + distance;\n}\n/**\n * Apply a transform to an axis from the latest resolved motion values.\n * This function basically acts as a bridge between a flat motion value map\n * and applyAxisDelta\n */\nfunction transformAxis(axis, transforms, [key, scaleKey, originKey]) {\n const axisOrigin = transforms[originKey] !== undefined ? transforms[originKey] : 0.5;\n const originPoint = mixNumber(axis.min, axis.max, axisOrigin);\n // Apply the axis delta to the final axis\n applyAxisDelta(axis, transforms[key], transforms[scaleKey], originPoint, transforms.scale);\n}\n/**\n * The names of the motion values we want to apply as translation, scale and origin.\n */\nconst xKeys = [\"x\", \"scaleX\", \"originX\"];\nconst yKeys = [\"y\", \"scaleY\", \"originY\"];\n/**\n * Apply a transform to a box from the latest resolved motion values.\n */\nfunction transformBox(box, transform) {\n transformAxis(box.x, transform, xKeys);\n transformAxis(box.y, transform, yKeys);\n}\n\nexport { applyAxisDelta, applyBoxDelta, applyPointDelta, applyTreeDeltas, scalePoint, transformAxis, transformBox, translateAxis };\n","import { convertBoundingBoxToBox, transformBoxPoints } from '../geometry/conversion.mjs';\nimport { translateAxis } from '../geometry/delta-apply.mjs';\n\nfunction measureViewportBox(instance, transformPoint) {\n return convertBoundingBoxToBox(transformBoxPoints(instance.getBoundingClientRect(), transformPoint));\n}\nfunction measurePageBox(element, rootProjectionNode, transformPagePoint) {\n const viewportBox = measureViewportBox(element, transformPagePoint);\n const { scroll } = rootProjectionNode;\n if (scroll) {\n translateAxis(viewportBox.x, scroll.offset.x);\n translateAxis(viewportBox.y, scroll.offset.y);\n }\n return viewportBox;\n}\n\nexport { measurePageBox, measureViewportBox };\n","// Fixes https://github.com/framer/motion/issues/2270\nconst getContextWindow = ({ current }) => {\n return current ? current.ownerDocument.defaultView : null;\n};\n\nexport { getContextWindow };\n","import { invariant } from '../../utils/errors.mjs';\nimport { PanSession } from '../pan/PanSession.mjs';\nimport { getGlobalLock } from './utils/lock.mjs';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { applyConstraints, calcRelativeConstraints, resolveDragElastic, calcViewportConstraints, rebaseAxisConstraints, calcOrigin, defaultElastic } from './utils/constraints.mjs';\nimport { createBox } from '../../projection/geometry/models.mjs';\nimport { eachAxis } from '../../projection/utils/each-axis.mjs';\nimport { measurePageBox } from '../../projection/utils/measure.mjs';\nimport { extractEventInfo } from '../../events/event-info.mjs';\nimport { convertBoxToBoundingBox, convertBoundingBoxToBox } from '../../projection/geometry/conversion.mjs';\nimport { addDomEvent } from '../../events/add-dom-event.mjs';\nimport { calcLength } from '../../projection/geometry/delta-calc.mjs';\nimport { mixNumber } from '../../utils/mix/number.mjs';\nimport { percent } from '../../value/types/numbers/units.mjs';\nimport { animateMotionValue } from '../../animation/interfaces/motion-value.mjs';\nimport { getContextWindow } from '../../utils/get-context-window.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst elementDragControls = new WeakMap();\n/**\n *\n */\n// let latestPointerEvent: PointerEvent\nclass VisualElementDragControls {\n constructor(visualElement) {\n // This is a reference to the global drag gesture lock, ensuring only one component\n // can \"capture\" the drag of one or both axes.\n // TODO: Look into moving this into pansession?\n this.openGlobalLock = null;\n this.isDragging = false;\n this.currentDirection = null;\n this.originPoint = { x: 0, y: 0 };\n /**\n * The permitted boundaries of travel, in pixels.\n */\n this.constraints = false;\n this.hasMutatedConstraints = false;\n /**\n * The per-axis resolved elastic values.\n */\n this.elastic = createBox();\n this.visualElement = visualElement;\n }\n start(originEvent, { snapToCursor = false } = {}) {\n /**\n * Don't start dragging if this component is exiting\n */\n const { presenceContext } = this.visualElement;\n if (presenceContext && presenceContext.isPresent === false)\n return;\n const onSessionStart = (event) => {\n const { dragSnapToOrigin } = this.getProps();\n // Stop or pause any animations on both axis values immediately. This allows the user to throw and catch\n // the component.\n dragSnapToOrigin ? this.pauseAnimation() : this.stopAnimation();\n if (snapToCursor) {\n this.snapToCursor(extractEventInfo(event, \"page\").point);\n }\n };\n const onStart = (event, info) => {\n // Attempt to grab the global drag gesture lock - maybe make this part of PanSession\n const { drag, dragPropagation, onDragStart } = this.getProps();\n if (drag && !dragPropagation) {\n if (this.openGlobalLock)\n this.openGlobalLock();\n this.openGlobalLock = getGlobalLock(drag);\n // If we don 't have the lock, don't start dragging\n if (!this.openGlobalLock)\n return;\n }\n this.isDragging = true;\n this.currentDirection = null;\n this.resolveConstraints();\n if (this.visualElement.projection) {\n this.visualElement.projection.isAnimationBlocked = true;\n this.visualElement.projection.target = undefined;\n }\n /**\n * Record gesture origin\n */\n eachAxis((axis) => {\n let current = this.getAxisMotionValue(axis).get() || 0;\n /**\n * If the MotionValue is a percentage value convert to px\n */\n if (percent.test(current)) {\n const { projection } = this.visualElement;\n if (projection && projection.layout) {\n const measuredAxis = projection.layout.layoutBox[axis];\n if (measuredAxis) {\n const length = calcLength(measuredAxis);\n current = length * (parseFloat(current) / 100);\n }\n }\n }\n this.originPoint[axis] = current;\n });\n // Fire onDragStart event\n if (onDragStart) {\n frame.postRender(() => onDragStart(event, info));\n }\n const { animationState } = this.visualElement;\n animationState && animationState.setActive(\"whileDrag\", true);\n };\n const onMove = (event, info) => {\n // latestPointerEvent = event\n const { dragPropagation, dragDirectionLock, onDirectionLock, onDrag, } = this.getProps();\n // If we didn't successfully receive the gesture lock, early return.\n if (!dragPropagation && !this.openGlobalLock)\n return;\n const { offset } = info;\n // Attempt to detect drag direction if directionLock is true\n if (dragDirectionLock && this.currentDirection === null) {\n this.currentDirection = getCurrentDirection(offset);\n // If we've successfully set a direction, notify listener\n if (this.currentDirection !== null) {\n onDirectionLock && onDirectionLock(this.currentDirection);\n }\n return;\n }\n // Update each point with the latest position\n this.updateAxis(\"x\", info.point, offset);\n this.updateAxis(\"y\", info.point, offset);\n /**\n * Ideally we would leave the renderer to fire naturally at the end of\n * this frame but if the element is about to change layout as the result\n * of a re-render we want to ensure the browser can read the latest\n * bounding box to ensure the pointer and element don't fall out of sync.\n */\n this.visualElement.render();\n /**\n * This must fire after the render call as it might trigger a state\n * change which itself might trigger a layout update.\n */\n onDrag && onDrag(event, info);\n };\n const onSessionEnd = (event, info) => this.stop(event, info);\n const resumeAnimation = () => eachAxis((axis) => {\n var _a;\n return this.getAnimationState(axis) === \"paused\" &&\n ((_a = this.getAxisMotionValue(axis).animation) === null || _a === void 0 ? void 0 : _a.play());\n });\n const { dragSnapToOrigin } = this.getProps();\n this.panSession = new PanSession(originEvent, {\n onSessionStart,\n onStart,\n onMove,\n onSessionEnd,\n resumeAnimation,\n }, {\n transformPagePoint: this.visualElement.getTransformPagePoint(),\n dragSnapToOrigin,\n contextWindow: getContextWindow(this.visualElement),\n });\n }\n stop(event, info) {\n const isDragging = this.isDragging;\n this.cancel();\n if (!isDragging)\n return;\n const { velocity } = info;\n this.startAnimation(velocity);\n const { onDragEnd } = this.getProps();\n if (onDragEnd) {\n frame.postRender(() => onDragEnd(event, info));\n }\n }\n cancel() {\n this.isDragging = false;\n const { projection, animationState } = this.visualElement;\n if (projection) {\n projection.isAnimationBlocked = false;\n }\n this.panSession && this.panSession.end();\n this.panSession = undefined;\n const { dragPropagation } = this.getProps();\n if (!dragPropagation && this.openGlobalLock) {\n this.openGlobalLock();\n this.openGlobalLock = null;\n }\n animationState && animationState.setActive(\"whileDrag\", false);\n }\n updateAxis(axis, _point, offset) {\n const { drag } = this.getProps();\n // If we're not dragging this axis, do an early return.\n if (!offset || !shouldDrag(axis, drag, this.currentDirection))\n return;\n const axisValue = this.getAxisMotionValue(axis);\n let next = this.originPoint[axis] + offset[axis];\n // Apply constraints\n if (this.constraints && this.constraints[axis]) {\n next = applyConstraints(next, this.constraints[axis], this.elastic[axis]);\n }\n axisValue.set(next);\n }\n resolveConstraints() {\n var _a;\n const { dragConstraints, dragElastic } = this.getProps();\n const layout = this.visualElement.projection &&\n !this.visualElement.projection.layout\n ? this.visualElement.projection.measure(false)\n : (_a = this.visualElement.projection) === null || _a === void 0 ? void 0 : _a.layout;\n const prevConstraints = this.constraints;\n if (dragConstraints && isRefObject(dragConstraints)) {\n if (!this.constraints) {\n this.constraints = this.resolveRefConstraints();\n }\n }\n else {\n if (dragConstraints && layout) {\n this.constraints = calcRelativeConstraints(layout.layoutBox, dragConstraints);\n }\n else {\n this.constraints = false;\n }\n }\n this.elastic = resolveDragElastic(dragElastic);\n /**\n * If we're outputting to external MotionValues, we want to rebase the measured constraints\n * from viewport-relative to component-relative.\n */\n if (prevConstraints !== this.constraints &&\n layout &&\n this.constraints &&\n !this.hasMutatedConstraints) {\n eachAxis((axis) => {\n if (this.constraints !== false &&\n this.getAxisMotionValue(axis)) {\n this.constraints[axis] = rebaseAxisConstraints(layout.layoutBox[axis], this.constraints[axis]);\n }\n });\n }\n }\n resolveRefConstraints() {\n const { dragConstraints: constraints, onMeasureDragConstraints } = this.getProps();\n if (!constraints || !isRefObject(constraints))\n return false;\n const constraintsElement = constraints.current;\n invariant(constraintsElement !== null, \"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.\");\n const { projection } = this.visualElement;\n // TODO\n if (!projection || !projection.layout)\n return false;\n const constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint());\n let measuredConstraints = calcViewportConstraints(projection.layout.layoutBox, constraintsBox);\n /**\n * If there's an onMeasureDragConstraints listener we call it and\n * if different constraints are returned, set constraints to that\n */\n if (onMeasureDragConstraints) {\n const userConstraints = onMeasureDragConstraints(convertBoxToBoundingBox(measuredConstraints));\n this.hasMutatedConstraints = !!userConstraints;\n if (userConstraints) {\n measuredConstraints = convertBoundingBoxToBox(userConstraints);\n }\n }\n return measuredConstraints;\n }\n startAnimation(velocity) {\n const { drag, dragMomentum, dragElastic, dragTransition, dragSnapToOrigin, onDragTransitionEnd, } = this.getProps();\n const constraints = this.constraints || {};\n const momentumAnimations = eachAxis((axis) => {\n if (!shouldDrag(axis, drag, this.currentDirection)) {\n return;\n }\n let transition = (constraints && constraints[axis]) || {};\n if (dragSnapToOrigin)\n transition = { min: 0, max: 0 };\n /**\n * Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame\n * of spring animations so we should look into adding a disable spring option to `inertia`.\n * We could do something here where we affect the `bounceStiffness` and `bounceDamping`\n * using the value of `dragElastic`.\n */\n const bounceStiffness = dragElastic ? 200 : 1000000;\n const bounceDamping = dragElastic ? 40 : 10000000;\n const inertia = {\n type: \"inertia\",\n velocity: dragMomentum ? velocity[axis] : 0,\n bounceStiffness,\n bounceDamping,\n timeConstant: 750,\n restDelta: 1,\n restSpeed: 10,\n ...dragTransition,\n ...transition,\n };\n // If we're not animating on an externally-provided `MotionValue` we can use the\n // component's animation controls which will handle interactions with whileHover (etc),\n // otherwise we just have to animate the `MotionValue` itself.\n return this.startAxisValueAnimation(axis, inertia);\n });\n // Run all animations and then resolve the new drag constraints.\n return Promise.all(momentumAnimations).then(onDragTransitionEnd);\n }\n startAxisValueAnimation(axis, transition) {\n const axisValue = this.getAxisMotionValue(axis);\n return axisValue.start(animateMotionValue(axis, axisValue, 0, transition, this.visualElement));\n }\n stopAnimation() {\n eachAxis((axis) => this.getAxisMotionValue(axis).stop());\n }\n pauseAnimation() {\n eachAxis((axis) => { var _a; return (_a = this.getAxisMotionValue(axis).animation) === null || _a === void 0 ? void 0 : _a.pause(); });\n }\n getAnimationState(axis) {\n var _a;\n return (_a = this.getAxisMotionValue(axis).animation) === null || _a === void 0 ? void 0 : _a.state;\n }\n /**\n * Drag works differently depending on which props are provided.\n *\n * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.\n * - Otherwise, we apply the delta to the x/y motion values.\n */\n getAxisMotionValue(axis) {\n const dragKey = `_drag${axis.toUpperCase()}`;\n const props = this.visualElement.getProps();\n const externalMotionValue = props[dragKey];\n return externalMotionValue\n ? externalMotionValue\n : this.visualElement.getValue(axis, (props.initial\n ? props.initial[axis]\n : undefined) || 0);\n }\n snapToCursor(point) {\n eachAxis((axis) => {\n const { drag } = this.getProps();\n // If we're not dragging this axis, do an early return.\n if (!shouldDrag(axis, drag, this.currentDirection))\n return;\n const { projection } = this.visualElement;\n const axisValue = this.getAxisMotionValue(axis);\n if (projection && projection.layout) {\n const { min, max } = projection.layout.layoutBox[axis];\n axisValue.set(point[axis] - mixNumber(min, max, 0.5));\n }\n });\n }\n /**\n * When the viewport resizes we want to check if the measured constraints\n * have changed and, if so, reposition the element within those new constraints\n * relative to where it was before the resize.\n */\n scalePositionWithinConstraints() {\n if (!this.visualElement.current)\n return;\n const { drag, dragConstraints } = this.getProps();\n const { projection } = this.visualElement;\n if (!isRefObject(dragConstraints) || !projection || !this.constraints)\n return;\n /**\n * Stop current animations as there can be visual glitching if we try to do\n * this mid-animation\n */\n this.stopAnimation();\n /**\n * Record the relative position of the dragged element relative to the\n * constraints box and save as a progress value.\n */\n const boxProgress = { x: 0, y: 0 };\n eachAxis((axis) => {\n const axisValue = this.getAxisMotionValue(axis);\n if (axisValue && this.constraints !== false) {\n const latest = axisValue.get();\n boxProgress[axis] = calcOrigin({ min: latest, max: latest }, this.constraints[axis]);\n }\n });\n /**\n * Update the layout of this element and resolve the latest drag constraints\n */\n const { transformTemplate } = this.visualElement.getProps();\n this.visualElement.current.style.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\";\n projection.root && projection.root.updateScroll();\n projection.updateLayout();\n this.resolveConstraints();\n /**\n * For each axis, calculate the current progress of the layout axis\n * within the new constraints.\n */\n eachAxis((axis) => {\n if (!shouldDrag(axis, drag, null))\n return;\n /**\n * Calculate a new transform based on the previous box progress\n */\n const axisValue = this.getAxisMotionValue(axis);\n const { min, max } = this.constraints[axis];\n axisValue.set(mixNumber(min, max, boxProgress[axis]));\n });\n }\n addListeners() {\n if (!this.visualElement.current)\n return;\n elementDragControls.set(this.visualElement, this);\n const element = this.visualElement.current;\n /**\n * Attach a pointerdown event listener on this DOM element to initiate drag tracking.\n */\n const stopPointerListener = addPointerEvent(element, \"pointerdown\", (event) => {\n const { drag, dragListener = true } = this.getProps();\n drag && dragListener && this.start(event);\n });\n const measureDragConstraints = () => {\n const { dragConstraints } = this.getProps();\n if (isRefObject(dragConstraints)) {\n this.constraints = this.resolveRefConstraints();\n }\n };\n const { projection } = this.visualElement;\n const stopMeasureLayoutListener = projection.addEventListener(\"measure\", measureDragConstraints);\n if (projection && !projection.layout) {\n projection.root && projection.root.updateScroll();\n projection.updateLayout();\n }\n measureDragConstraints();\n /**\n * Attach a window resize listener to scale the draggable target within its defined\n * constraints as the window resizes.\n */\n const stopResizeListener = addDomEvent(window, \"resize\", () => this.scalePositionWithinConstraints());\n /**\n * If the element's layout changes, calculate the delta and apply that to\n * the drag gesture's origin point.\n */\n const stopLayoutUpdateListener = projection.addEventListener(\"didUpdate\", (({ delta, hasLayoutChanged }) => {\n if (this.isDragging && hasLayoutChanged) {\n eachAxis((axis) => {\n const motionValue = this.getAxisMotionValue(axis);\n if (!motionValue)\n return;\n this.originPoint[axis] += delta[axis].translate;\n motionValue.set(motionValue.get() + delta[axis].translate);\n });\n this.visualElement.render();\n }\n }));\n return () => {\n stopResizeListener();\n stopPointerListener();\n stopMeasureLayoutListener();\n stopLayoutUpdateListener && stopLayoutUpdateListener();\n };\n }\n getProps() {\n const props = this.visualElement.getProps();\n const { drag = false, dragDirectionLock = false, dragPropagation = false, dragConstraints = false, dragElastic = defaultElastic, dragMomentum = true, } = props;\n return {\n ...props,\n drag,\n dragDirectionLock,\n dragPropagation,\n dragConstraints,\n dragElastic,\n dragMomentum,\n };\n }\n}\nfunction shouldDrag(direction, drag, currentDirection) {\n return ((drag === true || drag === direction) &&\n (currentDirection === null || currentDirection === direction));\n}\n/**\n * Based on an x/y offset determine the current drag direction. If both axis' offsets are lower\n * than the provided threshold, return `null`.\n *\n * @param offset - The x/y offset from origin.\n * @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction.\n */\nfunction getCurrentDirection(offset, lockThreshold = 10) {\n let direction = null;\n if (Math.abs(offset.y) > lockThreshold) {\n direction = \"y\";\n }\n else if (Math.abs(offset.x) > lockThreshold) {\n direction = \"x\";\n }\n return direction;\n}\n\nexport { VisualElementDragControls, elementDragControls };\n","import { PanSession } from './PanSession.mjs';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { Feature } from '../../motion/features/Feature.mjs';\nimport { noop } from '../../utils/noop.mjs';\nimport { getContextWindow } from '../../utils/get-context-window.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst asyncHandler = (handler) => (event, info) => {\n if (handler) {\n frame.postRender(() => handler(event, info));\n }\n};\nclass PanGesture extends Feature {\n constructor() {\n super(...arguments);\n this.removePointerDownListener = noop;\n }\n onPointerDown(pointerDownEvent) {\n this.session = new PanSession(pointerDownEvent, this.createPanHandlers(), {\n transformPagePoint: this.node.getTransformPagePoint(),\n contextWindow: getContextWindow(this.node),\n });\n }\n createPanHandlers() {\n const { onPanSessionStart, onPanStart, onPan, onPanEnd } = this.node.getProps();\n return {\n onSessionStart: asyncHandler(onPanSessionStart),\n onStart: asyncHandler(onPanStart),\n onMove: onPan,\n onEnd: (event, info) => {\n delete this.session;\n if (onPanEnd) {\n frame.postRender(() => onPanEnd(event, info));\n }\n },\n };\n }\n mount() {\n this.removePointerDownListener = addPointerEvent(this.node.current, \"pointerdown\", (event) => this.onPointerDown(event));\n }\n update() {\n this.session && this.session.updateHandlers(this.createPanHandlers());\n }\n unmount() {\n this.removePointerDownListener();\n this.session && this.session.end();\n }\n}\n\nexport { PanGesture };\n","/**\n * This should only ever be modified on the client otherwise it'll\n * persist through server requests. If we need instanced states we\n * could lazy-init via root.\n */\nconst globalProjectionState = {\n /**\n * Global flag as to whether the tree has animated since the last time\n * we resized the window\n */\n hasAnimatedSinceResize: true,\n /**\n * We set this to true once, on the first update. Any nodes added to the tree beyond that\n * update will be given a `data-projection-id` attribute.\n */\n hasEverUpdated: false,\n};\n\nexport { globalProjectionState };\n","import { px } from '../../value/types/numbers/units.mjs';\n\nfunction pixelsToPercent(pixels, axis) {\n if (axis.max === axis.min)\n return 0;\n return (pixels / (axis.max - axis.min)) * 100;\n}\n/**\n * We always correct borderRadius as a percentage rather than pixels to reduce paints.\n * For example, if you are projecting a box that is 100px wide with a 10px borderRadius\n * into a box that is 200px wide with a 20px borderRadius, that is actually a 10%\n * borderRadius in both states. If we animate between the two in pixels that will trigger\n * a paint each time. If we animate between the two in percentage we'll avoid a paint.\n */\nconst correctBorderRadius = {\n correct: (latest, node) => {\n if (!node.target)\n return latest;\n /**\n * If latest is a string, if it's a percentage we can return immediately as it's\n * going to be stretched appropriately. Otherwise, if it's a pixel, convert it to a number.\n */\n if (typeof latest === \"string\") {\n if (px.test(latest)) {\n latest = parseFloat(latest);\n }\n else {\n return latest;\n }\n }\n /**\n * If latest is a number, it's a pixel value. We use the current viewportBox to calculate that\n * pixel value as a percentage of each axis\n */\n const x = pixelsToPercent(latest, node.target.x);\n const y = pixelsToPercent(latest, node.target.y);\n return `${x}% ${y}%`;\n },\n};\n\nexport { correctBorderRadius, pixelsToPercent };\n","import { mixNumber } from '../../utils/mix/number.mjs';\nimport { complex } from '../../value/types/complex/index.mjs';\n\nconst correctBoxShadow = {\n correct: (latest, { treeScale, projectionDelta }) => {\n const original = latest;\n const shadow = complex.parse(latest);\n // TODO: Doesn't support multiple shadows\n if (shadow.length > 5)\n return original;\n const template = complex.createTransformer(latest);\n const offset = typeof shadow[0] !== \"number\" ? 1 : 0;\n // Calculate the overall context scale\n const xScale = projectionDelta.x.scale * treeScale.x;\n const yScale = projectionDelta.y.scale * treeScale.y;\n shadow[0 + offset] /= xScale;\n shadow[1 + offset] /= yScale;\n /**\n * Ideally we'd correct x and y scales individually, but because blur and\n * spread apply to both we have to take a scale average and apply that instead.\n * We could potentially improve the outcome of this by incorporating the ratio between\n * the two scales.\n */\n const averageScale = mixNumber(xScale, yScale, 0.5);\n // Blur\n if (typeof shadow[2 + offset] === \"number\")\n shadow[2 + offset] /= averageScale;\n // Spread\n if (typeof shadow[3 + offset] === \"number\")\n shadow[3 + offset] /= averageScale;\n return template(shadow);\n },\n};\n\nexport { correctBoxShadow };\n","import { jsx } from 'react/jsx-runtime';\nimport { useContext, Component } from 'react';\nimport { usePresence } from '../../../components/AnimatePresence/use-presence.mjs';\nimport { LayoutGroupContext } from '../../../context/LayoutGroupContext.mjs';\nimport { SwitchLayoutGroupContext } from '../../../context/SwitchLayoutGroupContext.mjs';\nimport { globalProjectionState } from '../../../projection/node/state.mjs';\nimport { correctBorderRadius } from '../../../projection/styles/scale-border-radius.mjs';\nimport { correctBoxShadow } from '../../../projection/styles/scale-box-shadow.mjs';\nimport { addScaleCorrector } from '../../../projection/styles/scale-correction.mjs';\nimport { microtask } from '../../../frameloop/microtask.mjs';\nimport { frame } from '../../../frameloop/frame.mjs';\n\nclass MeasureLayoutWithContext extends Component {\n /**\n * This only mounts projection nodes for components that\n * need measuring, we might want to do it for all components\n * in order to incorporate transforms\n */\n componentDidMount() {\n const { visualElement, layoutGroup, switchLayoutGroup, layoutId } = this.props;\n const { projection } = visualElement;\n addScaleCorrector(defaultScaleCorrectors);\n if (projection) {\n if (layoutGroup.group)\n layoutGroup.group.add(projection);\n if (switchLayoutGroup && switchLayoutGroup.register && layoutId) {\n switchLayoutGroup.register(projection);\n }\n projection.root.didUpdate();\n projection.addEventListener(\"animationComplete\", () => {\n this.safeToRemove();\n });\n projection.setOptions({\n ...projection.options,\n onExitComplete: () => this.safeToRemove(),\n });\n }\n globalProjectionState.hasEverUpdated = true;\n }\n getSnapshotBeforeUpdate(prevProps) {\n const { layoutDependency, visualElement, drag, isPresent } = this.props;\n const projection = visualElement.projection;\n if (!projection)\n return null;\n /**\n * TODO: We use this data in relegate to determine whether to\n * promote a previous element. There's no guarantee its presence data\n * will have updated by this point - if a bug like this arises it will\n * have to be that we markForRelegation and then find a new lead some other way,\n * perhaps in didUpdate\n */\n projection.isPresent = isPresent;\n if (drag ||\n prevProps.layoutDependency !== layoutDependency ||\n layoutDependency === undefined) {\n projection.willUpdate();\n }\n else {\n this.safeToRemove();\n }\n if (prevProps.isPresent !== isPresent) {\n if (isPresent) {\n projection.promote();\n }\n else if (!projection.relegate()) {\n /**\n * If there's another stack member taking over from this one,\n * it's in charge of the exit animation and therefore should\n * be in charge of the safe to remove. Otherwise we call it here.\n */\n frame.postRender(() => {\n const stack = projection.getStack();\n if (!stack || !stack.members.length) {\n this.safeToRemove();\n }\n });\n }\n }\n return null;\n }\n componentDidUpdate() {\n const { projection } = this.props.visualElement;\n if (projection) {\n projection.root.didUpdate();\n microtask.postRender(() => {\n if (!projection.currentAnimation && projection.isLead()) {\n this.safeToRemove();\n }\n });\n }\n }\n componentWillUnmount() {\n const { visualElement, layoutGroup, switchLayoutGroup: promoteContext, } = this.props;\n const { projection } = visualElement;\n if (projection) {\n projection.scheduleCheckAfterUnmount();\n if (layoutGroup && layoutGroup.group)\n layoutGroup.group.remove(projection);\n if (promoteContext && promoteContext.deregister)\n promoteContext.deregister(projection);\n }\n }\n safeToRemove() {\n const { safeToRemove } = this.props;\n safeToRemove && safeToRemove();\n }\n render() {\n return null;\n }\n}\nfunction MeasureLayout(props) {\n const [isPresent, safeToRemove] = usePresence();\n const layoutGroup = useContext(LayoutGroupContext);\n return (jsx(MeasureLayoutWithContext, { ...props, layoutGroup: layoutGroup, switchLayoutGroup: useContext(SwitchLayoutGroupContext), isPresent: isPresent, safeToRemove: safeToRemove }));\n}\nconst defaultScaleCorrectors = {\n borderRadius: {\n ...correctBorderRadius,\n applyTo: [\n \"borderTopLeftRadius\",\n \"borderTopRightRadius\",\n \"borderBottomLeftRadius\",\n \"borderBottomRightRadius\",\n ],\n },\n borderTopLeftRadius: correctBorderRadius,\n borderTopRightRadius: correctBorderRadius,\n borderBottomLeftRadius: correctBorderRadius,\n borderBottomRightRadius: correctBorderRadius,\n boxShadow: correctBoxShadow,\n};\n\nexport { MeasureLayout };\n","import { useContext, useId, useEffect } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\n\n/**\n * When a component is the child of `AnimatePresence`, it can use `usePresence`\n * to access information about whether it's still present in the React tree.\n *\n * ```jsx\n * import { usePresence } from \"framer-motion\"\n *\n * export const Component = () => {\n * const [isPresent, safeToRemove] = usePresence()\n *\n * useEffect(() => {\n * !isPresent && setTimeout(safeToRemove, 1000)\n * }, [isPresent])\n *\n * return <div />\n * }\n * ```\n *\n * If `isPresent` is `false`, it means that a component has been removed the tree, but\n * `AnimatePresence` won't really remove it until `safeToRemove` has been called.\n *\n * @public\n */\nfunction usePresence() {\n const context = useContext(PresenceContext);\n if (context === null)\n return [true, null];\n const { isPresent, onExitComplete, register } = context;\n // It's safe to call the following hooks conditionally (after an early return) because the context will always\n // either be null or non-null for the lifespan of the component.\n const id = useId();\n useEffect(() => register(id), []);\n const safeToRemove = () => onExitComplete && onExitComplete(id);\n return !isPresent && onExitComplete ? [false, safeToRemove] : [true];\n}\n/**\n * Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present.\n * There is no `safeToRemove` function.\n *\n * ```jsx\n * import { useIsPresent } from \"framer-motion\"\n *\n * export const Component = () => {\n * const isPresent = useIsPresent()\n *\n * useEffect(() => {\n * !isPresent && console.log(\"I've been removed!\")\n * }, [isPresent])\n *\n * return <div />\n * }\n * ```\n *\n * @public\n */\nfunction useIsPresent() {\n return isPresent(useContext(PresenceContext));\n}\nfunction isPresent(context) {\n return context === null ? true : context.isPresent;\n}\n\nexport { isPresent, useIsPresent, usePresence };\n","import { circOut } from '../../easing/circ.mjs';\nimport { progress } from '../../utils/progress.mjs';\nimport { mixNumber } from '../../utils/mix/number.mjs';\nimport { noop } from '../../utils/noop.mjs';\nimport { percent, px } from '../../value/types/numbers/units.mjs';\n\nconst borders = [\"TopLeft\", \"TopRight\", \"BottomLeft\", \"BottomRight\"];\nconst numBorders = borders.length;\nconst asNumber = (value) => typeof value === \"string\" ? parseFloat(value) : value;\nconst isPx = (value) => typeof value === \"number\" || px.test(value);\nfunction mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnlyMember) {\n if (shouldCrossfadeOpacity) {\n target.opacity = mixNumber(0, \n // TODO Reinstate this if only child\n lead.opacity !== undefined ? lead.opacity : 1, easeCrossfadeIn(progress));\n target.opacityExit = mixNumber(follow.opacity !== undefined ? follow.opacity : 1, 0, easeCrossfadeOut(progress));\n }\n else if (isOnlyMember) {\n target.opacity = mixNumber(follow.opacity !== undefined ? follow.opacity : 1, lead.opacity !== undefined ? lead.opacity : 1, progress);\n }\n /**\n * Mix border radius\n */\n for (let i = 0; i < numBorders; i++) {\n const borderLabel = `border${borders[i]}Radius`;\n let followRadius = getRadius(follow, borderLabel);\n let leadRadius = getRadius(lead, borderLabel);\n if (followRadius === undefined && leadRadius === undefined)\n continue;\n followRadius || (followRadius = 0);\n leadRadius || (leadRadius = 0);\n const canMix = followRadius === 0 ||\n leadRadius === 0 ||\n isPx(followRadius) === isPx(leadRadius);\n if (canMix) {\n target[borderLabel] = Math.max(mixNumber(asNumber(followRadius), asNumber(leadRadius), progress), 0);\n if (percent.test(leadRadius) || percent.test(followRadius)) {\n target[borderLabel] += \"%\";\n }\n }\n else {\n target[borderLabel] = leadRadius;\n }\n }\n /**\n * Mix rotation\n */\n if (follow.rotate || lead.rotate) {\n target.rotate = mixNumber(follow.rotate || 0, lead.rotate || 0, progress);\n }\n}\nfunction getRadius(values, radiusName) {\n return values[radiusName] !== undefined\n ? values[radiusName]\n : values.borderRadius;\n}\n// /**\n// * We only want to mix the background color if there's a follow element\n// * that we're not crossfading opacity between. For instance with switch\n// * AnimateSharedLayout animations, this helps the illusion of a continuous\n// * element being animated but also cuts down on the number of paints triggered\n// * for elements where opacity is doing that work for us.\n// */\n// if (\n// !hasFollowElement &&\n// latestLeadValues.backgroundColor &&\n// latestFollowValues.backgroundColor\n// ) {\n// /**\n// * This isn't ideal performance-wise as mixColor is creating a new function every frame.\n// * We could probably create a mixer that runs at the start of the animation but\n// * the idea behind the crossfader is that it runs dynamically between two potentially\n// * changing targets (ie opacity or borderRadius may be animating independently via variants)\n// */\n// leadState.backgroundColor = followState.backgroundColor = mixColor(\n// latestFollowValues.backgroundColor as string,\n// latestLeadValues.backgroundColor as string\n// )(p)\n// }\nconst easeCrossfadeIn = compress(0, 0.5, circOut);\nconst easeCrossfadeOut = compress(0.5, 0.95, noop);\nfunction compress(min, max, easing) {\n return (p) => {\n // Could replace ifs with clamp\n if (p < min)\n return 0;\n if (p > max)\n return 1;\n return easing(progress(min, max, p));\n };\n}\n\nexport { mixValues };\n","/**\n * Reset an axis to the provided origin box.\n *\n * This is a mutative operation.\n */\nfunction copyAxisInto(axis, originAxis) {\n axis.min = originAxis.min;\n axis.max = originAxis.max;\n}\n/**\n * Reset a box to the provided origin box.\n *\n * This is a mutative operation.\n */\nfunction copyBoxInto(box, originBox) {\n copyAxisInto(box.x, originBox.x);\n copyAxisInto(box.y, originBox.y);\n}\n\nexport { copyAxisInto, copyBoxInto };\n","import { mixNumber } from '../../utils/mix/number.mjs';\nimport { percent } from '../../value/types/numbers/units.mjs';\nimport { scalePoint } from './delta-apply.mjs';\n\n/**\n * Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse\n */\nfunction removePointDelta(point, translate, scale, originPoint, boxScale) {\n point -= translate;\n point = scalePoint(point, 1 / scale, originPoint);\n if (boxScale !== undefined) {\n point = scalePoint(point, 1 / boxScale, originPoint);\n }\n return point;\n}\n/**\n * Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse\n */\nfunction removeAxisDelta(axis, translate = 0, scale = 1, origin = 0.5, boxScale, originAxis = axis, sourceAxis = axis) {\n if (percent.test(translate)) {\n translate = parseFloat(translate);\n const relativeProgress = mixNumber(sourceAxis.min, sourceAxis.max, translate / 100);\n translate = relativeProgress - sourceAxis.min;\n }\n if (typeof translate !== \"number\")\n return;\n let originPoint = mixNumber(originAxis.min, originAxis.max, origin);\n if (axis === originAxis)\n originPoint -= translate;\n axis.min = removePointDelta(axis.min, translate, scale, originPoint, boxScale);\n axis.max = removePointDelta(axis.max, translate, scale, originPoint, boxScale);\n}\n/**\n * Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nfunction removeAxisTransforms(axis, transforms, [key, scaleKey, originKey], origin, sourceAxis) {\n removeAxisDelta(axis, transforms[key], transforms[scaleKey], transforms[originKey], transforms.scale, origin, sourceAxis);\n}\n/**\n * The names of the motion values we want to apply as translation, scale and origin.\n */\nconst xKeys = [\"x\", \"scaleX\", \"originX\"];\nconst yKeys = [\"y\", \"scaleY\", \"originY\"];\n/**\n * Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nfunction removeBoxTransforms(box, transforms, originBox, sourceBox) {\n removeAxisTransforms(box.x, transforms, xKeys, originBox ? originBox.x : undefined, sourceBox ? sourceBox.x : undefined);\n removeAxisTransforms(box.y, transforms, yKeys, originBox ? originBox.y : undefined, sourceBox ? sourceBox.y : undefined);\n}\n\nexport { removeAxisDelta, removeAxisTransforms, removeBoxTransforms, removePointDelta };\n","import { calcLength } from './delta-calc.mjs';\n\nfunction isAxisDeltaZero(delta) {\n return delta.translate === 0 && delta.scale === 1;\n}\nfunction isDeltaZero(delta) {\n return isAxisDeltaZero(delta.x) && isAxisDeltaZero(delta.y);\n}\nfunction boxEquals(a, b) {\n return (a.x.min === b.x.min &&\n a.x.max === b.x.max &&\n a.y.min === b.y.min &&\n a.y.max === b.y.max);\n}\nfunction boxEqualsRounded(a, b) {\n return (Math.round(a.x.min) === Math.round(b.x.min) &&\n Math.round(a.x.max) === Math.round(b.x.max) &&\n Math.round(a.y.min) === Math.round(b.y.min) &&\n Math.round(a.y.max) === Math.round(b.y.max));\n}\nfunction aspectRatio(box) {\n return calcLength(box.x) / calcLength(box.y);\n}\n\nexport { aspectRatio, boxEquals, boxEqualsRounded, isDeltaZero };\n","import { addUniqueItem, removeItem } from '../../utils/array.mjs';\n\nclass NodeStack {\n constructor() {\n this.members = [];\n }\n add(node) {\n addUniqueItem(this.members, node);\n node.scheduleRender();\n }\n remove(node) {\n removeItem(this.members, node);\n if (node === this.prevLead) {\n this.prevLead = undefined;\n }\n if (node === this.lead) {\n const prevLead = this.members[this.members.length - 1];\n if (prevLead) {\n this.promote(prevLead);\n }\n }\n }\n relegate(node) {\n const indexOfNode = this.members.findIndex((member) => node === member);\n if (indexOfNode === 0)\n return false;\n /**\n * Find the next projection node that is present\n */\n let prevLead;\n for (let i = indexOfNode; i >= 0; i--) {\n const member = this.members[i];\n if (member.isPresent !== false) {\n prevLead = member;\n break;\n }\n }\n if (prevLead) {\n this.promote(prevLead);\n return true;\n }\n else {\n return false;\n }\n }\n promote(node, preserveFollowOpacity) {\n const prevLead = this.lead;\n if (node === prevLead)\n return;\n this.prevLead = prevLead;\n this.lead = node;\n node.show();\n if (prevLead) {\n prevLead.instance && prevLead.scheduleRender();\n node.scheduleRender();\n node.resumeFrom = prevLead;\n if (preserveFollowOpacity) {\n node.resumeFrom.preserveOpacity = true;\n }\n if (prevLead.snapshot) {\n node.snapshot = prevLead.snapshot;\n node.snapshot.latestValues =\n prevLead.animationValues || prevLead.latestValues;\n }\n if (node.root && node.root.isUpdating) {\n node.isLayoutDirty = true;\n }\n const { crossfade } = node.options;\n if (crossfade === false) {\n prevLead.hide();\n }\n /**\n * TODO:\n * - Test border radius when previous node was deleted\n * - boxShadow mixing\n * - Shared between element A in scrolled container and element B (scroll stays the same or changes)\n * - Shared between element A in transformed container and element B (transform stays the same or changes)\n * - Shared between element A in scrolled page and element B (scroll stays the same or changes)\n * ---\n * - Crossfade opacity of root nodes\n * - layoutId changes after animation\n * - layoutId changes mid animation\n */\n }\n }\n exitAnimationComplete() {\n this.members.forEach((node) => {\n const { options, resumingFrom } = node;\n options.onExitComplete && options.onExitComplete();\n if (resumingFrom) {\n resumingFrom.options.onExitComplete &&\n resumingFrom.options.onExitComplete();\n }\n });\n }\n scheduleRender() {\n this.members.forEach((node) => {\n node.instance && node.scheduleRender(false);\n });\n }\n /**\n * Clear any leads that have been removed this render to prevent them from being\n * used in future animations and to prevent memory leaks\n */\n removeLeadSnapshot() {\n if (this.lead && this.lead.snapshot) {\n this.lead.snapshot = undefined;\n }\n }\n}\n\nexport { NodeStack };\n","function buildProjectionTransform(delta, treeScale, latestTransform) {\n let transform = \"\";\n /**\n * The translations we use to calculate are always relative to the viewport coordinate space.\n * But when we apply scales, we also scale the coordinate space of an element and its children.\n * For instance if we have a treeScale (the culmination of all parent scales) of 0.5 and we need\n * to move an element 100 pixels, we actually need to move it 200 in within that scaled space.\n */\n const xTranslate = delta.x.translate / treeScale.x;\n const yTranslate = delta.y.translate / treeScale.y;\n const zTranslate = (latestTransform === null || latestTransform === void 0 ? void 0 : latestTransform.z) || 0;\n if (xTranslate || yTranslate || zTranslate) {\n transform = `translate3d(${xTranslate}px, ${yTranslate}px, ${zTranslate}px) `;\n }\n /**\n * Apply scale correction for the tree transform.\n * This will apply scale to the screen-orientated axes.\n */\n if (treeScale.x !== 1 || treeScale.y !== 1) {\n transform += `scale(${1 / treeScale.x}, ${1 / treeScale.y}) `;\n }\n if (latestTransform) {\n const { transformPerspective, rotate, rotateX, rotateY, skewX, skewY } = latestTransform;\n if (transformPerspective)\n transform = `perspective(${transformPerspective}px) ${transform}`;\n if (rotate)\n transform += `rotate(${rotate}deg) `;\n if (rotateX)\n transform += `rotateX(${rotateX}deg) `;\n if (rotateY)\n transform += `rotateY(${rotateY}deg) `;\n if (skewX)\n transform += `skewX(${skewX}deg) `;\n if (skewY)\n transform += `skewY(${skewY}deg) `;\n }\n /**\n * Apply scale to match the size of the element to the size we want it.\n * This will apply scale to the element-orientated axes.\n */\n const elementScaleX = delta.x.scale * treeScale.x;\n const elementScaleY = delta.y.scale * treeScale.y;\n if (elementScaleX !== 1 || elementScaleY !== 1) {\n transform += `scale(${elementScaleX}, ${elementScaleY})`;\n }\n return transform || \"none\";\n}\n\nexport { buildProjectionTransform };\n","const compareByDepth = (a, b) => a.depth - b.depth;\n\nexport { compareByDepth };\n","import { addUniqueItem, removeItem } from '../../utils/array.mjs';\nimport { compareByDepth } from './compare-by-depth.mjs';\n\nclass FlatTree {\n constructor() {\n this.children = [];\n this.isDirty = false;\n }\n add(child) {\n addUniqueItem(this.children, child);\n this.isDirty = true;\n }\n remove(child) {\n removeItem(this.children, child);\n this.isDirty = true;\n }\n forEach(callback) {\n this.isDirty && this.children.sort(compareByDepth);\n this.isDirty = false;\n this.children.forEach(callback);\n }\n}\n\nexport { FlatTree };\n","import { SubscriptionManager } from '../../utils/subscription-manager.mjs';\nimport { mixValues } from '../animation/mix-values.mjs';\nimport { copyBoxInto } from '../geometry/copy.mjs';\nimport { translateAxis, transformBox, applyBoxDelta, applyTreeDeltas } from '../geometry/delta-apply.mjs';\nimport { calcRelativePosition, calcRelativeBox, calcBoxDelta, calcLength, isNear } from '../geometry/delta-calc.mjs';\nimport { removeBoxTransforms } from '../geometry/delta-remove.mjs';\nimport { createBox, createDelta } from '../geometry/models.mjs';\nimport { getValueTransition } from '../../animation/utils/transitions.mjs';\nimport { boxEqualsRounded, isDeltaZero, aspectRatio, boxEquals } from '../geometry/utils.mjs';\nimport { NodeStack } from '../shared/stack.mjs';\nimport { scaleCorrectors } from '../styles/scale-correction.mjs';\nimport { buildProjectionTransform } from '../styles/transform.mjs';\nimport { eachAxis } from '../utils/each-axis.mjs';\nimport { hasTransform, hasScale, has2DTranslate } from '../utils/has-transform.mjs';\nimport { FlatTree } from '../../render/utils/flat-tree.mjs';\nimport { resolveMotionValue } from '../../value/utils/resolve-motion-value.mjs';\nimport { globalProjectionState } from './state.mjs';\nimport { delay } from '../../utils/delay.mjs';\nimport { mixNumber } from '../../utils/mix/number.mjs';\nimport { record } from '../../debug/record.mjs';\nimport { isSVGElement } from '../../render/dom/utils/is-svg-element.mjs';\nimport { animateSingleValue } from '../../animation/interfaces/single-value.mjs';\nimport { clamp } from '../../utils/clamp.mjs';\nimport { cancelFrame, frameData, steps, frame } from '../../frameloop/frame.mjs';\nimport { noop } from '../../utils/noop.mjs';\nimport { time } from '../../frameloop/sync-time.mjs';\nimport { microtask } from '../../frameloop/microtask.mjs';\n\nconst transformAxes = [\"\", \"X\", \"Y\", \"Z\"];\nconst hiddenVisibility = { visibility: \"hidden\" };\n/**\n * We use 1000 as the animation target as 0-1000 maps better to pixels than 0-1\n * which has a noticeable difference in spring animations\n */\nconst animationTarget = 1000;\nlet id = 0;\n/**\n * Use a mutable data object for debug data so as to not create a new\n * object every frame.\n */\nconst projectionFrameData = {\n type: \"projectionFrame\",\n totalNodes: 0,\n resolvedTargetDeltas: 0,\n recalculatedProjection: 0,\n};\nfunction resetDistortingTransform(key, visualElement, values, sharedAnimationValues) {\n const { latestValues } = visualElement;\n // Record the distorting transform and then temporarily set it to 0\n if (latestValues[key]) {\n values[key] = latestValues[key];\n visualElement.setStaticValue(key, 0);\n if (sharedAnimationValues) {\n sharedAnimationValues[key] = 0;\n }\n }\n}\nfunction createProjectionNode({ attachResizeListener, defaultParent, measureScroll, checkIsScrollRoot, resetTransform, }) {\n return class ProjectionNode {\n constructor(latestValues = {}, parent = defaultParent === null || defaultParent === void 0 ? void 0 : defaultParent()) {\n /**\n * A unique ID generated for every projection node.\n */\n this.id = id++;\n /**\n * An id that represents a unique session instigated by startUpdate.\n */\n this.animationId = 0;\n /**\n * A Set containing all this component's children. This is used to iterate\n * through the children.\n *\n * TODO: This could be faster to iterate as a flat array stored on the root node.\n */\n this.children = new Set();\n /**\n * Options for the node. We use this to configure what kind of layout animations\n * we should perform (if any).\n */\n this.options = {};\n /**\n * We use this to detect when its safe to shut down part of a projection tree.\n * We have to keep projecting children for scale correction and relative projection\n * until all their parents stop performing layout animations.\n */\n this.isTreeAnimating = false;\n this.isAnimationBlocked = false;\n /**\n * Flag to true if we think this layout has been changed. We can't always know this,\n * currently we set it to true every time a component renders, or if it has a layoutDependency\n * if that has changed between renders. Additionally, components can be grouped by LayoutGroup\n * and if one node is dirtied, they all are.\n */\n this.isLayoutDirty = false;\n /**\n * Flag to true if we think the projection calculations for this node needs\n * recalculating as a result of an updated transform or layout animation.\n */\n this.isProjectionDirty = false;\n /**\n * Flag to true if the layout *or* transform has changed. This then gets propagated\n * throughout the projection tree, forcing any element below to recalculate on the next frame.\n */\n this.isSharedProjectionDirty = false;\n /**\n * Flag transform dirty. This gets propagated throughout the whole tree but is only\n * respected by shared nodes.\n */\n this.isTransformDirty = false;\n /**\n * Block layout updates for instant layout transitions throughout the tree.\n */\n this.updateManuallyBlocked = false;\n this.updateBlockedByResize = false;\n /**\n * Set to true between the start of the first `willUpdate` call and the end of the `didUpdate`\n * call.\n */\n this.isUpdating = false;\n /**\n * If this is an SVG element we currently disable projection transforms\n */\n this.isSVG = false;\n /**\n * Flag to true (during promotion) if a node doing an instant layout transition needs to reset\n * its projection styles.\n */\n this.needsReset = false;\n /**\n * Flags whether this node should have its transform reset prior to measuring.\n */\n this.shouldResetTransform = false;\n /**\n * An object representing the calculated contextual/accumulated/tree scale.\n * This will be used to scale calculcated projection transforms, as these are\n * calculated in screen-space but need to be scaled for elements to layoutly\n * make it to their calculated destinations.\n *\n * TODO: Lazy-init\n */\n this.treeScale = { x: 1, y: 1 };\n /**\n *\n */\n this.eventHandlers = new Map();\n this.hasTreeAnimated = false;\n // Note: Currently only running on root node\n this.updateScheduled = false;\n this.projectionUpdateScheduled = false;\n this.checkUpdateFailed = () => {\n if (this.isUpdating) {\n this.isUpdating = false;\n this.clearAllSnapshots();\n }\n };\n /**\n * This is a multi-step process as shared nodes might be of different depths. Nodes\n * are sorted by depth order, so we need to resolve the entire tree before moving to\n * the next step.\n */\n this.updateProjection = () => {\n this.projectionUpdateScheduled = false;\n /**\n * Reset debug counts. Manually resetting rather than creating a new\n * object each frame.\n */\n projectionFrameData.totalNodes =\n projectionFrameData.resolvedTargetDeltas =\n projectionFrameData.recalculatedProjection =\n 0;\n this.nodes.forEach(propagateDirtyNodes);\n this.nodes.forEach(resolveTargetDelta);\n this.nodes.forEach(calcProjection);\n this.nodes.forEach(cleanDirtyNodes);\n record(projectionFrameData);\n };\n this.hasProjected = false;\n this.isVisible = true;\n this.animationProgress = 0;\n /**\n * Shared layout\n */\n // TODO Only running on root node\n this.sharedNodes = new Map();\n this.latestValues = latestValues;\n this.root = parent ? parent.root || parent : this;\n this.path = parent ? [...parent.path, parent] : [];\n this.parent = parent;\n this.depth = parent ? parent.depth + 1 : 0;\n for (let i = 0; i < this.path.length; i++) {\n this.path[i].shouldResetTransform = true;\n }\n if (this.root === this)\n this.nodes = new FlatTree();\n }\n addEventListener(name, handler) {\n if (!this.eventHandlers.has(name)) {\n this.eventHandlers.set(name, new SubscriptionManager());\n }\n return this.eventHandlers.get(name).add(handler);\n }\n notifyListeners(name, ...args) {\n const subscriptionManager = this.eventHandlers.get(name);\n subscriptionManager && subscriptionManager.notify(...args);\n }\n hasListeners(name) {\n return this.eventHandlers.has(name);\n }\n /**\n * Lifecycles\n */\n mount(instance, isLayoutDirty = this.root.hasTreeAnimated) {\n if (this.instance)\n return;\n this.isSVG = isSVGElement(instance);\n this.instance = instance;\n const { layoutId, layout, visualElement } = this.options;\n if (visualElement && !visualElement.current) {\n visualElement.mount(instance);\n }\n this.root.nodes.add(this);\n this.parent && this.parent.children.add(this);\n if (isLayoutDirty && (layout || layoutId)) {\n this.isLayoutDirty = true;\n }\n if (attachResizeListener) {\n let cancelDelay;\n const resizeUnblockUpdate = () => (this.root.updateBlockedByResize = false);\n attachResizeListener(instance, () => {\n this.root.updateBlockedByResize = true;\n cancelDelay && cancelDelay();\n cancelDelay = delay(resizeUnblockUpdate, 250);\n if (globalProjectionState.hasAnimatedSinceResize) {\n globalProjectionState.hasAnimatedSinceResize = false;\n this.nodes.forEach(finishAnimation);\n }\n });\n }\n if (layoutId) {\n this.root.registerSharedNode(layoutId, this);\n }\n // Only register the handler if it requires layout animation\n if (this.options.animate !== false &&\n visualElement &&\n (layoutId || layout)) {\n this.addEventListener(\"didUpdate\", ({ delta, hasLayoutChanged, hasRelativeTargetChanged, layout: newLayout, }) => {\n if (this.isTreeAnimationBlocked()) {\n this.target = undefined;\n this.relativeTarget = undefined;\n return;\n }\n // TODO: Check here if an animation exists\n const layoutTransition = this.options.transition ||\n visualElement.getDefaultTransition() ||\n defaultLayoutTransition;\n const { onLayoutAnimationStart, onLayoutAnimationComplete, } = visualElement.getProps();\n /**\n * The target layout of the element might stay the same,\n * but its position relative to its parent has changed.\n */\n const targetChanged = !this.targetLayout ||\n !boxEqualsRounded(this.targetLayout, newLayout) ||\n hasRelativeTargetChanged;\n /**\n * If the layout hasn't seemed to have changed, it might be that the\n * element is visually in the same place in the document but its position\n * relative to its parent has indeed changed. So here we check for that.\n */\n const hasOnlyRelativeTargetChanged = !hasLayoutChanged && hasRelativeTargetChanged;\n if (this.options.layoutRoot ||\n (this.resumeFrom && this.resumeFrom.instance) ||\n hasOnlyRelativeTargetChanged ||\n (hasLayoutChanged &&\n (targetChanged || !this.currentAnimation))) {\n if (this.resumeFrom) {\n this.resumingFrom = this.resumeFrom;\n this.resumingFrom.resumingFrom = undefined;\n }\n this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);\n const animationOptions = {\n ...getValueTransition(layoutTransition, \"layout\"),\n onPlay: onLayoutAnimationStart,\n onComplete: onLayoutAnimationComplete,\n };\n if (visualElement.shouldReduceMotion ||\n this.options.layoutRoot) {\n animationOptions.delay = 0;\n animationOptions.type = false;\n }\n this.startAnimation(animationOptions);\n }\n else {\n /**\n * If the layout hasn't changed and we have an animation that hasn't started yet,\n * finish it immediately. Otherwise it will be animating from a location\n * that was probably never commited to screen and look like a jumpy box.\n */\n if (!hasLayoutChanged) {\n finishAnimation(this);\n }\n if (this.isLead() && this.options.onExitComplete) {\n this.options.onExitComplete();\n }\n }\n this.targetLayout = newLayout;\n });\n }\n }\n unmount() {\n this.options.layoutId && this.willUpdate();\n this.root.nodes.remove(this);\n const stack = this.getStack();\n stack && stack.remove(this);\n this.parent && this.parent.children.delete(this);\n this.instance = undefined;\n cancelFrame(this.updateProjection);\n }\n // only on the root\n blockUpdate() {\n this.updateManuallyBlocked = true;\n }\n unblockUpdate() {\n this.updateManuallyBlocked = false;\n }\n isUpdateBlocked() {\n return this.updateManuallyBlocked || this.updateBlockedByResize;\n }\n isTreeAnimationBlocked() {\n return (this.isAnimationBlocked ||\n (this.parent && this.parent.isTreeAnimationBlocked()) ||\n false);\n }\n // Note: currently only running on root node\n startUpdate() {\n if (this.isUpdateBlocked())\n return;\n this.isUpdating = true;\n this.nodes && this.nodes.forEach(resetSkewAndRotation);\n this.animationId++;\n }\n getTransformTemplate() {\n const { visualElement } = this.options;\n return visualElement && visualElement.getProps().transformTemplate;\n }\n willUpdate(shouldNotifyListeners = true) {\n this.root.hasTreeAnimated = true;\n if (this.root.isUpdateBlocked()) {\n this.options.onExitComplete && this.options.onExitComplete();\n return;\n }\n !this.root.isUpdating && this.root.startUpdate();\n if (this.isLayoutDirty)\n return;\n this.isLayoutDirty = true;\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n node.shouldResetTransform = true;\n node.updateScroll(\"snapshot\");\n if (node.options.layoutRoot) {\n node.willUpdate(false);\n }\n }\n const { layoutId, layout } = this.options;\n if (layoutId === undefined && !layout)\n return;\n const transformTemplate = this.getTransformTemplate();\n this.prevTransformTemplateValue = transformTemplate\n ? transformTemplate(this.latestValues, \"\")\n : undefined;\n this.updateSnapshot();\n shouldNotifyListeners && this.notifyListeners(\"willUpdate\");\n }\n update() {\n this.updateScheduled = false;\n const updateWasBlocked = this.isUpdateBlocked();\n // When doing an instant transition, we skip the layout update,\n // but should still clean up the measurements so that the next\n // snapshot could be taken correctly.\n if (updateWasBlocked) {\n this.unblockUpdate();\n this.clearAllSnapshots();\n this.nodes.forEach(clearMeasurements);\n return;\n }\n if (!this.isUpdating) {\n this.nodes.forEach(clearIsLayoutDirty);\n }\n this.isUpdating = false;\n /**\n * Write\n */\n if (window.HandoffCancelAllAnimations) {\n window.HandoffCancelAllAnimations();\n }\n this.nodes.forEach(resetTransformStyle);\n /**\n * Read ==================\n */\n // Update layout measurements of updated children\n this.nodes.forEach(updateLayout);\n /**\n * Write\n */\n // Notify listeners that the layout is updated\n this.nodes.forEach(notifyLayoutUpdate);\n this.clearAllSnapshots();\n /**\n * Manually flush any pending updates. Ideally\n * we could leave this to the following requestAnimationFrame but this seems\n * to leave a flash of incorrectly styled content.\n */\n const now = time.now();\n frameData.delta = clamp(0, 1000 / 60, now - frameData.timestamp);\n frameData.timestamp = now;\n frameData.isProcessing = true;\n steps.update.process(frameData);\n steps.preRender.process(frameData);\n steps.render.process(frameData);\n frameData.isProcessing = false;\n }\n didUpdate() {\n if (!this.updateScheduled) {\n this.updateScheduled = true;\n microtask.read(() => this.update());\n }\n }\n clearAllSnapshots() {\n this.nodes.forEach(clearSnapshot);\n this.sharedNodes.forEach(removeLeadSnapshots);\n }\n scheduleUpdateProjection() {\n if (!this.projectionUpdateScheduled) {\n this.projectionUpdateScheduled = true;\n frame.preRender(this.updateProjection, false, true);\n }\n }\n scheduleCheckAfterUnmount() {\n /**\n * If the unmounting node is in a layoutGroup and did trigger a willUpdate,\n * we manually call didUpdate to give a chance to the siblings to animate.\n * Otherwise, cleanup all snapshots to prevents future nodes from reusing them.\n */\n frame.postRender(() => {\n if (this.isLayoutDirty) {\n this.root.didUpdate();\n }\n else {\n this.root.checkUpdateFailed();\n }\n });\n }\n /**\n * Update measurements\n */\n updateSnapshot() {\n if (this.snapshot || !this.instance)\n return;\n this.snapshot = this.measure();\n }\n updateLayout() {\n if (!this.instance)\n return;\n // TODO: Incorporate into a forwarded scroll offset\n this.updateScroll();\n if (!(this.options.alwaysMeasureLayout && this.isLead()) &&\n !this.isLayoutDirty) {\n return;\n }\n /**\n * When a node is mounted, it simply resumes from the prevLead's\n * snapshot instead of taking a new one, but the ancestors scroll\n * might have updated while the prevLead is unmounted. We need to\n * update the scroll again to make sure the layout we measure is\n * up to date.\n */\n if (this.resumeFrom && !this.resumeFrom.instance) {\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n node.updateScroll();\n }\n }\n const prevLayout = this.layout;\n this.layout = this.measure(false);\n this.layoutCorrected = createBox();\n this.isLayoutDirty = false;\n this.projectionDelta = undefined;\n this.notifyListeners(\"measure\", this.layout.layoutBox);\n const { visualElement } = this.options;\n visualElement &&\n visualElement.notify(\"LayoutMeasure\", this.layout.layoutBox, prevLayout ? prevLayout.layoutBox : undefined);\n }\n updateScroll(phase = \"measure\") {\n let needsMeasurement = Boolean(this.options.layoutScroll && this.instance);\n if (this.scroll &&\n this.scroll.animationId === this.root.animationId &&\n this.scroll.phase === phase) {\n needsMeasurement = false;\n }\n if (needsMeasurement) {\n this.scroll = {\n animationId: this.root.animationId,\n phase,\n isRoot: checkIsScrollRoot(this.instance),\n offset: measureScroll(this.instance),\n };\n }\n }\n resetTransform() {\n if (!resetTransform)\n return;\n const isResetRequested = this.isLayoutDirty || this.shouldResetTransform;\n const hasProjection = this.projectionDelta && !isDeltaZero(this.projectionDelta);\n const transformTemplate = this.getTransformTemplate();\n const transformTemplateValue = transformTemplate\n ? transformTemplate(this.latestValues, \"\")\n : undefined;\n const transformTemplateHasChanged = transformTemplateValue !== this.prevTransformTemplateValue;\n if (isResetRequested &&\n (hasProjection ||\n hasTransform(this.latestValues) ||\n transformTemplateHasChanged)) {\n resetTransform(this.instance, transformTemplateValue);\n this.shouldResetTransform = false;\n this.scheduleRender();\n }\n }\n measure(removeTransform = true) {\n const pageBox = this.measurePageBox();\n let layoutBox = this.removeElementScroll(pageBox);\n /**\n * Measurements taken during the pre-render stage\n * still have transforms applied so we remove them\n * via calculation.\n */\n if (removeTransform) {\n layoutBox = this.removeTransform(layoutBox);\n }\n roundBox(layoutBox);\n return {\n animationId: this.root.animationId,\n measuredBox: pageBox,\n layoutBox,\n latestValues: {},\n source: this.id,\n };\n }\n measurePageBox() {\n const { visualElement } = this.options;\n if (!visualElement)\n return createBox();\n const box = visualElement.measureViewportBox();\n // Remove viewport scroll to give page-relative coordinates\n const { scroll } = this.root;\n if (scroll) {\n translateAxis(box.x, scroll.offset.x);\n translateAxis(box.y, scroll.offset.y);\n }\n return box;\n }\n removeElementScroll(box) {\n const boxWithoutScroll = createBox();\n copyBoxInto(boxWithoutScroll, box);\n /**\n * Performance TODO: Keep a cumulative scroll offset down the tree\n * rather than loop back up the path.\n */\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n const { scroll, options } = node;\n if (node !== this.root && scroll && options.layoutScroll) {\n /**\n * If this is a new scroll root, we want to remove all previous scrolls\n * from the viewport box.\n */\n if (scroll.isRoot) {\n copyBoxInto(boxWithoutScroll, box);\n const { scroll: rootScroll } = this.root;\n /**\n * Undo the application of page scroll that was originally added\n * to the measured bounding box.\n */\n if (rootScroll) {\n translateAxis(boxWithoutScroll.x, -rootScroll.offset.x);\n translateAxis(boxWithoutScroll.y, -rootScroll.offset.y);\n }\n }\n translateAxis(boxWithoutScroll.x, scroll.offset.x);\n translateAxis(boxWithoutScroll.y, scroll.offset.y);\n }\n }\n return boxWithoutScroll;\n }\n applyTransform(box, transformOnly = false) {\n const withTransforms = createBox();\n copyBoxInto(withTransforms, box);\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n if (!transformOnly &&\n node.options.layoutScroll &&\n node.scroll &&\n node !== node.root) {\n transformBox(withTransforms, {\n x: -node.scroll.offset.x,\n y: -node.scroll.offset.y,\n });\n }\n if (!hasTransform(node.latestValues))\n continue;\n transformBox(withTransforms, node.latestValues);\n }\n if (hasTransform(this.latestValues)) {\n transformBox(withTransforms, this.latestValues);\n }\n return withTransforms;\n }\n removeTransform(box) {\n const boxWithoutTransform = createBox();\n copyBoxInto(boxWithoutTransform, box);\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n if (!node.instance)\n continue;\n if (!hasTransform(node.latestValues))\n continue;\n hasScale(node.latestValues) && node.updateSnapshot();\n const sourceBox = createBox();\n const nodeBox = node.measurePageBox();\n copyBoxInto(sourceBox, nodeBox);\n removeBoxTransforms(boxWithoutTransform, node.latestValues, node.snapshot ? node.snapshot.layoutBox : undefined, sourceBox);\n }\n if (hasTransform(this.latestValues)) {\n removeBoxTransforms(boxWithoutTransform, this.latestValues);\n }\n return boxWithoutTransform;\n }\n setTargetDelta(delta) {\n this.targetDelta = delta;\n this.root.scheduleUpdateProjection();\n this.isProjectionDirty = true;\n }\n setOptions(options) {\n this.options = {\n ...this.options,\n ...options,\n crossfade: options.crossfade !== undefined ? options.crossfade : true,\n };\n }\n clearMeasurements() {\n this.scroll = undefined;\n this.layout = undefined;\n this.snapshot = undefined;\n this.prevTransformTemplateValue = undefined;\n this.targetDelta = undefined;\n this.target = undefined;\n this.isLayoutDirty = false;\n }\n forceRelativeParentToResolveTarget() {\n if (!this.relativeParent)\n return;\n /**\n * If the parent target isn't up-to-date, force it to update.\n * This is an unfortunate de-optimisation as it means any updating relative\n * projection will cause all the relative parents to recalculate back\n * up the tree.\n */\n if (this.relativeParent.resolvedRelativeTargetAt !==\n frameData.timestamp) {\n this.relativeParent.resolveTargetDelta(true);\n }\n }\n resolveTargetDelta(forceRecalculation = false) {\n var _a;\n /**\n * Once the dirty status of nodes has been spread through the tree, we also\n * need to check if we have a shared node of a different depth that has itself\n * been dirtied.\n */\n const lead = this.getLead();\n this.isProjectionDirty || (this.isProjectionDirty = lead.isProjectionDirty);\n this.isTransformDirty || (this.isTransformDirty = lead.isTransformDirty);\n this.isSharedProjectionDirty || (this.isSharedProjectionDirty = lead.isSharedProjectionDirty);\n const isShared = Boolean(this.resumingFrom) || this !== lead;\n /**\n * We don't use transform for this step of processing so we don't\n * need to check whether any nodes have changed transform.\n */\n const canSkip = !(forceRecalculation ||\n (isShared && this.isSharedProjectionDirty) ||\n this.isProjectionDirty ||\n ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.isProjectionDirty) ||\n this.attemptToResolveRelativeTarget);\n if (canSkip)\n return;\n const { layout, layoutId } = this.options;\n /**\n * If we have no layout, we can't perform projection, so early return\n */\n if (!this.layout || !(layout || layoutId))\n return;\n this.resolvedRelativeTargetAt = frameData.timestamp;\n /**\n * If we don't have a targetDelta but do have a layout, we can attempt to resolve\n * a relativeParent. This will allow a component to perform scale correction\n * even if no animation has started.\n */\n if (!this.targetDelta && !this.relativeTarget) {\n const relativeParent = this.getClosestProjectingParent();\n if (relativeParent &&\n relativeParent.layout &&\n this.animationProgress !== 1) {\n this.relativeParent = relativeParent;\n this.forceRelativeParentToResolveTarget();\n this.relativeTarget = createBox();\n this.relativeTargetOrigin = createBox();\n calcRelativePosition(this.relativeTargetOrigin, this.layout.layoutBox, relativeParent.layout.layoutBox);\n copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);\n }\n else {\n this.relativeParent = this.relativeTarget = undefined;\n }\n }\n /**\n * If we have no relative target or no target delta our target isn't valid\n * for this frame.\n */\n if (!this.relativeTarget && !this.targetDelta)\n return;\n /**\n * Lazy-init target data structure\n */\n if (!this.target) {\n this.target = createBox();\n this.targetWithTransforms = createBox();\n }\n /**\n * If we've got a relative box for this component, resolve it into a target relative to the parent.\n */\n if (this.relativeTarget &&\n this.relativeTargetOrigin &&\n this.relativeParent &&\n this.relativeParent.target) {\n this.forceRelativeParentToResolveTarget();\n calcRelativeBox(this.target, this.relativeTarget, this.relativeParent.target);\n /**\n * If we've only got a targetDelta, resolve it into a target\n */\n }\n else if (this.targetDelta) {\n if (Boolean(this.resumingFrom)) {\n // TODO: This is creating a new object every frame\n this.target = this.applyTransform(this.layout.layoutBox);\n }\n else {\n copyBoxInto(this.target, this.layout.layoutBox);\n }\n applyBoxDelta(this.target, this.targetDelta);\n }\n else {\n /**\n * If no target, use own layout as target\n */\n copyBoxInto(this.target, this.layout.layoutBox);\n }\n /**\n * If we've been told to attempt to resolve a relative target, do so.\n */\n if (this.attemptToResolveRelativeTarget) {\n this.attemptToResolveRelativeTarget = false;\n const relativeParent = this.getClosestProjectingParent();\n if (relativeParent &&\n Boolean(relativeParent.resumingFrom) ===\n Boolean(this.resumingFrom) &&\n !relativeParent.options.layoutScroll &&\n relativeParent.target &&\n this.animationProgress !== 1) {\n this.relativeParent = relativeParent;\n this.forceRelativeParentToResolveTarget();\n this.relativeTarget = createBox();\n this.relativeTargetOrigin = createBox();\n calcRelativePosition(this.relativeTargetOrigin, this.target, relativeParent.target);\n copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);\n }\n else {\n this.relativeParent = this.relativeTarget = undefined;\n }\n }\n /**\n * Increase debug counter for resolved target deltas\n */\n projectionFrameData.resolvedTargetDeltas++;\n }\n getClosestProjectingParent() {\n if (!this.parent ||\n hasScale(this.parent.latestValues) ||\n has2DTranslate(this.parent.latestValues)) {\n return undefined;\n }\n if (this.parent.isProjecting()) {\n return this.parent;\n }\n else {\n return this.parent.getClosestProjectingParent();\n }\n }\n isProjecting() {\n return Boolean((this.relativeTarget ||\n this.targetDelta ||\n this.options.layoutRoot) &&\n this.layout);\n }\n calcProjection() {\n var _a;\n const lead = this.getLead();\n const isShared = Boolean(this.resumingFrom) || this !== lead;\n let canSkip = true;\n /**\n * If this is a normal layout animation and neither this node nor its nearest projecting\n * is dirty then we can't skip.\n */\n if (this.isProjectionDirty || ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.isProjectionDirty)) {\n canSkip = false;\n }\n /**\n * If this is a shared layout animation and this node's shared projection is dirty then\n * we can't skip.\n */\n if (isShared &&\n (this.isSharedProjectionDirty || this.isTransformDirty)) {\n canSkip = false;\n }\n /**\n * If we have resolved the target this frame we must recalculate the\n * projection to ensure it visually represents the internal calculations.\n */\n if (this.resolvedRelativeTargetAt === frameData.timestamp) {\n canSkip = false;\n }\n if (canSkip)\n return;\n const { layout, layoutId } = this.options;\n /**\n * If this section of the tree isn't animating we can\n * delete our target sources for the following frame.\n */\n this.isTreeAnimating = Boolean((this.parent && this.parent.isTreeAnimating) ||\n this.currentAnimation ||\n this.pendingAnimation);\n if (!this.isTreeAnimating) {\n this.targetDelta = this.relativeTarget = undefined;\n }\n if (!this.layout || !(layout || layoutId))\n return;\n /**\n * Reset the corrected box with the latest values from box, as we're then going\n * to perform mutative operations on it.\n */\n copyBoxInto(this.layoutCorrected, this.layout.layoutBox);\n /**\n * Record previous tree scales before updating.\n */\n const prevTreeScaleX = this.treeScale.x;\n const prevTreeScaleY = this.treeScale.y;\n /**\n * Apply all the parent deltas to this box to produce the corrected box. This\n * is the layout box, as it will appear on screen as a result of the transforms of its parents.\n */\n applyTreeDeltas(this.layoutCorrected, this.treeScale, this.path, isShared);\n /**\n * If this layer needs to perform scale correction but doesn't have a target,\n * use the layout as the target.\n */\n if (lead.layout &&\n !lead.target &&\n (this.treeScale.x !== 1 || this.treeScale.y !== 1)) {\n lead.target = lead.layout.layoutBox;\n lead.targetWithTransforms = createBox();\n }\n const { target } = lead;\n if (!target) {\n /**\n * If we don't have a target to project into, but we were previously\n * projecting, we want to remove the stored transform and schedule\n * a render to ensure the elements reflect the removed transform.\n */\n if (this.projectionTransform) {\n this.projectionDelta = createDelta();\n this.projectionTransform = \"none\";\n this.scheduleRender();\n }\n return;\n }\n if (!this.projectionDelta) {\n this.projectionDelta = createDelta();\n this.projectionDeltaWithTransform = createDelta();\n }\n const prevProjectionTransform = this.projectionTransform;\n /**\n * Update the delta between the corrected box and the target box before user-set transforms were applied.\n * This will allow us to calculate the corrected borderRadius and boxShadow to compensate\n * for our layout reprojection, but still allow them to be scaled correctly by the user.\n * It might be that to simplify this we may want to accept that user-set scale is also corrected\n * and we wouldn't have to keep and calc both deltas, OR we could support a user setting\n * to allow people to choose whether these styles are corrected based on just the\n * layout reprojection or the final bounding box.\n */\n calcBoxDelta(this.projectionDelta, this.layoutCorrected, target, this.latestValues);\n this.projectionTransform = buildProjectionTransform(this.projectionDelta, this.treeScale);\n if (this.projectionTransform !== prevProjectionTransform ||\n this.treeScale.x !== prevTreeScaleX ||\n this.treeScale.y !== prevTreeScaleY) {\n this.hasProjected = true;\n this.scheduleRender();\n this.notifyListeners(\"projectionUpdate\", target);\n }\n /**\n * Increase debug counter for recalculated projections\n */\n projectionFrameData.recalculatedProjection++;\n }\n hide() {\n this.isVisible = false;\n // TODO: Schedule render\n }\n show() {\n this.isVisible = true;\n // TODO: Schedule render\n }\n scheduleRender(notifyAll = true) {\n this.options.scheduleRender && this.options.scheduleRender();\n if (notifyAll) {\n const stack = this.getStack();\n stack && stack.scheduleRender();\n }\n if (this.resumingFrom && !this.resumingFrom.instance) {\n this.resumingFrom = undefined;\n }\n }\n setAnimationOrigin(delta, hasOnlyRelativeTargetChanged = false) {\n const snapshot = this.snapshot;\n const snapshotLatestValues = snapshot\n ? snapshot.latestValues\n : {};\n const mixedValues = { ...this.latestValues };\n const targetDelta = createDelta();\n if (!this.relativeParent ||\n !this.relativeParent.options.layoutRoot) {\n this.relativeTarget = this.relativeTargetOrigin = undefined;\n }\n this.attemptToResolveRelativeTarget = !hasOnlyRelativeTargetChanged;\n const relativeLayout = createBox();\n const snapshotSource = snapshot ? snapshot.source : undefined;\n const layoutSource = this.layout ? this.layout.source : undefined;\n const isSharedLayoutAnimation = snapshotSource !== layoutSource;\n const stack = this.getStack();\n const isOnlyMember = !stack || stack.members.length <= 1;\n const shouldCrossfadeOpacity = Boolean(isSharedLayoutAnimation &&\n !isOnlyMember &&\n this.options.crossfade === true &&\n !this.path.some(hasOpacityCrossfade));\n this.animationProgress = 0;\n let prevRelativeTarget;\n this.mixTargetDelta = (latest) => {\n const progress = latest / 1000;\n mixAxisDelta(targetDelta.x, delta.x, progress);\n mixAxisDelta(targetDelta.y, delta.y, progress);\n this.setTargetDelta(targetDelta);\n if (this.relativeTarget &&\n this.relativeTargetOrigin &&\n this.layout &&\n this.relativeParent &&\n this.relativeParent.layout) {\n calcRelativePosition(relativeLayout, this.layout.layoutBox, this.relativeParent.layout.layoutBox);\n mixBox(this.relativeTarget, this.relativeTargetOrigin, relativeLayout, progress);\n /**\n * If this is an unchanged relative target we can consider the\n * projection not dirty.\n */\n if (prevRelativeTarget &&\n boxEquals(this.relativeTarget, prevRelativeTarget)) {\n this.isProjectionDirty = false;\n }\n if (!prevRelativeTarget)\n prevRelativeTarget = createBox();\n copyBoxInto(prevRelativeTarget, this.relativeTarget);\n }\n if (isSharedLayoutAnimation) {\n this.animationValues = mixedValues;\n mixValues(mixedValues, snapshotLatestValues, this.latestValues, progress, shouldCrossfadeOpacity, isOnlyMember);\n }\n this.root.scheduleUpdateProjection();\n this.scheduleRender();\n this.animationProgress = progress;\n };\n this.mixTargetDelta(this.options.layoutRoot ? 1000 : 0);\n }\n startAnimation(options) {\n this.notifyListeners(\"animationStart\");\n this.currentAnimation && this.currentAnimation.stop();\n if (this.resumingFrom && this.resumingFrom.currentAnimation) {\n this.resumingFrom.currentAnimation.stop();\n }\n if (this.pendingAnimation) {\n cancelFrame(this.pendingAnimation);\n this.pendingAnimation = undefined;\n }\n /**\n * Start the animation in the next frame to have a frame with progress 0,\n * where the target is the same as when the animation started, so we can\n * calculate the relative positions correctly for instant transitions.\n */\n this.pendingAnimation = frame.update(() => {\n globalProjectionState.hasAnimatedSinceResize = true;\n this.currentAnimation = animateSingleValue(0, animationTarget, {\n ...options,\n onUpdate: (latest) => {\n this.mixTargetDelta(latest);\n options.onUpdate && options.onUpdate(latest);\n },\n onComplete: () => {\n options.onComplete && options.onComplete();\n this.completeAnimation();\n },\n });\n if (this.resumingFrom) {\n this.resumingFrom.currentAnimation = this.currentAnimation;\n }\n this.pendingAnimation = undefined;\n });\n }\n completeAnimation() {\n if (this.resumingFrom) {\n this.resumingFrom.currentAnimation = undefined;\n this.resumingFrom.preserveOpacity = undefined;\n }\n const stack = this.getStack();\n stack && stack.exitAnimationComplete();\n this.resumingFrom =\n this.currentAnimation =\n this.animationValues =\n undefined;\n this.notifyListeners(\"animationComplete\");\n }\n finishAnimation() {\n if (this.currentAnimation) {\n this.mixTargetDelta && this.mixTargetDelta(animationTarget);\n this.currentAnimation.stop();\n }\n this.completeAnimation();\n }\n applyTransformsToTarget() {\n const lead = this.getLead();\n let { targetWithTransforms, target, layout, latestValues } = lead;\n if (!targetWithTransforms || !target || !layout)\n return;\n /**\n * If we're only animating position, and this element isn't the lead element,\n * then instead of projecting into the lead box we instead want to calculate\n * a new target that aligns the two boxes but maintains the layout shape.\n */\n if (this !== lead &&\n this.layout &&\n layout &&\n shouldAnimatePositionOnly(this.options.animationType, this.layout.layoutBox, layout.layoutBox)) {\n target = this.target || createBox();\n const xLength = calcLength(this.layout.layoutBox.x);\n target.x.min = lead.target.x.min;\n target.x.max = target.x.min + xLength;\n const yLength = calcLength(this.layout.layoutBox.y);\n target.y.min = lead.target.y.min;\n target.y.max = target.y.min + yLength;\n }\n copyBoxInto(targetWithTransforms, target);\n /**\n * Apply the latest user-set transforms to the targetBox to produce the targetBoxFinal.\n * This is the final box that we will then project into by calculating a transform delta and\n * applying it to the corrected box.\n */\n transformBox(targetWithTransforms, latestValues);\n /**\n * Update the delta between the corrected box and the final target box, after\n * user-set transforms are applied to it. This will be used by the renderer to\n * create a transform style that will reproject the element from its layout layout\n * into the desired bounding box.\n */\n calcBoxDelta(this.projectionDeltaWithTransform, this.layoutCorrected, targetWithTransforms, latestValues);\n }\n registerSharedNode(layoutId, node) {\n if (!this.sharedNodes.has(layoutId)) {\n this.sharedNodes.set(layoutId, new NodeStack());\n }\n const stack = this.sharedNodes.get(layoutId);\n stack.add(node);\n const config = node.options.initialPromotionConfig;\n node.promote({\n transition: config ? config.transition : undefined,\n preserveFollowOpacity: config && config.shouldPreserveFollowOpacity\n ? config.shouldPreserveFollowOpacity(node)\n : undefined,\n });\n }\n isLead() {\n const stack = this.getStack();\n return stack ? stack.lead === this : true;\n }\n getLead() {\n var _a;\n const { layoutId } = this.options;\n return layoutId ? ((_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.lead) || this : this;\n }\n getPrevLead() {\n var _a;\n const { layoutId } = this.options;\n return layoutId ? (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.prevLead : undefined;\n }\n getStack() {\n const { layoutId } = this.options;\n if (layoutId)\n return this.root.sharedNodes.get(layoutId);\n }\n promote({ needsReset, transition, preserveFollowOpacity, } = {}) {\n const stack = this.getStack();\n if (stack)\n stack.promote(this, preserveFollowOpacity);\n if (needsReset) {\n this.projectionDelta = undefined;\n this.needsReset = true;\n }\n if (transition)\n this.setOptions({ transition });\n }\n relegate() {\n const stack = this.getStack();\n if (stack) {\n return stack.relegate(this);\n }\n else {\n return false;\n }\n }\n resetSkewAndRotation() {\n const { visualElement } = this.options;\n if (!visualElement)\n return;\n // If there's no detected skew or rotation values, we can early return without a forced render.\n let hasDistortingTransform = false;\n /**\n * An unrolled check for rotation values. Most elements don't have any rotation and\n * skipping the nested loop and new object creation is 50% faster.\n */\n const { latestValues } = visualElement;\n if (latestValues.z ||\n latestValues.rotate ||\n latestValues.rotateX ||\n latestValues.rotateY ||\n latestValues.rotateZ ||\n latestValues.skewX ||\n latestValues.skewY) {\n hasDistortingTransform = true;\n }\n // If there's no distorting values, we don't need to do any more.\n if (!hasDistortingTransform)\n return;\n const resetValues = {};\n if (latestValues.z) {\n resetDistortingTransform(\"z\", visualElement, resetValues, this.animationValues);\n }\n // Check the skew and rotate value of all axes and reset to 0\n for (let i = 0; i < transformAxes.length; i++) {\n resetDistortingTransform(`rotate${transformAxes[i]}`, visualElement, resetValues, this.animationValues);\n resetDistortingTransform(`skew${transformAxes[i]}`, visualElement, resetValues, this.animationValues);\n }\n // Force a render of this element to apply the transform with all skews and rotations\n // set to 0.\n visualElement.render();\n // Put back all the values we reset\n for (const key in resetValues) {\n visualElement.setStaticValue(key, resetValues[key]);\n if (this.animationValues) {\n this.animationValues[key] = resetValues[key];\n }\n }\n // Schedule a render for the next frame. This ensures we won't visually\n // see the element with the reset rotate value applied.\n visualElement.scheduleRender();\n }\n getProjectionStyles(styleProp) {\n var _a, _b;\n if (!this.instance || this.isSVG)\n return undefined;\n if (!this.isVisible) {\n return hiddenVisibility;\n }\n const styles = {\n visibility: \"\",\n };\n const transformTemplate = this.getTransformTemplate();\n if (this.needsReset) {\n this.needsReset = false;\n styles.opacity = \"\";\n styles.pointerEvents =\n resolveMotionValue(styleProp === null || styleProp === void 0 ? void 0 : styleProp.pointerEvents) || \"\";\n styles.transform = transformTemplate\n ? transformTemplate(this.latestValues, \"\")\n : \"none\";\n return styles;\n }\n const lead = this.getLead();\n if (!this.projectionDelta || !this.layout || !lead.target) {\n const emptyStyles = {};\n if (this.options.layoutId) {\n emptyStyles.opacity =\n this.latestValues.opacity !== undefined\n ? this.latestValues.opacity\n : 1;\n emptyStyles.pointerEvents =\n resolveMotionValue(styleProp === null || styleProp === void 0 ? void 0 : styleProp.pointerEvents) || \"\";\n }\n if (this.hasProjected && !hasTransform(this.latestValues)) {\n emptyStyles.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\";\n this.hasProjected = false;\n }\n return emptyStyles;\n }\n const valuesToRender = lead.animationValues || lead.latestValues;\n this.applyTransformsToTarget();\n styles.transform = buildProjectionTransform(this.projectionDeltaWithTransform, this.treeScale, valuesToRender);\n if (transformTemplate) {\n styles.transform = transformTemplate(valuesToRender, styles.transform);\n }\n const { x, y } = this.projectionDelta;\n styles.transformOrigin = `${x.origin * 100}% ${y.origin * 100}% 0`;\n if (lead.animationValues) {\n /**\n * If the lead component is animating, assign this either the entering/leaving\n * opacity\n */\n styles.opacity =\n lead === this\n ? (_b = (_a = valuesToRender.opacity) !== null && _a !== void 0 ? _a : this.latestValues.opacity) !== null && _b !== void 0 ? _b : 1\n : this.preserveOpacity\n ? this.latestValues.opacity\n : valuesToRender.opacityExit;\n }\n else {\n /**\n * Or we're not animating at all, set the lead component to its layout\n * opacity and other components to hidden.\n */\n styles.opacity =\n lead === this\n ? valuesToRender.opacity !== undefined\n ? valuesToRender.opacity\n : \"\"\n : valuesToRender.opacityExit !== undefined\n ? valuesToRender.opacityExit\n : 0;\n }\n /**\n * Apply scale correction\n */\n for (const key in scaleCorrectors) {\n if (valuesToRender[key] === undefined)\n continue;\n const { correct, applyTo } = scaleCorrectors[key];\n /**\n * Only apply scale correction to the value if we have an\n * active projection transform. Otherwise these values become\n * vulnerable to distortion if the element changes size without\n * a corresponding layout animation.\n */\n const corrected = styles.transform === \"none\"\n ? valuesToRender[key]\n : correct(valuesToRender[key], lead);\n if (applyTo) {\n const num = applyTo.length;\n for (let i = 0; i < num; i++) {\n styles[applyTo[i]] = corrected;\n }\n }\n else {\n styles[key] = corrected;\n }\n }\n /**\n * Disable pointer events on follow components. This is to ensure\n * that if a follow component covers a lead component it doesn't block\n * pointer events on the lead.\n */\n if (this.options.layoutId) {\n styles.pointerEvents =\n lead === this\n ? resolveMotionValue(styleProp === null || styleProp === void 0 ? void 0 : styleProp.pointerEvents) || \"\"\n : \"none\";\n }\n return styles;\n }\n clearSnapshot() {\n this.resumeFrom = this.snapshot = undefined;\n }\n // Only run on root\n resetTree() {\n this.root.nodes.forEach((node) => { var _a; return (_a = node.currentAnimation) === null || _a === void 0 ? void 0 : _a.stop(); });\n this.root.nodes.forEach(clearMeasurements);\n this.root.sharedNodes.clear();\n }\n };\n}\nfunction updateLayout(node) {\n node.updateLayout();\n}\nfunction notifyLayoutUpdate(node) {\n var _a;\n const snapshot = ((_a = node.resumeFrom) === null || _a === void 0 ? void 0 : _a.snapshot) || node.snapshot;\n if (node.isLead() &&\n node.layout &&\n snapshot &&\n node.hasListeners(\"didUpdate\")) {\n const { layoutBox: layout, measuredBox: measuredLayout } = node.layout;\n const { animationType } = node.options;\n const isShared = snapshot.source !== node.layout.source;\n // TODO Maybe we want to also resize the layout snapshot so we don't trigger\n // animations for instance if layout=\"size\" and an element has only changed position\n if (animationType === \"size\") {\n eachAxis((axis) => {\n const axisSnapshot = isShared\n ? snapshot.measuredBox[axis]\n : snapshot.layoutBox[axis];\n const length = calcLength(axisSnapshot);\n axisSnapshot.min = layout[axis].min;\n axisSnapshot.max = axisSnapshot.min + length;\n });\n }\n else if (shouldAnimatePositionOnly(animationType, snapshot.layoutBox, layout)) {\n eachAxis((axis) => {\n const axisSnapshot = isShared\n ? snapshot.measuredBox[axis]\n : snapshot.layoutBox[axis];\n const length = calcLength(layout[axis]);\n axisSnapshot.max = axisSnapshot.min + length;\n /**\n * Ensure relative target gets resized and rerendererd\n */\n if (node.relativeTarget && !node.currentAnimation) {\n node.isProjectionDirty = true;\n node.relativeTarget[axis].max =\n node.relativeTarget[axis].min + length;\n }\n });\n }\n const layoutDelta = createDelta();\n calcBoxDelta(layoutDelta, layout, snapshot.layoutBox);\n const visualDelta = createDelta();\n if (isShared) {\n calcBoxDelta(visualDelta, node.applyTransform(measuredLayout, true), snapshot.measuredBox);\n }\n else {\n calcBoxDelta(visualDelta, layout, snapshot.layoutBox);\n }\n const hasLayoutChanged = !isDeltaZero(layoutDelta);\n let hasRelativeTargetChanged = false;\n if (!node.resumeFrom) {\n const relativeParent = node.getClosestProjectingParent();\n /**\n * If the relativeParent is itself resuming from a different element then\n * the relative snapshot is not relavent\n */\n if (relativeParent && !relativeParent.resumeFrom) {\n const { snapshot: parentSnapshot, layout: parentLayout } = relativeParent;\n if (parentSnapshot && parentLayout) {\n const relativeSnapshot = createBox();\n calcRelativePosition(relativeSnapshot, snapshot.layoutBox, parentSnapshot.layoutBox);\n const relativeLayout = createBox();\n calcRelativePosition(relativeLayout, layout, parentLayout.layoutBox);\n if (!boxEqualsRounded(relativeSnapshot, relativeLayout)) {\n hasRelativeTargetChanged = true;\n }\n if (relativeParent.options.layoutRoot) {\n node.relativeTarget = relativeLayout;\n node.relativeTargetOrigin = relativeSnapshot;\n node.relativeParent = relativeParent;\n }\n }\n }\n }\n node.notifyListeners(\"didUpdate\", {\n layout,\n snapshot,\n delta: visualDelta,\n layoutDelta,\n hasLayoutChanged,\n hasRelativeTargetChanged,\n });\n }\n else if (node.isLead()) {\n const { onExitComplete } = node.options;\n onExitComplete && onExitComplete();\n }\n /**\n * Clearing transition\n * TODO: Investigate why this transition is being passed in as {type: false } from Framer\n * and why we need it at all\n */\n node.options.transition = undefined;\n}\nfunction propagateDirtyNodes(node) {\n /**\n * Increase debug counter for nodes encountered this frame\n */\n projectionFrameData.totalNodes++;\n if (!node.parent)\n return;\n /**\n * If this node isn't projecting, propagate isProjectionDirty. It will have\n * no performance impact but it will allow the next child that *is* projecting\n * but *isn't* dirty to just check its parent to see if *any* ancestor needs\n * correcting.\n */\n if (!node.isProjecting()) {\n node.isProjectionDirty = node.parent.isProjectionDirty;\n }\n /**\n * Propagate isSharedProjectionDirty and isTransformDirty\n * throughout the whole tree. A future revision can take another look at\n * this but for safety we still recalcualte shared nodes.\n */\n node.isSharedProjectionDirty || (node.isSharedProjectionDirty = Boolean(node.isProjectionDirty ||\n node.parent.isProjectionDirty ||\n node.parent.isSharedProjectionDirty));\n node.isTransformDirty || (node.isTransformDirty = node.parent.isTransformDirty);\n}\nfunction cleanDirtyNodes(node) {\n node.isProjectionDirty =\n node.isSharedProjectionDirty =\n node.isTransformDirty =\n false;\n}\nfunction clearSnapshot(node) {\n node.clearSnapshot();\n}\nfunction clearMeasurements(node) {\n node.clearMeasurements();\n}\nfunction clearIsLayoutDirty(node) {\n node.isLayoutDirty = false;\n}\nfunction resetTransformStyle(node) {\n const { visualElement } = node.options;\n if (visualElement && visualElement.getProps().onBeforeLayoutMeasure) {\n visualElement.notify(\"BeforeLayoutMeasure\");\n }\n node.resetTransform();\n}\nfunction finishAnimation(node) {\n node.finishAnimation();\n node.targetDelta = node.relativeTarget = node.target = undefined;\n node.isProjectionDirty = true;\n}\nfunction resolveTargetDelta(node) {\n node.resolveTargetDelta();\n}\nfunction calcProjection(node) {\n node.calcProjection();\n}\nfunction resetSkewAndRotation(node) {\n node.resetSkewAndRotation();\n}\nfunction removeLeadSnapshots(stack) {\n stack.removeLeadSnapshot();\n}\nfunction mixAxisDelta(output, delta, p) {\n output.translate = mixNumber(delta.translate, 0, p);\n output.scale = mixNumber(delta.scale, 1, p);\n output.origin = delta.origin;\n output.originPoint = delta.originPoint;\n}\nfunction mixAxis(output, from, to, p) {\n output.min = mixNumber(from.min, to.min, p);\n output.max = mixNumber(from.max, to.max, p);\n}\nfunction mixBox(output, from, to, p) {\n mixAxis(output.x, from.x, to.x, p);\n mixAxis(output.y, from.y, to.y, p);\n}\nfunction hasOpacityCrossfade(node) {\n return (node.animationValues && node.animationValues.opacityExit !== undefined);\n}\nconst defaultLayoutTransition = {\n duration: 0.45,\n ease: [0.4, 0, 0.1, 1],\n};\nconst userAgentContains = (string) => typeof navigator !== \"undefined\" &&\n navigator.userAgent &&\n navigator.userAgent.toLowerCase().includes(string);\n/**\n * Measured bounding boxes must be rounded in Safari and\n * left untouched in Chrome, otherwise non-integer layouts within scaled-up elements\n * can appear to jump.\n */\nconst roundPoint = userAgentContains(\"applewebkit/\") && !userAgentContains(\"chrome/\")\n ? Math.round\n : noop;\nfunction roundAxis(axis) {\n // Round to the nearest .5 pixels to support subpixel layouts\n axis.min = roundPoint(axis.min);\n axis.max = roundPoint(axis.max);\n}\nfunction roundBox(box) {\n roundAxis(box.x);\n roundAxis(box.y);\n}\nfunction shouldAnimatePositionOnly(animationType, snapshot, layout) {\n return (animationType === \"position\" ||\n (animationType === \"preserve-aspect\" &&\n !isNear(aspectRatio(snapshot), aspectRatio(layout), 0.2)));\n}\n\nexport { cleanDirtyNodes, createProjectionNode, mixAxis, mixAxisDelta, mixBox, propagateDirtyNodes };\n","function record(data) {\n if (window.MotionDebug) {\n window.MotionDebug.record(data);\n }\n}\n\nexport { record };\n","function isSVGElement(element) {\n return element instanceof SVGElement && element.tagName !== \"svg\";\n}\n\nexport { isSVGElement };\n","import { time } from '../frameloop/sync-time.mjs';\nimport { frame, cancelFrame } from '../frameloop/frame.mjs';\n\n/**\n * Timeout defined in ms\n */\nfunction delay(callback, timeout) {\n const start = time.now();\n const checkElapsed = ({ timestamp }) => {\n const elapsed = timestamp - start;\n if (elapsed >= timeout) {\n cancelFrame(checkElapsed);\n callback(elapsed - timeout);\n }\n };\n frame.read(checkElapsed, true);\n return () => cancelFrame(checkElapsed);\n}\n\nexport { delay };\n","import { animateMotionValue } from './motion-value.mjs';\nimport { motionValue } from '../../value/index.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\nfunction animateSingleValue(value, keyframes, options) {\n const motionValue$1 = isMotionValue(value) ? value : motionValue(value);\n motionValue$1.start(animateMotionValue(\"\", motionValue$1, keyframes, options));\n return motionValue$1.animation;\n}\n\nexport { animateSingleValue };\n","import { createProjectionNode } from './create-projection-node.mjs';\nimport { addDomEvent } from '../../events/add-dom-event.mjs';\n\nconst DocumentProjectionNode = createProjectionNode({\n attachResizeListener: (ref, notify) => addDomEvent(ref, \"resize\", notify),\n measureScroll: () => ({\n x: document.documentElement.scrollLeft || document.body.scrollLeft,\n y: document.documentElement.scrollTop || document.body.scrollTop,\n }),\n checkIsScrollRoot: () => true,\n});\n\nexport { DocumentProjectionNode };\n","import { createProjectionNode } from './create-projection-node.mjs';\nimport { DocumentProjectionNode } from './DocumentProjectionNode.mjs';\n\nconst rootProjectionNode = {\n current: undefined,\n};\nconst HTMLProjectionNode = createProjectionNode({\n measureScroll: (instance) => ({\n x: instance.scrollLeft,\n y: instance.scrollTop,\n }),\n defaultParent: () => {\n if (!rootProjectionNode.current) {\n const documentNode = new DocumentProjectionNode({});\n documentNode.mount(window);\n documentNode.setOptions({ layoutScroll: true });\n rootProjectionNode.current = documentNode;\n }\n return rootProjectionNode.current;\n },\n resetTransform: (instance, value) => {\n instance.style.transform = value !== undefined ? value : \"none\";\n },\n checkIsScrollRoot: (instance) => Boolean(window.getComputedStyle(instance).position === \"fixed\"),\n});\n\nexport { HTMLProjectionNode, rootProjectionNode };\n","import { DragGesture } from '../../gestures/drag/index.mjs';\nimport { PanGesture } from '../../gestures/pan/index.mjs';\nimport { MeasureLayout } from './layout/MeasureLayout.mjs';\nimport { HTMLProjectionNode } from '../../projection/node/HTMLProjectionNode.mjs';\n\nconst drag = {\n pan: {\n Feature: PanGesture,\n },\n drag: {\n Feature: DragGesture,\n ProjectionNode: HTMLProjectionNode,\n MeasureLayout,\n },\n};\n\nexport { drag };\n","import { Feature } from '../../motion/features/Feature.mjs';\nimport { noop } from '../../utils/noop.mjs';\nimport { VisualElementDragControls } from './VisualElementDragControls.mjs';\n\nclass DragGesture extends Feature {\n constructor(node) {\n super(node);\n this.removeGroupControls = noop;\n this.removeListeners = noop;\n this.controls = new VisualElementDragControls(node);\n }\n mount() {\n // If we've been provided a DragControls for manual control over the drag gesture,\n // subscribe this component to it on mount.\n const { dragControls } = this.node.getProps();\n if (dragControls) {\n this.removeGroupControls = dragControls.subscribe(this.controls);\n }\n this.removeListeners = this.controls.addListeners() || noop;\n }\n unmount() {\n this.removeGroupControls();\n this.removeListeners();\n }\n}\n\nexport { DragGesture };\n","// Does this device prefer reduced motion? Returns `null` server-side.\nconst prefersReducedMotion = { current: null };\nconst hasReducedMotionListener = { current: false };\n\nexport { hasReducedMotionListener, prefersReducedMotion };\n","const visualElementStore = new WeakMap();\n\nexport { visualElementStore };\n","import { color } from '../../../value/types/color/index.mjs';\nimport { complex } from '../../../value/types/complex/index.mjs';\nimport { dimensionValueTypes } from './dimensions.mjs';\nimport { testValueType } from './test.mjs';\n\n/**\n * A list of all ValueTypes\n */\nconst valueTypes = [...dimensionValueTypes, color, complex];\n/**\n * Tests a value against the list of ValueTypes\n */\nconst findValueType = (v) => valueTypes.find(testValueType(v));\n\nexport { findValueType };\n","import { warning, invariant } from '../utils/errors.mjs';\nimport { createBox } from '../projection/geometry/models.mjs';\nimport { isRefObject } from '../utils/is-ref-object.mjs';\nimport { initPrefersReducedMotion } from '../utils/reduced-motion/index.mjs';\nimport { hasReducedMotionListener, prefersReducedMotion } from '../utils/reduced-motion/state.mjs';\nimport { SubscriptionManager } from '../utils/subscription-manager.mjs';\nimport { motionValue } from '../value/index.mjs';\nimport { isWillChangeMotionValue } from '../value/use-will-change/is.mjs';\nimport { isMotionValue } from '../value/utils/is-motion-value.mjs';\nimport { transformProps } from './html/utils/transform.mjs';\nimport { isControllingVariants, isVariantNode } from './utils/is-controlling-variants.mjs';\nimport { isVariantLabel } from './utils/is-variant-label.mjs';\nimport { updateMotionValuesFromProps } from './utils/motion-values.mjs';\nimport { resolveVariantFromProps } from './utils/resolve-variants.mjs';\nimport { warnOnce } from '../utils/warn-once.mjs';\nimport { featureDefinitions } from '../motion/features/definitions.mjs';\nimport { variantProps } from './utils/variant-props.mjs';\nimport { visualElementStore } from './store.mjs';\nimport { KeyframeResolver } from './utils/KeyframesResolver.mjs';\nimport { isNumericalString } from '../utils/is-numerical-string.mjs';\nimport { isZeroValueString } from '../utils/is-zero-value-string.mjs';\nimport { findValueType } from './dom/value-types/find.mjs';\nimport { complex } from '../value/types/complex/index.mjs';\nimport { getAnimatableNone } from './dom/value-types/animatable-none.mjs';\nimport { frame, cancelFrame } from '../frameloop/frame.mjs';\n\nconst featureNames = Object.keys(featureDefinitions);\nconst numFeatures = featureNames.length;\nconst propEventHandlers = [\n \"AnimationStart\",\n \"AnimationComplete\",\n \"Update\",\n \"BeforeLayoutMeasure\",\n \"LayoutMeasure\",\n \"LayoutAnimationStart\",\n \"LayoutAnimationComplete\",\n];\nconst numVariantProps = variantProps.length;\nfunction getClosestProjectingNode(visualElement) {\n if (!visualElement)\n return undefined;\n return visualElement.options.allowProjection !== false\n ? visualElement.projection\n : getClosestProjectingNode(visualElement.parent);\n}\n/**\n * A VisualElement is an imperative abstraction around UI elements such as\n * HTMLElement, SVGElement, Three.Object3D etc.\n */\nclass VisualElement {\n /**\n * This method takes React props and returns found MotionValues. For example, HTML\n * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.\n *\n * This isn't an abstract method as it needs calling in the constructor, but it is\n * intended to be one.\n */\n scrapeMotionValuesFromProps(_props, _prevProps, _visualElement) {\n return {};\n }\n constructor({ parent, props, presenceContext, reducedMotionConfig, blockInitialAnimation, visualState, }, options = {}) {\n this.resolveKeyframes = (keyframes, \n // We use an onComplete callback here rather than a Promise as a Promise\n // resolution is a microtask and we want to retain the ability to force\n // the resolution of keyframes synchronously.\n onComplete, name, value) => {\n return new this.KeyframeResolver(keyframes, onComplete, name, value, this);\n };\n /**\n * A reference to the current underlying Instance, e.g. a HTMLElement\n * or Three.Mesh etc.\n */\n this.current = null;\n /**\n * A set containing references to this VisualElement's children.\n */\n this.children = new Set();\n /**\n * Determine what role this visual element should take in the variant tree.\n */\n this.isVariantNode = false;\n this.isControllingVariants = false;\n /**\n * Decides whether this VisualElement should animate in reduced motion\n * mode.\n *\n * TODO: This is currently set on every individual VisualElement but feels\n * like it could be set globally.\n */\n this.shouldReduceMotion = null;\n /**\n * A map of all motion values attached to this visual element. Motion\n * values are source of truth for any given animated value. A motion\n * value might be provided externally by the component via props.\n */\n this.values = new Map();\n this.KeyframeResolver = KeyframeResolver;\n /**\n * Cleanup functions for active features (hover/tap/exit etc)\n */\n this.features = {};\n /**\n * A map of every subscription that binds the provided or generated\n * motion values onChange listeners to this visual element.\n */\n this.valueSubscriptions = new Map();\n /**\n * A reference to the previously-provided motion values as returned\n * from scrapeMotionValuesFromProps. We use the keys in here to determine\n * if any motion values need to be removed after props are updated.\n */\n this.prevMotionValues = {};\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n this.events = {};\n /**\n * An object containing an unsubscribe function for each prop event subscription.\n * For example, every \"Update\" event can have multiple subscribers via\n * VisualElement.on(), but only one of those can be defined via the onUpdate prop.\n */\n this.propEventSubscriptions = {};\n this.notifyUpdate = () => this.notify(\"Update\", this.latestValues);\n this.render = () => {\n if (!this.current)\n return;\n this.triggerBuild();\n this.renderInstance(this.current, this.renderState, this.props.style, this.projection);\n };\n this.scheduleRender = () => frame.render(this.render, false, true);\n const { latestValues, renderState } = visualState;\n this.latestValues = latestValues;\n this.baseTarget = { ...latestValues };\n this.initialValues = props.initial ? { ...latestValues } : {};\n this.renderState = renderState;\n this.parent = parent;\n this.props = props;\n this.presenceContext = presenceContext;\n this.depth = parent ? parent.depth + 1 : 0;\n this.reducedMotionConfig = reducedMotionConfig;\n this.options = options;\n this.blockInitialAnimation = Boolean(blockInitialAnimation);\n this.isControllingVariants = isControllingVariants(props);\n this.isVariantNode = isVariantNode(props);\n if (this.isVariantNode) {\n this.variantChildren = new Set();\n }\n this.manuallyAnimateOnMount = Boolean(parent && parent.current);\n /**\n * Any motion values that are provided to the element when created\n * aren't yet bound to the element, as this would technically be impure.\n * However, we iterate through the motion values and set them to the\n * initial values for this component.\n *\n * TODO: This is impure and we should look at changing this to run on mount.\n * Doing so will break some tests but this isn't neccessarily a breaking change,\n * more a reflection of the test.\n */\n const { willChange, ...initialMotionValues } = this.scrapeMotionValuesFromProps(props, {}, this);\n for (const key in initialMotionValues) {\n const value = initialMotionValues[key];\n if (latestValues[key] !== undefined && isMotionValue(value)) {\n value.set(latestValues[key], false);\n if (isWillChangeMotionValue(willChange)) {\n willChange.add(key);\n }\n }\n }\n }\n mount(instance) {\n this.current = instance;\n visualElementStore.set(instance, this);\n if (this.projection && !this.projection.instance) {\n this.projection.mount(instance);\n }\n if (this.parent && this.isVariantNode && !this.isControllingVariants) {\n this.removeFromVariantTree = this.parent.addVariantChild(this);\n }\n this.values.forEach((value, key) => this.bindToMotionValue(key, value));\n if (!hasReducedMotionListener.current) {\n initPrefersReducedMotion();\n }\n this.shouldReduceMotion =\n this.reducedMotionConfig === \"never\"\n ? false\n : this.reducedMotionConfig === \"always\"\n ? true\n : prefersReducedMotion.current;\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(this.shouldReduceMotion !== true, \"You have Reduced Motion enabled on your device. Animations may not appear as expected.\");\n }\n if (this.parent)\n this.parent.children.add(this);\n this.update(this.props, this.presenceContext);\n }\n unmount() {\n var _a;\n visualElementStore.delete(this.current);\n this.projection && this.projection.unmount();\n cancelFrame(this.notifyUpdate);\n cancelFrame(this.render);\n this.valueSubscriptions.forEach((remove) => remove());\n this.removeFromVariantTree && this.removeFromVariantTree();\n this.parent && this.parent.children.delete(this);\n for (const key in this.events) {\n this.events[key].clear();\n }\n for (const key in this.features) {\n (_a = this.features[key]) === null || _a === void 0 ? void 0 : _a.unmount();\n }\n this.current = null;\n }\n bindToMotionValue(key, value) {\n const valueIsTransform = transformProps.has(key);\n const removeOnChange = value.on(\"change\", (latestValue) => {\n this.latestValues[key] = latestValue;\n this.props.onUpdate && frame.preRender(this.notifyUpdate);\n if (valueIsTransform && this.projection) {\n this.projection.isTransformDirty = true;\n }\n });\n const removeOnRenderRequest = value.on(\"renderRequest\", this.scheduleRender);\n this.valueSubscriptions.set(key, () => {\n removeOnChange();\n removeOnRenderRequest();\n if (value.owner)\n value.stop();\n });\n }\n sortNodePosition(other) {\n /**\n * If these nodes aren't even of the same type we can't compare their depth.\n */\n if (!this.current ||\n !this.sortInstanceNodePosition ||\n this.type !== other.type) {\n return 0;\n }\n return this.sortInstanceNodePosition(this.current, other.current);\n }\n loadFeatures({ children, ...renderedProps }, isStrict, preloadedFeatures, initialLayoutGroupConfig) {\n let ProjectionNodeConstructor;\n let MeasureLayout;\n /**\n * If we're in development mode, check to make sure we're not rendering a motion component\n * as a child of LazyMotion, as this will break the file-size benefits of using it.\n */\n if (process.env.NODE_ENV !== \"production\" &&\n preloadedFeatures &&\n isStrict) {\n const strictMessage = \"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.\";\n renderedProps.ignoreStrict\n ? warning(false, strictMessage)\n : invariant(false, strictMessage);\n }\n for (let i = 0; i < numFeatures; i++) {\n const name = featureNames[i];\n const { isEnabled, Feature: FeatureConstructor, ProjectionNode, MeasureLayout: MeasureLayoutComponent, } = featureDefinitions[name];\n if (ProjectionNode)\n ProjectionNodeConstructor = ProjectionNode;\n if (isEnabled(renderedProps)) {\n if (!this.features[name] && FeatureConstructor) {\n this.features[name] = new FeatureConstructor(this);\n }\n if (MeasureLayoutComponent) {\n MeasureLayout = MeasureLayoutComponent;\n }\n }\n }\n if ((this.type === \"html\" || this.type === \"svg\") &&\n !this.projection &&\n ProjectionNodeConstructor) {\n this.projection = new ProjectionNodeConstructor(this.latestValues, getClosestProjectingNode(this.parent));\n const { layoutId, layout, drag, dragConstraints, layoutScroll, layoutRoot, } = renderedProps;\n this.projection.setOptions({\n layoutId,\n layout,\n alwaysMeasureLayout: Boolean(drag) ||\n (dragConstraints && isRefObject(dragConstraints)),\n visualElement: this,\n scheduleRender: () => this.scheduleRender(),\n /**\n * TODO: Update options in an effect. This could be tricky as it'll be too late\n * to update by the time layout animations run.\n * We also need to fix this safeToRemove by linking it up to the one returned by usePresence,\n * ensuring it gets called if there's no potential layout animations.\n *\n */\n animationType: typeof layout === \"string\" ? layout : \"both\",\n initialPromotionConfig: initialLayoutGroupConfig,\n layoutScroll,\n layoutRoot,\n });\n }\n return MeasureLayout;\n }\n updateFeatures() {\n for (const key in this.features) {\n const feature = this.features[key];\n if (feature.isMounted) {\n feature.update();\n }\n else {\n feature.mount();\n feature.isMounted = true;\n }\n }\n }\n triggerBuild() {\n this.build(this.renderState, this.latestValues, this.options, this.props);\n }\n /**\n * Measure the current viewport box with or without transforms.\n * Only measures axis-aligned boxes, rotate and skew must be manually\n * removed with a re-render to work.\n */\n measureViewportBox() {\n return this.current\n ? this.measureInstanceViewportBox(this.current, this.props)\n : createBox();\n }\n getStaticValue(key) {\n return this.latestValues[key];\n }\n setStaticValue(key, value) {\n this.latestValues[key] = value;\n }\n /**\n * Update the provided props. Ensure any newly-added motion values are\n * added to our map, old ones removed, and listeners updated.\n */\n update(props, presenceContext) {\n if (props.transformTemplate || this.props.transformTemplate) {\n this.scheduleRender();\n }\n this.prevProps = this.props;\n this.props = props;\n this.prevPresenceContext = this.presenceContext;\n this.presenceContext = presenceContext;\n /**\n * Update prop event handlers ie onAnimationStart, onAnimationComplete\n */\n for (let i = 0; i < propEventHandlers.length; i++) {\n const key = propEventHandlers[i];\n if (this.propEventSubscriptions[key]) {\n this.propEventSubscriptions[key]();\n delete this.propEventSubscriptions[key];\n }\n const listenerName = (\"on\" + key);\n const listener = props[listenerName];\n if (listener) {\n this.propEventSubscriptions[key] = this.on(key, listener);\n }\n }\n this.prevMotionValues = updateMotionValuesFromProps(this, this.scrapeMotionValuesFromProps(props, this.prevProps, this), this.prevMotionValues);\n if (this.handleChildMotionValue) {\n this.handleChildMotionValue();\n }\n }\n getProps() {\n return this.props;\n }\n /**\n * Returns the variant definition with a given name.\n */\n getVariant(name) {\n return this.props.variants ? this.props.variants[name] : undefined;\n }\n /**\n * Returns the defined default transition on this component.\n */\n getDefaultTransition() {\n return this.props.transition;\n }\n getTransformPagePoint() {\n return this.props.transformPagePoint;\n }\n getClosestVariantNode() {\n return this.isVariantNode\n ? this\n : this.parent\n ? this.parent.getClosestVariantNode()\n : undefined;\n }\n getVariantContext(startAtParent = false) {\n if (startAtParent) {\n return this.parent ? this.parent.getVariantContext() : undefined;\n }\n if (!this.isControllingVariants) {\n const context = this.parent\n ? this.parent.getVariantContext() || {}\n : {};\n if (this.props.initial !== undefined) {\n context.initial = this.props.initial;\n }\n return context;\n }\n const context = {};\n for (let i = 0; i < numVariantProps; i++) {\n const name = variantProps[i];\n const prop = this.props[name];\n if (isVariantLabel(prop) || prop === false) {\n context[name] = prop;\n }\n }\n return context;\n }\n /**\n * Add a child visual element to our set of children.\n */\n addVariantChild(child) {\n const closestVariantNode = this.getClosestVariantNode();\n if (closestVariantNode) {\n closestVariantNode.variantChildren &&\n closestVariantNode.variantChildren.add(child);\n return () => closestVariantNode.variantChildren.delete(child);\n }\n }\n /**\n * Add a motion value and bind it to this visual element.\n */\n addValue(key, value) {\n // Remove existing value if it exists\n const existingValue = this.values.get(key);\n if (value !== existingValue) {\n if (existingValue)\n this.removeValue(key);\n this.bindToMotionValue(key, value);\n this.values.set(key, value);\n this.latestValues[key] = value.get();\n }\n }\n /**\n * Remove a motion value and unbind any active subscriptions.\n */\n removeValue(key) {\n this.values.delete(key);\n const unsubscribe = this.valueSubscriptions.get(key);\n if (unsubscribe) {\n unsubscribe();\n this.valueSubscriptions.delete(key);\n }\n delete this.latestValues[key];\n this.removeValueFromRenderState(key, this.renderState);\n }\n /**\n * Check whether we have a motion value for this key\n */\n hasValue(key) {\n return this.values.has(key);\n }\n getValue(key, defaultValue) {\n if (this.props.values && this.props.values[key]) {\n return this.props.values[key];\n }\n let value = this.values.get(key);\n if (value === undefined && defaultValue !== undefined) {\n value = motionValue(defaultValue === null ? undefined : defaultValue, { owner: this });\n this.addValue(key, value);\n }\n return value;\n }\n /**\n * If we're trying to animate to a previously unencountered value,\n * we need to check for it in our state and as a last resort read it\n * directly from the instance (which might have performance implications).\n */\n readValue(key, target) {\n var _a;\n let value = this.latestValues[key] !== undefined || !this.current\n ? this.latestValues[key]\n : (_a = this.getBaseTargetFromProps(this.props, key)) !== null && _a !== void 0 ? _a : this.readValueFromInstance(this.current, key, this.options);\n if (value !== undefined && value !== null) {\n if (typeof value === \"string\" &&\n (isNumericalString(value) || isZeroValueString(value))) {\n // If this is a number read as a string, ie \"0\" or \"200\", convert it to a number\n value = parseFloat(value);\n }\n else if (!findValueType(value) && complex.test(target)) {\n value = getAnimatableNone(key, target);\n }\n this.setBaseTarget(key, isMotionValue(value) ? value.get() : value);\n }\n return isMotionValue(value) ? value.get() : value;\n }\n /**\n * Set the base target to later animate back to. This is currently\n * only hydrated on creation and when we first read a value.\n */\n setBaseTarget(key, value) {\n this.baseTarget[key] = value;\n }\n /**\n * Find the base target for a value thats been removed from all animation\n * props.\n */\n getBaseTarget(key) {\n var _a;\n const { initial } = this.props;\n let valueFromInitial;\n if (typeof initial === \"string\" || typeof initial === \"object\") {\n const variant = resolveVariantFromProps(this.props, initial, (_a = this.presenceContext) === null || _a === void 0 ? void 0 : _a.custom);\n if (variant) {\n valueFromInitial = variant[key];\n }\n }\n /**\n * If this value still exists in the current initial variant, read that.\n */\n if (initial && valueFromInitial !== undefined) {\n return valueFromInitial;\n }\n /**\n * Alternatively, if this VisualElement config has defined a getBaseTarget\n * so we can read the value from an alternative source, try that.\n */\n const target = this.getBaseTargetFromProps(this.props, key);\n if (target !== undefined && !isMotionValue(target))\n return target;\n /**\n * If the value was initially defined on initial, but it doesn't any more,\n * return undefined. Otherwise return the value as initially read from the DOM.\n */\n return this.initialValues[key] !== undefined &&\n valueFromInitial === undefined\n ? undefined\n : this.baseTarget[key];\n }\n on(eventName, callback) {\n if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager();\n }\n return this.events[eventName].add(callback);\n }\n notify(eventName, ...args) {\n if (this.events[eventName]) {\n this.events[eventName].notify(...args);\n }\n }\n}\n\nexport { VisualElement };\n","import { isBrowser } from '../is-browser.mjs';\nimport { hasReducedMotionListener, prefersReducedMotion } from './state.mjs';\n\nfunction initPrefersReducedMotion() {\n hasReducedMotionListener.current = true;\n if (!isBrowser)\n return;\n if (window.matchMedia) {\n const motionMediaQuery = window.matchMedia(\"(prefers-reduced-motion)\");\n const setReducedMotionPreferences = () => (prefersReducedMotion.current = motionMediaQuery.matches);\n motionMediaQuery.addListener(setReducedMotionPreferences);\n setReducedMotionPreferences();\n }\n else {\n prefersReducedMotion.current = false;\n }\n}\n\nexport { initPrefersReducedMotion };\n","import { isWillChangeMotionValue } from '../../value/use-will-change/is.mjs';\nimport { warnOnce } from '../../utils/warn-once.mjs';\nimport { motionValue } from '../../value/index.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\nfunction updateMotionValuesFromProps(element, next, prev) {\n const { willChange } = next;\n for (const key in next) {\n const nextValue = next[key];\n const prevValue = prev[key];\n if (isMotionValue(nextValue)) {\n /**\n * If this is a motion value found in props or style, we want to add it\n * to our visual element's motion value map.\n */\n element.addValue(key, nextValue);\n if (isWillChangeMotionValue(willChange)) {\n willChange.add(key);\n }\n /**\n * Check the version of the incoming motion value with this version\n * and warn against mismatches.\n */\n if (process.env.NODE_ENV === \"development\") {\n warnOnce(nextValue.version === \"11.1.9\", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.1.9 may not work as expected.`);\n }\n }\n else if (isMotionValue(prevValue)) {\n /**\n * If we're swapping from a motion value to a static value,\n * create a new motion value from that\n */\n element.addValue(key, motionValue(nextValue, { owner: element }));\n if (isWillChangeMotionValue(willChange)) {\n willChange.remove(key);\n }\n }\n else if (prevValue !== nextValue) {\n /**\n * If this is a flat value that has changed, update the motion value\n * or create one if it doesn't exist. We only want to do this if we're\n * not handling the value with our animation state.\n */\n if (element.hasValue(key)) {\n const existingValue = element.getValue(key);\n if (existingValue.liveStyle === true) {\n existingValue.jump(nextValue);\n }\n else if (!existingValue.hasAnimated) {\n existingValue.set(nextValue);\n }\n }\n else {\n const latestValue = element.getStaticValue(key);\n element.addValue(key, motionValue(latestValue !== undefined ? latestValue : nextValue, { owner: element }));\n }\n }\n }\n // Handle removed values\n for (const key in prev) {\n if (next[key] === undefined)\n element.removeValue(key);\n }\n return next;\n}\n\nexport { updateMotionValuesFromProps };\n","import { VisualElement } from '../VisualElement.mjs';\nimport { DOMKeyframesResolver } from './DOMKeyframesResolver.mjs';\n\nclass DOMVisualElement extends VisualElement {\n constructor() {\n super(...arguments);\n this.KeyframeResolver = DOMKeyframesResolver;\n }\n sortInstanceNodePosition(a, b) {\n /**\n * compareDocumentPosition returns a bitmask, by using the bitwise &\n * we're returning true if 2 in that bitmask is set to true. 2 is set\n * to true if b preceeds a.\n */\n return a.compareDocumentPosition(b) & 2 ? 1 : -1;\n }\n getBaseTargetFromProps(props, key) {\n return props.style\n ? props.style[key]\n : undefined;\n }\n removeValueFromRenderState(key, { vars, style }) {\n delete vars[key];\n delete style[key];\n }\n}\n\nexport { DOMVisualElement };\n","import { buildHTMLStyles } from './utils/build-styles.mjs';\nimport { isCSSVariableName } from '../dom/utils/is-css-variable.mjs';\nimport { transformProps } from './utils/transform.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { renderHTML } from './utils/render.mjs';\nimport { getDefaultValueType } from '../dom/value-types/defaults.mjs';\nimport { measureViewportBox } from '../../projection/utils/measure.mjs';\nimport { DOMVisualElement } from '../dom/DOMVisualElement.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\nfunction getComputedStyle(element) {\n return window.getComputedStyle(element);\n}\nclass HTMLVisualElement extends DOMVisualElement {\n constructor() {\n super(...arguments);\n this.type = \"html\";\n }\n readValueFromInstance(instance, key) {\n if (transformProps.has(key)) {\n const defaultType = getDefaultValueType(key);\n return defaultType ? defaultType.default || 0 : 0;\n }\n else {\n const computedStyle = getComputedStyle(instance);\n const value = (isCSSVariableName(key)\n ? computedStyle.getPropertyValue(key)\n : computedStyle[key]) || 0;\n return typeof value === \"string\" ? value.trim() : value;\n }\n }\n measureInstanceViewportBox(instance, { transformPagePoint }) {\n return measureViewportBox(instance, transformPagePoint);\n }\n build(renderState, latestValues, options, props) {\n buildHTMLStyles(renderState, latestValues, options, props.transformTemplate);\n }\n scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n return scrapeMotionValuesFromProps(props, prevProps, visualElement);\n }\n handleChildMotionValue() {\n if (this.childSubscription) {\n this.childSubscription();\n delete this.childSubscription;\n }\n const { children } = this.props;\n if (isMotionValue(children)) {\n this.childSubscription = children.on(\"change\", (latest) => {\n if (this.current)\n this.current.textContent = `${latest}`;\n });\n }\n }\n renderInstance(instance, renderState, styleProp, projection) {\n renderHTML(instance, renderState, styleProp, projection);\n }\n}\n\nexport { HTMLVisualElement, getComputedStyle };\n","import { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { DOMVisualElement } from '../dom/DOMVisualElement.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\nimport { camelToDash } from '../dom/utils/camel-to-dash.mjs';\nimport { camelCaseAttributes } from './utils/camel-case-attrs.mjs';\nimport { transformProps } from '../html/utils/transform.mjs';\nimport { renderSVG } from './utils/render.mjs';\nimport { getDefaultValueType } from '../dom/value-types/defaults.mjs';\nimport { createBox } from '../../projection/geometry/models.mjs';\nimport { isSVGTag } from './utils/is-svg-tag.mjs';\n\nclass SVGVisualElement extends DOMVisualElement {\n constructor() {\n super(...arguments);\n this.type = \"svg\";\n this.isSVGTag = false;\n }\n getBaseTargetFromProps(props, key) {\n return props[key];\n }\n readValueFromInstance(instance, key) {\n if (transformProps.has(key)) {\n const defaultType = getDefaultValueType(key);\n return defaultType ? defaultType.default || 0 : 0;\n }\n key = !camelCaseAttributes.has(key) ? camelToDash(key) : key;\n return instance.getAttribute(key);\n }\n measureInstanceViewportBox() {\n return createBox();\n }\n scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n return scrapeMotionValuesFromProps(props, prevProps, visualElement);\n }\n build(renderState, latestValues, options, props) {\n buildSVGAttrs(renderState, latestValues, options, this.isSVGTag, props.transformTemplate);\n }\n renderInstance(instance, renderState, styleProp, projection) {\n renderSVG(instance, renderState, styleProp, projection);\n }\n mount(instance) {\n this.isSVGTag = isSVGTag(instance.tagName);\n super.mount(instance);\n }\n}\n\nexport { SVGVisualElement };\n","import { Fragment } from 'react';\nimport { HTMLVisualElement } from '../html/HTMLVisualElement.mjs';\nimport { SVGVisualElement } from '../svg/SVGVisualElement.mjs';\nimport { isSVGComponent } from './utils/is-svg-component.mjs';\n\nconst createDomVisualElement = (Component, options) => {\n return isSVGComponent(Component)\n ? new SVGVisualElement(options, { enableHardwareAcceleration: false })\n : new HTMLVisualElement(options, {\n allowProjection: Component !== Fragment,\n enableHardwareAcceleration: true,\n });\n};\n\nexport { createDomVisualElement };\n","import { createMotionComponent } from '../../motion/index.mjs';\nimport { createMotionProxy } from './motion-proxy.mjs';\nimport { createDomMotionConfig } from './utils/create-config.mjs';\nimport { gestureAnimations } from '../../motion/features/gestures.mjs';\nimport { animations } from '../../motion/features/animations.mjs';\nimport { drag } from '../../motion/features/drag.mjs';\nimport { createDomVisualElement } from './create-visual-element.mjs';\nimport { layout } from '../../motion/features/layout.mjs';\n\nconst preloadedFeatures = {\n ...animations,\n ...gestureAnimations,\n ...drag,\n ...layout,\n};\n/**\n * HTML & SVG components, optimised for use with gestures and animation. These can be used as\n * drop-in replacements for any HTML & SVG component, all CSS & SVG properties are supported.\n *\n * @public\n */\nconst motion = /*@__PURE__*/ createMotionProxy((Component, config) => createDomMotionConfig(Component, config, preloadedFeatures, createDomVisualElement));\n/**\n * Create a DOM `motion` component with the provided string. This is primarily intended\n * as a full alternative to `motion` for consumers who have to support environments that don't\n * support `Proxy`.\n *\n * ```javascript\n * import { createDomMotionComponent } from \"framer-motion\"\n *\n * const motion = {\n * div: createDomMotionComponent('div')\n * }\n * ```\n *\n * @public\n */\nfunction createDomMotionComponent(key) {\n return createMotionComponent(createDomMotionConfig(key, { forwardMotionProps: false }, preloadedFeatures, createDomVisualElement));\n}\n\nexport { createDomMotionComponent, motion };\n","import { HTMLProjectionNode } from '../../projection/node/HTMLProjectionNode.mjs';\nimport { MeasureLayout } from './layout/MeasureLayout.mjs';\n\nconst layout = {\n layout: {\n ProjectionNode: HTMLProjectionNode,\n MeasureLayout,\n },\n};\n\nexport { layout };\n","import { isSVGComponent } from './is-svg-component.mjs';\nimport { createUseRender } from '../use-render.mjs';\nimport { svgMotionConfig } from '../../svg/config-motion.mjs';\nimport { htmlMotionConfig } from '../../html/config-motion.mjs';\n\nfunction createDomMotionConfig(Component, { forwardMotionProps = false }, preloadedFeatures, createVisualElement) {\n const baseConfig = isSVGComponent(Component)\n ? svgMotionConfig\n : htmlMotionConfig;\n return {\n ...baseConfig,\n preloadedFeatures,\n useRender: createUseRender(forwardMotionProps),\n createVisualElement,\n Component,\n };\n}\n\nexport { createDomMotionConfig };\n","import { useRef } from 'react';\nimport { useIsomorphicLayoutEffect } from './use-isomorphic-effect.mjs';\n\nfunction useIsMounted() {\n const isMounted = useRef(false);\n useIsomorphicLayoutEffect(() => {\n isMounted.current = true;\n return () => {\n isMounted.current = false;\n };\n }, []);\n return isMounted;\n}\n\nexport { useIsMounted };\n","import { jsx } from 'react/jsx-runtime';\nimport * as React from 'react';\nimport { useId, useRef, useContext, useInsertionEffect } from 'react';\nimport { MotionConfigContext } from '../../context/MotionConfigContext.mjs';\n\n/**\n * Measurement functionality has to be within a separate component\n * to leverage snapshot lifecycle.\n */\nclass PopChildMeasure extends React.Component {\n getSnapshotBeforeUpdate(prevProps) {\n const element = this.props.childRef.current;\n if (element && prevProps.isPresent && !this.props.isPresent) {\n const size = this.props.sizeRef.current;\n size.height = element.offsetHeight || 0;\n size.width = element.offsetWidth || 0;\n size.top = element.offsetTop;\n size.left = element.offsetLeft;\n }\n return null;\n }\n /**\n * Required with getSnapshotBeforeUpdate to stop React complaining.\n */\n componentDidUpdate() { }\n render() {\n return this.props.children;\n }\n}\nfunction PopChild({ children, isPresent }) {\n const id = useId();\n const ref = useRef(null);\n const size = useRef({\n width: 0,\n height: 0,\n top: 0,\n left: 0,\n });\n const { nonce } = useContext(MotionConfigContext);\n /**\n * We create and inject a style block so we can apply this explicit\n * sizing in a non-destructive manner by just deleting the style block.\n *\n * We can't apply size via render as the measurement happens\n * in getSnapshotBeforeUpdate (post-render), likewise if we apply the\n * styles directly on the DOM node, we might be overwriting\n * styles set via the style prop.\n */\n useInsertionEffect(() => {\n const { width, height, top, left } = size.current;\n if (isPresent || !ref.current || !width || !height)\n return;\n ref.current.dataset.motionPopId = id;\n const style = document.createElement(\"style\");\n if (nonce)\n style.nonce = nonce;\n document.head.appendChild(style);\n if (style.sheet) {\n style.sheet.insertRule(`\n [data-motion-pop-id=\"${id}\"] {\n position: absolute !important;\n width: ${width}px !important;\n height: ${height}px !important;\n top: ${top}px !important;\n left: ${left}px !important;\n }\n `);\n }\n return () => {\n document.head.removeChild(style);\n };\n }, [isPresent]);\n return (jsx(PopChildMeasure, { isPresent: isPresent, childRef: ref, sizeRef: size, children: React.cloneElement(children, { ref }) }));\n}\n\nexport { PopChild };\n","import { jsx } from 'react/jsx-runtime';\nimport * as React from 'react';\nimport { useId, useMemo } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { PopChild } from './PopChild.mjs';\n\nconst PresenceChild = ({ children, initial, isPresent, onExitComplete, custom, presenceAffectsLayout, mode, }) => {\n const presenceChildren = useConstant(newChildrenMap);\n const id = useId();\n const context = useMemo(() => ({\n id,\n initial,\n isPresent,\n custom,\n onExitComplete: (childId) => {\n presenceChildren.set(childId, true);\n for (const isComplete of presenceChildren.values()) {\n if (!isComplete)\n return; // can stop searching when any is incomplete\n }\n onExitComplete && onExitComplete();\n },\n register: (childId) => {\n presenceChildren.set(childId, false);\n return () => presenceChildren.delete(childId);\n },\n }), \n /**\n * If the presence of a child affects the layout of the components around it,\n * we want to make a new context value to ensure they get re-rendered\n * so they can detect that layout change.\n */\n presenceAffectsLayout ? [Math.random()] : [isPresent]);\n useMemo(() => {\n presenceChildren.forEach((_, key) => presenceChildren.set(key, false));\n }, [isPresent]);\n /**\n * If there's no `motion` components to fire exit animations, we want to remove this\n * component immediately.\n */\n React.useEffect(() => {\n !isPresent &&\n !presenceChildren.size &&\n onExitComplete &&\n onExitComplete();\n }, [isPresent]);\n if (mode === \"popLayout\") {\n children = jsx(PopChild, { isPresent: isPresent, children: children });\n }\n return (jsx(PresenceContext.Provider, { value: context, children: children }));\n};\nfunction newChildrenMap() {\n return new Map();\n}\n\nexport { PresenceChild };\n","import { jsx, Fragment } from 'react/jsx-runtime';\nimport { useContext, useRef, cloneElement, Children, isValidElement } from 'react';\nimport { useForceUpdate } from '../../utils/use-force-update.mjs';\nimport { useIsMounted } from '../../utils/use-is-mounted.mjs';\nimport { PresenceChild } from './PresenceChild.mjs';\nimport { LayoutGroupContext } from '../../context/LayoutGroupContext.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { useUnmountEffect } from '../../utils/use-unmount-effect.mjs';\nimport { invariant } from '../../utils/errors.mjs';\n\nconst getChildKey = (child) => child.key || \"\";\nfunction updateChildLookup(children, allChildren) {\n children.forEach((child) => {\n const key = getChildKey(child);\n allChildren.set(key, child);\n });\n}\nfunction onlyElements(children) {\n const filtered = [];\n // We use forEach here instead of map as map mutates the component key by preprending `.$`\n Children.forEach(children, (child) => {\n if (isValidElement(child))\n filtered.push(child);\n });\n return filtered;\n}\n/**\n * `AnimatePresence` enables the animation of components that have been removed from the tree.\n *\n * When adding/removing more than a single child, every child **must** be given a unique `key` prop.\n *\n * Any `motion` components that have an `exit` property defined will animate out when removed from\n * the tree.\n *\n * ```jsx\n * import { motion, AnimatePresence } from 'framer-motion'\n *\n * export const Items = ({ items }) => (\n * <AnimatePresence>\n * {items.map(item => (\n * <motion.div\n * key={item.id}\n * initial={{ opacity: 0 }}\n * animate={{ opacity: 1 }}\n * exit={{ opacity: 0 }}\n * />\n * ))}\n * </AnimatePresence>\n * )\n * ```\n *\n * You can sequence exit animations throughout a tree using variants.\n *\n * If a child contains multiple `motion` components with `exit` props, it will only unmount the child\n * once all `motion` components have finished animating out. Likewise, any components using\n * `usePresence` all need to call `safeToRemove`.\n *\n * @public\n */\nconst AnimatePresence = ({ children, custom, initial = true, onExitComplete, exitBeforeEnter, presenceAffectsLayout = true, mode = \"sync\", }) => {\n invariant(!exitBeforeEnter, \"Replace exitBeforeEnter with mode='wait'\");\n // We want to force a re-render once all exiting animations have finished. We\n // either use a local forceRender function, or one from a parent context if it exists.\n const forceRender = useContext(LayoutGroupContext).forceRender || useForceUpdate()[0];\n const isMounted = useIsMounted();\n // Filter out any children that aren't ReactElements. We can only track ReactElements with a props.key\n const filteredChildren = onlyElements(children);\n let childrenToRender = filteredChildren;\n const exitingChildren = useRef(new Map()).current;\n // Keep a living record of the children we're actually rendering so we\n // can diff to figure out which are entering and exiting\n const presentChildren = useRef(childrenToRender);\n // A lookup table to quickly reference components by key\n const allChildren = useRef(new Map()).current;\n // If this is the initial component render, just deal with logic surrounding whether\n // we play onMount animations or not.\n const isInitialRender = useRef(true);\n useIsomorphicLayoutEffect(() => {\n isInitialRender.current = false;\n updateChildLookup(filteredChildren, allChildren);\n presentChildren.current = childrenToRender;\n });\n useUnmountEffect(() => {\n isInitialRender.current = true;\n allChildren.clear();\n exitingChildren.clear();\n });\n if (isInitialRender.current) {\n return (jsx(Fragment, { children: childrenToRender.map((child) => (jsx(PresenceChild, { isPresent: true, initial: initial ? undefined : false, presenceAffectsLayout: presenceAffectsLayout, mode: mode, children: child }, getChildKey(child)))) }));\n }\n // If this is a subsequent render, deal with entering and exiting children\n childrenToRender = [...childrenToRender];\n // Diff the keys of the currently-present and target children to update our\n // exiting list.\n const presentKeys = presentChildren.current.map(getChildKey);\n const targetKeys = filteredChildren.map(getChildKey);\n // Diff the present children with our target children and mark those that are exiting\n const numPresent = presentKeys.length;\n for (let i = 0; i < numPresent; i++) {\n const key = presentKeys[i];\n if (targetKeys.indexOf(key) === -1 && !exitingChildren.has(key)) {\n exitingChildren.set(key, undefined);\n }\n }\n // If we currently have exiting children, and we're deferring rendering incoming children\n // until after all current children have exiting, empty the childrenToRender array\n if (mode === \"wait\" && exitingChildren.size) {\n childrenToRender = [];\n }\n // Loop through all currently exiting components and clone them to overwrite `animate`\n // with any `exit` prop they might have defined.\n exitingChildren.forEach((component, key) => {\n // If this component is actually entering again, early return\n if (targetKeys.indexOf(key) !== -1)\n return;\n const child = allChildren.get(key);\n if (!child)\n return;\n const insertionIndex = presentKeys.indexOf(key);\n let exitingComponent = component;\n if (!exitingComponent) {\n const onExit = () => {\n // clean up the exiting children map\n exitingChildren.delete(key);\n // compute the keys of children that were rendered once but are no longer present\n // this could happen in case of too many fast consequent renderings\n // @link https://github.com/framer/motion/issues/2023\n const leftOverKeys = Array.from(allChildren.keys()).filter((childKey) => !targetKeys.includes(childKey));\n // clean up the all children map\n leftOverKeys.forEach((leftOverKey) => allChildren.delete(leftOverKey));\n // make sure to render only the children that are actually visible\n presentChildren.current = filteredChildren.filter((presentChild) => {\n const presentChildKey = getChildKey(presentChild);\n return (\n // filter out the node exiting\n presentChildKey === key ||\n // filter out the leftover children\n leftOverKeys.includes(presentChildKey));\n });\n // Defer re-rendering until all exiting children have indeed left\n if (!exitingChildren.size) {\n if (isMounted.current === false)\n return;\n forceRender();\n onExitComplete && onExitComplete();\n }\n };\n exitingComponent = (jsx(PresenceChild, { isPresent: false, onExitComplete: onExit, custom: custom, presenceAffectsLayout: presenceAffectsLayout, mode: mode, children: child }, getChildKey(child)));\n exitingChildren.set(key, exitingComponent);\n }\n childrenToRender.splice(insertionIndex, 0, exitingComponent);\n });\n // Add `MotionContext` even to children that don't need it to ensure we're rendering\n // the same tree between renders\n childrenToRender = childrenToRender.map((child) => {\n const key = child.key;\n return exitingChildren.has(key) ? (child) : (jsx(PresenceChild, { isPresent: true, presenceAffectsLayout: presenceAffectsLayout, mode: mode, children: child }, getChildKey(child)));\n });\n if (process.env.NODE_ENV !== \"production\" &&\n mode === \"wait\" &&\n childrenToRender.length > 1) {\n console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to \"wait\". This will lead to odd visual behaviour.`);\n }\n return (jsx(Fragment, { children: exitingChildren.size\n ? childrenToRender\n : childrenToRender.map((child) => cloneElement(child)) }));\n};\n\nexport { AnimatePresence };\n","import { useState, useCallback } from 'react';\nimport { useIsMounted } from './use-is-mounted.mjs';\nimport { frame } from '../frameloop/frame.mjs';\n\nfunction useForceUpdate() {\n const isMounted = useIsMounted();\n const [forcedRenderCount, setForcedRenderCount] = useState(0);\n const forceRender = useCallback(() => {\n isMounted.current && setForcedRenderCount(forcedRenderCount + 1);\n }, [forcedRenderCount]);\n /**\n * Defer this to the end of the next animation frame in case there are multiple\n * synchronous calls.\n */\n const deferredForceRender = useCallback(() => frame.postRender(forceRender), [forceRender]);\n return [deferredForceRender, forcedRenderCount];\n}\n\nexport { useForceUpdate };\n","import { useEffect } from 'react';\n\nfunction useUnmountEffect(callback) {\n return useEffect(() => () => callback(), []);\n}\n\nexport { useUnmountEffect };\n","/**\n * WordPress dependencies\n */\nimport { useEffect, useState } from '@wordpress/element';\n\nconst breakpoints = [ '40em', '52em', '64em' ];\n\nexport const useBreakpointIndex = (\n\toptions: { defaultIndex?: number } = {}\n) => {\n\tconst { defaultIndex = 0 } = options;\n\n\tif ( typeof defaultIndex !== 'number' ) {\n\t\tthrow new TypeError(\n\t\t\t`Default breakpoint index should be a number. Got: ${ defaultIndex }, ${ typeof defaultIndex }`\n\t\t);\n\t} else if ( defaultIndex < 0 || defaultIndex > breakpoints.length - 1 ) {\n\t\tthrow new RangeError(\n\t\t\t`Default breakpoint index out of range. Theme has ${ breakpoints.length } breakpoints, got index ${ defaultIndex }`\n\t\t);\n\t}\n\n\tconst [ value, setValue ] = useState( defaultIndex );\n\n\tuseEffect( () => {\n\t\tconst getIndex = () =>\n\t\t\tbreakpoints.filter( ( bp ) => {\n\t\t\t\treturn typeof window !== 'undefined'\n\t\t\t\t\t? window.matchMedia( `screen and (min-width: ${ bp })` )\n\t\t\t\t\t\t\t.matches\n\t\t\t\t\t: false;\n\t\t\t} ).length;\n\n\t\tconst onResize = () => {\n\t\t\tconst newValue = getIndex();\n\t\t\tif ( value !== newValue ) {\n\t\t\t\tsetValue( newValue );\n\t\t\t}\n\t\t};\n\n\t\tonResize();\n\n\t\tif ( typeof window !== 'undefined' ) {\n\t\t\twindow.addEventListener( 'resize', onResize );\n\t\t}\n\t\treturn () => {\n\t\t\tif ( typeof window !== 'undefined' ) {\n\t\t\t\twindow.removeEventListener( 'resize', onResize );\n\t\t\t}\n\t\t};\n\t}, [ value ] );\n\n\treturn value;\n};\n\nexport function useResponsiveValue< T >(\n\tvalues: ( T | undefined )[],\n\toptions: Parameters< typeof useBreakpointIndex >[ 0 ] = {}\n): T | undefined {\n\tconst index = useBreakpointIndex( options );\n\n\t// Allow calling the function with a \"normal\" value without having to check on the outside.\n\tif ( ! Array.isArray( values ) && typeof values !== 'function' ) {\n\t\treturn values;\n\t}\n\n\tconst array = values || [];\n\n\t/* eslint-disable jsdoc/no-undefined-types */\n\treturn /** @type {T[]} */ array[\n\t\t/* eslint-enable jsdoc/no-undefined-types */\n\t\tindex >= array.length ? array.length - 1 : index\n\t];\n}\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\nexport const Flex = css`\n\tdisplay: flex;\n`;\n\nexport const Item = css`\n\tdisplay: block;\n\tmax-height: 100%;\n\tmax-width: 100%;\n\tmin-height: 0;\n\tmin-width: 0;\n`;\n\nexport const block = css`\n\tflex: 1;\n`;\n\n/**\n * Workaround to optimize DOM rendering.\n * We'll enhance alignment with naive parent flex assumptions.\n *\n * Trade-off:\n * Far less DOM less. However, UI rendering is not as reliable.\n */\n\n/**\n * Improves stability of width/height rendering.\n * https://github.com/ItsJonQ/g2/pull/149\n */\nexport const ItemsColumn = css`\n\t> * {\n\t\tmin-height: 0;\n\t}\n`;\n\nexport const ItemsRow = css`\n\t> * {\n\t\tmin-width: 0;\n\t}\n`;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { useContextSystem } from '../../context';\nimport { useResponsiveValue } from '../../utils/use-responsive-value';\nimport { space } from '../../utils/space';\nimport * as styles from '../styles';\nimport { useCx } from '../../utils';\nimport type { FlexProps } from '../types';\n\nfunction useDeprecatedProps(\n\tprops: WordPressComponentProps< FlexProps, 'div' >\n): Omit< typeof props, 'isReversed' > {\n\tconst { isReversed, ...otherProps } = props;\n\n\tif ( typeof isReversed !== 'undefined' ) {\n\t\tdeprecated( 'Flex isReversed', {\n\t\t\talternative: 'Flex direction=\"row-reverse\" or \"column-reverse\"',\n\t\t\tsince: '5.9',\n\t\t} );\n\t\treturn {\n\t\t\t...otherProps,\n\t\t\tdirection: isReversed ? 'row-reverse' : 'row',\n\t\t};\n\t}\n\n\treturn otherProps;\n}\n\nexport function useFlex( props: WordPressComponentProps< FlexProps, 'div' > ) {\n\tconst {\n\t\talign,\n\t\tclassName,\n\t\tdirection: directionProp = 'row',\n\t\texpanded = true,\n\t\tgap = 2,\n\t\tjustify = 'space-between',\n\t\twrap = false,\n\t\t...otherProps\n\t} = useContextSystem( useDeprecatedProps( props ), 'Flex' );\n\n\tconst directionAsArray = Array.isArray( directionProp )\n\t\t? directionProp\n\t\t: [ directionProp ];\n\tconst direction = useResponsiveValue( directionAsArray );\n\n\tconst isColumn =\n\t\ttypeof direction === 'string' && !! direction.includes( 'column' );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo( () => {\n\t\tconst base = css( {\n\t\t\talignItems: align ?? ( isColumn ? 'normal' : 'center' ),\n\t\t\tflexDirection: direction,\n\t\t\tflexWrap: wrap ? 'wrap' : undefined,\n\t\t\tgap: space( gap ),\n\t\t\tjustifyContent: justify,\n\t\t\theight: isColumn && expanded ? '100%' : undefined,\n\t\t\twidth: ! isColumn && expanded ? '100%' : undefined,\n\t\t} );\n\n\t\treturn cx(\n\t\t\tstyles.Flex,\n\t\t\tbase,\n\t\t\tisColumn ? styles.ItemsColumn : styles.ItemsRow,\n\t\t\tclassName\n\t\t);\n\t}, [\n\t\talign,\n\t\tclassName,\n\t\tcx,\n\t\tdirection,\n\t\texpanded,\n\t\tgap,\n\t\tisColumn,\n\t\tjustify,\n\t\twrap,\n\t] );\n\n\treturn { ...otherProps, className: classes, isColumn };\n}\n","/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\nexport const FlexContext = createContext< {\n\tflexItemDisplay: 'block' | undefined;\n} >( {\n\tflexItemDisplay: undefined,\n} );\n\nexport const useFlexContext = () => useContext( FlexContext );\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect } from '../../context';\nimport { useFlex } from './hook';\nimport { FlexContext } from './../context';\nimport { View } from '../../view';\nimport type { FlexProps } from '../types';\n\nfunction UnconnectedFlex(\n\tprops: WordPressComponentProps< FlexProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst { children, isColumn, ...otherProps } = useFlex( props );\n\n\treturn (\n\t\t<FlexContext.Provider\n\t\t\tvalue={ { flexItemDisplay: isColumn ? 'block' : undefined } }\n\t\t>\n\t\t\t<View { ...otherProps } ref={ forwardedRef }>\n\t\t\t\t{ children }\n\t\t\t</View>\n\t\t</FlexContext.Provider>\n\t);\n}\n\n/**\n * `Flex` is a primitive layout component that adaptively aligns child content\n * horizontally or vertically. `Flex` powers components like `HStack` and\n * `VStack`.\n *\n * `Flex` is used with any of its two sub-components, `FlexItem` and\n * `FlexBlock`.\n *\n * ```jsx\n * import { Flex, FlexBlock, FlexItem } from '@wordpress/components';\n *\n * function Example() {\n * return (\n * <Flex>\n * <FlexItem>\n * <p>Code</p>\n * </FlexItem>\n * <FlexBlock>\n * <p>Poetry</p>\n * </FlexBlock>\n * </Flex>\n * );\n * }\n * ```\n */\nexport const Flex = contextConnect( UnconnectedFlex, 'Flex' );\n\nexport default Flex;\n","/**\n * External dependencies\n */\nimport type { SerializedStyles } from '@emotion/react';\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { useContextSystem } from '../../context';\nimport { useFlexContext } from '../context';\nimport * as styles from '../styles';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { FlexItemProps } from '../types';\n\nexport function useFlexItem(\n\tprops: WordPressComponentProps< FlexItemProps, 'div' >\n) {\n\tconst {\n\t\tclassName,\n\t\tdisplay: displayProp,\n\t\tisBlock = false,\n\t\t...otherProps\n\t} = useContextSystem( props, 'FlexItem' );\n\n\tconst sx: {\n\t\tBase?: SerializedStyles;\n\t} = {};\n\n\tconst contextDisplay = useFlexContext().flexItemDisplay;\n\n\tsx.Base = css( {\n\t\tdisplay: displayProp || contextDisplay,\n\t} );\n\n\tconst cx = useCx();\n\n\tconst classes = cx(\n\t\tstyles.Item,\n\t\tsx.Base,\n\t\tisBlock && styles.block,\n\t\tclassName\n\t);\n\n\treturn {\n\t\t...otherProps,\n\t\tclassName: classes,\n\t};\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect } from '../../context';\nimport { View } from '../../view';\nimport type { FlexBlockProps } from '../types';\nimport { useFlexBlock } from './hook';\n\nfunction UnconnectedFlexBlock(\n\tprops: WordPressComponentProps< FlexBlockProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst flexBlockProps = useFlexBlock( props );\n\n\treturn <View { ...flexBlockProps } ref={ forwardedRef } />;\n}\n\n/**\n * `FlexBlock` is a primitive layout component that adaptively resizes content\n * within layout containers like `Flex`.\n *\n * ```jsx\n * import { Flex, FlexBlock } from '@wordpress/components';\n *\n * function Example() {\n * return (\n * <Flex>\n * <FlexBlock>...</FlexBlock>\n * </Flex>\n * );\n * }\n * ```\n */\nexport const FlexBlock = contextConnect( UnconnectedFlexBlock, 'FlexBlock' );\n\nexport default FlexBlock;\n","/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { useContextSystem } from '../../context';\nimport { useFlexItem } from '../flex-item';\nimport type { FlexBlockProps } from '../types';\n\nexport function useFlexBlock(\n\tprops: WordPressComponentProps< FlexBlockProps, 'div' >\n) {\n\tconst otherProps = useContextSystem( props, 'FlexBlock' );\n\tconst flexItemProps = useFlexItem( { isBlock: true, ...otherProps } );\n\n\treturn flexItemProps;\n}\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * WordPress dependencies\n */\nimport { isRTL } from '@wordpress/i18n';\n\nconst LOWER_LEFT_REGEXP = new RegExp( /-left/g );\nconst LOWER_RIGHT_REGEXP = new RegExp( /-right/g );\nconst UPPER_LEFT_REGEXP = new RegExp( /Left/g );\nconst UPPER_RIGHT_REGEXP = new RegExp( /Right/g );\n\n/**\n * Flips a CSS property from left <-> right.\n *\n * @param {string} key The CSS property name.\n *\n * @return {string} The flipped CSS property name, if applicable.\n */\nfunction getConvertedKey( key ) {\n\tif ( key === 'left' ) {\n\t\treturn 'right';\n\t}\n\n\tif ( key === 'right' ) {\n\t\treturn 'left';\n\t}\n\n\tif ( LOWER_LEFT_REGEXP.test( key ) ) {\n\t\treturn key.replace( LOWER_LEFT_REGEXP, '-right' );\n\t}\n\n\tif ( LOWER_RIGHT_REGEXP.test( key ) ) {\n\t\treturn key.replace( LOWER_RIGHT_REGEXP, '-left' );\n\t}\n\n\tif ( UPPER_LEFT_REGEXP.test( key ) ) {\n\t\treturn key.replace( UPPER_LEFT_REGEXP, 'Right' );\n\t}\n\n\tif ( UPPER_RIGHT_REGEXP.test( key ) ) {\n\t\treturn key.replace( UPPER_RIGHT_REGEXP, 'Left' );\n\t}\n\n\treturn key;\n}\n\n/**\n * An incredibly basic ltr -> rtl converter for style properties\n *\n * @param {import('react').CSSProperties} ltrStyles\n *\n * @return {import('react').CSSProperties} Converted ltr -> rtl styles\n */\nexport const convertLTRToRTL = ( ltrStyles = {} ) => {\n\treturn Object.fromEntries(\n\t\tObject.entries( ltrStyles ).map( ( [ key, value ] ) => [\n\t\t\tgetConvertedKey( key ),\n\t\t\tvalue,\n\t\t] )\n\t);\n};\n\n/**\n * A higher-order function that create an incredibly basic ltr -> rtl style converter for CSS objects.\n *\n * @param {import('react').CSSProperties} ltrStyles Ltr styles. Converts and renders from ltr -> rtl styles, if applicable.\n * @param {import('react').CSSProperties} [rtlStyles] Rtl styles. Renders if provided.\n *\n * @return {() => import('@emotion/react').SerializedStyles} A function to output CSS styles for Emotion's renderer\n */\nexport function rtl( ltrStyles = {}, rtlStyles ) {\n\treturn () => {\n\t\tif ( rtlStyles ) {\n\t\t\t// @ts-ignore: `css` types are wrong, it can accept an object: https://emotion.sh/docs/object-styles#with-css\n\t\t\treturn isRTL() ? css( rtlStyles ) : css( ltrStyles );\n\t\t}\n\n\t\t// @ts-ignore: `css` types are wrong, it can accept an object: https://emotion.sh/docs/object-styles#with-css\n\t\treturn isRTL() ? css( convertLTRToRTL( ltrStyles ) ) : css( ltrStyles );\n\t};\n}\n\n/**\n * Call this in the `useMemo` dependency array to ensure that subsequent renders will\n * cause rtl styles to update based on the `isRTL` return value even if all other dependencies\n * remain the same.\n *\n * @example\n * const styles = useMemo( () => {\n * return css`\n * ${ rtl( { marginRight: '10px' } ) }\n * `;\n * }, [ rtl.watch() ] );\n */\nrtl.watch = () => isRTL();\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { useContextSystem } from '../context';\nimport { space } from '../utils/space';\nimport { rtl, useCx } from '../utils';\nimport type { SpacerProps } from './types';\n\nfunction isDefined< T >( o: T ): o is Exclude< T, null | undefined > {\n\treturn typeof o !== 'undefined' && o !== null;\n}\n\nexport function useSpacer(\n\tprops: WordPressComponentProps< SpacerProps, 'div' >\n) {\n\tconst {\n\t\tclassName,\n\t\tmargin,\n\t\tmarginBottom = 2,\n\t\tmarginLeft,\n\t\tmarginRight,\n\t\tmarginTop,\n\t\tmarginX,\n\t\tmarginY,\n\t\tpadding,\n\t\tpaddingBottom,\n\t\tpaddingLeft,\n\t\tpaddingRight,\n\t\tpaddingTop,\n\t\tpaddingX,\n\t\tpaddingY,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Spacer' );\n\n\tconst cx = useCx();\n\n\tconst classes = cx(\n\t\tisDefined( margin ) &&\n\t\t\tcss`\n\t\t\t\tmargin: ${ space( margin ) };\n\t\t\t`,\n\t\tisDefined( marginY ) &&\n\t\t\tcss`\n\t\t\t\tmargin-bottom: ${ space( marginY ) };\n\t\t\t\tmargin-top: ${ space( marginY ) };\n\t\t\t`,\n\t\tisDefined( marginX ) &&\n\t\t\tcss`\n\t\t\t\tmargin-left: ${ space( marginX ) };\n\t\t\t\tmargin-right: ${ space( marginX ) };\n\t\t\t`,\n\t\tisDefined( marginTop ) &&\n\t\t\tcss`\n\t\t\t\tmargin-top: ${ space( marginTop ) };\n\t\t\t`,\n\t\tisDefined( marginBottom ) &&\n\t\t\tcss`\n\t\t\t\tmargin-bottom: ${ space( marginBottom ) };\n\t\t\t`,\n\t\tisDefined( marginLeft ) &&\n\t\t\trtl( {\n\t\t\t\tmarginLeft: space( marginLeft ),\n\t\t\t} )(),\n\t\tisDefined( marginRight ) &&\n\t\t\trtl( {\n\t\t\t\tmarginRight: space( marginRight ),\n\t\t\t} )(),\n\t\tisDefined( padding ) &&\n\t\t\tcss`\n\t\t\t\tpadding: ${ space( padding ) };\n\t\t\t`,\n\t\tisDefined( paddingY ) &&\n\t\t\tcss`\n\t\t\t\tpadding-bottom: ${ space( paddingY ) };\n\t\t\t\tpadding-top: ${ space( paddingY ) };\n\t\t\t`,\n\t\tisDefined( paddingX ) &&\n\t\t\tcss`\n\t\t\t\tpadding-left: ${ space( paddingX ) };\n\t\t\t\tpadding-right: ${ space( paddingX ) };\n\t\t\t`,\n\t\tisDefined( paddingTop ) &&\n\t\t\tcss`\n\t\t\t\tpadding-top: ${ space( paddingTop ) };\n\t\t\t`,\n\t\tisDefined( paddingBottom ) &&\n\t\t\tcss`\n\t\t\t\tpadding-bottom: ${ space( paddingBottom ) };\n\t\t\t`,\n\t\tisDefined( paddingLeft ) &&\n\t\t\trtl( {\n\t\t\t\tpaddingLeft: space( paddingLeft ),\n\t\t\t} )(),\n\t\tisDefined( paddingRight ) &&\n\t\t\trtl( {\n\t\t\t\tpaddingRight: space( paddingRight ),\n\t\t\t} )(),\n\t\tclassName\n\t);\n\n\treturn { ...otherProps, className: classes };\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { contextConnect } from '../context';\nimport { View } from '../view';\nimport { useSpacer } from './hook';\nimport type { SpacerProps } from './types';\n\nfunction UnconnectedSpacer(\n\tprops: WordPressComponentProps< SpacerProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst spacerProps = useSpacer( props );\n\n\treturn <View { ...spacerProps } ref={ forwardedRef } />;\n}\n\n/**\n * `Spacer` is a primitive layout component that providers inner (`padding`) or outer (`margin`) space in-between components. It can also be used to adaptively provide space within an `HStack` or `VStack`.\n *\n * `Spacer` comes with a bunch of shorthand props to adjust `margin` and `padding`. The values of these props\n * can either be a number (which will act as a multiplier to the library's grid system base of 4px),\n * or a literal CSS value string.\n *\n * ```jsx\n * import { Spacer } from `@wordpress/components`\n *\n * function Example() {\n * return (\n * <View>\n * <Spacer>\n * <Heading>WordPress.org</Heading>\n * </Spacer>\n * <Text>\n * Code is Poetry\n * </Text>\n * </View>\n * );\n * }\n * ```\n */\nexport const Spacer = contextConnect( UnconnectedSpacer, 'Spacer' );\n\nexport default Spacer;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst plus = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z\" />\n\t</SVG>\n);\n\nexport default plus;\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst reset = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M7 11.5h10V13H7z\" />\n\t</SVG>\n);\n\nexport default reset;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect } from '../../context';\nimport { View } from '../../view';\nimport { useFlexItem } from './hook';\nimport type { FlexItemProps } from '../types';\n\nfunction UnconnectedFlexItem(\n\tprops: WordPressComponentProps< FlexItemProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst flexItemProps = useFlexItem( props );\n\n\treturn <View { ...flexItemProps } ref={ forwardedRef } />;\n}\n\n/**\n * `FlexItem` is a primitive layout component that aligns content within layout\n * containers like `Flex`.\n *\n * ```jsx\n * import { Flex, FlexItem } from '@wordpress/components';\n *\n * function Example() {\n * return (\n * <Flex>\n * <FlexItem>...</FlexItem>\n * </Flex>\n * );\n * }\n * ```\n */\nexport const FlexItem = contextConnect( UnconnectedFlexItem, 'FlexItem' );\n\nexport default FlexItem;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\nexport const Truncate = css`\n\tdisplay: block;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n`;\n","/* eslint-disable jsdoc/valid-types */\n/**\n * Determines if a value is null or undefined.\n *\n * @template T\n *\n * @param {T} value The value to check.\n * @return {value is Exclude<T, null | undefined>} Whether value is not null or undefined.\n */\nexport function isValueDefined( value ) {\n\treturn value !== undefined && value !== null;\n}\n/* eslint-enable jsdoc/valid-types */\n\n/* eslint-disable jsdoc/valid-types */\n/**\n * Determines if a value is empty, null, or undefined.\n *\n * @param {string | number | null | undefined} value The value to check.\n * @return {value is (\"\" | null | undefined)} Whether value is empty.\n */\nexport function isValueEmpty( value ) {\n\tconst isEmptyString = value === '';\n\n\treturn ! isValueDefined( value ) || isEmptyString;\n}\n/* eslint-enable jsdoc/valid-types */\n\n/**\n * Get the first defined/non-null value from an array.\n *\n * @template T\n *\n * @param {Array<T | null | undefined>} values Values to derive from.\n * @param {T} fallbackValue Fallback value if there are no defined values.\n * @return {T} A defined value or the fallback value.\n */\nexport function getDefinedValue( values = [], fallbackValue ) {\n\treturn values.find( isValueDefined ) ?? fallbackValue;\n}\n\n/**\n * Converts a string to a number.\n *\n * @param {string} value\n * @return {number} String as a number.\n */\nexport const stringToNumber = ( value ) => {\n\treturn parseFloat( value );\n};\n\n/**\n * Regardless of the input being a string or a number, returns a number.\n *\n * Returns `undefined` in case the string is `undefined` or not a valid numeric value.\n *\n * @param {string | number} value\n * @return {number} The parsed number.\n */\nexport const ensureNumber = ( value ) => {\n\treturn typeof value === 'string' ? stringToNumber( value ) : value;\n};\n","/**\n * Internal dependencies\n */\nimport { isValueDefined } from '../utils/values';\nimport type { TruncateProps } from './types';\n\nexport const TRUNCATE_ELLIPSIS = '…';\nexport const TRUNCATE_TYPE = {\n\tauto: 'auto',\n\thead: 'head',\n\tmiddle: 'middle',\n\ttail: 'tail',\n\tnone: 'none',\n} as const;\n\nexport const TRUNCATE_DEFAULT_PROPS = {\n\tellipsis: TRUNCATE_ELLIPSIS,\n\tellipsizeMode: TRUNCATE_TYPE.auto,\n\tlimit: 0,\n\tnumberOfLines: 0,\n};\n\n// Source\n// https://github.com/kahwee/truncate-middle\nexport function truncateMiddle(\n\tword: string,\n\theadLength: number,\n\ttailLength: number,\n\tellipsis: string\n) {\n\tif ( typeof word !== 'string' ) {\n\t\treturn '';\n\t}\n\tconst wordLength = word.length;\n\t// Setting default values\n\t// eslint-disable-next-line no-bitwise\n\tconst frontLength = ~~headLength; // Will cast to integer\n\t// eslint-disable-next-line no-bitwise\n\tconst backLength = ~~tailLength;\n\t/* istanbul ignore next */\n\tconst truncateStr = isValueDefined( ellipsis )\n\t\t? ellipsis\n\t\t: TRUNCATE_ELLIPSIS;\n\n\tif (\n\t\t( frontLength === 0 && backLength === 0 ) ||\n\t\tfrontLength >= wordLength ||\n\t\tbackLength >= wordLength ||\n\t\tfrontLength + backLength >= wordLength\n\t) {\n\t\treturn word;\n\t} else if ( backLength === 0 ) {\n\t\treturn word.slice( 0, frontLength ) + truncateStr;\n\t}\n\treturn (\n\t\tword.slice( 0, frontLength ) +\n\t\ttruncateStr +\n\t\tword.slice( wordLength - backLength )\n\t);\n}\n\nexport function truncateContent(\n\twords: string = '',\n\tprops: Omit< TruncateProps, 'children' >\n) {\n\tconst mergedProps = { ...TRUNCATE_DEFAULT_PROPS, ...props };\n\tconst { ellipsis, ellipsizeMode, limit } = mergedProps;\n\n\tif ( ellipsizeMode === TRUNCATE_TYPE.none ) {\n\t\treturn words;\n\t}\n\n\tlet truncateHead: number;\n\tlet truncateTail: number;\n\n\tswitch ( ellipsizeMode ) {\n\t\tcase TRUNCATE_TYPE.head:\n\t\t\ttruncateHead = 0;\n\t\t\ttruncateTail = limit;\n\t\t\tbreak;\n\t\tcase TRUNCATE_TYPE.middle:\n\t\t\ttruncateHead = Math.floor( limit / 2 );\n\t\t\ttruncateTail = Math.floor( limit / 2 );\n\t\t\tbreak;\n\t\tdefault:\n\t\t\ttruncateHead = limit;\n\t\t\ttruncateTail = 0;\n\t}\n\n\tconst truncatedContent =\n\t\tellipsizeMode !== TRUNCATE_TYPE.auto\n\t\t\t? truncateMiddle( words, truncateHead, truncateTail, ellipsis )\n\t\t\t: words;\n\n\treturn truncatedContent;\n}\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { useContextSystem } from '../context';\nimport * as styles from './styles';\nimport { TRUNCATE_ELLIPSIS, TRUNCATE_TYPE, truncateContent } from './utils';\nimport { useCx } from '../utils/hooks/use-cx';\nimport type { TruncateProps } from './types';\n\nexport default function useTruncate(\n\tprops: WordPressComponentProps< TruncateProps, 'span' >\n) {\n\tconst {\n\t\tclassName,\n\t\tchildren,\n\t\tellipsis = TRUNCATE_ELLIPSIS,\n\t\tellipsizeMode = TRUNCATE_TYPE.auto,\n\t\tlimit = 0,\n\t\tnumberOfLines = 0,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Truncate' );\n\n\tconst cx = useCx();\n\n\tlet childrenAsText;\n\tif ( typeof children === 'string' ) {\n\t\tchildrenAsText = children;\n\t} else if ( typeof children === 'number' ) {\n\t\tchildrenAsText = children.toString();\n\t}\n\n\tconst truncatedContent = childrenAsText\n\t\t? truncateContent( childrenAsText, {\n\t\t\t\tellipsis,\n\t\t\t\tellipsizeMode,\n\t\t\t\tlimit,\n\t\t\t\tnumberOfLines,\n\t\t } )\n\t\t: children;\n\n\tconst shouldTruncate =\n\t\t!! childrenAsText && ellipsizeMode === TRUNCATE_TYPE.auto;\n\n\tconst classes = useMemo( () => {\n\t\t// The `word-break: break-all` property first makes sure a text line\n\t\t// breaks even when it contains 'unbreakable' content such as long URLs.\n\t\t// See https://github.com/WordPress/gutenberg/issues/60860.\n\t\tconst truncateLines = css`\n\t\t\t${ numberOfLines === 1 ? 'word-break: break-all;' : '' }\n\t\t\t-webkit-box-orient: vertical;\n\t\t\t-webkit-line-clamp: ${ numberOfLines };\n\t\t\tdisplay: -webkit-box;\n\t\t\toverflow: hidden;\n\t\t`;\n\n\t\treturn cx(\n\t\t\tshouldTruncate && ! numberOfLines && styles.Truncate,\n\t\t\tshouldTruncate && !! numberOfLines && truncateLines,\n\t\t\tclassName\n\t\t);\n\t}, [ className, cx, numberOfLines, shouldTruncate ] );\n\n\treturn { ...otherProps, className: classes, children: truncatedContent };\n}\n","var r={grad:.9,turn:360,rad:360/(2*Math.PI)},t=function(r){return\"string\"==typeof r?r.length>0:\"number\"==typeof r},n=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*r)/n+0},e=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),r>n?n:r>t?r:t},u=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},a=function(r){return{r:e(r.r,0,255),g:e(r.g,0,255),b:e(r.b,0,255),a:e(r.a)}},o=function(r){return{r:n(r.r),g:n(r.g),b:n(r.b),a:n(r.a,3)}},i=/^#([0-9a-f]{3,8})$/i,s=function(r){var t=r.toString(16);return t.length<2?\"0\"+t:t},h=function(r){var t=r.r,n=r.g,e=r.b,u=r.a,a=Math.max(t,n,e),o=a-Math.min(t,n,e),i=o?a===t?(n-e)/o:a===n?2+(e-t)/o:4+(t-n)/o:0;return{h:60*(i<0?i+6:i),s:a?o/a*100:0,v:a/255*100,a:u}},b=function(r){var t=r.h,n=r.s,e=r.v,u=r.a;t=t/360*6,n/=100,e/=100;var a=Math.floor(t),o=e*(1-n),i=e*(1-(t-a)*n),s=e*(1-(1-t+a)*n),h=a%6;return{r:255*[e,i,o,o,s,e][h],g:255*[s,e,e,i,o,o][h],b:255*[o,o,s,e,e,i][h],a:u}},g=function(r){return{h:u(r.h),s:e(r.s,0,100),l:e(r.l,0,100),a:e(r.a)}},d=function(r){return{h:n(r.h),s:n(r.s),l:n(r.l),a:n(r.a,3)}},f=function(r){return b((n=(t=r).s,{h:t.h,s:(n*=((e=t.l)<50?e:100-e)/100)>0?2*n/(e+n)*100:0,v:e+n,a:t.a}));var t,n,e},c=function(r){return{h:(t=h(r)).h,s:(u=(200-(n=t.s))*(e=t.v)/100)>0&&u<200?n*e/100/(u<=100?u:200-u)*100:0,l:u/2,a:t.a};var t,n,e,u},l=/^hsla?\\(\\s*([+-]?\\d*\\.?\\d+)(deg|rad|grad|turn)?\\s*,\\s*([+-]?\\d*\\.?\\d+)%\\s*,\\s*([+-]?\\d*\\.?\\d+)%\\s*(?:,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,p=/^hsla?\\(\\s*([+-]?\\d*\\.?\\d+)(deg|rad|grad|turn)?\\s+([+-]?\\d*\\.?\\d+)%\\s+([+-]?\\d*\\.?\\d+)%\\s*(?:\\/\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,v=/^rgba?\\(\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*(?:,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,m=/^rgba?\\(\\s*([+-]?\\d*\\.?\\d+)(%)?\\s+([+-]?\\d*\\.?\\d+)(%)?\\s+([+-]?\\d*\\.?\\d+)(%)?\\s*(?:\\/\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,y={string:[[function(r){var t=i.exec(r);return t?(r=t[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:4===r.length?n(parseInt(r[3]+r[3],16)/255,2):1}:6===r.length||8===r.length?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:8===r.length?n(parseInt(r.substr(6,2),16)/255,2):1}:null:null},\"hex\"],[function(r){var t=v.exec(r)||m.exec(r);return t?t[2]!==t[4]||t[4]!==t[6]?null:a({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},\"rgb\"],[function(t){var n=l.exec(t)||p.exec(t);if(!n)return null;var e,u,a=g({h:(e=n[1],u=n[2],void 0===u&&(u=\"deg\"),Number(e)*(r[u]||1)),s:Number(n[3]),l:Number(n[4]),a:void 0===n[5]?1:Number(n[5])/(n[6]?100:1)});return f(a)},\"hsl\"]],object:[[function(r){var n=r.r,e=r.g,u=r.b,o=r.a,i=void 0===o?1:o;return t(n)&&t(e)&&t(u)?a({r:Number(n),g:Number(e),b:Number(u),a:Number(i)}):null},\"rgb\"],[function(r){var n=r.h,e=r.s,u=r.l,a=r.a,o=void 0===a?1:a;if(!t(n)||!t(e)||!t(u))return null;var i=g({h:Number(n),s:Number(e),l:Number(u),a:Number(o)});return f(i)},\"hsl\"],[function(r){var n=r.h,a=r.s,o=r.v,i=r.a,s=void 0===i?1:i;if(!t(n)||!t(a)||!t(o))return null;var h=function(r){return{h:u(r.h),s:e(r.s,0,100),v:e(r.v,0,100),a:e(r.a)}}({h:Number(n),s:Number(a),v:Number(o),a:Number(s)});return b(h)},\"hsv\"]]},N=function(r,t){for(var n=0;n<t.length;n++){var e=t[n][0](r);if(e)return[e,t[n][1]]}return[null,void 0]},x=function(r){return\"string\"==typeof r?N(r.trim(),y.string):\"object\"==typeof r&&null!==r?N(r,y.object):[null,void 0]},I=function(r){return x(r)[1]},M=function(r,t){var n=c(r);return{h:n.h,s:e(n.s+100*t,0,100),l:n.l,a:n.a}},H=function(r){return(299*r.r+587*r.g+114*r.b)/1e3/255},$=function(r,t){var n=c(r);return{h:n.h,s:n.s,l:e(n.l+100*t,0,100),a:n.a}},j=function(){function r(r){this.parsed=x(r)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return r.prototype.isValid=function(){return null!==this.parsed},r.prototype.brightness=function(){return n(H(this.rgba),2)},r.prototype.isDark=function(){return H(this.rgba)<.5},r.prototype.isLight=function(){return H(this.rgba)>=.5},r.prototype.toHex=function(){return r=o(this.rgba),t=r.r,e=r.g,u=r.b,i=(a=r.a)<1?s(n(255*a)):\"\",\"#\"+s(t)+s(e)+s(u)+i;var r,t,e,u,a,i},r.prototype.toRgb=function(){return o(this.rgba)},r.prototype.toRgbString=function(){return r=o(this.rgba),t=r.r,n=r.g,e=r.b,(u=r.a)<1?\"rgba(\"+t+\", \"+n+\", \"+e+\", \"+u+\")\":\"rgb(\"+t+\", \"+n+\", \"+e+\")\";var r,t,n,e,u},r.prototype.toHsl=function(){return d(c(this.rgba))},r.prototype.toHslString=function(){return r=d(c(this.rgba)),t=r.h,n=r.s,e=r.l,(u=r.a)<1?\"hsla(\"+t+\", \"+n+\"%, \"+e+\"%, \"+u+\")\":\"hsl(\"+t+\", \"+n+\"%, \"+e+\"%)\";var r,t,n,e,u},r.prototype.toHsv=function(){return r=h(this.rgba),{h:n(r.h),s:n(r.s),v:n(r.v),a:n(r.a,3)};var r},r.prototype.invert=function(){return w({r:255-(r=this.rgba).r,g:255-r.g,b:255-r.b,a:r.a});var r},r.prototype.saturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,r))},r.prototype.desaturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,-r))},r.prototype.grayscale=function(){return w(M(this.rgba,-1))},r.prototype.lighten=function(r){return void 0===r&&(r=.1),w($(this.rgba,r))},r.prototype.darken=function(r){return void 0===r&&(r=.1),w($(this.rgba,-r))},r.prototype.rotate=function(r){return void 0===r&&(r=15),this.hue(this.hue()+r)},r.prototype.alpha=function(r){return\"number\"==typeof r?w({r:(t=this.rgba).r,g:t.g,b:t.b,a:r}):n(this.rgba.a,3);var t},r.prototype.hue=function(r){var t=c(this.rgba);return\"number\"==typeof r?w({h:r,s:t.s,l:t.l,a:t.a}):n(t.h)},r.prototype.isEqual=function(r){return this.toHex()===w(r).toHex()},r}(),w=function(r){return r instanceof j?r:new j(r)},S=[],k=function(r){r.forEach(function(r){S.indexOf(r)<0&&(r(j,y),S.push(r))})},E=function(){return new j({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})};export{j as Colord,w as colord,k as extend,I as getFormat,E as random};\n","export default function(e,f){var a={white:\"#ffffff\",bisque:\"#ffe4c4\",blue:\"#0000ff\",cadetblue:\"#5f9ea0\",chartreuse:\"#7fff00\",chocolate:\"#d2691e\",coral:\"#ff7f50\",antiquewhite:\"#faebd7\",aqua:\"#00ffff\",azure:\"#f0ffff\",whitesmoke:\"#f5f5f5\",papayawhip:\"#ffefd5\",plum:\"#dda0dd\",blanchedalmond:\"#ffebcd\",black:\"#000000\",gold:\"#ffd700\",goldenrod:\"#daa520\",gainsboro:\"#dcdcdc\",cornsilk:\"#fff8dc\",cornflowerblue:\"#6495ed\",burlywood:\"#deb887\",aquamarine:\"#7fffd4\",beige:\"#f5f5dc\",crimson:\"#dc143c\",cyan:\"#00ffff\",darkblue:\"#00008b\",darkcyan:\"#008b8b\",darkgoldenrod:\"#b8860b\",darkkhaki:\"#bdb76b\",darkgray:\"#a9a9a9\",darkgreen:\"#006400\",darkgrey:\"#a9a9a9\",peachpuff:\"#ffdab9\",darkmagenta:\"#8b008b\",darkred:\"#8b0000\",darkorchid:\"#9932cc\",darkorange:\"#ff8c00\",darkslateblue:\"#483d8b\",gray:\"#808080\",darkslategray:\"#2f4f4f\",darkslategrey:\"#2f4f4f\",deeppink:\"#ff1493\",deepskyblue:\"#00bfff\",wheat:\"#f5deb3\",firebrick:\"#b22222\",floralwhite:\"#fffaf0\",ghostwhite:\"#f8f8ff\",darkviolet:\"#9400d3\",magenta:\"#ff00ff\",green:\"#008000\",dodgerblue:\"#1e90ff\",grey:\"#808080\",honeydew:\"#f0fff0\",hotpink:\"#ff69b4\",blueviolet:\"#8a2be2\",forestgreen:\"#228b22\",lawngreen:\"#7cfc00\",indianred:\"#cd5c5c\",indigo:\"#4b0082\",fuchsia:\"#ff00ff\",brown:\"#a52a2a\",maroon:\"#800000\",mediumblue:\"#0000cd\",lightcoral:\"#f08080\",darkturquoise:\"#00ced1\",lightcyan:\"#e0ffff\",ivory:\"#fffff0\",lightyellow:\"#ffffe0\",lightsalmon:\"#ffa07a\",lightseagreen:\"#20b2aa\",linen:\"#faf0e6\",mediumaquamarine:\"#66cdaa\",lemonchiffon:\"#fffacd\",lime:\"#00ff00\",khaki:\"#f0e68c\",mediumseagreen:\"#3cb371\",limegreen:\"#32cd32\",mediumspringgreen:\"#00fa9a\",lightskyblue:\"#87cefa\",lightblue:\"#add8e6\",midnightblue:\"#191970\",lightpink:\"#ffb6c1\",mistyrose:\"#ffe4e1\",moccasin:\"#ffe4b5\",mintcream:\"#f5fffa\",lightslategray:\"#778899\",lightslategrey:\"#778899\",navajowhite:\"#ffdead\",navy:\"#000080\",mediumvioletred:\"#c71585\",powderblue:\"#b0e0e6\",palegoldenrod:\"#eee8aa\",oldlace:\"#fdf5e6\",paleturquoise:\"#afeeee\",mediumturquoise:\"#48d1cc\",mediumorchid:\"#ba55d3\",rebeccapurple:\"#663399\",lightsteelblue:\"#b0c4de\",mediumslateblue:\"#7b68ee\",thistle:\"#d8bfd8\",tan:\"#d2b48c\",orchid:\"#da70d6\",mediumpurple:\"#9370db\",purple:\"#800080\",pink:\"#ffc0cb\",skyblue:\"#87ceeb\",springgreen:\"#00ff7f\",palegreen:\"#98fb98\",red:\"#ff0000\",yellow:\"#ffff00\",slateblue:\"#6a5acd\",lavenderblush:\"#fff0f5\",peru:\"#cd853f\",palevioletred:\"#db7093\",violet:\"#ee82ee\",teal:\"#008080\",slategray:\"#708090\",slategrey:\"#708090\",aliceblue:\"#f0f8ff\",darkseagreen:\"#8fbc8f\",darkolivegreen:\"#556b2f\",greenyellow:\"#adff2f\",seagreen:\"#2e8b57\",seashell:\"#fff5ee\",tomato:\"#ff6347\",silver:\"#c0c0c0\",sienna:\"#a0522d\",lavender:\"#e6e6fa\",lightgreen:\"#90ee90\",orange:\"#ffa500\",orangered:\"#ff4500\",steelblue:\"#4682b4\",royalblue:\"#4169e1\",turquoise:\"#40e0d0\",yellowgreen:\"#9acd32\",salmon:\"#fa8072\",saddlebrown:\"#8b4513\",sandybrown:\"#f4a460\",rosybrown:\"#bc8f8f\",darksalmon:\"#e9967a\",lightgoldenrodyellow:\"#fafad2\",snow:\"#fffafa\",lightgrey:\"#d3d3d3\",lightgray:\"#d3d3d3\",dimgray:\"#696969\",dimgrey:\"#696969\",olivedrab:\"#6b8e23\",olive:\"#808000\"},r={};for(var d in a)r[a[d]]=d;var l={};e.prototype.toName=function(f){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return\"transparent\";var d,i,n=r[this.toHex()];if(n)return n;if(null==f?void 0:f.closest){var o=this.toRgb(),t=1/0,b=\"black\";if(!l.length)for(var c in a)l[c]=new e(a[c]).toRgb();for(var g in a){var u=(d=o,i=l[g],Math.pow(d.r-i.r,2)+Math.pow(d.g-i.g,2)+Math.pow(d.b-i.b,2));u<t&&(t=u,b=g)}return b}};f.string.push([function(f){var r=f.toLowerCase(),d=\"transparent\"===r?\"#0000\":a[r];return d?new e(d).toRgb():null},\"name\"])}\n","/**\n * External dependencies\n */\nimport memoize from 'memize';\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\n\n/** @type {HTMLDivElement} */\nlet colorComputationNode;\n\nextend( [ namesPlugin ] );\n\n/**\n * Generating a CSS compliant rgba() color value.\n *\n * @param {string} hexValue The hex value to convert to rgba().\n * @param {number} alpha The alpha value for opacity.\n * @return {string} The converted rgba() color value.\n *\n * @example\n * rgba( '#000000', 0.5 )\n * // rgba(0, 0, 0, 0.5)\n */\nexport function rgba( hexValue = '', alpha = 1 ) {\n\treturn colord( hexValue ).alpha( alpha ).toRgbString();\n}\n\n/**\n * @return {HTMLDivElement | undefined} The HTML element for color computation.\n */\nfunction getColorComputationNode() {\n\tif ( typeof document === 'undefined' ) {\n\t\treturn;\n\t}\n\n\tif ( ! colorComputationNode ) {\n\t\t// Create a temporary element for style computation.\n\t\tconst el = document.createElement( 'div' );\n\t\tel.setAttribute( 'data-g2-color-computation-node', '' );\n\t\t// Inject for window computed style.\n\t\tdocument.body.appendChild( el );\n\t\tcolorComputationNode = el;\n\t}\n\n\treturn colorComputationNode;\n}\n\n/**\n * @param {string | unknown} value\n *\n * @return {boolean} Whether the value is a valid color.\n */\nfunction isColor( value ) {\n\tif ( typeof value !== 'string' ) {\n\t\treturn false;\n\t}\n\tconst test = colord( value );\n\n\treturn test.isValid();\n}\n\n/**\n * Retrieves the computed background color. This is useful for getting the\n * value of a CSS variable color.\n *\n * @param {string | unknown} backgroundColor The background color to compute.\n *\n * @return {string} The computed background color.\n */\nfunction _getComputedBackgroundColor( backgroundColor ) {\n\tif ( typeof backgroundColor !== 'string' ) {\n\t\treturn '';\n\t}\n\n\tif ( isColor( backgroundColor ) ) {\n\t\treturn backgroundColor;\n\t}\n\n\tif ( ! backgroundColor.includes( 'var(' ) ) {\n\t\treturn '';\n\t}\n\tif ( typeof document === 'undefined' ) {\n\t\treturn '';\n\t}\n\n\t// Attempts to gracefully handle CSS variables color values.\n\tconst el = getColorComputationNode();\n\tif ( ! el ) {\n\t\treturn '';\n\t}\n\n\tel.style.background = backgroundColor;\n\t// Grab the style.\n\tconst computedColor = window?.getComputedStyle( el ).background;\n\t// Reset.\n\tel.style.background = '';\n\n\treturn computedColor || '';\n}\n\nconst getComputedBackgroundColor = memoize( _getComputedBackgroundColor );\n\n/**\n * Get the text shade optimized for readability, based on a background color.\n *\n * @param {string | unknown} backgroundColor The background color.\n *\n * @return {string} The optimized text color (black or white).\n */\nexport function getOptimalTextColor( backgroundColor ) {\n\tconst background = getComputedBackgroundColor( backgroundColor );\n\n\treturn colord( background ).isLight() ? '#000000' : '#ffffff';\n}\n\n/**\n * Get the text shade optimized for readability, based on a background color.\n *\n * @param {string | unknown} backgroundColor The background color.\n *\n * @return {string} The optimized text shade (dark or light).\n */\nexport function getOptimalTextShade( backgroundColor ) {\n\tconst result = getOptimalTextColor( backgroundColor );\n\n\treturn result === '#000000' ? 'dark' : 'light';\n}\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { COLORS, CONFIG } from '../utils';\n\nexport const Text = css`\n\tcolor: ${ COLORS.theme.foreground };\n\tline-height: ${ CONFIG.fontLineHeightBase };\n\tmargin: 0;\n\ttext-wrap: balance; /* Fallback for Safari. */\n\ttext-wrap: pretty;\n`;\n\nexport const block = css`\n\tdisplay: block;\n`;\n\nexport const positive = css`\n\tcolor: ${ COLORS.alert.green };\n`;\n\nexport const destructive = css`\n\tcolor: ${ COLORS.alert.red };\n`;\n\nexport const muted = css`\n\tcolor: ${ COLORS.gray[ 700 ] };\n`;\n\nexport const highlighterText = css`\n\tmark {\n\t\tbackground: ${ COLORS.alert.yellow };\n\t\tborder-radius: ${ CONFIG.radiusSmall };\n\t\tbox-shadow:\n\t\t\t0 0 0 1px rgba( 0, 0, 0, 0.05 ) inset,\n\t\t\t0 -1px 0 rgba( 0, 0, 0, 0.1 ) inset;\n\t}\n`;\n\nexport const upperCase = css`\n\ttext-transform: uppercase;\n`;\n","/**\n * External dependencies\n */\nimport memoize from 'memize';\nimport type { FindAllArgs } from 'highlight-words-core';\nimport { findAll } from 'highlight-words-core';\n\n/**\n * WordPress dependencies\n */\nimport { createElement } from '@wordpress/element';\n\n/**\n * Source:\n * https://github.com/bvaughn/react-highlight-words/blob/HEAD/src/Highlighter.js\n */\n\n/**\n * @typedef Options\n * @property {string} [activeClassName=''] Classname for active highlighted areas.\n * @property {number} [activeIndex=-1] The index of the active highlighted area.\n * @property {import('react').AllHTMLAttributes<HTMLDivElement>['style']} [activeStyle] Styles to apply to the active highlighted area.\n * @property {boolean} [autoEscape] Whether to automatically escape text.\n * @property {boolean} [caseSensitive=false] Whether to highlight in a case-sensitive manner.\n * @property {string} children Children to highlight.\n * @property {import('highlight-words-core').FindAllArgs['findChunks']} [findChunks] Custom `findChunks` function to pass to `highlight-words-core`.\n * @property {string | Record<string, unknown>} [highlightClassName=''] Classname to apply to highlighted text or a Record of classnames to apply to given text (which should be the key).\n * @property {import('react').AllHTMLAttributes<HTMLDivElement>['style']} [highlightStyle={}] Styles to apply to highlighted text.\n * @property {keyof JSX.IntrinsicElements} [highlightTag='mark'] Tag to use for the highlighted text.\n * @property {import('highlight-words-core').FindAllArgs['sanitize']} [sanitize] Custom `sanitize` function to pass to `highlight-words-core`.\n * @property {string[]} [searchWords=[]] Words to search for and highlight.\n * @property {string} [unhighlightClassName=''] Classname to apply to unhighlighted text.\n * @property {import('react').AllHTMLAttributes<HTMLDivElement>['style']} [unhighlightStyle] Style to apply to unhighlighted text.\n */\n\ninterface Options {\n\tactiveClassName?: string;\n\tactiveIndex?: number;\n\tactiveStyle?: React.AllHTMLAttributes< HTMLDivElement >[ 'style' ];\n\tautoEscape?: boolean;\n\tcaseSensitive?: boolean;\n\tchildren: string;\n\tfindChunks?: FindAllArgs[ 'findChunks' ];\n\thighlightClassName?: string | Record< string, unknown >;\n\thighlightStyle?: React.AllHTMLAttributes< HTMLDivElement >[ 'style' ];\n\thighlightTag?: keyof JSX.IntrinsicElements;\n\tsanitize?: FindAllArgs[ 'sanitize' ];\n\tsearchWords?: string[];\n\tunhighlightClassName?: string;\n\tunhighlightStyle?: React.AllHTMLAttributes< HTMLDivElement >[ 'style' ];\n}\n\n/**\n * Maps props to lowercase names.\n *\n * @param object Props to map.\n * @return The mapped props.\n */\nconst lowercaseProps = < T extends Record< string, unknown > >( object: T ) => {\n\tconst mapped: Record< string, unknown > = {};\n\tfor ( const key in object ) {\n\t\tmapped[ key.toLowerCase() ] = object[ key ];\n\t}\n\treturn mapped as { [ K in keyof T as Lowercase< string & K > ]: T[ K ] };\n};\n\nconst memoizedLowercaseProps = memoize( lowercaseProps );\n\n/**\n * @param options\n * @param options.activeClassName\n * @param options.activeIndex\n * @param options.activeStyle\n * @param options.autoEscape\n * @param options.caseSensitive\n * @param options.children\n * @param options.findChunks\n * @param options.highlightClassName\n * @param options.highlightStyle\n * @param options.highlightTag\n * @param options.sanitize\n * @param options.searchWords\n * @param options.unhighlightClassName\n * @param options.unhighlightStyle\n */\nexport function createHighlighterText( {\n\tactiveClassName = '',\n\tactiveIndex = -1,\n\tactiveStyle,\n\tautoEscape,\n\tcaseSensitive = false,\n\tchildren,\n\tfindChunks,\n\thighlightClassName = '',\n\thighlightStyle = {},\n\thighlightTag = 'mark',\n\tsanitize,\n\tsearchWords = [],\n\tunhighlightClassName = '',\n\tunhighlightStyle,\n}: Options ) {\n\tif ( ! children ) {\n\t\treturn null;\n\t}\n\tif ( typeof children !== 'string' ) {\n\t\treturn children;\n\t}\n\n\tconst textToHighlight = children;\n\n\tconst chunks = findAll( {\n\t\tautoEscape,\n\t\tcaseSensitive,\n\t\tfindChunks,\n\t\tsanitize,\n\t\tsearchWords,\n\t\ttextToHighlight,\n\t} );\n\tconst HighlightTag = highlightTag;\n\tlet highlightIndex = -1;\n\tlet highlightClassNames = '';\n\tlet highlightStyles;\n\n\tconst textContent = chunks.map( ( chunk, index ) => {\n\t\tconst text = textToHighlight.substr(\n\t\t\tchunk.start,\n\t\t\tchunk.end - chunk.start\n\t\t);\n\n\t\tif ( chunk.highlight ) {\n\t\t\thighlightIndex++;\n\n\t\t\tlet highlightClass;\n\t\t\tif ( typeof highlightClassName === 'object' ) {\n\t\t\t\tif ( ! caseSensitive ) {\n\t\t\t\t\thighlightClassName =\n\t\t\t\t\t\tmemoizedLowercaseProps( highlightClassName );\n\t\t\t\t\thighlightClass = highlightClassName[ text.toLowerCase() ];\n\t\t\t\t} else {\n\t\t\t\t\thighlightClass = highlightClassName[ text ];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thighlightClass = highlightClassName;\n\t\t\t}\n\n\t\t\tconst isActive = highlightIndex === +activeIndex;\n\n\t\t\thighlightClassNames = `${ highlightClass } ${\n\t\t\t\tisActive ? activeClassName : ''\n\t\t\t}`;\n\t\t\thighlightStyles =\n\t\t\t\tisActive === true && activeStyle !== null\n\t\t\t\t\t? Object.assign( {}, highlightStyle, activeStyle )\n\t\t\t\t\t: highlightStyle;\n\n\t\t\tconst props: Record< string, unknown > = {\n\t\t\t\tchildren: text,\n\t\t\t\tclassName: highlightClassNames,\n\t\t\t\tkey: index,\n\t\t\t\tstyle: highlightStyles,\n\t\t\t};\n\n\t\t\t// Don't attach arbitrary props to DOM elements; this triggers React DEV warnings (https://fb.me/react-unknown-prop)\n\t\t\t// Only pass through the highlightIndex attribute for custom components.\n\t\t\tif ( typeof HighlightTag !== 'string' ) {\n\t\t\t\tprops.highlightIndex = highlightIndex;\n\t\t\t}\n\n\t\t\treturn createElement( HighlightTag, props );\n\t\t}\n\t\treturn createElement( 'span', {\n\t\t\tchildren: text,\n\t\t\tclassName: unhighlightClassName,\n\t\t\tkey: index,\n\t\t\tstyle: unhighlightStyle,\n\t\t} );\n\t} );\n\n\treturn textContent;\n}\n","/**\n * External dependencies\n */\nimport type { CSSProperties, ReactText } from 'react';\n\n/**\n * Internal dependencies\n */\nimport CONFIG from './config-values';\n\nexport type HeadingSize =\n\t| 1\n\t| 2\n\t| 3\n\t| 4\n\t| 5\n\t| 6\n\t| '1'\n\t| '2'\n\t| '3'\n\t| '4'\n\t| '5'\n\t| '6';\n\nexport const BASE_FONT_SIZE = 13;\n\nexport const PRESET_FONT_SIZES = {\n\tbody: BASE_FONT_SIZE,\n\tcaption: 10,\n\tfootnote: 11,\n\tlargeTitle: 28,\n\tsubheadline: 12,\n\ttitle: 20,\n};\n\nexport const HEADING_FONT_SIZES = [ 1, 2, 3, 4, 5, 6 ].flatMap( ( n ) => [\n\tn as HeadingSize,\n\tn.toString() as HeadingSize,\n] );\n\nexport function getFontSize(\n\tsize:\n\t\t| CSSProperties[ 'fontSize' ]\n\t\t| keyof typeof PRESET_FONT_SIZES = BASE_FONT_SIZE\n): string {\n\tif ( size in PRESET_FONT_SIZES ) {\n\t\treturn getFontSize(\n\t\t\tPRESET_FONT_SIZES[ size as keyof typeof PRESET_FONT_SIZES ]\n\t\t);\n\t}\n\n\tif ( typeof size !== 'number' ) {\n\t\tconst parsed = parseFloat( size );\n\t\tif ( Number.isNaN( parsed ) ) {\n\t\t\treturn size;\n\t\t}\n\t\tsize = parsed;\n\t}\n\n\tconst ratio = `(${ size } / ${ BASE_FONT_SIZE })`;\n\treturn `calc(${ ratio } * ${ CONFIG.fontSize })`;\n}\n\nexport function getHeadingFontSize( size: ReactText = 3 ): string {\n\tif ( ! HEADING_FONT_SIZES.includes( size as HeadingSize ) ) {\n\t\treturn getFontSize( size );\n\t}\n\n\tconst headingSize = `fontSizeH${ size }` as `fontSizeH${ HeadingSize }`;\n\treturn CONFIG[ headingSize ];\n}\n","/**\n * External dependencies\n */\nimport type { SerializedStyles } from '@emotion/react';\nimport { css } from '@emotion/react';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo, Children, cloneElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { hasConnectNamespace, useContextSystem } from '../context';\nimport { useTruncate } from '../truncate';\nimport { getOptimalTextShade } from '../utils/colors';\nimport * as styles from './styles';\nimport { createHighlighterText } from './utils';\nimport { getFontSize } from '../utils/font-size';\nimport { CONFIG, COLORS } from '../utils';\nimport { getLineHeight } from './get-line-height';\nimport { useCx } from '../utils/hooks/use-cx';\nimport type { Props } from './types';\nimport type React from 'react';\n\n/**\n * @param {import('../context').WordPressComponentProps<import('./types').Props, 'span'>} props\n */\nexport default function useText(\n\tprops: WordPressComponentProps< Props, 'span' >\n) {\n\tconst {\n\t\tadjustLineHeightForInnerControls,\n\t\talign,\n\t\tchildren,\n\t\tclassName,\n\t\tcolor,\n\t\tellipsizeMode,\n\t\tisDestructive = false,\n\t\tdisplay,\n\t\thighlightEscape = false,\n\t\thighlightCaseSensitive = false,\n\t\thighlightWords,\n\t\thighlightSanitize,\n\t\tisBlock = false,\n\t\tletterSpacing,\n\t\tlineHeight: lineHeightProp,\n\t\toptimizeReadabilityFor,\n\t\tsize,\n\t\ttruncate = false,\n\t\tupperCase = false,\n\t\tvariant,\n\t\tweight = CONFIG.fontWeight,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Text' );\n\n\tlet content: React.ReactNode = children;\n\tconst isHighlighter = Array.isArray( highlightWords );\n\tconst isCaption = size === 'caption';\n\n\tif ( isHighlighter ) {\n\t\tif ( typeof children !== 'string' ) {\n\t\t\tthrow new TypeError(\n\t\t\t\t'`children` of `Text` must only be `string` types when `highlightWords` is defined'\n\t\t\t);\n\t\t}\n\n\t\tcontent = createHighlighterText( {\n\t\t\tautoEscape: highlightEscape,\n\t\t\tchildren,\n\t\t\tcaseSensitive: highlightCaseSensitive,\n\t\t\tsearchWords: highlightWords,\n\t\t\tsanitize: highlightSanitize,\n\t\t} );\n\t}\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo( () => {\n\t\tconst sx: Record< string, SerializedStyles | null > = {};\n\n\t\tconst lineHeight = getLineHeight(\n\t\t\tadjustLineHeightForInnerControls,\n\t\t\tlineHeightProp\n\t\t);\n\n\t\tsx.Base = css( {\n\t\t\tcolor,\n\t\t\tdisplay,\n\t\t\tfontSize: getFontSize( size ),\n\t\t\tfontWeight: weight,\n\t\t\tlineHeight,\n\t\t\tletterSpacing,\n\t\t\ttextAlign: align,\n\t\t} );\n\n\t\tsx.upperCase = css( { textTransform: 'uppercase' } );\n\n\t\tsx.optimalTextColor = null;\n\n\t\tif ( optimizeReadabilityFor ) {\n\t\t\tconst isOptimalTextColorDark =\n\t\t\t\tgetOptimalTextShade( optimizeReadabilityFor ) === 'dark';\n\n\t\t\t// Should not use theme colors\n\t\t\tsx.optimalTextColor = isOptimalTextColorDark\n\t\t\t\t? css( { color: COLORS.gray[ 900 ] } )\n\t\t\t\t: css( { color: COLORS.white } );\n\t\t}\n\n\t\treturn cx(\n\t\t\tstyles.Text,\n\t\t\tsx.Base,\n\t\t\tsx.optimalTextColor,\n\t\t\tisDestructive && styles.destructive,\n\t\t\t!! isHighlighter && styles.highlighterText,\n\t\t\tisBlock && styles.block,\n\t\t\tisCaption && styles.muted,\n\t\t\tvariant && styles[ variant ],\n\t\t\tupperCase && sx.upperCase,\n\t\t\tclassName\n\t\t);\n\t}, [\n\t\tadjustLineHeightForInnerControls,\n\t\talign,\n\t\tclassName,\n\t\tcolor,\n\t\tcx,\n\t\tdisplay,\n\t\tisBlock,\n\t\tisCaption,\n\t\tisDestructive,\n\t\tisHighlighter,\n\t\tletterSpacing,\n\t\tlineHeightProp,\n\t\toptimizeReadabilityFor,\n\t\tsize,\n\t\tupperCase,\n\t\tvariant,\n\t\tweight,\n\t] );\n\n\tlet finalEllipsizeMode: undefined | 'auto' | 'none';\n\tif ( truncate === true ) {\n\t\tfinalEllipsizeMode = 'auto';\n\t}\n\tif ( truncate === false ) {\n\t\tfinalEllipsizeMode = 'none';\n\t}\n\n\tconst finalComponentProps = {\n\t\t...otherProps,\n\t\tclassName: classes,\n\t\tchildren,\n\t\tellipsizeMode: ellipsizeMode || finalEllipsizeMode,\n\t};\n\n\tconst truncateProps = useTruncate( finalComponentProps );\n\n\t/**\n\t * Enhance child `<Link />` components to inherit font size.\n\t */\n\tif ( ! truncate && Array.isArray( children ) ) {\n\t\tcontent = Children.map( children, ( child ) => {\n\t\t\tif (\n\t\t\t\ttypeof child !== 'object' ||\n\t\t\t\tchild === null ||\n\t\t\t\t! ( 'props' in child )\n\t\t\t) {\n\t\t\t\treturn child;\n\t\t\t}\n\n\t\t\tconst isLink = hasConnectNamespace( child, [ 'Link' ] );\n\t\t\tif ( isLink ) {\n\t\t\t\treturn cloneElement( child, {\n\t\t\t\t\tsize: child.props.size || 'inherit',\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn child;\n\t\t} );\n\t}\n\n\treturn {\n\t\t...truncateProps,\n\t\tchildren: truncate ? truncateProps.children : content,\n\t};\n}\n","/**\n * External dependencies\n */\nimport type { CSSProperties } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { Props } from './types';\nimport { space } from '../utils/space';\nimport { CONFIG } from '../utils';\n\nexport function getLineHeight(\n\tadjustLineHeightForInnerControls: Props[ 'adjustLineHeightForInnerControls' ],\n\tlineHeight: CSSProperties[ 'lineHeight' ]\n) {\n\tif ( lineHeight ) {\n\t\treturn lineHeight;\n\t}\n\n\tif ( ! adjustLineHeightForInnerControls ) {\n\t\treturn;\n\t}\n\n\tlet value = `calc(${ CONFIG.controlHeight } + ${ space( 2 ) })`;\n\n\tswitch ( adjustLineHeightForInnerControls ) {\n\t\tcase 'large':\n\t\t\tvalue = `calc(${ CONFIG.controlHeightLarge } + ${ space( 2 ) })`;\n\t\t\tbreak;\n\t\tcase 'small':\n\t\t\tvalue = `calc(${ CONFIG.controlHeightSmall } + ${ space( 2 ) })`;\n\t\t\tbreak;\n\t\tcase 'xSmall':\n\t\t\tvalue = `calc(${ CONFIG.controlHeightXSmall } + ${ space( 2 ) })`;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\n\treturn value;\n}\n","/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { contextConnect } from '../context';\nimport { View } from '../view';\nimport useText from './hook';\nimport type { Props } from './types';\n\n/**\n * @param props\n * @param forwardedRef\n */\nfunction UnconnectedText(\n\tprops: WordPressComponentProps< Props, 'span' >,\n\tforwardedRef: React.ForwardedRef< any >\n) {\n\tconst textProps = useText( props );\n\n\treturn <View as=\"span\" { ...textProps } ref={ forwardedRef } />;\n}\n\n/**\n * `Text` is a core component that renders text in the library, using the\n * library's typography system.\n *\n * `Text` can be used to render any text-content, like an HTML `p` or `span`.\n *\n * @example\n *\n * ```jsx\n * import { __experimentalText as Text } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn <Text>Code is Poetry</Text>;\n * }\n * ```\n */\nexport const Text = contextConnect( UnconnectedText, 'Text' );\nexport default Text;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n// This is a very low-level mixin which you shouldn't have to use directly.\n// Try to use BaseControl's StyledLabel or BaseControl.VisualLabel if you can.\nexport const baseLabelTypography = css`\n\tfont-size: 11px;\n\tfont-weight: 500;\n\tline-height: 1.4;\n\ttext-transform: uppercase;\n`;\n","/**\n * External dependencies\n */\nimport type { SerializedStyles } from '@emotion/react';\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\nimport type { CSSProperties, ReactNode } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { Flex, FlexItem } from '../../flex';\nimport { Text } from '../../text';\nimport { baseLabelTypography, COLORS, CONFIG, rtl } from '../../utils';\nimport type { LabelPosition, Size, PrefixSuffixWrapperProps } from '../types';\n\ntype ContainerProps = {\n\tdisabled?: boolean;\n\thideLabel?: boolean;\n\t__unstableInputWidth?: CSSProperties[ 'width' ];\n\tlabelPosition?: LabelPosition;\n};\n\nexport const Prefix = styled.span`\n\tbox-sizing: border-box;\n\tdisplay: block;\n`;\n\nexport const Suffix = styled.span`\n\talign-items: center;\n\talign-self: stretch;\n\tbox-sizing: border-box;\n\tdisplay: flex;\n`;\n\ntype BackdropProps = {\n\tdisabled?: boolean;\n\tisBorderless?: boolean;\n};\n\nconst backdropBorderColor = ( {\n\tdisabled,\n\tisBorderless,\n}: BackdropProps ): CSSProperties[ 'borderColor' ] => {\n\tif ( isBorderless ) {\n\t\treturn 'transparent';\n\t}\n\n\tif ( disabled ) {\n\t\treturn COLORS.ui.borderDisabled;\n\t}\n\n\treturn COLORS.ui.border;\n};\n\nexport const BackdropUI = styled.div< BackdropProps >`\n\t&&& {\n\t\tbox-sizing: border-box;\n\t\tborder-color: ${ backdropBorderColor };\n\t\tborder-radius: inherit;\n\t\tborder-style: solid;\n\t\tborder-width: 1px;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\tpointer-events: none;\n\t\tposition: absolute;\n\t\tright: 0;\n\t\ttop: 0;\n\n\t\t${ rtl( { paddingLeft: 2 } ) }\n\t}\n`;\n\nexport const Root = styled( Flex )`\n\tbox-sizing: border-box;\n\tposition: relative;\n\tborder-radius: ${ CONFIG.radiusSmall };\n\tpadding-top: 0;\n\n\t// Focus within, excluding cases where auxiliary controls in prefix or suffix have focus.\n\t&:focus-within:not( :has( :is( ${ Prefix }, ${ Suffix } ):focus-within ) ) {\n\t\t${ BackdropUI } {\n\t\t\tborder-color: ${ COLORS.ui.borderFocus };\n\t\t\tbox-shadow: ${ CONFIG.controlBoxShadowFocus };\n\t\t\t// Windows High Contrast mode will show this outline, but not the box-shadow.\n\t\t\toutline: 2px solid transparent;\n\t\t\toutline-offset: -2px;\n\t\t}\n\t}\n`;\n\nconst containerDisabledStyles = ( { disabled }: ContainerProps ) => {\n\tconst backgroundColor = disabled\n\t\t? COLORS.ui.backgroundDisabled\n\t\t: COLORS.ui.background;\n\n\treturn css( { backgroundColor } );\n};\n\nconst containerWidthStyles = ( {\n\t__unstableInputWidth,\n\tlabelPosition,\n}: ContainerProps ) => {\n\tif ( ! __unstableInputWidth ) {\n\t\treturn css( { width: '100%' } );\n\t}\n\n\tif ( labelPosition === 'side' ) {\n\t\treturn '';\n\t}\n\n\tif ( labelPosition === 'edge' ) {\n\t\treturn css( {\n\t\t\tflex: `0 0 ${ __unstableInputWidth }`,\n\t\t} );\n\t}\n\n\treturn css( { width: __unstableInputWidth } );\n};\n\nexport const Container = styled.div< ContainerProps >`\n\talign-items: center;\n\tbox-sizing: border-box;\n\tborder-radius: inherit;\n\tdisplay: flex;\n\tflex: 1;\n\tposition: relative;\n\n\t${ containerDisabledStyles }\n\t${ containerWidthStyles }\n`;\n\ntype InputProps = {\n\t__next40pxDefaultSize?: boolean;\n\tdisabled?: boolean;\n\tinputSize?: Size;\n\tisDragging?: boolean;\n\tdragCursor?: CSSProperties[ 'cursor' ];\n\tpaddingInlineStart?: CSSProperties[ 'paddingInlineStart' ];\n\tpaddingInlineEnd?: CSSProperties[ 'paddingInlineEnd' ];\n};\n\nconst disabledStyles = ( { disabled }: InputProps ) => {\n\tif ( ! disabled ) {\n\t\treturn '';\n\t}\n\n\treturn css( {\n\t\tcolor: COLORS.ui.textDisabled,\n\t} );\n};\n\nexport const fontSizeStyles = ( { inputSize: size }: InputProps ) => {\n\tconst sizes = {\n\t\tdefault: '13px',\n\t\tsmall: '11px',\n\t\tcompact: '13px',\n\t\t'__unstable-large': '13px',\n\t};\n\n\tconst fontSize = sizes[ size as Size ] || sizes.default;\n\tconst fontSizeMobile = '16px';\n\n\tif ( ! fontSize ) {\n\t\treturn '';\n\t}\n\n\treturn css`\n\t\tfont-size: ${ fontSizeMobile };\n\n\t\t@media ( min-width: 600px ) {\n\t\t\tfont-size: ${ fontSize };\n\t\t}\n\t`;\n};\n\nexport const getSizeConfig = ( {\n\tinputSize: size,\n\t__next40pxDefaultSize,\n}: InputProps ) => {\n\t// Paddings may be overridden by the custom paddings props.\n\tconst sizes = {\n\t\tdefault: {\n\t\t\theight: 40,\n\t\t\tlineHeight: 1,\n\t\t\tminHeight: 40,\n\t\t\tpaddingLeft: CONFIG.controlPaddingX,\n\t\t\tpaddingRight: CONFIG.controlPaddingX,\n\t\t},\n\t\tsmall: {\n\t\t\theight: 24,\n\t\t\tlineHeight: 1,\n\t\t\tminHeight: 24,\n\t\t\tpaddingLeft: CONFIG.controlPaddingXSmall,\n\t\t\tpaddingRight: CONFIG.controlPaddingXSmall,\n\t\t},\n\t\tcompact: {\n\t\t\theight: 32,\n\t\t\tlineHeight: 1,\n\t\t\tminHeight: 32,\n\t\t\tpaddingLeft: CONFIG.controlPaddingXSmall,\n\t\t\tpaddingRight: CONFIG.controlPaddingXSmall,\n\t\t},\n\t\t'__unstable-large': {\n\t\t\theight: 40,\n\t\t\tlineHeight: 1,\n\t\t\tminHeight: 40,\n\t\t\tpaddingLeft: CONFIG.controlPaddingX,\n\t\t\tpaddingRight: CONFIG.controlPaddingX,\n\t\t},\n\t};\n\n\tif ( ! __next40pxDefaultSize ) {\n\t\tsizes.default = sizes.compact;\n\t}\n\n\treturn sizes[ size as Size ] || sizes.default;\n};\n\nconst sizeStyles = ( props: InputProps ) => {\n\treturn css( getSizeConfig( props ) );\n};\n\nconst customPaddings = ( {\n\tpaddingInlineStart,\n\tpaddingInlineEnd,\n}: InputProps ) => {\n\treturn css( { paddingInlineStart, paddingInlineEnd } );\n};\n\nconst dragStyles = ( { isDragging, dragCursor }: InputProps ) => {\n\tlet defaultArrowStyles: SerializedStyles | undefined;\n\tlet activeDragCursorStyles: SerializedStyles | undefined;\n\n\tif ( isDragging ) {\n\t\tdefaultArrowStyles = css`\n\t\t\tcursor: ${ dragCursor };\n\t\t\tuser-select: none;\n\n\t\t\t&::-webkit-outer-spin-button,\n\t\t\t&::-webkit-inner-spin-button {\n\t\t\t\t-webkit-appearance: none !important;\n\t\t\t\tmargin: 0 !important;\n\t\t\t}\n\t\t`;\n\t}\n\n\tif ( isDragging && dragCursor ) {\n\t\tactiveDragCursorStyles = css`\n\t\t\t&:active {\n\t\t\t\tcursor: ${ dragCursor };\n\t\t\t}\n\t\t`;\n\t}\n\n\treturn css`\n\t\t${ defaultArrowStyles }\n\t\t${ activeDragCursorStyles }\n\t`;\n};\n\n// TODO: Resolve need to use &&& to increase specificity\n// https://github.com/WordPress/gutenberg/issues/18483\n\nexport const Input = styled.input< InputProps >`\n\t&&& {\n\t\tbackground-color: transparent;\n\t\tbox-sizing: border-box;\n\t\tborder: none;\n\t\tbox-shadow: none !important;\n\t\tcolor: ${ COLORS.theme.foreground };\n\t\tdisplay: block;\n\t\tfont-family: inherit;\n\t\tmargin: 0;\n\t\toutline: none;\n\t\twidth: 100%;\n\n\t\t${ dragStyles }\n\t\t${ disabledStyles }\n\t\t${ fontSizeStyles }\n\t\t${ sizeStyles }\n\t\t${ customPaddings }\n\n\t\t&::-webkit-input-placeholder {\n\t\t\tline-height: normal;\n\t\t}\n\n\t\t&[type='email'],\n\t\t&[type='url'] {\n\t\t\t/* rtl:ignore */\n\t\t\tdirection: ltr;\n\t\t}\n\t}\n`;\n\nconst BaseLabel = styled( Text )< { labelPosition?: LabelPosition } >`\n\t&&& {\n\t\t${ baseLabelTypography };\n\n\t\tbox-sizing: border-box;\n\t\tdisplay: block;\n\t\tpadding-top: 0;\n\t\tpadding-bottom: 0;\n\t\tmax-width: 100%;\n\t\tz-index: 1;\n\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\twhite-space: nowrap;\n\t}\n`;\n\nexport const Label = (\n\tprops: WordPressComponentProps<\n\t\t{ labelPosition?: LabelPosition; children: ReactNode },\n\t\t'label',\n\t\tfalse\n\t>\n) => <BaseLabel { ...props } as=\"label\" />;\n\nexport const LabelWrapper = styled( FlexItem )`\n\tmax-width: calc( 100% - 10px );\n`;\n\nconst prefixSuffixWrapperStyles = ( {\n\tvariant = 'default',\n\tsize,\n\t__next40pxDefaultSize,\n\tisPrefix,\n}: PrefixSuffixWrapperProps & { isPrefix?: boolean } ) => {\n\tconst { paddingLeft: padding } = getSizeConfig( {\n\t\tinputSize: size,\n\t\t__next40pxDefaultSize,\n\t} );\n\n\tconst paddingProperty = isPrefix\n\t\t? 'paddingInlineStart'\n\t\t: 'paddingInlineEnd';\n\n\tif ( variant === 'default' ) {\n\t\treturn css( {\n\t\t\t[ paddingProperty ]: padding,\n\t\t} );\n\t}\n\n\t// If variant is 'icon' or 'control'\n\treturn css( {\n\t\tdisplay: 'flex',\n\t\t[ paddingProperty ]: padding - 4,\n\t} );\n};\n\nexport const PrefixSuffixWrapper = styled.div`\n\t${ prefixSuffixWrapperStyles }\n`;\n","/**\n * WordPress dependencies\n */\nimport { memo } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport { BackdropUI } from './styles/input-control-styles';\n\nfunction Backdrop( { disabled = false, isBorderless = false } ) {\n\treturn (\n\t\t<BackdropUI\n\t\t\taria-hidden=\"true\"\n\t\t\tclassName=\"components-input-control__backdrop\"\n\t\t\tdisabled={ disabled }\n\t\t\tisBorderless={ isBorderless }\n\t\t/>\n\t);\n}\n\nconst MemoizedBackdrop = memo( Backdrop );\n\nexport default MemoizedBackdrop;\n","/**\n * Internal dependencies\n */\nimport { VisuallyHidden } from '../visually-hidden';\nimport {\n\tLabel as BaseLabel,\n\tLabelWrapper,\n} from './styles/input-control-styles';\nimport type { WordPressComponentProps } from '../context';\nimport type { InputControlLabelProps } from './types';\n\nexport default function Label( {\n\tchildren,\n\thideLabelFromVision,\n\thtmlFor,\n\t...props\n}: WordPressComponentProps< InputControlLabelProps, 'label', false > ) {\n\tif ( ! children ) {\n\t\treturn null;\n\t}\n\n\tif ( hideLabelFromVision ) {\n\t\treturn (\n\t\t\t<VisuallyHidden as=\"label\" htmlFor={ htmlFor }>\n\t\t\t\t{ children }\n\t\t\t</VisuallyHidden>\n\t\t);\n\t}\n\n\treturn (\n\t\t<LabelWrapper>\n\t\t\t<BaseLabel htmlFor={ htmlFor } { ...props }>\n\t\t\t\t{ children }\n\t\t\t</BaseLabel>\n\t\t</LabelWrapper>\n\t);\n}\n","export function useDeprecated36pxDefaultSizeProp<\n\tP extends Record< string, any > & {\n\t\t__next36pxDefaultSize?: boolean;\n\t\t__next40pxDefaultSize?: boolean;\n\t},\n>( props: P ) {\n\tconst { __next36pxDefaultSize, __next40pxDefaultSize, ...otherProps } =\n\t\tprops;\n\n\treturn {\n\t\t...otherProps,\n\t\t__next40pxDefaultSize: __next40pxDefaultSize ?? __next36pxDefaultSize,\n\t};\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Backdrop from './backdrop';\nimport Label from './label';\nimport { Container, Root, Prefix, Suffix } from './styles/input-control-styles';\nimport type { InputBaseProps, LabelPosition } from './types';\nimport type { WordPressComponentProps } from '../context';\nimport {\n\tContextSystemProvider,\n\tcontextConnect,\n\tuseContextSystem,\n} from '../context';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\n\nfunction useUniqueId( idProp?: string ) {\n\tconst instanceId = useInstanceId( InputBase );\n\tconst id = `input-base-control-${ instanceId }`;\n\n\treturn idProp || id;\n}\n\n// Adapter to map props for the new ui/flex component.\nfunction getUIFlexProps( labelPosition?: LabelPosition ) {\n\tconst props: {\n\t\tdirection?: string;\n\t\tgap?: number;\n\t\tjustify?: string;\n\t\texpanded?: boolean;\n\t} = {};\n\tswitch ( labelPosition ) {\n\t\tcase 'top':\n\t\t\tprops.direction = 'column';\n\t\t\tprops.expanded = false;\n\t\t\tprops.gap = 0;\n\t\t\tbreak;\n\t\tcase 'bottom':\n\t\t\tprops.direction = 'column-reverse';\n\t\t\tprops.expanded = false;\n\t\t\tprops.gap = 0;\n\t\t\tbreak;\n\t\tcase 'edge':\n\t\t\tprops.justify = 'space-between';\n\t\t\tbreak;\n\t}\n\n\treturn props;\n}\n\nfunction InputBase(\n\tprops: WordPressComponentProps< InputBaseProps, 'div' >,\n\tref: ForwardedRef< HTMLDivElement >\n) {\n\tconst {\n\t\t__next40pxDefaultSize,\n\t\t__unstableInputWidth,\n\t\tchildren,\n\t\tclassName,\n\t\tdisabled = false,\n\t\thideLabelFromVision = false,\n\t\tlabelPosition,\n\t\tid: idProp,\n\t\tisBorderless = false,\n\t\tlabel,\n\t\tprefix,\n\t\tsize = 'default',\n\t\tsuffix,\n\t\t...restProps\n\t} = useDeprecated36pxDefaultSizeProp(\n\t\tuseContextSystem( props, 'InputBase' )\n\t);\n\n\tconst id = useUniqueId( idProp );\n\tconst hideLabel = hideLabelFromVision || ! label;\n\n\tconst prefixSuffixContextValue = useMemo( () => {\n\t\treturn {\n\t\t\tInputControlPrefixWrapper: { __next40pxDefaultSize, size },\n\t\t\tInputControlSuffixWrapper: { __next40pxDefaultSize, size },\n\t\t};\n\t}, [ __next40pxDefaultSize, size ] );\n\n\treturn (\n\t\t// @ts-expect-error The `direction` prop from Flex (FlexDirection) conflicts with legacy SVGAttributes `direction` (string) that come from React intrinsic prop definitions.\n\t\t<Root\n\t\t\t{ ...restProps }\n\t\t\t{ ...getUIFlexProps( labelPosition ) }\n\t\t\tclassName={ className }\n\t\t\tgap={ 2 }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t<Label\n\t\t\t\tclassName=\"components-input-control__label\"\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\tlabelPosition={ labelPosition }\n\t\t\t\thtmlFor={ id }\n\t\t\t>\n\t\t\t\t{ label }\n\t\t\t</Label>\n\t\t\t<Container\n\t\t\t\t__unstableInputWidth={ __unstableInputWidth }\n\t\t\t\tclassName=\"components-input-control__container\"\n\t\t\t\tdisabled={ disabled }\n\t\t\t\thideLabel={ hideLabel }\n\t\t\t\tlabelPosition={ labelPosition }\n\t\t\t>\n\t\t\t\t<ContextSystemProvider value={ prefixSuffixContextValue }>\n\t\t\t\t\t{ prefix && (\n\t\t\t\t\t\t<Prefix className=\"components-input-control__prefix\">\n\t\t\t\t\t\t\t{ prefix }\n\t\t\t\t\t\t</Prefix>\n\t\t\t\t\t) }\n\t\t\t\t\t{ children }\n\t\t\t\t\t{ suffix && (\n\t\t\t\t\t\t<Suffix className=\"components-input-control__suffix\">\n\t\t\t\t\t\t\t{ suffix }\n\t\t\t\t\t\t</Suffix>\n\t\t\t\t\t) }\n\t\t\t\t</ContextSystemProvider>\n\t\t\t\t<Backdrop disabled={ disabled } isBorderless={ isBorderless } />\n\t\t\t</Container>\n\t\t</Root>\n\t);\n}\n\n/**\n * `InputBase` is an internal component used to style the standard borders for an input,\n * as well as handle the layout for prefix/suffix elements.\n */\nexport default contextConnect( InputBase, 'InputBase' );\n","function clamp(v, min, max) {\n return Math.max(min, Math.min(v, max));\n}\nconst V = {\n toVector(v, fallback) {\n if (v === undefined) v = fallback;\n return Array.isArray(v) ? v : [v, v];\n },\n add(v1, v2) {\n return [v1[0] + v2[0], v1[1] + v2[1]];\n },\n sub(v1, v2) {\n return [v1[0] - v2[0], v1[1] - v2[1]];\n },\n addTo(v1, v2) {\n v1[0] += v2[0];\n v1[1] += v2[1];\n },\n subTo(v1, v2) {\n v1[0] -= v2[0];\n v1[1] -= v2[1];\n }\n};\nfunction rubberband(distance, dimension, constant) {\n if (dimension === 0 || Math.abs(dimension) === Infinity) return Math.pow(distance, constant * 5);\n return distance * dimension * constant / (dimension + constant * distance);\n}\nfunction rubberbandIfOutOfBounds(position, min, max, constant = 0.15) {\n if (constant === 0) return clamp(position, min, max);\n if (position < min) return -rubberband(min - position, max - min, constant) + min;\n if (position > max) return +rubberband(position - max, max - min, constant) + max;\n return position;\n}\nfunction computeRubberband(bounds, [Vx, Vy], [Rx, Ry]) {\n const [[X0, X1], [Y0, Y1]] = bounds;\n return [rubberbandIfOutOfBounds(Vx, X0, X1, Rx), rubberbandIfOutOfBounds(Vy, Y0, Y1, Ry)];\n}\n\nexport { V, computeRubberband as c, rubberbandIfOutOfBounds as r };\n","import { V, c as computeRubberband } from './maths-0ab39ae9.esm.js';\n\nfunction _toPrimitive(input, hint) {\n if (typeof input !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (typeof res !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\n\nfunction _toPropertyKey(arg) {\n var key = _toPrimitive(arg, \"string\");\n return typeof key === \"symbol\" ? key : String(key);\n}\n\nfunction _defineProperty(obj, key, value) {\n key = _toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\n\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nfunction _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n _defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}\n\nconst EVENT_TYPE_MAP = {\n pointer: {\n start: 'down',\n change: 'move',\n end: 'up'\n },\n mouse: {\n start: 'down',\n change: 'move',\n end: 'up'\n },\n touch: {\n start: 'start',\n change: 'move',\n end: 'end'\n },\n gesture: {\n start: 'start',\n change: 'change',\n end: 'end'\n }\n};\nfunction capitalize(string) {\n if (!string) return '';\n return string[0].toUpperCase() + string.slice(1);\n}\nconst actionsWithoutCaptureSupported = ['enter', 'leave'];\nfunction hasCapture(capture = false, actionKey) {\n return capture && !actionsWithoutCaptureSupported.includes(actionKey);\n}\nfunction toHandlerProp(device, action = '', capture = false) {\n const deviceProps = EVENT_TYPE_MAP[device];\n const actionKey = deviceProps ? deviceProps[action] || action : action;\n return 'on' + capitalize(device) + capitalize(actionKey) + (hasCapture(capture, actionKey) ? 'Capture' : '');\n}\nconst pointerCaptureEvents = ['gotpointercapture', 'lostpointercapture'];\nfunction parseProp(prop) {\n let eventKey = prop.substring(2).toLowerCase();\n const passive = !!~eventKey.indexOf('passive');\n if (passive) eventKey = eventKey.replace('passive', '');\n const captureKey = pointerCaptureEvents.includes(eventKey) ? 'capturecapture' : 'capture';\n const capture = !!~eventKey.indexOf(captureKey);\n if (capture) eventKey = eventKey.replace('capture', '');\n return {\n device: eventKey,\n capture,\n passive\n };\n}\nfunction toDomEventType(device, action = '') {\n const deviceProps = EVENT_TYPE_MAP[device];\n const actionKey = deviceProps ? deviceProps[action] || action : action;\n return device + actionKey;\n}\nfunction isTouch(event) {\n return 'touches' in event;\n}\nfunction getPointerType(event) {\n if (isTouch(event)) return 'touch';\n if ('pointerType' in event) return event.pointerType;\n return 'mouse';\n}\nfunction getCurrentTargetTouchList(event) {\n return Array.from(event.touches).filter(e => {\n var _event$currentTarget, _event$currentTarget$;\n return e.target === event.currentTarget || ((_event$currentTarget = event.currentTarget) === null || _event$currentTarget === void 0 || (_event$currentTarget$ = _event$currentTarget.contains) === null || _event$currentTarget$ === void 0 ? void 0 : _event$currentTarget$.call(_event$currentTarget, e.target));\n });\n}\nfunction getTouchList(event) {\n return event.type === 'touchend' || event.type === 'touchcancel' ? event.changedTouches : event.targetTouches;\n}\nfunction getValueEvent(event) {\n return isTouch(event) ? getTouchList(event)[0] : event;\n}\nfunction distanceAngle(P1, P2) {\n try {\n const dx = P2.clientX - P1.clientX;\n const dy = P2.clientY - P1.clientY;\n const cx = (P2.clientX + P1.clientX) / 2;\n const cy = (P2.clientY + P1.clientY) / 2;\n const distance = Math.hypot(dx, dy);\n const angle = -(Math.atan2(dx, dy) * 180) / Math.PI;\n const origin = [cx, cy];\n return {\n angle,\n distance,\n origin\n };\n } catch (_unused) {}\n return null;\n}\nfunction touchIds(event) {\n return getCurrentTargetTouchList(event).map(touch => touch.identifier);\n}\nfunction touchDistanceAngle(event, ids) {\n const [P1, P2] = Array.from(event.touches).filter(touch => ids.includes(touch.identifier));\n return distanceAngle(P1, P2);\n}\nfunction pointerId(event) {\n const valueEvent = getValueEvent(event);\n return isTouch(event) ? valueEvent.identifier : valueEvent.pointerId;\n}\nfunction pointerValues(event) {\n const valueEvent = getValueEvent(event);\n return [valueEvent.clientX, valueEvent.clientY];\n}\nconst LINE_HEIGHT = 40;\nconst PAGE_HEIGHT = 800;\nfunction wheelValues(event) {\n let {\n deltaX,\n deltaY,\n deltaMode\n } = event;\n if (deltaMode === 1) {\n deltaX *= LINE_HEIGHT;\n deltaY *= LINE_HEIGHT;\n } else if (deltaMode === 2) {\n deltaX *= PAGE_HEIGHT;\n deltaY *= PAGE_HEIGHT;\n }\n return [deltaX, deltaY];\n}\nfunction scrollValues(event) {\n var _ref, _ref2;\n const {\n scrollX,\n scrollY,\n scrollLeft,\n scrollTop\n } = event.currentTarget;\n return [(_ref = scrollX !== null && scrollX !== void 0 ? scrollX : scrollLeft) !== null && _ref !== void 0 ? _ref : 0, (_ref2 = scrollY !== null && scrollY !== void 0 ? scrollY : scrollTop) !== null && _ref2 !== void 0 ? _ref2 : 0];\n}\nfunction getEventDetails(event) {\n const payload = {};\n if ('buttons' in event) payload.buttons = event.buttons;\n if ('shiftKey' in event) {\n const {\n shiftKey,\n altKey,\n metaKey,\n ctrlKey\n } = event;\n Object.assign(payload, {\n shiftKey,\n altKey,\n metaKey,\n ctrlKey\n });\n }\n return payload;\n}\n\nfunction call(v, ...args) {\n if (typeof v === 'function') {\n return v(...args);\n } else {\n return v;\n }\n}\nfunction noop() {}\nfunction chain(...fns) {\n if (fns.length === 0) return noop;\n if (fns.length === 1) return fns[0];\n return function () {\n let result;\n for (const fn of fns) {\n result = fn.apply(this, arguments) || result;\n }\n return result;\n };\n}\nfunction assignDefault(value, fallback) {\n return Object.assign({}, fallback, value || {});\n}\n\nconst BEFORE_LAST_KINEMATICS_DELAY = 32;\nclass Engine {\n constructor(ctrl, args, key) {\n this.ctrl = ctrl;\n this.args = args;\n this.key = key;\n if (!this.state) {\n this.state = {};\n this.computeValues([0, 0]);\n this.computeInitial();\n if (this.init) this.init();\n this.reset();\n }\n }\n get state() {\n return this.ctrl.state[this.key];\n }\n set state(state) {\n this.ctrl.state[this.key] = state;\n }\n get shared() {\n return this.ctrl.state.shared;\n }\n get eventStore() {\n return this.ctrl.gestureEventStores[this.key];\n }\n get timeoutStore() {\n return this.ctrl.gestureTimeoutStores[this.key];\n }\n get config() {\n return this.ctrl.config[this.key];\n }\n get sharedConfig() {\n return this.ctrl.config.shared;\n }\n get handler() {\n return this.ctrl.handlers[this.key];\n }\n reset() {\n const {\n state,\n shared,\n ingKey,\n args\n } = this;\n shared[ingKey] = state._active = state.active = state._blocked = state._force = false;\n state._step = [false, false];\n state.intentional = false;\n state._movement = [0, 0];\n state._distance = [0, 0];\n state._direction = [0, 0];\n state._delta = [0, 0];\n state._bounds = [[-Infinity, Infinity], [-Infinity, Infinity]];\n state.args = args;\n state.axis = undefined;\n state.memo = undefined;\n state.elapsedTime = state.timeDelta = 0;\n state.direction = [0, 0];\n state.distance = [0, 0];\n state.overflow = [0, 0];\n state._movementBound = [false, false];\n state.velocity = [0, 0];\n state.movement = [0, 0];\n state.delta = [0, 0];\n state.timeStamp = 0;\n }\n start(event) {\n const state = this.state;\n const config = this.config;\n if (!state._active) {\n this.reset();\n this.computeInitial();\n state._active = true;\n state.target = event.target;\n state.currentTarget = event.currentTarget;\n state.lastOffset = config.from ? call(config.from, state) : state.offset;\n state.offset = state.lastOffset;\n state.startTime = state.timeStamp = event.timeStamp;\n }\n }\n computeValues(values) {\n const state = this.state;\n state._values = values;\n state.values = this.config.transform(values);\n }\n computeInitial() {\n const state = this.state;\n state._initial = state._values;\n state.initial = state.values;\n }\n compute(event) {\n const {\n state,\n config,\n shared\n } = this;\n state.args = this.args;\n let dt = 0;\n if (event) {\n state.event = event;\n if (config.preventDefault && event.cancelable) state.event.preventDefault();\n state.type = event.type;\n shared.touches = this.ctrl.pointerIds.size || this.ctrl.touchIds.size;\n shared.locked = !!document.pointerLockElement;\n Object.assign(shared, getEventDetails(event));\n shared.down = shared.pressed = shared.buttons % 2 === 1 || shared.touches > 0;\n dt = event.timeStamp - state.timeStamp;\n state.timeStamp = event.timeStamp;\n state.elapsedTime = state.timeStamp - state.startTime;\n }\n if (state._active) {\n const _absoluteDelta = state._delta.map(Math.abs);\n V.addTo(state._distance, _absoluteDelta);\n }\n if (this.axisIntent) this.axisIntent(event);\n const [_m0, _m1] = state._movement;\n const [t0, t1] = config.threshold;\n const {\n _step,\n values\n } = state;\n if (config.hasCustomTransform) {\n if (_step[0] === false) _step[0] = Math.abs(_m0) >= t0 && values[0];\n if (_step[1] === false) _step[1] = Math.abs(_m1) >= t1 && values[1];\n } else {\n if (_step[0] === false) _step[0] = Math.abs(_m0) >= t0 && Math.sign(_m0) * t0;\n if (_step[1] === false) _step[1] = Math.abs(_m1) >= t1 && Math.sign(_m1) * t1;\n }\n state.intentional = _step[0] !== false || _step[1] !== false;\n if (!state.intentional) return;\n const movement = [0, 0];\n if (config.hasCustomTransform) {\n const [v0, v1] = values;\n movement[0] = _step[0] !== false ? v0 - _step[0] : 0;\n movement[1] = _step[1] !== false ? v1 - _step[1] : 0;\n } else {\n movement[0] = _step[0] !== false ? _m0 - _step[0] : 0;\n movement[1] = _step[1] !== false ? _m1 - _step[1] : 0;\n }\n if (this.restrictToAxis && !state._blocked) this.restrictToAxis(movement);\n const previousOffset = state.offset;\n const gestureIsActive = state._active && !state._blocked || state.active;\n if (gestureIsActive) {\n state.first = state._active && !state.active;\n state.last = !state._active && state.active;\n state.active = shared[this.ingKey] = state._active;\n if (event) {\n if (state.first) {\n if ('bounds' in config) state._bounds = call(config.bounds, state);\n if (this.setup) this.setup();\n }\n state.movement = movement;\n this.computeOffset();\n }\n }\n const [ox, oy] = state.offset;\n const [[x0, x1], [y0, y1]] = state._bounds;\n state.overflow = [ox < x0 ? -1 : ox > x1 ? 1 : 0, oy < y0 ? -1 : oy > y1 ? 1 : 0];\n state._movementBound[0] = state.overflow[0] ? state._movementBound[0] === false ? state._movement[0] : state._movementBound[0] : false;\n state._movementBound[1] = state.overflow[1] ? state._movementBound[1] === false ? state._movement[1] : state._movementBound[1] : false;\n const rubberband = state._active ? config.rubberband || [0, 0] : [0, 0];\n state.offset = computeRubberband(state._bounds, state.offset, rubberband);\n state.delta = V.sub(state.offset, previousOffset);\n this.computeMovement();\n if (gestureIsActive && (!state.last || dt > BEFORE_LAST_KINEMATICS_DELAY)) {\n state.delta = V.sub(state.offset, previousOffset);\n const absoluteDelta = state.delta.map(Math.abs);\n V.addTo(state.distance, absoluteDelta);\n state.direction = state.delta.map(Math.sign);\n state._direction = state._delta.map(Math.sign);\n if (!state.first && dt > 0) {\n state.velocity = [absoluteDelta[0] / dt, absoluteDelta[1] / dt];\n state.timeDelta = dt;\n }\n }\n }\n emit() {\n const state = this.state;\n const shared = this.shared;\n const config = this.config;\n if (!state._active) this.clean();\n if ((state._blocked || !state.intentional) && !state._force && !config.triggerAllEvents) return;\n const memo = this.handler(_objectSpread2(_objectSpread2(_objectSpread2({}, shared), state), {}, {\n [this.aliasKey]: state.values\n }));\n if (memo !== undefined) state.memo = memo;\n }\n clean() {\n this.eventStore.clean();\n this.timeoutStore.clean();\n }\n}\n\nfunction selectAxis([dx, dy], threshold) {\n const absDx = Math.abs(dx);\n const absDy = Math.abs(dy);\n if (absDx > absDy && absDx > threshold) {\n return 'x';\n }\n if (absDy > absDx && absDy > threshold) {\n return 'y';\n }\n return undefined;\n}\nclass CoordinatesEngine extends Engine {\n constructor(...args) {\n super(...args);\n _defineProperty(this, \"aliasKey\", 'xy');\n }\n reset() {\n super.reset();\n this.state.axis = undefined;\n }\n init() {\n this.state.offset = [0, 0];\n this.state.lastOffset = [0, 0];\n }\n computeOffset() {\n this.state.offset = V.add(this.state.lastOffset, this.state.movement);\n }\n computeMovement() {\n this.state.movement = V.sub(this.state.offset, this.state.lastOffset);\n }\n axisIntent(event) {\n const state = this.state;\n const config = this.config;\n if (!state.axis && event) {\n const threshold = typeof config.axisThreshold === 'object' ? config.axisThreshold[getPointerType(event)] : config.axisThreshold;\n state.axis = selectAxis(state._movement, threshold);\n }\n state._blocked = (config.lockDirection || !!config.axis) && !state.axis || !!config.axis && config.axis !== state.axis;\n }\n restrictToAxis(v) {\n if (this.config.axis || this.config.lockDirection) {\n switch (this.state.axis) {\n case 'x':\n v[1] = 0;\n break;\n case 'y':\n v[0] = 0;\n break;\n }\n }\n }\n}\n\nconst identity = v => v;\nconst DEFAULT_RUBBERBAND = 0.15;\nconst commonConfigResolver = {\n enabled(value = true) {\n return value;\n },\n eventOptions(value, _k, config) {\n return _objectSpread2(_objectSpread2({}, config.shared.eventOptions), value);\n },\n preventDefault(value = false) {\n return value;\n },\n triggerAllEvents(value = false) {\n return value;\n },\n rubberband(value = 0) {\n switch (value) {\n case true:\n return [DEFAULT_RUBBERBAND, DEFAULT_RUBBERBAND];\n case false:\n return [0, 0];\n default:\n return V.toVector(value);\n }\n },\n from(value) {\n if (typeof value === 'function') return value;\n if (value != null) return V.toVector(value);\n },\n transform(value, _k, config) {\n const transform = value || config.shared.transform;\n this.hasCustomTransform = !!transform;\n if (process.env.NODE_ENV === 'development') {\n const originalTransform = transform || identity;\n return v => {\n const r = originalTransform(v);\n if (!isFinite(r[0]) || !isFinite(r[1])) {\n console.warn(`[@use-gesture]: config.transform() must produce a valid result, but it was: [${r[0]},${[1]}]`);\n }\n return r;\n };\n }\n return transform || identity;\n },\n threshold(value) {\n return V.toVector(value, 0);\n }\n};\nif (process.env.NODE_ENV === 'development') {\n Object.assign(commonConfigResolver, {\n domTarget(value) {\n if (value !== undefined) {\n throw Error(`[@use-gesture]: \\`domTarget\\` option has been renamed to \\`target\\`.`);\n }\n return NaN;\n },\n lockDirection(value) {\n if (value !== undefined) {\n throw Error(`[@use-gesture]: \\`lockDirection\\` option has been merged with \\`axis\\`. Use it as in \\`{ axis: 'lock' }\\``);\n }\n return NaN;\n },\n initial(value) {\n if (value !== undefined) {\n throw Error(`[@use-gesture]: \\`initial\\` option has been renamed to \\`from\\`.`);\n }\n return NaN;\n }\n });\n}\n\nconst DEFAULT_AXIS_THRESHOLD = 0;\nconst coordinatesConfigResolver = _objectSpread2(_objectSpread2({}, commonConfigResolver), {}, {\n axis(_v, _k, {\n axis\n }) {\n this.lockDirection = axis === 'lock';\n if (!this.lockDirection) return axis;\n },\n axisThreshold(value = DEFAULT_AXIS_THRESHOLD) {\n return value;\n },\n bounds(value = {}) {\n if (typeof value === 'function') {\n return state => coordinatesConfigResolver.bounds(value(state));\n }\n if ('current' in value) {\n return () => value.current;\n }\n if (typeof HTMLElement === 'function' && value instanceof HTMLElement) {\n return value;\n }\n const {\n left = -Infinity,\n right = Infinity,\n top = -Infinity,\n bottom = Infinity\n } = value;\n return [[left, right], [top, bottom]];\n }\n});\n\nconst KEYS_DELTA_MAP = {\n ArrowRight: (displacement, factor = 1) => [displacement * factor, 0],\n ArrowLeft: (displacement, factor = 1) => [-1 * displacement * factor, 0],\n ArrowUp: (displacement, factor = 1) => [0, -1 * displacement * factor],\n ArrowDown: (displacement, factor = 1) => [0, displacement * factor]\n};\nclass DragEngine extends CoordinatesEngine {\n constructor(...args) {\n super(...args);\n _defineProperty(this, \"ingKey\", 'dragging');\n }\n reset() {\n super.reset();\n const state = this.state;\n state._pointerId = undefined;\n state._pointerActive = false;\n state._keyboardActive = false;\n state._preventScroll = false;\n state._delayed = false;\n state.swipe = [0, 0];\n state.tap = false;\n state.canceled = false;\n state.cancel = this.cancel.bind(this);\n }\n setup() {\n const state = this.state;\n if (state._bounds instanceof HTMLElement) {\n const boundRect = state._bounds.getBoundingClientRect();\n const targetRect = state.currentTarget.getBoundingClientRect();\n const _bounds = {\n left: boundRect.left - targetRect.left + state.offset[0],\n right: boundRect.right - targetRect.right + state.offset[0],\n top: boundRect.top - targetRect.top + state.offset[1],\n bottom: boundRect.bottom - targetRect.bottom + state.offset[1]\n };\n state._bounds = coordinatesConfigResolver.bounds(_bounds);\n }\n }\n cancel() {\n const state = this.state;\n if (state.canceled) return;\n state.canceled = true;\n state._active = false;\n setTimeout(() => {\n this.compute();\n this.emit();\n }, 0);\n }\n setActive() {\n this.state._active = this.state._pointerActive || this.state._keyboardActive;\n }\n clean() {\n this.pointerClean();\n this.state._pointerActive = false;\n this.state._keyboardActive = false;\n super.clean();\n }\n pointerDown(event) {\n const config = this.config;\n const state = this.state;\n if (event.buttons != null && (Array.isArray(config.pointerButtons) ? !config.pointerButtons.includes(event.buttons) : config.pointerButtons !== -1 && config.pointerButtons !== event.buttons)) return;\n const ctrlIds = this.ctrl.setEventIds(event);\n if (config.pointerCapture) {\n event.target.setPointerCapture(event.pointerId);\n }\n if (ctrlIds && ctrlIds.size > 1 && state._pointerActive) return;\n this.start(event);\n this.setupPointer(event);\n state._pointerId = pointerId(event);\n state._pointerActive = true;\n this.computeValues(pointerValues(event));\n this.computeInitial();\n if (config.preventScrollAxis && getPointerType(event) !== 'mouse') {\n state._active = false;\n this.setupScrollPrevention(event);\n } else if (config.delay > 0) {\n this.setupDelayTrigger(event);\n if (config.triggerAllEvents) {\n this.compute(event);\n this.emit();\n }\n } else {\n this.startPointerDrag(event);\n }\n }\n startPointerDrag(event) {\n const state = this.state;\n state._active = true;\n state._preventScroll = true;\n state._delayed = false;\n this.compute(event);\n this.emit();\n }\n pointerMove(event) {\n const state = this.state;\n const config = this.config;\n if (!state._pointerActive) return;\n const id = pointerId(event);\n if (state._pointerId !== undefined && id !== state._pointerId) return;\n const _values = pointerValues(event);\n if (document.pointerLockElement === event.target) {\n state._delta = [event.movementX, event.movementY];\n } else {\n state._delta = V.sub(_values, state._values);\n this.computeValues(_values);\n }\n V.addTo(state._movement, state._delta);\n this.compute(event);\n if (state._delayed && state.intentional) {\n this.timeoutStore.remove('dragDelay');\n state.active = false;\n this.startPointerDrag(event);\n return;\n }\n if (config.preventScrollAxis && !state._preventScroll) {\n if (state.axis) {\n if (state.axis === config.preventScrollAxis || config.preventScrollAxis === 'xy') {\n state._active = false;\n this.clean();\n return;\n } else {\n this.timeoutStore.remove('startPointerDrag');\n this.startPointerDrag(event);\n return;\n }\n } else {\n return;\n }\n }\n this.emit();\n }\n pointerUp(event) {\n this.ctrl.setEventIds(event);\n try {\n if (this.config.pointerCapture && event.target.hasPointerCapture(event.pointerId)) {\n ;\n event.target.releasePointerCapture(event.pointerId);\n }\n } catch (_unused) {\n if (process.env.NODE_ENV === 'development') {\n console.warn(`[@use-gesture]: If you see this message, it's likely that you're using an outdated version of \\`@react-three/fiber\\`. \\n\\nPlease upgrade to the latest version.`);\n }\n }\n const state = this.state;\n const config = this.config;\n if (!state._active || !state._pointerActive) return;\n const id = pointerId(event);\n if (state._pointerId !== undefined && id !== state._pointerId) return;\n this.state._pointerActive = false;\n this.setActive();\n this.compute(event);\n const [dx, dy] = state._distance;\n state.tap = dx <= config.tapsThreshold && dy <= config.tapsThreshold;\n if (state.tap && config.filterTaps) {\n state._force = true;\n } else {\n const [_dx, _dy] = state._delta;\n const [_mx, _my] = state._movement;\n const [svx, svy] = config.swipe.velocity;\n const [sx, sy] = config.swipe.distance;\n const sdt = config.swipe.duration;\n if (state.elapsedTime < sdt) {\n const _vx = Math.abs(_dx / state.timeDelta);\n const _vy = Math.abs(_dy / state.timeDelta);\n if (_vx > svx && Math.abs(_mx) > sx) state.swipe[0] = Math.sign(_dx);\n if (_vy > svy && Math.abs(_my) > sy) state.swipe[1] = Math.sign(_dy);\n }\n }\n this.emit();\n }\n pointerClick(event) {\n if (!this.state.tap && event.detail > 0) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n setupPointer(event) {\n const config = this.config;\n const device = config.device;\n if (process.env.NODE_ENV === 'development') {\n try {\n if (device === 'pointer' && config.preventScrollDelay === undefined) {\n const currentTarget = 'uv' in event ? event.sourceEvent.currentTarget : event.currentTarget;\n const style = window.getComputedStyle(currentTarget);\n if (style.touchAction === 'auto') {\n console.warn(`[@use-gesture]: The drag target has its \\`touch-action\\` style property set to \\`auto\\`. It is recommended to add \\`touch-action: 'none'\\` so that the drag gesture behaves correctly on touch-enabled devices. For more information read this: https://use-gesture.netlify.app/docs/extras/#touch-action.\\n\\nThis message will only show in development mode. It won't appear in production. If this is intended, you can ignore it.`, currentTarget);\n }\n }\n } catch (_unused2) {}\n }\n if (config.pointerLock) {\n event.currentTarget.requestPointerLock();\n }\n if (!config.pointerCapture) {\n this.eventStore.add(this.sharedConfig.window, device, 'change', this.pointerMove.bind(this));\n this.eventStore.add(this.sharedConfig.window, device, 'end', this.pointerUp.bind(this));\n this.eventStore.add(this.sharedConfig.window, device, 'cancel', this.pointerUp.bind(this));\n }\n }\n pointerClean() {\n if (this.config.pointerLock && document.pointerLockElement === this.state.currentTarget) {\n document.exitPointerLock();\n }\n }\n preventScroll(event) {\n if (this.state._preventScroll && event.cancelable) {\n event.preventDefault();\n }\n }\n setupScrollPrevention(event) {\n this.state._preventScroll = false;\n persistEvent(event);\n const remove = this.eventStore.add(this.sharedConfig.window, 'touch', 'change', this.preventScroll.bind(this), {\n passive: false\n });\n this.eventStore.add(this.sharedConfig.window, 'touch', 'end', remove);\n this.eventStore.add(this.sharedConfig.window, 'touch', 'cancel', remove);\n this.timeoutStore.add('startPointerDrag', this.startPointerDrag.bind(this), this.config.preventScrollDelay, event);\n }\n setupDelayTrigger(event) {\n this.state._delayed = true;\n this.timeoutStore.add('dragDelay', () => {\n this.state._step = [0, 0];\n this.startPointerDrag(event);\n }, this.config.delay);\n }\n keyDown(event) {\n const deltaFn = KEYS_DELTA_MAP[event.key];\n if (deltaFn) {\n const state = this.state;\n const factor = event.shiftKey ? 10 : event.altKey ? 0.1 : 1;\n this.start(event);\n state._delta = deltaFn(this.config.keyboardDisplacement, factor);\n state._keyboardActive = true;\n V.addTo(state._movement, state._delta);\n this.compute(event);\n this.emit();\n }\n }\n keyUp(event) {\n if (!(event.key in KEYS_DELTA_MAP)) return;\n this.state._keyboardActive = false;\n this.setActive();\n this.compute(event);\n this.emit();\n }\n bind(bindFunction) {\n const device = this.config.device;\n bindFunction(device, 'start', this.pointerDown.bind(this));\n if (this.config.pointerCapture) {\n bindFunction(device, 'change', this.pointerMove.bind(this));\n bindFunction(device, 'end', this.pointerUp.bind(this));\n bindFunction(device, 'cancel', this.pointerUp.bind(this));\n bindFunction('lostPointerCapture', '', this.pointerUp.bind(this));\n }\n if (this.config.keys) {\n bindFunction('key', 'down', this.keyDown.bind(this));\n bindFunction('key', 'up', this.keyUp.bind(this));\n }\n if (this.config.filterTaps) {\n bindFunction('click', '', this.pointerClick.bind(this), {\n capture: true,\n passive: false\n });\n }\n }\n}\nfunction persistEvent(event) {\n 'persist' in event && typeof event.persist === 'function' && event.persist();\n}\n\nconst isBrowser = typeof window !== 'undefined' && window.document && window.document.createElement;\nfunction supportsTouchEvents() {\n return isBrowser && 'ontouchstart' in window;\n}\nfunction isTouchScreen() {\n return supportsTouchEvents() || isBrowser && window.navigator.maxTouchPoints > 1;\n}\nfunction supportsPointerEvents() {\n return isBrowser && 'onpointerdown' in window;\n}\nfunction supportsPointerLock() {\n return isBrowser && 'exitPointerLock' in window.document;\n}\nfunction supportsGestureEvents() {\n try {\n return 'constructor' in GestureEvent;\n } catch (e) {\n return false;\n }\n}\nconst SUPPORT = {\n isBrowser,\n gesture: supportsGestureEvents(),\n touch: supportsTouchEvents(),\n touchscreen: isTouchScreen(),\n pointer: supportsPointerEvents(),\n pointerLock: supportsPointerLock()\n};\n\nconst DEFAULT_PREVENT_SCROLL_DELAY = 250;\nconst DEFAULT_DRAG_DELAY = 180;\nconst DEFAULT_SWIPE_VELOCITY = 0.5;\nconst DEFAULT_SWIPE_DISTANCE = 50;\nconst DEFAULT_SWIPE_DURATION = 250;\nconst DEFAULT_KEYBOARD_DISPLACEMENT = 10;\nconst DEFAULT_DRAG_AXIS_THRESHOLD = {\n mouse: 0,\n touch: 0,\n pen: 8\n};\nconst dragConfigResolver = _objectSpread2(_objectSpread2({}, coordinatesConfigResolver), {}, {\n device(_v, _k, {\n pointer: {\n touch = false,\n lock = false,\n mouse = false\n } = {}\n }) {\n this.pointerLock = lock && SUPPORT.pointerLock;\n if (SUPPORT.touch && touch) return 'touch';\n if (this.pointerLock) return 'mouse';\n if (SUPPORT.pointer && !mouse) return 'pointer';\n if (SUPPORT.touch) return 'touch';\n return 'mouse';\n },\n preventScrollAxis(value, _k, {\n preventScroll\n }) {\n this.preventScrollDelay = typeof preventScroll === 'number' ? preventScroll : preventScroll || preventScroll === undefined && value ? DEFAULT_PREVENT_SCROLL_DELAY : undefined;\n if (!SUPPORT.touchscreen || preventScroll === false) return undefined;\n return value ? value : preventScroll !== undefined ? 'y' : undefined;\n },\n pointerCapture(_v, _k, {\n pointer: {\n capture = true,\n buttons = 1,\n keys = true\n } = {}\n }) {\n this.pointerButtons = buttons;\n this.keys = keys;\n return !this.pointerLock && this.device === 'pointer' && capture;\n },\n threshold(value, _k, {\n filterTaps = false,\n tapsThreshold = 3,\n axis = undefined\n }) {\n const threshold = V.toVector(value, filterTaps ? tapsThreshold : axis ? 1 : 0);\n this.filterTaps = filterTaps;\n this.tapsThreshold = tapsThreshold;\n return threshold;\n },\n swipe({\n velocity = DEFAULT_SWIPE_VELOCITY,\n distance = DEFAULT_SWIPE_DISTANCE,\n duration = DEFAULT_SWIPE_DURATION\n } = {}) {\n return {\n velocity: this.transform(V.toVector(velocity)),\n distance: this.transform(V.toVector(distance)),\n duration\n };\n },\n delay(value = 0) {\n switch (value) {\n case true:\n return DEFAULT_DRAG_DELAY;\n case false:\n return 0;\n default:\n return value;\n }\n },\n axisThreshold(value) {\n if (!value) return DEFAULT_DRAG_AXIS_THRESHOLD;\n return _objectSpread2(_objectSpread2({}, DEFAULT_DRAG_AXIS_THRESHOLD), value);\n },\n keyboardDisplacement(value = DEFAULT_KEYBOARD_DISPLACEMENT) {\n return value;\n }\n});\nif (process.env.NODE_ENV === 'development') {\n Object.assign(dragConfigResolver, {\n useTouch(value) {\n if (value !== undefined) {\n throw Error(`[@use-gesture]: \\`useTouch\\` option has been renamed to \\`pointer.touch\\`. Use it as in \\`{ pointer: { touch: true } }\\`.`);\n }\n return NaN;\n },\n experimental_preventWindowScrollY(value) {\n if (value !== undefined) {\n throw Error(`[@use-gesture]: \\`experimental_preventWindowScrollY\\` option has been renamed to \\`preventScroll\\`.`);\n }\n return NaN;\n },\n swipeVelocity(value) {\n if (value !== undefined) {\n throw Error(`[@use-gesture]: \\`swipeVelocity\\` option has been renamed to \\`swipe.velocity\\`. Use it as in \\`{ swipe: { velocity: 0.5 } }\\`.`);\n }\n return NaN;\n },\n swipeDistance(value) {\n if (value !== undefined) {\n throw Error(`[@use-gesture]: \\`swipeDistance\\` option has been renamed to \\`swipe.distance\\`. Use it as in \\`{ swipe: { distance: 50 } }\\`.`);\n }\n return NaN;\n },\n swipeDuration(value) {\n if (value !== undefined) {\n throw Error(`[@use-gesture]: \\`swipeDuration\\` option has been renamed to \\`swipe.duration\\`. Use it as in \\`{ swipe: { duration: 250 } }\\`.`);\n }\n return NaN;\n }\n });\n}\n\nfunction clampStateInternalMovementToBounds(state) {\n const [ox, oy] = state.overflow;\n const [dx, dy] = state._delta;\n const [dirx, diry] = state._direction;\n if (ox < 0 && dx > 0 && dirx < 0 || ox > 0 && dx < 0 && dirx > 0) {\n state._movement[0] = state._movementBound[0];\n }\n if (oy < 0 && dy > 0 && diry < 0 || oy > 0 && dy < 0 && diry > 0) {\n state._movement[1] = state._movementBound[1];\n }\n}\n\nconst SCALE_ANGLE_RATIO_INTENT_DEG = 30;\nconst PINCH_WHEEL_RATIO = 100;\nclass PinchEngine extends Engine {\n constructor(...args) {\n super(...args);\n _defineProperty(this, \"ingKey\", 'pinching');\n _defineProperty(this, \"aliasKey\", 'da');\n }\n init() {\n this.state.offset = [1, 0];\n this.state.lastOffset = [1, 0];\n this.state._pointerEvents = new Map();\n }\n reset() {\n super.reset();\n const state = this.state;\n state._touchIds = [];\n state.canceled = false;\n state.cancel = this.cancel.bind(this);\n state.turns = 0;\n }\n computeOffset() {\n const {\n type,\n movement,\n lastOffset\n } = this.state;\n if (type === 'wheel') {\n this.state.offset = V.add(movement, lastOffset);\n } else {\n this.state.offset = [(1 + movement[0]) * lastOffset[0], movement[1] + lastOffset[1]];\n }\n }\n computeMovement() {\n const {\n offset,\n lastOffset\n } = this.state;\n this.state.movement = [offset[0] / lastOffset[0], offset[1] - lastOffset[1]];\n }\n axisIntent() {\n const state = this.state;\n const [_m0, _m1] = state._movement;\n if (!state.axis) {\n const axisMovementDifference = Math.abs(_m0) * SCALE_ANGLE_RATIO_INTENT_DEG - Math.abs(_m1);\n if (axisMovementDifference < 0) state.axis = 'angle';else if (axisMovementDifference > 0) state.axis = 'scale';\n }\n }\n restrictToAxis(v) {\n if (this.config.lockDirection) {\n if (this.state.axis === 'scale') v[1] = 0;else if (this.state.axis === 'angle') v[0] = 0;\n }\n }\n cancel() {\n const state = this.state;\n if (state.canceled) return;\n setTimeout(() => {\n state.canceled = true;\n state._active = false;\n this.compute();\n this.emit();\n }, 0);\n }\n touchStart(event) {\n this.ctrl.setEventIds(event);\n const state = this.state;\n const ctrlTouchIds = this.ctrl.touchIds;\n if (state._active) {\n if (state._touchIds.every(id => ctrlTouchIds.has(id))) return;\n }\n if (ctrlTouchIds.size < 2) return;\n this.start(event);\n state._touchIds = Array.from(ctrlTouchIds).slice(0, 2);\n const payload = touchDistanceAngle(event, state._touchIds);\n if (!payload) return;\n this.pinchStart(event, payload);\n }\n pointerStart(event) {\n if (event.buttons != null && event.buttons % 2 !== 1) return;\n this.ctrl.setEventIds(event);\n event.target.setPointerCapture(event.pointerId);\n const state = this.state;\n const _pointerEvents = state._pointerEvents;\n const ctrlPointerIds = this.ctrl.pointerIds;\n if (state._active) {\n if (Array.from(_pointerEvents.keys()).every(id => ctrlPointerIds.has(id))) return;\n }\n if (_pointerEvents.size < 2) {\n _pointerEvents.set(event.pointerId, event);\n }\n if (state._pointerEvents.size < 2) return;\n this.start(event);\n const payload = distanceAngle(...Array.from(_pointerEvents.values()));\n if (!payload) return;\n this.pinchStart(event, payload);\n }\n pinchStart(event, payload) {\n const state = this.state;\n state.origin = payload.origin;\n this.computeValues([payload.distance, payload.angle]);\n this.computeInitial();\n this.compute(event);\n this.emit();\n }\n touchMove(event) {\n if (!this.state._active) return;\n const payload = touchDistanceAngle(event, this.state._touchIds);\n if (!payload) return;\n this.pinchMove(event, payload);\n }\n pointerMove(event) {\n const _pointerEvents = this.state._pointerEvents;\n if (_pointerEvents.has(event.pointerId)) {\n _pointerEvents.set(event.pointerId, event);\n }\n if (!this.state._active) return;\n const payload = distanceAngle(...Array.from(_pointerEvents.values()));\n if (!payload) return;\n this.pinchMove(event, payload);\n }\n pinchMove(event, payload) {\n const state = this.state;\n const prev_a = state._values[1];\n const delta_a = payload.angle - prev_a;\n let delta_turns = 0;\n if (Math.abs(delta_a) > 270) delta_turns += Math.sign(delta_a);\n this.computeValues([payload.distance, payload.angle - 360 * delta_turns]);\n state.origin = payload.origin;\n state.turns = delta_turns;\n state._movement = [state._values[0] / state._initial[0] - 1, state._values[1] - state._initial[1]];\n this.compute(event);\n this.emit();\n }\n touchEnd(event) {\n this.ctrl.setEventIds(event);\n if (!this.state._active) return;\n if (this.state._touchIds.some(id => !this.ctrl.touchIds.has(id))) {\n this.state._active = false;\n this.compute(event);\n this.emit();\n }\n }\n pointerEnd(event) {\n const state = this.state;\n this.ctrl.setEventIds(event);\n try {\n event.target.releasePointerCapture(event.pointerId);\n } catch (_unused) {}\n if (state._pointerEvents.has(event.pointerId)) {\n state._pointerEvents.delete(event.pointerId);\n }\n if (!state._active) return;\n if (state._pointerEvents.size < 2) {\n state._active = false;\n this.compute(event);\n this.emit();\n }\n }\n gestureStart(event) {\n if (event.cancelable) event.preventDefault();\n const state = this.state;\n if (state._active) return;\n this.start(event);\n this.computeValues([event.scale, event.rotation]);\n state.origin = [event.clientX, event.clientY];\n this.compute(event);\n this.emit();\n }\n gestureMove(event) {\n if (event.cancelable) event.preventDefault();\n if (!this.state._active) return;\n const state = this.state;\n this.computeValues([event.scale, event.rotation]);\n state.origin = [event.clientX, event.clientY];\n const _previousMovement = state._movement;\n state._movement = [event.scale - 1, event.rotation];\n state._delta = V.sub(state._movement, _previousMovement);\n this.compute(event);\n this.emit();\n }\n gestureEnd(event) {\n if (!this.state._active) return;\n this.state._active = false;\n this.compute(event);\n this.emit();\n }\n wheel(event) {\n const modifierKey = this.config.modifierKey;\n if (modifierKey && (Array.isArray(modifierKey) ? !modifierKey.find(k => event[k]) : !event[modifierKey])) return;\n if (!this.state._active) this.wheelStart(event);else this.wheelChange(event);\n this.timeoutStore.add('wheelEnd', this.wheelEnd.bind(this));\n }\n wheelStart(event) {\n this.start(event);\n this.wheelChange(event);\n }\n wheelChange(event) {\n const isR3f = ('uv' in event);\n if (!isR3f) {\n if (event.cancelable) {\n event.preventDefault();\n }\n if (process.env.NODE_ENV === 'development' && !event.defaultPrevented) {\n console.warn(`[@use-gesture]: To properly support zoom on trackpads, try using the \\`target\\` option.\\n\\nThis message will only appear in development mode.`);\n }\n }\n const state = this.state;\n state._delta = [-wheelValues(event)[1] / PINCH_WHEEL_RATIO * state.offset[0], 0];\n V.addTo(state._movement, state._delta);\n clampStateInternalMovementToBounds(state);\n this.state.origin = [event.clientX, event.clientY];\n this.compute(event);\n this.emit();\n }\n wheelEnd() {\n if (!this.state._active) return;\n this.state._active = false;\n this.compute();\n this.emit();\n }\n bind(bindFunction) {\n const device = this.config.device;\n if (!!device) {\n bindFunction(device, 'start', this[device + 'Start'].bind(this));\n bindFunction(device, 'change', this[device + 'Move'].bind(this));\n bindFunction(device, 'end', this[device + 'End'].bind(this));\n bindFunction(device, 'cancel', this[device + 'End'].bind(this));\n bindFunction('lostPointerCapture', '', this[device + 'End'].bind(this));\n }\n if (this.config.pinchOnWheel) {\n bindFunction('wheel', '', this.wheel.bind(this), {\n passive: false\n });\n }\n }\n}\n\nconst pinchConfigResolver = _objectSpread2(_objectSpread2({}, commonConfigResolver), {}, {\n device(_v, _k, {\n shared,\n pointer: {\n touch = false\n } = {}\n }) {\n const sharedConfig = shared;\n if (sharedConfig.target && !SUPPORT.touch && SUPPORT.gesture) return 'gesture';\n if (SUPPORT.touch && touch) return 'touch';\n if (SUPPORT.touchscreen) {\n if (SUPPORT.pointer) return 'pointer';\n if (SUPPORT.touch) return 'touch';\n }\n },\n bounds(_v, _k, {\n scaleBounds = {},\n angleBounds = {}\n }) {\n const _scaleBounds = state => {\n const D = assignDefault(call(scaleBounds, state), {\n min: -Infinity,\n max: Infinity\n });\n return [D.min, D.max];\n };\n const _angleBounds = state => {\n const A = assignDefault(call(angleBounds, state), {\n min: -Infinity,\n max: Infinity\n });\n return [A.min, A.max];\n };\n if (typeof scaleBounds !== 'function' && typeof angleBounds !== 'function') return [_scaleBounds(), _angleBounds()];\n return state => [_scaleBounds(state), _angleBounds(state)];\n },\n threshold(value, _k, config) {\n this.lockDirection = config.axis === 'lock';\n const threshold = V.toVector(value, this.lockDirection ? [0.1, 3] : 0);\n return threshold;\n },\n modifierKey(value) {\n if (value === undefined) return 'ctrlKey';\n return value;\n },\n pinchOnWheel(value = true) {\n return value;\n }\n});\n\nclass MoveEngine extends CoordinatesEngine {\n constructor(...args) {\n super(...args);\n _defineProperty(this, \"ingKey\", 'moving');\n }\n move(event) {\n if (this.config.mouseOnly && event.pointerType !== 'mouse') return;\n if (!this.state._active) this.moveStart(event);else this.moveChange(event);\n this.timeoutStore.add('moveEnd', this.moveEnd.bind(this));\n }\n moveStart(event) {\n this.start(event);\n this.computeValues(pointerValues(event));\n this.compute(event);\n this.computeInitial();\n this.emit();\n }\n moveChange(event) {\n if (!this.state._active) return;\n const values = pointerValues(event);\n const state = this.state;\n state._delta = V.sub(values, state._values);\n V.addTo(state._movement, state._delta);\n this.computeValues(values);\n this.compute(event);\n this.emit();\n }\n moveEnd(event) {\n if (!this.state._active) return;\n this.state._active = false;\n this.compute(event);\n this.emit();\n }\n bind(bindFunction) {\n bindFunction('pointer', 'change', this.move.bind(this));\n bindFunction('pointer', 'leave', this.moveEnd.bind(this));\n }\n}\n\nconst moveConfigResolver = _objectSpread2(_objectSpread2({}, coordinatesConfigResolver), {}, {\n mouseOnly: (value = true) => value\n});\n\nclass ScrollEngine extends CoordinatesEngine {\n constructor(...args) {\n super(...args);\n _defineProperty(this, \"ingKey\", 'scrolling');\n }\n scroll(event) {\n if (!this.state._active) this.start(event);\n this.scrollChange(event);\n this.timeoutStore.add('scrollEnd', this.scrollEnd.bind(this));\n }\n scrollChange(event) {\n if (event.cancelable) event.preventDefault();\n const state = this.state;\n const values = scrollValues(event);\n state._delta = V.sub(values, state._values);\n V.addTo(state._movement, state._delta);\n this.computeValues(values);\n this.compute(event);\n this.emit();\n }\n scrollEnd() {\n if (!this.state._active) return;\n this.state._active = false;\n this.compute();\n this.emit();\n }\n bind(bindFunction) {\n bindFunction('scroll', '', this.scroll.bind(this));\n }\n}\n\nconst scrollConfigResolver = coordinatesConfigResolver;\n\nclass WheelEngine extends CoordinatesEngine {\n constructor(...args) {\n super(...args);\n _defineProperty(this, \"ingKey\", 'wheeling');\n }\n wheel(event) {\n if (!this.state._active) this.start(event);\n this.wheelChange(event);\n this.timeoutStore.add('wheelEnd', this.wheelEnd.bind(this));\n }\n wheelChange(event) {\n const state = this.state;\n state._delta = wheelValues(event);\n V.addTo(state._movement, state._delta);\n clampStateInternalMovementToBounds(state);\n this.compute(event);\n this.emit();\n }\n wheelEnd() {\n if (!this.state._active) return;\n this.state._active = false;\n this.compute();\n this.emit();\n }\n bind(bindFunction) {\n bindFunction('wheel', '', this.wheel.bind(this));\n }\n}\n\nconst wheelConfigResolver = coordinatesConfigResolver;\n\nclass HoverEngine extends CoordinatesEngine {\n constructor(...args) {\n super(...args);\n _defineProperty(this, \"ingKey\", 'hovering');\n }\n enter(event) {\n if (this.config.mouseOnly && event.pointerType !== 'mouse') return;\n this.start(event);\n this.computeValues(pointerValues(event));\n this.compute(event);\n this.emit();\n }\n leave(event) {\n if (this.config.mouseOnly && event.pointerType !== 'mouse') return;\n const state = this.state;\n if (!state._active) return;\n state._active = false;\n const values = pointerValues(event);\n state._movement = state._delta = V.sub(values, state._values);\n this.computeValues(values);\n this.compute(event);\n state.delta = state.movement;\n this.emit();\n }\n bind(bindFunction) {\n bindFunction('pointer', 'enter', this.enter.bind(this));\n bindFunction('pointer', 'leave', this.leave.bind(this));\n }\n}\n\nconst hoverConfigResolver = _objectSpread2(_objectSpread2({}, coordinatesConfigResolver), {}, {\n mouseOnly: (value = true) => value\n});\n\nconst EngineMap = new Map();\nconst ConfigResolverMap = new Map();\nfunction registerAction(action) {\n EngineMap.set(action.key, action.engine);\n ConfigResolverMap.set(action.key, action.resolver);\n}\nconst dragAction = {\n key: 'drag',\n engine: DragEngine,\n resolver: dragConfigResolver\n};\nconst hoverAction = {\n key: 'hover',\n engine: HoverEngine,\n resolver: hoverConfigResolver\n};\nconst moveAction = {\n key: 'move',\n engine: MoveEngine,\n resolver: moveConfigResolver\n};\nconst pinchAction = {\n key: 'pinch',\n engine: PinchEngine,\n resolver: pinchConfigResolver\n};\nconst scrollAction = {\n key: 'scroll',\n engine: ScrollEngine,\n resolver: scrollConfigResolver\n};\nconst wheelAction = {\n key: 'wheel',\n engine: WheelEngine,\n resolver: wheelConfigResolver\n};\n\nexport { ConfigResolverMap as C, EngineMap as E, SUPPORT as S, _objectSpread2 as _, _defineProperty as a, touchIds as b, chain as c, toHandlerProp as d, dragAction as e, pinchAction as f, hoverAction as h, isTouch as i, moveAction as m, parseProp as p, registerAction as r, scrollAction as s, toDomEventType as t, wheelAction as w };\n","import { S as SUPPORT, C as ConfigResolverMap, _ as _objectSpread2, a as _defineProperty, t as toDomEventType, i as isTouch, b as touchIds, E as EngineMap, c as chain, p as parseProp, d as toHandlerProp } from './actions-fe213e88.esm.js';\nimport './maths-0ab39ae9.esm.js';\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = _objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}\n\nconst sharedConfigResolver = {\n target(value) {\n if (value) {\n return () => 'current' in value ? value.current : value;\n }\n return undefined;\n },\n enabled(value = true) {\n return value;\n },\n window(value = SUPPORT.isBrowser ? window : undefined) {\n return value;\n },\n eventOptions({\n passive = true,\n capture = false\n } = {}) {\n return {\n passive,\n capture\n };\n },\n transform(value) {\n return value;\n }\n};\n\nconst _excluded = [\"target\", \"eventOptions\", \"window\", \"enabled\", \"transform\"];\nfunction resolveWith(config = {}, resolvers) {\n const result = {};\n for (const [key, resolver] of Object.entries(resolvers)) {\n switch (typeof resolver) {\n case 'function':\n if (process.env.NODE_ENV === 'development') {\n const r = resolver.call(result, config[key], key, config);\n if (!Number.isNaN(r)) result[key] = r;\n } else {\n result[key] = resolver.call(result, config[key], key, config);\n }\n break;\n case 'object':\n result[key] = resolveWith(config[key], resolver);\n break;\n case 'boolean':\n if (resolver) result[key] = config[key];\n break;\n }\n }\n return result;\n}\nfunction parse(newConfig, gestureKey, _config = {}) {\n const _ref = newConfig,\n {\n target,\n eventOptions,\n window,\n enabled,\n transform\n } = _ref,\n rest = _objectWithoutProperties(_ref, _excluded);\n _config.shared = resolveWith({\n target,\n eventOptions,\n window,\n enabled,\n transform\n }, sharedConfigResolver);\n if (gestureKey) {\n const resolver = ConfigResolverMap.get(gestureKey);\n _config[gestureKey] = resolveWith(_objectSpread2({\n shared: _config.shared\n }, rest), resolver);\n } else {\n for (const key in rest) {\n const resolver = ConfigResolverMap.get(key);\n if (resolver) {\n _config[key] = resolveWith(_objectSpread2({\n shared: _config.shared\n }, rest[key]), resolver);\n } else if (process.env.NODE_ENV === 'development') {\n if (!['drag', 'pinch', 'scroll', 'wheel', 'move', 'hover'].includes(key)) {\n if (key === 'domTarget') {\n throw Error(`[@use-gesture]: \\`domTarget\\` option has been renamed to \\`target\\`.`);\n }\n console.warn(`[@use-gesture]: Unknown config key \\`${key}\\` was used. Please read the documentation for further information.`);\n }\n }\n }\n }\n return _config;\n}\n\nclass EventStore {\n constructor(ctrl, gestureKey) {\n _defineProperty(this, \"_listeners\", new Set());\n this._ctrl = ctrl;\n this._gestureKey = gestureKey;\n }\n add(element, device, action, handler, options) {\n const listeners = this._listeners;\n const type = toDomEventType(device, action);\n const _options = this._gestureKey ? this._ctrl.config[this._gestureKey].eventOptions : {};\n const eventOptions = _objectSpread2(_objectSpread2({}, _options), options);\n element.addEventListener(type, handler, eventOptions);\n const remove = () => {\n element.removeEventListener(type, handler, eventOptions);\n listeners.delete(remove);\n };\n listeners.add(remove);\n return remove;\n }\n clean() {\n this._listeners.forEach(remove => remove());\n this._listeners.clear();\n }\n}\n\nclass TimeoutStore {\n constructor() {\n _defineProperty(this, \"_timeouts\", new Map());\n }\n add(key, callback, ms = 140, ...args) {\n this.remove(key);\n this._timeouts.set(key, window.setTimeout(callback, ms, ...args));\n }\n remove(key) {\n const timeout = this._timeouts.get(key);\n if (timeout) window.clearTimeout(timeout);\n }\n clean() {\n this._timeouts.forEach(timeout => void window.clearTimeout(timeout));\n this._timeouts.clear();\n }\n}\n\nclass Controller {\n constructor(handlers) {\n _defineProperty(this, \"gestures\", new Set());\n _defineProperty(this, \"_targetEventStore\", new EventStore(this));\n _defineProperty(this, \"gestureEventStores\", {});\n _defineProperty(this, \"gestureTimeoutStores\", {});\n _defineProperty(this, \"handlers\", {});\n _defineProperty(this, \"config\", {});\n _defineProperty(this, \"pointerIds\", new Set());\n _defineProperty(this, \"touchIds\", new Set());\n _defineProperty(this, \"state\", {\n shared: {\n shiftKey: false,\n metaKey: false,\n ctrlKey: false,\n altKey: false\n }\n });\n resolveGestures(this, handlers);\n }\n setEventIds(event) {\n if (isTouch(event)) {\n this.touchIds = new Set(touchIds(event));\n return this.touchIds;\n } else if ('pointerId' in event) {\n if (event.type === 'pointerup' || event.type === 'pointercancel') this.pointerIds.delete(event.pointerId);else if (event.type === 'pointerdown') this.pointerIds.add(event.pointerId);\n return this.pointerIds;\n }\n }\n applyHandlers(handlers, nativeHandlers) {\n this.handlers = handlers;\n this.nativeHandlers = nativeHandlers;\n }\n applyConfig(config, gestureKey) {\n this.config = parse(config, gestureKey, this.config);\n }\n clean() {\n this._targetEventStore.clean();\n for (const key of this.gestures) {\n this.gestureEventStores[key].clean();\n this.gestureTimeoutStores[key].clean();\n }\n }\n effect() {\n if (this.config.shared.target) this.bind();\n return () => this._targetEventStore.clean();\n }\n bind(...args) {\n const sharedConfig = this.config.shared;\n const props = {};\n let target;\n if (sharedConfig.target) {\n target = sharedConfig.target();\n if (!target) return;\n }\n if (sharedConfig.enabled) {\n for (const gestureKey of this.gestures) {\n const gestureConfig = this.config[gestureKey];\n const bindFunction = bindToProps(props, gestureConfig.eventOptions, !!target);\n if (gestureConfig.enabled) {\n const Engine = EngineMap.get(gestureKey);\n new Engine(this, args, gestureKey).bind(bindFunction);\n }\n }\n const nativeBindFunction = bindToProps(props, sharedConfig.eventOptions, !!target);\n for (const eventKey in this.nativeHandlers) {\n nativeBindFunction(eventKey, '', event => this.nativeHandlers[eventKey](_objectSpread2(_objectSpread2({}, this.state.shared), {}, {\n event,\n args\n })), undefined, true);\n }\n }\n for (const handlerProp in props) {\n props[handlerProp] = chain(...props[handlerProp]);\n }\n if (!target) return props;\n for (const handlerProp in props) {\n const {\n device,\n capture,\n passive\n } = parseProp(handlerProp);\n this._targetEventStore.add(target, device, '', props[handlerProp], {\n capture,\n passive\n });\n }\n }\n}\nfunction setupGesture(ctrl, gestureKey) {\n ctrl.gestures.add(gestureKey);\n ctrl.gestureEventStores[gestureKey] = new EventStore(ctrl, gestureKey);\n ctrl.gestureTimeoutStores[gestureKey] = new TimeoutStore();\n}\nfunction resolveGestures(ctrl, internalHandlers) {\n if (internalHandlers.drag) setupGesture(ctrl, 'drag');\n if (internalHandlers.wheel) setupGesture(ctrl, 'wheel');\n if (internalHandlers.scroll) setupGesture(ctrl, 'scroll');\n if (internalHandlers.move) setupGesture(ctrl, 'move');\n if (internalHandlers.pinch) setupGesture(ctrl, 'pinch');\n if (internalHandlers.hover) setupGesture(ctrl, 'hover');\n}\nconst bindToProps = (props, eventOptions, withPassiveOption) => (device, action, handler, options = {}, isNative = false) => {\n var _options$capture, _options$passive;\n const capture = (_options$capture = options.capture) !== null && _options$capture !== void 0 ? _options$capture : eventOptions.capture;\n const passive = (_options$passive = options.passive) !== null && _options$passive !== void 0 ? _options$passive : eventOptions.passive;\n let handlerProp = isNative ? device : toHandlerProp(device, action, capture);\n if (withPassiveOption && passive) handlerProp += 'Passive';\n props[handlerProp] = props[handlerProp] || [];\n props[handlerProp].push(handler);\n};\n\nconst RE_NOT_NATIVE = /^on(Drag|Wheel|Scroll|Move|Pinch|Hover)/;\nfunction sortHandlers(_handlers) {\n const native = {};\n const handlers = {};\n const actions = new Set();\n for (let key in _handlers) {\n if (RE_NOT_NATIVE.test(key)) {\n actions.add(RegExp.lastMatch);\n handlers[key] = _handlers[key];\n } else {\n native[key] = _handlers[key];\n }\n }\n return [handlers, native, actions];\n}\nfunction registerGesture(actions, handlers, handlerKey, key, internalHandlers, config) {\n if (!actions.has(handlerKey)) return;\n if (!EngineMap.has(key)) {\n if (process.env.NODE_ENV === 'development') {\n console.warn(`[@use-gesture]: You've created a custom handler that that uses the \\`${key}\\` gesture but isn't properly configured.\\n\\nPlease add \\`${key}Action\\` when creating your handler.`);\n }\n return;\n }\n const startKey = handlerKey + 'Start';\n const endKey = handlerKey + 'End';\n const fn = state => {\n let memo = undefined;\n if (state.first && startKey in handlers) handlers[startKey](state);\n if (handlerKey in handlers) memo = handlers[handlerKey](state);\n if (state.last && endKey in handlers) handlers[endKey](state);\n return memo;\n };\n internalHandlers[key] = fn;\n config[key] = config[key] || {};\n}\nfunction parseMergedHandlers(mergedHandlers, mergedConfig) {\n const [handlers, nativeHandlers, actions] = sortHandlers(mergedHandlers);\n const internalHandlers = {};\n registerGesture(actions, handlers, 'onDrag', 'drag', internalHandlers, mergedConfig);\n registerGesture(actions, handlers, 'onWheel', 'wheel', internalHandlers, mergedConfig);\n registerGesture(actions, handlers, 'onScroll', 'scroll', internalHandlers, mergedConfig);\n registerGesture(actions, handlers, 'onPinch', 'pinch', internalHandlers, mergedConfig);\n registerGesture(actions, handlers, 'onMove', 'move', internalHandlers, mergedConfig);\n registerGesture(actions, handlers, 'onHover', 'hover', internalHandlers, mergedConfig);\n return {\n handlers: internalHandlers,\n config: mergedConfig,\n nativeHandlers\n };\n}\n\nexport { Controller, parseMergedHandlers };\n","import { registerAction, dragAction, pinchAction, wheelAction, scrollAction, moveAction, hoverAction } from '@use-gesture/core/actions';\nexport * from '@use-gesture/core/actions';\nimport React from 'react';\nimport { Controller, parseMergedHandlers } from '@use-gesture/core';\nexport * from '@use-gesture/core/utils';\nexport * from '@use-gesture/core/types';\n\nfunction useRecognizers(handlers, config = {}, gestureKey, nativeHandlers) {\n const ctrl = React.useMemo(() => new Controller(handlers), []);\n ctrl.applyHandlers(handlers, nativeHandlers);\n ctrl.applyConfig(config, gestureKey);\n React.useEffect(ctrl.effect.bind(ctrl));\n React.useEffect(() => {\n return ctrl.clean.bind(ctrl);\n }, []);\n if (config.target === undefined) {\n return ctrl.bind.bind(ctrl);\n }\n return undefined;\n}\n\nfunction useDrag(handler, config) {\n registerAction(dragAction);\n return useRecognizers({\n drag: handler\n }, config || {}, 'drag');\n}\n\nfunction usePinch(handler, config) {\n registerAction(pinchAction);\n return useRecognizers({\n pinch: handler\n }, config || {}, 'pinch');\n}\n\nfunction useWheel(handler, config) {\n registerAction(wheelAction);\n return useRecognizers({\n wheel: handler\n }, config || {}, 'wheel');\n}\n\nfunction useScroll(handler, config) {\n registerAction(scrollAction);\n return useRecognizers({\n scroll: handler\n }, config || {}, 'scroll');\n}\n\nfunction useMove(handler, config) {\n registerAction(moveAction);\n return useRecognizers({\n move: handler\n }, config || {}, 'move');\n}\n\nfunction useHover(handler, config) {\n registerAction(hoverAction);\n return useRecognizers({\n hover: handler\n }, config || {}, 'hover');\n}\n\nfunction createUseGesture(actions) {\n actions.forEach(registerAction);\n return function useGesture(_handlers, _config) {\n const {\n handlers,\n nativeHandlers,\n config\n } = parseMergedHandlers(_handlers, _config || {});\n return useRecognizers(handlers, config, undefined, nativeHandlers);\n };\n}\n\nfunction useGesture(handlers, config) {\n const hook = createUseGesture([dragAction, pinchAction, scrollAction, wheelAction, moveAction, hoverAction]);\n return hook(handlers, config || {});\n}\n\nexport { createUseGesture, useDrag, useGesture, useHover, useMove, usePinch, useScroll, useWheel };\n","/**\n * External dependencies\n */\nimport type { Reducer, SyntheticEvent } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { Action, InputAction } from './actions';\n\nexport interface InputState {\n\t_event?: SyntheticEvent;\n\terror: unknown;\n\tinitialValue?: string;\n\tisDirty: boolean;\n\tisDragEnabled: boolean;\n\tisDragging: boolean;\n\tisPressEnterToChange: boolean;\n\tvalue?: string;\n}\n\nexport type StateReducer< SpecializedAction = {} > = Reducer<\n\tInputState,\n\tSpecializedAction extends Action\n\t\t? InputAction | SpecializedAction\n\t\t: InputAction\n>;\n\nexport const initialStateReducer: StateReducer = ( state: InputState ) => state;\n\nexport const initialInputControlState: InputState = {\n\terror: null,\n\tinitialValue: '',\n\tisDirty: false,\n\tisDragEnabled: false,\n\tisDragging: false,\n\tisPressEnterToChange: false,\n\tvalue: '',\n};\n","/**\n * External dependencies\n */\nimport type { SyntheticEvent } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { DragProps } from '../types';\n\nexport const CHANGE = 'CHANGE';\nexport const COMMIT = 'COMMIT';\nexport const CONTROL = 'CONTROL';\nexport const DRAG_END = 'DRAG_END';\nexport const DRAG_START = 'DRAG_START';\nexport const DRAG = 'DRAG';\nexport const INVALIDATE = 'INVALIDATE';\nexport const PRESS_DOWN = 'PRESS_DOWN';\nexport const PRESS_ENTER = 'PRESS_ENTER';\nexport const PRESS_UP = 'PRESS_UP';\nexport const RESET = 'RESET';\n\ninterface EventPayload {\n\tevent?: SyntheticEvent;\n}\n\nexport interface Action< Type = string, ExtraPayload = {} > {\n\ttype: Type;\n\tpayload: EventPayload & ExtraPayload;\n}\n\ninterface ValuePayload {\n\tvalue: string;\n}\n\nexport type ChangeAction = Action< typeof CHANGE, ValuePayload >;\nexport type CommitAction = Action< typeof COMMIT, ValuePayload >;\nexport type ControlAction = Action< typeof CONTROL, ValuePayload >;\nexport type PressUpAction = Action< typeof PRESS_UP >;\nexport type PressDownAction = Action< typeof PRESS_DOWN >;\nexport type PressEnterAction = Action< typeof PRESS_ENTER >;\nexport type DragStartAction = Action< typeof DRAG_START, DragProps >;\nexport type DragEndAction = Action< typeof DRAG_END, DragProps >;\nexport type DragAction = Action< typeof DRAG, DragProps >;\nexport type ResetAction = Action< typeof RESET, Partial< ValuePayload > >;\nexport type InvalidateAction = Action< typeof INVALIDATE, { error: unknown } >;\n\nexport type ChangeEventAction = ChangeAction | ResetAction | CommitAction;\n\nexport type DragEventAction = DragStartAction | DragEndAction | DragAction;\n\nexport type KeyEventAction = PressDownAction | PressUpAction | PressEnterAction;\n\nexport type InputAction =\n\t| ChangeEventAction\n\t| KeyEventAction\n\t| DragEventAction\n\t| InvalidateAction;\n","/**\n * A higher-order function that wraps a keydown event handler to ensure it is not an IME event.\n *\n * In CJK languages, an IME (Input Method Editor) is used to input complex characters.\n * During an IME composition, keydown events (e.g. Enter or Escape) can be fired\n * which are intended to control the IME and not the application.\n * These events should be ignored by any application logic.\n *\n * @param keydownHandler The keydown event handler to execute after ensuring it was not an IME event.\n *\n * @return A wrapped version of the given event handler that ignores IME events.\n */\nexport function withIgnoreIMEEvents<\n\tE extends React.KeyboardEvent | KeyboardEvent,\n>( keydownHandler: ( event: E ) => void ) {\n\treturn ( event: E ) => {\n\t\tconst { isComposing } =\n\t\t\t'nativeEvent' in event ? event.nativeEvent : event;\n\n\t\tif (\n\t\t\tisComposing ||\n\t\t\t// Workaround for Mac Safari where the final Enter/Backspace of an IME composition\n\t\t\t// is `isComposing=false`, even though it's technically still part of the composition.\n\t\t\t// These can only be detected by keyCode.\n\t\t\tevent.keyCode === 229\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tkeydownHandler( event );\n\t};\n}\n","/**\n * External dependencies\n */\nimport { useDrag } from '@use-gesture/react';\nimport type {\n\tSyntheticEvent,\n\tChangeEvent,\n\tKeyboardEvent,\n\tPointerEvent,\n\tFocusEvent,\n\tForwardedRef,\n\tMouseEvent,\n} from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useRef } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { useDragCursor } from './utils';\nimport { Input } from './styles/input-control-styles';\nimport { useInputControlStateReducer } from './reducer/reducer';\nimport type { InputFieldProps } from './types';\nimport { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';\n\nconst noop = () => {};\n\nfunction InputField(\n\t{\n\t\tdisabled = false,\n\t\tdragDirection = 'n',\n\t\tdragThreshold = 10,\n\t\tid,\n\t\tisDragEnabled = false,\n\t\tisPressEnterToChange = false,\n\t\tonBlur = noop,\n\t\tonChange = noop,\n\t\tonDrag = noop,\n\t\tonDragEnd = noop,\n\t\tonDragStart = noop,\n\t\tonKeyDown = noop,\n\t\tonValidate = noop,\n\t\tsize = 'default',\n\t\tstateReducer = ( state: any ) => state,\n\t\tvalue: valueProp,\n\t\ttype,\n\t\t...props\n\t}: WordPressComponentProps< InputFieldProps, 'input', false >,\n\tref: ForwardedRef< HTMLInputElement >\n) {\n\tconst {\n\t\t// State.\n\t\tstate,\n\t\t// Actions.\n\t\tchange,\n\t\tcommit,\n\t\tdrag,\n\t\tdragEnd,\n\t\tdragStart,\n\t\tinvalidate,\n\t\tpressDown,\n\t\tpressEnter,\n\t\tpressUp,\n\t\treset,\n\t} = useInputControlStateReducer(\n\t\tstateReducer,\n\t\t{\n\t\t\tisDragEnabled,\n\t\t\tvalue: valueProp,\n\t\t\tisPressEnterToChange,\n\t\t},\n\t\tonChange\n\t);\n\n\tconst { value, isDragging, isDirty } = state;\n\tconst wasDirtyOnBlur = useRef( false );\n\n\tconst dragCursor = useDragCursor( isDragging, dragDirection );\n\n\tconst handleOnBlur = ( event: FocusEvent< HTMLInputElement > ) => {\n\t\tonBlur( event );\n\n\t\t/**\n\t\t * If isPressEnterToChange is set, this commits the value to\n\t\t * the onChange callback.\n\t\t */\n\t\tif ( isDirty || ! event.target.validity.valid ) {\n\t\t\twasDirtyOnBlur.current = true;\n\t\t\thandleOnCommit( event );\n\t\t}\n\t};\n\n\tconst handleOnChange = ( event: ChangeEvent< HTMLInputElement > ) => {\n\t\tconst nextValue = event.target.value;\n\t\tchange( nextValue, event );\n\t};\n\n\tconst handleOnCommit = ( event: SyntheticEvent< HTMLInputElement > ) => {\n\t\tconst nextValue = event.currentTarget.value;\n\n\t\ttry {\n\t\t\tonValidate( nextValue );\n\t\t\tcommit( nextValue, event );\n\t\t} catch ( err ) {\n\t\t\tinvalidate( err, event );\n\t\t}\n\t};\n\n\tconst handleOnKeyDown = ( event: KeyboardEvent< HTMLInputElement > ) => {\n\t\tconst { key } = event;\n\t\tonKeyDown( event );\n\n\t\tswitch ( key ) {\n\t\t\tcase 'ArrowUp':\n\t\t\t\tpressUp( event );\n\t\t\t\tbreak;\n\n\t\t\tcase 'ArrowDown':\n\t\t\t\tpressDown( event );\n\t\t\t\tbreak;\n\n\t\t\tcase 'Enter':\n\t\t\t\tpressEnter( event );\n\n\t\t\t\tif ( isPressEnterToChange ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\thandleOnCommit( event );\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'Escape':\n\t\t\t\tif ( isPressEnterToChange && isDirty ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treset( valueProp, event );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t};\n\n\tconst dragGestureProps = useDrag< PointerEvent< HTMLInputElement > >(\n\t\t( dragProps ) => {\n\t\t\tconst { distance, dragging, event, target } = dragProps;\n\n\t\t\t// The `target` prop always references the `input` element while, by\n\t\t\t// default, the `dragProps.event.target` property would reference the real\n\t\t\t// event target (i.e. any DOM element that the pointer is hovering while\n\t\t\t// dragging). Ensuring that the `target` is always the `input` element\n\t\t\t// allows consumers of `InputControl` (or any higher-level control) to\n\t\t\t// check the input's validity by accessing `event.target.validity.valid`.\n\t\t\tdragProps.event = {\n\t\t\t\t...dragProps.event,\n\t\t\t\ttarget,\n\t\t\t};\n\n\t\t\tif ( ! distance ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tevent.stopPropagation();\n\n\t\t\t/**\n\t\t\t * Quick return if no longer dragging.\n\t\t\t * This prevents unnecessary value calculations.\n\t\t\t */\n\t\t\tif ( ! dragging ) {\n\t\t\t\tonDragEnd( dragProps );\n\t\t\t\tdragEnd( dragProps );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tonDrag( dragProps );\n\t\t\tdrag( dragProps );\n\n\t\t\tif ( ! isDragging ) {\n\t\t\t\tonDragStart( dragProps );\n\t\t\t\tdragStart( dragProps );\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\taxis: dragDirection === 'e' || dragDirection === 'w' ? 'x' : 'y',\n\t\t\tthreshold: dragThreshold,\n\t\t\tenabled: isDragEnabled,\n\t\t\tpointer: { capture: false },\n\t\t}\n\t);\n\n\tconst dragProps = isDragEnabled ? dragGestureProps() : {};\n\t/*\n\t * Works around the odd UA (e.g. Firefox) that does not focus inputs of\n\t * type=number when their spinner arrows are pressed.\n\t */\n\tlet handleOnMouseDown;\n\tif ( type === 'number' ) {\n\t\thandleOnMouseDown = ( event: MouseEvent< HTMLInputElement > ) => {\n\t\t\tprops.onMouseDown?.( event );\n\t\t\tif (\n\t\t\t\tevent.currentTarget !==\n\t\t\t\tevent.currentTarget.ownerDocument.activeElement\n\t\t\t) {\n\t\t\t\tevent.currentTarget.focus();\n\t\t\t}\n\t\t};\n\t}\n\n\treturn (\n\t\t<Input\n\t\t\t{ ...props }\n\t\t\t{ ...dragProps }\n\t\t\tclassName=\"components-input-control__input\"\n\t\t\tdisabled={ disabled }\n\t\t\tdragCursor={ dragCursor }\n\t\t\tisDragging={ isDragging }\n\t\t\tid={ id }\n\t\t\tonBlur={ handleOnBlur }\n\t\t\tonChange={ handleOnChange }\n\t\t\tonKeyDown={ withIgnoreIMEEvents( handleOnKeyDown ) }\n\t\t\tonMouseDown={ handleOnMouseDown }\n\t\t\tref={ ref }\n\t\t\tinputSize={ size }\n\t\t\t// Fallback to `''` to avoid \"uncontrolled to controlled\" warning.\n\t\t\t// See https://github.com/WordPress/gutenberg/pull/47250 for details.\n\t\t\tvalue={ value ?? '' }\n\t\t\ttype={ type }\n\t\t/>\n\t);\n}\n\nconst ForwardedComponent = forwardRef( InputField );\n\nexport default ForwardedComponent;\n","/**\n * External dependencies\n */\nimport type { SyntheticEvent, ChangeEvent, PointerEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useReducer, useLayoutEffect, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { InputState, StateReducer } from './state';\nimport { initialInputControlState, initialStateReducer } from './state';\nimport * as actions from './actions';\nimport type { InputChangeCallback } from '../types';\n\n/**\n * Prepares initialState for the reducer.\n *\n * @param initialState The initial state.\n * @return Prepared initialState for the reducer\n */\nfunction mergeInitialState(\n\tinitialState: Partial< InputState > = initialInputControlState\n): InputState {\n\tconst { value } = initialState;\n\n\treturn {\n\t\t...initialInputControlState,\n\t\t...initialState,\n\t\tinitialValue: value,\n\t} as InputState;\n}\n\n/**\n * Creates the base reducer which may be coupled to a specializing reducer.\n * As its final step, for all actions other than CONTROL, the base reducer\n * passes the state and action on through the specializing reducer. The\n * exception for CONTROL actions is because they represent controlled updates\n * from props and no case has yet presented for their specialization.\n *\n * @param composedStateReducers A reducer to specialize state changes.\n * @return The reducer.\n */\nfunction inputControlStateReducer(\n\tcomposedStateReducers: StateReducer\n): StateReducer< actions.ControlAction > {\n\treturn ( state, action ) => {\n\t\tconst nextState = { ...state };\n\n\t\tswitch ( action.type ) {\n\t\t\t/*\n\t\t\t * Controlled updates\n\t\t\t */\n\t\t\tcase actions.CONTROL:\n\t\t\t\tnextState.value = action.payload.value;\n\t\t\t\tnextState.isDirty = false;\n\t\t\t\tnextState._event = undefined;\n\t\t\t\t// Returns immediately to avoid invoking additional reducers.\n\t\t\t\treturn nextState;\n\n\t\t\t/**\n\t\t\t * Keyboard events\n\t\t\t */\n\t\t\tcase actions.PRESS_UP:\n\t\t\t\tnextState.isDirty = false;\n\t\t\t\tbreak;\n\n\t\t\tcase actions.PRESS_DOWN:\n\t\t\t\tnextState.isDirty = false;\n\t\t\t\tbreak;\n\n\t\t\t/**\n\t\t\t * Drag events\n\t\t\t */\n\t\t\tcase actions.DRAG_START:\n\t\t\t\tnextState.isDragging = true;\n\t\t\t\tbreak;\n\n\t\t\tcase actions.DRAG_END:\n\t\t\t\tnextState.isDragging = false;\n\t\t\t\tbreak;\n\n\t\t\t/**\n\t\t\t * Input events\n\t\t\t */\n\t\t\tcase actions.CHANGE:\n\t\t\t\tnextState.error = null;\n\t\t\t\tnextState.value = action.payload.value;\n\n\t\t\t\tif ( state.isPressEnterToChange ) {\n\t\t\t\t\tnextState.isDirty = true;\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase actions.COMMIT:\n\t\t\t\tnextState.value = action.payload.value;\n\t\t\t\tnextState.isDirty = false;\n\t\t\t\tbreak;\n\n\t\t\tcase actions.RESET:\n\t\t\t\tnextState.error = null;\n\t\t\t\tnextState.isDirty = false;\n\t\t\t\tnextState.value = action.payload.value || state.initialValue;\n\t\t\t\tbreak;\n\n\t\t\t/**\n\t\t\t * Validation\n\t\t\t */\n\t\t\tcase actions.INVALIDATE:\n\t\t\t\tnextState.error = action.payload.error;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tnextState._event = action.payload.event;\n\n\t\t/**\n\t\t * Send the nextState + action to the composedReducers via\n\t\t * this \"bridge\" mechanism. This allows external stateReducers\n\t\t * to hook into actions, and modify state if needed.\n\t\t */\n\t\treturn composedStateReducers( nextState, action );\n\t};\n}\n\n/**\n * A custom hook that connects and external stateReducer with an internal\n * reducer. This hook manages the internal state of InputControl.\n * However, by connecting an external stateReducer function, other\n * components can react to actions as well as modify state before it is\n * applied.\n *\n * This technique uses the \"stateReducer\" design pattern:\n * https://kentcdodds.com/blog/the-state-reducer-pattern/\n *\n * @param stateReducer An external state reducer.\n * @param initialState The initial state for the reducer.\n * @param onChangeHandler A handler for the onChange event.\n * @return State, dispatch, and a collection of actions.\n */\nexport function useInputControlStateReducer(\n\tstateReducer: StateReducer = initialStateReducer,\n\tinitialState: Partial< InputState > = initialInputControlState,\n\tonChangeHandler: InputChangeCallback\n) {\n\tconst [ state, dispatch ] = useReducer(\n\t\tinputControlStateReducer( stateReducer ),\n\t\tmergeInitialState( initialState )\n\t);\n\n\tconst createChangeEvent =\n\t\t( type: actions.ChangeEventAction[ 'type' ] ) =>\n\t\t(\n\t\t\tnextValue: actions.ChangeEventAction[ 'payload' ][ 'value' ],\n\t\t\tevent: actions.ChangeEventAction[ 'payload' ][ 'event' ]\n\t\t) => {\n\t\t\tdispatch( {\n\t\t\t\ttype,\n\t\t\t\tpayload: { value: nextValue, event },\n\t\t\t} as actions.InputAction );\n\t\t};\n\n\tconst createKeyEvent =\n\t\t( type: actions.KeyEventAction[ 'type' ] ) =>\n\t\t( event: actions.KeyEventAction[ 'payload' ][ 'event' ] ) => {\n\t\t\tdispatch( { type, payload: { event } } );\n\t\t};\n\n\tconst createDragEvent =\n\t\t( type: actions.DragEventAction[ 'type' ] ) =>\n\t\t( payload: actions.DragEventAction[ 'payload' ] ) => {\n\t\t\tdispatch( { type, payload } );\n\t\t};\n\n\t/**\n\t * Actions for the reducer\n\t */\n\tconst change = createChangeEvent( actions.CHANGE );\n\tconst invalidate = ( error: unknown, event: SyntheticEvent ) =>\n\t\tdispatch( { type: actions.INVALIDATE, payload: { error, event } } );\n\tconst reset = createChangeEvent( actions.RESET );\n\tconst commit = createChangeEvent( actions.COMMIT );\n\n\tconst dragStart = createDragEvent( actions.DRAG_START );\n\tconst drag = createDragEvent( actions.DRAG );\n\tconst dragEnd = createDragEvent( actions.DRAG_END );\n\n\tconst pressUp = createKeyEvent( actions.PRESS_UP );\n\tconst pressDown = createKeyEvent( actions.PRESS_DOWN );\n\tconst pressEnter = createKeyEvent( actions.PRESS_ENTER );\n\n\tconst currentStateRef = useRef( state );\n\tconst refPropsRef = useRef( {\n\t\tvalue: initialState.value,\n\t\tonChangeHandler,\n\t} );\n\n\t// Freshens refs to props and state so that subsequent effects have access\n\t// to their latest values without their changes causing effect runs.\n\tuseLayoutEffect( () => {\n\t\tcurrentStateRef.current = state;\n\t\trefPropsRef.current = { value: initialState.value, onChangeHandler };\n\t} );\n\n\t// Propagates the latest state through onChange.\n\tuseLayoutEffect( () => {\n\t\tif (\n\t\t\tcurrentStateRef.current._event !== undefined &&\n\t\t\tstate.value !== refPropsRef.current.value &&\n\t\t\t! state.isDirty\n\t\t) {\n\t\t\trefPropsRef.current.onChangeHandler( state.value ?? '', {\n\t\t\t\tevent: currentStateRef.current._event as\n\t\t\t\t\t| ChangeEvent< HTMLInputElement >\n\t\t\t\t\t| PointerEvent< HTMLInputElement >,\n\t\t\t} );\n\t\t}\n\t}, [ state.value, state.isDirty ] );\n\n\t// Updates the state from props.\n\tuseLayoutEffect( () => {\n\t\tif (\n\t\t\tinitialState.value !== currentStateRef.current.value &&\n\t\t\t! currentStateRef.current.isDirty\n\t\t) {\n\t\t\tdispatch( {\n\t\t\t\ttype: actions.CONTROL,\n\t\t\t\tpayload: { value: initialState.value ?? '' },\n\t\t\t} );\n\t\t}\n\t}, [ initialState.value ] );\n\n\treturn {\n\t\tchange,\n\t\tcommit,\n\t\tdispatch,\n\t\tdrag,\n\t\tdragEnd,\n\t\tdragStart,\n\t\tinvalidate,\n\t\tpressDown,\n\t\tpressEnter,\n\t\tpressUp,\n\t\treset,\n\t\tstate,\n\t} as const;\n}\n","/**\n * External dependencies\n */\nimport type { FocusEventHandler } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseRef,\n\tuseState,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { InputChangeCallback } from './types';\n\n/**\n * Gets a CSS cursor value based on a drag direction.\n *\n * @param dragDirection The drag direction.\n * @return The CSS cursor value.\n */\nexport function getDragCursor( dragDirection: string ): string {\n\tlet dragCursor = 'ns-resize';\n\n\tswitch ( dragDirection ) {\n\t\tcase 'n':\n\t\tcase 's':\n\t\t\tdragCursor = 'ns-resize';\n\t\t\tbreak;\n\n\t\tcase 'e':\n\t\tcase 'w':\n\t\t\tdragCursor = 'ew-resize';\n\t\t\tbreak;\n\t}\n\n\treturn dragCursor;\n}\n\n/**\n * Custom hook that renders a drag cursor when dragging.\n *\n * @param {boolean} isDragging The dragging state.\n * @param {string} dragDirection The drag direction.\n *\n * @return {string} The CSS cursor value.\n */\nexport function useDragCursor(\n\tisDragging: boolean,\n\tdragDirection: string\n): string {\n\tconst dragCursor = getDragCursor( dragDirection );\n\n\tuseEffect( () => {\n\t\tif ( isDragging ) {\n\t\t\tdocument.documentElement.style.cursor = dragCursor;\n\t\t} else {\n\t\t\t// @ts-expect-error\n\t\t\tdocument.documentElement.style.cursor = null;\n\t\t}\n\t}, [ isDragging, dragCursor ] );\n\n\treturn dragCursor;\n}\n\nexport function useDraft( props: {\n\tvalue: string | undefined;\n\tonBlur?: FocusEventHandler;\n\tonChange: InputChangeCallback;\n} ) {\n\tconst previousValueRef = useRef( props.value );\n\tconst [ draft, setDraft ] = useState< {\n\t\tvalue?: string;\n\t\tisStale?: boolean;\n\t} >( {} );\n\tconst value = draft.value !== undefined ? draft.value : props.value;\n\n\t// Determines when to discard the draft value to restore controlled status.\n\t// To do so, it tracks the previous value and marks the draft value as stale\n\t// after each render.\n\tuseLayoutEffect( () => {\n\t\tconst { current: previousValue } = previousValueRef;\n\t\tpreviousValueRef.current = props.value;\n\t\tif ( draft.value !== undefined && ! draft.isStale ) {\n\t\t\tsetDraft( { ...draft, isStale: true } );\n\t\t} else if ( draft.isStale && props.value !== previousValue ) {\n\t\t\tsetDraft( {} );\n\t\t}\n\t}, [ props.value, draft ] );\n\n\tconst onChange: InputChangeCallback = ( nextValue, extra ) => {\n\t\t// Mutates the draft value to avoid an extra effect run.\n\t\tsetDraft( ( current ) =>\n\t\t\tObject.assign( current, { value: nextValue, isStale: false } )\n\t\t);\n\t\tprops.onChange( nextValue, extra );\n\t};\n\tconst onBlur: FocusEventHandler = ( event ) => {\n\t\tsetDraft( {} );\n\t\tprops.onBlur?.( event );\n\t};\n\n\treturn { value, onBlur, onChange };\n}\n","export default {\n\t'default.fontFamily':\n\t\t\"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif\",\n\t'default.fontSize': '13px',\n\n\t'helpText.fontSize': '12px',\n\n\tmobileTextMinFontSize: '16px',\n};\n","/**\n * Internal dependencies\n */\nimport FONT from './font-values';\n\n/**\n *\n * @param {keyof FONT} value Path of value from `FONT`\n * @return {string} Font rule value\n */\nexport function font( value ) {\n\treturn FONT[ value ] ?? '';\n}\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\nexport const boxSizingReset = css`\n\tbox-sizing: border-box;\n\n\t*,\n\t*::before,\n\t*::after {\n\t\tbox-sizing: inherit;\n\t}\n`;\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { baseLabelTypography, boxSizingReset, font, COLORS } from '../../utils';\nimport { space } from '../../utils/space';\n\nexport const Wrapper = styled.div`\n\tfont-family: ${ font( 'default.fontFamily' ) };\n\tfont-size: ${ font( 'default.fontSize' ) };\n\n\t${ boxSizingReset }\n`;\n\nconst deprecatedMarginField = ( { __nextHasNoMarginBottom = false } ) => {\n\treturn (\n\t\t! __nextHasNoMarginBottom &&\n\t\tcss`\n\t\t\tmargin-bottom: ${ space( 2 ) };\n\t\t`\n\t);\n};\n\nexport const StyledField = styled.div`\n\t${ deprecatedMarginField }\n\n\t.components-panel__row & {\n\t\tmargin-bottom: inherit;\n\t}\n`;\n\nconst labelStyles = css`\n\t${ baseLabelTypography };\n\n\tdisplay: block;\n\tmargin-bottom: ${ space( 2 ) };\n\t/**\n\t * Removes Chrome/Safari/Firefox user agent stylesheet padding from\n\t * StyledLabel when it is rendered as a legend.\n\t */\n\tpadding: 0;\n`;\n\nexport const StyledLabel = styled.label`\n\t${ labelStyles }\n`;\n\nconst deprecatedMarginHelp = ( { __nextHasNoMarginBottom = false } ) => {\n\treturn (\n\t\t! __nextHasNoMarginBottom &&\n\t\tcss`\n\t\t\tmargin-bottom: revert;\n\t\t`\n\t);\n};\n\nexport const StyledHelp = styled.p`\n\tmargin-top: ${ space( 2 ) };\n\tmargin-bottom: 0;\n\tfont-size: ${ font( 'helpText.fontSize' ) };\n\tfont-style: normal;\n\tcolor: ${ COLORS.gray[ 700 ] };\n\n\t${ deprecatedMarginHelp }\n`;\n\nexport const StyledVisualLabel = styled.span`\n\t${ labelStyles }\n`;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { VisuallyHidden } from '../visually-hidden';\nimport type { BaseControlProps, BaseControlVisualLabelProps } from './types';\nimport {\n\tWrapper,\n\tStyledField,\n\tStyledLabel,\n\tStyledHelp,\n\tStyledVisualLabel,\n} from './styles/base-control-styles';\nimport type { WordPressComponentProps } from '../context';\nimport { contextConnectWithoutRef, useContextSystem } from '../context';\n\nexport { useBaseControlProps } from './hooks';\n\nconst UnconnectedBaseControl = (\n\tprops: WordPressComponentProps< BaseControlProps, null >\n) => {\n\tconst {\n\t\t__nextHasNoMarginBottom = false,\n\t\t__associatedWPComponentName = 'BaseControl',\n\t\tid,\n\t\tlabel,\n\t\thideLabelFromVision = false,\n\t\thelp,\n\t\tclassName,\n\t\tchildren,\n\t} = useContextSystem( props, 'BaseControl' );\n\n\tif ( ! __nextHasNoMarginBottom ) {\n\t\tdeprecated(\n\t\t\t`Bottom margin styles for wp.components.${ __associatedWPComponentName }`,\n\t\t\t{\n\t\t\t\tsince: '6.7',\n\t\t\t\tversion: '7.0',\n\t\t\t\thint: 'Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version.',\n\t\t\t}\n\t\t);\n\t}\n\n\treturn (\n\t\t<Wrapper className={ className }>\n\t\t\t<StyledField\n\t\t\t\tclassName=\"components-base-control__field\"\n\t\t\t\t// TODO: Official deprecation for this should start after all internal usages have been migrated\n\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t>\n\t\t\t\t{ label &&\n\t\t\t\t\tid &&\n\t\t\t\t\t( hideLabelFromVision ? (\n\t\t\t\t\t\t<VisuallyHidden as=\"label\" htmlFor={ id }>\n\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<StyledLabel\n\t\t\t\t\t\t\tclassName=\"components-base-control__label\"\n\t\t\t\t\t\t\thtmlFor={ id }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t</StyledLabel>\n\t\t\t\t\t) ) }\n\t\t\t\t{ label &&\n\t\t\t\t\t! id &&\n\t\t\t\t\t( hideLabelFromVision ? (\n\t\t\t\t\t\t<VisuallyHidden as=\"label\">{ label }</VisuallyHidden>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<VisualLabel>{ label }</VisualLabel>\n\t\t\t\t\t) ) }\n\t\t\t\t{ children }\n\t\t\t</StyledField>\n\t\t\t{ !! help && (\n\t\t\t\t<StyledHelp\n\t\t\t\t\tid={ id ? id + '__help' : undefined }\n\t\t\t\t\tclassName=\"components-base-control__help\"\n\t\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t\t>\n\t\t\t\t\t{ help }\n\t\t\t\t</StyledHelp>\n\t\t\t) }\n\t\t</Wrapper>\n\t);\n};\n\nconst UnforwardedVisualLabel = (\n\tprops: WordPressComponentProps< BaseControlVisualLabelProps, 'span' >,\n\tref: ForwardedRef< any >\n) => {\n\tconst { className, children, ...restProps } = props;\n\n\treturn (\n\t\t<StyledVisualLabel\n\t\t\tref={ ref }\n\t\t\t{ ...restProps }\n\t\t\tclassName={ clsx( 'components-base-control__label', className ) }\n\t\t>\n\t\t\t{ children }\n\t\t</StyledVisualLabel>\n\t);\n};\n\nexport const VisualLabel = forwardRef( UnforwardedVisualLabel );\n\n/**\n * `BaseControl` is a component used to generate labels and help text for components handling user inputs.\n *\n * ```jsx\n * import { BaseControl, useBaseControlProps } from '@wordpress/components';\n *\n * // Render a `BaseControl` for a textarea input\n * const MyCustomTextareaControl = ({ children, ...baseProps }) => (\n * \t// `useBaseControlProps` is a convenience hook to get the props for the `BaseControl`\n * \t// and the inner control itself. Namely, it takes care of generating a unique `id`,\n * \t// properly associating it with the `label` and `help` elements.\n * \tconst { baseControlProps, controlProps } = useBaseControlProps( baseProps );\n *\n * \treturn (\n * \t\t<BaseControl { ...baseControlProps } __nextHasNoMarginBottom>\n * \t\t\t<textarea { ...controlProps }>\n * \t\t\t { children }\n * \t\t\t</textarea>\n * \t\t</BaseControl>\n * \t);\n * );\n * ```\n */\nexport const BaseControl = Object.assign(\n\tcontextConnectWithoutRef( UnconnectedBaseControl, 'BaseControl' ),\n\n\t{\n\t\t/**\n\t\t * `BaseControl.VisualLabel` is used to render a purely visual label inside a `BaseControl` component.\n\t\t *\n\t\t * It should only be used in cases where the children being rendered inside `BaseControl` are already accessibly labeled,\n\t\t * e.g., a button, but we want an additional visual label for that section equivalent to the labels `BaseControl` would\n\t\t * otherwise use if the `label` prop was passed.\n\t\t *\n\t\t * ```jsx\n\t\t * import { BaseControl } from '@wordpress/components';\n\t\t *\n\t\t * const MyBaseControl = () => (\n\t\t * \t<BaseControl\n\t\t * \t\t__nextHasNoMarginBottom\n\t\t * \t\thelp=\"This button is already accessibly labeled.\"\n\t\t * \t>\n\t\t * \t\t<BaseControl.VisualLabel>Author</BaseControl.VisualLabel>\n\t\t * \t\t<Button>Select an author</Button>\n\t\t * \t</BaseControl>\n\t\t * );\n\t\t * ```\n\t\t */\n\t\tVisualLabel,\n\t}\n);\n\nexport default BaseControl;\n","/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\n\nexport function maybeWarnDeprecated36pxSize( {\n\tcomponentName,\n\t__next40pxDefaultSize,\n\tsize,\n\t__shouldNotWarnDeprecated36pxSize,\n}: {\n\tcomponentName: string;\n\t__next40pxDefaultSize: boolean | undefined;\n\tsize: string | undefined;\n\t__shouldNotWarnDeprecated36pxSize?: boolean;\n} ) {\n\tif (\n\t\t__shouldNotWarnDeprecated36pxSize ||\n\t\t__next40pxDefaultSize ||\n\t\t( size !== undefined && size !== 'default' )\n\t) {\n\t\treturn;\n\t}\n\n\tdeprecated( `36px default size for wp.components.${ componentName }`, {\n\t\tsince: '6.8',\n\t\tversion: '7.1',\n\t\thint: 'Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version.',\n\t} );\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport InputBase from './input-base';\nimport InputField from './input-field';\nimport type { InputControlProps } from './types';\nimport { space } from '../utils/space';\nimport { useDraft } from './utils';\nimport BaseControl from '../base-control';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\n\nconst noop = () => {};\n\nfunction useUniqueId( idProp?: string ) {\n\tconst instanceId = useInstanceId( InputControl );\n\tconst id = `inspector-input-control-${ instanceId }`;\n\n\treturn idProp || id;\n}\n\nexport function UnforwardedInputControl(\n\tprops: InputControlProps,\n\tref: ForwardedRef< HTMLInputElement >\n) {\n\tconst {\n\t\t__next40pxDefaultSize,\n\t\t__shouldNotWarnDeprecated36pxSize,\n\t\t__unstableStateReducer: stateReducer = ( state ) => state,\n\t\t__unstableInputWidth,\n\t\tclassName,\n\t\tdisabled = false,\n\t\thelp,\n\t\thideLabelFromVision = false,\n\t\tid: idProp,\n\t\tisPressEnterToChange = false,\n\t\tlabel,\n\t\tlabelPosition = 'top',\n\t\tonChange = noop,\n\t\tonValidate = noop,\n\t\tonKeyDown = noop,\n\t\tprefix,\n\t\tsize = 'default',\n\t\tstyle,\n\t\tsuffix,\n\t\tvalue,\n\t\t...restProps\n\t} = useDeprecated36pxDefaultSizeProp< InputControlProps >( props );\n\n\tconst id = useUniqueId( idProp );\n\tconst classes = clsx( 'components-input-control', className );\n\n\tconst draftHookProps = useDraft( {\n\t\tvalue,\n\t\tonBlur: restProps.onBlur,\n\t\tonChange,\n\t} );\n\n\tconst helpProp = !! help ? { 'aria-describedby': `${ id }__help` } : {};\n\n\tmaybeWarnDeprecated36pxSize( {\n\t\tcomponentName: 'InputControl',\n\t\t__next40pxDefaultSize,\n\t\tsize,\n\t\t__shouldNotWarnDeprecated36pxSize,\n\t} );\n\n\treturn (\n\t\t<BaseControl\n\t\t\tclassName={ classes }\n\t\t\thelp={ help }\n\t\t\tid={ id }\n\t\t\t__nextHasNoMarginBottom\n\t\t>\n\t\t\t<InputBase\n\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t__unstableInputWidth={ __unstableInputWidth }\n\t\t\t\tdisabled={ disabled }\n\t\t\t\tgap={ 3 }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\tid={ id }\n\t\t\t\tjustify=\"left\"\n\t\t\t\tlabel={ label }\n\t\t\t\tlabelPosition={ labelPosition }\n\t\t\t\tprefix={ prefix }\n\t\t\t\tsize={ size }\n\t\t\t\tstyle={ style }\n\t\t\t\tsuffix={ suffix }\n\t\t\t>\n\t\t\t\t<InputField\n\t\t\t\t\t{ ...restProps }\n\t\t\t\t\t{ ...helpProp }\n\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\tclassName=\"components-input-control__input\"\n\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\tid={ id }\n\t\t\t\t\tisPressEnterToChange={ isPressEnterToChange }\n\t\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\t\tonValidate={ onValidate }\n\t\t\t\t\tpaddingInlineStart={ prefix ? space( 1 ) : undefined }\n\t\t\t\t\tpaddingInlineEnd={ suffix ? space( 1 ) : undefined }\n\t\t\t\t\tref={ ref }\n\t\t\t\t\tsize={ size }\n\t\t\t\t\tstateReducer={ stateReducer }\n\t\t\t\t\t{ ...draftHookProps }\n\t\t\t\t/>\n\t\t\t</InputBase>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * InputControl components let users enter and edit text. This is an experimental component\n * intended to (in time) merge with or replace `TextControl`.\n *\n * ```jsx\n * import { __experimentalInputControl as InputControl } from '@wordpress/components';\n * import { useState } from 'react';\n *\n * const Example = () => {\n * const [ value, setValue ] = useState( '' );\n *\n * return (\n * \t<InputControl\n * \t\t\t__next40pxDefaultSize\n * \t\tvalue={ value }\n * \t\tonChange={ ( nextValue ) => setValue( nextValue ?? '' ) }\n * \t/>\n * );\n * };\n * ```\n */\nexport const InputControl = forwardRef( UnforwardedInputControl );\n\nexport default InputControl;\n","/**\n * @typedef OwnProps\n *\n * @property {import('./types').IconKey} icon Icon name\n * @property {string} [className] Class name\n * @property {number} [size] Size of the icon\n */\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport type { DashiconProps } from './types';\n\nfunction Dashicon( {\n\ticon,\n\tclassName,\n\tsize = 20,\n\tstyle = {},\n\t...extraProps\n}: WordPressComponentProps< DashiconProps, 'span', false > ) {\n\tconst iconClass = [\n\t\t'dashicon',\n\t\t'dashicons',\n\t\t'dashicons-' + icon,\n\t\tclassName,\n\t]\n\t\t.filter( Boolean )\n\t\t.join( ' ' );\n\n\t// For retro-compatibility reasons (for example if people are overriding icon size with CSS), we add inline styles just if the size is different to the default\n\tconst sizeStyles =\n\t\t// using `!=` to catch both 20 and \"20\"\n\t\t// eslint-disable-next-line eqeqeq\n\t\t20 != size\n\t\t\t? {\n\t\t\t\t\tfontSize: `${ size }px`,\n\t\t\t\t\twidth: `${ size }px`,\n\t\t\t\t\theight: `${ size }px`,\n\t\t\t }\n\t\t\t: {};\n\n\tconst styles = {\n\t\t...sizeStyles,\n\t\t...style,\n\t};\n\n\treturn <span className={ iconClass } style={ styles } { ...extraProps } />;\n}\n\nexport default Dashicon;\n","/**\n * External dependencies\n */\nimport type { ComponentType, HTMLProps, SVGProps } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tcloneElement,\n\tcreateElement,\n\tisValidElement,\n} from '@wordpress/element';\nimport { SVG } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport Dashicon from '../dashicon';\nimport type { IconKey as DashiconIconKey } from '../dashicon/types';\n\nexport type IconType =\n\t| DashiconIconKey\n\t| ComponentType< { size?: number } >\n\t| ( ( props: { size?: number } ) => JSX.Element )\n\t| JSX.Element;\n\ntype AdditionalProps< T > = T extends ComponentType< infer U >\n\t? U\n\t: T extends DashiconIconKey\n\t? SVGProps< SVGSVGElement >\n\t: {};\n\nexport type Props = {\n\t/**\n\t * The icon to render. In most cases, you should use an icon from\n\t * [the `@wordpress/icons` package](https://wordpress.github.io/gutenberg/?path=/story/icons-icon--library).\n\t *\n\t * Other supported values are: component instances, functions,\n\t * [Dashicons](https://developer.wordpress.org/resource/dashicons/)\n\t * (specified as strings), and `null`.\n\t *\n\t * The `size` value, as well as any other additional props, will be passed through.\n\t *\n\t * @default null\n\t */\n\ticon?: IconType | null;\n\t/**\n\t * The size (width and height) of the icon.\n\t *\n\t * Defaults to `20` when `icon` is a string (i.e. a Dashicon id), otherwise `24`.\n\t *\n\t * @default `'string' === typeof icon ? 20 : 24`.\n\t */\n\tsize?: number;\n} & AdditionalProps< IconType >;\n\n/**\n * Renders a raw icon without any initial styling or wrappers.\n *\n * ```jsx\n * import { wordpress } from '@wordpress/icons';\n *\n * <Icon icon={ wordpress } />\n * ```\n */\nfunction Icon( {\n\ticon = null,\n\tsize = 'string' === typeof icon ? 20 : 24,\n\t...additionalProps\n}: Props ) {\n\tif ( 'string' === typeof icon ) {\n\t\treturn (\n\t\t\t<Dashicon\n\t\t\t\ticon={ icon }\n\t\t\t\tsize={ size }\n\t\t\t\t{ ...( additionalProps as HTMLProps< HTMLSpanElement > ) }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( isValidElement( icon ) && Dashicon === icon.type ) {\n\t\treturn cloneElement( icon, {\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\tif ( 'function' === typeof icon ) {\n\t\treturn createElement( icon, {\n\t\t\tsize,\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\tif ( icon && ( icon.type === 'svg' || icon.type === SVG ) ) {\n\t\tconst appliedProps = {\n\t\t\t...icon.props,\n\t\t\twidth: size,\n\t\t\theight: size,\n\t\t\t...additionalProps,\n\t\t};\n\n\t\treturn <SVG { ...appliedProps } />;\n\t}\n\n\tif ( isValidElement( icon ) ) {\n\t\treturn cloneElement( icon, {\n\t\t\t// @ts-ignore Just forwarding the size prop along\n\t\t\tsize,\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\treturn icon;\n}\n\nexport default Icon;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type {\n\tComponentPropsWithoutRef,\n\tForwardedRef,\n\tHTMLAttributes,\n\tMouseEvent,\n\tReactElement,\n} from 'react';\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport Tooltip from '../tooltip';\nimport Icon from '../icon';\nimport { VisuallyHidden } from '../visually-hidden';\nimport type { ButtonProps, DeprecatedButtonProps } from './types';\nimport { positionToPlacement } from '../popover/utils';\n\nconst disabledEventsOnDisabledButton = [ 'onMouseDown', 'onClick' ] as const;\n\nfunction useDeprecatedProps( {\n\t__experimentalIsFocusable,\n\tisDefault,\n\tisPrimary,\n\tisSecondary,\n\tisTertiary,\n\tisLink,\n\tisPressed,\n\tisSmall,\n\tsize,\n\tvariant,\n\tdescribedBy,\n\t...otherProps\n}: ButtonProps & DeprecatedButtonProps ): ButtonProps {\n\tlet computedSize = size;\n\tlet computedVariant = variant;\n\n\tconst newProps = {\n\t\taccessibleWhenDisabled: __experimentalIsFocusable,\n\t\t// @todo Mark `isPressed` as deprecated\n\t\t'aria-pressed': isPressed,\n\t\tdescription: describedBy,\n\t};\n\n\tif ( isSmall ) {\n\t\tcomputedSize ??= 'small';\n\t}\n\n\tif ( isPrimary ) {\n\t\tcomputedVariant ??= 'primary';\n\t}\n\n\tif ( isTertiary ) {\n\t\tcomputedVariant ??= 'tertiary';\n\t}\n\n\tif ( isSecondary ) {\n\t\tcomputedVariant ??= 'secondary';\n\t}\n\n\tif ( isDefault ) {\n\t\tdeprecated( 'wp.components.Button `isDefault` prop', {\n\t\t\tsince: '5.4',\n\t\t\talternative: 'variant=\"secondary\"',\n\t\t} );\n\n\t\tcomputedVariant ??= 'secondary';\n\t}\n\n\tif ( isLink ) {\n\t\tcomputedVariant ??= 'link';\n\t}\n\n\treturn {\n\t\t...newProps,\n\t\t...otherProps,\n\t\tsize: computedSize,\n\t\tvariant: computedVariant,\n\t};\n}\n\nexport function UnforwardedButton(\n\tprops: ButtonProps & DeprecatedButtonProps,\n\tref: ForwardedRef< any >\n) {\n\tconst {\n\t\t__next40pxDefaultSize,\n\t\taccessibleWhenDisabled,\n\t\tisBusy,\n\t\tisDestructive,\n\t\tclassName,\n\t\tdisabled,\n\t\ticon,\n\t\ticonPosition = 'left',\n\t\ticonSize,\n\t\tshowTooltip,\n\t\ttooltipPosition,\n\t\tshortcut,\n\t\tlabel,\n\t\tchildren,\n\t\tsize = 'default',\n\t\ttext,\n\t\tvariant,\n\t\tdescription,\n\t\t...buttonOrAnchorProps\n\t} = useDeprecatedProps( props );\n\n\tconst {\n\t\thref,\n\t\ttarget,\n\t\t'aria-checked': ariaChecked,\n\t\t'aria-pressed': ariaPressed,\n\t\t'aria-selected': ariaSelected,\n\t\t...additionalProps\n\t} = 'href' in buttonOrAnchorProps\n\t\t? buttonOrAnchorProps\n\t\t: { href: undefined, target: undefined, ...buttonOrAnchorProps };\n\n\tconst instanceId = useInstanceId(\n\t\tButton,\n\t\t'components-button__description'\n\t);\n\n\tconst hasChildren =\n\t\t( 'string' === typeof children && !! children ) ||\n\t\t( Array.isArray( children ) &&\n\t\t\tchildren?.[ 0 ] &&\n\t\t\tchildren[ 0 ] !== null &&\n\t\t\t// Tooltip should not considered as a child\n\t\t\tchildren?.[ 0 ]?.props?.className !== 'components-tooltip' );\n\n\tconst truthyAriaPressedValues: ( typeof ariaPressed )[] = [\n\t\ttrue,\n\t\t'true',\n\t\t'mixed',\n\t];\n\n\tconst classes = clsx( 'components-button', className, {\n\t\t'is-next-40px-default-size': __next40pxDefaultSize,\n\t\t'is-secondary': variant === 'secondary',\n\t\t'is-primary': variant === 'primary',\n\t\t'is-small': size === 'small',\n\t\t'is-compact': size === 'compact',\n\t\t'is-tertiary': variant === 'tertiary',\n\n\t\t'is-pressed': truthyAriaPressedValues.includes( ariaPressed ),\n\t\t'is-pressed-mixed': ariaPressed === 'mixed',\n\n\t\t'is-busy': isBusy,\n\t\t'is-link': variant === 'link',\n\t\t'is-destructive': isDestructive,\n\t\t'has-text': !! icon && ( hasChildren || text ),\n\t\t'has-icon': !! icon,\n\t} );\n\n\tconst trulyDisabled = disabled && ! accessibleWhenDisabled;\n\tconst Tag = href !== undefined && ! disabled ? 'a' : 'button';\n\tconst buttonProps: ComponentPropsWithoutRef< 'button' > =\n\t\tTag === 'button'\n\t\t\t? {\n\t\t\t\t\ttype: 'button',\n\t\t\t\t\tdisabled: trulyDisabled,\n\t\t\t\t\t'aria-checked': ariaChecked,\n\t\t\t\t\t'aria-pressed': ariaPressed,\n\t\t\t\t\t'aria-selected': ariaSelected,\n\t\t\t }\n\t\t\t: {};\n\tconst anchorProps: ComponentPropsWithoutRef< 'a' > =\n\t\tTag === 'a' ? { href, target } : {};\n\n\tconst disableEventProps: {\n\t\t[ key: string ]: ( event: MouseEvent ) => void;\n\t} = {};\n\tif ( disabled && accessibleWhenDisabled ) {\n\t\t// In this case, the button will be disabled, but still focusable and\n\t\t// perceivable by screen reader users.\n\t\tbuttonProps[ 'aria-disabled' ] = true;\n\t\tanchorProps[ 'aria-disabled' ] = true;\n\t\tfor ( const disabledEvent of disabledEventsOnDisabledButton ) {\n\t\t\tdisableEventProps[ disabledEvent ] = ( event: MouseEvent ) => {\n\t\t\t\tif ( event ) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t}\n\n\t// Should show the tooltip if...\n\tconst shouldShowTooltip =\n\t\t! trulyDisabled &&\n\t\t// An explicit tooltip is passed or...\n\t\t( ( showTooltip && !! label ) ||\n\t\t\t// There's a shortcut or...\n\t\t\t!! shortcut ||\n\t\t\t// There's a label and...\n\t\t\t( !! label &&\n\t\t\t\t// The children are empty and...\n\t\t\t\t! ( children as string | ReactElement[] )?.length &&\n\t\t\t\t// The tooltip is not explicitly disabled.\n\t\t\t\tfalse !== showTooltip ) );\n\n\tconst descriptionId = description ? instanceId : undefined;\n\n\tconst describedById =\n\t\tadditionalProps[ 'aria-describedby' ] || descriptionId;\n\n\tconst commonProps = {\n\t\tclassName: classes,\n\t\t'aria-label': additionalProps[ 'aria-label' ] || label,\n\t\t'aria-describedby': describedById,\n\t\tref,\n\t};\n\n\tconst elementChildren = (\n\t\t<>\n\t\t\t{ icon && iconPosition === 'left' && (\n\t\t\t\t<Icon icon={ icon } size={ iconSize } />\n\t\t\t) }\n\t\t\t{ text && <>{ text }</> }\n\t\t\t{ children }\n\t\t\t{ icon && iconPosition === 'right' && (\n\t\t\t\t<Icon icon={ icon } size={ iconSize } />\n\t\t\t) }\n\t\t</>\n\t);\n\n\tconst element =\n\t\tTag === 'a' ? (\n\t\t\t<a\n\t\t\t\t{ ...anchorProps }\n\t\t\t\t{ ...( additionalProps as HTMLAttributes< HTMLAnchorElement > ) }\n\t\t\t\t{ ...disableEventProps }\n\t\t\t\t{ ...commonProps }\n\t\t\t>\n\t\t\t\t{ elementChildren }\n\t\t\t</a>\n\t\t) : (\n\t\t\t<button\n\t\t\t\t{ ...buttonProps }\n\t\t\t\t{ ...( additionalProps as HTMLAttributes< HTMLButtonElement > ) }\n\t\t\t\t{ ...disableEventProps }\n\t\t\t\t{ ...commonProps }\n\t\t\t>\n\t\t\t\t{ elementChildren }\n\t\t\t</button>\n\t\t);\n\n\t// In order to avoid some React reconciliation issues, we are always rendering\n\t// the `Tooltip` component even when `shouldShowTooltip` is `false`.\n\t// In order to make sure that the tooltip doesn't show when it shouldn't,\n\t// we don't pass the props to the `Tooltip` component.\n\tconst tooltipProps = shouldShowTooltip\n\t\t? {\n\t\t\t\ttext:\n\t\t\t\t\t( children as string | ReactElement[] )?.length &&\n\t\t\t\t\tdescription\n\t\t\t\t\t\t? description\n\t\t\t\t\t\t: label,\n\t\t\t\tshortcut,\n\t\t\t\tplacement:\n\t\t\t\t\ttooltipPosition &&\n\t\t\t\t\t// Convert legacy `position` values to be used with the new `placement` prop\n\t\t\t\t\tpositionToPlacement( tooltipPosition ),\n\t\t }\n\t\t: {};\n\n\treturn (\n\t\t<>\n\t\t\t<Tooltip { ...tooltipProps }>{ element }</Tooltip>\n\t\t\t{ description && (\n\t\t\t\t<VisuallyHidden>\n\t\t\t\t\t<span id={ descriptionId }>{ description }</span>\n\t\t\t\t</VisuallyHidden>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\n/**\n * Lets users take actions and make choices with a single click or tap.\n *\n * ```jsx\n * import { Button } from '@wordpress/components';\n * const Mybutton = () => (\n * <Button\n * variant=\"primary\"\n * onClick={ handleClick }\n * >\n * Click here\n * </Button>\n * );\n * ```\n */\nexport const Button = forwardRef( UnforwardedButton );\nexport default Button;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport InputControl from '../../input-control';\nimport { COLORS } from '../../utils';\nimport Button from '../../button';\nimport { space } from '../../utils/space';\n\nconst htmlArrowStyles = ( { hideHTMLArrows }: { hideHTMLArrows: boolean } ) => {\n\tif ( ! hideHTMLArrows ) {\n\t\treturn ``;\n\t}\n\n\treturn css`\n\t\tinput[type='number']::-webkit-outer-spin-button,\n\t\tinput[type='number']::-webkit-inner-spin-button {\n\t\t\t-webkit-appearance: none !important;\n\t\t\tmargin: 0 !important;\n\t\t}\n\n\t\tinput[type='number'] {\n\t\t\t-moz-appearance: textfield;\n\t\t}\n\t`;\n};\n\nexport const Input = styled( InputControl )`\n\t${ htmlArrowStyles };\n`;\n\nexport const SpinButton = styled( Button )`\n\t&&&&& {\n\t\tcolor: ${ COLORS.theme.accent };\n\t}\n`;\n\nconst smallSpinButtons = css`\n\twidth: ${ space( 5 ) };\n\tmin-width: ${ space( 5 ) };\n\theight: ${ space( 5 ) };\n`;\n\nexport const styles = { smallSpinButtons };\n","/**\n * Parses and retrieves a number value.\n *\n * @param {unknown} value The incoming value.\n *\n * @return {number} The parsed number value.\n */\nexport function getNumber( value ) {\n\tconst number = Number( value );\n\n\treturn isNaN( number ) ? 0 : number;\n}\n\n/**\n * Safely adds 2 values.\n *\n * @param {Array<number|string>} args Values to add together.\n *\n * @return {number} The sum of values.\n */\nexport function add( ...args ) {\n\treturn args.reduce(\n\t\t/** @type {(sum:number, arg: number|string) => number} */\n\t\t( sum, arg ) => sum + getNumber( arg ),\n\t\t0\n\t);\n}\n\n/**\n * Safely subtracts 2 values.\n *\n * @param {Array<number|string>} args Values to subtract together.\n *\n * @return {number} The difference of the values.\n */\nexport function subtract( ...args ) {\n\treturn args.reduce(\n\t\t/** @type {(diff:number, arg: number|string, index:number) => number} */\n\t\t( diff, arg, index ) => {\n\t\t\tconst value = getNumber( arg );\n\t\t\treturn index === 0 ? value : diff - value;\n\t\t},\n\t\t0\n\t);\n}\n\n/**\n * Determines the decimal position of a number value.\n *\n * @param {number} value The number to evaluate.\n *\n * @return {number} The number of decimal places.\n */\nfunction getPrecision( value ) {\n\tconst split = ( value + '' ).split( '.' );\n\treturn split[ 1 ] !== undefined ? split[ 1 ].length : 0;\n}\n\n/**\n * Clamps a value based on a min/max range.\n *\n * @param {number} value The value.\n * @param {number} min The minimum range.\n * @param {number} max The maximum range.\n *\n * @return {number} The clamped value.\n */\nexport function clamp( value, min, max ) {\n\tconst baseValue = getNumber( value );\n\treturn Math.max( min, Math.min( baseValue, max ) );\n}\n\n/**\n * Clamps a value based on a min/max range with rounding\n *\n * @param {number | string} value The value.\n * @param {number} min The minimum range.\n * @param {number} max The maximum range.\n * @param {number} step A multiplier for the value.\n *\n * @return {number} The rounded and clamped value.\n */\nexport function roundClamp(\n\tvalue = 0,\n\tmin = Infinity,\n\tmax = Infinity,\n\tstep = 1\n) {\n\tconst baseValue = getNumber( value );\n\tconst stepValue = getNumber( step );\n\tconst precision = getPrecision( step );\n\tconst rounded = Math.round( baseValue / stepValue ) * stepValue;\n\tconst clampedValue = clamp( rounded, min, max );\n\n\treturn precision\n\t\t? getNumber( clampedValue.toFixed( precision ) )\n\t\t: clampedValue;\n}\n","/**\n * External dependencies\n */\nimport type { CSSProperties } from 'react';\n/**\n * Internal dependencies\n */\nimport type { FlexDirection } from '../flex/types';\nimport type { HStackAlignment, AlignmentProps, Alignments } from './types';\nimport { isValueDefined } from '../utils/values';\n\nconst H_ALIGNMENTS: Alignments = {\n\tbottom: { align: 'flex-end', justify: 'center' },\n\tbottomLeft: { align: 'flex-end', justify: 'flex-start' },\n\tbottomRight: { align: 'flex-end', justify: 'flex-end' },\n\tcenter: { align: 'center', justify: 'center' },\n\tedge: { align: 'center', justify: 'space-between' },\n\tleft: { align: 'center', justify: 'flex-start' },\n\tright: { align: 'center', justify: 'flex-end' },\n\tstretch: { align: 'stretch' },\n\ttop: { align: 'flex-start', justify: 'center' },\n\ttopLeft: { align: 'flex-start', justify: 'flex-start' },\n\ttopRight: { align: 'flex-start', justify: 'flex-end' },\n};\n\nconst V_ALIGNMENTS: Alignments = {\n\tbottom: { justify: 'flex-end', align: 'center' },\n\tbottomLeft: { justify: 'flex-end', align: 'flex-start' },\n\tbottomRight: { justify: 'flex-end', align: 'flex-end' },\n\tcenter: { justify: 'center', align: 'center' },\n\tedge: { justify: 'space-between', align: 'center' },\n\tleft: { justify: 'center', align: 'flex-start' },\n\tright: { justify: 'center', align: 'flex-end' },\n\tstretch: { align: 'stretch' },\n\ttop: { justify: 'flex-start', align: 'center' },\n\ttopLeft: { justify: 'flex-start', align: 'flex-start' },\n\ttopRight: { justify: 'flex-start', align: 'flex-end' },\n};\n\nexport function getAlignmentProps(\n\talignment: HStackAlignment | CSSProperties[ 'alignItems' ],\n\tdirection: FlexDirection = 'row'\n): AlignmentProps {\n\tif ( ! isValueDefined( alignment ) ) {\n\t\treturn {};\n\t}\n\tconst isVertical = direction === 'column';\n\tconst props = isVertical ? V_ALIGNMENTS : H_ALIGNMENTS;\n\n\tconst alignmentProps =\n\t\talignment in props\n\t\t\t? props[ alignment as keyof typeof props ]\n\t\t\t: { align: alignment };\n\n\treturn alignmentProps;\n}\n","/**\n * External dependencies\n */\nimport type { ReactNode, ReactChild, ReactFragment, ReactPortal } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { Children, isValidElement } from '@wordpress/element';\n\n/**\n * Gets a collection of available children elements from a React component's children prop.\n *\n * @param children\n *\n * @return An array of available children.\n */\nexport function getValidChildren(\n\tchildren: ReactNode\n): Array< ReactChild | ReactFragment | ReactPortal > {\n\tif ( typeof children === 'string' ) {\n\t\treturn [ children ];\n\t}\n\n\treturn Children.toArray( children ).filter( ( child ) =>\n\t\tisValidElement( child )\n\t);\n}\n","/**\n * External dependencies\n */\nimport type { ReactElement } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { hasConnectNamespace, useContextSystem } from '../context';\nimport { FlexItem, useFlex } from '../flex';\nimport { getAlignmentProps } from './utils';\nimport { getValidChildren } from '../utils/get-valid-children';\nimport type { Props } from './types';\n\nexport function useHStack( props: WordPressComponentProps< Props, 'div' > ) {\n\tconst {\n\t\talignment = 'edge',\n\t\tchildren,\n\t\tdirection,\n\t\tspacing = 2,\n\t\t...otherProps\n\t} = useContextSystem( props, 'HStack' );\n\n\tconst align = getAlignmentProps( alignment, direction );\n\n\tconst validChildren = getValidChildren( children );\n\tconst clonedChildren = validChildren.map( ( child, index ) => {\n\t\tconst _isSpacer = hasConnectNamespace( child, [ 'Spacer' ] );\n\n\t\tif ( _isSpacer ) {\n\t\t\tconst childElement = child as ReactElement;\n\t\t\tconst _key = childElement.key || `hstack-${ index }`;\n\n\t\t\treturn <FlexItem isBlock key={ _key } { ...childElement.props } />;\n\t\t}\n\n\t\treturn child;\n\t} );\n\n\tconst propsForFlex = {\n\t\tchildren: clonedChildren,\n\t\tdirection,\n\t\tjustify: 'center',\n\t\t...align,\n\t\t...otherProps,\n\t\tgap: spacing,\n\t};\n\n\t// Omit `isColumn` because it's not used in HStack.\n\tconst { isColumn, ...flexProps } = useFlex( propsForFlex );\n\n\treturn flexProps;\n}\n","/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { contextConnect } from '../context';\nimport { View } from '../view';\nimport { useHStack } from './hook';\nimport type { Props } from './types';\n\nfunction UnconnectedHStack(\n\tprops: WordPressComponentProps< Props, 'div' >,\n\tforwardedRef: React.ForwardedRef< any >\n) {\n\tconst hStackProps = useHStack( props );\n\n\treturn <View { ...hStackProps } ref={ forwardedRef } />;\n}\n\n/**\n * `HStack` (Horizontal Stack) arranges child elements in a horizontal line.\n *\n * `HStack` can render anything inside.\n *\n * ```jsx\n * import {\n * \t__experimentalHStack as HStack,\n * \t__experimentalText as Text,\n * } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<HStack>\n * \t\t\t<Text>Code</Text>\n * \t\t\t<Text>is</Text>\n * \t\t\t<Text>Poetry</Text>\n * \t\t</HStack>\n * \t);\n * }\n * ```\n */\nexport const HStack = contextConnect( UnconnectedHStack, 'HStack' );\n\nexport default HStack;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ForwardedRef, KeyboardEvent, MouseEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, forwardRef } from '@wordpress/element';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { plus as plusIcon, reset as resetIcon } from '@wordpress/icons';\nimport { useMergeRefs } from '@wordpress/compose';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { Input, SpinButton, styles } from './styles/number-control-styles';\nimport * as inputControlActionTypes from '../input-control/reducer/actions';\nimport { add, subtract, roundClamp } from '../utils/math';\nimport { ensureNumber, isValueEmpty } from '../utils/values';\nimport type { WordPressComponentProps } from '../context/wordpress-component';\nimport type { NumberControlProps } from './types';\nimport { HStack } from '../h-stack';\nimport { Spacer } from '../spacer';\nimport { useCx } from '../utils';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\n\nconst noop = () => {};\n\nfunction UnforwardedNumberControl(\n\tprops: WordPressComponentProps< NumberControlProps, 'input', false >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst {\n\t\t__unstableStateReducer: stateReducerProp,\n\t\tclassName,\n\t\tdragDirection = 'n',\n\t\thideHTMLArrows = false,\n\t\tspinControls = hideHTMLArrows ? 'none' : 'native',\n\t\tisDragEnabled = true,\n\t\tisShiftStepEnabled = true,\n\t\tlabel,\n\t\tmax = Infinity,\n\t\tmin = -Infinity,\n\t\trequired = false,\n\t\tshiftStep = 10,\n\t\tstep = 1,\n\t\tspinFactor = 1,\n\t\ttype: typeProp = 'number',\n\t\tvalue: valueProp,\n\t\tsize = 'default',\n\t\tsuffix,\n\t\tonChange = noop,\n\t\t__shouldNotWarnDeprecated36pxSize,\n\t\t...restProps\n\t} = useDeprecated36pxDefaultSizeProp< NumberControlProps >( props );\n\n\tmaybeWarnDeprecated36pxSize( {\n\t\tcomponentName: 'NumberControl',\n\t\tsize,\n\t\t__next40pxDefaultSize: restProps.__next40pxDefaultSize,\n\t\t__shouldNotWarnDeprecated36pxSize,\n\t} );\n\n\tif ( hideHTMLArrows ) {\n\t\tdeprecated( 'wp.components.NumberControl hideHTMLArrows prop ', {\n\t\t\talternative: 'spinControls=\"none\"',\n\t\t\tsince: '6.2',\n\t\t\tversion: '6.3',\n\t\t} );\n\t}\n\tconst inputRef = useRef< HTMLInputElement >();\n\tconst mergedRef = useMergeRefs( [ inputRef, forwardedRef ] );\n\n\tconst isStepAny = step === 'any';\n\tconst baseStep = isStepAny ? 1 : ensureNumber( step );\n\tconst baseSpin = ensureNumber( spinFactor ) * baseStep;\n\tconst baseValue = roundClamp( 0, min, max, baseStep );\n\tconst constrainValue = (\n\t\tvalue: number | string,\n\t\tstepOverride?: number\n\t) => {\n\t\t// When step is \"any\" clamp the value, otherwise round and clamp it.\n\t\t// Use '' + to convert to string for use in input value attribute.\n\t\treturn isStepAny\n\t\t\t? '' + Math.min( max, Math.max( min, ensureNumber( value ) ) )\n\t\t\t: '' + roundClamp( value, min, max, stepOverride ?? baseStep );\n\t};\n\n\tconst autoComplete = typeProp === 'number' ? 'off' : undefined;\n\tconst classes = clsx( 'components-number-control', className );\n\tconst cx = useCx();\n\tconst spinButtonClasses = cx( size === 'small' && styles.smallSpinButtons );\n\n\tconst spinValue = (\n\t\tvalue: string | number | undefined,\n\t\tdirection: 'up' | 'down',\n\t\tevent: KeyboardEvent | MouseEvent | undefined\n\t) => {\n\t\tevent?.preventDefault();\n\t\tconst shift = event?.shiftKey && isShiftStepEnabled;\n\t\tconst delta = shift ? ensureNumber( shiftStep ) * baseSpin : baseSpin;\n\t\tlet nextValue = isValueEmpty( value ) ? baseValue : value;\n\t\tif ( direction === 'up' ) {\n\t\t\tnextValue = add( nextValue, delta );\n\t\t} else if ( direction === 'down' ) {\n\t\t\tnextValue = subtract( nextValue, delta );\n\t\t}\n\t\treturn constrainValue( nextValue, shift ? delta : undefined );\n\t};\n\n\t/**\n\t * \"Middleware\" function that intercepts updates from InputControl.\n\t * This allows us to tap into actions to transform the (next) state for\n\t * InputControl.\n\t *\n\t * @return The updated state to apply to InputControl\n\t */\n\tconst numberControlStateReducer: NumberControlProps[ '__unstableStateReducer' ] =\n\t\t( state, action ) => {\n\t\t\tconst nextState = { ...state };\n\n\t\t\tconst { type, payload } = action;\n\t\t\tconst event = payload.event;\n\t\t\tconst currentValue = nextState.value;\n\n\t\t\t/**\n\t\t\t * Handles custom UP and DOWN Keyboard events\n\t\t\t */\n\t\t\tif (\n\t\t\t\ttype === inputControlActionTypes.PRESS_UP ||\n\t\t\t\ttype === inputControlActionTypes.PRESS_DOWN\n\t\t\t) {\n\t\t\t\tnextState.value = spinValue(\n\t\t\t\t\tcurrentValue,\n\t\t\t\t\ttype === inputControlActionTypes.PRESS_UP ? 'up' : 'down',\n\t\t\t\t\tevent as KeyboardEvent | undefined\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handles drag to update events\n\t\t\t */\n\t\t\tif ( type === inputControlActionTypes.DRAG && isDragEnabled ) {\n\t\t\t\tconst [ x, y ] = payload.delta;\n\t\t\t\tconst enableShift = payload.shiftKey && isShiftStepEnabled;\n\t\t\t\tconst modifier = enableShift\n\t\t\t\t\t? ensureNumber( shiftStep ) * baseSpin\n\t\t\t\t\t: baseSpin;\n\n\t\t\t\tlet directionModifier;\n\t\t\t\tlet delta;\n\n\t\t\t\tswitch ( dragDirection ) {\n\t\t\t\t\tcase 'n':\n\t\t\t\t\t\tdelta = y;\n\t\t\t\t\t\tdirectionModifier = -1;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'e':\n\t\t\t\t\t\tdelta = x;\n\t\t\t\t\t\tdirectionModifier = isRTL() ? -1 : 1;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 's':\n\t\t\t\t\t\tdelta = y;\n\t\t\t\t\t\tdirectionModifier = 1;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'w':\n\t\t\t\t\t\tdelta = x;\n\t\t\t\t\t\tdirectionModifier = isRTL() ? 1 : -1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ( delta !== 0 ) {\n\t\t\t\t\tdelta = Math.ceil( Math.abs( delta ) ) * Math.sign( delta );\n\t\t\t\t\tconst distance = delta * modifier * directionModifier;\n\n\t\t\t\t\tnextState.value = constrainValue(\n\t\t\t\t\t\t// @ts-expect-error TODO: Investigate if it's ok for currentValue to be undefined\n\t\t\t\t\t\tadd( currentValue, distance ),\n\t\t\t\t\t\tenableShift ? modifier : undefined\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handles commit (ENTER key press or blur)\n\t\t\t */\n\t\t\tif (\n\t\t\t\ttype === inputControlActionTypes.PRESS_ENTER ||\n\t\t\t\ttype === inputControlActionTypes.COMMIT\n\t\t\t) {\n\t\t\t\tconst applyEmptyValue =\n\t\t\t\t\trequired === false && currentValue === '';\n\n\t\t\t\tnextState.value = applyEmptyValue\n\t\t\t\t\t? currentValue\n\t\t\t\t\t: // @ts-expect-error TODO: Investigate if it's ok for currentValue to be undefined\n\t\t\t\t\t constrainValue( currentValue );\n\t\t\t}\n\n\t\t\treturn nextState;\n\t\t};\n\n\tconst buildSpinButtonClickHandler =\n\t\t( direction: 'up' | 'down' ) =>\n\t\t( event: MouseEvent< HTMLButtonElement > ) =>\n\t\t\tonChange( String( spinValue( valueProp, direction, event ) ), {\n\t\t\t\t// Set event.target to the <input> so that consumers can use\n\t\t\t\t// e.g. event.target.validity.\n\t\t\t\tevent: {\n\t\t\t\t\t...event,\n\t\t\t\t\ttarget: inputRef.current!,\n\t\t\t\t},\n\t\t\t} );\n\n\treturn (\n\t\t<Input\n\t\t\tautoComplete={ autoComplete }\n\t\t\tinputMode=\"numeric\"\n\t\t\t{ ...restProps }\n\t\t\tclassName={ classes }\n\t\t\tdragDirection={ dragDirection }\n\t\t\thideHTMLArrows={ spinControls !== 'native' }\n\t\t\tisDragEnabled={ isDragEnabled }\n\t\t\tlabel={ label }\n\t\t\tmax={ max }\n\t\t\tmin={ min }\n\t\t\tref={ mergedRef }\n\t\t\trequired={ required }\n\t\t\tstep={ step }\n\t\t\ttype={ typeProp }\n\t\t\t// @ts-expect-error TODO: Resolve discrepancy between `value` types in InputControl based components\n\t\t\tvalue={ valueProp }\n\t\t\t__unstableStateReducer={ ( state, action ) => {\n\t\t\t\tconst baseState = numberControlStateReducer( state, action );\n\t\t\t\treturn stateReducerProp?.( baseState, action ) ?? baseState;\n\t\t\t} }\n\t\t\tsize={ size }\n\t\t\t__shouldNotWarnDeprecated36pxSize\n\t\t\tsuffix={\n\t\t\t\tspinControls === 'custom' ? (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ suffix }\n\t\t\t\t\t\t<Spacer marginBottom={ 0 } marginRight={ 2 }>\n\t\t\t\t\t\t\t<HStack spacing={ 1 }>\n\t\t\t\t\t\t\t\t<SpinButton\n\t\t\t\t\t\t\t\t\tclassName={ spinButtonClasses }\n\t\t\t\t\t\t\t\t\ticon={ plusIcon }\n\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Increment' ) }\n\t\t\t\t\t\t\t\t\tonClick={ buildSpinButtonClickHandler(\n\t\t\t\t\t\t\t\t\t\t'up'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<SpinButton\n\t\t\t\t\t\t\t\t\tclassName={ spinButtonClasses }\n\t\t\t\t\t\t\t\t\ticon={ resetIcon }\n\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Decrement' ) }\n\t\t\t\t\t\t\t\t\tonClick={ buildSpinButtonClickHandler(\n\t\t\t\t\t\t\t\t\t\t'down'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t</Spacer>\n\t\t\t\t\t</>\n\t\t\t\t) : (\n\t\t\t\t\tsuffix\n\t\t\t\t)\n\t\t\t}\n\t\t\tonChange={ onChange }\n\t\t/>\n\t);\n}\n\nexport const NumberControl = forwardRef( UnforwardedNumberControl );\n\nexport default NumberControl;\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport { COLORS } from '../../utils';\nimport { space } from '../../utils/space';\nimport { Text } from '../../text';\nimport CONFIG from '../../utils/config-values';\n\nconst CIRCLE_SIZE = 32;\nconst INNER_CIRCLE_SIZE = 6;\n\nexport const CircleRoot = styled.div`\n\tborder-radius: ${ CONFIG.radiusRound };\n\tborder: ${ CONFIG.borderWidth } solid ${ COLORS.ui.border };\n\tbox-sizing: border-box;\n\tcursor: grab;\n\theight: ${ CIRCLE_SIZE }px;\n\toverflow: hidden;\n\twidth: ${ CIRCLE_SIZE }px;\n\n\t:active {\n\t\tcursor: grabbing;\n\t}\n`;\n\nexport const CircleIndicatorWrapper = styled.div`\n\tbox-sizing: border-box;\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n\n\t:focus-visible {\n\t\toutline: none;\n\t}\n`;\n\nexport const CircleIndicator = styled.div`\n\tbackground: ${ COLORS.theme.accent };\n\tborder-radius: ${ CONFIG.radiusRound };\n\tbox-sizing: border-box;\n\tdisplay: block;\n\tleft: 50%;\n\ttop: 4px;\n\ttransform: translateX( -50% );\n\tposition: absolute;\n\twidth: ${ INNER_CIRCLE_SIZE }px;\n\theight: ${ INNER_CIRCLE_SIZE }px;\n`;\n\nexport const UnitText = styled( Text )`\n\tcolor: ${ COLORS.theme.accent };\n\tmargin-right: ${ space( 3 ) };\n`;\n","/**\n * WordPress dependencies\n */\nimport { useEffect, useRef } from '@wordpress/element';\nimport { __experimentalUseDragging as useDragging } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport {\n\tCircleRoot,\n\tCircleIndicatorWrapper,\n\tCircleIndicator,\n} from './styles/angle-picker-control-styles';\n\nimport type { WordPressComponentProps } from '../context';\nimport type { AngleCircleProps } from './types';\n\ntype UseDraggingArgumentType = Parameters< typeof useDragging >[ 0 ];\ntype UseDraggingCallbackEvent =\n\t| Parameters< UseDraggingArgumentType[ 'onDragStart' ] >[ 0 ]\n\t| Parameters< UseDraggingArgumentType[ 'onDragMove' ] >[ 0 ]\n\t| Parameters< UseDraggingArgumentType[ 'onDragEnd' ] >[ 0 ];\n\nfunction AngleCircle( {\n\tvalue,\n\tonChange,\n\t...props\n}: WordPressComponentProps< AngleCircleProps, 'div' > ) {\n\tconst angleCircleRef = useRef< HTMLDivElement | null >( null );\n\tconst angleCircleCenterRef = useRef<\n\t\t{ x: number; y: number } | undefined\n\t>();\n\tconst previousCursorValueRef = useRef< CSSStyleDeclaration[ 'cursor' ] >();\n\n\tconst setAngleCircleCenter = () => {\n\t\tif ( angleCircleRef.current === null ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst rect = angleCircleRef.current.getBoundingClientRect();\n\t\tangleCircleCenterRef.current = {\n\t\t\tx: rect.x + rect.width / 2,\n\t\t\ty: rect.y + rect.height / 2,\n\t\t};\n\t};\n\n\tconst changeAngleToPosition = ( event: UseDraggingCallbackEvent ) => {\n\t\tif ( event === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Prevent (drag) mouse events from selecting and accidentally\n\t\t// triggering actions from other elements.\n\t\tevent.preventDefault();\n\t\t// Input control needs to lose focus and by preventDefault above, it doesn't.\n\t\t( event.target as HTMLDivElement | null )?.focus();\n\n\t\tif (\n\t\t\tangleCircleCenterRef.current !== undefined &&\n\t\t\tonChange !== undefined\n\t\t) {\n\t\t\tconst { x: centerX, y: centerY } = angleCircleCenterRef.current;\n\t\t\tonChange(\n\t\t\t\tgetAngle( centerX, centerY, event.clientX, event.clientY )\n\t\t\t);\n\t\t}\n\t};\n\n\tconst { startDrag, isDragging } = useDragging( {\n\t\tonDragStart: ( event ) => {\n\t\t\tsetAngleCircleCenter();\n\t\t\tchangeAngleToPosition( event );\n\t\t},\n\t\tonDragMove: changeAngleToPosition,\n\t\tonDragEnd: changeAngleToPosition,\n\t} );\n\n\tuseEffect( () => {\n\t\tif ( isDragging ) {\n\t\t\tif ( previousCursorValueRef.current === undefined ) {\n\t\t\t\tpreviousCursorValueRef.current = document.body.style.cursor;\n\t\t\t}\n\t\t\tdocument.body.style.cursor = 'grabbing';\n\t\t} else {\n\t\t\tdocument.body.style.cursor = previousCursorValueRef.current || '';\n\t\t\tpreviousCursorValueRef.current = undefined;\n\t\t}\n\t}, [ isDragging ] );\n\n\treturn (\n\t\t<CircleRoot\n\t\t\tref={ angleCircleRef }\n\t\t\tonMouseDown={ startDrag }\n\t\t\tclassName=\"components-angle-picker-control__angle-circle\"\n\t\t\t{ ...props }\n\t\t>\n\t\t\t<CircleIndicatorWrapper\n\t\t\t\tstyle={\n\t\t\t\t\tvalue ? { transform: `rotate(${ value }deg)` } : undefined\n\t\t\t\t}\n\t\t\t\tclassName=\"components-angle-picker-control__angle-circle-indicator-wrapper\"\n\t\t\t\ttabIndex={ -1 }\n\t\t\t>\n\t\t\t\t<CircleIndicator className=\"components-angle-picker-control__angle-circle-indicator\" />\n\t\t\t</CircleIndicatorWrapper>\n\t\t</CircleRoot>\n\t);\n}\n\nfunction getAngle(\n\tcenterX: number,\n\tcenterY: number,\n\tpointX: number,\n\tpointY: number\n) {\n\tconst y = pointY - centerY;\n\tconst x = pointX - centerX;\n\n\tconst angleInRadians = Math.atan2( y, x );\n\tconst angleInDeg = Math.round( angleInRadians * ( 180 / Math.PI ) ) + 90;\n\tif ( angleInDeg < 0 ) {\n\t\treturn 360 + angleInDeg;\n\t}\n\treturn angleInDeg;\n}\n\nexport default AngleCircle;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { isRTL, __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { Flex, FlexBlock } from '../flex';\nimport { Spacer } from '../spacer';\nimport NumberControl from '../number-control';\nimport AngleCircle from './angle-circle';\nimport { UnitText } from './styles/angle-picker-control-styles';\n\nimport type { WordPressComponentProps } from '../context';\nimport type { AnglePickerControlProps } from './types';\n\nfunction UnforwardedAnglePickerControl(\n\tprops: WordPressComponentProps< AnglePickerControlProps, 'div' >,\n\tref: ForwardedRef< any >\n) {\n\tconst {\n\t\tclassName,\n\t\tlabel = __( 'Angle' ),\n\t\tonChange,\n\t\tvalue,\n\t\t...restProps\n\t} = props;\n\n\tconst handleOnNumberChange = ( unprocessedValue: string | undefined ) => {\n\t\tif ( onChange === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst inputValue =\n\t\t\tunprocessedValue !== undefined && unprocessedValue !== ''\n\t\t\t\t? parseInt( unprocessedValue, 10 )\n\t\t\t\t: 0;\n\t\tonChange( inputValue );\n\t};\n\n\tconst classes = clsx( 'components-angle-picker-control', className );\n\n\tconst unitText = <UnitText>°</UnitText>;\n\tconst [ prefixedUnitText, suffixedUnitText ] = isRTL()\n\t\t? [ unitText, null ]\n\t\t: [ null, unitText ];\n\n\treturn (\n\t\t<Flex { ...restProps } ref={ ref } className={ classes } gap={ 2 }>\n\t\t\t<FlexBlock>\n\t\t\t\t<NumberControl\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tclassName=\"components-angle-picker-control__input-field\"\n\t\t\t\t\tmax={ 360 }\n\t\t\t\t\tmin={ 0 }\n\t\t\t\t\tonChange={ handleOnNumberChange }\n\t\t\t\t\tstep=\"1\"\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tspinControls=\"none\"\n\t\t\t\t\tprefix={ prefixedUnitText }\n\t\t\t\t\tsuffix={ suffixedUnitText }\n\t\t\t\t/>\n\t\t\t</FlexBlock>\n\t\t\t<Spacer marginBottom=\"1\" marginTop=\"auto\">\n\t\t\t\t<AngleCircle\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t/>\n\t\t\t</Spacer>\n\t\t</Flex>\n\t);\n}\n\n/**\n * `AnglePickerControl` is a React component to render a UI that allows users to\n * pick an angle. Users can choose an angle in a visual UI with the mouse by\n * dragging an angle indicator inside a circle or by directly inserting the\n * desired angle in a text field.\n *\n * ```jsx\n * import { useState } from '@wordpress/element';\n * import { AnglePickerControl } from '@wordpress/components';\n *\n * function Example() {\n * const [ angle, setAngle ] = useState( 0 );\n * return (\n * <AnglePickerControl\n * value={ angle }\n * onChange={ setAngle }\n * </>\n * );\n * }\n * ```\n */\nexport const AnglePickerControl = forwardRef( UnforwardedAnglePickerControl );\n\nexport default AnglePickerControl;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"richText\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"a11y\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"keycodes\"];","/**\n * External dependencies\n */\nimport removeAccents from 'remove-accents';\nimport { paramCase } from 'change-case';\n\n/**\n * All unicode characters that we consider \"dash-like\":\n * - `\\u007e`: ~ (tilde)\n * - `\\u00ad`:  (soft hyphen)\n * - `\\u2053`: â“ (swung dash)\n * - `\\u207b`: â» (superscript minus)\n * - `\\u208b`: â‚‹ (subscript minus)\n * - `\\u2212`: − (minus sign)\n * - `\\\\p{Pd}`: any other Unicode dash character\n */\nconst ALL_UNICODE_DASH_CHARACTERS = new RegExp(\n\t/[\\u007e\\u00ad\\u2053\\u207b\\u208b\\u2212\\p{Pd}]/gu\n);\n\nexport const normalizeTextString = ( value: string ): string => {\n\treturn removeAccents( value )\n\t\t.toLocaleLowerCase()\n\t\t.replace( ALL_UNICODE_DASH_CHARACTERS, '-' );\n};\n\n/**\n * Converts any string to kebab case.\n * Backwards compatible with Lodash's `_.kebabCase()`.\n * Backwards compatible with `_wp_to_kebab_case()`.\n *\n * @see https://lodash.com/docs/4.17.15#kebabCase\n * @see https://developer.wordpress.org/reference/functions/_wp_to_kebab_case/\n *\n * @param str String to convert.\n * @return Kebab-cased string\n */\nexport function kebabCase( str: unknown ) {\n\tlet input = str?.toString?.() ?? '';\n\n\t// See https://github.com/lodash/lodash/blob/b185fcee26b2133bd071f4aaca14b455c2ed1008/lodash.js#L4970\n\tinput = input.replace( /['\\u2019]/, '' );\n\n\treturn paramCase( input, {\n\t\tsplitRegexp: [\n\t\t\t/(?!(?:1ST|2ND|3RD|[4-9]TH)(?![a-z]))([a-z0-9])([A-Z])/g, // fooBar => foo-bar, 3Bar => 3-bar\n\t\t\t/(?!(?:1st|2nd|3rd|[4-9]th)(?![a-z]))([0-9])([a-z])/g, // 3bar => 3-bar\n\t\t\t/([A-Za-z])([0-9])/g, // Foo3 => foo-3, foo3 => foo-3\n\t\t\t/([A-Z])([A-Z][a-z])/g, // FOOBar => foo-bar\n\t\t],\n\t} );\n}\n\n/**\n * Escapes the RegExp special characters.\n *\n * @param string Input string.\n *\n * @return Regex-escaped string.\n */\nexport function escapeRegExp( string: string ): string {\n\treturn string.replace( /[\\\\^$.*+?()[\\]{}|]/g, '\\\\$&' );\n}\n","import { arrow as arrow$1, computePosition } from '@floating-ui/dom';\nexport { autoPlacement, autoUpdate, computePosition, detectOverflow, flip, getOverflowAncestors, hide, inline, limitShift, offset, platform, shift, size } from '@floating-ui/dom';\nimport * as React from 'react';\nimport { useLayoutEffect, useEffect } from 'react';\nimport * as ReactDOM from 'react-dom';\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => {\n function isRef(value) {\n return {}.hasOwnProperty.call(value, 'current');\n }\n return {\n name: 'arrow',\n options,\n fn(state) {\n const {\n element,\n padding\n } = typeof options === 'function' ? options(state) : options;\n if (element && isRef(element)) {\n if (element.current != null) {\n return arrow$1({\n element: element.current,\n padding\n }).fn(state);\n }\n return {};\n } else if (element) {\n return arrow$1({\n element,\n padding\n }).fn(state);\n }\n return {};\n }\n };\n};\n\nvar index = typeof document !== 'undefined' ? useLayoutEffect : useEffect;\n\n// Fork of `fast-deep-equal` that only does the comparisons we need and compares\n// functions\nfunction deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n if (typeof a !== typeof b) {\n return false;\n }\n if (typeof a === 'function' && a.toString() === b.toString()) {\n return true;\n }\n let length, i, keys;\n if (a && b && typeof a == 'object') {\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;) {\n if (!deepEqual(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) {\n return false;\n }\n for (i = length; i-- !== 0;) {\n if (!{}.hasOwnProperty.call(b, keys[i])) {\n return false;\n }\n }\n for (i = length; i-- !== 0;) {\n const key = keys[i];\n if (key === '_owner' && a.$$typeof) {\n continue;\n }\n if (!deepEqual(a[key], b[key])) {\n return false;\n }\n }\n return true;\n }\n return a !== a && b !== b;\n}\n\nfunction getDPR(element) {\n if (typeof window === 'undefined') {\n return 1;\n }\n const win = element.ownerDocument.defaultView || window;\n return win.devicePixelRatio || 1;\n}\n\nfunction roundByDPR(element, value) {\n const dpr = getDPR(element);\n return Math.round(value * dpr) / dpr;\n}\n\nfunction useLatestRef(value) {\n const ref = React.useRef(value);\n index(() => {\n ref.current = value;\n });\n return ref;\n}\n\n/**\n * Provides data to position a floating element.\n * @see https://floating-ui.com/docs/react\n */\nfunction useFloating(options) {\n if (options === void 0) {\n options = {};\n }\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform,\n elements: {\n reference: externalReference,\n floating: externalFloating\n } = {},\n transform = true,\n whileElementsMounted,\n open\n } = options;\n const [data, setData] = React.useState({\n x: 0,\n y: 0,\n strategy,\n placement,\n middlewareData: {},\n isPositioned: false\n });\n const [latestMiddleware, setLatestMiddleware] = React.useState(middleware);\n if (!deepEqual(latestMiddleware, middleware)) {\n setLatestMiddleware(middleware);\n }\n const [_reference, _setReference] = React.useState(null);\n const [_floating, _setFloating] = React.useState(null);\n const setReference = React.useCallback(node => {\n if (node != referenceRef.current) {\n referenceRef.current = node;\n _setReference(node);\n }\n }, [_setReference]);\n const setFloating = React.useCallback(node => {\n if (node !== floatingRef.current) {\n floatingRef.current = node;\n _setFloating(node);\n }\n }, [_setFloating]);\n const referenceEl = externalReference || _reference;\n const floatingEl = externalFloating || _floating;\n const referenceRef = React.useRef(null);\n const floatingRef = React.useRef(null);\n const dataRef = React.useRef(data);\n const whileElementsMountedRef = useLatestRef(whileElementsMounted);\n const platformRef = useLatestRef(platform);\n const update = React.useCallback(() => {\n if (!referenceRef.current || !floatingRef.current) {\n return;\n }\n const config = {\n placement,\n strategy,\n middleware: latestMiddleware\n };\n if (platformRef.current) {\n config.platform = platformRef.current;\n }\n computePosition(referenceRef.current, floatingRef.current, config).then(data => {\n const fullData = {\n ...data,\n isPositioned: true\n };\n if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {\n dataRef.current = fullData;\n ReactDOM.flushSync(() => {\n setData(fullData);\n });\n }\n });\n }, [latestMiddleware, placement, strategy, platformRef]);\n index(() => {\n if (open === false && dataRef.current.isPositioned) {\n dataRef.current.isPositioned = false;\n setData(data => ({\n ...data,\n isPositioned: false\n }));\n }\n }, [open]);\n const isMountedRef = React.useRef(false);\n index(() => {\n isMountedRef.current = true;\n return () => {\n isMountedRef.current = false;\n };\n }, []);\n index(() => {\n if (referenceEl) referenceRef.current = referenceEl;\n if (floatingEl) floatingRef.current = floatingEl;\n if (referenceEl && floatingEl) {\n if (whileElementsMountedRef.current) {\n return whileElementsMountedRef.current(referenceEl, floatingEl, update);\n } else {\n update();\n }\n }\n }, [referenceEl, floatingEl, update, whileElementsMountedRef]);\n const refs = React.useMemo(() => ({\n reference: referenceRef,\n floating: floatingRef,\n setReference,\n setFloating\n }), [setReference, setFloating]);\n const elements = React.useMemo(() => ({\n reference: referenceEl,\n floating: floatingEl\n }), [referenceEl, floatingEl]);\n const floatingStyles = React.useMemo(() => {\n const initialStyles = {\n position: strategy,\n left: 0,\n top: 0\n };\n if (!elements.floating) {\n return initialStyles;\n }\n const x = roundByDPR(elements.floating, data.x);\n const y = roundByDPR(elements.floating, data.y);\n if (transform) {\n return {\n ...initialStyles,\n transform: \"translate(\" + x + \"px, \" + y + \"px)\",\n ...(getDPR(elements.floating) >= 1.5 && {\n willChange: 'transform'\n })\n };\n }\n return {\n position: strategy,\n left: x,\n top: y\n };\n }, [strategy, transform, elements.floating, data.x, data.y]);\n return React.useMemo(() => ({\n ...data,\n update,\n refs,\n elements,\n floatingStyles\n }), [data, update, refs, elements, floatingStyles]);\n}\n\nexport { arrow, useFloating };\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst close = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z\" />\n\t</SVG>\n);\n\nexport default close;\n","/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\n\n/*\n * Setting `overflow: hidden` on html and body elements resets body scroll in iOS.\n * Save scroll top so we can restore it after locking scroll.\n *\n * NOTE: It would be cleaner and possibly safer to find a localized solution such\n * as preventing default on certain touchmove events.\n */\nlet previousScrollTop = 0;\n\nfunction setLocked( locked: boolean ) {\n\tconst scrollingElement = document.scrollingElement || document.body;\n\n\tif ( locked ) {\n\t\tpreviousScrollTop = scrollingElement.scrollTop;\n\t}\n\n\tconst methodName = locked ? 'add' : 'remove';\n\tscrollingElement.classList[ methodName ]( 'lockscroll' );\n\n\t// Adding the class to the document element seems to be necessary in iOS.\n\tdocument.documentElement.classList[ methodName ]( 'lockscroll' );\n\n\tif ( ! locked ) {\n\t\tscrollingElement.scrollTop = previousScrollTop;\n\t}\n}\n\nlet lockCounter = 0;\n\n/**\n * ScrollLock is a content-free React component for declaratively preventing\n * scroll bleed from modal UI to the page body. This component applies a\n * `lockscroll` class to the `document.documentElement` and\n * `document.scrollingElement` elements to stop the body from scrolling. When it\n * is present, the lock is applied.\n *\n * ```jsx\n * import { ScrollLock, Button } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyScrollLock = () => {\n * const [ isScrollLocked, setIsScrollLocked ] = useState( false );\n *\n * const toggleLock = () => {\n * setIsScrollLocked( ( locked ) => ! locked ) );\n * };\n *\n * return (\n * <div>\n * <Button variant=\"secondary\" onClick={ toggleLock }>\n * Toggle scroll lock\n * </Button>\n * { isScrollLocked && <ScrollLock /> }\n * <p>\n * Scroll locked:\n * <strong>{ isScrollLocked ? 'Yes' : 'No' }</strong>\n * </p>\n * </div>\n * );\n * };\n * ```\n */\nexport function ScrollLock(): null {\n\tuseEffect( () => {\n\t\tif ( lockCounter === 0 ) {\n\t\t\tsetLocked( true );\n\t\t}\n\n\t\t++lockCounter;\n\n\t\treturn () => {\n\t\t\tif ( lockCounter === 1 ) {\n\t\t\t\tsetLocked( false );\n\t\t\t}\n\n\t\t\t--lockCounter;\n\t\t};\n\t}, [] );\n\n\treturn null;\n}\n\nexport default ScrollLock;\n","/**\n * WordPress dependencies\n */\nimport { createContext } from '@wordpress/element';\nimport warning from '@wordpress/warning';\nimport { observableMap } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport type { SlotFillBubblesVirtuallyContext } from '../types';\n\nconst initialContextValue: SlotFillBubblesVirtuallyContext = {\n\tslots: observableMap(),\n\tfills: observableMap(),\n\tregisterSlot: () => {\n\t\twarning(\n\t\t\t'Components must be wrapped within `SlotFillProvider`. ' +\n\t\t\t\t'See https://developer.wordpress.org/block-editor/components/slot-fill/'\n\t\t);\n\t},\n\tupdateSlot: () => {},\n\tunregisterSlot: () => {},\n\tregisterFill: () => {},\n\tunregisterFill: () => {},\n\n\t// This helps the provider know if it's using the default context value or not.\n\tisDefault: true,\n};\n\nconst SlotFillContext = createContext( initialContextValue );\n\nexport default SlotFillContext;\n","/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\nimport { useObservableValue } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from './slot-fill-context';\nimport type { SlotKey } from '../types';\n\nexport default function useSlot( name: SlotKey ) {\n\tconst registry = useContext( SlotFillContext );\n\tconst slot = useObservableValue( registry.slots, name );\n\treturn { ...slot };\n}\n","/**\n * WordPress dependencies\n */\nimport { observableMap } from '@wordpress/compose';\nimport { createContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { BaseSlotFillContext } from './types';\n\nconst initialValue: BaseSlotFillContext = {\n\tslots: observableMap(),\n\tfills: observableMap(),\n\tregisterSlot: () => {},\n\tunregisterSlot: () => {},\n\tregisterFill: () => {},\n\tunregisterFill: () => {},\n\tupdateFill: () => {},\n};\nexport const SlotFillContext = createContext( initialValue );\n\nexport default SlotFillContext;\n","/**\n * WordPress dependencies\n */\nimport { useContext, useLayoutEffect, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from './context';\nimport type { FillComponentProps } from './types';\n\nexport default function Fill( { name, children }: FillComponentProps ) {\n\tconst registry = useContext( SlotFillContext );\n\tconst instanceRef = useRef( {} );\n\tconst childrenRef = useRef( children );\n\n\tuseLayoutEffect( () => {\n\t\tchildrenRef.current = children;\n\t}, [ children ] );\n\n\tuseLayoutEffect( () => {\n\t\tconst instance = instanceRef.current;\n\t\tregistry.registerFill( name, instance, childrenRef.current );\n\t\treturn () => registry.unregisterFill( name, instance );\n\t}, [ registry, name ] );\n\n\tuseLayoutEffect( () => {\n\t\tregistry.updateFill( name, instanceRef.current, childrenRef.current );\n\t} );\n\n\treturn null;\n}\n","/**\n * External dependencies\n */\nimport type { ReactElement, ReactNode, Key } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useObservableValue } from '@wordpress/compose';\nimport {\n\tuseContext,\n\tuseLayoutEffect,\n\tuseRef,\n\tChildren,\n\tcloneElement,\n\tisEmptyElement,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from './context';\nimport type { SlotComponentProps } from './types';\n\n/**\n * Whether the argument is a function.\n *\n * @param maybeFunc The argument to check.\n * @return True if the argument is a function, false otherwise.\n */\nfunction isFunction( maybeFunc: any ): maybeFunc is Function {\n\treturn typeof maybeFunc === 'function';\n}\n\nfunction addKeysToChildren( children: ReactNode ) {\n\treturn Children.map( children, ( child, childIndex ) => {\n\t\tif ( ! child || typeof child === 'string' ) {\n\t\t\treturn child;\n\t\t}\n\t\tlet childKey: Key = childIndex;\n\t\tif ( typeof child === 'object' && 'key' in child && child?.key ) {\n\t\t\tchildKey = child.key;\n\t\t}\n\n\t\treturn cloneElement( child as ReactElement, {\n\t\t\tkey: childKey,\n\t\t} );\n\t} );\n}\n\nfunction Slot( props: Omit< SlotComponentProps, 'bubblesVirtually' > ) {\n\tconst registry = useContext( SlotFillContext );\n\tconst instanceRef = useRef( {} );\n\n\tconst { name, children, fillProps = {} } = props;\n\n\tuseLayoutEffect( () => {\n\t\tconst instance = instanceRef.current;\n\t\tregistry.registerSlot( name, instance );\n\t\treturn () => registry.unregisterSlot( name, instance );\n\t}, [ registry, name ] );\n\n\tlet fills = useObservableValue( registry.fills, name ) ?? [];\n\tconst currentSlot = useObservableValue( registry.slots, name );\n\n\t// Fills should only be rendered in the currently registered instance of the slot.\n\tif ( currentSlot !== instanceRef.current ) {\n\t\tfills = [];\n\t}\n\n\tconst renderedFills = fills\n\t\t.map( ( fill ) => {\n\t\t\tconst fillChildren = isFunction( fill.children )\n\t\t\t\t? fill.children( fillProps )\n\t\t\t\t: fill.children;\n\t\t\treturn addKeysToChildren( fillChildren );\n\t\t} )\n\t\t.filter(\n\t\t\t// In some cases fills are rendered only when some conditions apply.\n\t\t\t// This ensures that we only use non-empty fills when rendering, i.e.,\n\t\t\t// it allows us to render wrappers only when the fills are actually present.\n\t\t\t( element ) => ! isEmptyElement( element )\n\t\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ isFunction( children )\n\t\t\t\t? children( renderedFills )\n\t\t\t\t: renderedFills }\n\t\t</>\n\t);\n}\n\nexport default Slot;\n","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","/**\n * External dependencies\n */\nimport { CacheProvider } from '@emotion/react';\nimport createCache from '@emotion/cache';\nimport * as uuid from 'uuid';\n\n/**\n * Internal dependencies\n */\nimport type { StyleProviderProps } from './types';\n\nconst uuidCache = new Set();\n// Use a weak map so that when the container is detached it's automatically\n// dereferenced to avoid memory leak.\nconst containerCacheMap = new WeakMap();\n\nconst memoizedCreateCacheWithContainer = ( container: HTMLElement ) => {\n\tif ( containerCacheMap.has( container ) ) {\n\t\treturn containerCacheMap.get( container );\n\t}\n\n\t// Emotion only accepts alphabetical and hyphenated keys so we just\n\t// strip the numbers from the UUID. It _should_ be fine.\n\tlet key = uuid.v4().replace( /[0-9]/g, '' );\n\twhile ( uuidCache.has( key ) ) {\n\t\tkey = uuid.v4().replace( /[0-9]/g, '' );\n\t}\n\tuuidCache.add( key );\n\n\tconst cache = createCache( { container, key } );\n\tcontainerCacheMap.set( container, cache );\n\treturn cache;\n};\n\nexport function StyleProvider( props: StyleProviderProps ) {\n\tconst { children, document } = props;\n\n\tif ( ! document ) {\n\t\treturn null;\n\t}\n\n\tconst cache = memoizedCreateCacheWithContainer( document.head );\n\n\treturn <CacheProvider value={ cache }>{ children }</CacheProvider>;\n}\n\nexport default StyleProvider;\n","/**\n * WordPress dependencies\n */\nimport { useObservableValue } from '@wordpress/compose';\nimport {\n\tuseContext,\n\tuseRef,\n\tuseEffect,\n\tcreatePortal,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from './slot-fill-context';\nimport StyleProvider from '../../style-provider';\nimport type { FillComponentProps } from '../types';\n\nexport default function Fill( { name, children }: FillComponentProps ) {\n\tconst registry = useContext( SlotFillContext );\n\tconst slot = useObservableValue( registry.slots, name );\n\tconst instanceRef = useRef( {} );\n\n\t// We register fills so we can keep track of their existence.\n\t// Slots can use the `useSlotFills` hook to know if there're already fills\n\t// registered so they can choose to render themselves or not.\n\tuseEffect( () => {\n\t\tconst instance = instanceRef.current;\n\t\tregistry.registerFill( name, instance );\n\t\treturn () => registry.unregisterFill( name, instance );\n\t}, [ registry, name ] );\n\n\tif ( ! slot || ! slot.ref.current ) {\n\t\treturn null;\n\t}\n\n\t// When using a `Fill`, the `children` will be rendered in the document of the\n\t// `Slot`. This means that we need to wrap the `children` in a `StyleProvider`\n\t// to make sure we're referencing the right document/iframe (instead of the\n\t// context of the `Fill`'s parent).\n\tconst wrappedChildren = (\n\t\t<StyleProvider document={ slot.ref.current.ownerDocument }>\n\t\t\t{ typeof children === 'function'\n\t\t\t\t? children( slot.fillProps ?? {} )\n\t\t\t\t: children }\n\t\t</StyleProvider>\n\t);\n\n\treturn createPortal( wrappedChildren, slot.ref.current );\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseRef,\n\tuseLayoutEffect,\n\tuseContext,\n\tforwardRef,\n} from '@wordpress/element';\nimport { useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { View } from '../../view';\nimport SlotFillContext from './slot-fill-context';\nimport type { WordPressComponentProps } from '../../context';\nimport type { SlotComponentProps } from '../types';\n\nfunction Slot(\n\tprops: WordPressComponentProps<\n\t\tOmit< SlotComponentProps, 'bubblesVirtually' >,\n\t\t'div'\n\t>,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst {\n\t\tname,\n\t\tfillProps = {},\n\t\tas,\n\t\t// `children` is not allowed. However, if it is passed,\n\t\t// it will be displayed as is, so remove `children`.\n\t\tchildren,\n\t\t...restProps\n\t} = props;\n\n\tconst registry = useContext( SlotFillContext );\n\n\tconst ref = useRef< HTMLElement >( null );\n\n\t// We don't want to unregister and register the slot whenever\n\t// `fillProps` change, which would cause the fill to be re-mounted. Instead,\n\t// we can just update the slot (see hook below).\n\t// For more context, see https://github.com/WordPress/gutenberg/pull/44403#discussion_r994415973\n\tconst fillPropsRef = useRef( fillProps );\n\tuseLayoutEffect( () => {\n\t\tfillPropsRef.current = fillProps;\n\t}, [ fillProps ] );\n\n\tuseLayoutEffect( () => {\n\t\tregistry.registerSlot( name, ref, fillPropsRef.current );\n\t\treturn () => registry.unregisterSlot( name, ref );\n\t}, [ registry, name ] );\n\n\tuseLayoutEffect( () => {\n\t\tregistry.updateSlot( name, ref, fillPropsRef.current );\n\t} );\n\n\treturn (\n\t\t<View\n\t\t\tas={ as }\n\t\t\tref={ useMergeRefs( [ forwardedRef, ref ] ) }\n\t\t\t{ ...restProps }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( Slot );\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"isShallowEqual\"];","/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport isShallowEqual from '@wordpress/is-shallow-equal';\nimport { observableMap } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from './slot-fill-context';\nimport type {\n\tSlotFillProviderProps,\n\tSlotFillBubblesVirtuallyContext,\n} from '../types';\n\nfunction createSlotRegistry(): SlotFillBubblesVirtuallyContext {\n\tconst slots: SlotFillBubblesVirtuallyContext[ 'slots' ] = observableMap();\n\tconst fills: SlotFillBubblesVirtuallyContext[ 'fills' ] = observableMap();\n\n\tconst registerSlot: SlotFillBubblesVirtuallyContext[ 'registerSlot' ] = (\n\t\tname,\n\t\tref,\n\t\tfillProps\n\t) => {\n\t\tslots.set( name, { ref, fillProps } );\n\t};\n\n\tconst unregisterSlot: SlotFillBubblesVirtuallyContext[ 'unregisterSlot' ] =\n\t\t( name, ref ) => {\n\t\t\tconst slot = slots.get( name );\n\t\t\tif ( ! slot ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Make sure we're not unregistering a slot registered by another element\n\t\t\t// See https://github.com/WordPress/gutenberg/pull/19242#issuecomment-590295412\n\t\t\tif ( slot.ref !== ref ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tslots.delete( name );\n\t\t};\n\n\tconst updateSlot: SlotFillBubblesVirtuallyContext[ 'updateSlot' ] = (\n\t\tname,\n\t\tref,\n\t\tfillProps\n\t) => {\n\t\tconst slot = slots.get( name );\n\t\tif ( ! slot ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( slot.ref !== ref ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isShallowEqual( slot.fillProps, fillProps ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tslots.set( name, { ref, fillProps } );\n\t};\n\n\tconst registerFill: SlotFillBubblesVirtuallyContext[ 'registerFill' ] = (\n\t\tname,\n\t\tref\n\t) => {\n\t\tfills.set( name, [ ...( fills.get( name ) || [] ), ref ] );\n\t};\n\n\tconst unregisterFill: SlotFillBubblesVirtuallyContext[ 'unregisterFill' ] =\n\t\t( name, ref ) => {\n\t\t\tconst fillsForName = fills.get( name );\n\t\t\tif ( ! fillsForName ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfills.set(\n\t\t\t\tname,\n\t\t\t\tfillsForName.filter( ( fillRef ) => fillRef !== ref )\n\t\t\t);\n\t\t};\n\n\treturn {\n\t\tslots,\n\t\tfills,\n\t\tregisterSlot,\n\t\tupdateSlot,\n\t\tunregisterSlot,\n\t\tregisterFill,\n\t\tunregisterFill,\n\t};\n}\n\nexport default function SlotFillProvider( {\n\tchildren,\n}: SlotFillProviderProps ) {\n\tconst [ registry ] = useState( createSlotRegistry );\n\treturn (\n\t\t<SlotFillContext.Provider value={ registry }>\n\t\t\t{ children }\n\t\t</SlotFillContext.Provider>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from './context';\nimport type {\n\tFillInstance,\n\tFillChildren,\n\tBaseSlotInstance,\n\tBaseSlotFillContext,\n\tSlotFillProviderProps,\n\tSlotKey,\n} from './types';\nimport { observableMap } from '@wordpress/compose';\n\nfunction createSlotRegistry(): BaseSlotFillContext {\n\tconst slots = observableMap< SlotKey, BaseSlotInstance >();\n\tconst fills = observableMap<\n\t\tSlotKey,\n\t\t{ instance: FillInstance; children: FillChildren }[]\n\t>();\n\n\tfunction registerSlot( name: SlotKey, instance: BaseSlotInstance ) {\n\t\tslots.set( name, instance );\n\t}\n\n\tfunction unregisterSlot( name: SlotKey, instance: BaseSlotInstance ) {\n\t\t// If a previous instance of a Slot by this name unmounts, do nothing,\n\t\t// as the slot and its fills should only be removed for the current\n\t\t// known instance.\n\t\tif ( slots.get( name ) !== instance ) {\n\t\t\treturn;\n\t\t}\n\n\t\tslots.delete( name );\n\t}\n\n\tfunction registerFill(\n\t\tname: SlotKey,\n\t\tinstance: FillInstance,\n\t\tchildren: FillChildren\n\t) {\n\t\tfills.set( name, [\n\t\t\t...( fills.get( name ) || [] ),\n\t\t\t{ instance, children },\n\t\t] );\n\t}\n\n\tfunction unregisterFill( name: SlotKey, instance: FillInstance ) {\n\t\tconst fillsForName = fills.get( name );\n\t\tif ( ! fillsForName ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfills.set(\n\t\t\tname,\n\t\t\tfillsForName.filter( ( fill ) => fill.instance !== instance )\n\t\t);\n\t}\n\n\tfunction updateFill(\n\t\tname: SlotKey,\n\t\tinstance: FillInstance,\n\t\tchildren: FillChildren\n\t) {\n\t\tconst fillsForName = fills.get( name );\n\t\tif ( ! fillsForName ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst fillForInstance = fillsForName.find(\n\t\t\t( f ) => f.instance === instance\n\t\t);\n\t\tif ( ! fillForInstance ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( fillForInstance.children === children ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfills.set(\n\t\t\tname,\n\t\t\tfillsForName.map( ( f ) => {\n\t\t\t\tif ( f.instance === instance ) {\n\t\t\t\t\t// Replace with new record with updated `children`.\n\t\t\t\t\treturn { instance, children };\n\t\t\t\t}\n\n\t\t\t\treturn f;\n\t\t\t} )\n\t\t);\n\t}\n\n\treturn {\n\t\tslots,\n\t\tfills,\n\t\tregisterSlot,\n\t\tunregisterSlot,\n\t\tregisterFill,\n\t\tunregisterFill,\n\t\tupdateFill,\n\t};\n}\n\nexport function SlotFillProvider( { children }: SlotFillProviderProps ) {\n\tconst [ contextValue ] = useState( createSlotRegistry );\n\treturn (\n\t\t<SlotFillContext.Provider value={ contextValue }>\n\t\t\t{ children }\n\t\t</SlotFillContext.Provider>\n\t);\n}\n\nexport default SlotFillProvider;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseFill from './fill';\nimport BaseSlot from './slot';\nimport BubblesVirtuallyFill from './bubbles-virtually/fill';\nimport BubblesVirtuallySlot from './bubbles-virtually/slot';\nimport BubblesVirtuallySlotFillProvider from './bubbles-virtually/slot-fill-provider';\nimport SlotFillProvider from './provider';\nimport SlotFillContext from './bubbles-virtually/slot-fill-context';\nimport type { WordPressComponentProps } from '../context';\n\nexport { default as useSlot } from './bubbles-virtually/use-slot';\nexport { default as useSlotFills } from './bubbles-virtually/use-slot-fills';\nimport type {\n\tDistributiveOmit,\n\tFillComponentProps,\n\tSlotComponentProps,\n\tSlotFillProviderProps,\n\tSlotKey,\n} from './types';\n\nexport function Fill( props: FillComponentProps ) {\n\t// We're adding both Fills here so they can register themselves before\n\t// their respective slot has been registered. Only the Fill that has a slot\n\t// will render. The other one will return null.\n\treturn (\n\t\t<>\n\t\t\t<BaseFill { ...props } />\n\t\t\t<BubblesVirtuallyFill { ...props } />\n\t\t</>\n\t);\n}\n\nexport function UnforwardedSlot(\n\tprops: SlotComponentProps &\n\t\tOmit< WordPressComponentProps< {}, 'div' >, 'className' >,\n\tref: ForwardedRef< any >\n) {\n\tconst { bubblesVirtually, ...restProps } = props;\n\tif ( bubblesVirtually ) {\n\t\treturn <BubblesVirtuallySlot { ...restProps } ref={ ref } />;\n\t}\n\treturn <BaseSlot { ...restProps } />;\n}\nexport const Slot = forwardRef( UnforwardedSlot );\n\nexport function Provider( {\n\tchildren,\n\tpassthrough = false,\n}: SlotFillProviderProps ) {\n\tconst parent = useContext( SlotFillContext );\n\tif ( ! parent.isDefault && passthrough ) {\n\t\treturn <>{ children }</>;\n\t}\n\treturn (\n\t\t<SlotFillProvider>\n\t\t\t<BubblesVirtuallySlotFillProvider>\n\t\t\t\t{ children }\n\t\t\t</BubblesVirtuallySlotFillProvider>\n\t\t</SlotFillProvider>\n\t);\n}\nProvider.displayName = 'SlotFillProvider';\n\nexport function createSlotFill( key: SlotKey ) {\n\tconst baseName = typeof key === 'symbol' ? key.description : key;\n\tconst FillComponent = ( props: Omit< FillComponentProps, 'name' > ) => (\n\t\t<Fill name={ key } { ...props } />\n\t);\n\tFillComponent.displayName = `${ baseName }Fill`;\n\n\tconst SlotComponent = (\n\t\tprops: DistributiveOmit< SlotComponentProps, 'name' >\n\t) => <Slot name={ key } { ...props } />;\n\tSlotComponent.displayName = `${ baseName }Slot`;\n\t/**\n\t * @deprecated 6.8.0\n\t * Please use `slotFill.name` instead of `slotFill.Slot.__unstableName`.\n\t */\n\tSlotComponent.__unstableName = key;\n\n\treturn {\n\t\tname: key,\n\t\tFill: FillComponent,\n\t\tSlot: SlotComponent,\n\t};\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef, SyntheticEvent, RefCallback } from 'react';\nimport clsx from 'clsx';\nimport {\n\tuseFloating,\n\tflip as flipMiddleware,\n\tshift as shiftMiddleware,\n\tlimitShift,\n\tautoUpdate,\n\tarrow,\n\toffset as offsetMiddleware,\n\tsize,\n} from '@floating-ui/react-dom';\nimport type { HTMLMotionProps, MotionProps } from 'framer-motion';\nimport { motion } from 'framer-motion';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseRef,\n\tuseLayoutEffect,\n\tforwardRef,\n\tcreateContext,\n\tuseContext,\n\tuseMemo,\n\tuseState,\n\tuseCallback,\n\tcreatePortal,\n} from '@wordpress/element';\nimport {\n\tuseReducedMotion,\n\tuseViewportMatch,\n\tuseMergeRefs,\n\t__experimentalUseDialog as useDialog,\n} from '@wordpress/compose';\nimport { close } from '@wordpress/icons';\nimport deprecated from '@wordpress/deprecated';\nimport { Path, SVG } from '@wordpress/primitives';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport ScrollLock from '../scroll-lock';\nimport { Slot, Fill, useSlot } from '../slot-fill';\nimport {\n\tcomputePopoverPosition,\n\tpositionToPlacement,\n\tplacementToMotionAnimationProps,\n\tgetReferenceElement,\n} from './utils';\nimport { contextConnect, useContextSystem } from '../context';\nimport type { WordPressComponentProps } from '../context';\nimport type {\n\tPopoverProps,\n\tPopoverAnchorRefReference,\n\tPopoverAnchorRefTopBottom,\n} from './types';\nimport { overlayMiddlewares } from './overlay-middlewares';\nimport { StyleProvider } from '../style-provider';\n\n/**\n * Name of slot in which popover should fill.\n *\n * @type {string}\n */\nexport const SLOT_NAME = 'Popover';\n\n// An SVG displaying a triangle facing down, filled with a solid\n// color and bordered in such a way to create an arrow-like effect.\n// Keeping the SVG's viewbox squared simplify the arrow positioning\n// calculations.\nconst ArrowTriangle = () => (\n\t<SVG\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\tviewBox=\"0 0 100 100\"\n\t\tclassName=\"components-popover__triangle\"\n\t\trole=\"presentation\"\n\t>\n\t\t<Path\n\t\t\tclassName=\"components-popover__triangle-bg\"\n\t\t\td=\"M 0 0 L 50 50 L 100 0\"\n\t\t/>\n\t\t<Path\n\t\t\tclassName=\"components-popover__triangle-border\"\n\t\t\td=\"M 0 0 L 50 50 L 100 0\"\n\t\t\tvectorEffect=\"non-scaling-stroke\"\n\t\t/>\n\t</SVG>\n);\n\nconst slotNameContext = createContext< string | undefined >( undefined );\n\nconst fallbackContainerClassname = 'components-popover__fallback-container';\nconst getPopoverFallbackContainer = () => {\n\tlet container = document.body.querySelector(\n\t\t'.' + fallbackContainerClassname\n\t);\n\tif ( ! container ) {\n\t\tcontainer = document.createElement( 'div' );\n\t\tcontainer.className = fallbackContainerClassname;\n\t\tdocument.body.append( container );\n\t}\n\n\treturn container;\n};\n\nconst UnforwardedPopover = (\n\tprops: Omit<\n\t\tWordPressComponentProps< PopoverProps, 'div', false >,\n\t\t// To avoid overlaps between the standard HTML attributes and the props\n\t\t// expected by `framer-motion`, omit all framer motion props from popover\n\t\t// props (except for `animate` and `children` which are re-defined in\n\t\t// `PopoverProps`, and `style` which is merged safely).\n\t\tkeyof Omit< MotionProps, 'animate' | 'children' | 'style' >\n\t>,\n\tforwardedRef: ForwardedRef< any >\n) => {\n\tconst {\n\t\tanimate = true,\n\t\theaderTitle,\n\t\tconstrainTabbing,\n\t\tonClose,\n\t\tchildren,\n\t\tclassName,\n\t\tnoArrow = true,\n\t\tposition,\n\t\tplacement: placementProp = 'bottom-start',\n\t\toffset: offsetProp = 0,\n\t\tfocusOnMount = 'firstElement',\n\t\tanchor,\n\t\texpandOnMobile,\n\t\tonFocusOutside,\n\t\t__unstableSlotName = SLOT_NAME,\n\t\tflip = true,\n\t\tresize = true,\n\t\tshift = false,\n\t\tinline = false,\n\t\tvariant,\n\t\tstyle: contentStyle,\n\n\t\t// Deprecated props\n\t\t__unstableForcePosition,\n\t\tanchorRef,\n\t\tanchorRect,\n\t\tgetAnchorRect,\n\t\tisAlternate,\n\n\t\t// Rest\n\t\t...contentProps\n\t} = useContextSystem( props, 'Popover' );\n\n\tlet computedFlipProp = flip;\n\tlet computedResizeProp = resize;\n\tif ( __unstableForcePosition !== undefined ) {\n\t\tdeprecated( '`__unstableForcePosition` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\tversion: '6.3',\n\t\t\talternative: '`flip={ false }` and `resize={ false }`',\n\t\t} );\n\n\t\t// Back-compat, set the `flip` and `resize` props\n\t\t// to `false` to replicate `__unstableForcePosition`.\n\t\tcomputedFlipProp = ! __unstableForcePosition;\n\t\tcomputedResizeProp = ! __unstableForcePosition;\n\t}\n\n\tif ( anchorRef !== undefined ) {\n\t\tdeprecated( '`anchorRef` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\talternative: '`anchor` prop',\n\t\t} );\n\t}\n\n\tif ( anchorRect !== undefined ) {\n\t\tdeprecated( '`anchorRect` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\talternative: '`anchor` prop',\n\t\t} );\n\t}\n\n\tif ( getAnchorRect !== undefined ) {\n\t\tdeprecated( '`getAnchorRect` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\talternative: '`anchor` prop',\n\t\t} );\n\t}\n\n\tconst computedVariant = isAlternate ? 'toolbar' : variant;\n\tif ( isAlternate !== undefined ) {\n\t\tdeprecated( '`isAlternate` prop in wp.components.Popover', {\n\t\t\tsince: '6.2',\n\t\t\talternative: \"`variant` prop with the `'toolbar'` value\",\n\t\t} );\n\t}\n\n\tconst arrowRef = useRef< HTMLElement | null >( null );\n\n\tconst [ fallbackReferenceElement, setFallbackReferenceElement ] =\n\t\tuseState< HTMLSpanElement | null >( null );\n\n\tconst anchorRefFallback: RefCallback< HTMLSpanElement > = useCallback(\n\t\t( node ) => {\n\t\t\tsetFallbackReferenceElement( node );\n\t\t},\n\t\t[]\n\t);\n\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isExpanded = expandOnMobile && isMobileViewport;\n\tconst hasArrow = ! isExpanded && ! noArrow;\n\tconst normalizedPlacementFromProps = position\n\t\t? positionToPlacement( position )\n\t\t: placementProp;\n\n\tconst middleware = [\n\t\t...( placementProp === 'overlay' ? overlayMiddlewares() : [] ),\n\t\toffsetMiddleware( offsetProp ),\n\t\tcomputedFlipProp && flipMiddleware(),\n\t\tcomputedResizeProp &&\n\t\t\tsize( {\n\t\t\t\tapply( sizeProps ) {\n\t\t\t\t\tconst { firstElementChild } = refs.floating.current ?? {};\n\n\t\t\t\t\t// Only HTMLElement instances have the `style` property.\n\t\t\t\t\tif ( ! ( firstElementChild instanceof HTMLElement ) ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Reduce the height of the popover to the available space.\n\t\t\t\t\tObject.assign( firstElementChild.style, {\n\t\t\t\t\t\tmaxHeight: `${ sizeProps.availableHeight }px`,\n\t\t\t\t\t\toverflow: 'auto',\n\t\t\t\t\t} );\n\t\t\t\t},\n\t\t\t} ),\n\t\tshift &&\n\t\t\tshiftMiddleware( {\n\t\t\t\tcrossAxis: true,\n\t\t\t\tlimiter: limitShift(),\n\t\t\t\tpadding: 1, // Necessary to avoid flickering at the edge of the viewport.\n\t\t\t} ),\n\t\tarrow( { element: arrowRef } ),\n\t];\n\tconst slotName = useContext( slotNameContext ) || __unstableSlotName;\n\tconst slot = useSlot( slotName );\n\n\tlet onDialogClose;\n\n\tif ( onClose || onFocusOutside ) {\n\t\tonDialogClose = ( type: string | undefined, event: SyntheticEvent ) => {\n\t\t\t// Ideally the popover should have just a single onClose prop and\n\t\t\t// not three props that potentially do the same thing.\n\t\t\tif ( type === 'focus-outside' && onFocusOutside ) {\n\t\t\t\tonFocusOutside( event );\n\t\t\t} else if ( onClose ) {\n\t\t\t\tonClose();\n\t\t\t}\n\t\t};\n\t}\n\n\tconst [ dialogRef, dialogProps ] = useDialog( {\n\t\tconstrainTabbing,\n\t\tfocusOnMount,\n\t\t__unstableOnClose: onDialogClose,\n\t\t// @ts-expect-error The __unstableOnClose property needs to be deprecated first (see https://github.com/WordPress/gutenberg/pull/27675)\n\t\tonClose: onDialogClose,\n\t} );\n\n\tconst {\n\t\t// Positioning coordinates\n\t\tx,\n\t\ty,\n\t\t// Object with \"regular\" refs to both \"reference\" and \"floating\"\n\t\trefs,\n\t\t// Type of CSS position property to use (absolute or fixed)\n\t\tstrategy,\n\t\tupdate,\n\t\tplacement: computedPlacement,\n\t\tmiddlewareData: { arrow: arrowData },\n\t} = useFloating( {\n\t\tplacement:\n\t\t\tnormalizedPlacementFromProps === 'overlay'\n\t\t\t\t? undefined\n\t\t\t\t: normalizedPlacementFromProps,\n\t\tmiddleware,\n\t\twhileElementsMounted: ( referenceParam, floatingParam, updateParam ) =>\n\t\t\tautoUpdate( referenceParam, floatingParam, updateParam, {\n\t\t\t\tlayoutShift: false,\n\t\t\t\tanimationFrame: true,\n\t\t\t} ),\n\t} );\n\n\tconst arrowCallbackRef = useCallback(\n\t\t( node: HTMLElement | null ) => {\n\t\t\tarrowRef.current = node;\n\t\t\tupdate();\n\t\t},\n\t\t[ update ]\n\t);\n\n\t// When any of the possible anchor \"sources\" change,\n\t// recompute the reference element (real or virtual) and its owner document.\n\n\tconst anchorRefTop = ( anchorRef as PopoverAnchorRefTopBottom | undefined )\n\t\t?.top;\n\tconst anchorRefBottom = (\n\t\tanchorRef as PopoverAnchorRefTopBottom | undefined\n\t )?.bottom;\n\tconst anchorRefStartContainer = ( anchorRef as Range | undefined )\n\t\t?.startContainer;\n\tconst anchorRefCurrent = ( anchorRef as PopoverAnchorRefReference )\n\t\t?.current;\n\n\tuseLayoutEffect( () => {\n\t\tconst resultingReferenceElement = getReferenceElement( {\n\t\t\tanchor,\n\t\t\tanchorRef,\n\t\t\tanchorRect,\n\t\t\tgetAnchorRect,\n\t\t\tfallbackReferenceElement,\n\t\t} );\n\n\t\trefs.setReference( resultingReferenceElement );\n\t}, [\n\t\tanchor,\n\t\tanchorRef,\n\t\tanchorRefTop,\n\t\tanchorRefBottom,\n\t\tanchorRefStartContainer,\n\t\tanchorRefCurrent,\n\t\tanchorRect,\n\t\tgetAnchorRect,\n\t\tfallbackReferenceElement,\n\t\trefs,\n\t] );\n\n\tconst mergedFloatingRef = useMergeRefs( [\n\t\trefs.setFloating,\n\t\tdialogRef,\n\t\tforwardedRef,\n\t] );\n\n\tconst style = isExpanded\n\t\t? undefined\n\t\t: {\n\t\t\t\tposition: strategy,\n\t\t\t\ttop: 0,\n\t\t\t\tleft: 0,\n\t\t\t\t// `x` and `y` are framer-motion specific props and are shorthands\n\t\t\t\t// for `translateX` and `translateY`. Currently it is not possible\n\t\t\t\t// to use `translateX` and `translateY` because those values would\n\t\t\t\t// be overridden by the return value of the\n\t\t\t\t// `placementToMotionAnimationProps` function.\n\t\t\t\tx: computePopoverPosition( x ),\n\t\t\t\ty: computePopoverPosition( y ),\n\t\t };\n\n\tconst shouldReduceMotion = useReducedMotion();\n\tconst shouldAnimate = animate && ! isExpanded && ! shouldReduceMotion;\n\n\tconst [ animationFinished, setAnimationFinished ] = useState( false );\n\n\tconst { style: motionInlineStyles, ...otherMotionProps } = useMemo(\n\t\t() => placementToMotionAnimationProps( computedPlacement ),\n\t\t[ computedPlacement ]\n\t);\n\n\tconst animationProps: HTMLMotionProps< 'div' > = shouldAnimate\n\t\t? {\n\t\t\t\tstyle: {\n\t\t\t\t\t...contentStyle,\n\t\t\t\t\t...motionInlineStyles,\n\t\t\t\t\t...style,\n\t\t\t\t},\n\t\t\t\tonAnimationComplete: () => setAnimationFinished( true ),\n\t\t\t\t...otherMotionProps,\n\t\t }\n\t\t: {\n\t\t\t\tanimate: false,\n\t\t\t\tstyle: {\n\t\t\t\t\t...contentStyle,\n\t\t\t\t\t...style,\n\t\t\t\t},\n\t\t };\n\n\t// When Floating UI has finished positioning and Framer Motion has finished animating\n\t// the popover, add the `is-positioned` class to signal that all transitions have finished.\n\tconst isPositioned =\n\t\t( ! shouldAnimate || animationFinished ) && x !== null && y !== null;\n\n\tlet content = (\n\t\t<motion.div\n\t\t\tclassName={ clsx( className, {\n\t\t\t\t'is-expanded': isExpanded,\n\t\t\t\t'is-positioned': isPositioned,\n\t\t\t\t// Use the 'alternate' classname for 'toolbar' variant for back compat.\n\t\t\t\t[ `is-${\n\t\t\t\t\tcomputedVariant === 'toolbar'\n\t\t\t\t\t\t? 'alternate'\n\t\t\t\t\t\t: computedVariant\n\t\t\t\t}` ]: computedVariant,\n\t\t\t} ) }\n\t\t\t{ ...animationProps }\n\t\t\t{ ...contentProps }\n\t\t\tref={ mergedFloatingRef }\n\t\t\t{ ...dialogProps }\n\t\t\ttabIndex={ -1 }\n\t\t>\n\t\t\t{ /* Prevents scroll on the document */ }\n\t\t\t{ isExpanded && <ScrollLock /> }\n\t\t\t{ isExpanded && (\n\t\t\t\t<div className=\"components-popover__header\">\n\t\t\t\t\t<span className=\"components-popover__header-title\">\n\t\t\t\t\t\t{ headerTitle }\n\t\t\t\t\t</span>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"components-popover__close\"\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\ticon={ close }\n\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\tlabel={ __( 'Close' ) }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className=\"components-popover__content\">{ children }</div>\n\t\t\t{ hasArrow && (\n\t\t\t\t<div\n\t\t\t\t\tref={ arrowCallbackRef }\n\t\t\t\t\tclassName={ [\n\t\t\t\t\t\t'components-popover__arrow',\n\t\t\t\t\t\t`is-${ computedPlacement.split( '-' )[ 0 ] }`,\n\t\t\t\t\t].join( ' ' ) }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tleft:\n\t\t\t\t\t\t\ttypeof arrowData?.x !== 'undefined' &&\n\t\t\t\t\t\t\tNumber.isFinite( arrowData.x )\n\t\t\t\t\t\t\t\t? `${ arrowData.x }px`\n\t\t\t\t\t\t\t\t: '',\n\t\t\t\t\t\ttop:\n\t\t\t\t\t\t\ttypeof arrowData?.y !== 'undefined' &&\n\t\t\t\t\t\t\tNumber.isFinite( arrowData.y )\n\t\t\t\t\t\t\t\t? `${ arrowData.y }px`\n\t\t\t\t\t\t\t\t: '',\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<ArrowTriangle />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</motion.div>\n\t);\n\n\tconst shouldRenderWithinSlot = slot.ref && ! inline;\n\tconst hasAnchor = anchorRef || anchorRect || anchor;\n\n\tif ( shouldRenderWithinSlot ) {\n\t\tcontent = <Fill name={ slotName }>{ content }</Fill>;\n\t} else if ( ! inline ) {\n\t\tcontent = createPortal(\n\t\t\t<StyleProvider document={ document }>{ content }</StyleProvider>,\n\t\t\tgetPopoverFallbackContainer()\n\t\t);\n\t}\n\n\tif ( hasAnchor ) {\n\t\treturn content;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<span ref={ anchorRefFallback } />\n\t\t\t{ content }\n\t\t</>\n\t);\n};\n\n/**\n * `Popover` renders its content in a floating modal. If no explicit anchor is passed via props, it anchors to its parent element by default.\n *\n * ```jsx\n * import { Button, Popover } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyPopover = () => {\n * \tconst [ isVisible, setIsVisible ] = useState( false );\n * \tconst toggleVisible = () => {\n * \t\tsetIsVisible( ( state ) => ! state );\n * \t};\n *\n * \treturn (\n * \t\t<Button variant=\"secondary\" onClick={ toggleVisible }>\n * \t\t\tToggle Popover!\n * \t\t\t{ isVisible && <Popover>Popover is toggled!</Popover> }\n * \t\t</Button>\n * \t);\n * };\n * ```\n *\n */\nexport const Popover = contextConnect( UnforwardedPopover, 'Popover' );\n\nfunction PopoverSlot(\n\t{ name = SLOT_NAME }: { name?: string },\n\tref: ForwardedRef< any >\n) {\n\treturn (\n\t\t<Slot\n\t\t\tbubblesVirtually\n\t\t\tname={ name }\n\t\t\tclassName=\"popover-slot\"\n\t\t\tref={ ref }\n\t\t/>\n\t);\n}\n\n// @ts-expect-error For Legacy Reasons\nPopover.Slot = forwardRef( PopoverSlot );\n// @ts-expect-error For Legacy Reasons\nPopover.__unstableSlotNameProvider = slotNameContext.Provider;\n\nexport default Popover;\n","/**\n * External dependencies\n */\nimport type { MiddlewareState } from '@floating-ui/react-dom';\nimport { size } from '@floating-ui/react-dom';\n\nexport function overlayMiddlewares() {\n\treturn [\n\t\t{\n\t\t\tname: 'overlay',\n\t\t\tfn( { rects }: MiddlewareState ) {\n\t\t\t\treturn rects.reference;\n\t\t\t},\n\t\t},\n\t\tsize( {\n\t\t\tapply( { rects, elements } ) {\n\t\t\t\tconst { firstElementChild } = elements.floating ?? {};\n\n\t\t\t\t// Only HTMLElement instances have the `style` property.\n\t\t\t\tif ( ! ( firstElementChild instanceof HTMLElement ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Reduce the height of the popover to the available space.\n\t\t\t\tObject.assign( firstElementChild.style, {\n\t\t\t\t\twidth: `${ rects.reference.width }px`,\n\t\t\t\t\theight: `${ rects.reference.height }px`,\n\t\t\t\t} );\n\t\t\t},\n\t\t} ),\n\t];\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseLayoutEffect,\n\tuseRef,\n\tuseEffect,\n\tuseState,\n} from '@wordpress/element';\nimport { useAnchor } from '@wordpress/rich-text';\nimport { useDebounce, useMergeRefs, useRefEffect } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\nimport { __, _n, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport getDefaultUseItems from './get-default-use-items';\nimport Button from '../button';\nimport Popover from '../popover';\nimport { VisuallyHidden } from '../visually-hidden';\nimport { createPortal } from 'react-dom';\nimport type { AutocompleterUIProps, KeyedOption, WPCompleter } from './types';\n\ntype ListBoxProps = {\n\titems: KeyedOption[];\n\tonSelect: ( option: KeyedOption ) => void;\n\tselectedIndex: number;\n\tinstanceId: number;\n\tlistBoxId: string | undefined;\n\tclassName?: string;\n\tComponent?: React.ElementType;\n};\n\nfunction ListBox( {\n\titems,\n\tonSelect,\n\tselectedIndex,\n\tinstanceId,\n\tlistBoxId,\n\tclassName,\n\tComponent = 'div',\n}: ListBoxProps ) {\n\treturn (\n\t\t<Component\n\t\t\tid={ listBoxId }\n\t\t\trole=\"listbox\"\n\t\t\tclassName=\"components-autocomplete__results\"\n\t\t>\n\t\t\t{ items.map( ( option, index ) => (\n\t\t\t\t<Button\n\t\t\t\t\tkey={ option.key }\n\t\t\t\t\tid={ `components-autocomplete-item-${ instanceId }-${ option.key }` }\n\t\t\t\t\trole=\"option\"\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\taria-selected={ index === selectedIndex }\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\tdisabled={ option.isDisabled }\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'components-autocomplete__result',\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Unused, for backwards compatibility.\n\t\t\t\t\t\t\t'is-selected': index === selectedIndex,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t\tvariant={ index === selectedIndex ? 'primary' : undefined }\n\t\t\t\t\tonClick={ () => onSelect( option ) }\n\t\t\t\t>\n\t\t\t\t\t{ option.label }\n\t\t\t\t</Button>\n\t\t\t) ) }\n\t\t</Component>\n\t);\n}\n\nexport function getAutoCompleterUI( autocompleter: WPCompleter ) {\n\tconst useItems =\n\t\tautocompleter.useItems ?? getDefaultUseItems( autocompleter );\n\n\tfunction AutocompleterUI( {\n\t\tfilterValue,\n\t\tinstanceId,\n\t\tlistBoxId,\n\t\tclassName,\n\t\tselectedIndex,\n\t\tonChangeOptions,\n\t\tonSelect,\n\t\tonReset,\n\t\treset,\n\t\tcontentRef,\n\t}: AutocompleterUIProps ) {\n\t\tconst [ items ] = useItems( filterValue );\n\t\tconst popoverAnchor = useAnchor( {\n\t\t\teditableContentElement: contentRef.current,\n\t\t} );\n\n\t\tconst [ needsA11yCompat, setNeedsA11yCompat ] = useState( false );\n\t\tconst popoverRef = useRef< HTMLElement >( null );\n\t\tconst popoverRefs = useMergeRefs( [\n\t\t\tpopoverRef,\n\t\t\tuseRefEffect(\n\t\t\t\t( node ) => {\n\t\t\t\t\tif ( ! contentRef.current ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// If the popover is rendered in a different document than\n\t\t\t\t\t// the content, we need to duplicate the options list in the\n\t\t\t\t\t// content document so that it's available to the screen\n\t\t\t\t\t// readers, which check the DOM ID based aria-* attributes.\n\t\t\t\t\tsetNeedsA11yCompat(\n\t\t\t\t\t\tnode.ownerDocument !== contentRef.current.ownerDocument\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\t[ contentRef ]\n\t\t\t),\n\t\t] );\n\n\t\tuseOnClickOutside( popoverRef, reset );\n\n\t\tconst debouncedSpeak = useDebounce( speak, 500 );\n\n\t\tfunction announce( options: Array< KeyedOption > ) {\n\t\t\tif ( ! debouncedSpeak ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( !! options.length ) {\n\t\t\t\tif ( filterValue ) {\n\t\t\t\t\tdebouncedSpeak(\n\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t/* translators: %d: number of results. */\n\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t'%d result found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t\t'%d results found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t\toptions.length\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\toptions.length\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'assertive'\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tdebouncedSpeak(\n\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t/* translators: %d: number of results. */\n\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t'Initial %d result loaded. Type to filter all available results. Use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t\t'Initial %d results loaded. Type to filter all available results. Use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t\toptions.length\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\toptions.length\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'assertive'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdebouncedSpeak( __( 'No results.' ), 'assertive' );\n\t\t\t}\n\t\t}\n\n\t\tuseLayoutEffect( () => {\n\t\t\tonChangeOptions( items );\n\t\t\tannounce( items );\n\t\t\t// We want to avoid introducing unexpected side effects.\n\t\t\t// See https://github.com/WordPress/gutenberg/pull/41820\n\t\t}, [ items ] );\n\n\t\tif ( items.length === 0 ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<Popover\n\t\t\t\t\tfocusOnMount={ false }\n\t\t\t\t\tonClose={ onReset }\n\t\t\t\t\tplacement=\"top-start\"\n\t\t\t\t\tclassName=\"components-autocomplete__popover\"\n\t\t\t\t\tanchor={ popoverAnchor }\n\t\t\t\t\tref={ popoverRefs }\n\t\t\t\t>\n\t\t\t\t\t<ListBox\n\t\t\t\t\t\titems={ items }\n\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\tselectedIndex={ selectedIndex }\n\t\t\t\t\t\tinstanceId={ instanceId }\n\t\t\t\t\t\tlistBoxId={ listBoxId }\n\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t/>\n\t\t\t\t</Popover>\n\t\t\t\t{ contentRef.current &&\n\t\t\t\t\tneedsA11yCompat &&\n\t\t\t\t\tcreatePortal(\n\t\t\t\t\t\t<ListBox\n\t\t\t\t\t\t\titems={ items }\n\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\tselectedIndex={ selectedIndex }\n\t\t\t\t\t\t\tinstanceId={ instanceId }\n\t\t\t\t\t\t\tlistBoxId={ listBoxId }\n\t\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\t\tComponent={ VisuallyHidden }\n\t\t\t\t\t\t/>,\n\t\t\t\t\t\tcontentRef.current.ownerDocument.body\n\t\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t}\n\n\treturn AutocompleterUI;\n}\n\nfunction useOnClickOutside(\n\tref: React.RefObject< HTMLElement >,\n\thandler: AutocompleterUIProps[ 'reset' ]\n) {\n\tuseEffect( () => {\n\t\tconst listener = ( event: MouseEvent | TouchEvent ) => {\n\t\t\t// Do nothing if clicking ref's element or descendent elements, or if the ref is not referencing an element\n\t\t\tif (\n\t\t\t\t! ref.current ||\n\t\t\t\tref.current.contains( event.target as Node )\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\thandler( event );\n\t\t};\n\t\tdocument.addEventListener( 'mousedown', listener );\n\t\tdocument.addEventListener( 'touchstart', listener );\n\t\treturn () => {\n\t\t\tdocument.removeEventListener( 'mousedown', listener );\n\t\t\tdocument.removeEventListener( 'touchstart', listener );\n\t\t};\n\t}, [ handler, ref ] );\n}\n","/**\n * External dependencies\n */\nimport removeAccents from 'remove-accents';\n\n/**\n * WordPress dependencies\n */\nimport { debounce } from '@wordpress/compose';\nimport { useLayoutEffect, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { escapeRegExp } from '../utils/strings';\nimport type { CancelablePromise, KeyedOption, WPCompleter } from './types';\n\nfunction filterOptions(\n\tsearch: RegExp,\n\toptions: Array< KeyedOption > = [],\n\tmaxResults = 10\n) {\n\tconst filtered = [];\n\tfor ( let i = 0; i < options.length; i++ ) {\n\t\tconst option = options[ i ];\n\n\t\t// Merge label into keywords.\n\t\tlet { keywords = [] } = option;\n\t\tif ( 'string' === typeof option.label ) {\n\t\t\tkeywords = [ ...keywords, option.label ];\n\t\t}\n\n\t\tconst isMatch = keywords.some( ( keyword ) =>\n\t\t\tsearch.test( removeAccents( keyword ) )\n\t\t);\n\t\tif ( ! isMatch ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tfiltered.push( option );\n\n\t\t// Abort early if max reached.\n\t\tif ( filtered.length === maxResults ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn filtered;\n}\n\nexport default function getDefaultUseItems( autocompleter: WPCompleter ) {\n\treturn ( filterValue: string ) => {\n\t\tconst [ items, setItems ] = useState< Array< KeyedOption > >( [] );\n\t\t/*\n\t\t * We support both synchronous and asynchronous retrieval of completer options\n\t\t * but internally treat all as async so we maintain a single, consistent code path.\n\t\t *\n\t\t * Because networks can be slow, and the internet is wonderfully unpredictable,\n\t\t * we don't want two promises updating the state at once. This ensures that only\n\t\t * the most recent promise will act on `optionsData`. This doesn't use the state\n\t\t * because `setState` is batched, and so there's no guarantee that setting\n\t\t * `activePromise` in the state would result in it actually being in `this.state`\n\t\t * before the promise resolves and we check to see if this is the active promise or not.\n\t\t */\n\t\tuseLayoutEffect( () => {\n\t\t\tconst { options, isDebounced } = autocompleter;\n\t\t\tconst loadOptions = debounce(\n\t\t\t\t() => {\n\t\t\t\t\tconst promise: CancelablePromise = Promise.resolve(\n\t\t\t\t\t\ttypeof options === 'function'\n\t\t\t\t\t\t\t? options( filterValue )\n\t\t\t\t\t\t\t: options\n\t\t\t\t\t).then( ( optionsData ) => {\n\t\t\t\t\t\tif ( promise.canceled ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst keyedOptions = optionsData.map(\n\t\t\t\t\t\t\t( optionData, optionIndex ) => ( {\n\t\t\t\t\t\t\t\tkey: `${ autocompleter.name }-${ optionIndex }`,\n\t\t\t\t\t\t\t\tvalue: optionData,\n\t\t\t\t\t\t\t\tlabel: autocompleter.getOptionLabel(\n\t\t\t\t\t\t\t\t\toptionData\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tkeywords: autocompleter.getOptionKeywords\n\t\t\t\t\t\t\t\t\t? autocompleter.getOptionKeywords(\n\t\t\t\t\t\t\t\t\t\t\toptionData\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t: [],\n\t\t\t\t\t\t\t\tisDisabled: autocompleter.isOptionDisabled\n\t\t\t\t\t\t\t\t\t? autocompleter.isOptionDisabled(\n\t\t\t\t\t\t\t\t\t\t\toptionData\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t: false,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// Create a regular expression to filter the options.\n\t\t\t\t\t\tconst search = new RegExp(\n\t\t\t\t\t\t\t'(?:\\\\b|\\\\s|^)' + escapeRegExp( filterValue ),\n\t\t\t\t\t\t\t'i'\n\t\t\t\t\t\t);\n\t\t\t\t\t\tsetItems( filterOptions( search, keyedOptions ) );\n\t\t\t\t\t} );\n\n\t\t\t\t\treturn promise;\n\t\t\t\t},\n\t\t\t\tisDebounced ? 250 : 0\n\t\t\t);\n\n\t\t\tconst promise = loadOptions();\n\n\t\t\treturn () => {\n\t\t\t\tloadOptions.cancel();\n\t\t\t\tif ( promise ) {\n\t\t\t\t\tpromise.canceled = true;\n\t\t\t\t}\n\t\t\t};\n\t\t}, [ filterValue ] );\n\n\t\treturn [ items ] as const;\n\t};\n}\n","/**\n * External dependencies\n */\nimport removeAccents from 'remove-accents';\n\n/**\n * WordPress dependencies\n */\nimport {\n\trenderToString,\n\tuseEffect,\n\tuseState,\n\tuseRef,\n\tuseMemo,\n} from '@wordpress/element';\nimport { useInstanceId, useMergeRefs, useRefEffect } from '@wordpress/compose';\nimport {\n\tcreate,\n\tslice,\n\tinsert,\n\tisCollapsed,\n\tgetTextContent,\n} from '@wordpress/rich-text';\nimport { speak } from '@wordpress/a11y';\nimport { isAppleOS } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { getAutoCompleterUI } from './autocompleter-ui';\nimport { escapeRegExp } from '../utils/strings';\nimport { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';\nimport type {\n\tAutocompleteProps,\n\tAutocompleterUIProps,\n\tInsertOption,\n\tKeyedOption,\n\tOptionCompletion,\n\tReplaceOption,\n\tUseAutocompleteProps,\n\tWPCompleter,\n} from './types';\n\nconst getNodeText = ( node: React.ReactNode ): string => {\n\tif ( node === null ) {\n\t\treturn '';\n\t}\n\n\tswitch ( typeof node ) {\n\t\tcase 'string':\n\t\tcase 'number':\n\t\t\treturn node.toString();\n\t\t\tbreak;\n\t\tcase 'boolean':\n\t\t\treturn '';\n\t\t\tbreak;\n\t\tcase 'object': {\n\t\t\tif ( node instanceof Array ) {\n\t\t\t\treturn node.map( getNodeText ).join( '' );\n\t\t\t}\n\t\t\tif ( 'props' in node ) {\n\t\t\t\treturn getNodeText( node.props.children );\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tdefault:\n\t\t\treturn '';\n\t}\n\n\treturn '';\n};\n\nconst EMPTY_FILTERED_OPTIONS: KeyedOption[] = [];\n\n// Used for generating the instance ID\nconst AUTOCOMPLETE_HOOK_REFERENCE = {};\n\nexport function useAutocomplete( {\n\trecord,\n\tonChange,\n\tonReplace,\n\tcompleters,\n\tcontentRef,\n}: UseAutocompleteProps ) {\n\tconst instanceId = useInstanceId( AUTOCOMPLETE_HOOK_REFERENCE );\n\tconst [ selectedIndex, setSelectedIndex ] = useState( 0 );\n\n\tconst [ filteredOptions, setFilteredOptions ] = useState<\n\t\tArray< KeyedOption >\n\t>( EMPTY_FILTERED_OPTIONS );\n\tconst [ filterValue, setFilterValue ] =\n\t\tuseState< AutocompleterUIProps[ 'filterValue' ] >( '' );\n\tconst [ autocompleter, setAutocompleter ] = useState< WPCompleter | null >(\n\t\tnull\n\t);\n\tconst [ AutocompleterUI, setAutocompleterUI ] = useState<\n\t\t( ( props: AutocompleterUIProps ) => JSX.Element | null ) | null\n\t>( null );\n\n\tconst backspacingRef = useRef( false );\n\n\tfunction insertCompletion( replacement: React.ReactNode ) {\n\t\tif ( autocompleter === null ) {\n\t\t\treturn;\n\t\t}\n\t\tconst end = record.start;\n\t\tconst start =\n\t\t\tend - autocompleter.triggerPrefix.length - filterValue.length;\n\t\tconst toInsert = create( { html: renderToString( replacement ) } );\n\n\t\tonChange( insert( record, toInsert, start, end ) );\n\t}\n\n\tfunction select( option: KeyedOption ) {\n\t\tconst { getOptionCompletion } = autocompleter || {};\n\n\t\tif ( option.isDisabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( getOptionCompletion ) {\n\t\t\tconst completion = getOptionCompletion( option.value, filterValue );\n\n\t\t\tconst isCompletionObject = (\n\t\t\t\tobj: OptionCompletion\n\t\t\t): obj is InsertOption | ReplaceOption => {\n\t\t\t\treturn (\n\t\t\t\t\tobj !== null &&\n\t\t\t\t\ttypeof obj === 'object' &&\n\t\t\t\t\t'action' in obj &&\n\t\t\t\t\tobj.action !== undefined &&\n\t\t\t\t\t'value' in obj &&\n\t\t\t\t\tobj.value !== undefined\n\t\t\t\t);\n\t\t\t};\n\n\t\t\tconst completionObject = isCompletionObject( completion )\n\t\t\t\t? completion\n\t\t\t\t: ( {\n\t\t\t\t\t\taction: 'insert-at-caret',\n\t\t\t\t\t\tvalue: completion,\n\t\t\t\t } as InsertOption );\n\n\t\t\tif ( 'replace' === completionObject.action ) {\n\t\t\t\tonReplace( [ completionObject.value ] );\n\t\t\t\t// When replacing, the component will unmount, so don't reset\n\t\t\t\t// state (below) on an unmounted component.\n\t\t\t\treturn;\n\t\t\t} else if ( 'insert-at-caret' === completionObject.action ) {\n\t\t\t\tinsertCompletion( completionObject.value );\n\t\t\t}\n\t\t}\n\n\t\t// Reset autocomplete state after insertion rather than before\n\t\t// so insertion events don't cause the completion menu to redisplay.\n\t\treset();\n\t}\n\n\tfunction reset() {\n\t\tsetSelectedIndex( 0 );\n\t\tsetFilteredOptions( EMPTY_FILTERED_OPTIONS );\n\t\tsetFilterValue( '' );\n\t\tsetAutocompleter( null );\n\t\tsetAutocompleterUI( null );\n\t}\n\n\t/**\n\t * Load options for an autocompleter.\n\t *\n\t * @param {Array} options\n\t */\n\tfunction onChangeOptions( options: Array< KeyedOption > ) {\n\t\tsetSelectedIndex(\n\t\t\toptions.length === filteredOptions.length ? selectedIndex : 0\n\t\t);\n\t\tsetFilteredOptions( options );\n\t}\n\n\tfunction handleKeyDown( event: KeyboardEvent ) {\n\t\tbackspacingRef.current = event.key === 'Backspace';\n\n\t\tif ( ! autocompleter ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( filteredOptions.length === 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( event.defaultPrevented ) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch ( event.key ) {\n\t\t\tcase 'ArrowUp': {\n\t\t\t\tconst newIndex =\n\t\t\t\t\t( selectedIndex === 0\n\t\t\t\t\t\t? filteredOptions.length\n\t\t\t\t\t\t: selectedIndex ) - 1;\n\t\t\t\tsetSelectedIndex( newIndex );\n\t\t\t\t// See the related PR as to why this is necessary: https://github.com/WordPress/gutenberg/pull/54902.\n\t\t\t\tif ( isAppleOS() ) {\n\t\t\t\t\tspeak(\n\t\t\t\t\t\tgetNodeText( filteredOptions[ newIndex ].label ),\n\t\t\t\t\t\t'assertive'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase 'ArrowDown': {\n\t\t\t\tconst newIndex = ( selectedIndex + 1 ) % filteredOptions.length;\n\t\t\t\tsetSelectedIndex( newIndex );\n\t\t\t\tif ( isAppleOS() ) {\n\t\t\t\t\tspeak(\n\t\t\t\t\t\tgetNodeText( filteredOptions[ newIndex ].label ),\n\t\t\t\t\t\t'assertive'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase 'Escape':\n\t\t\t\tsetAutocompleter( null );\n\t\t\t\tsetAutocompleterUI( null );\n\t\t\t\tevent.preventDefault();\n\t\t\t\tbreak;\n\n\t\t\tcase 'Enter':\n\t\t\t\tselect( filteredOptions[ selectedIndex ] );\n\t\t\t\tbreak;\n\n\t\t\tcase 'ArrowLeft':\n\t\t\tcase 'ArrowRight':\n\t\t\t\treset();\n\t\t\t\treturn;\n\n\t\t\tdefault:\n\t\t\t\treturn;\n\t\t}\n\n\t\t// Any handled key should prevent original behavior. This relies on\n\t\t// the early return in the default case.\n\t\tevent.preventDefault();\n\t}\n\n\t// textContent is a primitive (string), memoizing is not strictly necessary\n\t// but this is a preemptive performance improvement, since the autocompleter\n\t// is a potential bottleneck for the editor type metric.\n\tconst textContent = useMemo( () => {\n\t\tif ( isCollapsed( record ) ) {\n\t\t\treturn getTextContent( slice( record, 0 ) );\n\t\t}\n\t\treturn '';\n\t}, [ record ] );\n\n\tuseEffect( () => {\n\t\tif ( ! textContent ) {\n\t\t\tif ( autocompleter ) {\n\t\t\t\treset();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// Find the completer with the highest triggerPrefix index in the\n\t\t// textContent.\n\t\tconst completer = completers.reduce< WPCompleter | null >(\n\t\t\t( lastTrigger, currentCompleter ) => {\n\t\t\t\tconst triggerIndex = textContent.lastIndexOf(\n\t\t\t\t\tcurrentCompleter.triggerPrefix\n\t\t\t\t);\n\t\t\t\tconst lastTriggerIndex =\n\t\t\t\t\tlastTrigger !== null\n\t\t\t\t\t\t? textContent.lastIndexOf( lastTrigger.triggerPrefix )\n\t\t\t\t\t\t: -1;\n\n\t\t\t\treturn triggerIndex > lastTriggerIndex\n\t\t\t\t\t? currentCompleter\n\t\t\t\t\t: lastTrigger;\n\t\t\t},\n\t\t\tnull\n\t\t);\n\n\t\tif ( ! completer ) {\n\t\t\tif ( autocompleter ) {\n\t\t\t\treset();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tconst { allowContext, triggerPrefix } = completer;\n\t\tconst triggerIndex = textContent.lastIndexOf( triggerPrefix );\n\t\tconst textWithoutTrigger = textContent.slice(\n\t\t\ttriggerIndex + triggerPrefix.length\n\t\t);\n\n\t\tconst tooDistantFromTrigger = textWithoutTrigger.length > 50; // 50 chars seems to be a good limit.\n\t\t// This is a final barrier to prevent the effect from completing with\n\t\t// an extremely long string, which causes the editor to slow-down\n\t\t// significantly. This could happen, for example, if `matchingWhileBackspacing`\n\t\t// is true and one of the \"words\" end up being too long. If that's the case,\n\t\t// it will be caught by this guard.\n\t\tif ( tooDistantFromTrigger ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst mismatch = filteredOptions.length === 0;\n\t\tconst wordsFromTrigger = textWithoutTrigger.split( /\\s/ );\n\t\t// We need to allow the effect to run when not backspacing and if there\n\t\t// was a mismatch. i.e when typing a trigger + the match string or when\n\t\t// clicking in an existing trigger word on the page. We do that if we\n\t\t// detect that we have one word from trigger in the current textual context.\n\t\t//\n\t\t// Ex.: \"Some text @a\" <-- \"@a\" will be detected as the trigger word and\n\t\t// allow the effect to run. It will run until there's a mismatch.\n\t\tconst hasOneTriggerWord = wordsFromTrigger.length === 1;\n\t\t// This is used to allow the effect to run when backspacing and if\n\t\t// \"touching\" a word that \"belongs\" to a trigger. We consider a \"trigger\n\t\t// word\" any word up to the limit of 3 from the trigger character.\n\t\t// Anything beyond that is ignored if there's a mismatch. This allows\n\t\t// us to \"escape\" a mismatch when backspacing, but still imposing some\n\t\t// sane limits.\n\t\t//\n\t\t// Ex: \"Some text @marcelo sekkkk\" <--- \"kkkk\" caused a mismatch, but\n\t\t// if the user presses backspace here, it will show the completion popup again.\n\t\tconst matchingWhileBackspacing =\n\t\t\tbackspacingRef.current && wordsFromTrigger.length <= 3;\n\n\t\tif ( mismatch && ! ( matchingWhileBackspacing || hasOneTriggerWord ) ) {\n\t\t\tif ( autocompleter ) {\n\t\t\t\treset();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tconst textAfterSelection = getTextContent(\n\t\t\tslice( record, undefined, getTextContent( record ).length )\n\t\t);\n\n\t\tif (\n\t\t\tallowContext &&\n\t\t\t! allowContext(\n\t\t\t\ttextContent.slice( 0, triggerIndex ),\n\t\t\t\ttextAfterSelection\n\t\t\t)\n\t\t) {\n\t\t\tif ( autocompleter ) {\n\t\t\t\treset();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif (\n\t\t\t/^\\s/.test( textWithoutTrigger ) ||\n\t\t\t/\\s\\s+$/.test( textWithoutTrigger )\n\t\t) {\n\t\t\tif ( autocompleter ) {\n\t\t\t\treset();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! /[\\u0000-\\uFFFF]*$/.test( textWithoutTrigger ) ) {\n\t\t\tif ( autocompleter ) {\n\t\t\t\treset();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tconst safeTrigger = escapeRegExp( completer.triggerPrefix );\n\t\tconst text = removeAccents( textContent );\n\t\tconst match = text\n\t\t\t.slice( text.lastIndexOf( completer.triggerPrefix ) )\n\t\t\t.match( new RegExp( `${ safeTrigger }([\\u0000-\\uFFFF]*)$` ) );\n\t\tconst query = match && match[ 1 ];\n\n\t\tsetAutocompleter( completer );\n\t\tsetAutocompleterUI( () =>\n\t\t\tcompleter !== autocompleter\n\t\t\t\t? getAutoCompleterUI( completer )\n\t\t\t\t: AutocompleterUI\n\t\t);\n\t\tsetFilterValue( query === null ? '' : query );\n\t\t// We want to avoid introducing unexpected side effects.\n\t\t// See https://github.com/WordPress/gutenberg/pull/41820\n\t}, [ textContent ] );\n\n\tconst { key: selectedKey = '' } = filteredOptions[ selectedIndex ] || {};\n\tconst { className } = autocompleter || {};\n\tconst isExpanded = !! autocompleter && filteredOptions.length > 0;\n\tconst listBoxId = isExpanded\n\t\t? `components-autocomplete-listbox-${ instanceId }`\n\t\t: undefined;\n\tconst activeId = isExpanded\n\t\t? `components-autocomplete-item-${ instanceId }-${ selectedKey }`\n\t\t: null;\n\tconst hasSelection = record.start !== undefined;\n\n\treturn {\n\t\tlistBoxId,\n\t\tactiveId,\n\t\tonKeyDown: withIgnoreIMEEvents( handleKeyDown ),\n\t\tpopover: hasSelection && AutocompleterUI && (\n\t\t\t<AutocompleterUI\n\t\t\t\tclassName={ className }\n\t\t\t\tfilterValue={ filterValue }\n\t\t\t\tinstanceId={ instanceId }\n\t\t\t\tlistBoxId={ listBoxId }\n\t\t\t\tselectedIndex={ selectedIndex }\n\t\t\t\tonChangeOptions={ onChangeOptions }\n\t\t\t\tonSelect={ select }\n\t\t\t\tvalue={ record }\n\t\t\t\tcontentRef={ contentRef }\n\t\t\t\treset={ reset }\n\t\t\t/>\n\t\t),\n\t};\n}\n\nfunction useLastDifferentValue( value: UseAutocompleteProps[ 'record' ] ) {\n\tconst history = useRef< Set< typeof value > >( new Set() );\n\n\thistory.current.add( value );\n\n\t// Keep the history size to 2.\n\tif ( history.current.size > 2 ) {\n\t\thistory.current.delete( Array.from( history.current )[ 0 ] );\n\t}\n\n\treturn Array.from( history.current )[ 0 ];\n}\n\nexport function useAutocompleteProps( options: UseAutocompleteProps ) {\n\tconst ref = useRef< HTMLElement >( null );\n\tconst onKeyDownRef = useRef< ( event: KeyboardEvent ) => void >();\n\tconst { record } = options;\n\tconst previousRecord = useLastDifferentValue( record );\n\tconst { popover, listBoxId, activeId, onKeyDown } = useAutocomplete( {\n\t\t...options,\n\t\tcontentRef: ref,\n\t} );\n\tonKeyDownRef.current = onKeyDown;\n\n\tconst mergedRefs = useMergeRefs( [\n\t\tref,\n\t\tuseRefEffect( ( element: HTMLElement ) => {\n\t\t\tfunction _onKeyDown( event: KeyboardEvent ) {\n\t\t\t\tonKeyDownRef.current?.( event );\n\t\t\t}\n\t\t\telement.addEventListener( 'keydown', _onKeyDown );\n\t\t\treturn () => {\n\t\t\t\telement.removeEventListener( 'keydown', _onKeyDown );\n\t\t\t};\n\t\t}, [] ),\n\t] );\n\n\t// We only want to show the popover if the user has typed something.\n\tconst didUserInput = record.text !== previousRecord?.text;\n\n\tif ( ! didUserInput ) {\n\t\treturn { ref: mergedRefs };\n\t}\n\n\treturn {\n\t\tref: mergedRefs,\n\t\tchildren: popover,\n\t\t'aria-autocomplete': listBoxId ? 'list' : undefined,\n\t\t'aria-owns': listBoxId,\n\t\t'aria-activedescendant': activeId,\n\t};\n}\n\nexport default function Autocomplete( {\n\tchildren,\n\tisSelected,\n\t...options\n}: AutocompleteProps ) {\n\tconst { popover, ...props } = useAutocomplete( options );\n\treturn (\n\t\t<>\n\t\t\t{ children( props ) }\n\t\t\t{ isSelected && popover }\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '.';\nimport type { BaseControlProps } from './types';\n\n/**\n * Generate props for the `BaseControl` and the inner control itself.\n *\n * Namely, it takes care of generating a unique `id`, properly associating it with the `label` and `help` elements.\n *\n * @param props\n */\nexport function useBaseControlProps(\n\tprops: Omit< BaseControlProps, 'children' >\n) {\n\tconst { help, id: preferredId, ...restProps } = props;\n\n\tconst uniqueId = useInstanceId(\n\t\tBaseControl,\n\t\t'wp-components-base-control',\n\t\tpreferredId\n\t);\n\n\treturn {\n\t\tbaseControlProps: {\n\t\t\tid: uniqueId,\n\t\t\thelp,\n\t\t\t...restProps,\n\t\t},\n\t\tcontrolProps: {\n\t\t\tid: uniqueId,\n\t\t\t...( !! help ? { 'aria-describedby': `${ uniqueId }__help` } : {} ),\n\t\t},\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst link = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z\" />\n\t</SVG>\n);\n\nexport default link;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst linkOff = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z\" />\n\t</SVG>\n);\n\nexport default linkOff;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { COLORS, CONFIG, rtl } from '../utils';\n\nimport type { Border } from '../border-control/types';\nimport type { Borders } from './types';\n\nexport const borderBoxControl = css``;\n\nexport const linkedBorderControl = () => css`\n\tflex: 1;\n\t${ rtl( { marginRight: '24px' } )() }\n`;\n\nexport const wrapper = css`\n\tposition: relative;\n`;\n\nexport const borderBoxControlLinkedButton = (\n\tsize?: 'default' | '__unstable-large'\n) => {\n\treturn css`\n\t\tposition: absolute;\n\t\ttop: ${ size === '__unstable-large' ? '8px' : '3px' };\n\t\t${ rtl( { right: 0 } )() }\n\t\tline-height: 0;\n\t`;\n};\n\nconst borderBoxStyleWithFallback = ( border?: Border ) => {\n\tconst {\n\t\tcolor = COLORS.gray[ 200 ],\n\t\tstyle = 'solid',\n\t\twidth = CONFIG.borderWidth,\n\t} = border || {};\n\n\tconst clampedWidth =\n\t\twidth !== CONFIG.borderWidth ? `clamp(1px, ${ width }, 10px)` : width;\n\tconst hasVisibleBorder = ( !! width && width !== '0' ) || !! color;\n\tconst borderStyle = hasVisibleBorder ? style || 'solid' : style;\n\n\treturn `${ color } ${ borderStyle } ${ clampedWidth }`;\n};\n\nexport const borderBoxControlVisualizer = (\n\tborders?: Borders,\n\tsize?: 'default' | '__unstable-large'\n) => {\n\treturn css`\n\t\tposition: absolute;\n\t\ttop: ${ size === '__unstable-large' ? '20px' : '15px' };\n\t\tright: ${ size === '__unstable-large' ? '39px' : '29px' };\n\t\tbottom: ${ size === '__unstable-large' ? '20px' : '15px' };\n\t\tleft: ${ size === '__unstable-large' ? '39px' : '29px' };\n\t\tborder-top: ${ borderBoxStyleWithFallback( borders?.top ) };\n\t\tborder-bottom: ${ borderBoxStyleWithFallback( borders?.bottom ) };\n\t\t${ rtl( {\n\t\t\tborderLeft: borderBoxStyleWithFallback( borders?.left ),\n\t\t} )() }\n\t\t${ rtl( {\n\t\t\tborderRight: borderBoxStyleWithFallback( borders?.right ),\n\t\t} )() }\n\t`;\n};\n\nexport const borderBoxControlSplitControls = (\n\tsize?: 'default' | '__unstable-large'\n) => css`\n\tposition: relative;\n\tflex: 1;\n\twidth: ${ size === '__unstable-large' ? undefined : '80%' };\n`;\n\nexport const centeredBorderControl = css`\n\tgrid-column: span 2;\n\tmargin: 0 auto;\n`;\n\nexport const rightBorderControl = () => css`\n\t${ rtl( { marginLeft: 'auto' } )() }\n`;\n","/**\n * WordPress dependencies\n */\nimport { link, linkOff } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect } from '../../context';\nimport { useBorderBoxControlLinkedButton } from './hook';\n\nimport type { LinkedButtonProps } from '../types';\n\nconst BorderBoxControlLinkedButton = (\n\tprops: WordPressComponentProps< LinkedButtonProps, 'button' >,\n\tforwardedRef: React.ForwardedRef< any >\n) => {\n\tconst { className, isLinked, ...buttonProps } =\n\t\tuseBorderBoxControlLinkedButton( props );\n\tconst label = isLinked ? __( 'Unlink sides' ) : __( 'Link sides' );\n\n\treturn (\n\t\t<Button\n\t\t\t{ ...buttonProps }\n\t\t\tsize=\"small\"\n\t\t\ticon={ isLinked ? link : linkOff }\n\t\t\ticonSize={ 24 }\n\t\t\tlabel={ label }\n\t\t\tref={ forwardedRef }\n\t\t\tclassName={ className }\n\t\t/>\n\t);\n};\n\nconst ConnectedBorderBoxControlLinkedButton = contextConnect(\n\tBorderBoxControlLinkedButton,\n\t'BorderBoxControlLinkedButton'\n);\nexport default ConnectedBorderBoxControlLinkedButton;\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport * as styles from '../styles';\nimport type { WordPressComponentProps } from '../../context';\nimport { useContextSystem } from '../../context';\nimport { useCx } from '../../utils/hooks/use-cx';\n\nimport type { LinkedButtonProps } from '../types';\n\nexport function useBorderBoxControlLinkedButton(\n\tprops: WordPressComponentProps< LinkedButtonProps, 'button' >\n) {\n\tconst {\n\t\tclassName,\n\t\tsize = 'default',\n\t\t...otherProps\n\t} = useContextSystem( props, 'BorderBoxControlLinkedButton' );\n\n\t// Generate class names.\n\tconst cx = useCx();\n\tconst classes = useMemo( () => {\n\t\treturn cx( styles.borderBoxControlLinkedButton( size ), className );\n\t}, [ className, cx, size ] );\n\n\treturn { ...otherProps, className: classes };\n}\n","/**\n * Internal dependencies\n */\nimport { View } from '../../view';\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect } from '../../context';\nimport { useBorderBoxControlVisualizer } from './hook';\n\nimport type { VisualizerProps } from '../types';\n\nconst BorderBoxControlVisualizer = (\n\tprops: WordPressComponentProps< VisualizerProps, 'div' >,\n\tforwardedRef: React.ForwardedRef< any >\n) => {\n\tconst { value, ...otherProps } = useBorderBoxControlVisualizer( props );\n\n\treturn <View { ...otherProps } ref={ forwardedRef } />;\n};\n\nconst ConnectedBorderBoxControlVisualizer = contextConnect(\n\tBorderBoxControlVisualizer,\n\t'BorderBoxControlVisualizer'\n);\nexport default ConnectedBorderBoxControlVisualizer;\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport * as styles from '../styles';\nimport type { WordPressComponentProps } from '../../context';\nimport { useContextSystem } from '../../context';\nimport { useCx } from '../../utils';\n\nimport type { VisualizerProps } from '../types';\n\nexport function useBorderBoxControlVisualizer(\n\tprops: WordPressComponentProps< VisualizerProps, 'div' >\n) {\n\tconst {\n\t\tclassName,\n\t\tvalue,\n\t\tsize = 'default',\n\t\t...otherProps\n\t} = useContextSystem( props, 'BorderBoxControlVisualizer' );\n\n\t// Generate class names.\n\tconst cx = useCx();\n\tconst classes = useMemo( () => {\n\t\treturn cx(\n\t\t\tstyles.borderBoxControlVisualizer( value, size ),\n\t\t\tclassName\n\t\t);\n\t}, [ cx, className, value, size ] );\n\n\treturn { ...otherProps, className: classes, value };\n}\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst lineSolid = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M5 11.25h14v1.5H5z\" />\n\t</SVG>\n);\n\nexport default lineSolid;\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst lineDashed = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\td=\"M5 11.25h3v1.5H5v-1.5zm5.5 0h3v1.5h-3v-1.5zm8.5 0h-3v1.5h3v-1.5z\"\n\t\t\tclipRule=\"evenodd\"\n\t\t/>\n\t</SVG>\n);\n\nexport default lineDashed;\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst lineDotted = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\td=\"M5.25 11.25h1.5v1.5h-1.5v-1.5zm3 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5zm1.5 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5z\"\n\t\t\tclipRule=\"evenodd\"\n\t\t/>\n\t</SVG>\n);\n\nexport default lineDotted;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport { CONFIG, COLORS } from '../../utils';\nimport type { ToggleGroupControlProps } from '../types';\n\nexport const toggleGroupControl = ( {\n\tisBlock,\n\tisDeselectable,\n\tsize,\n}: Pick< ToggleGroupControlProps, 'isBlock' | 'isDeselectable' > & {\n\tsize: NonNullable< ToggleGroupControlProps[ 'size' ] >;\n} ) => css`\n\tbackground: ${ COLORS.ui.background };\n\tborder: 1px solid transparent;\n\tborder-radius: ${ CONFIG.radiusSmall };\n\tdisplay: inline-flex;\n\tmin-width: 0;\n\tposition: relative;\n\n\t${ toggleGroupControlSize( size ) }\n\t${ ! isDeselectable && enclosingBorders( isBlock ) }\n\n\t@media not ( prefers-reduced-motion ) {\n\t\t&[data-indicator-animated]::before {\n\t\t\ttransition-property: transform, border-radius;\n\t\t\ttransition-duration: 0.2s;\n\t\t\ttransition-timing-function: ease-out;\n\t\t}\n\t}\n\n\t&::before {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\tpointer-events: none;\n\t\tbackground: ${ COLORS.theme.foreground };\n\n\t\t// Windows High Contrast mode will show this outline, but not the box-shadow.\n\t\toutline: 2px solid transparent;\n\t\toutline-offset: -3px;\n\n\t\t/* Using a large value to avoid antialiasing rounding issues\n\t\t\twhen scaling in the transform, see: https://stackoverflow.com/a/52159123 */\n\t\t--antialiasing-factor: 100;\n\t\t/* Adjusting the border radius to match the scaling in the x axis. */\n\t\tborder-radius: calc(\n\t\t\t\t${ CONFIG.radiusXSmall } /\n\t\t\t\t\t(\n\t\t\t\t\t\tvar( --selected-width, 0 ) /\n\t\t\t\t\t\t\tvar( --antialiasing-factor )\n\t\t\t\t\t)\n\t\t\t) / ${ CONFIG.radiusXSmall };\n\t\tleft: -1px; // Correcting for border.\n\t\twidth: calc( var( --antialiasing-factor ) * 1px );\n\t\theight: calc( var( --selected-height, 0 ) * 1px );\n\t\ttransform-origin: left top;\n\t\ttransform: translateX( calc( var( --selected-left, 0 ) * 1px ) )\n\t\t\tscaleX(\n\t\t\t\tcalc(\n\t\t\t\t\tvar( --selected-width, 0 ) / var( --antialiasing-factor )\n\t\t\t\t)\n\t\t\t);\n\t}\n`;\n\nconst enclosingBorders = ( isBlock: ToggleGroupControlProps[ 'isBlock' ] ) => {\n\tconst enclosingBorder = css`\n\t\tborder-color: ${ COLORS.ui.border };\n\t`;\n\n\treturn css`\n\t\t${ isBlock && enclosingBorder }\n\n\t\t&:hover {\n\t\t\tborder-color: ${ COLORS.ui.borderHover };\n\t\t}\n\n\t\t&:focus-within {\n\t\t\tborder-color: ${ COLORS.ui.borderFocus };\n\t\t\tbox-shadow: ${ CONFIG.controlBoxShadowFocus };\n\t\t\tz-index: 1;\n\t\t\t// Windows High Contrast mode will show this outline, but not the box-shadow.\n\t\t\toutline: 2px solid transparent;\n\t\t\toutline-offset: -2px;\n\t\t}\n\t`;\n};\n\nexport const toggleGroupControlSize = (\n\tsize: NonNullable< ToggleGroupControlProps[ 'size' ] >\n) => {\n\tconst styles = {\n\t\tdefault: css`\n\t\t\tmin-height: 36px;\n\t\t\tpadding: 2px;\n\t\t`,\n\t\t'__unstable-large': css`\n\t\t\tmin-height: 40px;\n\t\t\tpadding: 3px;\n\t\t`,\n\t};\n\n\treturn styles[ size ];\n};\n\nexport const block = css`\n\tdisplay: flex;\n\twidth: 100%;\n`;\n\nexport const VisualLabelWrapper = styled.div`\n\t// Makes the inline label be the correct height, equivalent to setting line-height: 0\n\tdisplay: flex;\n`;\n","\"use client\";\nimport {\n createCompositeStore\n} from \"../__chunks/AJZ4BYF3.js\";\nimport \"../__chunks/CYQWQL4J.js\";\nimport \"../__chunks/7PRQYBBV.js\";\nimport {\n createStore\n} from \"../__chunks/BCALMBPZ.js\";\nimport {\n defaultValue\n} from \"../__chunks/PBFD2E7P.js\";\nimport \"../__chunks/DTR5TSDJ.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"../__chunks/3YLGPPWQ.js\";\n\n// src/radio/radio-store.ts\nfunction createRadioStore(_a = {}) {\n var props = __objRest(_a, []);\n var _a2;\n const syncState = (_a2 = props.store) == null ? void 0 : _a2.getState();\n const composite = createCompositeStore(__spreadProps(__spreadValues({}, props), {\n focusLoop: defaultValue(props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true)\n }));\n const initialState = __spreadProps(__spreadValues({}, composite.getState()), {\n value: defaultValue(\n props.value,\n syncState == null ? void 0 : syncState.value,\n props.defaultValue,\n null\n )\n });\n const radio = createStore(initialState, composite, props.store);\n return __spreadProps(__spreadValues(__spreadValues({}, composite), radio), {\n setValue: (value) => radio.setState(\"value\", value)\n });\n}\nexport {\n createRadioStore\n};\n","\"use client\";\nimport {\n useCompositeStoreProps\n} from \"./4CMBR7SL.js\";\nimport {\n useStore,\n useStoreProps\n} from \"./YV4JVR4I.js\";\n\n// src/radio/radio-store.ts\nimport * as Core from \"@ariakit/core/radio/radio-store\";\nfunction useRadioStoreProps(store, update, props) {\n store = useCompositeStoreProps(store, update, props);\n useStoreProps(store, props, \"value\", \"setValue\");\n return store;\n}\nfunction useRadioStore(props = {}) {\n const [store, update] = useStore(Core.createRadioStore, props);\n return useRadioStoreProps(store, update, props);\n}\n\nexport {\n useRadioStoreProps,\n useRadioStore\n};\n","\"use client\";\nimport {\n CompositeContextProvider,\n CompositeScopedContextProvider\n} from \"./P7GR5CS5.js\";\nimport {\n createStoreContext\n} from \"./LMDWO4NN.js\";\n\n// src/radio/radio-context.tsx\nvar ctx = createStoreContext(\n [CompositeContextProvider],\n [CompositeScopedContextProvider]\n);\nvar useRadioContext = ctx.useContext;\nvar useRadioScopedContext = ctx.useScopedContext;\nvar useRadioProviderContext = ctx.useProviderContext;\nvar RadioContextProvider = ctx.ContextProvider;\nvar RadioScopedContextProvider = ctx.ScopedContextProvider;\n\nexport {\n useRadioContext,\n useRadioScopedContext,\n useRadioProviderContext,\n RadioContextProvider,\n RadioScopedContextProvider\n};\n","\"use client\";\nimport {\n RadioScopedContextProvider,\n useRadioProviderContext\n} from \"../__chunks/UVUMR3WP.js\";\nimport {\n useComposite\n} from \"../__chunks/ITI7HKP4.js\";\nimport \"../__chunks/5VQZOHHZ.js\";\nimport \"../__chunks/P7GR5CS5.js\";\nimport \"../__chunks/VDHZ5F7K.js\";\nimport \"../__chunks/LVA2YJMS.js\";\nimport \"../__chunks/SWN3JYXT.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"../__chunks/LMDWO4NN.js\";\nimport {\n useWrapElement\n} from \"../__chunks/ABQUS43J.js\";\nimport \"../__chunks/SK3NAZA3.js\";\nimport {\n __objRest,\n __spreadValues\n} from \"../__chunks/3YLGPPWQ.js\";\n\n// src/radio/radio-group.tsx\nimport { invariant } from \"@ariakit/core/utils/misc\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"div\";\nvar useRadioGroup = createHook(\n function useRadioGroup2(_a) {\n var _b = _a, { store } = _b, props = __objRest(_b, [\"store\"]);\n const context = useRadioProviderContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"RadioGroup must receive a `store` prop or be wrapped in a RadioProvider component.\"\n );\n props = useWrapElement(\n props,\n (element) => /* @__PURE__ */ jsx(RadioScopedContextProvider, { value: store, children: element }),\n [store]\n );\n props = __spreadValues({\n role: \"radiogroup\"\n }, props);\n props = useComposite(__spreadValues({ store }, props));\n return props;\n }\n);\nvar RadioGroup = forwardRef(function RadioGroup2(props) {\n const htmlProps = useRadioGroup(props);\n return createElement(TagName, htmlProps);\n});\nexport {\n RadioGroup,\n useRadioGroup\n};\n","/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { ToggleGroupControlContextProps } from './types';\n\nconst ToggleGroupControlContext = createContext(\n\t{} as ToggleGroupControlContextProps\n);\nexport const useToggleGroupControlContext = () =>\n\tuseContext( ToggleGroupControlContext );\nexport default ToggleGroupControlContext;\n","/**\n * WordPress dependencies\n */\nimport { usePrevious } from '@wordpress/compose';\nimport { useEffect, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { ToggleGroupControlProps } from '../types';\n\ntype ValueProp = ToggleGroupControlProps[ 'value' ];\n\n/**\n * Used to determine, via an internal heuristics, whether an `undefined` value\n * received for the `value` prop should be interpreted as the component being\n * used in uncontrolled mode, or as an \"empty\" value for controlled mode.\n *\n * @param valueProp The received `value`\n */\nexport function useComputeControlledOrUncontrolledValue(\n\tvalueProp: ValueProp\n): { value: ValueProp; defaultValue: ValueProp } {\n\tconst isInitialRenderRef = useRef( true );\n\tconst prevValueProp = usePrevious( valueProp );\n\tconst prevIsControlledRef = useRef( false );\n\n\tuseEffect( () => {\n\t\tif ( isInitialRenderRef.current ) {\n\t\t\tisInitialRenderRef.current = false;\n\t\t}\n\t}, [] );\n\n\t// Assume the component is being used in controlled mode on the first re-render\n\t// that has a different `valueProp` from the previous render.\n\tconst isControlled =\n\t\tprevIsControlledRef.current ||\n\t\t( ! isInitialRenderRef.current && prevValueProp !== valueProp );\n\tuseEffect( () => {\n\t\tprevIsControlledRef.current = isControlled;\n\t}, [ isControlled ] );\n\n\tif ( isControlled ) {\n\t\t// When in controlled mode, use `''` instead of `undefined`\n\t\treturn { value: valueProp ?? '', defaultValue: undefined };\n\t}\n\n\t// When in uncontrolled mode, the `value` should be intended as the initial value\n\treturn { value: undefined, defaultValue: valueProp };\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef, useEffect, useMemo } from '@wordpress/element';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { View } from '../../view';\nimport type { WordPressComponentProps } from '../../context';\nimport ToggleGroupControlContext from '../context';\nimport { useComputeControlledOrUncontrolledValue } from './utils';\nimport type {\n\tToggleGroupControlMainControlProps,\n\tToggleGroupControlContextProps,\n} from '../types';\n\nfunction UnforwardedToggleGroupControlAsRadioGroup(\n\t{\n\t\tchildren,\n\t\tisAdaptiveWidth,\n\t\tlabel,\n\t\tonChange: onChangeProp,\n\t\tsize,\n\t\tvalue: valueProp,\n\t\tid: idProp,\n\t\tsetSelectedElement,\n\t\t...otherProps\n\t}: WordPressComponentProps<\n\t\tToggleGroupControlMainControlProps,\n\t\t'div',\n\t\tfalse\n\t>,\n\tforwardedRef: ForwardedRef< HTMLDivElement >\n) {\n\tconst generatedId = useInstanceId(\n\t\tToggleGroupControlAsRadioGroup,\n\t\t'toggle-group-control-as-radio-group'\n\t);\n\tconst baseId = idProp || generatedId;\n\n\t// Use a heuristic to understand if the component is being used in controlled\n\t// or uncontrolled mode, and consequently:\n\t// - when controlled, convert `undefined` values to `''` (ie. \"no value\")\n\t// - use the `value` prop as the `defaultValue` when uncontrolled\n\tconst { value, defaultValue } =\n\t\tuseComputeControlledOrUncontrolledValue( valueProp );\n\n\t// `useRadioStore`'s `setValue` prop can be called with `null`, while\n\t// the component's `onChange` prop only expects `undefined`\n\tconst wrappedOnChangeProp = onChangeProp\n\t\t? ( v: string | number | null ) => {\n\t\t\t\tonChangeProp( v ?? undefined );\n\t\t }\n\t\t: undefined;\n\n\tconst radio = Ariakit.useRadioStore( {\n\t\tdefaultValue,\n\t\tvalue,\n\t\tsetValue: wrappedOnChangeProp,\n\t\trtl: isRTL(),\n\t} );\n\n\tconst selectedValue = Ariakit.useStoreState( radio, 'value' );\n\tconst setValue = radio.setValue;\n\n\t// Ensures that the active id is also reset after the value is \"reset\" by the consumer.\n\tuseEffect( () => {\n\t\tif ( selectedValue === '' ) {\n\t\t\tradio.setActiveId( undefined );\n\t\t}\n\t}, [ radio, selectedValue ] );\n\n\tconst groupContextValue = useMemo(\n\t\t(): ToggleGroupControlContextProps => ( {\n\t\t\tactiveItemIsNotFirstItem: () =>\n\t\t\t\tradio.getState().activeId !== radio.first(),\n\t\t\tbaseId,\n\t\t\tisBlock: ! isAdaptiveWidth,\n\t\t\tsize,\n\t\t\t// @ts-expect-error - This is wrong and we should fix it.\n\t\t\tvalue: selectedValue,\n\t\t\t// @ts-expect-error - This is wrong and we should fix it.\n\t\t\tsetValue,\n\t\t\tsetSelectedElement,\n\t\t} ),\n\t\t[\n\t\t\tbaseId,\n\t\t\tisAdaptiveWidth,\n\t\t\tradio,\n\t\t\tselectedValue,\n\t\t\tsetSelectedElement,\n\t\t\tsetValue,\n\t\t\tsize,\n\t\t]\n\t);\n\n\treturn (\n\t\t<ToggleGroupControlContext.Provider value={ groupContextValue }>\n\t\t\t<Ariakit.RadioGroup\n\t\t\t\tstore={ radio }\n\t\t\t\taria-label={ label }\n\t\t\t\trender={ <View /> }\n\t\t\t\t{ ...otherProps }\n\t\t\t\tid={ baseId }\n\t\t\t\tref={ forwardedRef }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</Ariakit.RadioGroup>\n\t\t</ToggleGroupControlContext.Provider>\n\t);\n}\n\nexport const ToggleGroupControlAsRadioGroup = forwardRef(\n\tUnforwardedToggleGroupControlAsRadioGroup\n);\n","/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\n\ntype Props< T > = {\n\tdefaultValue?: T;\n\tvalue?: T;\n\tonChange?: ( value: T ) => void;\n};\n\n/**\n * Simplified and improved implementation of useControlledState.\n *\n * @param props\n * @param props.defaultValue\n * @param props.value\n * @param props.onChange\n * @return The controlled value and the value setter.\n */\nexport function useControlledValue< T >( {\n\tdefaultValue,\n\tonChange,\n\tvalue: valueProp,\n}: Props< T > ) {\n\tconst hasValue = typeof valueProp !== 'undefined';\n\tconst initialValue = hasValue ? valueProp : defaultValue;\n\tconst [ state, setState ] = useState( initialValue );\n\tconst value = hasValue ? valueProp : state;\n\n\tlet setValue: ( nextValue: T ) => void;\n\tif ( hasValue && typeof onChange === 'function' ) {\n\t\tsetValue = onChange;\n\t} else if ( ! hasValue && typeof onChange === 'function' ) {\n\t\tsetValue = ( nextValue ) => {\n\t\t\tonChange( nextValue );\n\t\t\tsetState( nextValue );\n\t\t};\n\t} else {\n\t\tsetValue = setState;\n\t}\n\n\treturn [ value, setValue as typeof setState ] as const;\n}\n","/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { View } from '../../view';\nimport { useControlledValue } from '../../utils';\nimport type { WordPressComponentProps } from '../../context';\nimport ToggleGroupControlContext from '../context';\nimport { useComputeControlledOrUncontrolledValue } from './utils';\nimport type {\n\tToggleGroupControlMainControlProps,\n\tToggleGroupControlContextProps,\n} from '../types';\n\nfunction UnforwardedToggleGroupControlAsButtonGroup(\n\t{\n\t\tchildren,\n\t\tisAdaptiveWidth,\n\t\tlabel,\n\t\tonChange,\n\t\tsize,\n\t\tvalue: valueProp,\n\t\tid: idProp,\n\t\tsetSelectedElement,\n\t\t...otherProps\n\t}: WordPressComponentProps<\n\t\tToggleGroupControlMainControlProps,\n\t\t'div',\n\t\tfalse\n\t>,\n\tforwardedRef: React.ForwardedRef< HTMLDivElement >\n) {\n\tconst generatedId = useInstanceId(\n\t\tToggleGroupControlAsButtonGroup,\n\t\t'toggle-group-control-as-button-group'\n\t);\n\tconst baseId = idProp || generatedId;\n\n\t// Use a heuristic to understand if the component is being used in controlled\n\t// or uncontrolled mode, and consequently:\n\t// - when controlled, convert `undefined` values to `''` (ie. \"no value\")\n\t// - use the `value` prop as the `defaultValue` when uncontrolled\n\tconst { value, defaultValue } =\n\t\tuseComputeControlledOrUncontrolledValue( valueProp );\n\n\tconst [ selectedValue, setSelectedValue ] = useControlledValue( {\n\t\tdefaultValue,\n\t\tvalue,\n\t\tonChange,\n\t} );\n\n\tconst groupContextValue = useMemo(\n\t\t(): ToggleGroupControlContextProps => ( {\n\t\t\tbaseId,\n\t\t\tvalue: selectedValue,\n\t\t\tsetValue: setSelectedValue,\n\t\t\tisBlock: ! isAdaptiveWidth,\n\t\t\tisDeselectable: true,\n\t\t\tsize,\n\t\t\tsetSelectedElement,\n\t\t} ),\n\t\t[\n\t\t\tbaseId,\n\t\t\tselectedValue,\n\t\t\tsetSelectedValue,\n\t\t\tisAdaptiveWidth,\n\t\t\tsize,\n\t\t\tsetSelectedElement,\n\t\t]\n\t);\n\n\treturn (\n\t\t<ToggleGroupControlContext.Provider value={ groupContextValue }>\n\t\t\t<View\n\t\t\t\taria-label={ label }\n\t\t\t\t{ ...otherProps }\n\t\t\t\tref={ forwardedRef }\n\t\t\t\trole=\"group\"\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</View>\n\t\t</ToggleGroupControlContext.Provider>\n\t);\n}\n\nexport const ToggleGroupControlAsButtonGroup = forwardRef(\n\tUnforwardedToggleGroupControlAsButtonGroup\n);\n","/* eslint-disable jsdoc/require-param */\n/**\n * WordPress dependencies\n */\nimport { useLayoutEffect, useRef, useState } from '@wordpress/element';\nimport { useEvent, useResizeObserver } from '@wordpress/compose';\n\n/**\n * The position and dimensions of an element, relative to its offset parent.\n */\nexport type ElementOffsetRect = {\n\t/**\n\t * The element the rect belongs to.\n\t */\n\telement: HTMLElement | undefined;\n\t/**\n\t * The distance from the top edge of the offset parent to the top edge of\n\t * the element.\n\t */\n\ttop: number;\n\t/**\n\t * The distance from the right edge of the offset parent to the right edge\n\t * of the element.\n\t */\n\tright: number;\n\t/**\n\t * The distance from the bottom edge of the offset parent to the bottom edge\n\t * of the element.\n\t */\n\tbottom: number;\n\t/**\n\t * The distance from the left edge of the offset parent to the left edge of\n\t * the element.\n\t */\n\tleft: number;\n\t/**\n\t * The width of the element.\n\t */\n\twidth: number;\n\t/**\n\t * The height of the element.\n\t */\n\theight: number;\n};\n\n/**\n * An `ElementOffsetRect` object with all values set to zero.\n */\nexport const NULL_ELEMENT_OFFSET_RECT = {\n\telement: undefined,\n\ttop: 0,\n\tright: 0,\n\tbottom: 0,\n\tleft: 0,\n\twidth: 0,\n\theight: 0,\n} satisfies ElementOffsetRect;\n\n/**\n * Returns the position and dimensions of an element, relative to its offset\n * parent, with subpixel precision. Values reflect the real measures before any\n * potential scaling distortions along the X and Y axes.\n *\n * Useful in contexts where plain `getBoundingClientRect` calls or `ResizeObserver`\n * entries are not suitable, such as when the element is transformed, and when\n * `element.offset<Top|Left|Width|Height>` methods are not precise enough.\n *\n * **Note:** in some contexts, like when the scale is 0, this method will fail\n * because it's impossible to calculate a scaling ratio. When that happens, it\n * will return `undefined`.\n */\nexport function getElementOffsetRect(\n\telement: HTMLElement\n): ElementOffsetRect | undefined {\n\t// Position and dimension values computed with `getBoundingClientRect` have\n\t// subpixel precision, but are affected by distortions since they represent\n\t// the \"real\" measures, or in other words, the actual final values as rendered\n\t// by the browser.\n\tconst rect = element.getBoundingClientRect();\n\tif ( rect.width === 0 || rect.height === 0 ) {\n\t\treturn;\n\t}\n\tconst offsetParent = element.offsetParent;\n\tconst offsetParentRect =\n\t\toffsetParent?.getBoundingClientRect() ?? NULL_ELEMENT_OFFSET_RECT;\n\tconst offsetParentScrollX = offsetParent?.scrollLeft ?? 0;\n\tconst offsetParentScrollY = offsetParent?.scrollTop ?? 0;\n\n\t// Computed widths and heights have subpixel precision, and are not affected\n\t// by distortions.\n\tconst computedWidth = parseFloat( getComputedStyle( element ).width );\n\tconst computedHeight = parseFloat( getComputedStyle( element ).height );\n\n\t// We can obtain the current scale factor for the element by comparing \"computed\"\n\t// dimensions with the \"real\" ones.\n\tconst scaleX = computedWidth / rect.width;\n\tconst scaleY = computedHeight / rect.height;\n\n\treturn {\n\t\telement,\n\t\t// To obtain the adjusted values for the position:\n\t\t// 1. Compute the element's position relative to the offset parent.\n\t\t// 2. Correct for the scale factor.\n\t\t// 3. Adjust for the scroll position of the offset parent.\n\t\ttop:\n\t\t\t( rect.top - offsetParentRect?.top ) * scaleY + offsetParentScrollY,\n\t\tright:\n\t\t\t( offsetParentRect?.right - rect.right ) * scaleX -\n\t\t\toffsetParentScrollX,\n\t\tbottom:\n\t\t\t( offsetParentRect?.bottom - rect.bottom ) * scaleY -\n\t\t\toffsetParentScrollY,\n\t\tleft:\n\t\t\t( rect.left - offsetParentRect?.left ) * scaleX +\n\t\t\toffsetParentScrollX,\n\t\t// Computed dimensions don't need any adjustments.\n\t\twidth: computedWidth,\n\t\theight: computedHeight,\n\t};\n}\n\nconst POLL_RATE = 100;\n\n/**\n * Tracks the position and dimensions of an element, relative to its offset\n * parent. The element can be changed dynamically.\n *\n * When no element is provided (`null` or `undefined`), the hook will return\n * a \"null\" rect, in which all values are `0` and `element` is `undefined`.\n *\n * **Note:** sometimes, the measurement will fail (see `getElementOffsetRect`'s\n * documentation for more details). When that happens, this hook will attempt\n * to measure again after a frame, and if that fails, it will poll every 100\n * milliseconds until it succeeds.\n */\nexport function useTrackElementOffsetRect(\n\ttargetElement: HTMLElement | undefined | null,\n\tdeps: unknown[] = []\n) {\n\tconst [ indicatorPosition, setIndicatorPosition ] =\n\t\tuseState< ElementOffsetRect >( NULL_ELEMENT_OFFSET_RECT );\n\tconst intervalRef = useRef< ReturnType< typeof setInterval > >();\n\n\tconst measure = useEvent( () => {\n\t\t// Check that the targetElement is still attached to the DOM, in case\n\t\t// it was removed since the last `measure` call.\n\t\tif ( targetElement && targetElement.isConnected ) {\n\t\t\tconst elementOffsetRect = getElementOffsetRect( targetElement );\n\t\t\tif ( elementOffsetRect ) {\n\t\t\t\tsetIndicatorPosition( elementOffsetRect );\n\t\t\t\tclearInterval( intervalRef.current );\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else {\n\t\t\tclearInterval( intervalRef.current );\n\t\t}\n\t\treturn false;\n\t} );\n\n\tconst setElement = useResizeObserver( () => {\n\t\tif ( ! measure() ) {\n\t\t\trequestAnimationFrame( () => {\n\t\t\t\tif ( ! measure() ) {\n\t\t\t\t\tintervalRef.current = setInterval( measure, POLL_RATE );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t} );\n\n\tuseLayoutEffect( () => {\n\t\tsetElement( targetElement );\n\t\tif ( ! targetElement ) {\n\t\t\tsetIndicatorPosition( NULL_ELEMENT_OFFSET_RECT );\n\t\t}\n\t}, [ setElement, targetElement ] );\n\n\t// Escape hatch to force a remeasurement when something else changes rather\n\t// than the target elements' ref or size (for example, the target element\n\t// can change its position within the tablist).\n\tuseLayoutEffect( () => {\n\t\tmeasure();\n\t\t// `measure` is a stable function, so it's safe to omit it from the deps array.\n\t\t// deps can't be statically analyzed by ESLint\n\t}, deps );\n\n\treturn indicatorPosition;\n}\n\n/* eslint-enable jsdoc/require-param */\n","/* eslint-disable jsdoc/require-param */\n\n/**\n * WordPress dependencies\n */\nimport { useEvent } from '@wordpress/compose';\nimport { useLayoutEffect } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport type { ElementOffsetRect } from '../element-rect';\nimport { useOnValueUpdate } from './use-on-value-update';\n\n/**\n * A utility used to animate something in a container component based on the \"offset\n * rect\" (position relative to the container and size) of a subelement. For example,\n * this is useful to render an indicator for the selected option of a component, and\n * to animate it when the selected option changes.\n *\n * Takes in a container element and the up-to-date \"offset rect\" of the target\n * subelement, obtained with `useTrackElementOffsetRect`. Then it does the following:\n *\n * - Adds CSS variables with rect information to the container, so that the indicator\n * can be rendered and animated with them. These are kept up-to-date, enabling CSS\n * transitions on change.\n * - Sets an attribute (`data-subelement-animated` by default) when the tracked\n * element changes, so that the target (e.g. the indicator) can be animated to its\n * new size and position.\n * - Removes the attribute when the animation is done.\n *\n * The need for the attribute is due to the fact that the rect might update in\n * situations other than when the tracked element changes, e.g. the tracked element\n * might be resized. In such cases, there is no need to animate the indicator, and\n * the change in size or position of the indicator needs to be reflected immediately.\n */\nexport function useAnimatedOffsetRect(\n\t/**\n\t * The container element.\n\t */\n\tcontainer: HTMLElement | undefined,\n\t/**\n\t * The rect of the tracked element.\n\t */\n\trect: ElementOffsetRect,\n\t{\n\t\tprefix = 'subelement',\n\t\tdataAttribute = `${ prefix }-animated`,\n\t\ttransitionEndFilter = () => true,\n\t\troundRect = false,\n\t}: {\n\t\t/**\n\t\t * The prefix used for the CSS variables, e.g. if `prefix` is `selected`, the\n\t\t * CSS variables will be `--selected-top`, `--selected-left`, etc.\n\t\t * @default 'subelement'\n\t\t */\n\t\tprefix?: string;\n\t\t/**\n\t\t * The name of the data attribute used to indicate that the animation is in\n\t\t * progress. The `data-` prefix is added automatically.\n\t\t *\n\t\t * For example, if `dataAttribute` is `indicator-animated`, the attribute will\n\t\t * be `data-indicator-animated`.\n\t\t * @default `${ prefix }-animated`\n\t\t */\n\t\tdataAttribute?: string;\n\t\t/**\n\t\t * A function that is called with the transition event and returns a boolean\n\t\t * indicating whether the animation should be stopped. The default is a function\n\t\t * that always returns `true`.\n\t\t *\n\t\t * For example, if the animated element is the `::before` pseudo-element, the\n\t\t * function can be written as `( event ) => event.pseudoElement === '::before'`.\n\t\t * @default () => true\n\t\t */\n\t\ttransitionEndFilter?: ( event: TransitionEvent ) => boolean;\n\t\t/**\n\t\t * Whether the `rect` measurements should be rounded down when applied\n\t\t * to the CSS variables. This can be useful to avoid blurry animations or\n\t\t * to avoid subpixel rendering issues.\n\t\t * @default false\n\t\t */\n\t\troundRect?: boolean;\n\t} = {}\n) {\n\tconst setProperties = useEvent( () => {\n\t\t( Object.keys( rect ) as Array< keyof typeof rect > ).forEach(\n\t\t\t( property ) =>\n\t\t\t\tproperty !== 'element' &&\n\t\t\t\tcontainer?.style.setProperty(\n\t\t\t\t\t`--${ prefix }-${ property }`,\n\t\t\t\t\tString(\n\t\t\t\t\t\troundRect\n\t\t\t\t\t\t\t? Math.floor( rect[ property ] )\n\t\t\t\t\t\t\t: rect[ property ]\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t);\n\t} );\n\tuseLayoutEffect( () => {\n\t\tsetProperties();\n\t}, [ rect, setProperties ] );\n\tuseOnValueUpdate( rect.element, ( { previousValue } ) => {\n\t\t// Only enable the animation when moving from one element to another.\n\t\tif ( rect.element && previousValue ) {\n\t\t\tcontainer?.setAttribute( `data-${ dataAttribute }`, '' );\n\t\t}\n\t} );\n\tuseLayoutEffect( () => {\n\t\tfunction onTransitionEnd( event: TransitionEvent ) {\n\t\t\tif ( transitionEndFilter( event ) ) {\n\t\t\t\tcontainer?.removeAttribute( `data-${ dataAttribute }` );\n\t\t\t}\n\t\t}\n\t\tcontainer?.addEventListener( 'transitionend', onTransitionEnd );\n\t\treturn () =>\n\t\t\tcontainer?.removeEventListener( 'transitionend', onTransitionEnd );\n\t}, [ dataAttribute, container, transitionEndFilter ] );\n}\n/* eslint-enable jsdoc/require-param */\n","/* eslint-disable jsdoc/require-param */\n/**\n * WordPress dependencies\n */\nimport { useEvent } from '@wordpress/compose';\nimport { useRef, useLayoutEffect } from '@wordpress/element';\n\n/**\n * Context object for the `onUpdate` callback of `useOnValueUpdate`.\n */\nexport type ValueUpdateContext< T > = {\n\tpreviousValue: T;\n};\n\n/**\n * Calls the `onUpdate` callback when the `value` changes.\n */\nexport function useOnValueUpdate< T >(\n\t/**\n\t * The value to watch for changes.\n\t */\n\tvalue: T,\n\t/**\n\t * Callback to fire when the value changes.\n\t */\n\tonUpdate: ( context: ValueUpdateContext< T > ) => void\n) {\n\tconst previousValueRef = useRef( value );\n\tconst updateCallbackEvent = useEvent( onUpdate );\n\tuseLayoutEffect( () => {\n\t\tif ( previousValueRef.current !== value ) {\n\t\t\tupdateCallbackEvent( {\n\t\t\t\tpreviousValue: previousValueRef.current,\n\t\t\t} );\n\t\t\tpreviousValueRef.current = value;\n\t\t}\n\t}, [ updateCallbackEvent, value ] );\n}\n/* eslint-enable jsdoc/require-param */\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect, useContextSystem } from '../../context';\nimport { useCx } from '../../utils/hooks';\nimport BaseControl from '../../base-control';\nimport type { ToggleGroupControlProps } from '../types';\nimport { VisualLabelWrapper } from './styles';\nimport * as styles from './styles';\nimport { ToggleGroupControlAsRadioGroup } from './as-radio-group';\nimport { ToggleGroupControlAsButtonGroup } from './as-button-group';\nimport { useTrackElementOffsetRect } from '../../utils/element-rect';\nimport { useMergeRefs } from '@wordpress/compose';\nimport { useAnimatedOffsetRect } from '../../utils/hooks/use-animated-offset-rect';\nimport { maybeWarnDeprecated36pxSize } from '../../utils/deprecated-36px-size';\n\nfunction UnconnectedToggleGroupControl(\n\tprops: WordPressComponentProps< ToggleGroupControlProps, 'div', false >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom = false,\n\t\t__next40pxDefaultSize = false,\n\t\t__shouldNotWarnDeprecated36pxSize,\n\t\tclassName,\n\t\tisAdaptiveWidth = false,\n\t\tisBlock = false,\n\t\tisDeselectable = false,\n\t\tlabel,\n\t\thideLabelFromVision = false,\n\t\thelp,\n\t\tonChange,\n\t\tsize = 'default',\n\t\tvalue,\n\t\tchildren,\n\t\t...otherProps\n\t} = useContextSystem( props, 'ToggleGroupControl' );\n\n\tconst normalizedSize =\n\t\t__next40pxDefaultSize && size === 'default' ? '__unstable-large' : size;\n\n\tconst [ selectedElement, setSelectedElement ] = useState< HTMLElement >();\n\tconst [ controlElement, setControlElement ] = useState< HTMLElement >();\n\tconst refs = useMergeRefs( [ setControlElement, forwardedRef ] );\n\tconst selectedRect = useTrackElementOffsetRect(\n\t\tvalue || value === 0 ? selectedElement : undefined\n\t);\n\tuseAnimatedOffsetRect( controlElement, selectedRect, {\n\t\tprefix: 'selected',\n\t\tdataAttribute: 'indicator-animated',\n\t\ttransitionEndFilter: ( event ) => event.pseudoElement === '::before',\n\t\troundRect: true,\n\t} );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tstyles.toggleGroupControl( {\n\t\t\t\t\tisBlock,\n\t\t\t\t\tisDeselectable,\n\t\t\t\t\tsize: normalizedSize,\n\t\t\t\t} ),\n\t\t\t\tisBlock && styles.block,\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ className, cx, isBlock, isDeselectable, normalizedSize ]\n\t);\n\n\tconst MainControl = isDeselectable\n\t\t? ToggleGroupControlAsButtonGroup\n\t\t: ToggleGroupControlAsRadioGroup;\n\n\tmaybeWarnDeprecated36pxSize( {\n\t\tcomponentName: 'ToggleGroupControl',\n\t\tsize,\n\t\t__next40pxDefaultSize,\n\t\t__shouldNotWarnDeprecated36pxSize,\n\t} );\n\n\treturn (\n\t\t<BaseControl\n\t\t\thelp={ help }\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t__associatedWPComponentName=\"ToggleGroupControl\"\n\t\t>\n\t\t\t{ ! hideLabelFromVision && (\n\t\t\t\t<VisualLabelWrapper>\n\t\t\t\t\t<BaseControl.VisualLabel>{ label }</BaseControl.VisualLabel>\n\t\t\t\t</VisualLabelWrapper>\n\t\t\t) }\n\t\t\t<MainControl\n\t\t\t\t{ ...otherProps }\n\t\t\t\tsetSelectedElement={ setSelectedElement }\n\t\t\t\tclassName={ classes }\n\t\t\t\tisAdaptiveWidth={ isAdaptiveWidth }\n\t\t\t\tlabel={ label }\n\t\t\t\tonChange={ onChange }\n\t\t\t\tref={ refs }\n\t\t\t\tsize={ normalizedSize }\n\t\t\t\tvalue={ value }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</MainControl>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * `ToggleGroupControl` is a form component that lets users choose options\n * represented in horizontal segments. To render options for this control use\n * `ToggleGroupControlOption` component.\n *\n * This component is intended for selecting a single persistent value from a set of options,\n * similar to a how a radio button group would work. If you simply want a toggle to switch between views,\n * use a `TabPanel` instead.\n *\n * Only use this control when you know for sure the labels of items inside won't\n * wrap. For items with longer labels, you can consider a `SelectControl` or a\n * `CustomSelectControl` component instead.\n *\n * ```jsx\n * import {\n * __experimentalToggleGroupControl as ToggleGroupControl,\n * __experimentalToggleGroupControlOption as ToggleGroupControlOption,\n * } from '@wordpress/components';\n *\n * function Example() {\n * return (\n * <ToggleGroupControl\n * label=\"my label\"\n * value=\"vertical\"\n * isBlock\n * __nextHasNoMarginBottom\n * __next40pxDefaultSize\n * >\n * <ToggleGroupControlOption value=\"horizontal\" label=\"Horizontal\" />\n * <ToggleGroupControlOption value=\"vertical\" label=\"Vertical\" />\n * </ToggleGroupControl>\n * );\n * }\n * ```\n */\nexport const ToggleGroupControl = contextConnect(\n\tUnconnectedToggleGroupControl,\n\t'ToggleGroupControl'\n);\n\nexport default ToggleGroupControl;\n","\"use client\";\nimport {\n useRadioContext\n} from \"./UVUMR3WP.js\";\nimport {\n useCompositeItem\n} from \"./P2CTZE2T.js\";\nimport {\n createElement,\n createHook,\n forwardRef,\n memo\n} from \"./LMDWO4NN.js\";\nimport {\n useStoreState\n} from \"./YV4JVR4I.js\";\nimport {\n useEvent,\n useForceUpdate,\n useId,\n useMergeRefs,\n useTagName\n} from \"./ABQUS43J.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/radio/radio.tsx\nimport {\n disabledFromProps,\n removeUndefinedValues\n} from \"@ariakit/core/utils/misc\";\nimport { useEffect, useRef } from \"react\";\nvar TagName = \"input\";\nfunction getIsChecked(value, storeValue) {\n if (storeValue === void 0) return;\n if (value != null && storeValue != null) {\n return storeValue === value;\n }\n return !!storeValue;\n}\nfunction isNativeRadio(tagName, type) {\n return tagName === \"input\" && (!type || type === \"radio\");\n}\nvar useRadio = createHook(function useRadio2(_a) {\n var _b = _a, {\n store,\n name,\n value,\n checked\n } = _b, props = __objRest(_b, [\n \"store\",\n \"name\",\n \"value\",\n \"checked\"\n ]);\n const context = useRadioContext();\n store = store || context;\n const id = useId(props.id);\n const ref = useRef(null);\n const isChecked = useStoreState(\n store,\n (state) => checked != null ? checked : getIsChecked(value, state == null ? void 0 : state.value)\n );\n useEffect(() => {\n if (!id) return;\n if (!isChecked) return;\n const isActiveItem = (store == null ? void 0 : store.getState().activeId) === id;\n if (isActiveItem) return;\n store == null ? void 0 : store.setActiveId(id);\n }, [store, isChecked, id]);\n const onChangeProp = props.onChange;\n const tagName = useTagName(ref, TagName);\n const nativeRadio = isNativeRadio(tagName, props.type);\n const disabled = disabledFromProps(props);\n const [propertyUpdated, schedulePropertyUpdate] = useForceUpdate();\n useEffect(() => {\n const element = ref.current;\n if (!element) return;\n if (nativeRadio) return;\n if (isChecked !== void 0) {\n element.checked = isChecked;\n }\n if (name !== void 0) {\n element.name = name;\n }\n if (value !== void 0) {\n element.value = `${value}`;\n }\n }, [propertyUpdated, nativeRadio, isChecked, name, value]);\n const onChange = useEvent((event) => {\n if (disabled) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n if ((store == null ? void 0 : store.getState().value) === value) return;\n if (!nativeRadio) {\n event.currentTarget.checked = true;\n schedulePropertyUpdate();\n }\n onChangeProp == null ? void 0 : onChangeProp(event);\n if (event.defaultPrevented) return;\n store == null ? void 0 : store.setValue(value);\n });\n const onClickProp = props.onClick;\n const onClick = useEvent((event) => {\n onClickProp == null ? void 0 : onClickProp(event);\n if (event.defaultPrevented) return;\n if (nativeRadio) return;\n onChange(event);\n });\n const onFocusProp = props.onFocus;\n const onFocus = useEvent((event) => {\n onFocusProp == null ? void 0 : onFocusProp(event);\n if (event.defaultPrevented) return;\n if (!nativeRadio) return;\n if (!store) return;\n const { moves, activeId } = store.getState();\n if (!moves) return;\n if (id && activeId !== id) return;\n onChange(event);\n });\n props = __spreadProps(__spreadValues({\n id,\n role: !nativeRadio ? \"radio\" : void 0,\n type: nativeRadio ? \"radio\" : void 0,\n \"aria-checked\": isChecked\n }, props), {\n ref: useMergeRefs(ref, props.ref),\n onChange,\n onClick,\n onFocus\n });\n props = useCompositeItem(__spreadValues({\n store,\n clickOnEnter: !nativeRadio\n }, props));\n return removeUndefinedValues(__spreadValues({\n name: nativeRadio ? name : void 0,\n value: nativeRadio ? value : void 0,\n checked: isChecked\n }, props));\n});\nvar Radio = memo(\n forwardRef(function Radio2(props) {\n const htmlProps = useRadio(props);\n return createElement(TagName, htmlProps);\n })\n);\n\nexport {\n useRadio,\n Radio\n};\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport { CONFIG, COLORS } from '../../utils';\nimport type {\n\tToggleGroupControlProps,\n\tToggleGroupControlOptionBaseProps,\n} from '../types';\n\nexport const LabelView = styled.div`\n\tdisplay: inline-flex;\n\tmax-width: 100%;\n\tmin-width: 0;\n\tposition: relative;\n`;\n\nexport const labelBlock = css`\n\tflex: 1;\n`;\n\nexport const buttonView = ( {\n\tisDeselectable,\n\tisIcon,\n\tisPressed,\n\tsize,\n}: Pick< ToggleGroupControlProps, 'isDeselectable' | 'size' > &\n\tPick< ToggleGroupControlOptionBaseProps, 'isIcon' > & {\n\t\tisPressed?: boolean;\n\t} ) => css`\n\talign-items: center;\n\tappearance: none;\n\tbackground: transparent;\n\tborder: none;\n\tborder-radius: ${ CONFIG.radiusXSmall };\n\tcolor: ${ COLORS.theme.gray[ 700 ] };\n\tfill: currentColor;\n\tcursor: pointer;\n\tdisplay: flex;\n\tfont-family: inherit;\n\theight: 100%;\n\tjustify-content: center;\n\tline-height: 100%;\n\toutline: none;\n\tpadding: 0 12px;\n\tposition: relative;\n\ttext-align: center;\n\t@media not ( prefers-reduced-motion ) {\n\t\ttransition:\n\t\t\tbackground ${ CONFIG.transitionDurationFast } linear,\n\t\t\tcolor ${ CONFIG.transitionDurationFast } linear,\n\t\t\tfont-weight 60ms linear;\n\t}\n\tuser-select: none;\n\twidth: 100%;\n\tz-index: 2;\n\n\t&::-moz-focus-inner {\n\t\tborder: 0;\n\t}\n\n\t&[disabled] {\n\t\topacity: 0.4;\n\t\tcursor: default;\n\t}\n\n\t&:active {\n\t\tbackground: ${ COLORS.ui.background };\n\t}\n\n\t${ isDeselectable && deselectable }\n\t${ isIcon && isIconStyles( { size } ) }\n\t${ isPressed && pressed }\n`;\n\nconst pressed = css`\n\tcolor: ${ COLORS.theme.foregroundInverted };\n\n\t&:active {\n\t\tbackground: transparent;\n\t}\n`;\n\nconst deselectable = css`\n\tcolor: ${ COLORS.theme.foreground };\n\n\t&:focus {\n\t\tbox-shadow:\n\t\t\tinset 0 0 0 1px ${ COLORS.ui.background },\n\t\t\t0 0 0 ${ CONFIG.borderWidthFocus } ${ COLORS.theme.accent };\n\t\toutline: 2px solid transparent;\n\t}\n`;\n\nexport const ButtonContentView = styled.div`\n\tdisplay: flex;\n\tfont-size: ${ CONFIG.fontSize };\n\tline-height: 1;\n`;\n\nconst isIconStyles = ( {\n\tsize = 'default',\n}: Pick< ToggleGroupControlProps, 'size' > ) => {\n\tconst iconButtonSizes = {\n\t\tdefault: '30px',\n\t\t'__unstable-large': '32px',\n\t};\n\n\treturn css`\n\t\tcolor: ${ COLORS.theme.foreground };\n\t\theight: ${ iconButtonSizes[ size ] };\n\t\taspect-ratio: 1;\n\t\tpadding-left: 0;\n\t\tpadding-right: 0;\n\t`;\n};\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { useLayoutEffect, useMemo, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect, useContextSystem } from '../../context';\nimport type {\n\tToggleGroupControlOptionBaseProps,\n\tWithToolTipProps,\n} from '../types';\nimport { useToggleGroupControlContext } from '../context';\nimport * as styles from './styles';\nimport { useCx } from '../../utils/hooks';\nimport Tooltip from '../../tooltip';\n\nconst { ButtonContentView, LabelView } = styles;\n\nconst WithToolTip = ( { showTooltip, text, children }: WithToolTipProps ) => {\n\tif ( showTooltip && text ) {\n\t\treturn (\n\t\t\t<Tooltip text={ text } placement=\"top\">\n\t\t\t\t{ children }\n\t\t\t</Tooltip>\n\t\t);\n\t}\n\treturn <>{ children }</>;\n};\n\nfunction ToggleGroupControlOptionBase(\n\tprops: Omit<\n\t\tWordPressComponentProps<\n\t\t\tToggleGroupControlOptionBaseProps,\n\t\t\t'button',\n\t\t\tfalse\n\t\t>,\n\t\t// the element's id is generated internally\n\t\t| 'id'\n\t\t// due to how the component works, only the `disabled` prop should be used\n\t\t| 'aria-disabled'\n\t>,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst toggleGroupControlContext = useToggleGroupControlContext();\n\n\tconst id = useInstanceId(\n\t\tToggleGroupControlOptionBase,\n\t\ttoggleGroupControlContext.baseId || 'toggle-group-control-option-base'\n\t);\n\n\tconst buttonProps = useContextSystem(\n\t\t{ ...props, id },\n\t\t'ToggleGroupControlOptionBase'\n\t);\n\n\tconst {\n\t\tisBlock = false,\n\t\tisDeselectable = false,\n\t\tsize = 'default',\n\t} = toggleGroupControlContext;\n\n\tconst {\n\t\tclassName,\n\t\tisIcon = false,\n\t\tvalue,\n\t\tchildren,\n\t\tshowTooltip = false,\n\t\tdisabled,\n\t\t...otherButtonProps\n\t} = buttonProps;\n\n\tconst isPressed = toggleGroupControlContext.value === value;\n\tconst cx = useCx();\n\tconst labelViewClasses = useMemo(\n\t\t() => cx( isBlock && styles.labelBlock ),\n\t\t[ cx, isBlock ]\n\t);\n\tconst itemClasses = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tstyles.buttonView( {\n\t\t\t\t\tisDeselectable,\n\t\t\t\t\tisIcon,\n\t\t\t\t\tisPressed,\n\t\t\t\t\tsize,\n\t\t\t\t} ),\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ cx, isDeselectable, isIcon, isPressed, size, className ]\n\t);\n\n\tconst buttonOnClick = () => {\n\t\tif ( isDeselectable && isPressed ) {\n\t\t\ttoggleGroupControlContext.setValue( undefined );\n\t\t} else {\n\t\t\ttoggleGroupControlContext.setValue( value );\n\t\t}\n\t};\n\n\tconst commonProps = {\n\t\t...otherButtonProps,\n\t\tclassName: itemClasses,\n\t\t'data-value': value,\n\t\tref: forwardedRef,\n\t};\n\n\tconst labelRef = useRef< HTMLDivElement | null >( null );\n\tuseLayoutEffect( () => {\n\t\tif ( isPressed && labelRef.current ) {\n\t\t\ttoggleGroupControlContext.setSelectedElement( labelRef.current );\n\t\t}\n\t}, [ isPressed, toggleGroupControlContext ] );\n\n\treturn (\n\t\t<LabelView ref={ labelRef } className={ labelViewClasses }>\n\t\t\t<WithToolTip\n\t\t\t\tshowTooltip={ showTooltip }\n\t\t\t\ttext={ otherButtonProps[ 'aria-label' ] }\n\t\t\t>\n\t\t\t\t{ isDeselectable ? (\n\t\t\t\t\t<button\n\t\t\t\t\t\t{ ...commonProps }\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\taria-pressed={ isPressed }\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tonClick={ buttonOnClick }\n\t\t\t\t\t>\n\t\t\t\t\t\t<ButtonContentView>{ children }</ButtonContentView>\n\t\t\t\t\t</button>\n\t\t\t\t) : (\n\t\t\t\t\t<Ariakit.Radio\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tonFocusVisible={ () => {\n\t\t\t\t\t\t\tconst selectedValueIsEmpty =\n\t\t\t\t\t\t\t\ttoggleGroupControlContext.value === null ||\n\t\t\t\t\t\t\t\ttoggleGroupControlContext.value === '';\n\n\t\t\t\t\t\t\t// Conditions ensure that the first visible focus to a radio group\n\t\t\t\t\t\t\t// without a selected option will not automatically select the option.\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t! selectedValueIsEmpty ||\n\t\t\t\t\t\t\t\ttoggleGroupControlContext.activeItemIsNotFirstItem?.()\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\ttoggleGroupControlContext.setValue( value );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t\trender={ <button type=\"button\" { ...commonProps } /> }\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t>\n\t\t\t\t\t\t<ButtonContentView>{ children }</ButtonContentView>\n\t\t\t\t\t</Ariakit.Radio>\n\t\t\t\t) }\n\t\t\t</WithToolTip>\n\t\t</LabelView>\n\t);\n}\n\n/**\n * `ToggleGroupControlOptionBase` is a form component and is meant to be used as an internal,\n * generic component for any children of `ToggleGroupControl`.\n *\n * @example\n * ```jsx\n * import {\n * __experimentalToggleGroupControl as ToggleGroupControl,\n * __experimentalToggleGroupControlOptionBase as ToggleGroupControlOptionBase,\n * } from '@wordpress/components';\n *\n * function Example() {\n * return (\n * <ToggleGroupControl label=\"my label\" value=\"vertical\" isBlock>\n * <ToggleGroupControlOption value=\"horizontal\" label=\"Horizontal\" />\n * <ToggleGroupControlOption value=\"vertical\" label=\"Vertical\" />\n * </ToggleGroupControl>\n * );\n * }\n * ```\n */\nconst ConnectedToggleGroupControlOptionBase = contextConnect(\n\tToggleGroupControlOptionBase,\n\t'ToggleGroupControlOptionBase'\n);\n\nexport default ConnectedToggleGroupControlOptionBase;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport type { ToggleGroupControlOptionIconProps } from '../types';\nimport { ToggleGroupControlOptionBase } from '../toggle-group-control-option-base';\nimport Icon from '../../icon';\n\nfunction UnforwardedToggleGroupControlOptionIcon(\n\tprops: WordPressComponentProps<\n\t\tToggleGroupControlOptionIconProps,\n\t\t'button',\n\t\tfalse\n\t>,\n\tref: ForwardedRef< any >\n) {\n\tconst { icon, label, ...restProps } = props;\n\treturn (\n\t\t<ToggleGroupControlOptionBase\n\t\t\t{ ...restProps }\n\t\t\tisIcon\n\t\t\taria-label={ label }\n\t\t\tshowTooltip\n\t\t\tref={ ref }\n\t\t>\n\t\t\t<Icon icon={ icon } />\n\t\t</ToggleGroupControlOptionBase>\n\t);\n}\n\n/**\n * `ToggleGroupControlOptionIcon` is a form component which is meant to be used as a\n * child of `ToggleGroupControl` and displays an icon.\n *\n * ```jsx\n *\n * import {\n *\t__experimentalToggleGroupControl as ToggleGroupControl,\n *\t__experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon,\n * from '@wordpress/components';\n * import { formatLowercase, formatUppercase } from '@wordpress/icons';\n *\n * function Example() {\n * return (\n * <ToggleGroupControl __nextHasNoMarginBottom __next40pxDefaultSize>\n * <ToggleGroupControlOptionIcon\n * value=\"uppercase\"\n * label=\"Uppercase\"\n * icon={ formatUppercase }\n * />\n * <ToggleGroupControlOptionIcon\n * value=\"lowercase\"\n * label=\"Lowercase\"\n * icon={ formatLowercase }\n * />\n * </ToggleGroupControl>\n * );\n * }\n * ```\n */\nexport const ToggleGroupControlOptionIcon = forwardRef(\n\tUnforwardedToggleGroupControlOptionIcon\n);\n\nexport default ToggleGroupControlOptionIcon;\n","/**\n * WordPress dependencies\n */\nimport { lineDashed, lineDotted, lineSolid } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect } from '../../context';\nimport type { StylePickerProps } from '../types';\nimport {\n\tToggleGroupControl,\n\tToggleGroupControlOptionIcon,\n} from '../../toggle-group-control';\n\nconst BORDER_STYLES = [\n\t{ label: __( 'Solid' ), icon: lineSolid, value: 'solid' },\n\t{ label: __( 'Dashed' ), icon: lineDashed, value: 'dashed' },\n\t{ label: __( 'Dotted' ), icon: lineDotted, value: 'dotted' },\n];\n\nfunction UnconnectedBorderControlStylePicker(\n\t{ onChange, ...restProps }: StylePickerProps,\n\tforwardedRef: React.ForwardedRef< any >\n) {\n\treturn (\n\t\t<ToggleGroupControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\t__next40pxDefaultSize\n\t\t\tref={ forwardedRef }\n\t\t\tisDeselectable\n\t\t\tonChange={ ( value ) => {\n\t\t\t\tonChange?.( value as string | undefined );\n\t\t\t} }\n\t\t\t{ ...restProps }\n\t\t>\n\t\t\t{ BORDER_STYLES.map( ( borderStyle ) => (\n\t\t\t\t<ToggleGroupControlOptionIcon\n\t\t\t\t\tkey={ borderStyle.value }\n\t\t\t\t\tvalue={ borderStyle.value }\n\t\t\t\t\ticon={ borderStyle.icon }\n\t\t\t\t\tlabel={ borderStyle.label }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</ToggleGroupControl>\n\t);\n}\n\nconst BorderControlStylePicker = contextConnect(\n\tUnconnectedBorderControlStylePicker,\n\t'BorderControlStylePicker'\n);\n\nexport default BorderControlStylePicker;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport type { ColorIndicatorProps } from './types';\n\nfunction UnforwardedColorIndicator(\n\tprops: WordPressComponentProps< ColorIndicatorProps, 'span', false >,\n\tforwardedRef: ForwardedRef< HTMLSpanElement >\n) {\n\tconst { className, colorValue, ...additionalProps } = props;\n\n\treturn (\n\t\t<span\n\t\t\tclassName={ clsx( 'component-color-indicator', className ) }\n\t\t\tstyle={ { background: colorValue } }\n\t\t\tref={ forwardedRef }\n\t\t\t{ ...additionalProps }\n\t\t/>\n\t);\n}\n\n/**\n * ColorIndicator is a React component that renders a specific color in a\n * circle. It's often used to summarize a collection of used colors in a child\n * component.\n *\n * ```jsx\n * import { ColorIndicator } from '@wordpress/components';\n *\n * const MyColorIndicator = () => <ColorIndicator colorValue=\"#0073aa\" />;\n * ```\n */\nexport const ColorIndicator = forwardRef( UnforwardedColorIndicator );\n\nexport default ColorIndicator;\n","var o=function(o){var t=o/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},t=function(t){return.2126*o(t.r)+.7152*o(t.g)+.0722*o(t.b)};export default function(o){o.prototype.luminance=function(){return o=t(this.rgba),void 0===(r=2)&&(r=0),void 0===n&&(n=Math.pow(10,r)),Math.round(n*o)/n+0;var o,r,n},o.prototype.contrast=function(r){void 0===r&&(r=\"#FFF\");var n,a,i,e,v,u,d,c=r instanceof o?r:new o(r);return e=this.rgba,v=c.toRgb(),u=t(e),d=t(v),n=u>d?(u+.05)/(d+.05):(d+.05)/(u+.05),void 0===(a=2)&&(a=0),void 0===i&&(i=Math.pow(10,a)),Math.floor(i*n)/i+0},o.prototype.isReadable=function(o,t){return void 0===o&&(o=\"#FFF\"),void 0===t&&(t={}),this.contrast(o)>=(e=void 0===(i=(r=t).size)?\"normal\":i,\"AAA\"===(a=void 0===(n=r.level)?\"AA\":n)&&\"normal\"===e?7:\"AA\"===a&&\"large\"===e?3:4.5);var r,n,a,i,e}}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useState } from '@wordpress/element';\nimport { useMergeRefs } from '@wordpress/compose';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, useContextSystem } from '../context';\nimport { useControlledValue } from '../utils/hooks';\nimport Popover from '../popover';\nimport type { DropdownProps, DropdownInternalContext } from './types';\n\nconst UnconnectedDropdown = (\n\tprops: DropdownProps,\n\tforwardedRef: ForwardedRef< any >\n) => {\n\tconst {\n\t\trenderContent,\n\t\trenderToggle,\n\t\tclassName,\n\t\tcontentClassName,\n\t\texpandOnMobile,\n\t\theaderTitle,\n\t\tfocusOnMount,\n\t\tpopoverProps,\n\t\tonClose,\n\t\tonToggle,\n\t\tstyle,\n\n\t\topen,\n\t\tdefaultOpen,\n\n\t\t// Deprecated props\n\t\tposition,\n\n\t\t// From context system\n\t\tvariant,\n\t} = useContextSystem< DropdownProps & DropdownInternalContext >(\n\t\tprops,\n\t\t'Dropdown'\n\t);\n\n\tif ( position !== undefined ) {\n\t\tdeprecated( '`position` prop in wp.components.Dropdown', {\n\t\t\tsince: '6.2',\n\t\t\talternative: '`popoverProps.placement` prop',\n\t\t\thint: 'Note that the `position` prop will override any values passed through the `popoverProps.placement` prop.',\n\t\t} );\n\t}\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ fallbackPopoverAnchor, setFallbackPopoverAnchor ] =\n\t\tuseState< HTMLDivElement | null >( null );\n\tconst containerRef = useRef< HTMLDivElement >();\n\n\tconst [ isOpen, setIsOpen ] = useControlledValue( {\n\t\tdefaultValue: defaultOpen,\n\t\tvalue: open,\n\t\tonChange: onToggle,\n\t} );\n\n\t/**\n\t * Closes the popover when focus leaves it unless the toggle was pressed or\n\t * focus has moved to a separate dialog. The former is to let the toggle\n\t * handle closing the popover and the latter is to preserve presence in\n\t * case a dialog has opened, allowing focus to return when it's dismissed.\n\t */\n\tfunction closeIfFocusOutside() {\n\t\tif ( ! containerRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { ownerDocument } = containerRef.current;\n\t\tconst dialog =\n\t\t\townerDocument?.activeElement?.closest( '[role=\"dialog\"]' );\n\t\tif (\n\t\t\t! containerRef.current.contains( ownerDocument.activeElement ) &&\n\t\t\t( ! dialog || dialog.contains( containerRef.current ) )\n\t\t) {\n\t\t\tclose();\n\t\t}\n\t}\n\n\tfunction close() {\n\t\tonClose?.();\n\t\tsetIsOpen( false );\n\t}\n\n\tconst args = {\n\t\tisOpen: !! isOpen,\n\t\tonToggle: () => setIsOpen( ! isOpen ),\n\t\tonClose: close,\n\t};\n\tconst popoverPropsHaveAnchor =\n\t\t!! popoverProps?.anchor ||\n\t\t// Note: `anchorRef`, `getAnchorRect` and `anchorRect` are deprecated and\n\t\t// be removed from `Popover` from WordPress 6.3\n\t\t!! popoverProps?.anchorRef ||\n\t\t!! popoverProps?.getAnchorRect ||\n\t\t!! popoverProps?.anchorRect;\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ className }\n\t\t\tref={ useMergeRefs( [\n\t\t\t\tcontainerRef,\n\t\t\t\tforwardedRef,\n\t\t\t\tsetFallbackPopoverAnchor,\n\t\t\t] ) }\n\t\t\t// Some UAs focus the closest focusable parent when the toggle is\n\t\t\t// clicked. Making this div focusable ensures such UAs will focus\n\t\t\t// it and `closeIfFocusOutside` can tell if the toggle was clicked.\n\t\t\ttabIndex={ -1 }\n\t\t\tstyle={ style }\n\t\t>\n\t\t\t{ renderToggle( args ) }\n\t\t\t{ isOpen && (\n\t\t\t\t<Popover\n\t\t\t\t\tposition={ position }\n\t\t\t\t\tonClose={ close }\n\t\t\t\t\tonFocusOutside={ closeIfFocusOutside }\n\t\t\t\t\texpandOnMobile={ expandOnMobile }\n\t\t\t\t\theaderTitle={ headerTitle }\n\t\t\t\t\tfocusOnMount={ focusOnMount }\n\t\t\t\t\t// This value is used to ensure that the dropdowns\n\t\t\t\t\t// align with the editor header by default.\n\t\t\t\t\toffset={ 13 }\n\t\t\t\t\tanchor={\n\t\t\t\t\t\t! popoverPropsHaveAnchor\n\t\t\t\t\t\t\t? fallbackPopoverAnchor\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t\tvariant={ variant }\n\t\t\t\t\t{ ...popoverProps }\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'components-dropdown__content',\n\t\t\t\t\t\tpopoverProps?.className,\n\t\t\t\t\t\tcontentClassName\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t{ renderContent( args ) }\n\t\t\t\t</Popover>\n\t\t\t) }\n\t\t</div>\n\t);\n};\n\n/**\n * Renders a button that opens a floating content modal when clicked.\n *\n * ```jsx\n * import { Button, Dropdown } from '@wordpress/components';\n *\n * const MyDropdown = () => (\n * <Dropdown\n * className=\"my-container-class-name\"\n * contentClassName=\"my-dropdown-content-classname\"\n * popoverProps={ { placement: 'bottom-start' } }\n * renderToggle={ ( { isOpen, onToggle } ) => (\n * <Button\n * variant=\"primary\"\n * onClick={ onToggle }\n * aria-expanded={ isOpen }\n * >\n * Toggle Dropdown!\n * </Button>\n * ) }\n * renderContent={ () => <div>This is the content of the dropdown.</div> }\n * />\n * );\n * ```\n */\nexport const Dropdown = contextConnect( UnconnectedDropdown, 'Dropdown' );\n\nexport default Dropdown;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { contextConnect, useContextSystem } from '../context';\nimport type { PrefixSuffixWrapperProps } from './types';\nimport { PrefixSuffixWrapper } from './styles/input-control-styles';\n\nfunction UnconnectedInputControlSuffixWrapper(\n\tprops: WordPressComponentProps< PrefixSuffixWrapperProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst derivedProps = useContextSystem( props, 'InputControlSuffixWrapper' );\n\n\treturn <PrefixSuffixWrapper { ...derivedProps } ref={ forwardedRef } />;\n}\n\n/**\n * A convenience wrapper for the `suffix` when you want to apply\n * standard padding in accordance with the size variant.\n *\n * ```jsx\n * import {\n * __experimentalInputControl as InputControl,\n * __experimentalInputControlSuffixWrapper as InputControlSuffixWrapper,\n * } from '@wordpress/components';\n *\n * <InputControl\n * suffix={<InputControlSuffixWrapper>%</InputControlSuffixWrapper>}\n * />\n * ```\n */\nexport const InputControlSuffixWrapper = contextConnect(\n\tUnconnectedInputControlSuffixWrapper,\n\t'InputControlSuffixWrapper'\n);\n\nexport default InputControlSuffixWrapper;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport { COLORS, rtl, CONFIG } from '../../utils';\nimport { space } from '../../utils/space';\nimport type { SelectControlProps } from '../types';\nimport InputControlSuffixWrapper from '../../input-control/input-suffix-wrapper';\nimport { fontSizeStyles } from '../../input-control/styles/input-control-styles';\nimport InputBase from '../../input-control/input-base';\n\ninterface SelectProps\n\textends Pick<\n\t\tSelectControlProps,\n\t\t'__next40pxDefaultSize' | 'disabled' | 'multiple' | 'variant'\n\t> {\n\t// Using `selectSize` instead of `size` to avoid a type conflict with the\n\t// `size` HTML attribute of the `select` element.\n\tselectSize?: SelectControlProps[ 'size' ];\n}\n\nconst disabledStyles = ( { disabled }: SelectProps ) => {\n\tif ( ! disabled ) {\n\t\treturn '';\n\t}\n\n\treturn css`\n\t\tcolor: ${ COLORS.ui.textDisabled };\n\t\tcursor: default;\n\t`;\n};\n\nconst inputBaseVariantStyles = ( { variant }: SelectProps ) => {\n\tif ( variant === 'minimal' ) {\n\t\treturn css`\n\t\t\tdisplay: inline-flex;\n\t\t`;\n\t}\n\n\treturn '';\n};\n\nexport const StyledInputBase = styled( InputBase )`\n\tcolor: ${ COLORS.theme.foreground };\n\tcursor: pointer;\n\n\t${ disabledStyles }\n\t${ inputBaseVariantStyles }\n`;\n\nconst sizeStyles = ( {\n\t__next40pxDefaultSize,\n\tmultiple,\n\tselectSize = 'default',\n}: SelectProps ) => {\n\tif ( multiple ) {\n\t\t// When `multiple`, just use the native browser styles\n\t\t// without setting explicit height.\n\t\treturn;\n\t}\n\n\tconst sizes = {\n\t\tdefault: {\n\t\t\theight: 40,\n\t\t\tminHeight: 40,\n\t\t\tpaddingTop: 0,\n\t\t\tpaddingBottom: 0,\n\t\t},\n\t\tsmall: {\n\t\t\theight: 24,\n\t\t\tminHeight: 24,\n\t\t\tpaddingTop: 0,\n\t\t\tpaddingBottom: 0,\n\t\t},\n\t\tcompact: {\n\t\t\theight: 32,\n\t\t\tminHeight: 32,\n\t\t\tpaddingTop: 0,\n\t\t\tpaddingBottom: 0,\n\t\t},\n\t\t'__unstable-large': {\n\t\t\theight: 40,\n\t\t\tminHeight: 40,\n\t\t\tpaddingTop: 0,\n\t\t\tpaddingBottom: 0,\n\t\t},\n\t};\n\n\tif ( ! __next40pxDefaultSize ) {\n\t\tsizes.default = sizes.compact;\n\t}\n\n\tconst style = sizes[ selectSize ] || sizes.default;\n\n\treturn css( style );\n};\n\nexport const chevronIconSize = 18;\n\nconst sizePaddings = ( {\n\t__next40pxDefaultSize,\n\tmultiple,\n\tselectSize = 'default',\n}: SelectProps ) => {\n\tconst padding = {\n\t\tdefault: CONFIG.controlPaddingX,\n\t\tsmall: CONFIG.controlPaddingXSmall,\n\t\tcompact: CONFIG.controlPaddingXSmall,\n\t\t'__unstable-large': CONFIG.controlPaddingX,\n\t};\n\n\tif ( ! __next40pxDefaultSize ) {\n\t\tpadding.default = padding.compact;\n\t}\n\n\tconst selectedPadding = padding[ selectSize ] || padding.default;\n\n\treturn rtl( {\n\t\tpaddingLeft: selectedPadding,\n\t\tpaddingRight: selectedPadding + chevronIconSize,\n\t\t...( multiple\n\t\t\t? {\n\t\t\t\t\tpaddingTop: selectedPadding,\n\t\t\t\t\tpaddingBottom: selectedPadding,\n\t\t\t }\n\t\t\t: {} ),\n\t} );\n};\n\nconst overflowStyles = ( { multiple }: SelectProps ) => {\n\treturn {\n\t\toverflow: multiple ? 'auto' : 'hidden',\n\t};\n};\n\nconst variantStyles = ( { variant }: SelectProps ) => {\n\tif ( variant === 'minimal' ) {\n\t\treturn css( {\n\t\t\tfieldSizing: 'content',\n\t\t} );\n\t}\n\n\treturn '';\n};\n\n// TODO: Resolve need to use &&& to increase specificity\n// https://github.com/WordPress/gutenberg/issues/18483\n\nexport const Select = styled.select< SelectProps >`\n\t&&& {\n\t\tappearance: none;\n\t\tbackground: transparent;\n\t\tbox-sizing: border-box;\n\t\tborder: none;\n\t\tbox-shadow: none !important;\n\t\tcolor: currentColor; // Overrides hover/focus styles in forms.css\n\t\tcursor: inherit;\n\t\tdisplay: block;\n\t\tfont-family: inherit;\n\t\tmargin: 0;\n\t\twidth: 100%;\n\t\tmax-width: none;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\n\t\t${ fontSizeStyles };\n\t\t${ sizeStyles };\n\t\t${ sizePaddings };\n\t\t${ overflowStyles }\n\t\t${ variantStyles }\n\t}\n`;\n\nexport const DownArrowWrapper = styled.div`\n\tmargin-inline-end: ${ space( -1 ) }; // optically adjust the icon\n\tline-height: 0;\n\n\tpath {\n\t\tfill: currentColor;\n\t}\n`;\n\nexport const InputControlSuffixWrapperWithClickThrough = styled(\n\tInputControlSuffixWrapper\n)`\n\tposition: absolute;\n\tpointer-events: none;\n\n\t${ rtl( { right: 0 } ) }\n`;\n","/**\n * WordPress dependencies\n */\nimport { cloneElement, forwardRef } from '@wordpress/element';\n\n/** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */\n\n/**\n * Return an SVG icon.\n *\n * @param {IconProps} props icon is the SVG component to render\n * size is a number specifying the icon size in pixels\n * Other props will be passed to wrapped SVG component\n * @param {import('react').ForwardedRef<HTMLElement>} ref The forwarded ref to the SVG element.\n *\n * @return {JSX.Element} Icon component\n */\nfunction Icon( { icon, size = 24, ...props }, ref ) {\n\treturn cloneElement( icon, {\n\t\twidth: size,\n\t\theight: size,\n\t\t...props,\n\t\tref,\n\t} );\n}\n\nexport default forwardRef( Icon );\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst chevronDown = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z\" />\n\t</SVG>\n);\n\nexport default chevronDown;\n","/**\n * WordPress dependencies\n */\nimport { chevronDown, Icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport {\n\tchevronIconSize,\n\tDownArrowWrapper,\n\tInputControlSuffixWrapperWithClickThrough,\n} from './styles/select-control-styles';\n\nconst SelectControlChevronDown = () => {\n\treturn (\n\t\t<InputControlSuffixWrapperWithClickThrough>\n\t\t\t<DownArrowWrapper>\n\t\t\t\t<Icon icon={ chevronDown } size={ chevronIconSize } />\n\t\t\t</DownArrowWrapper>\n\t\t</InputControlSuffixWrapperWithClickThrough>\n\t);\n};\n\nexport default SelectControlChevronDown;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport { Select, StyledInputBase } from './styles/select-control-styles';\nimport type { WordPressComponentProps } from '../context';\nimport type { SelectControlProps } from './types';\nimport SelectControlChevronDown from './chevron-down';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\n\nfunction useUniqueId( idProp?: string ) {\n\tconst instanceId = useInstanceId( SelectControl );\n\tconst id = `inspector-select-control-${ instanceId }`;\n\n\treturn idProp || id;\n}\n\nfunction SelectOptions( {\n\toptions,\n}: {\n\toptions: NonNullable< SelectControlProps[ 'options' ] >;\n} ) {\n\treturn options.map( ( { id, label, value, ...optionProps }, index ) => {\n\t\tconst key = id || `${ label }-${ value }-${ index }`;\n\n\t\treturn (\n\t\t\t<option key={ key } value={ value } { ...optionProps }>\n\t\t\t\t{ label }\n\t\t\t</option>\n\t\t);\n\t} );\n}\n\nfunction UnforwardedSelectControl< V extends string >(\n\tprops: WordPressComponentProps< SelectControlProps< V >, 'select', false >,\n\tref: React.ForwardedRef< HTMLSelectElement >\n) {\n\tconst {\n\t\tclassName,\n\t\tdisabled = false,\n\t\thelp,\n\t\thideLabelFromVision,\n\t\tid: idProp,\n\t\tlabel,\n\t\tmultiple = false,\n\t\tonChange,\n\t\toptions = [],\n\t\tsize = 'default',\n\t\tvalue: valueProp,\n\t\tlabelPosition = 'top',\n\t\tchildren,\n\t\tprefix,\n\t\tsuffix,\n\t\tvariant = 'default',\n\t\t__next40pxDefaultSize = false,\n\t\t__nextHasNoMarginBottom = false,\n\t\t__shouldNotWarnDeprecated36pxSize,\n\t\t...restProps\n\t} = useDeprecated36pxDefaultSizeProp( props );\n\tconst id = useUniqueId( idProp );\n\tconst helpId = help ? `${ id }__help` : undefined;\n\n\t// Disable reason: A select with an onchange throws a warning.\n\tif ( ! options?.length && ! children ) {\n\t\treturn null;\n\t}\n\n\tconst handleOnChange = (\n\t\tevent: React.ChangeEvent< HTMLSelectElement >\n\t) => {\n\t\tif ( props.multiple ) {\n\t\t\tconst selectedOptions = Array.from( event.target.options ).filter(\n\t\t\t\t( { selected } ) => selected\n\t\t\t);\n\t\t\tconst newValues = selectedOptions.map(\n\t\t\t\t( { value } ) => value as V\n\t\t\t);\n\t\t\tprops.onChange?.( newValues, { event } );\n\t\t\treturn;\n\t\t}\n\n\t\tprops.onChange?.( event.target.value as V, { event } );\n\t};\n\n\tconst classes = clsx( 'components-select-control', className );\n\n\tmaybeWarnDeprecated36pxSize( {\n\t\tcomponentName: 'SelectControl',\n\t\t__next40pxDefaultSize,\n\t\tsize,\n\t\t__shouldNotWarnDeprecated36pxSize,\n\t} );\n\n\treturn (\n\t\t<BaseControl\n\t\t\thelp={ help }\n\t\t\tid={ id }\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t__associatedWPComponentName=\"SelectControl\"\n\t\t>\n\t\t\t<StyledInputBase\n\t\t\t\tclassName={ classes }\n\t\t\t\tdisabled={ disabled }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\tid={ id }\n\t\t\t\tisBorderless={ variant === 'minimal' }\n\t\t\t\tlabel={ label }\n\t\t\t\tsize={ size }\n\t\t\t\tsuffix={\n\t\t\t\t\tsuffix || ( ! multiple && <SelectControlChevronDown /> )\n\t\t\t\t}\n\t\t\t\tprefix={ prefix }\n\t\t\t\tlabelPosition={ labelPosition }\n\t\t\t\t__unstableInputWidth={\n\t\t\t\t\tvariant === 'minimal' ? 'auto' : undefined\n\t\t\t\t}\n\t\t\t\tvariant={ variant }\n\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t>\n\t\t\t\t<Select\n\t\t\t\t\t{ ...restProps }\n\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\taria-describedby={ helpId }\n\t\t\t\t\tclassName=\"components-select-control__input\"\n\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\tid={ id }\n\t\t\t\t\tmultiple={ multiple }\n\t\t\t\t\tonChange={ handleOnChange }\n\t\t\t\t\tref={ ref }\n\t\t\t\t\tselectSize={ size }\n\t\t\t\t\tvalue={ valueProp }\n\t\t\t\t\tvariant={ variant }\n\t\t\t\t>\n\t\t\t\t\t{ children || <SelectOptions options={ options } /> }\n\t\t\t\t</Select>\n\t\t\t</StyledInputBase>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * `SelectControl` allows users to select from a single or multiple option menu.\n * It functions as a wrapper around the browser's native `<select>` element.\n *\n * ```jsx\n * import { SelectControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MySelectControl = () => {\n * const [ size, setSize ] = useState( '50%' );\n *\n * return (\n * <SelectControl\n * __next40pxDefaultSize\n * __nextHasNoMarginBottom\n * label=\"Size\"\n * value={ size }\n * options={ [\n * { label: 'Big', value: '100%' },\n * { label: 'Medium', value: '50%' },\n * { label: 'Small', value: '25%' },\n * ] }\n * onChange={ setSize }\n * />\n * );\n * };\n * ```\n */\nexport const SelectControl = forwardRef( UnforwardedSelectControl ) as <\n\tV extends string,\n>(\n\tprops: WordPressComponentProps<\n\t\tSelectControlProps< V >,\n\t\t'select',\n\t\tfalse\n\t> & { ref?: React.Ref< HTMLSelectElement > }\n) => React.JSX.Element | null;\n\nexport default SelectControl;\n","/**\n * WordPress dependencies\n */\nimport { useEffect, useState, useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { isValueDefined, getDefinedValue } from '../values';\n\n/**\n * @template T\n * @typedef Options\n * @property {T} [initial] Initial value\n * @property {T | \"\"} fallback Fallback value\n */\n\n/** @type {Readonly<{ initial: undefined, fallback: '' }>} */\nconst defaultOptions = {\n\tinitial: undefined,\n\t/**\n\t * Defaults to empty string, as that is preferred for usage with\n\t * <input />, <textarea />, and <select /> form elements.\n\t */\n\tfallback: '',\n};\n\n/**\n * Custom hooks for \"controlled\" components to track and consolidate internal\n * state and incoming values. This is useful for components that render\n * `input`, `textarea`, or `select` HTML elements.\n *\n * https://reactjs.org/docs/forms.html#controlled-components\n *\n * At first, a component using useControlledState receives an initial prop\n * value, which is used as initial internal state.\n *\n * This internal state can be maintained and updated without\n * relying on new incoming prop values.\n *\n * Unlike the basic useState hook, useControlledState's state can\n * be updated if a new incoming prop value is changed.\n *\n * @template T\n *\n * @param {T | undefined} currentState The current value.\n * @param {Options<T>} [options=defaultOptions] Additional options for the hook.\n *\n * @return {[T | \"\", (nextState: T) => void]} The controlled value and the value setter.\n */\nfunction useControlledState( currentState, options = defaultOptions ) {\n\tconst { initial, fallback } = { ...defaultOptions, ...options };\n\n\tconst [ internalState, setInternalState ] = useState( currentState );\n\tconst hasCurrentState = isValueDefined( currentState );\n\n\t/*\n\t * Resets internal state if value every changes from uncontrolled <-> controlled.\n\t */\n\tuseEffect( () => {\n\t\tif ( hasCurrentState && internalState ) {\n\t\t\tsetInternalState( undefined );\n\t\t}\n\t}, [ hasCurrentState, internalState ] );\n\n\tconst state = getDefinedValue(\n\t\t[ currentState, internalState, initial ],\n\t\tfallback\n\t);\n\n\t/* eslint-disable jsdoc/no-undefined-types */\n\t/** @type {(nextState: T) => void} */\n\tconst setState = useCallback(\n\t\t( nextState ) => {\n\t\t\tif ( ! hasCurrentState ) {\n\t\t\t\tsetInternalState( nextState );\n\t\t\t}\n\t\t},\n\t\t[ hasCurrentState ]\n\t);\n\t/* eslint-enable jsdoc/no-undefined-types */\n\n\treturn [ state, setState ];\n}\n\nexport default useControlledState;\n","/**\n * WordPress dependencies\n */\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useControlledState } from '../utils/hooks';\nimport { clamp } from '../utils/math';\n\nimport type { UseControlledRangeValueArgs } from './types';\n\n/**\n * A float supported clamp function for a specific value.\n *\n * @param value The value to clamp.\n * @param min The minimum value.\n * @param max The maximum value.\n *\n * @return A (float) number\n */\nexport function floatClamp( value: number | null, min: number, max: number ) {\n\tif ( typeof value !== 'number' ) {\n\t\treturn null;\n\t}\n\n\treturn parseFloat( `${ clamp( value, min, max ) }` );\n}\n\n/**\n * Hook to store a clamped value, derived from props.\n *\n * @param settings\n * @return The controlled value and the value setter.\n */\nexport function useControlledRangeValue(\n\tsettings: UseControlledRangeValueArgs\n) {\n\tconst { min, max, value: valueProp, initial } = settings;\n\tconst [ state, setInternalState ] = useControlledState(\n\t\tfloatClamp( valueProp, min, max ),\n\t\t{\n\t\t\tinitial: floatClamp( initial ?? null, min, max ),\n\t\t\tfallback: null,\n\t\t}\n\t);\n\n\tconst setState = useCallback(\n\t\t( nextValue: number | null ) => {\n\t\t\tif ( nextValue === null ) {\n\t\t\t\tsetInternalState( null );\n\t\t\t} else {\n\t\t\t\tsetInternalState( floatClamp( nextValue, min, max ) );\n\t\t\t}\n\t\t},\n\t\t[ min, max, setInternalState ]\n\t);\n\n\t// `state` can't be an empty string because we specified a fallback value of\n\t// `null` in `useControlledState`\n\treturn [ state as Exclude< typeof state, '' >, setState ] as const;\n}\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport NumberControl from '../../number-control';\nimport { COLORS, rtl, CONFIG } from '../../utils';\nimport { space } from '../../utils/space';\n\nimport type {\n\tRangeMarkProps,\n\tRailProps,\n\tThumbProps,\n\tTooltipProps,\n\tTrackProps,\n\tWrapperProps,\n\tRangeControlProps,\n} from '../types';\n\nconst rangeHeightValue = 30;\nconst railHeight = 4;\nconst rangeHeight = () =>\n\tcss( { height: rangeHeightValue, minHeight: rangeHeightValue } );\nconst thumbSize = 12;\n\nconst deprecatedHeight = ( {\n\t__next40pxDefaultSize,\n}: Pick< RangeControlProps, '__next40pxDefaultSize' > ) =>\n\t! __next40pxDefaultSize && css( { minHeight: rangeHeightValue } );\n\ntype RootProps = Pick< RangeControlProps, '__next40pxDefaultSize' >;\nexport const Root = styled.div< RootProps >`\n\t-webkit-tap-highlight-color: transparent;\n\talign-items: center;\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\tpadding: 0;\n\tposition: relative;\n\ttouch-action: none;\n\twidth: 100%;\n\tmin-height: 40px;\n\t/* TODO: remove after removing the __next40pxDefaultSize prop */\n\t${ deprecatedHeight };\n`;\n\nconst wrapperColor = ( { color = COLORS.ui.borderFocus }: WrapperProps ) =>\n\tcss( { color } );\n\nconst wrapperMargin = ( { marks, __nextHasNoMarginBottom }: WrapperProps ) => {\n\tif ( ! __nextHasNoMarginBottom ) {\n\t\treturn css( { marginBottom: marks ? 16 : undefined } );\n\t}\n\treturn '';\n};\n\nexport const Wrapper = styled( 'div', {\n\tshouldForwardProp: ( prop: string ) =>\n\t\t! [ 'color', '__nextHasNoMarginBottom', 'marks' ].includes( prop ),\n} )< WrapperProps >`\n\tdisplay: block;\n\tflex: 1;\n\tposition: relative;\n\twidth: 100%;\n\n\t${ wrapperColor };\n\t${ rangeHeight };\n\t${ wrapperMargin };\n`;\n\nexport const BeforeIconWrapper = styled.span`\n\tdisplay: flex; // ensures the height isn't affected by line-height\n\tmargin-top: ${ railHeight }px;\n\n\t${ rtl( { marginRight: 6 } ) }\n`;\n\nexport const AfterIconWrapper = styled.span`\n\tdisplay: flex; // ensures the height isn't affected by line-height\n\tmargin-top: ${ railHeight }px;\n\n\t${ rtl( { marginLeft: 6 } ) }\n`;\n\nconst railBackgroundColor = ( { disabled, railColor }: RailProps ) => {\n\tlet background = railColor || '';\n\n\tif ( disabled ) {\n\t\tbackground = COLORS.ui.backgroundDisabled;\n\t}\n\n\treturn css( { background } );\n};\n\nexport const Rail = styled.span`\n\tbackground-color: ${ COLORS.gray[ 300 ] };\n\tleft: 0;\n\tpointer-events: none;\n\tright: 0;\n\tdisplay: block;\n\theight: ${ railHeight }px;\n\tposition: absolute;\n\tmargin-top: ${ ( rangeHeightValue - railHeight ) / 2 }px;\n\ttop: 0;\n\tborder-radius: ${ CONFIG.radiusFull };\n\n\t${ railBackgroundColor };\n`;\n\nconst trackBackgroundColor = ( { disabled, trackColor }: TrackProps ) => {\n\tlet background = trackColor || 'currentColor';\n\n\tif ( disabled ) {\n\t\tbackground = COLORS.gray[ 400 ];\n\t}\n\n\treturn css( { background } );\n};\n\nexport const Track = styled.span`\n\tbackground-color: currentColor;\n\tborder-radius: ${ CONFIG.radiusFull };\n\theight: ${ railHeight }px;\n\tpointer-events: none;\n\tdisplay: block;\n\tposition: absolute;\n\tmargin-top: ${ ( rangeHeightValue - railHeight ) / 2 }px;\n\ttop: 0;\n\n\t.is-marked & {\n\t\t@media not ( prefers-reduced-motion ) {\n\t\t\ttransition: width ease 0.1s;\n\t\t}\n\t}\n\n\t${ trackBackgroundColor };\n`;\n\nexport const MarksWrapper = styled.span`\n\tdisplay: block;\n\tpointer-events: none;\n\tposition: relative;\n\twidth: 100%;\n\tuser-select: none;\n\tmargin-top: 17px;\n`;\n\nexport const Mark = styled.span`\n\tposition: absolute;\n\tleft: 0;\n\ttop: -4px;\n\theight: 4px;\n\twidth: 2px;\n\ttransform: translateX( -50% );\n\tbackground-color: ${ COLORS.ui.background };\n\tz-index: 1;\n`;\n\nconst markLabelFill = ( { isFilled }: RangeMarkProps ) => {\n\treturn css( {\n\t\tcolor: isFilled ? COLORS.gray[ 700 ] : COLORS.gray[ 300 ],\n\t} );\n};\n\nexport const MarkLabel = styled.span`\n\tcolor: ${ COLORS.gray[ 300 ] };\n\tfont-size: 11px;\n\tposition: absolute;\n\ttop: 8px;\n\twhite-space: nowrap;\n\n\t${ rtl( { left: 0 } ) };\n\t${ rtl(\n\t\t{ transform: 'translateX( -50% )' },\n\t\t{ transform: 'translateX( 50% )' }\n\t) };\n\n\t${ markLabelFill };\n`;\n\nconst thumbColor = ( { disabled }: ThumbProps ) =>\n\tdisabled\n\t\t? css`\n\t\t\t\tbackground-color: ${ COLORS.gray[ 400 ] };\n\t\t `\n\t\t: css`\n\t\t\t\tbackground-color: ${ COLORS.theme.accent };\n\t\t `;\n\nexport const ThumbWrapper = styled.span`\n\talign-items: center;\n\tdisplay: flex;\n\theight: ${ thumbSize }px;\n\tjustify-content: center;\n\tmargin-top: ${ ( rangeHeightValue - thumbSize ) / 2 }px;\n\toutline: 0;\n\tpointer-events: none;\n\tposition: absolute;\n\ttop: 0;\n\tuser-select: none;\n\twidth: ${ thumbSize }px;\n\tborder-radius: ${ CONFIG.radiusRound };\n\tz-index: 3;\n\n\t.is-marked & {\n\t\t@media not ( prefers-reduced-motion ) {\n\t\t\ttransition: left ease 0.1s;\n\t\t}\n\t}\n\n\t${ thumbColor };\n\t${ rtl( { marginLeft: -10 } ) };\n\t${ rtl(\n\t\t{ transform: 'translateX( 4.5px )' },\n\t\t{ transform: 'translateX( -4.5px )' }\n\t) };\n`;\n\nconst thumbFocus = ( { isFocused }: ThumbProps ) => {\n\treturn isFocused\n\t\t? css`\n\t\t\t\t&::before {\n\t\t\t\t\tcontent: ' ';\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\tbackground-color: ${ COLORS.theme.accent };\n\t\t\t\t\topacity: 0.4;\n\t\t\t\t\tborder-radius: ${ CONFIG.radiusRound };\n\t\t\t\t\theight: ${ thumbSize + 8 }px;\n\t\t\t\t\twidth: ${ thumbSize + 8 }px;\n\t\t\t\t\ttop: -4px;\n\t\t\t\t\tleft: -4px;\n\t\t\t\t}\n\t\t `\n\t\t: '';\n};\n\nexport const Thumb = styled.span< ThumbProps >`\n\talign-items: center;\n\tborder-radius: ${ CONFIG.radiusRound };\n\theight: 100%;\n\toutline: 0;\n\tposition: absolute;\n\tuser-select: none;\n\twidth: 100%;\n\tbox-shadow: ${ CONFIG.elevationXSmall };\n\n\t${ thumbColor };\n\t${ thumbFocus };\n`;\n\nexport const InputRange = styled.input`\n\tbox-sizing: border-box;\n\tcursor: pointer;\n\tdisplay: block;\n\theight: 100%;\n\tleft: 0;\n\tmargin: 0 -${ thumbSize / 2 }px;\n\topacity: 0;\n\toutline: none;\n\tposition: absolute;\n\tright: 0;\n\ttop: 0;\n\twidth: calc( 100% + ${ thumbSize }px );\n`;\n\nconst tooltipShow = ( { show }: TooltipProps ) => {\n\treturn css`\n\t\tdisplay: ${ show ? 'inline-block' : 'none' };\n\t\topacity: ${ show ? 1 : 0 };\n\n\t\t@media not ( prefers-reduced-motion ) {\n\t\t\ttransition:\n\t\t\t\topacity 120ms ease,\n\t\t\t\tdisplay 120ms ease allow-discrete;\n\t\t}\n\n\t\t@starting-style {\n\t\t\topacity: 0;\n\t\t}\n\t`;\n};\n\nconst tooltipPosition = ( { position }: TooltipProps ) => {\n\tconst isBottom = position === 'bottom';\n\n\tif ( isBottom ) {\n\t\treturn css`\n\t\t\tbottom: -80%;\n\t\t`;\n\t}\n\n\treturn css`\n\t\ttop: -80%;\n\t`;\n};\n\nexport const Tooltip = styled.span< TooltipProps >`\n\tbackground: rgba( 0, 0, 0, 0.8 );\n\tborder-radius: ${ CONFIG.radiusSmall };\n\tcolor: white;\n\tfont-size: 12px;\n\tmin-width: 32px;\n\tpadding: 4px 8px;\n\tpointer-events: none;\n\tposition: absolute;\n\ttext-align: center;\n\tuser-select: none;\n\tline-height: 1.4;\n\n\t${ tooltipShow };\n\n\t${ tooltipPosition };\n\t${ rtl(\n\t\t{ transform: 'translateX(-50%)' },\n\t\t{ transform: 'translateX(50%)' }\n\t) }\n`;\n\n// @todo Refactor RangeControl with latest HStack configuration\n// @see: packages/components/src/h-stack\nexport const InputNumber = styled( NumberControl )`\n\tdisplay: inline-block;\n\tfont-size: 13px;\n\tmargin-top: 0;\n\n\tinput[type='number']& {\n\t\t${ rangeHeight };\n\t}\n\n\t${ rtl( { marginLeft: `${ space( 4 ) } !important` } ) }\n`;\n\nexport const ActionRightWrapper = styled.span`\n\tdisplay: block;\n\tmargin-top: 0;\n\n\tbutton,\n\tbutton.is-small {\n\t\tmargin-left: 0;\n\t\t${ rangeHeight };\n\t}\n\n\t${ rtl( { marginLeft: 8 } ) }\n`;\n","/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { InputRange as BaseInputRange } from './styles/range-control-styles';\n\nimport type { InputRangeProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nfunction InputRange(\n\tprops: WordPressComponentProps< InputRangeProps, 'input' >,\n\tref: React.ForwardedRef< HTMLInputElement >\n) {\n\tconst { describedBy, label, value, ...otherProps } = props;\n\treturn (\n\t\t<BaseInputRange\n\t\t\t{ ...otherProps }\n\t\t\taria-describedby={ describedBy }\n\t\t\taria-label={ label }\n\t\t\taria-hidden={ false }\n\t\t\tref={ ref }\n\t\t\ttabIndex={ 0 }\n\t\t\ttype=\"range\"\n\t\t\tvalue={ value }\n\t\t/>\n\t);\n}\n\nconst ForwardedComponent = forwardRef( InputRange );\n\nexport default ForwardedComponent;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * Internal dependencies\n */\nimport { Mark, MarkLabel } from './styles/range-control-styles';\n\nimport type { RangeMarkProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nexport default function RangeMark(\n\tprops: WordPressComponentProps< RangeMarkProps, 'span' >\n) {\n\tconst {\n\t\tclassName,\n\t\tisFilled = false,\n\t\tlabel,\n\t\tstyle = {},\n\t\t...otherProps\n\t} = props;\n\n\tconst classes = clsx(\n\t\t'components-range-control__mark',\n\t\tisFilled && 'is-filled',\n\t\tclassName\n\t);\n\tconst labelClasses = clsx(\n\t\t'components-range-control__mark-label',\n\t\tisFilled && 'is-filled'\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<Mark\n\t\t\t\t{ ...otherProps }\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tclassName={ classes }\n\t\t\t\tstyle={ style }\n\t\t\t/>\n\t\t\t{ label && (\n\t\t\t\t<MarkLabel\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tclassName={ labelClasses }\n\t\t\t\t\tisFilled={ isFilled }\n\t\t\t\t\tstyle={ style }\n\t\t\t\t>\n\t\t\t\t\t{ label }\n\t\t\t\t</MarkLabel>\n\t\t\t) }\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport RangeMark from './mark';\nimport { MarksWrapper, Rail } from './styles/range-control-styles';\n\nimport type { WordPressComponentProps } from '../context';\nimport type {\n\tMarksProps,\n\tRangeMarkProps,\n\tRailProps,\n\tUseMarksArgs,\n} from './types';\n\nexport default function RangeRail(\n\tprops: WordPressComponentProps< RailProps, 'span' >\n) {\n\tconst {\n\t\tdisabled = false,\n\t\tmarks = false,\n\t\tmin = 0,\n\t\tmax = 100,\n\t\tstep = 1,\n\t\tvalue = 0,\n\t\t...restProps\n\t} = props;\n\n\treturn (\n\t\t<>\n\t\t\t<Rail disabled={ disabled } { ...restProps } />\n\t\t\t{ marks && (\n\t\t\t\t<Marks\n\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\tmarks={ marks }\n\t\t\t\t\tmin={ min }\n\t\t\t\t\tmax={ max }\n\t\t\t\t\tstep={ step }\n\t\t\t\t\tvalue={ value }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction Marks( props: WordPressComponentProps< MarksProps, 'span' > ) {\n\tconst {\n\t\tdisabled = false,\n\t\tmarks = false,\n\t\tmin = 0,\n\t\tmax = 100,\n\t\tstep: stepProp = 1,\n\t\tvalue = 0,\n\t} = props;\n\n\tconst step = stepProp === 'any' ? 1 : stepProp;\n\tconst marksData = useMarks( { marks, min, max, step, value } );\n\n\treturn (\n\t\t<MarksWrapper\n\t\t\taria-hidden=\"true\"\n\t\t\tclassName=\"components-range-control__marks\"\n\t\t>\n\t\t\t{ marksData.map( ( mark ) => (\n\t\t\t\t<RangeMark\n\t\t\t\t\t{ ...mark }\n\t\t\t\t\tkey={ mark.key }\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</MarksWrapper>\n\t);\n}\n\nfunction useMarks( {\n\tmarks,\n\tmin = 0,\n\tmax = 100,\n\tstep = 1,\n\tvalue = 0,\n}: UseMarksArgs ) {\n\tif ( ! marks ) {\n\t\treturn [];\n\t}\n\n\tconst range = max - min;\n\tif ( ! Array.isArray( marks ) ) {\n\t\tmarks = [];\n\t\tconst count = 1 + Math.round( range / step );\n\t\twhile ( count > marks.push( { value: step * marks.length + min } ) ) {}\n\t}\n\n\tconst placedMarks: RangeMarkProps[] = [];\n\tmarks.forEach( ( mark, index ) => {\n\t\tif ( mark.value < min || mark.value > max ) {\n\t\t\treturn;\n\t\t}\n\t\tconst key = `mark-${ index }`;\n\t\tconst isFilled = mark.value <= value;\n\t\tconst offset = `${ ( ( mark.value - min ) / range ) * 100 }%`;\n\n\t\tconst offsetStyle = {\n\t\t\t[ isRTL() ? 'right' : 'left' ]: offset,\n\t\t};\n\n\t\tplacedMarks.push( {\n\t\t\t...mark,\n\t\t\tisFilled,\n\t\t\tkey,\n\t\t\tstyle: offsetStyle,\n\t\t} );\n\t} );\n\n\treturn placedMarks;\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback, useEffect, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { Tooltip } from './styles/range-control-styles';\n\nimport type { TooltipProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nexport default function SimpleTooltip(\n\tprops: WordPressComponentProps< TooltipProps, 'span' >\n) {\n\tconst {\n\t\tclassName,\n\t\tinputRef,\n\t\ttooltipPosition,\n\t\tshow = false,\n\t\tstyle = {},\n\t\tvalue = 0,\n\t\trenderTooltipContent = ( v ) => v,\n\t\tzIndex = 100,\n\t\t...restProps\n\t} = props;\n\tconst position = useTooltipPosition( { inputRef, tooltipPosition } );\n\tconst classes = clsx( 'components-simple-tooltip', className );\n\tconst styles = {\n\t\t...style,\n\t\tzIndex,\n\t};\n\n\treturn (\n\t\t<Tooltip\n\t\t\t{ ...restProps }\n\t\t\taria-hidden=\"false\"\n\t\t\tclassName={ classes }\n\t\t\tposition={ position }\n\t\t\tshow={ show }\n\t\t\trole=\"tooltip\"\n\t\t\tstyle={ styles }\n\t\t>\n\t\t\t{ renderTooltipContent( value ) }\n\t\t</Tooltip>\n\t);\n}\n\nfunction useTooltipPosition( { inputRef, tooltipPosition }: TooltipProps ) {\n\tconst [ position, setPosition ] = useState< string >();\n\n\tconst setTooltipPosition = useCallback( () => {\n\t\tif ( inputRef && inputRef.current ) {\n\t\t\tsetPosition( tooltipPosition );\n\t\t}\n\t}, [ tooltipPosition, inputRef ] );\n\n\tuseEffect( () => {\n\t\tsetTooltipPosition();\n\t}, [ setTooltipPosition ] );\n\n\tuseEffect( () => {\n\t\twindow.addEventListener( 'resize', setTooltipPosition );\n\n\t\treturn () => {\n\t\t\twindow.removeEventListener( 'resize', setTooltipPosition );\n\t\t};\n\t} );\n\n\treturn position;\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ChangeEvent, FocusEvent, ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { useRef, useState, forwardRef } from '@wordpress/element';\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport Button from '../button';\nimport Icon from '../icon';\nimport { COLORS } from '../utils';\nimport { floatClamp, useControlledRangeValue } from './utils';\nimport { clamp } from '../utils/math';\nimport InputRange from './input-range';\nimport RangeRail from './rail';\nimport SimpleTooltip from './tooltip';\nimport {\n\tActionRightWrapper,\n\tAfterIconWrapper,\n\tBeforeIconWrapper,\n\tInputNumber,\n\tRoot,\n\tTrack,\n\tThumbWrapper,\n\tThumb,\n\tWrapper,\n} from './styles/range-control-styles';\n\nimport type { RangeControlProps } from './types';\nimport type { WordPressComponentProps } from '../context';\nimport { space } from '../utils/space';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\n\nconst noop = () => {};\n\n/**\n * Computes the value that `RangeControl` should reset to when pressing\n * the reset button.\n */\nfunction computeResetValue( {\n\tresetFallbackValue,\n\tinitialPosition,\n}: Pick< RangeControlProps, 'resetFallbackValue' | 'initialPosition' > ) {\n\tif ( resetFallbackValue !== undefined ) {\n\t\treturn ! Number.isNaN( resetFallbackValue ) ? resetFallbackValue : null;\n\t}\n\n\tif ( initialPosition !== undefined ) {\n\t\treturn ! Number.isNaN( initialPosition ) ? initialPosition : null;\n\t}\n\n\treturn null;\n}\n\nfunction UnforwardedRangeControl(\n\tprops: WordPressComponentProps< RangeControlProps, 'input', false >,\n\tforwardedRef: ForwardedRef< HTMLInputElement >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom = false,\n\t\tafterIcon,\n\t\tallowReset = false,\n\t\tbeforeIcon,\n\t\tclassName,\n\t\tcolor: colorProp = COLORS.theme.accent,\n\t\tcurrentInput,\n\t\tdisabled = false,\n\t\thelp,\n\t\thideLabelFromVision = false,\n\t\tinitialPosition,\n\t\tisShiftStepEnabled = true,\n\t\tlabel,\n\t\tmarks = false,\n\t\tmax = 100,\n\t\tmin = 0,\n\t\tonBlur = noop,\n\t\tonChange = noop,\n\t\tonFocus = noop,\n\t\tonMouseLeave = noop,\n\t\tonMouseMove = noop,\n\t\trailColor,\n\t\trenderTooltipContent = ( v ) => v,\n\t\tresetFallbackValue,\n\t\t__next40pxDefaultSize = false,\n\t\tshiftStep = 10,\n\t\tshowTooltip: showTooltipProp,\n\t\tstep = 1,\n\t\ttrackColor,\n\t\tvalue: valueProp,\n\t\twithInputField = true,\n\t\t__shouldNotWarnDeprecated36pxSize,\n\t\t...otherProps\n\t} = props;\n\n\tconst [ value, setValue ] = useControlledRangeValue( {\n\t\tmin,\n\t\tmax,\n\t\tvalue: valueProp ?? null,\n\t\tinitial: initialPosition,\n\t} );\n\tconst isResetPendent = useRef( false );\n\n\tlet hasTooltip = showTooltipProp;\n\tlet hasInputField = withInputField;\n\n\tif ( step === 'any' ) {\n\t\t// The tooltip and number input field are hidden when the step is \"any\"\n\t\t// because the decimals get too lengthy to fit well.\n\t\thasTooltip = false;\n\t\thasInputField = false;\n\t}\n\n\tconst [ showTooltip, setShowTooltip ] = useState( hasTooltip );\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\n\tconst inputRef = useRef< HTMLInputElement >();\n\tconst isCurrentlyFocused = inputRef.current?.matches( ':focus' );\n\tconst isThumbFocused = ! disabled && isFocused;\n\n\tconst isValueReset = value === null;\n\tconst currentValue = value !== undefined ? value : currentInput;\n\n\tconst inputSliderValue = isValueReset ? '' : currentValue;\n\tconst rangeFillValue = isValueReset ? ( max - min ) / 2 + min : value;\n\n\tconst fillValue = isValueReset\n\t\t? 50\n\t\t: ( ( value - min ) / ( max - min ) ) * 100;\n\tconst fillValueOffset = `${ clamp( fillValue, 0, 100 ) }%`;\n\n\tconst classes = clsx( 'components-range-control', className );\n\n\tconst wrapperClasses = clsx(\n\t\t'components-range-control__wrapper',\n\t\t!! marks && 'is-marked'\n\t);\n\n\tconst id = useInstanceId(\n\t\tUnforwardedRangeControl,\n\t\t'inspector-range-control'\n\t);\n\tconst describedBy = !! help ? `${ id }__help` : undefined;\n\tconst enableTooltip = hasTooltip !== false && Number.isFinite( value );\n\n\tconst handleOnRangeChange = ( event: ChangeEvent< HTMLInputElement > ) => {\n\t\tconst nextValue = parseFloat( event.target.value );\n\t\tsetValue( nextValue );\n\t\tonChange( nextValue );\n\t};\n\n\tconst handleOnChange = ( next?: string ) => {\n\t\t// @ts-expect-error TODO: Investigate if it's problematic for setValue() to\n\t\t// potentially receive a NaN when next is undefined.\n\t\tlet nextValue = parseFloat( next );\n\t\tsetValue( nextValue );\n\n\t\t/*\n\t\t * Calls onChange only when nextValue is numeric\n\t\t * otherwise may queue a reset for the blur event.\n\t\t */\n\t\tif ( ! isNaN( nextValue ) ) {\n\t\t\tif ( nextValue < min || nextValue > max ) {\n\t\t\t\tnextValue = floatClamp( nextValue, min, max ) as number;\n\t\t\t}\n\n\t\t\tonChange( nextValue );\n\t\t\tisResetPendent.current = false;\n\t\t} else if ( allowReset ) {\n\t\t\tisResetPendent.current = true;\n\t\t}\n\t};\n\n\tconst handleOnInputNumberBlur = () => {\n\t\tif ( isResetPendent.current ) {\n\t\t\thandleOnReset();\n\t\t\tisResetPendent.current = false;\n\t\t}\n\t};\n\n\tconst handleOnReset = () => {\n\t\t// Reset to `resetFallbackValue` if defined, otherwise set internal value\n\t\t// to `null` — which, if propagated to the `value` prop, will cause\n\t\t// the value to be reset to the `initialPosition` prop if defined.\n\t\tconst resetValue = Number.isNaN( resetFallbackValue )\n\t\t\t? null\n\t\t\t: resetFallbackValue ?? null;\n\n\t\tsetValue( resetValue );\n\n\t\t/**\n\t\t * Previously, this callback would always receive undefined as\n\t\t * an argument. This behavior is unexpected, specifically\n\t\t * when resetFallbackValue is defined.\n\t\t *\n\t\t * The value of undefined is not ideal. Passing it through\n\t\t * to internal <input /> elements would change it from a\n\t\t * controlled component to an uncontrolled component.\n\t\t *\n\t\t * For now, to minimize unexpected regressions, we're going to\n\t\t * preserve the undefined callback argument, except when a\n\t\t * resetFallbackValue is defined.\n\t\t */\n\t\tonChange( resetValue ?? undefined );\n\t};\n\n\tconst handleShowTooltip = () => setShowTooltip( true );\n\tconst handleHideTooltip = () => setShowTooltip( false );\n\n\tconst handleOnBlur = ( event: FocusEvent< HTMLInputElement > ) => {\n\t\tonBlur( event );\n\t\tsetIsFocused( false );\n\t\thandleHideTooltip();\n\t};\n\n\tconst handleOnFocus = ( event: FocusEvent< HTMLInputElement > ) => {\n\t\tonFocus( event );\n\t\tsetIsFocused( true );\n\t\thandleShowTooltip();\n\t};\n\n\tconst offsetStyle = {\n\t\t[ isRTL() ? 'right' : 'left' ]: fillValueOffset,\n\t};\n\n\t// Add default size deprecation warning.\n\tmaybeWarnDeprecated36pxSize( {\n\t\tcomponentName: 'RangeControl',\n\t\t__next40pxDefaultSize,\n\t\tsize: undefined,\n\t\t__shouldNotWarnDeprecated36pxSize,\n\t} );\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t__associatedWPComponentName=\"RangeControl\"\n\t\t\tclassName={ classes }\n\t\t\tlabel={ label }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\tid={ `${ id }` }\n\t\t\thelp={ help }\n\t\t>\n\t\t\t<Root\n\t\t\t\tclassName=\"components-range-control__root\"\n\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t>\n\t\t\t\t{ beforeIcon && (\n\t\t\t\t\t<BeforeIconWrapper>\n\t\t\t\t\t\t<Icon icon={ beforeIcon } />\n\t\t\t\t\t</BeforeIconWrapper>\n\t\t\t\t) }\n\t\t\t\t<Wrapper\n\t\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t\t\tclassName={ wrapperClasses }\n\t\t\t\t\tcolor={ colorProp }\n\t\t\t\t\tmarks={ !! marks }\n\t\t\t\t>\n\t\t\t\t\t<InputRange\n\t\t\t\t\t\t{ ...otherProps }\n\t\t\t\t\t\tclassName=\"components-range-control__slider\"\n\t\t\t\t\t\tdescribedBy={ describedBy }\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tid={ `${ id }` }\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\tmax={ max }\n\t\t\t\t\t\tmin={ min }\n\t\t\t\t\t\tonBlur={ handleOnBlur }\n\t\t\t\t\t\tonChange={ handleOnRangeChange }\n\t\t\t\t\t\tonFocus={ handleOnFocus }\n\t\t\t\t\t\tonMouseMove={ onMouseMove }\n\t\t\t\t\t\tonMouseLeave={ onMouseLeave }\n\t\t\t\t\t\tref={ useMergeRefs( [ inputRef, forwardedRef ] ) }\n\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\tvalue={ inputSliderValue ?? undefined }\n\t\t\t\t\t/>\n\t\t\t\t\t<RangeRail\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tmarks={ marks }\n\t\t\t\t\t\tmax={ max }\n\t\t\t\t\t\tmin={ min }\n\t\t\t\t\t\trailColor={ railColor }\n\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\tvalue={ rangeFillValue }\n\t\t\t\t\t/>\n\t\t\t\t\t<Track\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\tclassName=\"components-range-control__track\"\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tstyle={ { width: fillValueOffset } }\n\t\t\t\t\t\ttrackColor={ trackColor }\n\t\t\t\t\t/>\n\t\t\t\t\t<ThumbWrapper\n\t\t\t\t\t\tclassName=\"components-range-control__thumb-wrapper\"\n\t\t\t\t\t\tstyle={ offsetStyle }\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Thumb\n\t\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\t\tisFocused={ isThumbFocused }\n\t\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ThumbWrapper>\n\t\t\t\t\t{ enableTooltip && (\n\t\t\t\t\t\t<SimpleTooltip\n\t\t\t\t\t\t\tclassName=\"components-range-control__tooltip\"\n\t\t\t\t\t\t\tinputRef={ inputRef }\n\t\t\t\t\t\t\ttooltipPosition=\"bottom\"\n\t\t\t\t\t\t\trenderTooltipContent={ renderTooltipContent }\n\t\t\t\t\t\t\tshow={ isCurrentlyFocused || showTooltip }\n\t\t\t\t\t\t\tstyle={ offsetStyle }\n\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Wrapper>\n\t\t\t\t{ afterIcon && (\n\t\t\t\t\t<AfterIconWrapper>\n\t\t\t\t\t\t<Icon icon={ afterIcon } />\n\t\t\t\t\t</AfterIconWrapper>\n\t\t\t\t) }\n\t\t\t\t{ hasInputField && (\n\t\t\t\t\t<InputNumber\n\t\t\t\t\t\taria-label={ label }\n\t\t\t\t\t\tclassName=\"components-range-control__number\"\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tinputMode=\"decimal\"\n\t\t\t\t\t\tisShiftStepEnabled={ isShiftStepEnabled }\n\t\t\t\t\t\tmax={ max }\n\t\t\t\t\t\tmin={ min }\n\t\t\t\t\t\tonBlur={ handleOnInputNumberBlur }\n\t\t\t\t\t\tonChange={ handleOnChange }\n\t\t\t\t\t\tshiftStep={ shiftStep }\n\t\t\t\t\t\tsize={\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t? '__unstable-large'\n\t\t\t\t\t\t\t\t: 'default'\n\t\t\t\t\t\t}\n\t\t\t\t\t\t__unstableInputWidth={\n\t\t\t\t\t\t\t__next40pxDefaultSize ? space( 20 ) : space( 16 )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\t// @ts-expect-error TODO: Investigate if the `null` value is necessary\n\t\t\t\t\t\tvalue={ inputSliderValue }\n\t\t\t\t\t\t__shouldNotWarnDeprecated36pxSize\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ allowReset && (\n\t\t\t\t\t<ActionRightWrapper>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"components-range-control__reset\"\n\t\t\t\t\t\t\t// If the RangeControl itself is disabled, the reset button shouldn't be in the tab sequence.\n\t\t\t\t\t\t\taccessibleWhenDisabled={ ! disabled }\n\t\t\t\t\t\t\t// The reset button should be disabled if RangeControl itself is disabled,\n\t\t\t\t\t\t\t// or if the current `value` is equal to the value that would be currently\n\t\t\t\t\t\t\t// assigned when clicking the button.\n\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\tdisabled ||\n\t\t\t\t\t\t\t\tvalue ===\n\t\t\t\t\t\t\t\t\tcomputeResetValue( {\n\t\t\t\t\t\t\t\t\t\tresetFallbackValue,\n\t\t\t\t\t\t\t\t\t\tinitialPosition,\n\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\tonClick={ handleOnReset }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Reset' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</ActionRightWrapper>\n\t\t\t\t) }\n\t\t\t</Root>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * RangeControls are used to make selections from a range of incremental values.\n *\n * ```jsx\n * import { RangeControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyRangeControl = () => {\n * const [ isChecked, setChecked ] = useState( true );\n * return (\n * <RangeControl\n * __nextHasNoMarginBottom\n * __next40pxDefaultSize\n * help=\"Please select how transparent you would like this.\"\n * initialPosition={50}\n * label=\"Opacity\"\n * max={100}\n * min={0}\n * onChange={() => {}}\n * />\n * );\n * };\n * ```\n */\nexport const RangeControl = forwardRef( UnforwardedRangeControl );\n\nexport default RangeControl;\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport NumberControl from '../number-control';\nimport InnerSelectControl from '../select-control';\nimport InnerRangeControl from '../range-control';\nimport { space } from '../utils/space';\nimport { boxSizingReset } from '../utils';\nimport { Flex } from '../flex';\nimport { HStack } from '../h-stack';\nimport CONFIG from '../utils/config-values';\n\nexport const NumberControlWrapper = styled( NumberControl )`\n\twidth: ${ space( 24 ) };\n`;\n\nexport const SelectControl = styled( InnerSelectControl )`\n\tmargin-left: ${ space( -2 ) };\n`;\n\nexport const RangeControl = styled( InnerRangeControl )`\n\tflex: 1;\n\tmargin-right: ${ space( 2 ) };\n`;\n\n// Make the Hue circle picker not go out of the bar.\nconst interactiveHueStyles = `\n.react-colorful__interactive {\n\twidth: calc( 100% - ${ space( 2 ) } );\n\tmargin-left: ${ space( 1 ) };\n}`;\n\nexport const AuxiliaryColorArtefactWrapper = styled.div`\n\tpadding-top: ${ space( 2 ) };\n\tpadding-right: 0;\n\tpadding-left: 0;\n\tpadding-bottom: 0;\n`;\n\nexport const AuxiliaryColorArtefactHStackHeader = styled( HStack )`\n\tpadding-left: ${ space( 4 ) };\n\tpadding-right: ${ space( 4 ) };\n`;\n\nexport const ColorInputWrapper = styled( Flex )`\n\tpadding-top: ${ space( 4 ) };\n\tpadding-left: ${ space( 4 ) };\n\tpadding-right: ${ space( 3 ) };\n\tpadding-bottom: ${ space( 5 ) };\n`;\n\nexport const ColorfulWrapper = styled.div`\n\t${ boxSizingReset };\n\n\twidth: 216px;\n\n\t.react-colorful {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\talign-items: center;\n\t\twidth: 216px;\n\t\theight: auto;\n\t}\n\n\t.react-colorful__saturation {\n\t\twidth: 100%;\n\t\tborder-radius: 0;\n\t\theight: 216px;\n\t\tmargin-bottom: ${ space( 4 ) };\n\t\tborder-bottom: none;\n\t}\n\n\t.react-colorful__hue,\n\t.react-colorful__alpha {\n\t\twidth: 184px;\n\t\theight: 16px;\n\t\tborder-radius: ${ CONFIG.radiusFull };\n\t\tmargin-bottom: ${ space( 2 ) };\n\t}\n\n\t.react-colorful__pointer {\n\t\theight: 16px;\n\t\twidth: 16px;\n\t\tborder: none;\n\t\tbox-shadow: 0 0 2px 0 rgba( 0, 0, 0, 0.25 );\n\n\t\t// Shown instead of box-shadow to Windows high contrast mode.\n\t\toutline: 2px solid transparent;\n\t}\n\n\t.react-colorful__pointer-fill {\n\t\tbox-shadow: inset 0 0 0 ${ CONFIG.borderWidthFocus } #fff;\n\t}\n\n\t${ interactiveHueStyles }\n`;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst copy = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default copy;\n","/**\n * WordPress dependencies\n */\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport { useState, useEffect, useRef } from '@wordpress/element';\nimport { copy } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { Button } from '../button';\nimport Tooltip from '../tooltip';\n\nimport type { ColorCopyButtonProps } from './types';\n\nexport const ColorCopyButton = ( props: ColorCopyButtonProps ) => {\n\tconst { color, colorType } = props;\n\tconst [ copiedColor, setCopiedColor ] = useState< string | null >( null );\n\tconst copyTimerRef = useRef<\n\t\tReturnType< typeof setTimeout > | undefined\n\t>();\n\tconst copyRef = useCopyToClipboard< HTMLDivElement >(\n\t\t() => {\n\t\t\tswitch ( colorType ) {\n\t\t\t\tcase 'hsl': {\n\t\t\t\t\treturn color.toHslString();\n\t\t\t\t}\n\t\t\t\tcase 'rgb': {\n\t\t\t\t\treturn color.toRgbString();\n\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\tcase 'hex': {\n\t\t\t\t\treturn color.toHex();\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t() => {\n\t\t\tif ( copyTimerRef.current ) {\n\t\t\t\tclearTimeout( copyTimerRef.current );\n\t\t\t}\n\t\t\tsetCopiedColor( color.toHex() );\n\t\t\tcopyTimerRef.current = setTimeout( () => {\n\t\t\t\tsetCopiedColor( null );\n\t\t\t\tcopyTimerRef.current = undefined;\n\t\t\t}, 3000 );\n\t\t}\n\t);\n\tuseEffect( () => {\n\t\t// Clear copyTimerRef on component unmount.\n\t\treturn () => {\n\t\t\tif ( copyTimerRef.current ) {\n\t\t\t\tclearTimeout( copyTimerRef.current );\n\t\t\t}\n\t\t};\n\t}, [] );\n\n\tconst label =\n\t\tcopiedColor === color.toHex() ? __( 'Copied!' ) : __( 'Copy' );\n\n\treturn (\n\t\t<Tooltip delay={ 0 } hideOnClick={ false } text={ label }>\n\t\t\t<Button\n\t\t\t\tsize=\"compact\"\n\t\t\t\taria-label={ label }\n\t\t\t\tref={ copyRef }\n\t\t\t\ticon={ copy }\n\t\t\t\tshowTooltip={ false }\n\t\t\t/>\n\t\t</Tooltip>\n\t);\n};\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { contextConnect, useContextSystem } from '../context';\nimport type { PrefixSuffixWrapperProps } from './types';\nimport { PrefixSuffixWrapper } from './styles/input-control-styles';\n\nfunction UnconnectedInputControlPrefixWrapper(\n\tprops: WordPressComponentProps< PrefixSuffixWrapperProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst derivedProps = useContextSystem( props, 'InputControlPrefixWrapper' );\n\n\treturn (\n\t\t<PrefixSuffixWrapper\n\t\t\t{ ...derivedProps }\n\t\t\tisPrefix\n\t\t\tref={ forwardedRef }\n\t\t/>\n\t);\n}\n\n/**\n * A convenience wrapper for the `prefix` when you want to apply\n * standard padding in accordance with the size variant.\n *\n * ```jsx\n * import {\n * __experimentalInputControl as InputControl,\n * __experimentalInputControlPrefixWrapper as InputControlPrefixWrapper,\n * } from '@wordpress/components';\n *\n * <InputControl\n * prefix={<InputControlPrefixWrapper>@</InputControlPrefixWrapper>}\n * />\n * ```\n */\nexport const InputControlPrefixWrapper = contextConnect(\n\tUnconnectedInputControlPrefixWrapper,\n\t'InputControlPrefixWrapper'\n);\n\nexport default InputControlPrefixWrapper;\n","/**\n * Internal dependencies\n */\nimport { HStack } from '../h-stack';\nimport { Text } from '../text';\nimport { RangeControl, NumberControlWrapper } from './styles';\nimport { COLORS } from '../utils/colors-values';\nimport type { InputWithSliderProps } from './types';\nimport InputControlPrefixWrapper from '../input-control/input-prefix-wrapper';\n\nexport const InputWithSlider = ( {\n\tmin,\n\tmax,\n\tlabel,\n\tabbreviation,\n\tonChange,\n\tvalue,\n}: InputWithSliderProps ) => {\n\tconst onNumberControlChange = ( newValue?: number | string ) => {\n\t\tif ( ! newValue ) {\n\t\t\tonChange( 0 );\n\t\t\treturn;\n\t\t}\n\t\tif ( typeof newValue === 'string' ) {\n\t\t\tonChange( parseInt( newValue, 10 ) );\n\t\t\treturn;\n\t\t}\n\t\tonChange( newValue );\n\t};\n\n\treturn (\n\t\t<HStack spacing={ 4 }>\n\t\t\t<NumberControlWrapper\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tmin={ min }\n\t\t\t\tmax={ max }\n\t\t\t\tlabel={ label }\n\t\t\t\thideLabelFromVision\n\t\t\t\tvalue={ value }\n\t\t\t\tonChange={ onNumberControlChange }\n\t\t\t\tprefix={\n\t\t\t\t\t<InputControlPrefixWrapper>\n\t\t\t\t\t\t<Text color={ COLORS.theme.accent } lineHeight={ 1 }>\n\t\t\t\t\t\t\t{ abbreviation }\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</InputControlPrefixWrapper>\n\t\t\t\t}\n\t\t\t\tspinControls=\"none\"\n\t\t\t/>\n\t\t\t<RangeControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tlabel={ label }\n\t\t\t\thideLabelFromVision\n\t\t\t\tmin={ min }\n\t\t\t\tmax={ max }\n\t\t\t\tvalue={ value }\n\t\t\t\t// @ts-expect-error\n\t\t\t\t// See: https://github.com/WordPress/gutenberg/pull/40535#issuecomment-1172418185\n\t\t\t\tonChange={ onChange }\n\t\t\t\twithInputField={ false }\n\t\t\t/>\n\t\t</HStack>\n\t);\n};\n","/**\n * External dependencies\n */\nimport { colord } from 'colord';\n\n/**\n * Internal dependencies\n */\nimport { InputWithSlider } from './input-with-slider';\nimport type { RgbInputProps } from './types';\n\nexport const RgbInput = ( { color, onChange, enableAlpha }: RgbInputProps ) => {\n\tconst { r, g, b, a } = color.toRgb();\n\n\treturn (\n\t\t<>\n\t\t\t<InputWithSlider\n\t\t\t\tmin={ 0 }\n\t\t\t\tmax={ 255 }\n\t\t\t\tlabel=\"Red\"\n\t\t\t\tabbreviation=\"R\"\n\t\t\t\tvalue={ r }\n\t\t\t\tonChange={ ( nextR: number ) =>\n\t\t\t\t\tonChange( colord( { r: nextR, g, b, a } ) )\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<InputWithSlider\n\t\t\t\tmin={ 0 }\n\t\t\t\tmax={ 255 }\n\t\t\t\tlabel=\"Green\"\n\t\t\t\tabbreviation=\"G\"\n\t\t\t\tvalue={ g }\n\t\t\t\tonChange={ ( nextG: number ) =>\n\t\t\t\t\tonChange( colord( { r, g: nextG, b, a } ) )\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<InputWithSlider\n\t\t\t\tmin={ 0 }\n\t\t\t\tmax={ 255 }\n\t\t\t\tlabel=\"Blue\"\n\t\t\t\tabbreviation=\"B\"\n\t\t\t\tvalue={ b }\n\t\t\t\tonChange={ ( nextB: number ) =>\n\t\t\t\t\tonChange( colord( { r, g, b: nextB, a } ) )\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{ enableAlpha && (\n\t\t\t\t<InputWithSlider\n\t\t\t\t\tmin={ 0 }\n\t\t\t\t\tmax={ 100 }\n\t\t\t\t\tlabel=\"Alpha\"\n\t\t\t\t\tabbreviation=\"A\"\n\t\t\t\t\tvalue={ Math.trunc( a * 100 ) }\n\t\t\t\t\tonChange={ ( nextA: number ) =>\n\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\tcolord( {\n\t\t\t\t\t\t\t\tr,\n\t\t\t\t\t\t\t\tg,\n\t\t\t\t\t\t\t\tb,\n\t\t\t\t\t\t\t\ta: nextA / 100,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n};\n","/**\n * External dependencies\n */\nimport { colord } from 'colord';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useEffect, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { InputWithSlider } from './input-with-slider';\nimport type { HslInputProps } from './types';\n\nexport const HslInput = ( { color, onChange, enableAlpha }: HslInputProps ) => {\n\tconst colorPropHSLA = useMemo( () => color.toHsl(), [ color ] );\n\n\tconst [ internalHSLA, setInternalHSLA ] = useState( { ...colorPropHSLA } );\n\n\tconst isInternalColorSameAsReceivedColor = color.isEqual(\n\t\tcolord( internalHSLA )\n\t);\n\n\tuseEffect( () => {\n\t\tif ( ! isInternalColorSameAsReceivedColor ) {\n\t\t\t// Keep internal HSLA color up to date with the received color prop\n\t\t\tsetInternalHSLA( colorPropHSLA );\n\t\t}\n\t}, [ colorPropHSLA, isInternalColorSameAsReceivedColor ] );\n\n\t// If the internal color is equal to the received color prop, we can use the\n\t// HSLA values from the local state which, compared to the received color prop,\n\t// retain more details about the actual H and S values that the user selected,\n\t// and thus allow for better UX when interacting with the H and S sliders.\n\tconst colorValue = isInternalColorSameAsReceivedColor\n\t\t? internalHSLA\n\t\t: colorPropHSLA;\n\n\tconst updateHSLAValue = (\n\t\tpartialNewValue: Partial< typeof colorPropHSLA >\n\t) => {\n\t\tconst nextOnChangeValue = colord( {\n\t\t\t...colorValue,\n\t\t\t...partialNewValue,\n\t\t} );\n\n\t\t// Fire `onChange` only if the resulting color is different from the\n\t\t// current one.\n\t\t// Otherwise, update the internal HSLA color to cause a re-render.\n\t\tif ( ! color.isEqual( nextOnChangeValue ) ) {\n\t\t\tonChange( nextOnChangeValue );\n\t\t} else {\n\t\t\tsetInternalHSLA( ( prevHSLA ) => ( {\n\t\t\t\t...prevHSLA,\n\t\t\t\t...partialNewValue,\n\t\t\t} ) );\n\t\t}\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<InputWithSlider\n\t\t\t\tmin={ 0 }\n\t\t\t\tmax={ 359 }\n\t\t\t\tlabel=\"Hue\"\n\t\t\t\tabbreviation=\"H\"\n\t\t\t\tvalue={ colorValue.h }\n\t\t\t\tonChange={ ( nextH: number ) => {\n\t\t\t\t\tupdateHSLAValue( { h: nextH } );\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<InputWithSlider\n\t\t\t\tmin={ 0 }\n\t\t\t\tmax={ 100 }\n\t\t\t\tlabel=\"Saturation\"\n\t\t\t\tabbreviation=\"S\"\n\t\t\t\tvalue={ colorValue.s }\n\t\t\t\tonChange={ ( nextS: number ) => {\n\t\t\t\t\tupdateHSLAValue( { s: nextS } );\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<InputWithSlider\n\t\t\t\tmin={ 0 }\n\t\t\t\tmax={ 100 }\n\t\t\t\tlabel=\"Lightness\"\n\t\t\t\tabbreviation=\"L\"\n\t\t\t\tvalue={ colorValue.l }\n\t\t\t\tonChange={ ( nextL: number ) => {\n\t\t\t\t\tupdateHSLAValue( { l: nextL } );\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t{ enableAlpha && (\n\t\t\t\t<InputWithSlider\n\t\t\t\t\tmin={ 0 }\n\t\t\t\t\tmax={ 100 }\n\t\t\t\t\tlabel=\"Alpha\"\n\t\t\t\t\tabbreviation=\"A\"\n\t\t\t\t\tvalue={ Math.trunc( 100 * colorValue.a ) }\n\t\t\t\t\tonChange={ ( nextA: number ) => {\n\t\t\t\t\t\tupdateHSLAValue( { a: nextA / 100 } );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n};\n","/**\n * External dependencies\n */\nimport { colord } from 'colord';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { InputControl } from '../input-control';\nimport { Text } from '../text';\nimport { COLORS } from '../utils/colors-values';\nimport type { StateReducer } from '../input-control/reducer/state';\nimport type { HexInputProps } from './types';\nimport InputControlPrefixWrapper from '../input-control/input-prefix-wrapper';\n\nexport const HexInput = ( { color, onChange, enableAlpha }: HexInputProps ) => {\n\tconst handleChange = ( nextValue: string | undefined ) => {\n\t\tif ( ! nextValue ) {\n\t\t\treturn;\n\t\t}\n\t\tconst hexValue = nextValue.startsWith( '#' )\n\t\t\t? nextValue\n\t\t\t: '#' + nextValue;\n\n\t\tonChange( colord( hexValue ) );\n\t};\n\n\tconst stateReducer: StateReducer = ( state, action ) => {\n\t\tconst nativeEvent = action.payload?.event?.nativeEvent as InputEvent;\n\n\t\tif ( 'insertFromPaste' !== nativeEvent?.inputType ) {\n\t\t\treturn { ...state };\n\t\t}\n\n\t\tconst value = state.value?.startsWith( '#' )\n\t\t\t? state.value.slice( 1 ).toUpperCase()\n\t\t\t: state.value?.toUpperCase();\n\n\t\treturn { ...state, value };\n\t};\n\n\treturn (\n\t\t<InputControl\n\t\t\tprefix={\n\t\t\t\t<InputControlPrefixWrapper>\n\t\t\t\t\t<Text color={ COLORS.theme.accent } lineHeight={ 1 }>\n\t\t\t\t\t\t#\n\t\t\t\t\t</Text>\n\t\t\t\t</InputControlPrefixWrapper>\n\t\t\t}\n\t\t\tvalue={ color.toHex().slice( 1 ).toUpperCase() }\n\t\t\tonChange={ handleChange }\n\t\t\tmaxLength={ enableAlpha ? 9 : 7 }\n\t\t\tlabel={ __( 'Hex color' ) }\n\t\t\thideLabelFromVision\n\t\t\tsize=\"__unstable-large\"\n\t\t\t__unstableStateReducer={ stateReducer }\n\t\t\t__unstableInputWidth=\"9em\"\n\t\t/>\n\t);\n};\n","/**\n * Internal dependencies\n */\nimport { RgbInput } from './rgb-input';\nimport { HslInput } from './hsl-input';\nimport { HexInput } from './hex-input';\nimport type { ColorInputProps } from './types';\n\nexport const ColorInput = ( {\n\tcolorType,\n\tcolor,\n\tonChange,\n\tenableAlpha,\n}: ColorInputProps ) => {\n\tconst props = { color, onChange, enableAlpha };\n\tswitch ( colorType ) {\n\t\tcase 'hsl':\n\t\t\treturn <HslInput { ...props } />;\n\t\tcase 'rgb':\n\t\t\treturn <RgbInput { ...props } />;\n\t\tdefault:\n\t\tcase 'hex':\n\t\t\treturn <HexInput { ...props } />;\n\t}\n};\n","import { useRef } from \"react\";\n\n// Saves incoming handler to the ref in order to avoid \"useCallback hell\"\nexport function useEventCallback<T>(handler?: (value: T) => void): (value: T) => void {\n const callbackRef = useRef(handler);\n const fn = useRef((value: T) => {\n callbackRef.current && callbackRef.current(value);\n });\n callbackRef.current = handler;\n\n return fn.current;\n}\n","// Clamps a value between an upper and lower bound.\n// We use ternary operators because it makes the minified code\n// 2 times shorter then `Math.min(Math.max(a,b),c)`\nexport const clamp = (number: number, min = 0, max = 1): number => {\n return number > max ? max : number < min ? min : number;\n};\n","import React, { useRef, useMemo, useEffect } from \"react\";\n\nimport { useEventCallback } from \"../../hooks/useEventCallback\";\nimport { clamp } from \"../../utils/clamp\";\nexport interface Interaction {\n left: number;\n top: number;\n}\n\n// Check if an event was triggered by touch\nconst isTouch = (event: MouseEvent | TouchEvent): event is TouchEvent => \"touches\" in event;\n\n// Returns a relative position of the pointer inside the node's bounding box\nconst getRelativePosition = (node: HTMLDivElement, event: MouseEvent | TouchEvent): Interaction => {\n const rect = node.getBoundingClientRect();\n\n // Get user's pointer position from `touches` array if it's a `TouchEvent`\n const pointer = isTouch(event) ? event.touches[0] : (event as MouseEvent);\n\n return {\n left: clamp((pointer.pageX - (rect.left + window.pageXOffset)) / rect.width),\n top: clamp((pointer.pageY - (rect.top + window.pageYOffset)) / rect.height),\n };\n};\n\n// Browsers introduced an intervention, making touch events passive by default.\n// This workaround removes `preventDefault` call from the touch handlers.\n// https://github.com/facebook/react/issues/19651\nconst preventDefaultMove = (event: MouseEvent | TouchEvent): void => {\n !isTouch(event) && event.preventDefault();\n};\n\n// Prevent mobile browsers from handling mouse events (conflicting with touch ones).\n// If we detected a touch interaction before, we prefer reacting to touch events only.\nconst isInvalid = (event: MouseEvent | TouchEvent, hasTouch: boolean): boolean => {\n return hasTouch && !isTouch(event);\n};\n\ninterface Props {\n onMove: (interaction: Interaction) => void;\n onKey: (offset: Interaction) => void;\n children: React.ReactNode;\n}\n\nconst InteractiveBase = ({ onMove, onKey, ...rest }: Props) => {\n const container = useRef<HTMLDivElement>(null);\n const onMoveCallback = useEventCallback<Interaction>(onMove);\n const onKeyCallback = useEventCallback<Interaction>(onKey);\n const hasTouch = useRef(false);\n\n const [handleMoveStart, handleKeyDown, toggleDocumentEvents] = useMemo(() => {\n const handleMoveStart = ({ nativeEvent }: React.MouseEvent | React.TouchEvent) => {\n const el = container.current;\n if (!el) return;\n\n // Prevent text selection\n preventDefaultMove(nativeEvent);\n\n if (isInvalid(nativeEvent, hasTouch.current) || !el) return;\n hasTouch.current = isTouch(nativeEvent);\n\n // The node/ref must actually exist when user start an interaction.\n // We won't suppress the ESLint warning though, as it should probably be something to be aware of.\n el.focus();\n onMoveCallback(getRelativePosition(el, nativeEvent));\n toggleDocumentEvents(true);\n };\n\n const handleMove = (event: MouseEvent | TouchEvent) => {\n // Prevent text selection\n preventDefaultMove(event);\n\n // If user moves the pointer outside of the window or iframe bounds and release it there,\n // `mouseup`/`touchend` won't be fired. In order to stop the picker from following the cursor\n // after the user has moved the mouse/finger back to the document, we check `event.buttons`\n // and `event.touches`. It allows us to detect that the user is just moving his pointer\n // without pressing it down\n const isDown = isTouch(event) ? event.touches.length > 0 : event.buttons > 0;\n\n if (isDown && container.current) {\n onMoveCallback(getRelativePosition(container.current, event));\n } else {\n toggleDocumentEvents(false);\n }\n };\n\n const handleMoveEnd = () => toggleDocumentEvents(false);\n\n const handleKeyDown = (event: React.KeyboardEvent) => {\n const keyCode = event.which || event.keyCode;\n\n // Ignore all keys except arrow ones\n if (keyCode < 37 || keyCode > 40) return;\n // Do not scroll page by arrow keys when document is focused on the element\n event.preventDefault();\n // Send relative offset to the parent component.\n // We use codes (37â†, 38↑, 39→, 40↓) instead of keys ('ArrowRight', 'ArrowDown', etc)\n // to reduce the size of the library\n onKeyCallback({\n left: keyCode === 39 ? 0.05 : keyCode === 37 ? -0.05 : 0,\n top: keyCode === 40 ? 0.05 : keyCode === 38 ? -0.05 : 0,\n });\n };\n\n function toggleDocumentEvents(state?: boolean) {\n const touch = hasTouch.current;\n // add or remove additional pointer event listeners\n const toggleEvent = state ? self.addEventListener : self.removeEventListener;\n toggleEvent(touch ? \"touchmove\" : \"mousemove\", handleMove);\n toggleEvent(touch ? \"touchend\" : \"mouseup\", handleMoveEnd);\n }\n\n return [handleMoveStart, handleKeyDown, toggleDocumentEvents];\n }, [onKeyCallback, onMoveCallback]);\n\n // Remove window event listeners before unmounting\n useEffect(() => toggleDocumentEvents, [toggleDocumentEvents]);\n\n return (\n <div\n {...rest}\n onTouchStart={handleMoveStart}\n onMouseDown={handleMoveStart}\n className=\"react-colorful__interactive\"\n ref={container}\n onKeyDown={handleKeyDown}\n tabIndex={0}\n role=\"slider\"\n />\n );\n};\n\nexport const Interactive = React.memo(InteractiveBase);\n","export const formatClassName = (names: unknown[]): string => names.filter(Boolean).join(\" \");\n","import React from \"react\";\nimport { formatClassName } from \"../../utils/format\";\n\ninterface Props {\n className?: string;\n top?: number;\n left: number;\n color: string;\n}\n\nexport const Pointer = ({ className, color, left, top = 0.5 }: Props): JSX.Element => {\n const nodeClassName = formatClassName([\"react-colorful__pointer\", className]);\n\n const style = {\n top: `${top * 100}%`,\n left: `${left * 100}%`,\n };\n\n return (\n <div className={nodeClassName} style={style}>\n <div className=\"react-colorful__pointer-fill\" style={{ backgroundColor: color }} />\n </div>\n );\n};\n","export const round = (number: number, digits = 0, base = Math.pow(10, digits)): number => {\n return Math.round(base * number) / base;\n};\n","import { round } from \"./round\";\nimport { RgbaColor, RgbColor, HslaColor, HslColor, HsvaColor, HsvColor } from \"../types\";\n\n/**\n * Valid CSS <angle> units.\n * https://developer.mozilla.org/en-US/docs/Web/CSS/angle\n */\nconst angleUnits: Record<string, number> = {\n grad: 360 / 400,\n turn: 360,\n rad: 360 / (Math.PI * 2),\n};\n\nexport const hexToHsva = (hex: string): HsvaColor => rgbaToHsva(hexToRgba(hex));\n\nexport const hexToRgba = (hex: string): RgbaColor => {\n if (hex[0] === \"#\") hex = hex.substr(1);\n\n if (hex.length < 6) {\n return {\n r: parseInt(hex[0] + hex[0], 16),\n g: parseInt(hex[1] + hex[1], 16),\n b: parseInt(hex[2] + hex[2], 16),\n a: 1,\n };\n }\n\n return {\n r: parseInt(hex.substr(0, 2), 16),\n g: parseInt(hex.substr(2, 2), 16),\n b: parseInt(hex.substr(4, 2), 16),\n a: 1,\n };\n};\n\nexport const parseHue = (value: string, unit = \"deg\"): number => {\n return Number(value) * (angleUnits[unit] || 1);\n};\n\nexport const hslaStringToHsva = (hslString: string): HsvaColor => {\n const matcher = /hsla?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i;\n const match = matcher.exec(hslString);\n\n if (!match) return { h: 0, s: 0, v: 0, a: 1 };\n\n return hslaToHsva({\n h: parseHue(match[1], match[2]),\n s: Number(match[3]),\n l: Number(match[4]),\n a: match[5] === undefined ? 1 : Number(match[5]) / (match[6] ? 100 : 1),\n });\n};\n\nexport const hslStringToHsva = hslaStringToHsva;\n\nexport const hslaToHsva = ({ h, s, l, a }: HslaColor): HsvaColor => {\n s *= (l < 50 ? l : 100 - l) / 100;\n\n return {\n h: h,\n s: s > 0 ? ((2 * s) / (l + s)) * 100 : 0,\n v: l + s,\n a,\n };\n};\n\nexport const hsvaToHex = (hsva: HsvaColor): string => rgbaToHex(hsvaToRgba(hsva));\n\nexport const hsvaToHsla = ({ h, s, v, a }: HsvaColor): HslaColor => {\n const hh = ((200 - s) * v) / 100;\n\n return {\n h: round(h),\n s: round(hh > 0 && hh < 200 ? ((s * v) / 100 / (hh <= 100 ? hh : 200 - hh)) * 100 : 0),\n l: round(hh / 2),\n a: round(a, 2),\n };\n};\n\nexport const hsvaToHslString = (hsva: HsvaColor): string => {\n const { h, s, l } = hsvaToHsla(hsva);\n return `hsl(${h}, ${s}%, ${l}%)`;\n};\n\nexport const hsvaToHsvString = (hsva: HsvaColor): string => {\n const { h, s, v } = roundHsva(hsva);\n return `hsv(${h}, ${s}%, ${v}%)`;\n};\n\nexport const hsvaToHsvaString = (hsva: HsvaColor): string => {\n const { h, s, v, a } = roundHsva(hsva);\n return `hsva(${h}, ${s}%, ${v}%, ${a})`;\n};\n\nexport const hsvaToHslaString = (hsva: HsvaColor): string => {\n const { h, s, l, a } = hsvaToHsla(hsva);\n return `hsla(${h}, ${s}%, ${l}%, ${a})`;\n};\n\nexport const hsvaToRgba = ({ h, s, v, a }: HsvaColor): RgbaColor => {\n h = (h / 360) * 6;\n s = s / 100;\n v = v / 100;\n\n const hh = Math.floor(h),\n b = v * (1 - s),\n c = v * (1 - (h - hh) * s),\n d = v * (1 - (1 - h + hh) * s),\n module = hh % 6;\n\n return {\n r: round([v, c, b, b, d, v][module] * 255),\n g: round([d, v, v, c, b, b][module] * 255),\n b: round([b, b, d, v, v, c][module] * 255),\n a: round(a, 2),\n };\n};\n\nexport const hsvaToRgbString = (hsva: HsvaColor): string => {\n const { r, g, b } = hsvaToRgba(hsva);\n return `rgb(${r}, ${g}, ${b})`;\n};\n\nexport const hsvaToRgbaString = (hsva: HsvaColor): string => {\n const { r, g, b, a } = hsvaToRgba(hsva);\n return `rgba(${r}, ${g}, ${b}, ${a})`;\n};\n\nexport const hsvaStringToHsva = (hsvString: string): HsvaColor => {\n const matcher = /hsva?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i;\n const match = matcher.exec(hsvString);\n\n if (!match) return { h: 0, s: 0, v: 0, a: 1 };\n\n return roundHsva({\n h: parseHue(match[1], match[2]),\n s: Number(match[3]),\n v: Number(match[4]),\n a: match[5] === undefined ? 1 : Number(match[5]) / (match[6] ? 100 : 1),\n });\n};\n\nexport const hsvStringToHsva = hsvaStringToHsva;\n\nexport const rgbaStringToHsva = (rgbaString: string): HsvaColor => {\n const matcher = /rgba?\\(?\\s*(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i;\n const match = matcher.exec(rgbaString);\n\n if (!match) return { h: 0, s: 0, v: 0, a: 1 };\n\n return rgbaToHsva({\n r: Number(match[1]) / (match[2] ? 100 / 255 : 1),\n g: Number(match[3]) / (match[4] ? 100 / 255 : 1),\n b: Number(match[5]) / (match[6] ? 100 / 255 : 1),\n a: match[7] === undefined ? 1 : Number(match[7]) / (match[8] ? 100 : 1),\n });\n};\n\nexport const rgbStringToHsva = rgbaStringToHsva;\n\nconst format = (number: number) => {\n const hex = number.toString(16);\n return hex.length < 2 ? \"0\" + hex : hex;\n};\n\nexport const rgbaToHex = ({ r, g, b }: RgbaColor): string => {\n return \"#\" + format(r) + format(g) + format(b);\n};\n\nexport const rgbaToHsva = ({ r, g, b, a }: RgbaColor): HsvaColor => {\n const max = Math.max(r, g, b);\n const delta = max - Math.min(r, g, b);\n\n // prettier-ignore\n const hh = delta\n ? max === r\n ? (g - b) / delta\n : max === g\n ? 2 + (b - r) / delta\n : 4 + (r - g) / delta\n : 0;\n\n return {\n h: round(60 * (hh < 0 ? hh + 6 : hh)),\n s: round(max ? (delta / max) * 100 : 0),\n v: round((max / 255) * 100),\n a,\n };\n};\n\nexport const roundHsva = (hsva: HsvaColor): HsvaColor => ({\n h: round(hsva.h),\n s: round(hsva.s),\n v: round(hsva.v),\n a: round(hsva.a, 2),\n});\n\nexport const rgbaToRgb = ({ r, g, b }: RgbaColor): RgbColor => ({ r, g, b });\n\nexport const hslaToHsl = ({ h, s, l }: HslaColor): HslColor => ({ h, s, l });\n\nexport const hsvaToHsv = (hsva: HsvaColor): HsvColor => {\n const { h, s, v } = roundHsva(hsva);\n return { h, s, v };\n};\n","import React from \"react\";\n\nimport { Interactive, Interaction } from \"./Interactive\";\nimport { Pointer } from \"./Pointer\";\n\nimport { hsvaToHslString } from \"../../utils/convert\";\nimport { formatClassName } from \"../../utils/format\";\nimport { clamp } from \"../../utils/clamp\";\nimport { round } from \"../../utils/round\";\n\ninterface Props {\n className?: string;\n hue: number;\n onChange: (newHue: { h: number }) => void;\n}\n\nconst HueBase = ({ className, hue, onChange }: Props) => {\n const handleMove = (interaction: Interaction) => {\n onChange({ h: 360 * interaction.left });\n };\n\n const handleKey = (offset: Interaction) => {\n // Hue measured in degrees of the color circle ranging from 0 to 360\n onChange({\n h: clamp(hue + offset.left * 360, 0, 360),\n });\n };\n\n const nodeClassName = formatClassName([\"react-colorful__hue\", className]);\n\n return (\n <div className={nodeClassName}>\n <Interactive\n onMove={handleMove}\n onKey={handleKey}\n aria-label=\"Hue\"\n aria-valuetext={round(hue)}\n >\n <Pointer\n className=\"react-colorful__hue-pointer\"\n left={hue / 360}\n color={hsvaToHslString({ h: hue, s: 100, v: 100, a: 1 })}\n />\n </Interactive>\n </div>\n );\n};\n\nexport const Hue = React.memo(HueBase);\n","import React from \"react\";\nimport { Interactive, Interaction } from \"./Interactive\";\nimport { Pointer } from \"./Pointer\";\nimport { HsvaColor } from \"../../types\";\nimport { hsvaToHslString } from \"../../utils/convert\";\nimport { clamp } from \"../../utils/clamp\";\nimport { round } from \"../../utils/round\";\n\ninterface Props {\n hsva: HsvaColor;\n onChange: (newColor: { s: number; v: number }) => void;\n}\n\nconst SaturationBase = ({ hsva, onChange }: Props) => {\n const handleMove = (interaction: Interaction) => {\n onChange({\n s: interaction.left * 100,\n v: 100 - interaction.top * 100,\n });\n };\n\n const handleKey = (offset: Interaction) => {\n // Saturation and brightness always fit into [0, 100] range\n onChange({\n s: clamp(hsva.s + offset.left * 100, 0, 100),\n v: clamp(hsva.v - offset.top * 100, 0, 100),\n });\n };\n\n const containerStyle = {\n backgroundColor: hsvaToHslString({ h: hsva.h, s: 100, v: 100, a: 1 }),\n };\n\n return (\n <div className=\"react-colorful__saturation\" style={containerStyle}>\n <Interactive\n onMove={handleMove}\n onKey={handleKey}\n aria-label=\"Color\"\n aria-valuetext={`Saturation ${round(hsva.s)}%, Brightness ${round(hsva.v)}%`}\n >\n <Pointer\n className=\"react-colorful__saturation-pointer\"\n top={1 - hsva.v / 100}\n left={hsva.s / 100}\n color={hsvaToHslString(hsva)}\n />\n </Interactive>\n </div>\n );\n};\n\nexport const Saturation = React.memo(SaturationBase);\n","import { hexToRgba } from \"./convert\";\nimport { ObjectColor } from \"../types\";\n\nexport const equalColorObjects = (first: ObjectColor, second: ObjectColor): boolean => {\n if (first === second) return true;\n\n for (const prop in first) {\n // The following allows for a type-safe calling of this function (first & second have to be HSL, HSV, or RGB)\n // with type-unsafe iterating over object keys. TS does not allow this without an index (`[key: string]: number`)\n // on an object to define how iteration is normally done. To ensure extra keys are not allowed on our types,\n // we must cast our object to unknown (as RGB demands `r` be a key, while `Record<string, x>` does not care if\n // there is or not), and then as a type TS can iterate over.\n if (\n ((first as unknown) as Record<string, number>)[prop] !==\n ((second as unknown) as Record<string, number>)[prop]\n )\n return false;\n }\n\n return true;\n};\n\nexport const equalColorString = (first: string, second: string): boolean => {\n return first.replace(/\\s/g, \"\") === second.replace(/\\s/g, \"\");\n};\n\nexport const equalHex = (first: string, second: string): boolean => {\n if (first.toLowerCase() === second.toLowerCase()) return true;\n\n // To compare colors like `#FFF` and `ffffff` we convert them into RGB objects\n return equalColorObjects(hexToRgba(first), hexToRgba(second));\n};\n","import { useState, useEffect, useCallback, useRef } from \"react\";\nimport { ColorModel, AnyColor, HsvaColor } from \"../types\";\nimport { equalColorObjects } from \"../utils/compare\";\nimport { useEventCallback } from \"./useEventCallback\";\n\nexport function useColorManipulation<T extends AnyColor>(\n colorModel: ColorModel<T>,\n color: T,\n onChange?: (color: T) => void\n): [HsvaColor, (color: Partial<HsvaColor>) => void] {\n // Save onChange callback in the ref for avoiding \"useCallback hell\"\n const onChangeCallback = useEventCallback<T>(onChange);\n\n // No matter which color model is used (HEX, RGB(A) or HSL(A)),\n // all internal calculations are based on HSVA model\n const [hsva, updateHsva] = useState<HsvaColor>(() => colorModel.toHsva(color));\n\n // By using this ref we're able to prevent extra updates\n // and the effects recursion during the color conversion\n const cache = useRef({ color, hsva });\n\n // Update local HSVA-value if `color` property value is changed,\n // but only if that's not the same color that we just sent to the parent\n useEffect(() => {\n if (!colorModel.equal(color, cache.current.color)) {\n const newHsva = colorModel.toHsva(color);\n cache.current = { hsva: newHsva, color };\n updateHsva(newHsva);\n }\n }, [color, colorModel]);\n\n // Trigger `onChange` callback only if an updated color is different from cached one;\n // save the new color to the ref to prevent unnecessary updates\n useEffect(() => {\n let newColor;\n if (\n !equalColorObjects(hsva, cache.current.hsva) &&\n !colorModel.equal((newColor = colorModel.fromHsva(hsva)), cache.current.color)\n ) {\n cache.current = { hsva, color: newColor };\n onChangeCallback(newColor);\n }\n }, [hsva, colorModel, onChangeCallback]);\n\n // Merge the current HSVA color object with updated params.\n // For example, when a child component sends `h` or `s` only\n const handleChange = useCallback((params: Partial<HsvaColor>) => {\n updateHsva((current) => Object.assign({}, current, params));\n }, []);\n\n return [hsva, handleChange];\n}\n","import { useIsomorphicLayoutEffect } from \"./useIsomorphicLayoutEffect\";\nimport { getNonce } from \"../utils/nonce\";\n\n// Bundler is configured to load this as a processed minified CSS-string\nimport styles from \"../css/styles.css\";\n\nlet styleElement: HTMLStyleElement | undefined;\n\n/**\n * Injects CSS code into the document's <head>\n */\nexport const useStyleSheet = (): void => {\n useIsomorphicLayoutEffect(() => {\n if (typeof document !== \"undefined\" && !styleElement) {\n styleElement = document.createElement(\"style\");\n styleElement.innerHTML = styles;\n\n // Conform to CSP rules by setting `nonce` attribute to the inline styles\n const nonce = getNonce();\n if (nonce) styleElement.setAttribute(\"nonce\", nonce);\n\n document.head.appendChild(styleElement);\n }\n }, []);\n};\n","import { useLayoutEffect, useEffect } from \"react\";\n\n// React currently throws a warning when using useLayoutEffect on the server.\n// To get around it, we can conditionally useEffect on the server (no-op) and\n// useLayoutEffect in the browser.\nexport const useIsomorphicLayoutEffect =\n typeof window !== \"undefined\" ? useLayoutEffect : useEffect;\n","declare const __webpack_nonce__: string | undefined;\nlet nonce: string | undefined;\n\n/**\n * Returns a nonce hash included by Webpack or the one defined manually by developer.\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/nonce\n * https://webpack.js.org/guides/csp/\n */\nexport const getNonce = (): string | undefined => {\n if (nonce) return nonce;\n if (typeof __webpack_nonce__ !== \"undefined\") return __webpack_nonce__;\n return undefined;\n};\n\n/**\n * Signs the style tag with a base64-encoded string (nonce) to conforms to Content Security Policies.\n * This function has to be invoked before any picker is rendered if you aren't using Webpack for CSP.\n */\nexport const setNonce = (hash: string): void => {\n nonce = hash;\n};\n","import React from \"react\";\n\nimport { Hue } from \"./Hue\";\nimport { Saturation } from \"./Saturation\";\n\nimport { ColorModel, ColorPickerBaseProps, AnyColor } from \"../../types\";\nimport { useColorManipulation } from \"../../hooks/useColorManipulation\";\nimport { useStyleSheet } from \"../../hooks/useStyleSheet\";\nimport { formatClassName } from \"../../utils/format\";\n\ninterface Props<T extends AnyColor> extends Partial<ColorPickerBaseProps<T>> {\n colorModel: ColorModel<T>;\n}\n\nexport const ColorPicker = <T extends AnyColor>({\n className,\n colorModel,\n color = colorModel.defaultColor,\n onChange,\n ...rest\n}: Props<T>): JSX.Element => {\n useStyleSheet();\n\n const [hsva, updateHsva] = useColorManipulation<T>(colorModel, color, onChange);\n\n const nodeClassName = formatClassName([\"react-colorful\", className]);\n\n return (\n <div {...rest} className={nodeClassName}>\n <Saturation hsva={hsva} onChange={updateHsva} />\n <Hue hue={hsva.h} onChange={updateHsva} className=\"react-colorful__last-control\" />\n </div>\n );\n};\n","import React from \"react\";\n\nimport { Interactive, Interaction } from \"./Interactive\";\nimport { Pointer } from \"./Pointer\";\n\nimport { hsvaToHslaString } from \"../../utils/convert\";\nimport { formatClassName } from \"../../utils/format\";\nimport { clamp } from \"../../utils/clamp\";\nimport { round } from \"../../utils/round\";\nimport { HsvaColor } from \"../../types\";\n\ninterface Props {\n className?: string;\n hsva: HsvaColor;\n onChange: (newAlpha: { a: number }) => void;\n}\n\nexport const Alpha = ({ className, hsva, onChange }: Props): JSX.Element => {\n const handleMove = (interaction: Interaction) => {\n onChange({ a: interaction.left });\n };\n\n const handleKey = (offset: Interaction) => {\n // Alpha always fit into [0, 1] range\n onChange({ a: clamp(hsva.a + offset.left) });\n };\n\n // We use `Object.assign` instead of the spread operator\n // to prevent adding the polyfill (about 150 bytes gzipped)\n const colorFrom = hsvaToHslaString(Object.assign({}, hsva, { a: 0 }));\n const colorTo = hsvaToHslaString(Object.assign({}, hsva, { a: 1 }));\n\n const gradientStyle = {\n backgroundImage: `linear-gradient(90deg, ${colorFrom}, ${colorTo})`,\n };\n\n const nodeClassName = formatClassName([\"react-colorful__alpha\", className]);\n\n return (\n <div className={nodeClassName}>\n <div className=\"react-colorful__alpha-gradient\" style={gradientStyle} />\n <Interactive\n onMove={handleMove}\n onKey={handleKey}\n aria-label=\"Alpha\"\n aria-valuetext={`${round(hsva.a * 100)}%`}\n >\n <Pointer\n className=\"react-colorful__alpha-pointer\"\n left={hsva.a}\n color={hsvaToHslaString(hsva)}\n />\n </Interactive>\n </div>\n );\n};\n","import React from \"react\";\n\nimport { Hue } from \"./Hue\";\nimport { Saturation } from \"./Saturation\";\nimport { Alpha } from \"./Alpha\";\n\nimport { ColorModel, ColorPickerBaseProps, AnyColor } from \"../../types\";\nimport { useColorManipulation } from \"../../hooks/useColorManipulation\";\nimport { useStyleSheet } from \"../../hooks/useStyleSheet\";\nimport { formatClassName } from \"../../utils/format\";\n\ninterface Props<T extends AnyColor> extends Partial<ColorPickerBaseProps<T>> {\n colorModel: ColorModel<T>;\n}\n\nexport const AlphaColorPicker = <T extends AnyColor>({\n className,\n colorModel,\n color = colorModel.defaultColor,\n onChange,\n ...rest\n}: Props<T>): JSX.Element => {\n useStyleSheet();\n\n const [hsva, updateHsva] = useColorManipulation<T>(colorModel, color, onChange);\n\n const nodeClassName = formatClassName([\"react-colorful\", className]);\n\n return (\n <div {...rest} className={nodeClassName}>\n <Saturation hsva={hsva} onChange={updateHsva} />\n <Hue hue={hsva.h} onChange={updateHsva} />\n <Alpha hsva={hsva} onChange={updateHsva} className=\"react-colorful__last-control\" />\n </div>\n );\n};\n","import React from \"react\";\n\nimport { AlphaColorPicker } from \"./common/AlphaColorPicker\";\nimport { ColorModel, ColorPickerBaseProps } from \"../types\";\nimport { equalColorString } from \"../utils/compare\";\nimport { rgbaStringToHsva, hsvaToRgbaString } from \"../utils/convert\";\n\nconst colorModel: ColorModel<string> = {\n defaultColor: \"rgba(0, 0, 0, 1)\",\n toHsva: rgbaStringToHsva,\n fromHsva: hsvaToRgbaString,\n equal: equalColorString,\n};\n\nexport const RgbaStringColorPicker = (\n props: Partial<ColorPickerBaseProps<string>>\n): JSX.Element => <AlphaColorPicker {...props} colorModel={colorModel} />;\n","import React from \"react\";\n\nimport { ColorPicker } from \"./common/ColorPicker\";\nimport { ColorModel, ColorPickerBaseProps } from \"../types\";\nimport { equalColorString } from \"../utils/compare\";\nimport { rgbStringToHsva, hsvaToRgbString } from \"../utils/convert\";\n\nconst colorModel: ColorModel<string> = {\n defaultColor: \"rgb(0, 0, 0)\",\n toHsva: rgbStringToHsva,\n fromHsva: hsvaToRgbString,\n equal: equalColorString,\n};\n\nexport const RgbStringColorPicker = (props: Partial<ColorPickerBaseProps<string>>): JSX.Element => (\n <ColorPicker {...props} colorModel={colorModel} />\n);\n","/**\n * External dependencies\n */\nimport { RgbStringColorPicker, RgbaStringColorPicker } from 'react-colorful';\nimport { colord } from 'colord';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport type { PickerProps } from './types';\n\nexport const Picker = ( { color, enableAlpha, onChange }: PickerProps ) => {\n\tconst Component = enableAlpha\n\t\t? RgbaStringColorPicker\n\t\t: RgbStringColorPicker;\n\tconst rgbColor = useMemo( () => color.toRgbString(), [ color ] );\n\n\treturn (\n\t\t<Component\n\t\t\tcolor={ rgbColor }\n\t\t\tonChange={ ( nextColor ) => {\n\t\t\t\tonChange( colord( nextColor ) );\n\t\t\t} }\n\t\t\t// Pointer capture fortifies drag gestures so that they continue to\n\t\t\t// work while dragging outside the component over objects like\n\t\t\t// iframes. If a newer version of react-colorful begins to employ\n\t\t\t// pointer capture this will be redundant and should be removed.\n\t\t\tonPointerDown={ ( { currentTarget, pointerId } ) => {\n\t\t\t\tcurrentTarget.setPointerCapture( pointerId );\n\t\t\t} }\n\t\t\tonPointerUp={ ( { currentTarget, pointerId } ) => {\n\t\t\t\tcurrentTarget.releasePointerCapture( pointerId );\n\t\t\t} }\n\t\t/>\n\t);\n};\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\nimport type { Colord } from 'colord';\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback, useState, useMemo } from '@wordpress/element';\nimport { useDebounce } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem, contextConnect } from '../context';\nimport {\n\tColorfulWrapper,\n\tSelectControl,\n\tAuxiliaryColorArtefactWrapper,\n\tAuxiliaryColorArtefactHStackHeader,\n\tColorInputWrapper,\n} from './styles';\nimport { ColorCopyButton } from './color-copy-button';\nimport { ColorInput } from './color-input';\nimport { Picker } from './picker';\nimport { useControlledValue } from '../utils/hooks';\n\nimport type { ColorPickerProps, ColorType } from './types';\n\nextend( [ namesPlugin ] );\n\nconst options = [\n\t{ label: 'RGB', value: 'rgb' as const },\n\t{ label: 'HSL', value: 'hsl' as const },\n\t{ label: 'Hex', value: 'hex' as const },\n];\n\nconst UnconnectedColorPicker = (\n\tprops: ColorPickerProps,\n\tforwardedRef: ForwardedRef< any >\n) => {\n\tconst {\n\t\tenableAlpha = false,\n\t\tcolor: colorProp,\n\t\tonChange,\n\t\tdefaultValue = '#fff',\n\t\tcopyFormat,\n\t\t...divProps\n\t} = useContextSystem( props, 'ColorPicker' );\n\n\t// Use a safe default value for the color and remove the possibility of `undefined`.\n\tconst [ color, setColor ] = useControlledValue( {\n\t\tonChange,\n\t\tvalue: colorProp,\n\t\tdefaultValue,\n\t} );\n\n\tconst safeColordColor = useMemo( () => {\n\t\treturn colord( color || '' );\n\t}, [ color ] );\n\n\tconst debouncedSetColor = useDebounce( setColor );\n\n\tconst handleChange = useCallback(\n\t\t( nextValue: Colord ) => {\n\t\t\tdebouncedSetColor( nextValue.toHex() );\n\t\t},\n\t\t[ debouncedSetColor ]\n\t);\n\n\tconst [ colorType, setColorType ] = useState< ColorType >(\n\t\tcopyFormat || 'hex'\n\t);\n\n\treturn (\n\t\t<ColorfulWrapper ref={ forwardedRef } { ...divProps }>\n\t\t\t<Picker\n\t\t\t\tonChange={ handleChange }\n\t\t\t\tcolor={ safeColordColor }\n\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t/>\n\t\t\t<AuxiliaryColorArtefactWrapper>\n\t\t\t\t<AuxiliaryColorArtefactHStackHeader justify=\"space-between\">\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\toptions={ options }\n\t\t\t\t\t\tvalue={ colorType }\n\t\t\t\t\t\tonChange={ ( nextColorType ) =>\n\t\t\t\t\t\t\tsetColorType( nextColorType as ColorType )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlabel={ __( 'Color format' ) }\n\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\tvariant=\"minimal\"\n\t\t\t\t\t/>\n\t\t\t\t\t<ColorCopyButton\n\t\t\t\t\t\tcolor={ safeColordColor }\n\t\t\t\t\t\tcolorType={ copyFormat || colorType }\n\t\t\t\t\t/>\n\t\t\t\t</AuxiliaryColorArtefactHStackHeader>\n\t\t\t\t<ColorInputWrapper direction=\"column\" gap={ 2 }>\n\t\t\t\t\t<ColorInput\n\t\t\t\t\t\tcolorType={ colorType }\n\t\t\t\t\t\tcolor={ safeColordColor }\n\t\t\t\t\t\tonChange={ handleChange }\n\t\t\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t\t\t/>\n\t\t\t\t</ColorInputWrapper>\n\t\t\t</AuxiliaryColorArtefactWrapper>\n\t\t</ColorfulWrapper>\n\t);\n};\n\nexport const ColorPicker = contextConnect(\n\tUnconnectedColorPicker,\n\t'ColorPicker'\n);\n\nexport default ColorPicker;\n","/**\n * External dependencies\n */\nimport { colord } from 'colord';\nimport memoize from 'memize';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { ColorPickerProps, LegacyColor, LegacyProps } from './types';\n\nfunction isLegacyProps( props: any ): props is LegacyProps {\n\treturn (\n\t\ttypeof props.onChangeComplete !== 'undefined' ||\n\t\ttypeof props.disableAlpha !== 'undefined' ||\n\t\ttypeof props.color?.hex === 'string'\n\t);\n}\n\nfunction getColorFromLegacyProps(\n\tcolor: LegacyProps[ 'color' ]\n): string | undefined {\n\tif ( color === undefined ) {\n\t\treturn;\n\t}\n\n\tif ( typeof color === 'string' ) {\n\t\treturn color;\n\t}\n\n\tif ( color.hex ) {\n\t\treturn color.hex;\n\t}\n\n\treturn undefined;\n}\n\nconst transformColorStringToLegacyColor = memoize(\n\t( color: string ): LegacyColor => {\n\t\tconst colordColor = colord( color );\n\t\tconst hex = colordColor.toHex();\n\t\tconst rgb = colordColor.toRgb();\n\t\tconst hsv = colordColor.toHsv();\n\t\tconst hsl = colordColor.toHsl();\n\n\t\treturn {\n\t\t\thex,\n\t\t\trgb,\n\t\t\thsv,\n\t\t\thsl,\n\t\t\tsource: 'hex',\n\t\t\toldHue: hsl.h,\n\t\t};\n\t}\n);\n\nexport function useDeprecatedProps(\n\tprops: LegacyProps | ColorPickerProps\n): ColorPickerProps {\n\tconst { onChangeComplete } = props as LegacyProps;\n\tconst legacyChangeHandler = useCallback(\n\t\t( color: string ) => {\n\t\t\tonChangeComplete( transformColorStringToLegacyColor( color ) );\n\t\t},\n\t\t[ onChangeComplete ]\n\t);\n\tif ( isLegacyProps( props ) ) {\n\t\treturn {\n\t\t\tcolor: getColorFromLegacyProps( props.color ),\n\t\t\tenableAlpha: ! props.disableAlpha,\n\t\t\tonChange: legacyChangeHandler,\n\t\t};\n\t}\n\treturn {\n\t\t...props,\n\t\tcolor: props.color as ColorPickerProps[ 'color' ],\n\t\tenableAlpha: ( props as ColorPickerProps ).enableAlpha,\n\t\tonChange: ( props as ColorPickerProps ).onChange,\n\t};\n}\n","/**\n * Internal dependencies\n */\nimport ColorPicker from './component';\nimport type { LegacyAdapterProps } from './types';\nimport { useDeprecatedProps } from './use-deprecated-props';\n\nexport const LegacyAdapter = ( props: LegacyAdapterProps ) => {\n\treturn <ColorPicker { ...useDeprecatedProps( props ) } />;\n};\n","/**\n * WordPress dependencies\n */\nimport { createContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { CircularOptionPickerContextProps } from './types';\n\nexport const CircularOptionPickerContext =\n\tcreateContext< CircularOptionPickerContextProps >( {} );\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst check = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z\" />\n\t</SVG>\n);\n\nexport default check;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef, useContext, useEffect } from '@wordpress/element';\nimport { Icon, check } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { CircularOptionPickerContext } from './circular-option-picker-context';\nimport Button from '../button';\nimport { Composite } from '../composite';\nimport type { OptionProps } from './types';\n\nfunction UnforwardedOptionAsButton(\n\tprops: {\n\t\tid?: string;\n\t\tclassName?: string;\n\t\tisPressed?: boolean;\n\t\tlabel?: string;\n\t},\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst { isPressed, label, ...additionalProps } = props;\n\treturn (\n\t\t<Button\n\t\t\t{ ...additionalProps }\n\t\t\taria-pressed={ isPressed }\n\t\t\tref={ forwardedRef }\n\t\t\tlabel={ label }\n\t\t/>\n\t);\n}\n\nconst OptionAsButton = forwardRef( UnforwardedOptionAsButton );\n\nfunction UnforwardedOptionAsOption(\n\tprops: {\n\t\tid: string;\n\t\tclassName?: string;\n\t\tisSelected?: boolean;\n\t\tlabel?: string;\n\t},\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst { id, isSelected, label, ...additionalProps } = props;\n\n\tconst { setActiveId, activeId } = useContext( CircularOptionPickerContext );\n\n\tuseEffect( () => {\n\t\tif ( isSelected && ! activeId ) {\n\t\t\t// The setTimeout call is necessary to make sure that this update\n\t\t\t// doesn't get overridden by `Composite`'s internal logic, which picks\n\t\t\t// an initial active item if one is not specifically set.\n\t\t\twindow.setTimeout( () => setActiveId?.( id ), 0 );\n\t\t}\n\t}, [ isSelected, setActiveId, activeId, id ] );\n\n\treturn (\n\t\t<Composite.Item\n\t\t\trender={\n\t\t\t\t<Button\n\t\t\t\t\t{ ...additionalProps }\n\t\t\t\t\trole=\"option\"\n\t\t\t\t\taria-selected={ !! isSelected }\n\t\t\t\t\tref={ forwardedRef }\n\t\t\t\t\tlabel={ label }\n\t\t\t\t/>\n\t\t\t}\n\t\t\tid={ id }\n\t\t/>\n\t);\n}\n\nconst OptionAsOption = forwardRef( UnforwardedOptionAsOption );\n\nexport function Option( {\n\tclassName,\n\tisSelected,\n\tselectedIconProps = {},\n\ttooltipText,\n\t...additionalProps\n}: OptionProps ) {\n\tconst { baseId, setActiveId } = useContext( CircularOptionPickerContext );\n\tconst id = useInstanceId(\n\t\tOption,\n\t\tbaseId || 'components-circular-option-picker__option'\n\t);\n\n\tconst commonProps = {\n\t\tid,\n\t\tclassName: 'components-circular-option-picker__option',\n\t\t__next40pxDefaultSize: true,\n\t\t...additionalProps,\n\t};\n\n\tconst isListbox = setActiveId !== undefined;\n\tconst optionControl = isListbox ? (\n\t\t<OptionAsOption\n\t\t\t{ ...commonProps }\n\t\t\tlabel={ tooltipText }\n\t\t\tisSelected={ isSelected }\n\t\t/>\n\t) : (\n\t\t<OptionAsButton\n\t\t\t{ ...commonProps }\n\t\t\tlabel={ tooltipText }\n\t\t\tisPressed={ isSelected }\n\t\t/>\n\t);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ clsx(\n\t\t\t\tclassName,\n\t\t\t\t'components-circular-option-picker__option-wrapper'\n\t\t\t) }\n\t\t>\n\t\t\t{ optionControl }\n\t\t\t{ isSelected && <Icon icon={ check } { ...selectedIconProps } /> }\n\t\t</div>\n\t);\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { isRTL } from '@wordpress/i18n';\nimport { useMemo, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { CircularOptionPickerContext } from './circular-option-picker-context';\nimport { Composite } from '../composite';\nimport type {\n\tCircularOptionPickerProps,\n\tListboxCircularOptionPickerProps,\n\tButtonsCircularOptionPickerProps,\n} from './types';\nimport { Option } from './circular-option-picker-option';\nimport { OptionGroup } from './circular-option-picker-option-group';\nimport {\n\tButtonAction,\n\tDropdownLinkAction,\n} from './circular-option-picker-actions';\n\n/**\n *`CircularOptionPicker` is a component that displays a set of options as circular buttons.\n *\n * ```jsx\n * import { CircularOptionPicker } from '../circular-option-picker';\n * import { useState } from '@wordpress/element';\n *\n * const Example = () => {\n * \tconst [ currentColor, setCurrentColor ] = useState();\n * \tconst colors = [\n * \t\t{ color: '#f00', name: 'Red' },\n * \t\t{ color: '#0f0', name: 'Green' },\n * \t\t{ color: '#00f', name: 'Blue' },\n * \t];\n * \tconst colorOptions = (\n * \t\t<>\n * \t\t\t{ colors.map( ( { color, name }, index ) => {\n * \t\t\t\treturn (\n * \t\t\t\t\t<CircularOptionPicker.Option\n * \t\t\t\t\t\tkey={ `${ color }-${ index }` }\n * \t\t\t\t\t\ttooltipText={ name }\n * \t\t\t\t\t\tstyle={ { backgroundColor: color, color } }\n * \t\t\t\t\t\tisSelected={ index === currentColor }\n * \t\t\t\t\t\tonClick={ () => setCurrentColor( index ) }\n * \t\t\t\t\t/>\n * \t\t\t\t);\n * \t\t\t} ) }\n * \t\t</>\n * \t);\n * \treturn (\n * \t\t<CircularOptionPicker\n * \t\t\t\toptions={ colorOptions }\n * \t\t\t\tactions={\n * \t\t\t\t\t<CircularOptionPicker.ButtonAction\n * \t\t\t\t\t\tonClick={ () => setCurrentColor( undefined ) }\n * \t\t\t\t\t>\n * \t\t\t\t\t\t{ 'Clear' }\n * \t\t\t\t\t</CircularOptionPicker.ButtonAction>\n * \t\t\t\t}\n * \t\t\t/>\n * \t);\n * };\n * ```\n */\n\nfunction ListboxCircularOptionPicker(\n\tprops: ListboxCircularOptionPickerProps\n) {\n\tconst {\n\t\tactions,\n\t\toptions,\n\t\tbaseId,\n\t\tclassName,\n\t\tloop = true,\n\t\tchildren,\n\t\t...additionalProps\n\t} = props;\n\n\tconst [ activeId, setActiveId ] = useState< string | null | undefined >(\n\t\tundefined\n\t);\n\n\tconst contextValue = useMemo(\n\t\t() => ( {\n\t\t\tbaseId,\n\t\t\tactiveId,\n\t\t\tsetActiveId,\n\t\t} ),\n\t\t[ baseId, activeId, setActiveId ]\n\t);\n\n\treturn (\n\t\t<div className={ className }>\n\t\t\t<CircularOptionPickerContext.Provider value={ contextValue }>\n\t\t\t\t<Composite\n\t\t\t\t\t{ ...additionalProps }\n\t\t\t\t\tid={ baseId }\n\t\t\t\t\tfocusLoop={ loop }\n\t\t\t\t\trtl={ isRTL() }\n\t\t\t\t\trole=\"listbox\"\n\t\t\t\t\tactiveId={ activeId }\n\t\t\t\t\tsetActiveId={ setActiveId }\n\t\t\t\t>\n\t\t\t\t\t{ options }\n\t\t\t\t</Composite>\n\t\t\t\t{ children }\n\t\t\t\t{ actions }\n\t\t\t</CircularOptionPickerContext.Provider>\n\t\t</div>\n\t);\n}\n\nfunction ButtonsCircularOptionPicker(\n\tprops: ButtonsCircularOptionPickerProps\n) {\n\tconst { actions, options, children, baseId, ...additionalProps } = props;\n\n\tconst contextValue = useMemo(\n\t\t() => ( {\n\t\t\tbaseId,\n\t\t} ),\n\t\t[ baseId ]\n\t);\n\n\treturn (\n\t\t<div { ...additionalProps } id={ baseId }>\n\t\t\t<CircularOptionPickerContext.Provider value={ contextValue }>\n\t\t\t\t{ options }\n\t\t\t\t{ children }\n\t\t\t\t{ actions }\n\t\t\t</CircularOptionPickerContext.Provider>\n\t\t</div>\n\t);\n}\n\nfunction CircularOptionPicker( props: CircularOptionPickerProps ) {\n\tconst {\n\t\tasButtons,\n\t\tactions: actionsProp,\n\t\toptions: optionsProp,\n\t\tchildren,\n\t\tclassName,\n\t\t...additionalProps\n\t} = props;\n\n\tconst baseId = useInstanceId(\n\t\tCircularOptionPicker,\n\t\t'components-circular-option-picker',\n\t\tadditionalProps.id\n\t);\n\n\tconst OptionPickerImplementation = asButtons\n\t\t? ButtonsCircularOptionPicker\n\t\t: ListboxCircularOptionPicker;\n\n\tconst actions = actionsProp ? (\n\t\t<div className=\"components-circular-option-picker__custom-clear-wrapper\">\n\t\t\t{ actionsProp }\n\t\t</div>\n\t) : undefined;\n\n\tconst options = (\n\t\t<div className=\"components-circular-option-picker__swatches\">\n\t\t\t{ optionsProp }\n\t\t</div>\n\t);\n\n\treturn (\n\t\t<OptionPickerImplementation\n\t\t\t{ ...additionalProps }\n\t\t\tbaseId={ baseId }\n\t\t\tclassName={ clsx( 'components-circular-option-picker', className ) }\n\t\t\tactions={ actions }\n\t\t\toptions={ options }\n\t\t>\n\t\t\t{ children }\n\t\t</OptionPickerImplementation>\n\t);\n}\n\nCircularOptionPicker.Option = Option;\nCircularOptionPicker.OptionGroup = OptionGroup;\nCircularOptionPicker.ButtonAction = ButtonAction;\nCircularOptionPicker.DropdownLinkAction = DropdownLinkAction;\n\nexport default CircularOptionPicker;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * Internal dependencies\n */\nimport type { OptionGroupProps } from './types';\n\nexport function OptionGroup( {\n\tclassName,\n\toptions,\n\t...additionalProps\n}: OptionGroupProps ) {\n\tconst role =\n\t\t'aria-label' in additionalProps || 'aria-labelledby' in additionalProps\n\t\t\t? 'group'\n\t\t\t: undefined;\n\n\treturn (\n\t\t<div\n\t\t\t{ ...additionalProps }\n\t\t\trole={ role }\n\t\t\tclassName={ clsx(\n\t\t\t\t'components-circular-option-picker__option-group',\n\t\t\t\t'components-circular-option-picker__swatches',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t>\n\t\t\t{ options }\n\t\t</div>\n\t);\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport Dropdown from '../dropdown';\nimport type { DropdownLinkActionProps } from './types';\nimport type { WordPressComponentProps } from '../context';\nimport type { ButtonAsButtonProps } from '../button/types';\n\nexport function DropdownLinkAction( {\n\tbuttonProps,\n\tclassName,\n\tdropdownProps,\n\tlinkText,\n}: DropdownLinkActionProps ) {\n\treturn (\n\t\t<Dropdown\n\t\t\tclassName={ clsx(\n\t\t\t\t'components-circular-option-picker__dropdown-link-action',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t<Button\n\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t{ ...buttonProps }\n\t\t\t\t>\n\t\t\t\t\t{ linkText }\n\t\t\t\t</Button>\n\t\t\t) }\n\t\t\t{ ...dropdownProps }\n\t\t/>\n\t);\n}\n\nexport function ButtonAction( {\n\tclassName,\n\tchildren,\n\t...additionalProps\n}: WordPressComponentProps< ButtonAsButtonProps, 'button', false > ) {\n\treturn (\n\t\t<Button\n\t\t\t__next40pxDefaultSize\n\t\t\tclassName={ clsx(\n\t\t\t\t'components-circular-option-picker__clear',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\tvariant=\"tertiary\"\n\t\t\t{ ...additionalProps }\n\t\t>\n\t\t\t{ children }\n\t\t</Button>\n\t);\n}\n","/**\n * Internal dependencies\n */\nimport CircularOptionPicker from './circular-option-picker';\n\nexport { Option } from './circular-option-picker-option';\nexport { OptionGroup } from './circular-option-picker-option-group';\nexport {\n\tButtonAction,\n\tDropdownLinkAction,\n} from './circular-option-picker-actions';\n\nexport default CircularOptionPicker;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { contextConnect } from '../context';\nimport { View } from '../view';\nimport { useVStack } from './hook';\nimport type { VStackProps } from './types';\n\nfunction UnconnectedVStack(\n\tprops: WordPressComponentProps< VStackProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst vStackProps = useVStack( props );\n\n\treturn <View { ...vStackProps } ref={ forwardedRef } />;\n}\n\n/**\n * `VStack` (or Vertical Stack) is a layout component that arranges child\n * elements in a vertical line.\n *\n * `VStack` can render anything inside.\n *\n * ```jsx\n * import {\n * \t__experimentalText as Text,\n * \t__experimentalVStack as VStack,\n * } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<VStack>\n * \t\t\t<Text>Code</Text>\n * \t\t\t<Text>is</Text>\n * \t\t\t<Text>Poetry</Text>\n * \t\t</VStack>\n * \t);\n * }\n * ```\n */\nexport const VStack = contextConnect( UnconnectedVStack, 'VStack' );\n\nexport default VStack;\n","/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { useContextSystem } from '../context';\nimport { useHStack } from '../h-stack';\nimport type { VStackProps } from './types';\n\nexport function useVStack(\n\tprops: WordPressComponentProps< VStackProps, 'div' >\n) {\n\tconst {\n\t\texpanded = false,\n\t\talignment = 'stretch',\n\t\t...otherProps\n\t} = useContextSystem( props, 'VStack' );\n\n\tconst hStackProps = useHStack( {\n\t\tdirection: 'column',\n\t\texpanded,\n\t\talignment,\n\t\t...otherProps,\n\t} );\n\n\treturn hStackProps;\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { contextConnect } from '../context';\nimport { View } from '../view';\nimport useTruncate from './hook';\nimport type { TruncateProps } from './types';\n\nfunction UnconnectedTruncate(\n\tprops: WordPressComponentProps< TruncateProps, 'span' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst truncateProps = useTruncate( props );\n\n\treturn <View as=\"span\" { ...truncateProps } ref={ forwardedRef } />;\n}\n\n/**\n * `Truncate` is a typography primitive that trims text content.\n * For almost all cases, it is recommended that `Text`, `Heading`, or\n * `Subheading` is used to render text content. However,`Truncate` is\n * available for custom implementations.\n *\n * ```jsx\n * import { __experimentalTruncate as Truncate } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<Truncate>\n * \t\t\tLorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc ex\n * \t\t\tneque, vulputate a diam et, luctus convallis lacus. Vestibulum ac\n * \t\t\tmollis mi. Morbi id elementum massa.\n * \t\t</Truncate>\n * \t);\n * }\n * ```\n */\nexport const Truncate = contextConnect( UnconnectedTruncate, 'Truncate' );\n\nexport default Truncate;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { contextConnect } from '../context';\nimport { View } from '../view';\nimport { useHeading } from './hook';\nimport type { HeadingProps } from './types';\n\nfunction UnconnectedHeading(\n\tprops: WordPressComponentProps< HeadingProps, 'h1' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst headerProps = useHeading( props );\n\n\treturn <View { ...headerProps } ref={ forwardedRef } />;\n}\n\n/**\n * `Heading` renders headings and titles using the library's typography system.\n *\n * ```jsx\n * import { __experimentalHeading as Heading } from \"@wordpress/components\";\n *\n * function Example() {\n * return <Heading>Code is Poetry</Heading>;\n * }\n * ```\n */\nexport const Heading = contextConnect( UnconnectedHeading, 'Heading' );\n\nexport default Heading;\n","/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { useContextSystem } from '../context';\nimport { useText } from '../text';\nimport { getHeadingFontSize } from '../utils/font-size';\nimport { CONFIG, COLORS } from '../utils';\nimport type { HeadingProps } from './types';\n\nexport function useHeading(\n\tprops: WordPressComponentProps< HeadingProps, 'h1' >\n) {\n\tconst {\n\t\tas: asProp,\n\t\tlevel = 2,\n\t\tcolor = COLORS.theme.foreground,\n\t\tisBlock = true,\n\t\tweight = CONFIG.fontWeightHeading as import('react').CSSProperties[ 'fontWeight' ],\n\t\t...otherProps\n\t} = useContextSystem( props, 'Heading' );\n\n\tconst as = ( asProp || `h${ level }` ) as keyof JSX.IntrinsicElements;\n\n\tconst a11yProps: {\n\t\trole?: string;\n\t\t'aria-level'?: number;\n\t} = {};\n\tif ( typeof as === 'string' && as[ 0 ] !== 'h' ) {\n\t\t// If not a semantic `h` element, add a11y props:\n\t\ta11yProps.role = 'heading';\n\t\ta11yProps[ 'aria-level' ] =\n\t\t\ttypeof level === 'string' ? parseInt( level ) : level;\n\t}\n\n\tconst textProps = useText( {\n\t\tcolor,\n\t\tisBlock,\n\t\tweight,\n\t\tsize: getHeadingFontSize( level ),\n\t\t...otherProps,\n\t} );\n\n\treturn { ...textProps, ...a11yProps, as };\n}\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport { Heading } from '../heading';\n\nexport const ColorHeading = styled( Heading )`\n\ttext-transform: uppercase;\n\tline-height: 24px;\n\tfont-weight: 500;\n\t&&& {\n\t\tfont-size: 11px;\n\t\tmargin-bottom: 0;\n\t}\n`;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport { space } from '../utils/space';\nimport type { DropdownContentWrapperProps } from './types';\n\nconst padding = ( { paddingSize = 'small' }: DropdownContentWrapperProps ) => {\n\tif ( paddingSize === 'none' ) {\n\t\treturn;\n\t}\n\n\tconst paddingValues = {\n\t\tsmall: space( 2 ),\n\t\tmedium: space( 4 ),\n\t};\n\n\treturn css`\n\t\tpadding: ${ paddingValues[ paddingSize ] || paddingValues.small };\n\t`;\n};\n\nexport const DropdownContentWrapperDiv = styled.div< DropdownContentWrapperProps >`\n\t// Negative margin to reset (offset) the default padding on .components-popover__content\n\tmargin-left: ${ space( -2 ) };\n\tmargin-right: ${ space( -2 ) };\n\t&:first-of-type {\n\t\tmargin-top: ${ space( -2 ) };\n\t}\n\t&:last-of-type {\n\t\tmargin-bottom: ${ space( -2 ) };\n\t}\n\n\t${ padding };\n`;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { contextConnect, useContextSystem } from '../context';\nimport { DropdownContentWrapperDiv } from './styles';\nimport type { DropdownContentWrapperProps } from './types';\n\nfunction UnconnectedDropdownContentWrapper(\n\tprops: WordPressComponentProps< DropdownContentWrapperProps, 'div', false >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst { paddingSize = 'small', ...derivedProps } = useContextSystem(\n\t\tprops,\n\t\t'DropdownContentWrapper'\n\t);\n\n\treturn (\n\t\t<DropdownContentWrapperDiv\n\t\t\t{ ...derivedProps }\n\t\t\tpaddingSize={ paddingSize }\n\t\t\tref={ forwardedRef }\n\t\t/>\n\t);\n}\n\n/**\n * A convenience wrapper for the `renderContent` when you want to apply\n * different padding. (Default is `paddingSize=\"small\"`).\n *\n * ```jsx\n * import {\n * Dropdown,\n * __experimentalDropdownContentWrapper as DropdownContentWrapper,\n * } from '@wordpress/components';\n *\n * <Dropdown\n * renderContent={ () => (\n * <DropdownContentWrapper paddingSize=\"medium\">\n * My dropdown content\n * </DropdownContentWrapper>\n * ) }\n * />\n * ```\n */\nexport const DropdownContentWrapper = contextConnect(\n\tUnconnectedDropdownContentWrapper,\n\t'DropdownContentWrapper'\n);\n\nexport default DropdownContentWrapper;\n","/**\n * External dependencies\n */\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\nimport a11yPlugin from 'colord/plugins/a11y';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { ColorObject, ColorPaletteProps, PaletteObject } from './types';\n\nextend( [ namesPlugin, a11yPlugin ] );\n\n/**\n * Checks if a color value is a simple CSS color.\n *\n * @param value The color value to check.\n * @return A boolean indicating whether the color value is a simple CSS color.\n */\nconst isSimpleCSSColor = ( value: string ): boolean => {\n\tconst valueIsCssVariable = /var\\(/.test( value ?? '' );\n\tconst valueIsColorMix = /color-mix\\(/.test( value ?? '' );\n\treturn ! valueIsCssVariable && ! valueIsColorMix;\n};\n\nexport const extractColorNameFromCurrentValue = (\n\tcurrentValue?: ColorPaletteProps[ 'value' ],\n\tcolors: ColorPaletteProps[ 'colors' ] = [],\n\tshowMultiplePalettes: boolean = false\n) => {\n\tif ( ! currentValue ) {\n\t\treturn '';\n\t}\n\tconst currentValueIsSimpleColor = currentValue\n\t\t? isSimpleCSSColor( currentValue )\n\t\t: false;\n\tconst normalizedCurrentValue = currentValueIsSimpleColor\n\t\t? colord( currentValue ).toHex()\n\t\t: currentValue;\n\n\t// Normalize format of `colors` to simplify the following loop\n\ttype normalizedPaletteObject = { colors: ColorObject[] };\n\tconst colorPalettes: normalizedPaletteObject[] = showMultiplePalettes\n\t\t? ( colors as PaletteObject[] )\n\t\t: [ { colors: colors as ColorObject[] } ];\n\tfor ( const { colors: paletteColors } of colorPalettes ) {\n\t\tfor ( const { name: colorName, color: colorValue } of paletteColors ) {\n\t\t\tconst normalizedColorValue = currentValueIsSimpleColor\n\t\t\t\t? colord( colorValue ).toHex()\n\t\t\t\t: colorValue;\n\n\t\t\tif ( normalizedCurrentValue === normalizedColorValue ) {\n\t\t\t\treturn colorName;\n\t\t\t}\n\t\t}\n\t}\n\n\t// translators: shown when the user has picked a custom color (i.e not in the palette of colors).\n\treturn __( 'Custom' );\n};\n\n// The PaletteObject type has a `colors` property (an array of ColorObject),\n// while the ColorObject type has a `color` property (the CSS color value).\nexport const isMultiplePaletteObject = (\n\tobj: PaletteObject | ColorObject\n): obj is PaletteObject =>\n\tArray.isArray( ( obj as PaletteObject ).colors ) && ! ( 'color' in obj );\n\nexport const isMultiplePaletteArray = (\n\tarr: ( PaletteObject | ColorObject )[]\n): arr is PaletteObject[] => {\n\treturn (\n\t\tarr.length > 0 &&\n\t\tarr.every( ( colorObj ) => isMultiplePaletteObject( colorObj ) )\n\t);\n};\n\n/**\n * Transform a CSS variable used as background color into the color value itself.\n *\n * @param value The color value that may be a CSS variable.\n * @param element The element for which to get the computed style.\n * @return The background color value computed from a element.\n */\nexport const normalizeColorValue = (\n\tvalue: string | undefined,\n\telement: HTMLElement | null\n) => {\n\tif ( ! value || ! element || isSimpleCSSColor( value ) ) {\n\t\treturn value;\n\t}\n\n\tconst { ownerDocument } = element;\n\tconst { defaultView } = ownerDocument;\n\tconst computedBackgroundColor =\n\t\tdefaultView?.getComputedStyle( element ).backgroundColor;\n\n\treturn computedBackgroundColor\n\t\t? colord( computedBackgroundColor ).toHex()\n\t\t: value;\n};\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\nimport a11yPlugin from 'colord/plugins/a11y';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useCallback, useMemo, useState, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Dropdown from '../dropdown';\nimport { ColorPicker } from '../color-picker';\nimport CircularOptionPicker from '../circular-option-picker';\nimport { VStack } from '../v-stack';\nimport { Truncate } from '../truncate';\nimport { ColorHeading } from './styles';\nimport DropdownContentWrapper from '../dropdown/dropdown-content-wrapper';\nimport type {\n\tColorObject,\n\tColorPaletteProps,\n\tCustomColorPickerDropdownProps,\n\tMultiplePalettesProps,\n\tPaletteObject,\n\tSinglePaletteProps,\n} from './types';\nimport type { WordPressComponentProps } from '../context';\nimport type { DropdownProps } from '../dropdown/types';\nimport {\n\textractColorNameFromCurrentValue,\n\tisMultiplePaletteArray,\n\tnormalizeColorValue,\n} from './utils';\n\nextend( [ namesPlugin, a11yPlugin ] );\n\nfunction SinglePalette( {\n\tclassName,\n\tclearColor,\n\tcolors,\n\tonChange,\n\tvalue,\n\t...additionalProps\n}: SinglePaletteProps ) {\n\tconst colorOptions = useMemo( () => {\n\t\treturn colors.map( ( { color, name }, index ) => {\n\t\t\tconst colordColor = colord( color );\n\t\t\tconst isSelected = value === color;\n\n\t\t\treturn (\n\t\t\t\t<CircularOptionPicker.Option\n\t\t\t\t\tkey={ `${ color }-${ index }` }\n\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\tselectedIconProps={\n\t\t\t\t\t\tisSelected\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\tfill:\n\t\t\t\t\t\t\t\t\t\tcolordColor.contrast() >\n\t\t\t\t\t\t\t\t\t\tcolordColor.contrast( '#000' )\n\t\t\t\t\t\t\t\t\t\t\t? '#fff'\n\t\t\t\t\t\t\t\t\t\t\t: '#000',\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t: {}\n\t\t\t\t\t}\n\t\t\t\t\ttooltipText={\n\t\t\t\t\t\tname ||\n\t\t\t\t\t\t// translators: %s: color hex code e.g: \"#f00\".\n\t\t\t\t\t\tsprintf( __( 'Color code: %s' ), color )\n\t\t\t\t\t}\n\t\t\t\t\tstyle={ { backgroundColor: color, color } }\n\t\t\t\t\tonClick={\n\t\t\t\t\t\tisSelected ? clearColor : () => onChange( color, index )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t);\n\t\t} );\n\t}, [ colors, value, onChange, clearColor ] );\n\n\treturn (\n\t\t<CircularOptionPicker.OptionGroup\n\t\t\tclassName={ className }\n\t\t\toptions={ colorOptions }\n\t\t\t{ ...additionalProps }\n\t\t/>\n\t);\n}\n\nfunction MultiplePalettes( {\n\tclassName,\n\tclearColor,\n\tcolors,\n\tonChange,\n\tvalue,\n\theadingLevel,\n}: MultiplePalettesProps ) {\n\tconst instanceId = useInstanceId( MultiplePalettes, 'color-palette' );\n\n\tif ( colors.length === 0 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<VStack spacing={ 3 } className={ className }>\n\t\t\t{ colors.map( ( { name, colors: colorPalette }, index ) => {\n\t\t\t\tconst id = `${ instanceId }-${ index }`;\n\t\t\t\treturn (\n\t\t\t\t\t<VStack spacing={ 2 } key={ index }>\n\t\t\t\t\t\t<ColorHeading id={ id } level={ headingLevel }>\n\t\t\t\t\t\t\t{ name }\n\t\t\t\t\t\t</ColorHeading>\n\t\t\t\t\t\t<SinglePalette\n\t\t\t\t\t\t\tclearColor={ clearColor }\n\t\t\t\t\t\t\tcolors={ colorPalette }\n\t\t\t\t\t\t\tonChange={ ( newColor ) =>\n\t\t\t\t\t\t\t\tonChange( newColor, index )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\taria-labelledby={ id }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</VStack>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</VStack>\n\t);\n}\n\nexport function CustomColorPickerDropdown( {\n\tisRenderedInSidebar,\n\tpopoverProps: receivedPopoverProps,\n\t...props\n}: CustomColorPickerDropdownProps ) {\n\tconst popoverProps = useMemo< DropdownProps[ 'popoverProps' ] >(\n\t\t() => ( {\n\t\t\tshift: true,\n\t\t\t// Disabling resize as it would otherwise cause the popover to show\n\t\t\t// scrollbars while dragging the color picker's handle close to the\n\t\t\t// popover edge.\n\t\t\tresize: false,\n\t\t\t...( isRenderedInSidebar\n\t\t\t\t? {\n\t\t\t\t\t\t// When in the sidebar: open to the left (stacking),\n\t\t\t\t\t\t// leaving the same gap as the parent popover.\n\t\t\t\t\t\tplacement: 'left-start',\n\t\t\t\t\t\toffset: 34,\n\t\t\t\t }\n\t\t\t\t: {\n\t\t\t\t\t\t// Default behavior: open below the anchor\n\t\t\t\t\t\tplacement: 'bottom',\n\t\t\t\t\t\toffset: 8,\n\t\t\t\t } ),\n\t\t\t...receivedPopoverProps,\n\t\t} ),\n\t\t[ isRenderedInSidebar, receivedPopoverProps ]\n\t);\n\n\treturn (\n\t\t<Dropdown\n\t\t\tcontentClassName=\"components-color-palette__custom-color-dropdown-content\"\n\t\t\tpopoverProps={ popoverProps }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nfunction UnforwardedColorPalette(\n\tprops: WordPressComponentProps< ColorPaletteProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst {\n\t\tasButtons,\n\t\tloop,\n\t\tclearable = true,\n\t\tcolors = [],\n\t\tdisableCustomColors = false,\n\t\tenableAlpha = false,\n\t\tonChange,\n\t\tvalue,\n\t\t__experimentalIsRenderedInSidebar = false,\n\t\theadingLevel = 2,\n\t\t'aria-label': ariaLabel,\n\t\t'aria-labelledby': ariaLabelledby,\n\t\t...additionalProps\n\t} = props;\n\tconst [ normalizedColorValue, setNormalizedColorValue ] = useState( value );\n\n\tconst clearColor = useCallback( () => onChange( undefined ), [ onChange ] );\n\n\tconst customColorPaletteCallbackRef = useCallback(\n\t\t( node: HTMLElement | null ) => {\n\t\t\tsetNormalizedColorValue( normalizeColorValue( value, node ) );\n\t\t},\n\t\t[ value ]\n\t);\n\n\tconst hasMultipleColorOrigins = isMultiplePaletteArray( colors );\n\tconst buttonLabelName = useMemo(\n\t\t() =>\n\t\t\textractColorNameFromCurrentValue(\n\t\t\t\tvalue,\n\t\t\t\tcolors,\n\t\t\t\thasMultipleColorOrigins\n\t\t\t),\n\t\t[ value, colors, hasMultipleColorOrigins ]\n\t);\n\n\tconst renderCustomColorPicker = () => (\n\t\t<DropdownContentWrapper paddingSize=\"none\">\n\t\t\t<ColorPicker\n\t\t\t\tcolor={ normalizedColorValue }\n\t\t\t\tonChange={ ( color ) => onChange( color ) }\n\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t/>\n\t\t</DropdownContentWrapper>\n\t);\n\tconst isHex = value?.startsWith( '#' );\n\n\t// Leave hex values as-is. Remove the `var()` wrapper from CSS vars.\n\tconst displayValue = value?.replace( /^var\\((.+)\\)$/, '$1' );\n\tconst customColorAccessibleLabel = !! displayValue\n\t\t? sprintf(\n\t\t\t\t// translators: 1: The name of the color e.g: \"vivid red\". 2: The color's hex code e.g: \"#f00\".\n\t\t\t\t__(\n\t\t\t\t\t'Custom color picker. The currently selected color is called \"%1$s\" and has a value of \"%2$s\".'\n\t\t\t\t),\n\t\t\t\tbuttonLabelName,\n\t\t\t\tdisplayValue\n\t\t )\n\t\t: __( 'Custom color picker.' );\n\n\tconst paletteCommonProps = {\n\t\tclearColor,\n\t\tonChange,\n\t\tvalue,\n\t};\n\n\tconst actions = !! clearable && (\n\t\t<CircularOptionPicker.ButtonAction\n\t\t\tonClick={ clearColor }\n\t\t\taccessibleWhenDisabled\n\t\t\tdisabled={ ! value }\n\t\t>\n\t\t\t{ __( 'Clear' ) }\n\t\t</CircularOptionPicker.ButtonAction>\n\t);\n\n\tlet metaProps:\n\t\t| { asButtons: false; loop?: boolean; 'aria-label': string }\n\t\t| { asButtons: false; loop?: boolean; 'aria-labelledby': string }\n\t\t| { asButtons: true };\n\n\tif ( asButtons ) {\n\t\tmetaProps = { asButtons: true };\n\t} else {\n\t\tconst _metaProps: { asButtons: false; loop?: boolean } = {\n\t\t\tasButtons: false,\n\t\t\tloop,\n\t\t};\n\n\t\tif ( ariaLabel ) {\n\t\t\tmetaProps = { ..._metaProps, 'aria-label': ariaLabel };\n\t\t} else if ( ariaLabelledby ) {\n\t\t\tmetaProps = {\n\t\t\t\t..._metaProps,\n\t\t\t\t'aria-labelledby': ariaLabelledby,\n\t\t\t};\n\t\t} else {\n\t\t\tmetaProps = {\n\t\t\t\t..._metaProps,\n\t\t\t\t'aria-label': __( 'Custom color picker.' ),\n\t\t\t};\n\t\t}\n\t}\n\n\treturn (\n\t\t<VStack spacing={ 3 } ref={ forwardedRef } { ...additionalProps }>\n\t\t\t{ ! disableCustomColors && (\n\t\t\t\t<CustomColorPickerDropdown\n\t\t\t\t\tisRenderedInSidebar={ __experimentalIsRenderedInSidebar }\n\t\t\t\t\trenderContent={ renderCustomColorPicker }\n\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t<VStack\n\t\t\t\t\t\t\tclassName=\"components-color-palette__custom-color-wrapper\"\n\t\t\t\t\t\t\tspacing={ 0 }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\tref={ customColorPaletteCallbackRef }\n\t\t\t\t\t\t\t\tclassName=\"components-color-palette__custom-color-button\"\n\t\t\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t\t\taria-label={ customColorAccessibleLabel }\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\tbackground: value,\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<VStack\n\t\t\t\t\t\t\t\tclassName=\"components-color-palette__custom-color-text-wrapper\"\n\t\t\t\t\t\t\t\tspacing={ 0.5 }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Truncate className=\"components-color-palette__custom-color-name\">\n\t\t\t\t\t\t\t\t\t{ value\n\t\t\t\t\t\t\t\t\t\t? buttonLabelName\n\t\t\t\t\t\t\t\t\t\t: __( 'No color selected' ) }\n\t\t\t\t\t\t\t\t</Truncate>\n\t\t\t\t\t\t\t\t{ /*\n\t\t\t\t\t\t\t\tThis `Truncate` is always rendered, even if\n\t\t\t\t\t\t\t\tthere is no `displayValue`, to ensure the layout\n\t\t\t\t\t\t\t\tdoes not shift\n\t\t\t\t\t\t\t\t*/ }\n\t\t\t\t\t\t\t\t<Truncate\n\t\t\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t\t\t'components-color-palette__custom-color-value',\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t'components-color-palette__custom-color-value--is-hex':\n\t\t\t\t\t\t\t\t\t\t\t\tisHex,\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ displayValue }\n\t\t\t\t\t\t\t\t</Truncate>\n\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t</VStack>\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ ( colors.length > 0 || actions ) && (\n\t\t\t\t<CircularOptionPicker\n\t\t\t\t\t{ ...metaProps }\n\t\t\t\t\tactions={ actions }\n\t\t\t\t\toptions={\n\t\t\t\t\t\thasMultipleColorOrigins ? (\n\t\t\t\t\t\t\t<MultiplePalettes\n\t\t\t\t\t\t\t\t{ ...paletteCommonProps }\n\t\t\t\t\t\t\t\theadingLevel={ headingLevel }\n\t\t\t\t\t\t\t\tcolors={ colors as PaletteObject[] }\n\t\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<SinglePalette\n\t\t\t\t\t\t\t\t{ ...paletteCommonProps }\n\t\t\t\t\t\t\t\tcolors={ colors as ColorObject[] }\n\t\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n\n/**\n * Allows the user to pick a color from a list of pre-defined color entries.\n *\n * ```jsx\n * import { ColorPalette } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyColorPalette = () => {\n * const [ color, setColor ] = useState ( '#f00' )\n * const colors = [\n * { name: 'red', color: '#f00' },\n * { name: 'white', color: '#fff' },\n * { name: 'blue', color: '#00f' },\n * ];\n * return (\n * <ColorPalette\n * colors={ colors }\n * value={ color }\n * onChange={ ( color ) => setColor( color ) }\n * />\n * );\n * } );\n * ```\n */\nexport const ColorPalette = forwardRef( UnforwardedColorPalette );\n\nexport default ColorPalette;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\n/**\n * Internal dependencies\n */\nimport { COLORS, CONFIG, rtl } from '../../utils';\nimport NumberControl from '../../number-control';\nimport { BackdropUI } from '../../input-control/styles/input-control-styles';\nimport type { SelectSize } from '../types';\nimport { space } from '../../utils/space';\n\n// Using `selectSize` instead of `size` to avoid a type conflict with the\n// `size` HTML attribute of the `select` element.\ntype SelectProps = {\n\tselectSize: SelectSize;\n};\n\n// TODO: Resolve need to use &&& to increase specificity\n// https://github.com/WordPress/gutenberg/issues/18483\n\nexport const ValueInput = styled( NumberControl )`\n\t&&& {\n\t\tinput {\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t${ BackdropUI } {\n\t\t\ttransition: box-shadow 0.1s linear;\n\t\t}\n\t}\n`;\n\nconst baseUnitLabelStyles = ( { selectSize }: SelectProps ) => {\n\tconst sizes = {\n\t\tsmall: css`\n\t\t\tbox-sizing: border-box;\n\t\t\tpadding: 2px 1px;\n\t\t\twidth: 20px;\n\t\t\tfont-size: 8px;\n\t\t\tline-height: 1;\n\t\t\tletter-spacing: -0.5px;\n\t\t\ttext-transform: uppercase;\n\t\t\ttext-align-last: center;\n\n\t\t\t&:not( :disabled ) {\n\t\t\t\tcolor: ${ COLORS.gray[ 800 ] };\n\t\t\t}\n\t\t`,\n\t\tdefault: css`\n\t\t\tbox-sizing: border-box;\n\t\t\tmin-width: 24px;\n\t\t\tmax-width: 48px;\n\t\t\theight: 24px;\n\t\t\tmargin-inline-end: ${ space( 2 ) };\n\t\t\tpadding: ${ space( 1 ) };\n\n\t\t\tfont-size: 13px;\n\t\t\tline-height: 1;\n\t\t\ttext-align-last: center;\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\tfield-sizing: content;\n\n\t\t\t&:not( :disabled ) {\n\t\t\t\tcolor: ${ COLORS.theme.accent };\n\t\t\t}\n\t\t`,\n\t};\n\n\treturn sizes[ selectSize ];\n};\n\nexport const UnitLabel = styled.div< SelectProps >`\n\t&&& {\n\t\tpointer-events: none;\n\n\t\t${ baseUnitLabelStyles };\n\n\t\tcolor: ${ COLORS.gray[ 900 ] };\n\t}\n`;\n\nconst unitSelectSizes = ( { selectSize = 'default' }: SelectProps ) => {\n\tconst sizes = {\n\t\tsmall: css`\n\t\t\theight: 100%;\n\t\t\tborder: 1px solid transparent;\n\t\t\ttransition:\n\t\t\t\tbox-shadow 0.1s linear,\n\t\t\t\tborder 0.1s linear;\n\n\t\t\t${ rtl( { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 } )() }\n\n\t\t\t&:not(:disabled):hover {\n\t\t\t\tbackground-color: ${ COLORS.gray[ 100 ] };\n\t\t\t}\n\n\t\t\t&:focus {\n\t\t\t\tborder: 1px solid ${ COLORS.ui.borderFocus };\n\t\t\t\tbox-shadow: inset 0 0 0\n\t\t\t\t\t${ CONFIG.borderWidth + ' ' + COLORS.ui.borderFocus };\n\t\t\t\toutline-offset: 0;\n\t\t\t\toutline: 2px solid transparent;\n\t\t\t\tz-index: 1;\n\t\t\t}\n\t\t`,\n\t\tdefault: css`\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: center;\n\t\t\talign-items: center;\n\n\t\t\t&:where( :not( :disabled ) ):hover {\n\t\t\t\tbox-shadow: 0 0 0\n\t\t\t\t\t${ CONFIG.borderWidth + ' ' + COLORS.ui.borderFocus };\n\t\t\t\toutline: ${ CONFIG.borderWidth } solid transparent; // For High Contrast Mode\n\t\t\t}\n\n\t\t\t&:focus {\n\t\t\t\tbox-shadow: 0 0 0\n\t\t\t\t\t${ CONFIG.borderWidthFocus + ' ' + COLORS.ui.borderFocus };\n\t\t\t\toutline: ${ CONFIG.borderWidthFocus } solid transparent; // For High Contrast Mode\n\t\t\t}\n\t\t`,\n\t};\n\n\treturn sizes[ selectSize ];\n};\n\nexport const UnitSelect = styled.select< SelectProps >`\n\t// The &&& counteracts <select> styles in WP forms.css\n\t&&& {\n\t\tappearance: none;\n\t\tbackground: transparent;\n\t\tborder-radius: ${ CONFIG.radiusXSmall };\n\t\tborder: none;\n\t\tdisplay: block;\n\t\toutline: none;\n\t\t/* Removing margin ensures focus styles neatly overlay the wrapper. */\n\t\tmargin: 0;\n\t\tmin-height: auto;\n\t\tfont-family: inherit;\n\n\t\t&:not( :disabled ) {\n\t\t\tcursor: pointer;\n\t\t}\n\n\t\t${ baseUnitLabelStyles };\n\t\t${ unitSelectSizes };\n\t}\n`;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { COLORS, CONFIG, boxSizingReset, rtl } from '../utils';\nimport { space } from '../utils/space';\nimport { StyledLabel } from '../base-control/styles/base-control-styles';\nimport {\n\tValueInput as UnitControlWrapper,\n\tUnitSelect,\n} from '../unit-control/styles/unit-control-styles';\n\nimport type { Border } from './types';\n\nconst focusBoxShadow = css`\n\tbox-shadow: inset ${ CONFIG.controlBoxShadowFocus };\n`;\n\nexport const borderControl = css`\n\tborder: 0;\n\tpadding: 0;\n\tmargin: 0;\n\t${ boxSizingReset }\n`;\n\nexport const innerWrapper = () => css`\n\t${ UnitControlWrapper } {\n\t\tflex: 1 1 40%;\n\t}\n\t&& ${ UnitSelect } {\n\t\t/* Prevent unit select forcing min height larger than its UnitControl */\n\t\tmin-height: 0;\n\t}\n`;\n\n/*\n * This style is only applied to the UnitControl wrapper when the border width\n * field should be a set width. Omitting this allows the UnitControl &\n * RangeControl to share the available width in a 40/60 split respectively.\n */\nexport const wrapperWidth = css`\n\t${ UnitControlWrapper } {\n\t\t/* Force the UnitControl's set width. */\n\t\tflex: 0 0 auto;\n\t}\n`;\n\nexport const wrapperHeight = ( size?: 'default' | '__unstable-large' ) => {\n\treturn css`\n\t\theight: ${ size === '__unstable-large' ? '40px' : '30px' };\n\t`;\n};\n\nexport const borderControlDropdown = css`\n\tbackground: #fff;\n\n\t&& > button {\n\t\taspect-ratio: 1;\n\t\tpadding: 0;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\t${ rtl(\n\t\t\t{ borderRadius: `2px 0 0 2px` },\n\t\t\t{ borderRadius: `0 2px 2px 0` }\n\t\t)() }\n\t\tborder: ${ CONFIG.borderWidth } solid ${ COLORS.ui.border };\n\n\t\t&:focus,\n\t\t&:hover:not( :disabled ) {\n\t\t\t${ focusBoxShadow }\n\t\t\tborder-color: ${ COLORS.ui.borderFocus };\n\t\t\tz-index: 1;\n\t\t\tposition: relative;\n\t\t}\n\t}\n`;\n\nexport const colorIndicatorBorder = ( border?: Border ) => {\n\tconst { color, style } = border || {};\n\n\tconst fallbackColor =\n\t\t!! style && style !== 'none' ? COLORS.gray[ 300 ] : undefined;\n\n\treturn css`\n\t\tborder-style: ${ style === 'none' ? 'solid' : style };\n\t\tborder-color: ${ color || fallbackColor };\n\t`;\n};\n\nexport const colorIndicatorWrapper = (\n\tborder?: Border,\n\tsize?: 'default' | '__unstable-large'\n) => {\n\tconst { style } = border || {};\n\n\treturn css`\n\t\tborder-radius: ${ CONFIG.radiusFull };\n\t\tborder: 2px solid transparent;\n\t\t${ style ? colorIndicatorBorder( border ) : undefined }\n\t\twidth: ${ size === '__unstable-large' ? '24px' : '22px' };\n\t\theight: ${ size === '__unstable-large' ? '24px' : '22px' };\n\t\tpadding: ${ size === '__unstable-large' ? '2px' : '1px' };\n\n\t\t/*\n\t\t * ColorIndicator\n\t\t *\n\t\t * The transparent colors used here ensure visibility of the indicator\n\t\t * over the active state of the border control dropdown's toggle button.\n\t\t */\n\t\t& > span {\n\t\t\theight: ${ space( 4 ) };\n\t\t\twidth: ${ space( 4 ) };\n\t\t\tbackground: linear-gradient(\n\t\t\t\t-45deg,\n\t\t\t\ttransparent 48%,\n\t\t\t\trgb( 0 0 0 / 20% ) 48%,\n\t\t\t\trgb( 0 0 0 / 20% ) 52%,\n\t\t\t\ttransparent 52%\n\t\t\t);\n\t\t}\n\t`;\n};\n\n// Must equal $color-palette-circle-size from:\n// @wordpress/components/src/circular-option-picker/style.scss\nconst swatchSize = 28;\nconst swatchGap = 12;\n\nexport const borderControlPopoverControls = css`\n\twidth: ${ swatchSize * 6 + swatchGap * 5 }px;\n\n\t> div:first-of-type > ${ StyledLabel } {\n\t\tmargin-bottom: 0;\n\t}\n\n\t&& ${ StyledLabel } + button:not( .has-text ) {\n\t\tmin-width: 24px;\n\t\tpadding: 0;\n\t}\n`;\n\nexport const borderControlPopoverContent = css``;\nexport const borderColorIndicator = css``;\n\nexport const resetButton = css`\n\tjustify-content: center;\n\twidth: 100%;\n\n\t/* Override button component styling */\n\t&& {\n\t\tborder-top: ${ CONFIG.borderWidth } solid ${ COLORS.gray[ 400 ] };\n\t\tborder-top-left-radius: 0;\n\t\tborder-top-right-radius: 0;\n\t}\n`;\n\nexport const borderSlider = () => css`\n\tflex: 1 1 60%;\n\t${ rtl( { marginRight: space( 3 ) } )() }\n`;\n","/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { Platform } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WPUnitControlUnit } from './types';\n\nconst isWeb = Platform.OS === 'web';\n\nconst allUnits: Record< string, WPUnitControlUnit > = {\n\tpx: {\n\t\tvalue: 'px',\n\t\tlabel: isWeb ? 'px' : __( 'Pixels (px)' ),\n\t\ta11yLabel: __( 'Pixels (px)' ),\n\t\tstep: 1,\n\t},\n\t'%': {\n\t\tvalue: '%',\n\t\tlabel: isWeb ? '%' : __( 'Percentage (%)' ),\n\t\ta11yLabel: __( 'Percent (%)' ),\n\t\tstep: 0.1,\n\t},\n\tem: {\n\t\tvalue: 'em',\n\t\tlabel: isWeb ? 'em' : __( 'Relative to parent font size (em)' ),\n\t\ta11yLabel: _x( 'ems', 'Relative to parent font size (em)' ),\n\t\tstep: 0.01,\n\t},\n\trem: {\n\t\tvalue: 'rem',\n\t\tlabel: isWeb ? 'rem' : __( 'Relative to root font size (rem)' ),\n\t\ta11yLabel: _x( 'rems', 'Relative to root font size (rem)' ),\n\t\tstep: 0.01,\n\t},\n\tvw: {\n\t\tvalue: 'vw',\n\t\tlabel: isWeb ? 'vw' : __( 'Viewport width (vw)' ),\n\t\ta11yLabel: __( 'Viewport width (vw)' ),\n\t\tstep: 0.1,\n\t},\n\tvh: {\n\t\tvalue: 'vh',\n\t\tlabel: isWeb ? 'vh' : __( 'Viewport height (vh)' ),\n\t\ta11yLabel: __( 'Viewport height (vh)' ),\n\t\tstep: 0.1,\n\t},\n\tvmin: {\n\t\tvalue: 'vmin',\n\t\tlabel: isWeb ? 'vmin' : __( 'Viewport smallest dimension (vmin)' ),\n\t\ta11yLabel: __( 'Viewport smallest dimension (vmin)' ),\n\t\tstep: 0.1,\n\t},\n\tvmax: {\n\t\tvalue: 'vmax',\n\t\tlabel: isWeb ? 'vmax' : __( 'Viewport largest dimension (vmax)' ),\n\t\ta11yLabel: __( 'Viewport largest dimension (vmax)' ),\n\t\tstep: 0.1,\n\t},\n\tch: {\n\t\tvalue: 'ch',\n\t\tlabel: isWeb ? 'ch' : __( 'Width of the zero (0) character (ch)' ),\n\t\ta11yLabel: __( 'Width of the zero (0) character (ch)' ),\n\t\tstep: 0.01,\n\t},\n\tex: {\n\t\tvalue: 'ex',\n\t\tlabel: isWeb ? 'ex' : __( 'x-height of the font (ex)' ),\n\t\ta11yLabel: __( 'x-height of the font (ex)' ),\n\t\tstep: 0.01,\n\t},\n\tcm: {\n\t\tvalue: 'cm',\n\t\tlabel: isWeb ? 'cm' : __( 'Centimeters (cm)' ),\n\t\ta11yLabel: __( 'Centimeters (cm)' ),\n\t\tstep: 0.001,\n\t},\n\tmm: {\n\t\tvalue: 'mm',\n\t\tlabel: isWeb ? 'mm' : __( 'Millimeters (mm)' ),\n\t\ta11yLabel: __( 'Millimeters (mm)' ),\n\t\tstep: 0.1,\n\t},\n\tin: {\n\t\tvalue: 'in',\n\t\tlabel: isWeb ? 'in' : __( 'Inches (in)' ),\n\t\ta11yLabel: __( 'Inches (in)' ),\n\t\tstep: 0.001,\n\t},\n\tpc: {\n\t\tvalue: 'pc',\n\t\tlabel: isWeb ? 'pc' : __( 'Picas (pc)' ),\n\t\ta11yLabel: __( 'Picas (pc)' ),\n\t\tstep: 1,\n\t},\n\tpt: {\n\t\tvalue: 'pt',\n\t\tlabel: isWeb ? 'pt' : __( 'Points (pt)' ),\n\t\ta11yLabel: __( 'Points (pt)' ),\n\t\tstep: 1,\n\t},\n\tsvw: {\n\t\tvalue: 'svw',\n\t\tlabel: isWeb ? 'svw' : __( 'Small viewport width (svw)' ),\n\t\ta11yLabel: __( 'Small viewport width (svw)' ),\n\t\tstep: 0.1,\n\t},\n\tsvh: {\n\t\tvalue: 'svh',\n\t\tlabel: isWeb ? 'svh' : __( 'Small viewport height (svh)' ),\n\t\ta11yLabel: __( 'Small viewport height (svh)' ),\n\t\tstep: 0.1,\n\t},\n\tsvi: {\n\t\tvalue: 'svi',\n\t\tlabel: isWeb\n\t\t\t? 'svi'\n\t\t\t: __( 'Viewport smallest size in the inline direction (svi)' ),\n\t\ta11yLabel: __( 'Small viewport width or height (svi)' ),\n\t\tstep: 0.1,\n\t},\n\tsvb: {\n\t\tvalue: 'svb',\n\t\tlabel: isWeb\n\t\t\t? 'svb'\n\t\t\t: __( 'Viewport smallest size in the block direction (svb)' ),\n\t\ta11yLabel: __( 'Small viewport width or height (svb)' ),\n\t\tstep: 0.1,\n\t},\n\tsvmin: {\n\t\tvalue: 'svmin',\n\t\tlabel: isWeb\n\t\t\t? 'svmin'\n\t\t\t: __( 'Small viewport smallest dimension (svmin)' ),\n\t\ta11yLabel: __( 'Small viewport smallest dimension (svmin)' ),\n\t\tstep: 0.1,\n\t},\n\tlvw: {\n\t\tvalue: 'lvw',\n\t\tlabel: isWeb ? 'lvw' : __( 'Large viewport width (lvw)' ),\n\t\ta11yLabel: __( 'Large viewport width (lvw)' ),\n\t\tstep: 0.1,\n\t},\n\tlvh: {\n\t\tvalue: 'lvh',\n\t\tlabel: isWeb ? 'lvh' : __( 'Large viewport height (lvh)' ),\n\t\ta11yLabel: __( 'Large viewport height (lvh)' ),\n\t\tstep: 0.1,\n\t},\n\tlvi: {\n\t\tvalue: 'lvi',\n\t\tlabel: isWeb ? 'lvi' : __( 'Large viewport width or height (lvi)' ),\n\t\ta11yLabel: __( 'Large viewport width or height (lvi)' ),\n\t\tstep: 0.1,\n\t},\n\tlvb: {\n\t\tvalue: 'lvb',\n\t\tlabel: isWeb ? 'lvb' : __( 'Large viewport width or height (lvb)' ),\n\t\ta11yLabel: __( 'Large viewport width or height (lvb)' ),\n\t\tstep: 0.1,\n\t},\n\tlvmin: {\n\t\tvalue: 'lvmin',\n\t\tlabel: isWeb\n\t\t\t? 'lvmin'\n\t\t\t: __( 'Large viewport smallest dimension (lvmin)' ),\n\t\ta11yLabel: __( 'Large viewport smallest dimension (lvmin)' ),\n\t\tstep: 0.1,\n\t},\n\tdvw: {\n\t\tvalue: 'dvw',\n\t\tlabel: isWeb ? 'dvw' : __( 'Dynamic viewport width (dvw)' ),\n\t\ta11yLabel: __( 'Dynamic viewport width (dvw)' ),\n\t\tstep: 0.1,\n\t},\n\tdvh: {\n\t\tvalue: 'dvh',\n\t\tlabel: isWeb ? 'dvh' : __( 'Dynamic viewport height (dvh)' ),\n\t\ta11yLabel: __( 'Dynamic viewport height (dvh)' ),\n\t\tstep: 0.1,\n\t},\n\tdvi: {\n\t\tvalue: 'dvi',\n\t\tlabel: isWeb ? 'dvi' : __( 'Dynamic viewport width or height (dvi)' ),\n\t\ta11yLabel: __( 'Dynamic viewport width or height (dvi)' ),\n\t\tstep: 0.1,\n\t},\n\tdvb: {\n\t\tvalue: 'dvb',\n\t\tlabel: isWeb ? 'dvb' : __( 'Dynamic viewport width or height (dvb)' ),\n\t\ta11yLabel: __( 'Dynamic viewport width or height (dvb)' ),\n\t\tstep: 0.1,\n\t},\n\tdvmin: {\n\t\tvalue: 'dvmin',\n\t\tlabel: isWeb\n\t\t\t? 'dvmin'\n\t\t\t: __( 'Dynamic viewport smallest dimension (dvmin)' ),\n\t\ta11yLabel: __( 'Dynamic viewport smallest dimension (dvmin)' ),\n\t\tstep: 0.1,\n\t},\n\tdvmax: {\n\t\tvalue: 'dvmax',\n\t\tlabel: isWeb\n\t\t\t? 'dvmax'\n\t\t\t: __( 'Dynamic viewport largest dimension (dvmax)' ),\n\t\ta11yLabel: __( 'Dynamic viewport largest dimension (dvmax)' ),\n\t\tstep: 0.1,\n\t},\n\tsvmax: {\n\t\tvalue: 'svmax',\n\t\tlabel: isWeb\n\t\t\t? 'svmax'\n\t\t\t: __( 'Small viewport largest dimension (svmax)' ),\n\t\ta11yLabel: __( 'Small viewport largest dimension (svmax)' ),\n\t\tstep: 0.1,\n\t},\n\tlvmax: {\n\t\tvalue: 'lvmax',\n\t\tlabel: isWeb\n\t\t\t? 'lvmax'\n\t\t\t: __( 'Large viewport largest dimension (lvmax)' ),\n\t\ta11yLabel: __( 'Large viewport largest dimension (lvmax)' ),\n\t\tstep: 0.1,\n\t},\n};\n\n/**\n * An array of all available CSS length units.\n */\nexport const ALL_CSS_UNITS = Object.values( allUnits );\n\n/**\n * Units of measurements. `a11yLabel` is used by screenreaders.\n */\nexport const CSS_UNITS = [\n\tallUnits.px,\n\tallUnits[ '%' ],\n\tallUnits.em,\n\tallUnits.rem,\n\tallUnits.vw,\n\tallUnits.vh,\n];\n\nexport const DEFAULT_UNIT = allUnits.px;\n\n/**\n * Handles legacy value + unit handling.\n * This component use to manage both incoming value and units separately.\n *\n * Moving forward, ideally the value should be a string that contains both\n * the value and unit, example: '10px'\n *\n * @param rawValue The raw value as a string (may or may not contain the unit)\n * @param fallbackUnit The unit used as a fallback, if not unit is detected in the `value`\n * @param allowedUnits Units to derive from.\n * @return The extracted quantity and unit. The quantity can be `undefined` in case the raw value\n * could not be parsed to a number correctly. The unit can be `undefined` in case the unit parse\n * from the raw value could not be matched against the list of allowed units.\n */\nexport function getParsedQuantityAndUnit(\n\trawValue?: string | number,\n\tfallbackUnit?: string,\n\tallowedUnits?: WPUnitControlUnit[]\n): [ number | undefined, string | undefined ] {\n\tconst initialValue = fallbackUnit\n\t\t? `${ rawValue ?? '' }${ fallbackUnit }`\n\t\t: rawValue;\n\n\treturn parseQuantityAndUnitFromRawValue( initialValue, allowedUnits );\n}\n\n/**\n * Checks if units are defined.\n *\n * @param units List of units.\n * @return Whether the list actually contains any units.\n */\nexport function hasUnits(\n\tunits?: WPUnitControlUnit[]\n): units is WPUnitControlUnit[] {\n\t// Although the `isArray` check shouldn't be necessary (given the signature of\n\t// this typed function), it's better to stay on the side of caution, since\n\t// this function may be called from un-typed environments.\n\treturn Array.isArray( units ) && !! units.length;\n}\n\n/**\n * Parses a quantity and unit from a raw string value, given a list of allowed\n * units and otherwise falling back to the default unit.\n *\n * @param rawValue The raw value as a string (may or may not contain the unit)\n * @param allowedUnits Units to derive from.\n * @return The extracted quantity and unit. The quantity can be `undefined` in case the raw value\n * could not be parsed to a number correctly. The unit can be `undefined` in case the unit parsed\n * from the raw value could not be matched against the list of allowed units.\n */\nexport function parseQuantityAndUnitFromRawValue(\n\trawValue?: string | number,\n\tallowedUnits: WPUnitControlUnit[] = ALL_CSS_UNITS\n): [ number | undefined, string | undefined ] {\n\tlet trimmedValue;\n\tlet quantityToReturn;\n\n\tif ( typeof rawValue !== 'undefined' || rawValue === null ) {\n\t\ttrimmedValue = `${ rawValue }`.trim();\n\t\tconst parsedQuantity = parseFloat( trimmedValue );\n\t\tquantityToReturn = ! isFinite( parsedQuantity )\n\t\t\t? undefined\n\t\t\t: parsedQuantity;\n\t}\n\n\tconst unitMatch = trimmedValue?.match( /[\\d.\\-\\+]*\\s*(.*)/ );\n\tconst matchedUnit = unitMatch?.[ 1 ]?.toLowerCase();\n\tlet unitToReturn: string | undefined;\n\tif ( hasUnits( allowedUnits ) ) {\n\t\tconst match = allowedUnits.find(\n\t\t\t( item ) => item.value === matchedUnit\n\t\t);\n\t\tunitToReturn = match?.value;\n\t} else {\n\t\tunitToReturn = DEFAULT_UNIT.value;\n\t}\n\n\treturn [ quantityToReturn, unitToReturn ];\n}\n\n/**\n * Parses quantity and unit from a raw value. Validates parsed value, using fallback\n * value if invalid.\n *\n * @param rawValue The next value.\n * @param allowedUnits Units to derive from.\n * @param fallbackQuantity The fallback quantity, used in case it's not possible to parse a valid quantity from the raw value.\n * @param fallbackUnit The fallback unit, used in case it's not possible to parse a valid unit from the raw value.\n * @return The extracted quantity and unit. The quantity can be `undefined` in case the raw value\n * could not be parsed to a number correctly, and the `fallbackQuantity` was also `undefined`. The\n * unit can be `undefined` only if the unit parsed from the raw value could not be matched against\n * the list of allowed units, the `fallbackQuantity` is also `undefined` and the list of\n * `allowedUnits` is passed empty.\n */\nexport function getValidParsedQuantityAndUnit(\n\trawValue: string | number,\n\tallowedUnits?: WPUnitControlUnit[],\n\tfallbackQuantity?: number,\n\tfallbackUnit?: string\n): [ number | undefined, string | undefined ] {\n\tconst [ parsedQuantity, parsedUnit ] = parseQuantityAndUnitFromRawValue(\n\t\trawValue,\n\t\tallowedUnits\n\t);\n\n\t// The parsed value from `parseQuantityAndUnitFromRawValue` should now be\n\t// either a real number or undefined. If undefined, use the fallback value.\n\tconst quantityToReturn = parsedQuantity ?? fallbackQuantity;\n\n\t// If no unit is parsed from the raw value, or if the fallback unit is not\n\t// defined, use the first value from the list of allowed units as fallback.\n\tlet unitToReturn = parsedUnit || fallbackUnit;\n\n\tif ( ! unitToReturn && hasUnits( allowedUnits ) ) {\n\t\tunitToReturn = allowedUnits[ 0 ].value;\n\t}\n\n\treturn [ quantityToReturn, unitToReturn ];\n}\n\n/**\n * Takes a unit value and finds the matching accessibility label for the\n * unit abbreviation.\n *\n * @param unit Unit value (example: `px`)\n * @return a11y label for the unit abbreviation\n */\nexport function getAccessibleLabelForUnit( unit: string ): string | undefined {\n\tconst match = ALL_CSS_UNITS.find( ( item ) => item.value === unit );\n\treturn match?.a11yLabel ? match?.a11yLabel : match?.value;\n}\n\n/**\n * Filters available units based on values defined a list of allowed unit values.\n *\n * @param allowedUnitValues Collection of allowed unit value strings.\n * @param availableUnits Collection of available unit objects.\n * @return Filtered units.\n */\nexport function filterUnitsWithSettings(\n\tallowedUnitValues: string[] = [],\n\tavailableUnits: WPUnitControlUnit[]\n): WPUnitControlUnit[] {\n\t// Although the `isArray` check shouldn't be necessary (given the signature of\n\t// this typed function), it's better to stay on the side of caution, since\n\t// this function may be called from un-typed environments.\n\treturn Array.isArray( availableUnits )\n\t\t? availableUnits.filter( ( unit ) =>\n\t\t\t\tallowedUnitValues.includes( unit.value )\n\t\t )\n\t\t: [];\n}\n\n/**\n * Custom hook to retrieve and consolidate units setting from add_theme_support().\n * TODO: ideally this hook shouldn't be needed\n * https://github.com/WordPress/gutenberg/pull/31822#discussion_r633280823\n *\n * @param args An object containing units, settingPath & defaultUnits.\n * @param args.units Collection of all potentially available units.\n * @param args.availableUnits Collection of unit value strings for filtering available units.\n * @param args.defaultValues Collection of default values for defined units. Example: `{ px: 350, em: 15 }`.\n *\n * @return Filtered list of units, with their default values updated following the `defaultValues`\n * argument's property.\n */\nexport const useCustomUnits = ( {\n\tunits = ALL_CSS_UNITS,\n\tavailableUnits = [],\n\tdefaultValues,\n}: {\n\tunits?: WPUnitControlUnit[];\n\tavailableUnits?: string[];\n\tdefaultValues?: Record< string, number >;\n} ): WPUnitControlUnit[] => {\n\tconst customUnitsToReturn = filterUnitsWithSettings(\n\t\tavailableUnits,\n\t\tunits\n\t);\n\n\tif ( defaultValues ) {\n\t\tcustomUnitsToReturn.forEach( ( unit, i ) => {\n\t\t\tif ( defaultValues[ unit.value ] ) {\n\t\t\t\tconst [ parsedDefaultValue ] = parseQuantityAndUnitFromRawValue(\n\t\t\t\t\tdefaultValues[ unit.value ]\n\t\t\t\t);\n\n\t\t\t\tcustomUnitsToReturn[ i ].default = parsedDefaultValue;\n\t\t\t}\n\t\t} );\n\t}\n\n\treturn customUnitsToReturn;\n};\n\n/**\n * Get available units with the unit for the currently selected value\n * prepended if it is not available in the list of units.\n *\n * This is useful to ensure that the current value's unit is always\n * accurately displayed in the UI, even if the intention is to hide\n * the availability of that unit.\n *\n * @param rawValue Selected value to parse.\n * @param legacyUnit Legacy unit value, if rawValue needs it appended.\n * @param units List of available units.\n *\n * @return A collection of units containing the unit for the current value.\n */\nexport function getUnitsWithCurrentUnit(\n\trawValue?: string | number,\n\tlegacyUnit?: string,\n\tunits: WPUnitControlUnit[] = ALL_CSS_UNITS\n): WPUnitControlUnit[] {\n\tconst unitsToReturn = Array.isArray( units ) ? [ ...units ] : [];\n\tconst [ , currentUnit ] = getParsedQuantityAndUnit(\n\t\trawValue,\n\t\tlegacyUnit,\n\t\tALL_CSS_UNITS\n\t);\n\n\tif (\n\t\tcurrentUnit &&\n\t\t! unitsToReturn.some( ( unit ) => unit.value === currentUnit )\n\t) {\n\t\tif ( allUnits[ currentUnit ] ) {\n\t\t\tunitsToReturn.unshift( allUnits[ currentUnit ] );\n\t\t}\n\t}\n\n\treturn unitsToReturn;\n}\n","/**\n * External dependencies\n */\nimport type { CSSProperties } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport BorderControlStylePicker from '../border-control-style-picker';\nimport Button from '../../button';\nimport ColorIndicator from '../../color-indicator';\nimport ColorPalette from '../../color-palette';\nimport Dropdown from '../../dropdown';\nimport { VStack } from '../../v-stack';\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect } from '../../context';\nimport { useBorderControlDropdown } from './hook';\nimport DropdownContentWrapper from '../../dropdown/dropdown-content-wrapper';\n\nimport type { ColorObject } from '../../color-palette/types';\nimport { isMultiplePaletteArray } from '../../color-palette/utils';\nimport type { DropdownProps as DropdownComponentProps } from '../../dropdown/types';\nimport type { ColorProps, DropdownProps } from '../types';\n\nconst getAriaLabelColorValue = ( colorValue: string ) => {\n\t// Leave hex values as-is. Remove the `var()` wrapper from CSS vars.\n\treturn colorValue.replace( /^var\\((.+)\\)$/, '$1' );\n};\n\nconst getColorObject = (\n\tcolorValue: CSSProperties[ 'borderColor' ],\n\tcolors: ColorProps[ 'colors' ] | undefined\n) => {\n\tif ( ! colorValue || ! colors ) {\n\t\treturn;\n\t}\n\n\tif ( isMultiplePaletteArray( colors ) ) {\n\t\t// Multiple origins\n\t\tlet matchedColor;\n\n\t\tcolors.some( ( origin ) =>\n\t\t\torigin.colors.some( ( color ) => {\n\t\t\t\tif ( color.color === colorValue ) {\n\t\t\t\t\tmatchedColor = color;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t} )\n\t\t);\n\n\t\treturn matchedColor;\n\t}\n\n\t// Single origin\n\treturn colors.find( ( color ) => color.color === colorValue );\n};\n\nconst getToggleAriaLabel = (\n\tcolorValue: CSSProperties[ 'borderColor' ],\n\tcolorObject: ColorObject | undefined,\n\tstyle: CSSProperties[ 'borderStyle' ],\n\tisStyleEnabled: boolean\n) => {\n\tif ( isStyleEnabled ) {\n\t\tif ( colorObject ) {\n\t\t\tconst ariaLabelValue = getAriaLabelColorValue( colorObject.color );\n\t\t\treturn style\n\t\t\t\t? sprintf(\n\t\t\t\t\t\t// translators: 1: The name of the color e.g. \"vivid red\". 2: The color's hex code e.g.: \"#f00:\". 3: The current border style selection e.g. \"solid\".\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'Border color and style picker. The currently selected color is called \"%1$s\" and has a value of \"%2$s\". The currently selected style is \"%3$s\".'\n\t\t\t\t\t\t),\n\t\t\t\t\t\tcolorObject.name,\n\t\t\t\t\t\tariaLabelValue,\n\t\t\t\t\t\tstyle\n\t\t\t\t )\n\t\t\t\t: sprintf(\n\t\t\t\t\t\t// translators: 1: The name of the color e.g. \"vivid red\". 2: The color's hex code e.g.: \"#f00:\".\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'Border color and style picker. The currently selected color is called \"%1$s\" and has a value of \"%2$s\".'\n\t\t\t\t\t\t),\n\t\t\t\t\t\tcolorObject.name,\n\t\t\t\t\t\tariaLabelValue\n\t\t\t\t );\n\t\t}\n\n\t\tif ( colorValue ) {\n\t\t\tconst ariaLabelValue = getAriaLabelColorValue( colorValue );\n\t\t\treturn style\n\t\t\t\t? sprintf(\n\t\t\t\t\t\t// translators: 1: The color's hex code e.g.: \"#f00:\". 2: The current border style selection e.g. \"solid\".\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'Border color and style picker. The currently selected color has a value of \"%1$s\". The currently selected style is \"%2$s\".'\n\t\t\t\t\t\t),\n\t\t\t\t\t\tariaLabelValue,\n\t\t\t\t\t\tstyle\n\t\t\t\t )\n\t\t\t\t: sprintf(\n\t\t\t\t\t\t// translators: %s: The color's hex code e.g: \"#f00\".\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'Border color and style picker. The currently selected color has a value of \"%s\".'\n\t\t\t\t\t\t),\n\t\t\t\t\t\tariaLabelValue\n\t\t\t\t );\n\t\t}\n\n\t\treturn __( 'Border color and style picker.' );\n\t}\n\n\tif ( colorObject ) {\n\t\treturn sprintf(\n\t\t\t// translators: 1: The name of the color e.g. \"vivid red\". 2: The color's hex code e.g: \"#f00\".\n\t\t\t__(\n\t\t\t\t'Border color picker. The currently selected color is called \"%1$s\" and has a value of \"%2$s\".'\n\t\t\t),\n\t\t\tcolorObject.name,\n\t\t\tgetAriaLabelColorValue( colorObject.color )\n\t\t);\n\t}\n\n\tif ( colorValue ) {\n\t\treturn sprintf(\n\t\t\t// translators: %s: The color's hex code e.g: \"#f00\".\n\t\t\t__(\n\t\t\t\t'Border color picker. The currently selected color has a value of \"%s\".'\n\t\t\t),\n\t\t\tgetAriaLabelColorValue( colorValue )\n\t\t);\n\t}\n\n\treturn __( 'Border color picker.' );\n};\n\nconst BorderControlDropdown = (\n\tprops: WordPressComponentProps< DropdownProps, 'div' >,\n\tforwardedRef: React.ForwardedRef< any >\n) => {\n\tconst {\n\t\t__experimentalIsRenderedInSidebar,\n\t\tborder,\n\t\tcolors,\n\t\tdisableCustomColors,\n\t\tenableAlpha,\n\t\tenableStyle,\n\t\tindicatorClassName,\n\t\tindicatorWrapperClassName,\n\t\tisStyleSettable,\n\t\tonReset,\n\t\tonColorChange,\n\t\tonStyleChange,\n\t\tpopoverContentClassName,\n\t\tpopoverControlsClassName,\n\t\tresetButtonClassName,\n\t\tsize,\n\t\t__unstablePopoverProps,\n\t\t...otherProps\n\t} = useBorderControlDropdown( props );\n\n\tconst { color, style } = border || {};\n\tconst colorObject = getColorObject( color, colors );\n\n\tconst toggleAriaLabel = getToggleAriaLabel(\n\t\tcolor,\n\t\tcolorObject,\n\t\tstyle,\n\t\tenableStyle\n\t);\n\n\tconst showResetButton = color || ( style && style !== 'none' );\n\tconst dropdownPosition = __experimentalIsRenderedInSidebar\n\t\t? 'bottom left'\n\t\t: undefined;\n\n\tconst renderToggle: DropdownComponentProps[ 'renderToggle' ] = ( {\n\t\tonToggle,\n\t} ) => (\n\t\t<Button\n\t\t\tonClick={ onToggle }\n\t\t\tvariant=\"tertiary\"\n\t\t\taria-label={ toggleAriaLabel }\n\t\t\ttooltipPosition={ dropdownPosition }\n\t\t\tlabel={ __( 'Border color and style picker' ) }\n\t\t\tshowTooltip\n\t\t\t__next40pxDefaultSize={ size === '__unstable-large' }\n\t\t>\n\t\t\t<span className={ indicatorWrapperClassName }>\n\t\t\t\t<ColorIndicator\n\t\t\t\t\tclassName={ indicatorClassName }\n\t\t\t\t\tcolorValue={ color }\n\t\t\t\t/>\n\t\t\t</span>\n\t\t</Button>\n\t);\n\n\tconst renderContent: DropdownComponentProps[ 'renderContent' ] = ( {\n\t\tonClose,\n\t} ) => (\n\t\t<>\n\t\t\t<DropdownContentWrapper paddingSize=\"medium\">\n\t\t\t\t<VStack className={ popoverControlsClassName } spacing={ 6 }>\n\t\t\t\t\t<ColorPalette\n\t\t\t\t\t\tclassName={ popoverContentClassName }\n\t\t\t\t\t\tvalue={ color }\n\t\t\t\t\t\tonChange={ onColorChange }\n\t\t\t\t\t\t{ ...{ colors, disableCustomColors } }\n\t\t\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\t}\n\t\t\t\t\t\tclearable={ false }\n\t\t\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t\t\t/>\n\t\t\t\t\t{ enableStyle && isStyleSettable && (\n\t\t\t\t\t\t<BorderControlStylePicker\n\t\t\t\t\t\t\tlabel={ __( 'Style' ) }\n\t\t\t\t\t\t\tvalue={ style }\n\t\t\t\t\t\t\tonChange={ onStyleChange }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</VStack>\n\t\t\t</DropdownContentWrapper>\n\t\t\t{ showResetButton && (\n\t\t\t\t<DropdownContentWrapper paddingSize=\"none\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName={ resetButtonClassName }\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tonReset();\n\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Reset' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</DropdownContentWrapper>\n\t\t\t) }\n\t\t</>\n\t);\n\n\treturn (\n\t\t<Dropdown\n\t\t\trenderToggle={ renderToggle }\n\t\t\trenderContent={ renderContent }\n\t\t\tpopoverProps={ {\n\t\t\t\t...__unstablePopoverProps,\n\t\t\t} }\n\t\t\t{ ...otherProps }\n\t\t\tref={ forwardedRef }\n\t\t/>\n\t);\n};\n\nconst ConnectedBorderControlDropdown = contextConnect(\n\tBorderControlDropdown,\n\t'BorderControlDropdown'\n);\n\nexport default ConnectedBorderControlDropdown;\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport * as styles from '../styles';\nimport { parseQuantityAndUnitFromRawValue } from '../../unit-control/utils';\nimport type { WordPressComponentProps } from '../../context';\nimport { useContextSystem } from '../../context';\nimport { useCx } from '../../utils/hooks/use-cx';\n\nimport type { DropdownProps } from '../types';\n\nexport function useBorderControlDropdown(\n\tprops: WordPressComponentProps< DropdownProps, 'div' >\n) {\n\tconst {\n\t\tborder,\n\t\tclassName,\n\t\tcolors = [],\n\t\tenableAlpha = false,\n\t\tenableStyle = true,\n\t\tonChange,\n\t\tpreviousStyleSelection,\n\t\tsize = 'default',\n\t\t__experimentalIsRenderedInSidebar = false,\n\t\t...otherProps\n\t} = useContextSystem( props, 'BorderControlDropdown' );\n\n\tconst [ widthValue ] = parseQuantityAndUnitFromRawValue( border?.width );\n\tconst hasZeroWidth = widthValue === 0;\n\n\tconst onColorChange = ( color?: string ) => {\n\t\tconst style =\n\t\t\tborder?.style === 'none' ? previousStyleSelection : border?.style;\n\t\tconst width = hasZeroWidth && !! color ? '1px' : border?.width;\n\n\t\tonChange( { color, style, width } );\n\t};\n\n\tconst onStyleChange = ( style?: string ) => {\n\t\tconst width = hasZeroWidth && !! style ? '1px' : border?.width;\n\t\tonChange( { ...border, style, width } );\n\t};\n\n\tconst onReset = () => {\n\t\tonChange( {\n\t\t\t...border,\n\t\t\tcolor: undefined,\n\t\t\tstyle: undefined,\n\t\t} );\n\t};\n\n\t// Generate class names.\n\tconst cx = useCx();\n\tconst classes = useMemo( () => {\n\t\treturn cx( styles.borderControlDropdown, className );\n\t}, [ className, cx ] );\n\n\tconst indicatorClassName = useMemo( () => {\n\t\treturn cx( styles.borderColorIndicator );\n\t}, [ cx ] );\n\n\tconst indicatorWrapperClassName = useMemo( () => {\n\t\treturn cx( styles.colorIndicatorWrapper( border, size ) );\n\t}, [ border, cx, size ] );\n\n\tconst popoverControlsClassName = useMemo( () => {\n\t\treturn cx( styles.borderControlPopoverControls );\n\t}, [ cx ] );\n\n\tconst popoverContentClassName = useMemo( () => {\n\t\treturn cx( styles.borderControlPopoverContent );\n\t}, [ cx ] );\n\n\tconst resetButtonClassName = useMemo( () => {\n\t\treturn cx( styles.resetButton );\n\t}, [ cx ] );\n\n\treturn {\n\t\t...otherProps,\n\t\tborder,\n\t\tclassName: classes,\n\t\tcolors,\n\t\tenableAlpha,\n\t\tenableStyle,\n\t\tindicatorClassName,\n\t\tindicatorWrapperClassName,\n\t\tonColorChange,\n\t\tonStyleChange,\n\t\tonReset,\n\t\tpopoverContentClassName,\n\t\tpopoverControlsClassName,\n\t\tresetButtonClassName,\n\t\tsize,\n\t\t__experimentalIsRenderedInSidebar,\n\t};\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ChangeEvent, ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { UnitSelect, UnitLabel } from './styles/unit-control-styles';\nimport { CSS_UNITS, hasUnits } from './utils';\nimport type { UnitSelectControlProps } from './types';\n\nfunction UnitSelectControl(\n\t{\n\t\tclassName,\n\t\tisUnitSelectTabbable: isTabbable = true,\n\t\tonChange,\n\t\tsize = 'default',\n\t\tunit = 'px',\n\t\tunits = CSS_UNITS,\n\t\t...props\n\t}: WordPressComponentProps< UnitSelectControlProps, 'select', false >,\n\tref: ForwardedRef< any >\n) {\n\tif ( ! hasUnits( units ) || units?.length === 1 ) {\n\t\treturn (\n\t\t\t<UnitLabel\n\t\t\t\tclassName=\"components-unit-control__unit-label\"\n\t\t\t\tselectSize={ size }\n\t\t\t>\n\t\t\t\t{ unit }\n\t\t\t</UnitLabel>\n\t\t);\n\t}\n\n\tconst handleOnChange = ( event: ChangeEvent< HTMLSelectElement > ) => {\n\t\tconst { value: unitValue } = event.target;\n\t\tconst data = units.find( ( option ) => option.value === unitValue );\n\n\t\tonChange?.( unitValue, { event, data } );\n\t};\n\n\tconst classes = clsx( 'components-unit-control__select', className );\n\n\treturn (\n\t\t<UnitSelect\n\t\t\tref={ ref }\n\t\t\tclassName={ classes }\n\t\t\tonChange={ handleOnChange }\n\t\t\tselectSize={ size }\n\t\t\ttabIndex={ isTabbable ? undefined : -1 }\n\t\t\tvalue={ unit }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ units.map( ( option ) => (\n\t\t\t\t<option value={ option.value } key={ option.value }>\n\t\t\t\t\t{ option.label }\n\t\t\t\t</option>\n\t\t\t) ) }\n\t\t</UnitSelect>\n\t);\n}\nexport default forwardRef( UnitSelectControl );\n","/**\n * External dependencies\n */\nimport type { KeyboardEvent, ForwardedRef, SyntheticEvent } from 'react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef, useMemo, useRef, useEffect } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { ValueInput } from './styles/unit-control-styles';\nimport UnitSelectControl from './unit-select-control';\nimport {\n\tCSS_UNITS,\n\tgetParsedQuantityAndUnit,\n\tgetUnitsWithCurrentUnit,\n\tgetValidParsedQuantityAndUnit,\n} from './utils';\nimport { useControlledState } from '../utils/hooks';\nimport { escapeRegExp } from '../utils/strings';\nimport type { UnitControlProps, UnitControlOnChangeCallback } from './types';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\n\nfunction UnforwardedUnitControl(\n\tunitControlProps: WordPressComponentProps<\n\t\tUnitControlProps,\n\t\t'input',\n\t\tfalse\n\t>,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst {\n\t\t__unstableStateReducer,\n\t\tautoComplete = 'off',\n\t\t// @ts-expect-error Ensure that children is omitted from restProps\n\t\tchildren,\n\t\tclassName,\n\t\tdisabled = false,\n\t\tdisableUnits = false,\n\t\tisPressEnterToChange = false,\n\t\tisResetValueOnUnitChange = false,\n\t\tisUnitSelectTabbable = true,\n\t\tlabel,\n\t\tonChange: onChangeProp,\n\t\tonUnitChange,\n\t\tsize = 'default',\n\t\tunit: unitProp,\n\t\tunits: unitsProp = CSS_UNITS,\n\t\tvalue: valueProp,\n\t\tonFocus: onFocusProp,\n\t\t__shouldNotWarnDeprecated36pxSize,\n\t\t...props\n\t} = useDeprecated36pxDefaultSizeProp( unitControlProps );\n\n\tmaybeWarnDeprecated36pxSize( {\n\t\tcomponentName: 'UnitControl',\n\t\t__next40pxDefaultSize: props.__next40pxDefaultSize,\n\t\tsize,\n\t\t__shouldNotWarnDeprecated36pxSize,\n\t} );\n\n\tif ( 'unit' in unitControlProps ) {\n\t\tdeprecated( 'UnitControl unit prop', {\n\t\t\tsince: '5.6',\n\t\t\thint: 'The unit should be provided within the `value` prop.',\n\t\t\tversion: '6.2',\n\t\t} );\n\t}\n\n\t// The `value` prop, in theory, should not be `null`, but the following line\n\t// ensures it fallback to `undefined` in case a consumer of `UnitControl`\n\t// still passes `null` as a `value`.\n\tconst nonNullValueProp = valueProp ?? undefined;\n\tconst [ units, reFirstCharacterOfUnits ] = useMemo( () => {\n\t\tconst list = getUnitsWithCurrentUnit(\n\t\t\tnonNullValueProp,\n\t\t\tunitProp,\n\t\t\tunitsProp\n\t\t);\n\t\tconst [ { value: firstUnitValue = '' } = {}, ...rest ] = list;\n\t\tconst firstCharacters = rest.reduce(\n\t\t\t( carry, { value } ) => {\n\t\t\t\tconst first = escapeRegExp( value?.substring( 0, 1 ) || '' );\n\t\t\t\treturn carry.includes( first )\n\t\t\t\t\t? carry\n\t\t\t\t\t: `${ carry }|${ first }`;\n\t\t\t},\n\t\t\tescapeRegExp( firstUnitValue.substring( 0, 1 ) )\n\t\t);\n\t\treturn [ list, new RegExp( `^(?:${ firstCharacters })$`, 'i' ) ];\n\t}, [ nonNullValueProp, unitProp, unitsProp ] );\n\tconst [ parsedQuantity, parsedUnit ] = getParsedQuantityAndUnit(\n\t\tnonNullValueProp,\n\t\tunitProp,\n\t\tunits\n\t);\n\n\tconst [ unit, setUnit ] = useControlledState< string | undefined >(\n\t\tunits.length === 1 ? units[ 0 ].value : unitProp,\n\t\t{\n\t\t\tinitial: parsedUnit,\n\t\t\tfallback: '',\n\t\t}\n\t);\n\n\tuseEffect( () => {\n\t\tif ( parsedUnit !== undefined ) {\n\t\t\tsetUnit( parsedUnit );\n\t\t}\n\t}, [ parsedUnit, setUnit ] );\n\n\tconst classes = clsx(\n\t\t'components-unit-control',\n\t\t// This class is added for legacy purposes to maintain it on the outer\n\t\t// wrapper. See: https://github.com/WordPress/gutenberg/pull/45139\n\t\t'components-unit-control-wrapper',\n\t\tclassName\n\t);\n\n\tconst handleOnQuantityChange = (\n\t\tnextQuantityValue: number | string | undefined,\n\t\tchangeProps: {\n\t\t\tevent: SyntheticEvent;\n\t\t}\n\t) => {\n\t\tif (\n\t\t\tnextQuantityValue === '' ||\n\t\t\ttypeof nextQuantityValue === 'undefined' ||\n\t\t\tnextQuantityValue === null\n\t\t) {\n\t\t\tonChangeProp?.( '', changeProps );\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * Customizing the onChange callback.\n\t\t * This allows as to broadcast a combined value+unit to onChange.\n\t\t */\n\t\tconst onChangeValue = getValidParsedQuantityAndUnit(\n\t\t\tnextQuantityValue,\n\t\t\tunits,\n\t\t\tparsedQuantity,\n\t\t\tunit\n\t\t).join( '' );\n\n\t\tonChangeProp?.( onChangeValue, changeProps );\n\t};\n\n\tconst handleOnUnitChange: UnitControlOnChangeCallback = (\n\t\tnextUnitValue,\n\t\tchangeProps\n\t) => {\n\t\tconst { data } = changeProps;\n\n\t\tlet nextValue = `${ parsedQuantity ?? '' }${ nextUnitValue }`;\n\n\t\tif ( isResetValueOnUnitChange && data?.default !== undefined ) {\n\t\t\tnextValue = `${ data.default }${ nextUnitValue }`;\n\t\t}\n\n\t\tonChangeProp?.( nextValue, changeProps );\n\t\tonUnitChange?.( nextUnitValue, changeProps );\n\n\t\tsetUnit( nextUnitValue );\n\t};\n\n\tlet handleOnKeyDown;\n\tif ( ! disableUnits && isUnitSelectTabbable && units.length ) {\n\t\thandleOnKeyDown = ( event: KeyboardEvent< HTMLInputElement > ) => {\n\t\t\tprops.onKeyDown?.( event );\n\t\t\t// Unless the meta or ctrl key was pressed (to avoid interfering with\n\t\t\t// shortcuts, e.g. pastes), move focus to the unit select if a key\n\t\t\t// matches the first character of a unit.\n\t\t\tif (\n\t\t\t\t! event.metaKey &&\n\t\t\t\t! event.ctrlKey &&\n\t\t\t\treFirstCharacterOfUnits.test( event.key )\n\t\t\t) {\n\t\t\t\trefInputSuffix.current?.focus();\n\t\t\t}\n\t\t};\n\t}\n\n\tconst refInputSuffix = useRef< HTMLSelectElement >( null );\n\tconst inputSuffix = ! disableUnits ? (\n\t\t<UnitSelectControl\n\t\t\tref={ refInputSuffix }\n\t\t\taria-label={ __( 'Select unit' ) }\n\t\t\tdisabled={ disabled }\n\t\t\tisUnitSelectTabbable={ isUnitSelectTabbable }\n\t\t\tonChange={ handleOnUnitChange }\n\t\t\tsize={\n\t\t\t\t[ 'small', 'compact' ].includes( size ) ||\n\t\t\t\t( size === 'default' && ! props.__next40pxDefaultSize )\n\t\t\t\t\t? 'small'\n\t\t\t\t\t: 'default'\n\t\t\t}\n\t\t\tunit={ unit }\n\t\t\tunits={ units }\n\t\t\tonFocus={ onFocusProp }\n\t\t\tonBlur={ unitControlProps.onBlur }\n\t\t/>\n\t) : null;\n\n\tlet step = props.step;\n\n\t/*\n\t * If no step prop has been passed, lookup the active unit and\n\t * try to get step from `units`, or default to a value of `1`\n\t */\n\tif ( ! step && units ) {\n\t\tconst activeUnit = units.find( ( option ) => option.value === unit );\n\t\tstep = activeUnit?.step ?? 1;\n\t}\n\n\treturn (\n\t\t<ValueInput\n\t\t\t{ ...props }\n\t\t\t__shouldNotWarnDeprecated36pxSize\n\t\t\tautoComplete={ autoComplete }\n\t\t\tclassName={ classes }\n\t\t\tdisabled={ disabled }\n\t\t\tspinControls=\"none\"\n\t\t\tisPressEnterToChange={ isPressEnterToChange }\n\t\t\tlabel={ label }\n\t\t\tonKeyDown={ handleOnKeyDown }\n\t\t\tonChange={ handleOnQuantityChange }\n\t\t\tref={ forwardedRef }\n\t\t\tsize={ size }\n\t\t\tsuffix={ inputSuffix }\n\t\t\ttype={ isPressEnterToChange ? 'text' : 'number' }\n\t\t\tvalue={ parsedQuantity ?? '' }\n\t\t\tstep={ step }\n\t\t\tonFocus={ onFocusProp }\n\t\t\t__unstableStateReducer={ __unstableStateReducer }\n\t\t/>\n\t);\n}\n\n/**\n * `UnitControl` allows the user to set a numeric quantity as well as a unit (e.g. `px`).\n *\n *\n * ```jsx\n * import { __experimentalUnitControl as UnitControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const Example = () => {\n * const [ value, setValue ] = useState( '10px' );\n *\n * return <UnitControl __next40pxDefaultSize onChange={ setValue } value={ value } />;\n * };\n * ```\n */\nexport const UnitControl = forwardRef( UnforwardedUnitControl );\n\nexport { parseQuantityAndUnitFromRawValue, useCustomUnits } from './utils';\nexport default UnitControl;\n","/**\n * WordPress dependencies\n */\nimport { useCallback, useMemo, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport * as styles from '../styles';\nimport { parseQuantityAndUnitFromRawValue } from '../../unit-control/utils';\nimport type { WordPressComponentProps } from '../../context';\nimport { useContextSystem } from '../../context';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { Border, BorderControlProps } from '../types';\nimport { maybeWarnDeprecated36pxSize } from '../../utils/deprecated-36px-size';\n\n// If either width or color are defined, the border is considered valid\n// and a border style can be set as well.\nconst isValidBorder = ( border?: Border ) => {\n\tconst hasWidth = border?.width !== undefined && border.width !== '';\n\tconst hasColor = border?.color !== undefined;\n\treturn hasWidth || hasColor;\n};\n\nexport function useBorderControl(\n\tprops: WordPressComponentProps< BorderControlProps, 'div' >\n) {\n\tconst {\n\t\tclassName,\n\t\tcolors = [],\n\t\tisCompact,\n\t\tonChange,\n\t\tenableAlpha = true,\n\t\tenableStyle = true,\n\t\tshouldSanitizeBorder = true,\n\t\tsize = 'default',\n\t\tvalue: border,\n\t\twidth,\n\t\t__experimentalIsRenderedInSidebar = false,\n\t\t__next40pxDefaultSize,\n\t\t__shouldNotWarnDeprecated36pxSize,\n\t\t...otherProps\n\t} = useContextSystem( props, 'BorderControl' );\n\n\tmaybeWarnDeprecated36pxSize( {\n\t\tcomponentName: 'BorderControl',\n\t\t__next40pxDefaultSize,\n\t\tsize,\n\t\t__shouldNotWarnDeprecated36pxSize,\n\t} );\n\n\tconst computedSize =\n\t\tsize === 'default' && __next40pxDefaultSize ? '__unstable-large' : size;\n\n\tconst [ widthValue, originalWidthUnit ] = parseQuantityAndUnitFromRawValue(\n\t\tborder?.width\n\t);\n\tconst widthUnit = originalWidthUnit || 'px';\n\tconst hadPreviousZeroWidth = widthValue === 0;\n\n\tconst [ colorSelection, setColorSelection ] = useState< string >();\n\tconst [ styleSelection, setStyleSelection ] = useState< string >();\n\n\tconst isStyleSettable = shouldSanitizeBorder\n\t\t? isValidBorder( border )\n\t\t: true;\n\n\tconst onBorderChange = useCallback(\n\t\t( newBorder?: Border ) => {\n\t\t\tif ( shouldSanitizeBorder && ! isValidBorder( newBorder ) ) {\n\t\t\t\tonChange( undefined );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tonChange( newBorder );\n\t\t},\n\t\t[ onChange, shouldSanitizeBorder ]\n\t);\n\n\tconst onWidthChange = useCallback(\n\t\t( newWidth?: string ) => {\n\t\t\tconst newWidthValue = newWidth === '' ? undefined : newWidth;\n\t\t\tconst [ parsedValue ] =\n\t\t\t\tparseQuantityAndUnitFromRawValue( newWidth );\n\t\t\tconst hasZeroWidth = parsedValue === 0;\n\t\t\tconst updatedBorder = { ...border, width: newWidthValue };\n\n\t\t\t// Setting the border width explicitly to zero will also set the\n\t\t\t// border style to `none` and clear the border color.\n\t\t\tif ( hasZeroWidth && ! hadPreviousZeroWidth ) {\n\t\t\t\t// Before clearing the color and style selections, keep track of\n\t\t\t\t// the current selections so they can be restored when the width\n\t\t\t\t// changes to a non-zero value.\n\t\t\t\tsetColorSelection( border?.color );\n\t\t\t\tsetStyleSelection( border?.style );\n\n\t\t\t\t// Clear the color and style border properties.\n\t\t\t\tupdatedBorder.color = undefined;\n\t\t\t\tupdatedBorder.style = 'none';\n\t\t\t}\n\n\t\t\t// Selection has changed from zero border width to non-zero width.\n\t\t\tif ( ! hasZeroWidth && hadPreviousZeroWidth ) {\n\t\t\t\t// Restore previous border color and style selections if width\n\t\t\t\t// is now not zero.\n\t\t\t\tif ( updatedBorder.color === undefined ) {\n\t\t\t\t\tupdatedBorder.color = colorSelection;\n\t\t\t\t}\n\t\t\t\tif ( updatedBorder.style === 'none' ) {\n\t\t\t\t\tupdatedBorder.style = styleSelection;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tonBorderChange( updatedBorder );\n\t\t},\n\t\t[\n\t\t\tborder,\n\t\t\thadPreviousZeroWidth,\n\t\t\tcolorSelection,\n\t\t\tstyleSelection,\n\t\t\tonBorderChange,\n\t\t]\n\t);\n\n\tconst onSliderChange = useCallback(\n\t\t( value?: number ) => {\n\t\t\tonWidthChange( `${ value }${ widthUnit }` );\n\t\t},\n\t\t[ onWidthChange, widthUnit ]\n\t);\n\n\t// Generate class names.\n\tconst cx = useCx();\n\tconst classes = useMemo( () => {\n\t\treturn cx( styles.borderControl, className );\n\t}, [ className, cx ] );\n\n\tlet wrapperWidth = width;\n\tif ( isCompact ) {\n\t\t// Widths below represent the minimum usable width for compact controls.\n\t\t// Taller controls contain greater internal padding, thus greater width.\n\t\twrapperWidth = size === '__unstable-large' ? '116px' : '90px';\n\t}\n\tconst innerWrapperClassName = useMemo( () => {\n\t\tconst widthStyle = !! wrapperWidth && styles.wrapperWidth;\n\t\tconst heightStyle = styles.wrapperHeight( computedSize );\n\n\t\treturn cx( styles.innerWrapper(), widthStyle, heightStyle );\n\t}, [ wrapperWidth, cx, computedSize ] );\n\n\tconst sliderClassName = useMemo( () => {\n\t\treturn cx( styles.borderSlider() );\n\t}, [ cx ] );\n\n\treturn {\n\t\t...otherProps,\n\t\tclassName: classes,\n\t\tcolors,\n\t\tenableAlpha,\n\t\tenableStyle,\n\t\tinnerWrapperClassName,\n\t\tinputWidth: wrapperWidth,\n\t\tisStyleSettable,\n\t\tonBorderChange,\n\t\tonSliderChange,\n\t\tonWidthChange,\n\t\tpreviousStyleSelection: styleSelection,\n\t\tsliderClassName,\n\t\tvalue: border,\n\t\twidthUnit,\n\t\twidthValue,\n\t\tsize: computedSize,\n\t\t__experimentalIsRenderedInSidebar,\n\t\t__next40pxDefaultSize,\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport BorderControlDropdown from '../border-control-dropdown';\nimport UnitControl from '../../unit-control';\nimport RangeControl from '../../range-control';\nimport { HStack } from '../../h-stack';\nimport { StyledLabel } from '../../base-control/styles/base-control-styles';\nimport { View } from '../../view';\nimport { VisuallyHidden } from '../../visually-hidden';\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect } from '../../context';\nimport { useBorderControl } from './hook';\n\nimport type { BorderControlProps, LabelProps } from '../types';\nimport { Spacer } from '../../spacer';\n\nconst BorderLabel = ( props: LabelProps ) => {\n\tconst { label, hideLabelFromVision } = props;\n\n\tif ( ! label ) {\n\t\treturn null;\n\t}\n\n\treturn hideLabelFromVision ? (\n\t\t<VisuallyHidden as=\"legend\">{ label }</VisuallyHidden>\n\t) : (\n\t\t<StyledLabel as=\"legend\">{ label }</StyledLabel>\n\t);\n};\n\nconst UnconnectedBorderControl = (\n\tprops: WordPressComponentProps< BorderControlProps, 'div', false >,\n\tforwardedRef: React.ForwardedRef< any >\n) => {\n\tconst {\n\t\t__next40pxDefaultSize = false,\n\t\tcolors,\n\t\tdisableCustomColors,\n\t\tdisableUnits,\n\t\tenableAlpha,\n\t\tenableStyle,\n\t\thideLabelFromVision,\n\t\tinnerWrapperClassName,\n\t\tinputWidth,\n\t\tisStyleSettable,\n\t\tlabel,\n\t\tonBorderChange,\n\t\tonSliderChange,\n\t\tonWidthChange,\n\t\tplaceholder,\n\t\t__unstablePopoverProps,\n\t\tpreviousStyleSelection,\n\t\tshowDropdownHeader,\n\t\tsize,\n\t\tsliderClassName,\n\t\tvalue: border,\n\t\twidthUnit,\n\t\twidthValue,\n\t\twithSlider,\n\t\t__experimentalIsRenderedInSidebar,\n\t\t...otherProps\n\t} = useBorderControl( props );\n\n\treturn (\n\t\t<View as=\"fieldset\" { ...otherProps } ref={ forwardedRef }>\n\t\t\t<BorderLabel\n\t\t\t\tlabel={ label }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t/>\n\t\t\t<HStack spacing={ 4 } className={ innerWrapperClassName }>\n\t\t\t\t<UnitControl\n\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\t__shouldNotWarnDeprecated36pxSize\n\t\t\t\t\tprefix={\n\t\t\t\t\t\t<Spacer marginRight={ 1 } marginBottom={ 0 }>\n\t\t\t\t\t\t\t<BorderControlDropdown\n\t\t\t\t\t\t\t\tborder={ border }\n\t\t\t\t\t\t\t\tcolors={ colors }\n\t\t\t\t\t\t\t\t__unstablePopoverProps={\n\t\t\t\t\t\t\t\t\t__unstablePopoverProps\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdisableCustomColors={ disableCustomColors }\n\t\t\t\t\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t\t\t\t\t\tenableStyle={ enableStyle }\n\t\t\t\t\t\t\t\tisStyleSettable={ isStyleSettable }\n\t\t\t\t\t\t\t\tonChange={ onBorderChange }\n\t\t\t\t\t\t\t\tpreviousStyleSelection={\n\t\t\t\t\t\t\t\t\tpreviousStyleSelection\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tsize={ size }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Spacer>\n\t\t\t\t\t}\n\t\t\t\t\tlabel={ __( 'Border width' ) }\n\t\t\t\t\thideLabelFromVision\n\t\t\t\t\tmin={ 0 }\n\t\t\t\t\tonChange={ onWidthChange }\n\t\t\t\t\tvalue={ border?.width || '' }\n\t\t\t\t\tplaceholder={ placeholder }\n\t\t\t\t\tdisableUnits={ disableUnits }\n\t\t\t\t\t__unstableInputWidth={ inputWidth }\n\t\t\t\t\tsize={ size }\n\t\t\t\t/>\n\t\t\t\t{ withSlider && (\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Border width' ) }\n\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\tclassName={ sliderClassName }\n\t\t\t\t\t\tinitialPosition={ 0 }\n\t\t\t\t\t\tmax={ 100 }\n\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\tonChange={ onSliderChange }\n\t\t\t\t\t\tstep={ [ 'px', '%' ].includes( widthUnit ) ? 1 : 0.1 }\n\t\t\t\t\t\tvalue={ widthValue || undefined }\n\t\t\t\t\t\twithInputField={ false }\n\t\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\t\t__shouldNotWarnDeprecated36pxSize\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t</View>\n\t);\n};\n\n/**\n * The `BorderControl` brings together internal sub-components which allow users to\n * set the various properties of a border. The first sub-component, a\n * `BorderDropdown` contains options representing border color and style. The\n * border width is controlled via a `UnitControl` and an optional `RangeControl`.\n *\n * Border radius is not covered by this control as it may be desired separate to\n * color, style, and width. For example, the border radius may be absorbed under\n * a \"shape\" abstraction.\n *\n * ```jsx\n * import { BorderControl } from '@wordpress/components';\n * import { __ } from '@wordpress/i18n';\n *\n * const colors = [\n * \t{ name: 'Blue 20', color: '#72aee6' },\n * \t// ...\n * ];\n *\n * const MyBorderControl = () => {\n * \tconst [ border, setBorder ] = useState();\n * \tconst onChange = ( newBorder ) => setBorder( newBorder );\n *\n * \treturn (\n * \t\t<BorderControl\n * \t\t\t__next40pxDefaultSize\n * \t\t\tcolors={ colors }\n * \t\t\tlabel={ __( 'Border' ) }\n * \t\t\tonChange={ onChange }\n * \t\t\tvalue={ border }\n * \t\t/>\n * \t);\n * };\n * ```\n */\nexport const BorderControl = contextConnect(\n\tUnconnectedBorderControl,\n\t'BorderControl'\n);\n\nexport default BorderControl;\n","/**\n * External dependencies\n */\nimport type { CSSProperties } from 'react';\n\nconst ALIGNMENTS = {\n\tbottom: { alignItems: 'flex-end', justifyContent: 'center' },\n\tbottomLeft: { alignItems: 'flex-start', justifyContent: 'flex-end' },\n\tbottomRight: { alignItems: 'flex-end', justifyContent: 'flex-end' },\n\tcenter: { alignItems: 'center', justifyContent: 'center' },\n\tspaced: { alignItems: 'center', justifyContent: 'space-between' },\n\tleft: { alignItems: 'center', justifyContent: 'flex-start' },\n\tright: { alignItems: 'center', justifyContent: 'flex-end' },\n\tstretch: { alignItems: 'stretch' },\n\ttop: { alignItems: 'flex-start', justifyContent: 'center' },\n\ttopLeft: { alignItems: 'flex-start', justifyContent: 'flex-start' },\n\ttopRight: { alignItems: 'flex-start', justifyContent: 'flex-end' },\n};\n\nexport function getAlignmentProps( alignment?: keyof typeof ALIGNMENTS ): {\n\talignItems?: CSSProperties[ 'alignItems' ];\n\tjustifyContent?: CSSProperties[ 'justifyContent' ];\n} {\n\tconst alignmentProps = alignment ? ALIGNMENTS[ alignment ] : {};\n\n\treturn alignmentProps;\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { contextConnect } from '../context';\nimport { View } from '../view';\nimport useGrid from './hook';\nimport type { GridProps } from './types';\n\nfunction UnconnectedGrid(\n\tprops: WordPressComponentProps< GridProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst gridProps = useGrid( props );\n\n\treturn <View { ...gridProps } ref={ forwardedRef } />;\n}\n\n/**\n * `Grid` is a primitive layout component that can arrange content in a grid configuration.\n *\n * ```jsx\n * import {\n * \t__experimentalGrid as Grid,\n * \t__experimentalText as Text\n * } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<Grid columns={ 3 }>\n * \t\t\t<Text>Code</Text>\n * \t\t\t<Text>is</Text>\n * \t\t\t<Text>Poetry</Text>\n * \t\t</Grid>\n * \t);\n * }\n * ```\n */\nexport const Grid = contextConnect( UnconnectedGrid, 'Grid' );\n\nexport default Grid;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { useContextSystem } from '../context';\nimport { getAlignmentProps } from './utils';\nimport { useResponsiveValue } from '../utils/use-responsive-value';\nimport CONFIG from '../utils/config-values';\nimport { useCx } from '../utils/hooks/use-cx';\nimport type { GridProps } from './types';\n\nexport default function useGrid(\n\tprops: WordPressComponentProps< GridProps, 'div' >\n) {\n\tconst {\n\t\talign,\n\t\talignment,\n\t\tclassName,\n\t\tcolumnGap,\n\t\tcolumns = 2,\n\t\tgap = 3,\n\t\tisInline = false,\n\t\tjustify,\n\t\trowGap,\n\t\trows,\n\t\ttemplateColumns,\n\t\ttemplateRows,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Grid' );\n\n\tconst columnsAsArray = Array.isArray( columns ) ? columns : [ columns ];\n\tconst column = useResponsiveValue( columnsAsArray );\n\tconst rowsAsArray = Array.isArray( rows ) ? rows : [ rows ];\n\tconst row = useResponsiveValue( rowsAsArray );\n\n\tconst gridTemplateColumns =\n\t\ttemplateColumns || ( !! columns && `repeat( ${ column }, 1fr )` );\n\tconst gridTemplateRows =\n\t\ttemplateRows || ( !! rows && `repeat( ${ row }, 1fr )` );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo( () => {\n\t\tconst alignmentProps = getAlignmentProps( alignment );\n\n\t\tconst gridClasses = css( {\n\t\t\talignItems: align,\n\t\t\tdisplay: isInline ? 'inline-grid' : 'grid',\n\t\t\tgap: `calc( ${ CONFIG.gridBase } * ${ gap } )`,\n\t\t\tgridTemplateColumns: gridTemplateColumns || undefined,\n\t\t\tgridTemplateRows: gridTemplateRows || undefined,\n\t\t\tgridRowGap: rowGap,\n\t\t\tgridColumnGap: columnGap,\n\t\t\tjustifyContent: justify,\n\t\t\tverticalAlign: isInline ? 'middle' : undefined,\n\t\t\t...alignmentProps,\n\t\t} );\n\n\t\treturn cx( gridClasses, className );\n\t}, [\n\t\talign,\n\t\talignment,\n\t\tclassName,\n\t\tcolumnGap,\n\t\tcx,\n\t\tgap,\n\t\tgridTemplateColumns,\n\t\tgridTemplateRows,\n\t\tisInline,\n\t\tjustify,\n\t\trowGap,\n\t] );\n\n\treturn { ...otherProps, className: classes };\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useMemo, useState } from '@wordpress/element';\nimport { useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BorderBoxControlVisualizer from '../border-box-control-visualizer';\nimport { BorderControl } from '../../border-control';\nimport { Grid } from '../../grid';\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect } from '../../context';\nimport { useBorderBoxControlSplitControls } from './hook';\n\nimport type { BorderControlProps } from '../../border-control/types';\nimport type { SplitControlsProps } from '../types';\n\nconst BorderBoxControlSplitControls = (\n\tprops: WordPressComponentProps< SplitControlsProps, 'div' >,\n\tforwardedRef: React.ForwardedRef< any >\n) => {\n\tconst {\n\t\tcenteredClassName,\n\t\tcolors,\n\t\tdisableCustomColors,\n\t\tenableAlpha,\n\t\tenableStyle,\n\t\tonChange,\n\t\tpopoverPlacement,\n\t\tpopoverOffset,\n\t\trightAlignedClassName,\n\t\tsize = 'default',\n\t\tvalue,\n\t\t__experimentalIsRenderedInSidebar,\n\t\t...otherProps\n\t} = useBorderBoxControlSplitControls( props );\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState< Element | null >(\n\t\tnull\n\t);\n\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps: BorderControlProps[ '__unstablePopoverProps' ] =\n\t\tuseMemo(\n\t\t\t() =>\n\t\t\t\tpopoverPlacement\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tplacement: popoverPlacement,\n\t\t\t\t\t\t\toffset: popoverOffset,\n\t\t\t\t\t\t\tanchor: popoverAnchor,\n\t\t\t\t\t\t\tshift: true,\n\t\t\t\t\t }\n\t\t\t\t\t: undefined,\n\t\t\t[ popoverPlacement, popoverOffset, popoverAnchor ]\n\t\t);\n\n\tconst sharedBorderControlProps = {\n\t\tcolors,\n\t\tdisableCustomColors,\n\t\tenableAlpha,\n\t\tenableStyle,\n\t\tisCompact: true,\n\t\t__experimentalIsRenderedInSidebar,\n\t\tsize,\n\t\t__shouldNotWarnDeprecated36pxSize: true,\n\t};\n\n\tconst mergedRef = useMergeRefs( [ setPopoverAnchor, forwardedRef ] );\n\n\treturn (\n\t\t<Grid { ...otherProps } ref={ mergedRef } gap={ 3 }>\n\t\t\t<BorderBoxControlVisualizer value={ value } size={ size } />\n\t\t\t<BorderControl\n\t\t\t\tclassName={ centeredClassName }\n\t\t\t\thideLabelFromVision\n\t\t\t\tlabel={ __( 'Top border' ) }\n\t\t\t\tonChange={ ( newBorder ) => onChange( newBorder, 'top' ) }\n\t\t\t\t__unstablePopoverProps={ popoverProps }\n\t\t\t\tvalue={ value?.top }\n\t\t\t\t{ ...sharedBorderControlProps }\n\t\t\t/>\n\t\t\t<BorderControl\n\t\t\t\thideLabelFromVision\n\t\t\t\tlabel={ __( 'Left border' ) }\n\t\t\t\tonChange={ ( newBorder ) => onChange( newBorder, 'left' ) }\n\t\t\t\t__unstablePopoverProps={ popoverProps }\n\t\t\t\tvalue={ value?.left }\n\t\t\t\t{ ...sharedBorderControlProps }\n\t\t\t/>\n\t\t\t<BorderControl\n\t\t\t\tclassName={ rightAlignedClassName }\n\t\t\t\thideLabelFromVision\n\t\t\t\tlabel={ __( 'Right border' ) }\n\t\t\t\tonChange={ ( newBorder ) => onChange( newBorder, 'right' ) }\n\t\t\t\t__unstablePopoverProps={ popoverProps }\n\t\t\t\tvalue={ value?.right }\n\t\t\t\t{ ...sharedBorderControlProps }\n\t\t\t/>\n\t\t\t<BorderControl\n\t\t\t\tclassName={ centeredClassName }\n\t\t\t\thideLabelFromVision\n\t\t\t\tlabel={ __( 'Bottom border' ) }\n\t\t\t\tonChange={ ( newBorder ) => onChange( newBorder, 'bottom' ) }\n\t\t\t\t__unstablePopoverProps={ popoverProps }\n\t\t\t\tvalue={ value?.bottom }\n\t\t\t\t{ ...sharedBorderControlProps }\n\t\t\t/>\n\t\t</Grid>\n\t);\n};\n\nconst ConnectedBorderBoxControlSplitControls = contextConnect(\n\tBorderBoxControlSplitControls,\n\t'BorderBoxControlSplitControls'\n);\nexport default ConnectedBorderBoxControlSplitControls;\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport * as styles from '../styles';\nimport type { WordPressComponentProps } from '../../context';\nimport { useContextSystem } from '../../context';\nimport { useCx } from '../../utils/';\n\nimport type { SplitControlsProps } from '../types';\n\nexport function useBorderBoxControlSplitControls(\n\tprops: WordPressComponentProps< SplitControlsProps, 'div' >\n) {\n\tconst {\n\t\tclassName,\n\t\tcolors = [],\n\t\tenableAlpha = false,\n\t\tenableStyle = true,\n\t\tsize = 'default',\n\t\t__experimentalIsRenderedInSidebar = false,\n\t\t...otherProps\n\t} = useContextSystem( props, 'BorderBoxControlSplitControls' );\n\n\t// Generate class names.\n\tconst cx = useCx();\n\tconst classes = useMemo( () => {\n\t\treturn cx( styles.borderBoxControlSplitControls( size ), className );\n\t}, [ cx, className, size ] );\n\n\tconst centeredClassName = useMemo( () => {\n\t\treturn cx( styles.centeredBorderControl, className );\n\t}, [ cx, className ] );\n\n\tconst rightAlignedClassName = useMemo( () => {\n\t\treturn cx( styles.rightBorderControl(), className );\n\t}, [ cx, className ] );\n\n\treturn {\n\t\t...otherProps,\n\t\tcenteredClassName,\n\t\tclassName: classes,\n\t\tcolors,\n\t\tenableAlpha,\n\t\tenableStyle,\n\t\trightAlignedClassName,\n\t\tsize,\n\t\t__experimentalIsRenderedInSidebar,\n\t};\n}\n","const UNITED_VALUE_REGEX =\n\t/^([\\d.\\-+]*)\\s*(fr|cm|mm|Q|in|pc|pt|px|em|ex|ch|rem|lh|vw|vh|vmin|vmax|%|cap|ic|rlh|vi|vb|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx|svw|lvw|dvw|svh|lvh|dvh|svi|lvi|dvi|svb|lvb|dvb|svmin|lvmin|dvmin|svmax|lvmax|dvmax)?$/;\n\n/**\n * Parses a number and unit from a value.\n *\n * @param toParse Value to parse\n *\n * @return The extracted number and unit.\n */\nexport function parseCSSUnitValue(\n\ttoParse: string\n): [ number | undefined, string | undefined ] {\n\tconst value = toParse.trim();\n\n\tconst matched = value.match( UNITED_VALUE_REGEX );\n\tif ( ! matched ) {\n\t\treturn [ undefined, undefined ];\n\t}\n\tconst [ , num, unit ] = matched;\n\tlet numParsed: number | undefined = parseFloat( num );\n\tnumParsed = Number.isNaN( numParsed ) ? undefined : numParsed;\n\n\treturn [ numParsed, unit ];\n}\n\n/**\n * Combines a value and a unit into a unit value.\n *\n * @param value\n * @param unit\n *\n * @return The unit value.\n */\nexport function createCSSUnitValue(\n\tvalue: string | number,\n\tunit: string\n): string {\n\treturn `${ value }${ unit }`;\n}\n","/**\n * External dependencies\n */\nimport type { CSSProperties } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { parseCSSUnitValue } from '../utils/unit-values';\nimport type { Border } from '../border-control/types';\nimport type { AnyBorder, Borders, BorderProp, BorderSide } from './types';\n\nconst sides: BorderSide[] = [ 'top', 'right', 'bottom', 'left' ];\nconst borderProps: BorderProp[] = [ 'color', 'style', 'width' ];\n\nexport const isEmptyBorder = ( border?: Border ) => {\n\tif ( ! border ) {\n\t\treturn true;\n\t}\n\treturn ! borderProps.some( ( prop ) => border[ prop ] !== undefined );\n};\n\nexport const isDefinedBorder = ( border: AnyBorder ) => {\n\t// No border, no worries :)\n\tif ( ! border ) {\n\t\treturn false;\n\t}\n\n\t// If we have individual borders per side within the border object we\n\t// need to check whether any of those side borders have been set.\n\tif ( hasSplitBorders( border ) ) {\n\t\tconst allSidesEmpty = sides.every( ( side ) =>\n\t\t\tisEmptyBorder( ( border as Borders )[ side ] )\n\t\t);\n\n\t\treturn ! allSidesEmpty;\n\t}\n\n\t// If we have a top-level border only, check if that is empty. e.g.\n\t// { color: undefined, style: undefined, width: undefined }\n\t// Border radius can still be set within the border object as it is\n\t// handled separately.\n\treturn ! isEmptyBorder( border as Border );\n};\n\nexport const isCompleteBorder = ( border?: Border ) => {\n\tif ( ! border ) {\n\t\treturn false;\n\t}\n\n\treturn borderProps.every( ( prop ) => border[ prop ] !== undefined );\n};\n\nexport const hasSplitBorders = ( border: AnyBorder = {} ) => {\n\treturn Object.keys( border ).some(\n\t\t( side ) => sides.indexOf( side as BorderSide ) !== -1\n\t);\n};\n\nexport const hasMixedBorders = ( borders: AnyBorder ) => {\n\tif ( ! hasSplitBorders( borders ) ) {\n\t\treturn false;\n\t}\n\n\tconst shorthandBorders = sides.map( ( side: BorderSide ) =>\n\t\tgetShorthandBorderStyle( ( borders as Borders )?.[ side ] )\n\t);\n\n\treturn ! shorthandBorders.every(\n\t\t( border ) => border === shorthandBorders[ 0 ]\n\t);\n};\n\nexport const getSplitBorders = ( border?: Border ) => {\n\tif ( ! border || isEmptyBorder( border ) ) {\n\t\treturn undefined;\n\t}\n\n\treturn {\n\t\ttop: border,\n\t\tright: border,\n\t\tbottom: border,\n\t\tleft: border,\n\t};\n};\n\nexport const getBorderDiff = ( original: Border, updated: Border ) => {\n\tconst diff: Border = {};\n\n\tif ( original.color !== updated.color ) {\n\t\tdiff.color = updated.color;\n\t}\n\n\tif ( original.style !== updated.style ) {\n\t\tdiff.style = updated.style;\n\t}\n\n\tif ( original.width !== updated.width ) {\n\t\tdiff.width = updated.width;\n\t}\n\n\treturn diff;\n};\n\nexport const getCommonBorder = ( borders?: Borders ) => {\n\tif ( ! borders ) {\n\t\treturn undefined;\n\t}\n\n\tconst colors: ( CSSProperties[ 'borderColor' ] | undefined )[] = [];\n\tconst styles: ( CSSProperties[ 'borderStyle' ] | undefined )[] = [];\n\tconst widths: ( CSSProperties[ 'borderWidth' ] | undefined )[] = [];\n\n\tsides.forEach( ( side ) => {\n\t\tcolors.push( borders[ side ]?.color );\n\t\tstyles.push( borders[ side ]?.style );\n\t\twidths.push( borders[ side ]?.width );\n\t} );\n\n\tconst allColorsMatch = colors.every( ( value ) => value === colors[ 0 ] );\n\tconst allStylesMatch = styles.every( ( value ) => value === styles[ 0 ] );\n\tconst allWidthsMatch = widths.every( ( value ) => value === widths[ 0 ] );\n\n\treturn {\n\t\tcolor: allColorsMatch ? colors[ 0 ] : undefined,\n\t\tstyle: allStylesMatch ? styles[ 0 ] : undefined,\n\t\twidth: allWidthsMatch ? widths[ 0 ] : getMostCommonUnit( widths ),\n\t};\n};\n\nexport const getShorthandBorderStyle = (\n\tborder?: Border,\n\tfallbackBorder?: Border\n) => {\n\tif ( isEmptyBorder( border ) ) {\n\t\treturn fallbackBorder;\n\t}\n\n\tconst {\n\t\tcolor: fallbackColor,\n\t\tstyle: fallbackStyle,\n\t\twidth: fallbackWidth,\n\t} = fallbackBorder || {};\n\n\tconst {\n\t\tcolor = fallbackColor,\n\t\tstyle = fallbackStyle,\n\t\twidth = fallbackWidth,\n\t} = border as Border;\n\n\tconst hasVisibleBorder = ( !! width && width !== '0' ) || !! color;\n\tconst borderStyle = hasVisibleBorder ? style || 'solid' : style;\n\n\treturn [ width, borderStyle, color ].filter( Boolean ).join( ' ' );\n};\n\nexport const getMostCommonUnit = (\n\tvalues: Array< string | number | undefined >\n): string | undefined => {\n\t// Collect all the CSS units.\n\tconst units = values.map( ( value ) =>\n\t\tvalue === undefined ? undefined : parseCSSUnitValue( `${ value }` )[ 1 ]\n\t);\n\n\t// Return the most common unit out of only the defined CSS units.\n\tconst filteredUnits = units.filter( ( value ) => value !== undefined );\n\treturn mode( filteredUnits as string[] );\n};\n\n/**\n * Finds the mode value out of the array passed favouring the first value\n * as a tiebreaker.\n *\n * @param values Values to determine the mode from.\n *\n * @return The mode value.\n */\nfunction mode( values: Array< string > ): string | undefined {\n\tif ( values.length === 0 ) {\n\t\treturn undefined;\n\t}\n\n\tconst map: { [ index: string ]: number } = {};\n\tlet maxCount = 0;\n\tlet currentMode;\n\n\tvalues.forEach( ( value ) => {\n\t\tmap[ value ] = map[ value ] === undefined ? 1 : map[ value ] + 1;\n\n\t\tif ( map[ value ] > maxCount ) {\n\t\t\tcurrentMode = value;\n\t\t\tmaxCount = map[ value ];\n\t\t}\n\t} );\n\n\treturn currentMode;\n}\n","/**\n * WordPress dependencies\n */\nimport { useMemo, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport * as styles from '../styles';\nimport {\n\tgetBorderDiff,\n\tgetCommonBorder,\n\tgetSplitBorders,\n\thasMixedBorders,\n\thasSplitBorders,\n\tisCompleteBorder,\n\tisEmptyBorder,\n} from '../utils';\nimport type { WordPressComponentProps } from '../../context';\nimport { useContextSystem } from '../../context';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport { maybeWarnDeprecated36pxSize } from '../../utils/deprecated-36px-size';\n\nimport type { Border } from '../../border-control/types';\nimport type { Borders, BorderSide, BorderBoxControlProps } from '../types';\n\nexport function useBorderBoxControl(\n\tprops: WordPressComponentProps< BorderBoxControlProps, 'div' >\n) {\n\tconst {\n\t\tclassName,\n\t\tcolors = [],\n\t\tonChange,\n\t\tenableAlpha = false,\n\t\tenableStyle = true,\n\t\tsize = 'default',\n\t\tvalue,\n\t\t__experimentalIsRenderedInSidebar = false,\n\t\t__next40pxDefaultSize,\n\t\t...otherProps\n\t} = useContextSystem( props, 'BorderBoxControl' );\n\n\tmaybeWarnDeprecated36pxSize( {\n\t\tcomponentName: 'BorderBoxControl',\n\t\t__next40pxDefaultSize,\n\t\tsize,\n\t} );\n\n\tconst computedSize =\n\t\tsize === 'default' && __next40pxDefaultSize ? '__unstable-large' : size;\n\n\tconst mixedBorders = hasMixedBorders( value );\n\tconst splitBorders = hasSplitBorders( value );\n\n\tconst linkedValue = splitBorders\n\t\t? getCommonBorder( value as Borders | undefined )\n\t\t: ( value as Border );\n\n\tconst splitValue = splitBorders\n\t\t? ( value as Borders )\n\t\t: getSplitBorders( value as Border | undefined );\n\n\t// If no numeric width value is set, the unit select will be disabled.\n\tconst hasWidthValue = ! isNaN( parseFloat( `${ linkedValue?.width }` ) );\n\n\tconst [ isLinked, setIsLinked ] = useState( ! mixedBorders );\n\tconst toggleLinked = () => setIsLinked( ! isLinked );\n\n\tconst onLinkedChange = ( newBorder?: Border ) => {\n\t\tif ( ! newBorder ) {\n\t\t\treturn onChange( undefined );\n\t\t}\n\n\t\t// If we have all props defined on the new border apply it.\n\t\tif ( ! mixedBorders || isCompleteBorder( newBorder ) ) {\n\t\t\treturn onChange(\n\t\t\t\tisEmptyBorder( newBorder ) ? undefined : newBorder\n\t\t\t);\n\t\t}\n\n\t\t// If we had mixed borders we might have had some shared border props\n\t\t// that we need to maintain. For example; we could have mixed borders\n\t\t// with all the same color but different widths. Then from the linked\n\t\t// control we change the color. We should keep the separate widths.\n\t\tconst changes = getBorderDiff(\n\t\t\tlinkedValue as Border,\n\t\t\tnewBorder as Border\n\t\t);\n\t\tconst updatedBorders = {\n\t\t\ttop: { ...( value as Borders )?.top, ...changes },\n\t\t\tright: { ...( value as Borders )?.right, ...changes },\n\t\t\tbottom: { ...( value as Borders )?.bottom, ...changes },\n\t\t\tleft: { ...( value as Borders )?.left, ...changes },\n\t\t};\n\n\t\tif ( hasMixedBorders( updatedBorders ) ) {\n\t\t\treturn onChange( updatedBorders );\n\t\t}\n\n\t\tconst filteredResult = isEmptyBorder( updatedBorders.top )\n\t\t\t? undefined\n\t\t\t: updatedBorders.top;\n\n\t\tonChange( filteredResult );\n\t};\n\n\tconst onSplitChange = (\n\t\tnewBorder: Border | undefined,\n\t\tside: BorderSide\n\t) => {\n\t\tconst updatedBorders = { ...splitValue, [ side ]: newBorder };\n\n\t\tif ( hasMixedBorders( updatedBorders ) ) {\n\t\t\tonChange( updatedBorders );\n\t\t} else {\n\t\t\tonChange( newBorder );\n\t\t}\n\t};\n\n\tconst cx = useCx();\n\tconst classes = useMemo( () => {\n\t\treturn cx( styles.borderBoxControl, className );\n\t}, [ cx, className ] );\n\n\tconst linkedControlClassName = useMemo( () => {\n\t\treturn cx( styles.linkedBorderControl() );\n\t}, [ cx ] );\n\n\tconst wrapperClassName = useMemo( () => {\n\t\treturn cx( styles.wrapper );\n\t}, [ cx ] );\n\n\treturn {\n\t\t...otherProps,\n\t\tclassName: classes,\n\t\tcolors,\n\t\tdisableUnits: mixedBorders && ! hasWidthValue,\n\t\tenableAlpha,\n\t\tenableStyle,\n\t\thasMixedBorders: mixedBorders,\n\t\tisLinked,\n\t\tlinkedControlClassName,\n\t\tonLinkedChange,\n\t\tonSplitChange,\n\t\ttoggleLinked,\n\t\tlinkedValue,\n\t\tsize: computedSize,\n\t\tsplitValue,\n\t\twrapperClassName,\n\t\t__experimentalIsRenderedInSidebar,\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useMemo, useState } from '@wordpress/element';\nimport { useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BorderBoxControlLinkedButton from '../border-box-control-linked-button';\nimport BorderBoxControlSplitControls from '../border-box-control-split-controls';\nimport { BorderControl } from '../../border-control';\nimport { StyledLabel } from '../../base-control/styles/base-control-styles';\nimport { View } from '../../view';\nimport { VisuallyHidden } from '../../visually-hidden';\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect } from '../../context';\nimport { useBorderBoxControl } from './hook';\n\nimport type { BorderBoxControlProps } from '../types';\nimport type {\n\tLabelProps,\n\tBorderControlProps,\n} from '../../border-control/types';\n\nconst BorderLabel = ( props: LabelProps ) => {\n\tconst { label, hideLabelFromVision } = props;\n\n\tif ( ! label ) {\n\t\treturn null;\n\t}\n\n\treturn hideLabelFromVision ? (\n\t\t<VisuallyHidden as=\"label\">{ label }</VisuallyHidden>\n\t) : (\n\t\t<StyledLabel>{ label }</StyledLabel>\n\t);\n};\n\nconst UnconnectedBorderBoxControl = (\n\tprops: WordPressComponentProps< BorderBoxControlProps, 'div', false >,\n\tforwardedRef: React.ForwardedRef< any >\n) => {\n\tconst {\n\t\tclassName,\n\t\tcolors,\n\t\tdisableCustomColors,\n\t\tdisableUnits,\n\t\tenableAlpha,\n\t\tenableStyle,\n\t\thasMixedBorders,\n\t\thideLabelFromVision,\n\t\tisLinked,\n\t\tlabel,\n\t\tlinkedControlClassName,\n\t\tlinkedValue,\n\t\tonLinkedChange,\n\t\tonSplitChange,\n\t\tpopoverPlacement,\n\t\tpopoverOffset,\n\t\tsize,\n\t\tsplitValue,\n\t\ttoggleLinked,\n\t\twrapperClassName,\n\t\t__experimentalIsRenderedInSidebar,\n\t\t...otherProps\n\t} = useBorderBoxControl( props );\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState< Element | null >(\n\t\tnull\n\t);\n\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps: BorderControlProps[ '__unstablePopoverProps' ] =\n\t\tuseMemo(\n\t\t\t() =>\n\t\t\t\tpopoverPlacement\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tplacement: popoverPlacement,\n\t\t\t\t\t\t\toffset: popoverOffset,\n\t\t\t\t\t\t\tanchor: popoverAnchor,\n\t\t\t\t\t\t\tshift: true,\n\t\t\t\t\t }\n\t\t\t\t\t: undefined,\n\t\t\t[ popoverPlacement, popoverOffset, popoverAnchor ]\n\t\t);\n\n\tconst mergedRef = useMergeRefs( [ setPopoverAnchor, forwardedRef ] );\n\treturn (\n\t\t<View className={ className } { ...otherProps } ref={ mergedRef }>\n\t\t\t<BorderLabel\n\t\t\t\tlabel={ label }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t/>\n\t\t\t<View className={ wrapperClassName }>\n\t\t\t\t{ isLinked ? (\n\t\t\t\t\t<BorderControl\n\t\t\t\t\t\tclassName={ linkedControlClassName }\n\t\t\t\t\t\tcolors={ colors }\n\t\t\t\t\t\tdisableUnits={ disableUnits }\n\t\t\t\t\t\tdisableCustomColors={ disableCustomColors }\n\t\t\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t\t\t\tenableStyle={ enableStyle }\n\t\t\t\t\t\tonChange={ onLinkedChange }\n\t\t\t\t\t\tplaceholder={\n\t\t\t\t\t\t\thasMixedBorders ? __( 'Mixed' ) : undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\t__unstablePopoverProps={ popoverProps }\n\t\t\t\t\t\tshouldSanitizeBorder={ false } // This component will handle that.\n\t\t\t\t\t\tvalue={ linkedValue }\n\t\t\t\t\t\twithSlider\n\t\t\t\t\t\twidth={\n\t\t\t\t\t\t\tsize === '__unstable-large' ? '116px' : '110px'\n\t\t\t\t\t\t}\n\t\t\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\t}\n\t\t\t\t\t\t__shouldNotWarnDeprecated36pxSize\n\t\t\t\t\t\tsize={ size }\n\t\t\t\t\t/>\n\t\t\t\t) : (\n\t\t\t\t\t<BorderBoxControlSplitControls\n\t\t\t\t\t\tcolors={ colors }\n\t\t\t\t\t\tdisableCustomColors={ disableCustomColors }\n\t\t\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t\t\t\tenableStyle={ enableStyle }\n\t\t\t\t\t\tonChange={ onSplitChange }\n\t\t\t\t\t\tpopoverPlacement={ popoverPlacement }\n\t\t\t\t\t\tpopoverOffset={ popoverOffset }\n\t\t\t\t\t\tvalue={ splitValue }\n\t\t\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsize={ size }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<BorderBoxControlLinkedButton\n\t\t\t\t\tonClick={ toggleLinked }\n\t\t\t\t\tisLinked={ isLinked }\n\t\t\t\t\tsize={ size }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t</View>\n\t);\n};\n\n/**\n * An input control for the color, style, and width of the border of a box. The\n * border can be customized as a whole, or individually for each side of the box.\n *\n * ```jsx\n * import { BorderBoxControl } from '@wordpress/components';\n * import { __ } from '@wordpress/i18n';\n *\n * const colors = [\n * \t{ name: 'Blue 20', color: '#72aee6' },\n * \t// ...\n * ];\n *\n * const MyBorderBoxControl = () => {\n * \tconst defaultBorder = {\n * \t\tcolor: '#72aee6',\n * \t\tstyle: 'dashed',\n * \t\twidth: '1px',\n * \t};\n * \tconst [ borders, setBorders ] = useState( {\n * \t\ttop: defaultBorder,\n * \t\tright: defaultBorder,\n * \t\tbottom: defaultBorder,\n * \t\tleft: defaultBorder,\n * \t} );\n * \tconst onChange = ( newBorders ) => setBorders( newBorders );\n *\n * \treturn (\n * \t\t<BorderBoxControl\n * \t\t\t__next40pxDefaultSize\n * \t\t\tcolors={ colors }\n * \t\t\tlabel={ __( 'Borders' ) }\n * \t\t\tonChange={ onChange }\n * \t\t\tvalue={ borders }\n * \t\t/>\n * \t);\n * };\n * ```\n */\nexport const BorderBoxControl = contextConnect(\n\tUnconnectedBorderBoxControl,\n\t'BorderBoxControl'\n);\n\nexport default BorderBoxControl;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst settings = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z\" />\n\t\t<Path d=\"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z\" />\n\t</SVG>\n);\n\nexport default settings;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type {\n\tBoxControlInputControlProps,\n\tBoxControlProps,\n\tBoxControlValue,\n\tCustomValueUnits,\n\tPreset,\n} from './types';\nimport deprecated from '@wordpress/deprecated';\n\nexport const CUSTOM_VALUE_SETTINGS: CustomValueUnits = {\n\tpx: { max: 300, step: 1 },\n\t'%': { max: 100, step: 1 },\n\tvw: { max: 100, step: 1 },\n\tvh: { max: 100, step: 1 },\n\tem: { max: 10, step: 0.1 },\n\trm: { max: 10, step: 0.1 },\n\tsvw: { max: 100, step: 1 },\n\tlvw: { max: 100, step: 1 },\n\tdvw: { max: 100, step: 1 },\n\tsvh: { max: 100, step: 1 },\n\tlvh: { max: 100, step: 1 },\n\tdvh: { max: 100, step: 1 },\n\tvi: { max: 100, step: 1 },\n\tsvi: { max: 100, step: 1 },\n\tlvi: { max: 100, step: 1 },\n\tdvi: { max: 100, step: 1 },\n\tvb: { max: 100, step: 1 },\n\tsvb: { max: 100, step: 1 },\n\tlvb: { max: 100, step: 1 },\n\tdvb: { max: 100, step: 1 },\n\tvmin: { max: 100, step: 1 },\n\tsvmin: { max: 100, step: 1 },\n\tlvmin: { max: 100, step: 1 },\n\tdvmin: { max: 100, step: 1 },\n\tvmax: { max: 100, step: 1 },\n\tsvmax: { max: 100, step: 1 },\n\tlvmax: { max: 100, step: 1 },\n\tdvmax: { max: 100, step: 1 },\n};\n\nexport const LABELS = {\n\tall: __( 'All sides' ),\n\ttop: __( 'Top side' ),\n\tbottom: __( 'Bottom side' ),\n\tleft: __( 'Left side' ),\n\tright: __( 'Right side' ),\n\tvertical: __( 'Top and bottom sides' ),\n\thorizontal: __( 'Left and right sides' ),\n};\n\nexport const DEFAULT_VALUES = {\n\ttop: undefined,\n\tright: undefined,\n\tbottom: undefined,\n\tleft: undefined,\n};\n\nexport const ALL_SIDES = [ 'top', 'right', 'bottom', 'left' ] as const;\n\n/**\n * Gets an items with the most occurrence within an array\n * https://stackoverflow.com/a/20762713\n *\n * @param arr Array of items to check.\n * @return The item with the most occurrences.\n */\nfunction mode< T >( arr: T[] ) {\n\treturn arr\n\t\t.sort(\n\t\t\t( a, b ) =>\n\t\t\t\tarr.filter( ( v ) => v === a ).length -\n\t\t\t\tarr.filter( ( v ) => v === b ).length\n\t\t)\n\t\t.pop();\n}\n\n/**\n * Gets the merged input value and unit from values data.\n *\n * @param values Box values.\n * @param availableSides Available box sides to evaluate.\n *\n * @return A value + unit for the 'all' input.\n */\nexport function getMergedValue(\n\tvalues: BoxControlValue = {},\n\tavailableSides: BoxControlProps[ 'sides' ] = ALL_SIDES\n) {\n\tconst sides = normalizeSides( availableSides );\n\tif (\n\t\tsides.every(\n\t\t\t( side: keyof BoxControlValue ) =>\n\t\t\t\tvalues[ side ] === values[ sides[ 0 ] ]\n\t\t)\n\t) {\n\t\treturn values[ sides[ 0 ] ];\n\t}\n\n\treturn undefined;\n}\n\n/**\n * Checks if the values are mixed.\n *\n * @param values Box values.\n * @param availableSides Available box sides to evaluate.\n * @return Whether the values are mixed.\n */\nexport function isValueMixed(\n\tvalues: BoxControlValue = {},\n\tavailableSides: BoxControlProps[ 'sides' ] = ALL_SIDES\n) {\n\tconst sides = normalizeSides( availableSides );\n\treturn sides.some(\n\t\t( side: keyof BoxControlValue ) =>\n\t\t\tvalues[ side ] !== values[ sides[ 0 ] ]\n\t);\n}\n\n/**\n * Determine the most common unit selection to use as a fallback option.\n *\n * @param selectedUnits Current unit selections for individual sides.\n * @return Most common unit selection.\n */\nexport function getAllUnitFallback( selectedUnits?: BoxControlValue ) {\n\tif ( ! selectedUnits || typeof selectedUnits !== 'object' ) {\n\t\treturn undefined;\n\t}\n\n\tconst filteredUnits = Object.values( selectedUnits ).filter( Boolean );\n\n\treturn mode( filteredUnits );\n}\n\n/**\n * Checks to determine if values are defined.\n *\n * @param values Box values.\n *\n * @return Whether values are mixed.\n */\nexport function isValuesDefined( values?: BoxControlValue ) {\n\treturn (\n\t\tvalues &&\n\t\tObject.values( values ).filter(\n\t\t\t// Switching units when input is empty causes values only\n\t\t\t// containing units. This gives false positive on mixed values\n\t\t\t// unless filtered.\n\t\t\t( value ) => !! value && /\\d/.test( value )\n\t\t).length > 0\n\t);\n}\n\n/**\n * Get initial selected side, factoring in whether the sides are linked,\n * and whether the vertical / horizontal directions are grouped via splitOnAxis.\n *\n * @param isLinked Whether the box control's fields are linked.\n * @param splitOnAxis Whether splitting by horizontal or vertical axis.\n * @return The initial side.\n */\nexport function getInitialSide( isLinked: boolean, splitOnAxis: boolean ) {\n\tlet initialSide: keyof typeof LABELS = 'all';\n\n\tif ( ! isLinked ) {\n\t\tinitialSide = splitOnAxis ? 'vertical' : 'top';\n\t}\n\n\treturn initialSide;\n}\n\n/**\n * Normalizes provided sides configuration to an array containing only top,\n * right, bottom and left. This essentially just maps `horizontal` or `vertical`\n * to their appropriate sides to facilitate correctly determining value for\n * all input control.\n *\n * @param sides Available sides for box control.\n * @return Normalized sides configuration.\n */\nexport function normalizeSides( sides: BoxControlProps[ 'sides' ] ) {\n\tconst filteredSides: ( keyof BoxControlValue )[] = [];\n\n\tif ( ! sides?.length ) {\n\t\treturn ALL_SIDES;\n\t}\n\n\tif ( sides.includes( 'vertical' ) ) {\n\t\tfilteredSides.push( ...( [ 'top', 'bottom' ] as const ) );\n\t} else if ( sides.includes( 'horizontal' ) ) {\n\t\tfilteredSides.push( ...( [ 'left', 'right' ] as const ) );\n\t} else {\n\t\tconst newSides = ALL_SIDES.filter( ( side ) => sides.includes( side ) );\n\t\tfilteredSides.push( ...newSides );\n\t}\n\n\treturn filteredSides;\n}\n\n/**\n * Applies a value to an object representing top, right, bottom and left sides\n * while taking into account any custom side configuration.\n *\n * @deprecated\n *\n * @param currentValues The current values for each side.\n * @param newValue The value to apply to the sides object.\n * @param sides Array defining valid sides.\n *\n * @return Object containing the updated values for each side.\n */\nexport function applyValueToSides(\n\tcurrentValues: BoxControlValue,\n\tnewValue?: string,\n\tsides?: BoxControlProps[ 'sides' ]\n): BoxControlValue {\n\tdeprecated( 'applyValueToSides', {\n\t\tsince: '6.8',\n\t\tversion: '7.0',\n\t} );\n\tconst newValues = { ...currentValues };\n\n\tif ( sides?.length ) {\n\t\tsides.forEach( ( side ) => {\n\t\t\tif ( side === 'vertical' ) {\n\t\t\t\tnewValues.top = newValue;\n\t\t\t\tnewValues.bottom = newValue;\n\t\t\t} else if ( side === 'horizontal' ) {\n\t\t\t\tnewValues.left = newValue;\n\t\t\t\tnewValues.right = newValue;\n\t\t\t} else {\n\t\t\t\tnewValues[ side ] = newValue;\n\t\t\t}\n\t\t} );\n\t} else {\n\t\tALL_SIDES.forEach( ( side ) => ( newValues[ side ] = newValue ) );\n\t}\n\n\treturn newValues;\n}\n\n/**\n * Return the allowed sides based on the sides configuration.\n *\n * @param sides Sides configuration.\n * @return Allowed sides.\n */\nexport function getAllowedSides(\n\tsides: BoxControlInputControlProps[ 'sides' ]\n) {\n\tconst allowedSides: Set< keyof BoxControlValue > = new Set(\n\t\t! sides ? ALL_SIDES : []\n\t);\n\tsides?.forEach( ( allowedSide ) => {\n\t\tif ( allowedSide === 'vertical' ) {\n\t\t\tallowedSides.add( 'top' );\n\t\t\tallowedSides.add( 'bottom' );\n\t\t} else if ( allowedSide === 'horizontal' ) {\n\t\t\tallowedSides.add( 'right' );\n\t\t\tallowedSides.add( 'left' );\n\t\t} else {\n\t\t\tallowedSides.add( allowedSide );\n\t\t}\n\t} );\n\treturn allowedSides;\n}\n\n/**\n * Checks if a value is a preset value.\n *\n * @param value The value to check.\n * @param presetKey The preset key to check against.\n * @return Whether the value is a preset value.\n */\nexport function isValuePreset( value: string, presetKey: string ) {\n\treturn value.startsWith( `var:preset|${ presetKey }|` );\n}\n\n/**\n * Returns the index of the preset value in the presets array.\n *\n * @param value The value to check.\n * @param presetKey The preset key to check against.\n * @param presets The array of presets to search.\n * @return The index of the preset value in the presets array.\n */\nexport function getPresetIndexFromValue(\n\tvalue: string,\n\tpresetKey: string,\n\tpresets: Preset[]\n) {\n\tif ( ! isValuePreset( value, presetKey ) ) {\n\t\treturn undefined;\n\t}\n\n\tconst match = value.match(\n\t\tnew RegExp( `^var:preset\\\\|${ presetKey }\\\\|(.+)$` )\n\t);\n\tif ( ! match ) {\n\t\treturn undefined;\n\t}\n\tconst slug = match[ 1 ];\n\tconst index = presets.findIndex( ( preset ) => {\n\t\treturn preset.slug === slug;\n\t} );\n\n\treturn index !== -1 ? index : undefined;\n}\n\n/**\n * Returns the preset value from the index.\n *\n * @param index The index of the preset value in the presets array.\n * @param presetKey The preset key to check against.\n * @param presets The array of presets to search.\n * @return The preset value from the index.\n */\nexport function getPresetValueFromIndex(\n\tindex: number,\n\tpresetKey: string,\n\tpresets: Preset[]\n) {\n\tconst preset = presets[ index ];\n\treturn `var:preset|${ presetKey }|${ preset.slug }`;\n}\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\n\nexport const Root = styled.span`\n\tbox-sizing: border-box;\n\tdisplay: block;\n\twidth: 24px;\n\theight: 24px;\n\tposition: relative;\n\tpadding: 4px;\n`;\n\nexport const Viewbox = styled.span`\n\tbox-sizing: border-box;\n\tdisplay: block;\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n`;\n\nconst strokeFocus = ( { isFocused }: { isFocused: boolean } ) => {\n\treturn css( {\n\t\tbackgroundColor: 'currentColor',\n\t\topacity: isFocused ? 1 : 0.3,\n\t} );\n};\n\nconst Stroke = styled.span`\n\tbox-sizing: border-box;\n\tdisplay: block;\n\tpointer-events: none;\n\tposition: absolute;\n\t${ strokeFocus };\n`;\n\nconst VerticalStroke = styled( Stroke )`\n\tbottom: 3px;\n\ttop: 3px;\n\twidth: 2px;\n`;\n\nconst HorizontalStroke = styled( Stroke )`\n\theight: 2px;\n\tleft: 3px;\n\tright: 3px;\n`;\n\nexport const TopStroke = styled( HorizontalStroke )`\n\ttop: 0;\n`;\n\nexport const RightStroke = styled( VerticalStroke )`\n\tright: 0;\n`;\n\nexport const BottomStroke = styled( HorizontalStroke )`\n\tbottom: 0;\n`;\n\nexport const LeftStroke = styled( VerticalStroke )`\n\tleft: 0;\n`;\n","/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport {\n\tRoot,\n\tViewbox,\n\tTopStroke,\n\tRightStroke,\n\tBottomStroke,\n\tLeftStroke,\n} from './styles/box-control-icon-styles';\nimport type { BoxControlIconProps, BoxControlProps } from './types';\n\nconst BASE_ICON_SIZE = 24;\n\nexport default function BoxControlIcon( {\n\tsize = 24,\n\tside = 'all',\n\tsides,\n\t...props\n}: WordPressComponentProps< BoxControlIconProps, 'span' > ) {\n\tconst isSideDisabled = (\n\t\tvalue: NonNullable< BoxControlProps[ 'sides' ] >[ number ]\n\t) => sides?.length && ! sides.includes( value );\n\n\tconst hasSide = (\n\t\tvalue: NonNullable< BoxControlProps[ 'sides' ] >[ number ]\n\t) => {\n\t\tif ( isSideDisabled( value ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn side === 'all' || side === value;\n\t};\n\n\tconst top = hasSide( 'top' ) || hasSide( 'vertical' );\n\tconst right = hasSide( 'right' ) || hasSide( 'horizontal' );\n\tconst bottom = hasSide( 'bottom' ) || hasSide( 'vertical' );\n\tconst left = hasSide( 'left' ) || hasSide( 'horizontal' );\n\n\t// Simulates SVG Icon scaling.\n\tconst scale = size / BASE_ICON_SIZE;\n\n\treturn (\n\t\t<Root style={ { transform: `scale(${ scale })` } } { ...props }>\n\t\t\t<Viewbox>\n\t\t\t\t<TopStroke isFocused={ top } />\n\t\t\t\t<RightStroke isFocused={ right } />\n\t\t\t\t<BottomStroke isFocused={ bottom } />\n\t\t\t\t<LeftStroke isFocused={ left } />\n\t\t\t</Viewbox>\n\t\t</Root>\n\t);\n}\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n/**\n * Internal dependencies\n */\nimport BoxControlIcon from '../icon';\nimport Button from '../../button';\nimport { HStack } from '../../h-stack';\nimport RangeControl from '../../range-control';\nimport UnitControl from '../../unit-control';\nimport { space } from '../../utils/space';\n\nexport const StyledUnitControl = styled( UnitControl )`\n\tmax-width: 90px;\n`;\n\nexport const InputWrapper = styled( HStack )`\n\tgrid-column: 1 / span 3;\n`;\n\nexport const ResetButton = styled( Button )`\n\tgrid-area: 1 / 2;\n\tjustify-self: end;\n`;\n\nexport const LinkedButtonWrapper = styled.div`\n\tgrid-area: 1 / 3;\n\tjustify-self: end;\n`;\n\nexport const FlexedBoxControlIcon = styled( BoxControlIcon )`\n\tflex: 0 0 auto;\n`;\n\nexport const FlexedRangeControl = styled( RangeControl )`\n\twidth: 100%;\n\tmargin-inline-end: ${ space( 2 ) };\n`;\n","/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport { settings } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport Tooltip from '../tooltip';\nimport { parseQuantityAndUnitFromRawValue } from '../unit-control/utils';\nimport {\n\tCUSTOM_VALUE_SETTINGS,\n\tgetMergedValue,\n\tgetAllowedSides,\n\tgetPresetIndexFromValue,\n\tgetPresetValueFromIndex,\n\tisValuePreset,\n\tisValuesDefined,\n\tisValueMixed,\n\tLABELS,\n} from './utils';\nimport {\n\tFlexedBoxControlIcon,\n\tFlexedRangeControl,\n\tInputWrapper,\n\tStyledUnitControl,\n} from './styles/box-control-styles';\nimport type { BoxControlInputControlProps, BoxControlValue } from './types';\nimport Button from '../button';\n\nconst noop = () => {};\n\nfunction getSidesToModify(\n\tside: BoxControlInputControlProps[ 'side' ],\n\tsides: BoxControlInputControlProps[ 'sides' ],\n\tisAlt?: boolean\n) {\n\tconst allowedSides = getAllowedSides( sides );\n\n\tlet modifiedSides: ( keyof BoxControlValue )[] = [];\n\tswitch ( side ) {\n\t\tcase 'all':\n\t\t\tmodifiedSides = [ 'top', 'bottom', 'left', 'right' ];\n\t\t\tbreak;\n\t\tcase 'horizontal':\n\t\t\tmodifiedSides = [ 'left', 'right' ];\n\t\t\tbreak;\n\t\tcase 'vertical':\n\t\t\tmodifiedSides = [ 'top', 'bottom' ];\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tmodifiedSides = [ side ];\n\t}\n\n\tif ( isAlt ) {\n\t\tswitch ( side ) {\n\t\t\tcase 'top':\n\t\t\t\tmodifiedSides.push( 'bottom' );\n\t\t\t\tbreak;\n\t\t\tcase 'bottom':\n\t\t\t\tmodifiedSides.push( 'top' );\n\t\t\t\tbreak;\n\t\t\tcase 'left':\n\t\t\t\tmodifiedSides.push( 'left' );\n\t\t\t\tbreak;\n\t\t\tcase 'right':\n\t\t\t\tmodifiedSides.push( 'right' );\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn modifiedSides.filter( ( s ) => allowedSides.has( s ) );\n}\n\nexport default function BoxInputControl( {\n\t__next40pxDefaultSize,\n\tonChange = noop,\n\tonFocus = noop,\n\tvalues,\n\tselectedUnits,\n\tsetSelectedUnits,\n\tsides,\n\tside,\n\tmin = 0,\n\tpresets,\n\tpresetKey,\n\t...props\n}: BoxControlInputControlProps ) {\n\tconst defaultValuesToModify = getSidesToModify( side, sides );\n\n\tconst handleOnFocus = ( event: React.FocusEvent< HTMLInputElement > ) => {\n\t\tonFocus( event, { side } );\n\t};\n\n\tconst handleOnChange = ( nextValues: BoxControlValue ) => {\n\t\tonChange( nextValues );\n\t};\n\n\tconst handleRawOnValueChange = ( next?: string ) => {\n\t\tconst nextValues = { ...values };\n\t\tdefaultValuesToModify.forEach( ( modifiedSide ) => {\n\t\t\tnextValues[ modifiedSide ] = next;\n\t\t} );\n\n\t\thandleOnChange( nextValues );\n\t};\n\n\tconst handleOnValueChange = (\n\t\tnext?: string,\n\t\textra?: { event: React.SyntheticEvent< Element, Event > }\n\t) => {\n\t\tconst nextValues = { ...values };\n\t\tconst isNumeric = next !== undefined && ! isNaN( parseFloat( next ) );\n\t\tconst nextValue = isNumeric ? next : undefined;\n\t\tconst modifiedSides = getSidesToModify(\n\t\t\tside,\n\t\t\tsides,\n\t\t\t/**\n\t\t\t * Supports changing pair sides. For example, holding the ALT key\n\t\t\t * when changing the TOP will also update BOTTOM.\n\t\t\t */\n\t\t\t// @ts-expect-error - TODO: event.altKey is only present when the change event was\n\t\t\t// triggered by a keyboard event. Should this feature be implemented differently so\n\t\t\t// it also works with drag events?\n\t\t\t!! extra?.event.altKey\n\t\t);\n\n\t\tmodifiedSides.forEach( ( modifiedSide ) => {\n\t\t\tnextValues[ modifiedSide ] = nextValue;\n\t\t} );\n\n\t\thandleOnChange( nextValues );\n\t};\n\n\tconst handleOnUnitChange = ( next?: string ) => {\n\t\tconst newUnits = { ...selectedUnits };\n\t\tdefaultValuesToModify.forEach( ( modifiedSide ) => {\n\t\t\tnewUnits[ modifiedSide ] = next;\n\t\t} );\n\t\tsetSelectedUnits( newUnits );\n\t};\n\n\tconst mergedValue = getMergedValue( values, defaultValuesToModify );\n\tconst hasValues = isValuesDefined( values );\n\tconst isMixed =\n\t\thasValues &&\n\t\tdefaultValuesToModify.length > 1 &&\n\t\tisValueMixed( values, defaultValuesToModify );\n\tconst [ parsedQuantity, parsedUnit ] =\n\t\tparseQuantityAndUnitFromRawValue( mergedValue );\n\tconst computedUnit = hasValues\n\t\t? parsedUnit\n\t\t: selectedUnits[ defaultValuesToModify[ 0 ] ];\n\tconst generatedId = useInstanceId( BoxInputControl, 'box-control-input' );\n\tconst inputId = [ generatedId, side ].join( '-' );\n\tconst isMixedUnit =\n\t\tdefaultValuesToModify.length > 1 &&\n\t\tmergedValue === undefined &&\n\t\tdefaultValuesToModify.some(\n\t\t\t( s ) => selectedUnits[ s ] !== computedUnit\n\t\t);\n\tconst usedValue =\n\t\tmergedValue === undefined && computedUnit ? computedUnit : mergedValue;\n\tconst mixedPlaceholder = isMixed || isMixedUnit ? __( 'Mixed' ) : undefined;\n\tconst hasPresets = presets && presets.length > 0 && presetKey;\n\tconst hasPresetValue =\n\t\thasPresets &&\n\t\tmergedValue !== undefined &&\n\t\t! isMixed &&\n\t\tisValuePreset( mergedValue, presetKey );\n\tconst [ showCustomValueControl, setShowCustomValueControl ] = useState(\n\t\t! hasPresets ||\n\t\t\t( ! hasPresetValue && ! isMixed && mergedValue !== undefined )\n\t);\n\tconst presetIndex = hasPresetValue\n\t\t? getPresetIndexFromValue( mergedValue, presetKey, presets )\n\t\t: undefined;\n\tconst marks = hasPresets\n\t\t? [ { value: 0, label: '', tooltip: __( 'None' ) } ].concat(\n\t\t\t\tpresets.map( ( preset, index ) => ( {\n\t\t\t\t\tvalue: index + 1,\n\t\t\t\t\tlabel: '',\n\t\t\t\t\ttooltip: preset.name ?? preset.slug,\n\t\t\t\t} ) )\n\t\t )\n\t\t: [];\n\n\treturn (\n\t\t<InputWrapper key={ `box-control-${ side }` } expanded>\n\t\t\t<FlexedBoxControlIcon side={ side } sides={ sides } />\n\t\t\t{ showCustomValueControl && (\n\t\t\t\t<>\n\t\t\t\t\t<Tooltip placement=\"top-end\" text={ LABELS[ side ] }>\n\t\t\t\t\t\t<StyledUnitControl\n\t\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\t\tmin={ min }\n\t\t\t\t\t\t\t__shouldNotWarnDeprecated36pxSize\n\t\t\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\t\t\tclassName=\"component-box-control__unit-control\"\n\t\t\t\t\t\t\tid={ inputId }\n\t\t\t\t\t\t\tisPressEnterToChange\n\t\t\t\t\t\t\tdisableUnits={ isMixed || isMixedUnit }\n\t\t\t\t\t\t\tvalue={ usedValue }\n\t\t\t\t\t\t\tonChange={ handleOnValueChange }\n\t\t\t\t\t\t\tonUnitChange={ handleOnUnitChange }\n\t\t\t\t\t\t\tonFocus={ handleOnFocus }\n\t\t\t\t\t\t\tlabel={ LABELS[ side ] }\n\t\t\t\t\t\t\tplaceholder={ mixedPlaceholder }\n\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Tooltip>\n\n\t\t\t\t\t<FlexedRangeControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\t\t__shouldNotWarnDeprecated36pxSize\n\t\t\t\t\t\taria-controls={ inputId }\n\t\t\t\t\t\tlabel={ LABELS[ side ] }\n\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\tonChange={ ( newValue ) => {\n\t\t\t\t\t\t\thandleOnValueChange(\n\t\t\t\t\t\t\t\tnewValue !== undefined\n\t\t\t\t\t\t\t\t\t? [ newValue, computedUnit ].join( '' )\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tmin={ isFinite( min ) ? min : 0 }\n\t\t\t\t\t\tmax={\n\t\t\t\t\t\t\tCUSTOM_VALUE_SETTINGS[ computedUnit ?? 'px' ]\n\t\t\t\t\t\t\t\t?.max ?? 10\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstep={\n\t\t\t\t\t\t\tCUSTOM_VALUE_SETTINGS[ computedUnit ?? 'px' ]\n\t\t\t\t\t\t\t\t?.step ?? 0.1\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvalue={ parsedQuantity ?? 0 }\n\t\t\t\t\t\twithInputField={ false }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t) }\n\n\t\t\t{ hasPresets && ! showCustomValueControl && (\n\t\t\t\t<FlexedRangeControl\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tclassName=\"spacing-sizes-control__range-control\"\n\t\t\t\t\tvalue={ presetIndex !== undefined ? presetIndex + 1 : 0 }\n\t\t\t\t\tonChange={ ( newIndex ) => {\n\t\t\t\t\t\tconst newValue =\n\t\t\t\t\t\t\tnewIndex === 0 || newIndex === undefined\n\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t: getPresetValueFromIndex(\n\t\t\t\t\t\t\t\t\t\tnewIndex - 1,\n\t\t\t\t\t\t\t\t\t\tpresetKey,\n\t\t\t\t\t\t\t\t\t\tpresets\n\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\thandleRawOnValueChange( newValue );\n\t\t\t\t\t} }\n\t\t\t\t\twithInputField={ false }\n\t\t\t\t\taria-valuenow={\n\t\t\t\t\t\tpresetIndex !== undefined ? presetIndex + 1 : 0\n\t\t\t\t\t}\n\t\t\t\t\taria-valuetext={\n\t\t\t\t\t\tmarks[ presetIndex !== undefined ? presetIndex + 1 : 0 ]\n\t\t\t\t\t\t\t.tooltip\n\t\t\t\t\t}\n\t\t\t\t\trenderTooltipContent={ ( index ) =>\n\t\t\t\t\t\tmarks[ ! index ? 0 : index ].tooltip\n\t\t\t\t\t}\n\t\t\t\t\tmin={ 0 }\n\t\t\t\t\tmax={ marks.length - 1 }\n\t\t\t\t\tmarks={ marks }\n\t\t\t\t\tlabel={ LABELS[ side ] }\n\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t{ hasPresets && (\n\t\t\t\t<Button\n\t\t\t\t\tlabel={\n\t\t\t\t\t\tshowCustomValueControl\n\t\t\t\t\t\t\t? __( 'Use size preset' )\n\t\t\t\t\t\t\t: __( 'Set custom size' )\n\t\t\t\t\t}\n\t\t\t\t\ticon={ settings }\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\tsetShowCustomValueControl( ! showCustomValueControl );\n\t\t\t\t\t} }\n\t\t\t\t\tisPressed={ showCustomValueControl }\n\t\t\t\t\tsize=\"small\"\n\t\t\t\t\ticonSize={ 24 }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</InputWrapper>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { link, linkOff } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\n\nexport default function LinkedButton( {\n\tisLinked,\n\t...props\n}: { isLinked?: boolean } & React.ComponentProps< typeof Button > ) {\n\tconst label = isLinked ? __( 'Unlink sides' ) : __( 'Link sides' );\n\n\treturn (\n\t\t<Button\n\t\t\t{ ...props }\n\t\t\tclassName=\"component-box-control__linked-button\"\n\t\t\tsize=\"small\"\n\t\t\ticon={ isLinked ? link : linkOff }\n\t\t\ticonSize={ 24 }\n\t\t\tlabel={ label }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport { BaseControl } from '../base-control';\nimport InputControl from './input-control';\nimport LinkedButton from './linked-button';\nimport { Grid } from '../grid';\nimport {\n\tInputWrapper,\n\tResetButton,\n\tLinkedButtonWrapper,\n} from './styles/box-control-styles';\nimport { parseQuantityAndUnitFromRawValue } from '../unit-control/utils';\nimport {\n\tDEFAULT_VALUES,\n\tgetInitialSide,\n\tisValueMixed,\n\tisValuesDefined,\n\tgetAllowedSides,\n} from './utils';\nimport { useControlledState } from '../utils/hooks';\nimport type {\n\tBoxControlIconProps,\n\tBoxControlProps,\n\tBoxControlValue,\n} from './types';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\n\nconst defaultInputProps = {\n\tmin: 0,\n};\n\nconst noop = () => {};\n\nfunction useUniqueId( idProp?: string ) {\n\tconst instanceId = useInstanceId( BoxControl, 'inspector-box-control' );\n\n\treturn idProp || instanceId;\n}\n\n/**\n * A control that lets users set values for top, right, bottom, and left. Can be\n * used as an input control for values like `padding` or `margin`.\n *\n * ```jsx\n * import { useState } from 'react';\n * import { BoxControl } from '@wordpress/components';\n *\n * function Example() {\n * const [ values, setValues ] = useState( {\n * top: '50px',\n * left: '10%',\n * right: '10%',\n * bottom: '50px',\n * } );\n *\n * return (\n * <BoxControl\n * __next40pxDefaultSize\n * values={ values }\n * onChange={ setValues }\n * />\n * );\n * };\n * ```\n */\nfunction BoxControl( {\n\t__next40pxDefaultSize = false,\n\tid: idProp,\n\tinputProps = defaultInputProps,\n\tonChange = noop,\n\tlabel = __( 'Box Control' ),\n\tvalues: valuesProp,\n\tunits,\n\tsides,\n\tsplitOnAxis = false,\n\tallowReset = true,\n\tresetValues = DEFAULT_VALUES,\n\tpresets,\n\tpresetKey,\n\tonMouseOver,\n\tonMouseOut,\n}: BoxControlProps ) {\n\tconst [ values, setValues ] = useControlledState( valuesProp, {\n\t\tfallback: DEFAULT_VALUES,\n\t} );\n\tconst inputValues = values || DEFAULT_VALUES;\n\tconst hasInitialValue = isValuesDefined( valuesProp );\n\tconst hasOneSide = sides?.length === 1;\n\n\tconst [ isDirty, setIsDirty ] = useState( hasInitialValue );\n\tconst [ isLinked, setIsLinked ] = useState(\n\t\t! hasInitialValue || ! isValueMixed( inputValues ) || hasOneSide\n\t);\n\n\tconst [ side, setSide ] = useState< BoxControlIconProps[ 'side' ] >(\n\t\tgetInitialSide( isLinked, splitOnAxis )\n\t);\n\n\t// Tracking selected units via internal state allows filtering of CSS unit\n\t// only values from being saved while maintaining preexisting unit selection\n\t// behaviour. Filtering CSS only values prevents invalid style values.\n\tconst [ selectedUnits, setSelectedUnits ] = useState< BoxControlValue >( {\n\t\ttop: parseQuantityAndUnitFromRawValue( valuesProp?.top )[ 1 ],\n\t\tright: parseQuantityAndUnitFromRawValue( valuesProp?.right )[ 1 ],\n\t\tbottom: parseQuantityAndUnitFromRawValue( valuesProp?.bottom )[ 1 ],\n\t\tleft: parseQuantityAndUnitFromRawValue( valuesProp?.left )[ 1 ],\n\t} );\n\n\tconst id = useUniqueId( idProp );\n\tconst headingId = `${ id }-heading`;\n\n\tconst toggleLinked = () => {\n\t\tsetIsLinked( ! isLinked );\n\t\tsetSide( getInitialSide( ! isLinked, splitOnAxis ) );\n\t};\n\n\tconst handleOnFocus = (\n\t\t_event: React.FocusEvent< HTMLInputElement >,\n\t\t{ side: nextSide }: { side: typeof side }\n\t) => {\n\t\tsetSide( nextSide );\n\t};\n\n\tconst handleOnChange = ( nextValues: BoxControlValue ) => {\n\t\tonChange( nextValues );\n\t\tsetValues( nextValues );\n\t\tsetIsDirty( true );\n\t};\n\n\tconst handleOnReset = () => {\n\t\tonChange( resetValues );\n\t\tsetValues( resetValues );\n\t\tsetSelectedUnits( resetValues );\n\t\tsetIsDirty( false );\n\t};\n\n\tconst inputControlProps = {\n\t\tonMouseOver,\n\t\tonMouseOut,\n\t\t...inputProps,\n\t\tonChange: handleOnChange,\n\t\tonFocus: handleOnFocus,\n\t\tisLinked,\n\t\tunits,\n\t\tselectedUnits,\n\t\tsetSelectedUnits,\n\t\tsides,\n\t\tvalues: inputValues,\n\t\t__next40pxDefaultSize,\n\t\tpresets,\n\t\tpresetKey,\n\t};\n\n\tmaybeWarnDeprecated36pxSize( {\n\t\tcomponentName: 'BoxControl',\n\t\t__next40pxDefaultSize,\n\t\tsize: undefined,\n\t} );\n\tconst sidesToRender = getAllowedSides( sides );\n\n\tif ( ( presets && ! presetKey ) || ( ! presets && presetKey ) ) {\n\t\tconst definedProp = presets ? 'presets' : 'presetKey';\n\t\tconst missingProp = presets ? 'presetKey' : 'presets';\n\t\twarning(\n\t\t\t`wp.components.BoxControl: the '${ missingProp }' prop is required when the '${ definedProp }' prop is defined.`\n\t\t);\n\t}\n\n\treturn (\n\t\t<Grid\n\t\t\tid={ id }\n\t\t\tcolumns={ 3 }\n\t\t\ttemplateColumns=\"1fr min-content min-content\"\n\t\t\trole=\"group\"\n\t\t\taria-labelledby={ headingId }\n\t\t>\n\t\t\t<BaseControl.VisualLabel id={ headingId }>\n\t\t\t\t{ label }\n\t\t\t</BaseControl.VisualLabel>\n\t\t\t{ isLinked && (\n\t\t\t\t<InputWrapper>\n\t\t\t\t\t<InputControl side=\"all\" { ...inputControlProps } />\n\t\t\t\t</InputWrapper>\n\t\t\t) }\n\t\t\t{ ! hasOneSide && (\n\t\t\t\t<LinkedButtonWrapper>\n\t\t\t\t\t<LinkedButton\n\t\t\t\t\t\tonClick={ toggleLinked }\n\t\t\t\t\t\tisLinked={ isLinked }\n\t\t\t\t\t/>\n\t\t\t\t</LinkedButtonWrapper>\n\t\t\t) }\n\n\t\t\t{ ! isLinked &&\n\t\t\t\tsplitOnAxis &&\n\t\t\t\t[ 'vertical', 'horizontal' ].map( ( axis ) => (\n\t\t\t\t\t<InputControl\n\t\t\t\t\t\tkey={ axis }\n\t\t\t\t\t\tside={ axis as 'horizontal' | 'vertical' }\n\t\t\t\t\t\t{ ...inputControlProps }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t{ ! isLinked &&\n\t\t\t\t! splitOnAxis &&\n\t\t\t\tArray.from( sidesToRender ).map( ( axis ) => (\n\t\t\t\t\t<InputControl\n\t\t\t\t\t\tkey={ axis }\n\t\t\t\t\t\tside={ axis }\n\t\t\t\t\t\t{ ...inputControlProps }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t{ allowReset && (\n\t\t\t\t<ResetButton\n\t\t\t\t\tclassName=\"component-box-control__reset-button\"\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tsize=\"small\"\n\t\t\t\t\tonClick={ handleOnReset }\n\t\t\t\t\tdisabled={ ! isDirty }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Reset' ) }\n\t\t\t\t</ResetButton>\n\t\t\t) }\n\t\t</Grid>\n\t);\n}\n\nexport { applyValueToSides } from './utils';\nexport default BoxControl;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport type { ButtonGroupProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nfunction UnforwardedButtonGroup(\n\tprops: WordPressComponentProps< ButtonGroupProps, 'div', false >,\n\tref: ForwardedRef< HTMLDivElement >\n) {\n\tconst { className, __shouldNotWarnDeprecated, ...restProps } = props;\n\tconst classes = clsx( 'components-button-group', className );\n\n\tif ( ! __shouldNotWarnDeprecated ) {\n\t\tdeprecated( 'wp.components.ButtonGroup', {\n\t\t\tsince: '6.8',\n\t\t\talternative: 'wp.components.__experimentalToggleGroupControl',\n\t\t} );\n\t}\n\n\treturn (\n\t\t<div ref={ ref } role=\"group\" className={ classes } { ...restProps } />\n\t);\n}\n\n/**\n * ButtonGroup can be used to group any related buttons together. To emphasize\n * related buttons, a group should share a common container.\n *\n * @deprecated Use `ToggleGroupControl` instead.\n *\n * ```jsx\n * import { Button, ButtonGroup } from '@wordpress/components';\n *\n * const MyButtonGroup = () => (\n * <ButtonGroup>\n * <Button variant=\"primary\">Button 1</Button>\n * <Button variant=\"primary\">Button 2</Button>\n * </ButtonGroup>\n * );\n * ```\n */\nexport const ButtonGroup = forwardRef( UnforwardedButtonGroup );\n\nexport default ButtonGroup;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\nexport const Elevation = css`\n\tbackground: transparent;\n\tdisplay: block;\n\tmargin: 0 !important;\n\tpointer-events: none;\n\tposition: absolute;\n\twill-change: box-shadow;\n`;\n","/**\n * External dependencies\n */\nimport type { SerializedStyles } from '@emotion/react';\nimport { css } from '@emotion/react';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { useContextSystem } from '../context';\nimport * as styles from './styles';\nimport { CONFIG } from '../utils';\nimport { useCx } from '../utils/hooks/use-cx';\nimport { isValueDefined } from '../utils/values';\nimport type { ElevationProps } from './types';\n\nexport function getBoxShadow( value: number ) {\n\tconst boxShadowColor = `rgba(0, 0, 0, ${ value / 20 })`;\n\tconst boxShadow = `0 ${ value }px ${ value * 2 }px 0\n\t${ boxShadowColor }`;\n\n\treturn boxShadow;\n}\n\nexport function useElevation(\n\tprops: WordPressComponentProps< ElevationProps, 'div' >\n) {\n\tconst {\n\t\tactive,\n\t\tborderRadius = 'inherit',\n\t\tclassName,\n\t\tfocus,\n\t\thover,\n\t\tisInteractive = false,\n\t\toffset = 0,\n\t\tvalue = 0,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Elevation' );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo( () => {\n\t\tlet hoverValue: number | undefined = isValueDefined( hover )\n\t\t\t? hover\n\t\t\t: value * 2;\n\t\tlet activeValue: number | undefined = isValueDefined( active )\n\t\t\t? active\n\t\t\t: value / 2;\n\n\t\tif ( ! isInteractive ) {\n\t\t\thoverValue = isValueDefined( hover ) ? hover : undefined;\n\t\t\tactiveValue = isValueDefined( active ) ? active : undefined;\n\t\t}\n\n\t\tconst transition = `box-shadow ${ CONFIG.transitionDuration } ${ CONFIG.transitionTimingFunction }`;\n\n\t\tconst sx: {\n\t\t\tBase?: SerializedStyles;\n\t\t\thover?: SerializedStyles;\n\t\t\tactive?: SerializedStyles;\n\t\t\tfocus?: SerializedStyles;\n\t\t} = {};\n\n\t\tsx.Base = css(\n\t\t\t{\n\t\t\t\tborderRadius,\n\t\t\t\tbottom: offset,\n\t\t\t\tboxShadow: getBoxShadow( value ),\n\t\t\t\topacity: CONFIG.elevationIntensity,\n\t\t\t\tleft: offset,\n\t\t\t\tright: offset,\n\t\t\t\ttop: offset,\n\t\t\t},\n\t\t\tcss`\n\t\t\t\t@media not ( prefers-reduced-motion ) {\n\t\t\t\t\ttransition: ${ transition };\n\t\t\t\t}\n\t\t\t`\n\t\t);\n\n\t\tif ( isValueDefined( hoverValue ) ) {\n\t\t\tsx.hover = css`\n\t\t\t\t*:hover > & {\n\t\t\t\t\tbox-shadow: ${ getBoxShadow( hoverValue ) };\n\t\t\t\t}\n\t\t\t`;\n\t\t}\n\n\t\tif ( isValueDefined( activeValue ) ) {\n\t\t\tsx.active = css`\n\t\t\t\t*:active > & {\n\t\t\t\t\tbox-shadow: ${ getBoxShadow( activeValue ) };\n\t\t\t\t}\n\t\t\t`;\n\t\t}\n\n\t\tif ( isValueDefined( focus ) ) {\n\t\t\tsx.focus = css`\n\t\t\t\t*:focus > & {\n\t\t\t\t\tbox-shadow: ${ getBoxShadow( focus ) };\n\t\t\t\t}\n\t\t\t`;\n\t\t}\n\n\t\treturn cx(\n\t\t\tstyles.Elevation,\n\t\t\tsx.Base,\n\t\t\tsx.hover,\n\t\t\tsx.focus,\n\t\t\tsx.active,\n\t\t\tclassName\n\t\t);\n\t}, [\n\t\tactive,\n\t\tborderRadius,\n\t\tclassName,\n\t\tcx,\n\t\tfocus,\n\t\thover,\n\t\tisInteractive,\n\t\toffset,\n\t\tvalue,\n\t] );\n\n\treturn { ...otherProps, className: classes, 'aria-hidden': true };\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { contextConnect } from '../context';\nimport { View } from '../view';\nimport { useElevation } from './hook';\nimport type { ElevationProps } from './types';\n\nfunction UnconnectedElevation(\n\tprops: WordPressComponentProps< ElevationProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst elevationProps = useElevation( props );\n\n\treturn <View { ...elevationProps } ref={ forwardedRef } />;\n}\n\n/**\n * `Elevation` is a core component that renders shadow, using the component\n * system's shadow system.\n *\n * The shadow effect is generated using the `value` prop.\n *\n * ```jsx\n * import {\n *\t__experimentalElevation as Elevation,\n *\t__experimentalSurface as Surface,\n *\t__experimentalText as Text,\n * } from '@wordpress/components';\n *\n * function Example() {\n * return (\n * <Surface>\n * <Text>Code is Poetry</Text>\n * <Elevation value={ 5 } />\n * </Surface>\n * );\n * }\n * ```\n */\nexport const Elevation = contextConnect( UnconnectedElevation, 'Elevation' );\n\nexport default Elevation;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { COLORS, CONFIG } from '../utils';\n\n// Since the border for `Card` is rendered via the `box-shadow` property\n// (as opposed to the `border` property), the value of the border radius needs\n// to be adjusted by removing 1px (this is because the `box-shadow` renders\n// as an \"outer radius\").\nconst adjustedBorderRadius = `calc(${ CONFIG.radiusLarge } - 1px)`;\n\nexport const Card = css`\n\tbox-shadow: 0 0 0 1px ${ CONFIG.surfaceBorderColor };\n\toutline: none;\n`;\n\nexport const Header = css`\n\tborder-bottom: 1px solid;\n\tbox-sizing: border-box;\n\n\t&:last-child {\n\t\tborder-bottom: none;\n\t}\n`;\n\nexport const Footer = css`\n\tborder-top: 1px solid;\n\tbox-sizing: border-box;\n\n\t&:first-of-type {\n\t\tborder-top: none;\n\t}\n`;\n\nexport const Content = css`\n\theight: 100%;\n`;\n\nexport const Body = css`\n\tbox-sizing: border-box;\n\theight: auto;\n\tmax-height: 100%;\n`;\n\nexport const Media = css`\n\tbox-sizing: border-box;\n\toverflow: hidden;\n\n\t& > img,\n\t& > iframe {\n\t\tdisplay: block;\n\t\theight: auto;\n\t\tmax-width: 100%;\n\t\twidth: 100%;\n\t}\n`;\n\nexport const Divider = css`\n\tbox-sizing: border-box;\n\tdisplay: block;\n\twidth: 100%;\n`;\n\nexport const borderRadius = css`\n\t&:first-of-type {\n\t\tborder-top-left-radius: ${ adjustedBorderRadius };\n\t\tborder-top-right-radius: ${ adjustedBorderRadius };\n\t}\n\n\t&:last-of-type {\n\t\tborder-bottom-left-radius: ${ adjustedBorderRadius };\n\t\tborder-bottom-right-radius: ${ adjustedBorderRadius };\n\t}\n`;\n\nexport const borderColor = css`\n\tborder-color: ${ CONFIG.colorDivider };\n`;\n\nexport const boxShadowless = css`\n\tbox-shadow: none;\n`;\n\nexport const borderless = css`\n\tborder: none;\n`;\n\nexport const rounded = css`\n\tborder-radius: ${ adjustedBorderRadius };\n`;\n\nconst xSmallCardPadding = css`\n\tpadding: ${ CONFIG.cardPaddingXSmall };\n`;\n\nexport const cardPaddings = {\n\tlarge: css`\n\t\tpadding: ${ CONFIG.cardPaddingLarge };\n\t`,\n\tmedium: css`\n\t\tpadding: ${ CONFIG.cardPaddingMedium };\n\t`,\n\tsmall: css`\n\t\tpadding: ${ CONFIG.cardPaddingSmall };\n\t`,\n\txSmall: xSmallCardPadding,\n\t// The `extraSmall` size is not officially documented, but the following styles\n\t// are kept for legacy reasons to support older values of the `size` prop.\n\textraSmall: xSmallCardPadding,\n};\n\nexport const shady = css`\n\tbackground-color: ${ COLORS.ui.backgroundDisabled };\n`;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { CONFIG, COLORS } from '../utils';\nimport type { SurfaceVariant, SurfaceProps } from './types';\n\nexport const Surface = css`\n\tbackground-color: ${ CONFIG.surfaceColor };\n\tcolor: ${ COLORS.gray[ 900 ] };\n\tposition: relative;\n`;\n\nexport const background = css`\n\tbackground-color: ${ CONFIG.surfaceBackgroundColor };\n`;\n\nexport function getBorders( {\n\tborderBottom,\n\tborderLeft,\n\tborderRight,\n\tborderTop,\n}: Pick<\n\tSurfaceProps,\n\t'borderBottom' | 'borderLeft' | 'borderRight' | 'borderTop'\n> ) {\n\tconst borderStyle = `1px solid ${ CONFIG.surfaceBorderColor }`;\n\n\treturn css( {\n\t\tborderBottom: borderBottom ? borderStyle : undefined,\n\t\tborderLeft: borderLeft ? borderStyle : undefined,\n\t\tborderRight: borderRight ? borderStyle : undefined,\n\t\tborderTop: borderTop ? borderStyle : undefined,\n\t} );\n}\n\nexport const primary = css``;\n\nexport const secondary = css`\n\tbackground: ${ CONFIG.surfaceBackgroundTintColor };\n`;\n\nexport const tertiary = css`\n\tbackground: ${ CONFIG.surfaceBackgroundTertiaryColor };\n`;\n\nconst customBackgroundSize = ( surfaceBackgroundSize: string ) =>\n\t[ surfaceBackgroundSize, surfaceBackgroundSize ].join( ' ' );\n\nconst dottedBackground1 = ( surfaceBackgroundSizeDotted: string ) =>\n\t[\n\t\t'90deg',\n\t\t[ CONFIG.surfaceBackgroundColor, surfaceBackgroundSizeDotted ].join(\n\t\t\t' '\n\t\t),\n\t\t'transparent 1%',\n\t].join( ',' );\n\nconst dottedBackground2 = ( surfaceBackgroundSizeDotted: string ) =>\n\t[\n\t\t[ CONFIG.surfaceBackgroundColor, surfaceBackgroundSizeDotted ].join(\n\t\t\t' '\n\t\t),\n\t\t'transparent 1%',\n\t].join( ',' );\n\nconst dottedBackgroundCombined = ( surfaceBackgroundSizeDotted: string ) =>\n\t[\n\t\t`linear-gradient( ${ dottedBackground1(\n\t\t\tsurfaceBackgroundSizeDotted\n\t\t) } ) center`,\n\t\t`linear-gradient( ${ dottedBackground2(\n\t\t\tsurfaceBackgroundSizeDotted\n\t\t) } ) center`,\n\t\tCONFIG.surfaceBorderBoldColor,\n\t].join( ',' );\n\nexport const getDotted = (\n\tsurfaceBackgroundSize: string,\n\tsurfaceBackgroundSizeDotted: string\n) => css`\n\tbackground: ${ dottedBackgroundCombined( surfaceBackgroundSizeDotted ) };\n\tbackground-size: ${ customBackgroundSize( surfaceBackgroundSize ) };\n`;\n\nconst gridBackground1 = [\n\t`${ CONFIG.surfaceBorderSubtleColor } 1px`,\n\t'transparent 1px',\n].join( ',' );\n\nconst gridBackground2 = [\n\t'90deg',\n\t`${ CONFIG.surfaceBorderSubtleColor } 1px`,\n\t'transparent 1px',\n].join( ',' );\n\nconst gridBackgroundCombined = [\n\t`linear-gradient( ${ gridBackground1 } )`,\n\t`linear-gradient( ${ gridBackground2 } )`,\n].join( ',' );\n\nexport const getGrid = ( surfaceBackgroundSize: string ) => {\n\treturn css`\n\t\tbackground: ${ CONFIG.surfaceBackgroundColor };\n\t\tbackground-image: ${ gridBackgroundCombined };\n\t\tbackground-size: ${ customBackgroundSize( surfaceBackgroundSize ) };\n\t`;\n};\n\nexport const getVariant = (\n\tvariant: SurfaceVariant,\n\tsurfaceBackgroundSize: string,\n\tsurfaceBackgroundSizeDotted: string\n) => {\n\tswitch ( variant ) {\n\t\tcase 'dotted': {\n\t\t\treturn getDotted(\n\t\t\t\tsurfaceBackgroundSize,\n\t\t\t\tsurfaceBackgroundSizeDotted\n\t\t\t);\n\t\t}\n\t\tcase 'grid': {\n\t\t\treturn getGrid( surfaceBackgroundSize );\n\t\t}\n\t\tcase 'primary': {\n\t\t\treturn primary;\n\t\t}\n\t\tcase 'secondary': {\n\t\t\treturn secondary;\n\t\t}\n\t\tcase 'tertiary': {\n\t\t\treturn tertiary;\n\t\t}\n\t}\n};\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem } from '../context';\nimport * as styles from './styles';\nimport { useCx } from '../utils/hooks/use-cx';\nimport type { SurfaceProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nexport function useSurface(\n\tprops: WordPressComponentProps< SurfaceProps, 'div' >\n) {\n\tconst {\n\t\tbackgroundSize = 12,\n\t\tborderBottom = false,\n\t\tborderLeft = false,\n\t\tborderRight = false,\n\t\tborderTop = false,\n\t\tclassName,\n\t\tvariant = 'primary',\n\t\t...otherProps\n\t} = useContextSystem( props, 'Surface' );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo( () => {\n\t\tconst sx = {\n\t\t\tborders: styles.getBorders( {\n\t\t\t\tborderBottom,\n\t\t\t\tborderLeft,\n\t\t\t\tborderRight,\n\t\t\t\tborderTop,\n\t\t\t} ),\n\t\t};\n\n\t\treturn cx(\n\t\t\tstyles.Surface,\n\t\t\tsx.borders,\n\t\t\tstyles.getVariant(\n\t\t\t\tvariant,\n\t\t\t\t`${ backgroundSize }px`,\n\t\t\t\t`${ backgroundSize - 1 }px`\n\t\t\t),\n\t\t\tclassName\n\t\t);\n\t}, [\n\t\tbackgroundSize,\n\t\tborderBottom,\n\t\tborderLeft,\n\t\tborderRight,\n\t\tborderTop,\n\t\tclassName,\n\t\tcx,\n\t\tvariant,\n\t] );\n\n\treturn { ...otherProps, className: classes };\n}\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect, ContextSystemProvider } from '../../context';\nimport { Elevation } from '../../elevation';\nimport { View } from '../../view';\nimport * as styles from '../styles';\nimport { useCard } from './hook';\nimport CONFIG from '../../utils/config-values';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { Props } from '../types';\n\nfunction UnconnectedCard(\n\tprops: WordPressComponentProps< Props, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst {\n\t\tchildren,\n\t\televation,\n\t\tisBorderless,\n\t\tisRounded,\n\t\tsize,\n\t\t...otherProps\n\t} = useCard( props );\n\tconst elevationBorderRadius = isRounded ? CONFIG.radiusLarge : 0;\n\n\tconst cx = useCx();\n\n\tconst elevationClassName = useMemo(\n\t\t() => cx( css( { borderRadius: elevationBorderRadius } ) ),\n\t\t[ cx, elevationBorderRadius ]\n\t);\n\n\tconst contextProviderValue = useMemo( () => {\n\t\tconst contextProps = {\n\t\t\tsize,\n\t\t\tisBorderless,\n\t\t};\n\t\treturn {\n\t\t\tCardBody: contextProps,\n\t\t\tCardHeader: contextProps,\n\t\t\tCardFooter: contextProps,\n\t\t};\n\t}, [ isBorderless, size ] );\n\n\treturn (\n\t\t<ContextSystemProvider value={ contextProviderValue }>\n\t\t\t<View { ...otherProps } ref={ forwardedRef }>\n\t\t\t\t<View className={ cx( styles.Content ) }>{ children }</View>\n\t\t\t\t<Elevation\n\t\t\t\t\tclassName={ elevationClassName }\n\t\t\t\t\tisInteractive={ false }\n\t\t\t\t\tvalue={ elevation ? 1 : 0 }\n\t\t\t\t/>\n\t\t\t\t<Elevation\n\t\t\t\t\tclassName={ elevationClassName }\n\t\t\t\t\tisInteractive={ false }\n\t\t\t\t\tvalue={ elevation }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t</ContextSystemProvider>\n\t);\n}\n\n/**\n * `Card` provides a flexible and extensible content container.\n * `Card` also provides a convenient set of sub-components such as `CardBody`,\n * `CardHeader`, `CardFooter`, and more.\n *\n * ```jsx\n * import {\n * Card,\n * CardHeader,\n * CardBody,\n * CardFooter,\n * __experimentalText as Text,\n * __experimentalHeading as Heading,\n * } from `@wordpress/components`;\n *\n * function Example() {\n * return (\n * <Card>\n * <CardHeader>\n * <Heading level={ 4 }>Card Title</Heading>\n * </CardHeader>\n * <CardBody>\n * <Text>Card Content</Text>\n * </CardBody>\n * <CardFooter>\n * <Text>Card Footer</Text>\n * </CardFooter>\n * </Card>\n * );\n * }\n * ```\n */\nexport const Card = contextConnect( UnconnectedCard, 'Card' );\n\nexport default Card;\n","/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { useContextSystem } from '../../context';\nimport { useSurface } from '../../surface';\nimport * as styles from '../styles';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { Props } from '../types';\n\ntype CardProps = WordPressComponentProps< Props, 'div' >;\n\nfunction useDeprecatedProps( {\n\televation,\n\tisElevated,\n\t...otherProps\n}: CardProps ) {\n\tconst propsToReturn: Omit< CardProps, 'isElevated' > = {\n\t\t...otherProps,\n\t};\n\tlet computedElevation = elevation;\n\n\tif ( isElevated ) {\n\t\tdeprecated( 'Card isElevated prop', {\n\t\t\tsince: '5.9',\n\t\t\talternative: 'elevation',\n\t\t} );\n\t\tcomputedElevation ??= 2;\n\t}\n\n\t// The `elevation` prop should only be passed when it's not `undefined`,\n\t// otherwise it will override the value that gets derived from `useContextSystem`.\n\tif ( typeof computedElevation !== 'undefined' ) {\n\t\tpropsToReturn.elevation = computedElevation;\n\t}\n\n\treturn propsToReturn;\n}\n\nexport function useCard( props: CardProps ) {\n\tconst {\n\t\tclassName,\n\t\televation = 0,\n\t\tisBorderless = false,\n\t\tisRounded = true,\n\t\tsize = 'medium',\n\t\t...otherProps\n\t} = useContextSystem( useDeprecatedProps( props ), 'Card' );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo( () => {\n\t\treturn cx(\n\t\t\tstyles.Card,\n\t\t\tisBorderless && styles.boxShadowless,\n\t\t\tisRounded && styles.rounded,\n\t\t\tclassName\n\t\t);\n\t}, [ className, cx, isBorderless, isRounded ] );\n\n\tconst surfaceProps = useSurface( { ...otherProps, className: classes } );\n\n\treturn {\n\t\t...surfaceProps,\n\t\televation,\n\t\tisBorderless,\n\t\tisRounded,\n\t\tsize,\n\t};\n}\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { CONFIG } from '../utils';\n\nexport const scrollableScrollbar = css`\n\t@media only screen and ( min-device-width: 40em ) {\n\t\t&::-webkit-scrollbar {\n\t\t\theight: 12px;\n\t\t\twidth: 12px;\n\t\t}\n\n\t\t&::-webkit-scrollbar-track {\n\t\t\tbackground-color: transparent;\n\t\t}\n\n\t\t&::-webkit-scrollbar-track {\n\t\t\tbackground: ${ CONFIG.colorScrollbarTrack };\n\t\t\tborder-radius: 8px;\n\t\t}\n\n\t\t&::-webkit-scrollbar-thumb {\n\t\t\tbackground-clip: padding-box;\n\t\t\tbackground-color: ${ CONFIG.colorScrollbarThumb };\n\t\t\tborder: 2px solid rgba( 0, 0, 0, 0 );\n\t\t\tborder-radius: 7px;\n\t\t}\n\n\t\t&:hover::-webkit-scrollbar-thumb {\n\t\t\tbackground-color: ${ CONFIG.colorScrollbarThumbHover };\n\t\t}\n\t}\n`;\n\nexport const Scrollable = css`\n\theight: 100%;\n`;\n\nexport const Content = css`\n\tposition: relative;\n`;\n\nexport const smoothScroll = css`\n\tscroll-behavior: smooth;\n`;\n\nexport const scrollX = css`\n\toverflow-x: auto;\n\toverflow-y: hidden;\n`;\n\nexport const scrollY = css`\n\toverflow-x: hidden;\n\toverflow-y: auto;\n`;\n\nexport const scrollAuto = css`\n\toverflow-y: auto;\n`;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { contextConnect } from '../context';\nimport { View } from '../view';\nimport { useScrollable } from './hook';\nimport type { ScrollableProps } from './types';\n\nfunction UnconnectedScrollable(\n\tprops: WordPressComponentProps< ScrollableProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst scrollableProps = useScrollable( props );\n\n\treturn <View { ...scrollableProps } ref={ forwardedRef } />;\n}\n\n/**\n * `Scrollable` is a layout component that content in a scrollable container.\n *\n * ```jsx\n * import { __experimentalScrollable as Scrollable } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<Scrollable style={ { maxHeight: 200 } }>\n * \t\t\t<div style={ { height: 500 } }>...</div>\n * \t\t</Scrollable>\n * \t);\n * }\n * ```\n */\nexport const Scrollable = contextConnect( UnconnectedScrollable, 'Scrollable' );\n\nexport default Scrollable;\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { useContextSystem } from '../context';\nimport * as styles from './styles';\nimport { useCx } from '../utils/hooks/use-cx';\nimport type { ScrollableProps } from './types';\n\nexport function useScrollable(\n\tprops: WordPressComponentProps< ScrollableProps, 'div' >\n) {\n\tconst {\n\t\tclassName,\n\t\tscrollDirection = 'y',\n\t\tsmoothScroll = false,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Scrollable' );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tstyles.Scrollable,\n\t\t\t\tstyles.scrollableScrollbar,\n\t\t\t\tsmoothScroll && styles.smoothScroll,\n\t\t\t\tscrollDirection === 'x' && styles.scrollX,\n\t\t\t\tscrollDirection === 'y' && styles.scrollY,\n\t\t\t\tscrollDirection === 'auto' && styles.scrollAuto,\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ className, cx, scrollDirection, smoothScroll ]\n\t);\n\n\treturn { ...otherProps, className: classes };\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect } from '../../context';\nimport { Scrollable } from '../../scrollable';\nimport { View } from '../../view';\nimport { useCardBody } from './hook';\nimport type { BodyProps } from '../types';\n\nfunction UnconnectedCardBody(\n\tprops: WordPressComponentProps< BodyProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst { isScrollable, ...otherProps } = useCardBody( props );\n\n\tif ( isScrollable ) {\n\t\treturn <Scrollable { ...otherProps } ref={ forwardedRef } />;\n\t}\n\n\treturn <View { ...otherProps } ref={ forwardedRef } />;\n}\n\n/**\n * `CardBody` renders an optional content area for a `Card`.\n * Multiple `CardBody` components can be used within `Card` if needed.\n *\n * ```jsx\n * import { Card, CardBody } from `@wordpress/components`;\n *\n * <Card>\n * \t<CardBody>\n * \t\t...\n * \t</CardBody>\n * </Card>\n * ```\n */\nexport const CardBody = contextConnect( UnconnectedCardBody, 'CardBody' );\n\nexport default CardBody;\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { useContextSystem } from '../../context';\nimport * as styles from '../styles';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { BodyProps } from '../types';\n\nexport function useCardBody(\n\tprops: WordPressComponentProps< BodyProps, 'div' >\n) {\n\tconst {\n\t\tclassName,\n\t\tisScrollable = false,\n\t\tisShady = false,\n\t\tsize = 'medium',\n\t\t...otherProps\n\t} = useContextSystem( props, 'CardBody' );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tstyles.Body,\n\t\t\t\tstyles.borderRadius,\n\t\t\t\tstyles.cardPaddings[ size ],\n\t\t\t\tisShady && styles.shady,\n\t\t\t\t// This classname is added for legacy compatibility reasons.\n\t\t\t\t'components-card__body',\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ className, cx, isShady, size ]\n\t);\n\n\treturn {\n\t\t...otherProps,\n\t\tclassName: classes,\n\t\tisScrollable,\n\t};\n}\n","\"use client\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n __objRest,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/separator/separator.tsx\nvar TagName = \"hr\";\nvar useSeparator = createHook(\n function useSeparator2(_a) {\n var _b = _a, { orientation = \"horizontal\" } = _b, props = __objRest(_b, [\"orientation\"]);\n props = __spreadValues({\n role: \"separator\",\n \"aria-orientation\": orientation\n }, props);\n return props;\n }\n);\nvar Separator = forwardRef(function Separator2(props) {\n const htmlProps = useSeparator(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n useSeparator,\n Separator\n};\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { space } from '../utils/space';\nimport { rtl } from '../utils';\nimport type { DividerProps } from './types';\n\nconst MARGIN_DIRECTIONS: Record<\n\tNonNullable< DividerProps[ 'orientation' ] >,\n\tRecord< 'start' | 'end', string >\n> = {\n\tvertical: {\n\t\tstart: 'marginLeft',\n\t\tend: 'marginRight',\n\t},\n\thorizontal: {\n\t\tstart: 'marginTop',\n\t\tend: 'marginBottom',\n\t},\n};\n\n// Renders the correct margins given the Divider's `orientation` and the writing direction.\n// When both the generic `margin` and the specific `marginStart|marginEnd` props are defined,\n// the latter will take priority.\nconst renderMargin = ( {\n\t'aria-orientation': orientation = 'horizontal',\n\tmargin,\n\tmarginStart,\n\tmarginEnd,\n}: DividerProps ) =>\n\tcss(\n\t\trtl( {\n\t\t\t[ MARGIN_DIRECTIONS[ orientation ].start ]: space(\n\t\t\t\tmarginStart ?? margin\n\t\t\t),\n\t\t\t[ MARGIN_DIRECTIONS[ orientation ].end ]: space(\n\t\t\t\tmarginEnd ?? margin\n\t\t\t),\n\t\t} )()\n\t);\n\nconst renderDisplay = ( {\n\t'aria-orientation': orientation = 'horizontal',\n}: DividerProps ) => {\n\treturn orientation === 'vertical'\n\t\t? css( { display: 'inline' } )\n\t\t: undefined;\n};\n\nconst renderBorder = ( {\n\t'aria-orientation': orientation = 'horizontal',\n}: DividerProps ) => {\n\treturn css( {\n\t\t[ orientation === 'vertical' ? 'borderRight' : 'borderBottom' ]:\n\t\t\t'1px solid currentColor',\n\t} );\n};\n\nconst renderSize = ( {\n\t'aria-orientation': orientation = 'horizontal',\n}: DividerProps ) =>\n\tcss( {\n\t\theight: orientation === 'vertical' ? 'auto' : 0,\n\t\twidth: orientation === 'vertical' ? 0 : 'auto',\n\t} );\n\nexport const DividerView = styled.hr< DividerProps >`\n\tborder: 0;\n\tmargin: 0;\n\n\t${ renderDisplay }\n\t${ renderBorder }\n\t${ renderSize }\n\t${ renderMargin }\n`;\n","/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { contextConnect, useContextSystem } from '../context';\nimport { DividerView } from './styles';\nimport type { DividerProps } from './types';\n\nfunction UnconnectedDivider(\n\tprops: WordPressComponentProps< DividerProps, 'hr', false >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst contextProps = useContextSystem( props, 'Divider' );\n\n\treturn (\n\t\t<Ariakit.Separator\n\t\t\trender={ <DividerView /> }\n\t\t\t{ ...contextProps }\n\t\t\tref={ forwardedRef }\n\t\t/>\n\t);\n}\n\n/**\n * `Divider` is a layout component that separates groups of related content.\n *\n * ```js\n * import {\n * \t\t__experimentalDivider as Divider,\n * \t\t__experimentalText as Text,\n * \t\t__experimentalVStack as VStack,\n * } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<VStack spacing={4}>\n * \t\t\t<Text>Some text here</Text>\n * \t\t\t<Divider />\n * \t\t\t<Text>Some more text here</Text>\n * \t\t</VStack>\n * \t);\n * }\n * ```\n */\nexport const Divider = contextConnect( UnconnectedDivider, 'Divider' );\n\nexport default Divider;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect } from '../../context';\nimport type { DividerProps } from '../../divider';\nimport { Divider } from '../../divider';\nimport { useCardDivider } from './hook';\n\nfunction UnconnectedCardDivider(\n\tprops: WordPressComponentProps< DividerProps, 'hr', false >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst dividerProps = useCardDivider( props );\n\n\treturn <Divider { ...dividerProps } ref={ forwardedRef } />;\n}\n\n/**\n * `CardDivider` renders an optional divider within a `Card`.\n * It is typically used to divide multiple `CardBody` components from each other.\n *\n * ```jsx\n * import { Card, CardBody, CardDivider } from `@wordpress/components`;\n *\n * <Card>\n * <CardBody>...</CardBody>\n * <CardDivider />\n * <CardBody>...</CardBody>\n * </Card>\n * ```\n */\nexport const CardDivider = contextConnect(\n\tUnconnectedCardDivider,\n\t'CardDivider'\n);\n\nexport default CardDivider;\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { useContextSystem } from '../../context';\nimport * as styles from '../styles';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { DividerProps } from '../../divider';\n\nexport function useCardDivider(\n\tprops: WordPressComponentProps< DividerProps, 'hr', false >\n) {\n\tconst { className, ...otherProps } = useContextSystem(\n\t\tprops,\n\t\t'CardDivider'\n\t);\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tstyles.Divider,\n\t\t\t\tstyles.borderColor,\n\t\t\t\t// This classname is added for legacy compatibility reasons.\n\t\t\t\t'components-card__divider',\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ className, cx ]\n\t);\n\n\treturn {\n\t\t...otherProps,\n\t\tclassName: classes,\n\t};\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect } from '../../context';\nimport { Flex } from '../../flex';\nimport { useCardFooter } from './hook';\nimport type { FooterProps } from '../types';\n\nfunction UnconnectedCardFooter(\n\tprops: WordPressComponentProps< FooterProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst footerProps = useCardFooter( props );\n\n\treturn <Flex { ...footerProps } ref={ forwardedRef } />;\n}\n\n/**\n * `CardFooter` renders an optional footer within a `Card`.\n *\n * ```jsx\n * import { Card, CardBody, CardFooter } from `@wordpress/components`;\n *\n * <Card>\n * \t<CardBody>...</CardBody>\n * \t<CardFooter>...</CardFooter>\n * </Card>\n * ```\n */\nexport const CardFooter = contextConnect( UnconnectedCardFooter, 'CardFooter' );\n\nexport default CardFooter;\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { useContextSystem } from '../../context';\nimport * as styles from '../styles';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { FooterProps } from '../types';\n\nexport function useCardFooter(\n\tprops: WordPressComponentProps< FooterProps, 'div' >\n) {\n\tconst {\n\t\tclassName,\n\t\tjustify,\n\t\tisBorderless = false,\n\t\tisShady = false,\n\t\tsize = 'medium',\n\t\t...otherProps\n\t} = useContextSystem( props, 'CardFooter' );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tstyles.Footer,\n\t\t\t\tstyles.borderRadius,\n\t\t\t\tstyles.borderColor,\n\t\t\t\tstyles.cardPaddings[ size ],\n\t\t\t\tisBorderless && styles.borderless,\n\t\t\t\tisShady && styles.shady,\n\t\t\t\t// This classname is added for legacy compatibility reasons.\n\t\t\t\t'components-card__footer',\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ className, cx, isBorderless, isShady, size ]\n\t);\n\n\treturn {\n\t\t...otherProps,\n\t\tclassName: classes,\n\t\tjustify,\n\t};\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect } from '../../context';\nimport { Flex } from '../../flex';\nimport { useCardHeader } from './hook';\nimport type { HeaderProps } from '../types';\n\nfunction UnconnectedCardHeader(\n\tprops: WordPressComponentProps< HeaderProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst headerProps = useCardHeader( props );\n\n\treturn <Flex { ...headerProps } ref={ forwardedRef } />;\n}\n\n/**\n * `CardHeader` renders an optional header within a `Card`.\n *\n * ```jsx\n * import { Card, CardBody, CardHeader } from `@wordpress/components`;\n *\n * <Card>\n * \t<CardHeader>...</CardHeader>\n * \t<CardBody>...</CardBody>\n * </Card>\n * ```\n */\nexport const CardHeader = contextConnect( UnconnectedCardHeader, 'CardHeader' );\n\nexport default CardHeader;\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { useContextSystem } from '../../context';\nimport * as styles from '../styles';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { HeaderProps } from '../types';\n\nexport function useCardHeader(\n\tprops: WordPressComponentProps< HeaderProps, 'div' >\n) {\n\tconst {\n\t\tclassName,\n\t\tisBorderless = false,\n\t\tisShady = false,\n\t\tsize = 'medium',\n\t\t...otherProps\n\t} = useContextSystem( props, 'CardHeader' );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tstyles.Header,\n\t\t\t\tstyles.borderRadius,\n\t\t\t\tstyles.borderColor,\n\t\t\t\tstyles.cardPaddings[ size ],\n\t\t\t\tisBorderless && styles.borderless,\n\t\t\t\tisShady && styles.shady,\n\t\t\t\t// This classname is added for legacy compatibility reasons.\n\t\t\t\t'components-card__header',\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ className, cx, isBorderless, isShady, size ]\n\t);\n\n\treturn {\n\t\t...otherProps,\n\t\tclassName: classes,\n\t};\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect } from '../../context';\nimport { View } from '../../view';\nimport { useCardMedia } from './hook';\nimport type { MediaProps } from '../types';\n\nfunction UnconnectedCardMedia(\n\tprops: WordPressComponentProps< MediaProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst cardMediaProps = useCardMedia( props );\n\n\treturn <View { ...cardMediaProps } ref={ forwardedRef } />;\n}\n\n/**\n * `CardMedia` provides a container for full-bleed content within a `Card`,\n * such as images, video, or even just a background color.\n *\n * @example\n * ```jsx\n * import { Card, CardBody, CardMedia } from '@wordpress/components';\n *\n * const Example = () => (\n * <Card>\n *\t <CardMedia>\n *\t\t <img src=\"...\" />\n * </CardMedia>\n * <CardBody>...</CardBody>\n * </Card>\n * );\n * ```\n */\nexport const CardMedia = contextConnect( UnconnectedCardMedia, 'CardMedia' );\n\nexport default CardMedia;\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { useContextSystem } from '../../context';\nimport * as styles from '../styles';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { MediaProps } from '../types';\n\nexport function useCardMedia(\n\tprops: WordPressComponentProps< MediaProps, 'div' >\n) {\n\tconst { className, ...otherProps } = useContextSystem( props, 'CardMedia' );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tstyles.Media,\n\t\t\t\tstyles.borderRadius,\n\t\t\t\t// This classname is added for legacy compatibility reasons.\n\t\t\t\t'components-card__media',\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ className, cx ]\n\t);\n\n\treturn {\n\t\t...otherProps,\n\t\tclassName: classes,\n\t};\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ChangeEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport { useInstanceId, useRefEffect } from '@wordpress/compose';\nimport deprecated from '@wordpress/deprecated';\nimport { Icon, check, reset } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport { HStack } from '../h-stack';\nimport type { CheckboxControlProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\n/**\n * Checkboxes allow the user to select one or more items from a set.\n *\n * ```jsx\n * import { CheckboxControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyCheckboxControl = () => {\n * const [ isChecked, setChecked ] = useState( true );\n * return (\n * <CheckboxControl\n * __nextHasNoMarginBottom\n * label=\"Is author\"\n * help=\"Is the user a author or not?\"\n * checked={ isChecked }\n * onChange={ setChecked }\n * />\n * );\n * };\n * ```\n */\nexport function CheckboxControl(\n\tprops: WordPressComponentProps< CheckboxControlProps, 'input', false >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom,\n\t\tlabel,\n\t\tclassName,\n\t\theading,\n\t\tchecked,\n\t\tindeterminate,\n\t\thelp,\n\t\tid: idProp,\n\t\tonChange,\n\t\t...additionalProps\n\t} = props;\n\n\tif ( heading ) {\n\t\tdeprecated( '`heading` prop in `CheckboxControl`', {\n\t\t\talternative: 'a separate element to implement a heading',\n\t\t\tsince: '5.8',\n\t\t} );\n\t}\n\n\tconst [ showCheckedIcon, setShowCheckedIcon ] = useState( false );\n\tconst [ showIndeterminateIcon, setShowIndeterminateIcon ] =\n\t\tuseState( false );\n\n\t// Run the following callback every time the `ref` (and the additional\n\t// dependencies) change.\n\tconst ref = useRefEffect< HTMLInputElement >(\n\t\t( node ) => {\n\t\t\tif ( ! node ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// It cannot be set using an HTML attribute.\n\t\t\tnode.indeterminate = !! indeterminate;\n\n\t\t\tsetShowCheckedIcon( node.matches( ':checked' ) );\n\t\t\tsetShowIndeterminateIcon( node.matches( ':indeterminate' ) );\n\t\t},\n\t\t[ checked, indeterminate ]\n\t);\n\tconst id = useInstanceId(\n\t\tCheckboxControl,\n\t\t'inspector-checkbox-control',\n\t\tidProp\n\t);\n\tconst onChangeValue = ( event: ChangeEvent< HTMLInputElement > ) =>\n\t\tonChange( event.target.checked );\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t__associatedWPComponentName=\"CheckboxControl\"\n\t\t\tlabel={ heading }\n\t\t\tid={ id }\n\t\t\thelp={\n\t\t\t\thelp && (\n\t\t\t\t\t<span className=\"components-checkbox-control__help\">\n\t\t\t\t\t\t{ help }\n\t\t\t\t\t</span>\n\t\t\t\t)\n\t\t\t}\n\t\t\tclassName={ clsx( 'components-checkbox-control', className ) }\n\t\t>\n\t\t\t<HStack spacing={ 0 } justify=\"start\" alignment=\"top\">\n\t\t\t\t<span className=\"components-checkbox-control__input-container\">\n\t\t\t\t\t<input\n\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\tid={ id }\n\t\t\t\t\t\tclassName=\"components-checkbox-control__input\"\n\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\tvalue=\"1\"\n\t\t\t\t\t\tonChange={ onChangeValue }\n\t\t\t\t\t\tchecked={ checked }\n\t\t\t\t\t\taria-describedby={ !! help ? id + '__help' : undefined }\n\t\t\t\t\t\t{ ...additionalProps }\n\t\t\t\t\t/>\n\t\t\t\t\t{ showIndeterminateIcon ? (\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\ticon={ reset }\n\t\t\t\t\t\t\tclassName=\"components-checkbox-control__indeterminate\"\n\t\t\t\t\t\t\trole=\"presentation\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : null }\n\t\t\t\t\t{ showCheckedIcon ? (\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\ticon={ check }\n\t\t\t\t\t\t\tclassName=\"components-checkbox-control__checked\"\n\t\t\t\t\t\t\trole=\"presentation\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : null }\n\t\t\t\t</span>\n\t\t\t\t{ label && (\n\t\t\t\t\t<label\n\t\t\t\t\t\tclassName=\"components-checkbox-control__label\"\n\t\t\t\t\t\thtmlFor={ id }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ label }\n\t\t\t\t\t</label>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t</BaseControl>\n\t);\n}\n\nexport default CheckboxControl;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useEffect } from '@wordpress/element';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport type { ClipboardButtonProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nconst TIMEOUT = 4000;\n\nexport default function ClipboardButton( {\n\tclassName,\n\tchildren,\n\tonCopy,\n\tonFinishCopy,\n\ttext,\n\t...buttonProps\n}: WordPressComponentProps< ClipboardButtonProps, 'button', false > ) {\n\tdeprecated( 'wp.components.ClipboardButton', {\n\t\tsince: '5.8',\n\t\talternative: 'wp.compose.useCopyToClipboard',\n\t} );\n\n\tconst timeoutIdRef = useRef< NodeJS.Timeout >();\n\tconst ref = useCopyToClipboard( text, () => {\n\t\tonCopy();\n\t\tif ( timeoutIdRef.current ) {\n\t\t\tclearTimeout( timeoutIdRef.current );\n\t\t}\n\n\t\tif ( onFinishCopy ) {\n\t\t\ttimeoutIdRef.current = setTimeout( () => onFinishCopy(), TIMEOUT );\n\t\t}\n\t} );\n\n\tuseEffect( () => {\n\t\treturn () => {\n\t\t\tif ( timeoutIdRef.current ) {\n\t\t\t\tclearTimeout( timeoutIdRef.current );\n\t\t\t}\n\t\t};\n\t}, [] );\n\n\tconst classes = clsx( 'components-clipboard-button', className );\n\n\t// Workaround for inconsistent behavior in Safari, where <textarea> is not\n\t// the document.activeElement at the moment when the copy event fires.\n\t// This causes documentHasSelection() in the copy-handler component to\n\t// mistakenly override the ClipboardButton, and copy a serialized string\n\t// of the current block instead.\n\tconst focusOnCopyEventTarget: React.ClipboardEventHandler = ( event ) => {\n\t\t// @ts-expect-error: Should be currentTarget, but not changing because this component is deprecated.\n\t\tevent.target.focus();\n\t};\n\n\treturn (\n\t\t<Button\n\t\t\t{ ...buttonProps }\n\t\t\tclassName={ classes }\n\t\t\tref={ ref }\n\t\t\tonCopy={ focusOnCopyEventTarget }\n\t\t>\n\t\t\t{ children }\n\t\t</Button>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst moreVertical = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z\" />\n\t</SVG>\n);\n\nexport default moreVertical;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { CONFIG, COLORS, font } from '../utils';\n\nexport const unstyledButton = ( as: 'a' | 'button' ) => {\n\treturn css`\n\t\tfont-size: ${ font( 'default.fontSize' ) };\n\t\tfont-family: inherit;\n\t\tappearance: none;\n\t\tborder: 1px solid transparent;\n\t\tcursor: pointer;\n\t\tbackground: none;\n\t\ttext-align: start;\n\t\ttext-decoration: ${ as === 'a' ? 'none' : undefined };\n\n\t\tsvg,\n\t\tpath {\n\t\t\tfill: currentColor;\n\t\t}\n\n\t\t&:hover {\n\t\t\tcolor: ${ COLORS.theme.accent };\n\t\t}\n\n\t\t&:focus {\n\t\t\tbox-shadow: none;\n\t\t\toutline: none;\n\t\t}\n\n\t\t&:focus-visible {\n\t\t\tbox-shadow: 0 0 0 var( --wp-admin-border-width-focus )\n\t\t\t\t${ COLORS.theme.accent };\n\t\t\t// Windows high contrast mode.\n\t\t\toutline: 2px solid transparent;\n\t\t\toutline-offset: 0;\n\t\t}\n\t`;\n};\n\nexport const itemWrapper = css`\n\twidth: 100%;\n\tdisplay: block;\n`;\n\nexport const item = css`\n\tbox-sizing: border-box;\n\twidth: 100%;\n\tdisplay: block;\n\tmargin: 0;\n\tcolor: inherit;\n`;\n\nexport const bordered = css`\n\tborder: 1px solid ${ CONFIG.surfaceBorderColor };\n`;\n\nexport const separated = css`\n\t> *:not( marquee ) > * {\n\t\tborder-bottom: 1px solid ${ CONFIG.surfaceBorderColor };\n\t}\n\n\t> *:last-of-type > *:not( :focus ) {\n\t\tborder-bottom-color: transparent;\n\t}\n`;\n\nconst borderRadius = CONFIG.radiusSmall;\n\nexport const spacedAround = css`\n\tborder-radius: ${ borderRadius };\n`;\n\nexport const rounded = css`\n\tborder-radius: ${ borderRadius };\n\n\t> *:first-of-type > * {\n\t\tborder-top-left-radius: ${ borderRadius };\n\t\tborder-top-right-radius: ${ borderRadius };\n\t}\n\n\t> *:last-of-type > * {\n\t\tborder-bottom-left-radius: ${ borderRadius };\n\t\tborder-bottom-right-radius: ${ borderRadius };\n\t}\n`;\n\nconst baseFontHeight = `calc(${ CONFIG.fontSize } * ${ CONFIG.fontLineHeightBase })`;\n\n/*\n * Math:\n * - Use the desired height as the base value\n * - Subtract the computed height of (default) text\n * - Subtract the effects of border\n * - Divide the calculated number by 2, in order to get an individual top/bottom padding\n */\nconst paddingY = `calc((${ CONFIG.controlHeight } - ${ baseFontHeight } - 2px) / 2)`;\nconst paddingYSmall = `calc((${ CONFIG.controlHeightSmall } - ${ baseFontHeight } - 2px) / 2)`;\nconst paddingYLarge = `calc((${ CONFIG.controlHeightLarge } - ${ baseFontHeight } - 2px) / 2)`;\n\nexport const itemSizes = {\n\tsmall: css`\n\t\tpadding: ${ paddingYSmall } ${ CONFIG.controlPaddingXSmall }px;\n\t`,\n\tmedium: css`\n\t\tpadding: ${ paddingY } ${ CONFIG.controlPaddingX }px;\n\t`,\n\tlarge: css`\n\t\tpadding: ${ paddingYLarge } ${ CONFIG.controlPaddingXLarge }px;\n\t`,\n};\n","/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { ItemGroupContext as Context } from './types';\n\nexport const ItemGroupContext = createContext( {\n\tsize: 'medium',\n} as Context );\n\nexport const useItemGroupContext = () => useContext( ItemGroupContext );\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { ItemProps } from '../types';\nimport { useItem } from './hook';\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect } from '../../context';\nimport { View } from '../../view';\n\nfunction UnconnectedItem(\n\tprops: WordPressComponentProps< ItemProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst { role, wrapperClassName, ...otherProps } = useItem( props );\n\n\treturn (\n\t\t<div role={ role } className={ wrapperClassName }>\n\t\t\t<View { ...otherProps } ref={ forwardedRef } />\n\t\t</div>\n\t);\n}\n\n/**\n * `Item` is used in combination with `ItemGroup` to display a list of items\n * grouped and styled together.\n *\n * ```jsx\n * import {\n * __experimentalItemGroup as ItemGroup,\n * __experimentalItem as Item,\n * } from '@wordpress/components';\n *\n * function Example() {\n * return (\n * <ItemGroup>\n * <Item>Code</Item>\n * <Item>is</Item>\n * <Item>Poetry</Item>\n * </ItemGroup>\n * );\n * }\n * ```\n */\nexport const Item = contextConnect( UnconnectedItem, 'Item' );\n\nexport default Item;\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { useContextSystem } from '../../context';\nimport * as styles from '../styles';\nimport { useItemGroupContext } from '../context';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { ItemProps } from '../types';\n\nexport function useItem( props: WordPressComponentProps< ItemProps, 'div' > ) {\n\tconst {\n\t\tas: asProp,\n\t\tclassName,\n\t\tonClick,\n\t\trole = 'listitem',\n\t\tsize: sizeProp,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Item' );\n\n\tconst { spacedAround, size: contextSize } = useItemGroupContext();\n\n\tconst size = sizeProp || contextSize;\n\n\tconst as = asProp || ( typeof onClick !== 'undefined' ? 'button' : 'div' );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\t( as === 'button' || as === 'a' ) &&\n\t\t\t\t\tstyles.unstyledButton( as ),\n\t\t\t\tstyles.itemSizes[ size ] || styles.itemSizes.medium,\n\t\t\t\tstyles.item,\n\t\t\t\tspacedAround && styles.spacedAround,\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ as, className, cx, size, spacedAround ]\n\t);\n\n\tconst wrapperClassName = cx( styles.itemWrapper );\n\n\treturn {\n\t\tas,\n\t\tclassName: classes,\n\t\tonClick,\n\t\twrapperClassName,\n\t\trole,\n\t\t...otherProps,\n\t};\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect } from '../../context';\nimport { useItemGroup } from './hook';\nimport { ItemGroupContext, useItemGroupContext } from '../context';\nimport { View } from '../../view';\nimport type { ItemGroupProps } from '../types';\n\nfunction UnconnectedItemGroup(\n\tprops: WordPressComponentProps< ItemGroupProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst {\n\t\tisBordered,\n\t\tisSeparated,\n\t\tsize: sizeProp,\n\t\t...otherProps\n\t} = useItemGroup( props );\n\n\tconst { size: contextSize } = useItemGroupContext();\n\n\tconst spacedAround = ! isBordered && ! isSeparated;\n\tconst size = sizeProp || contextSize;\n\n\tconst contextValue = {\n\t\tspacedAround,\n\t\tsize,\n\t};\n\n\treturn (\n\t\t<ItemGroupContext.Provider value={ contextValue }>\n\t\t\t<View { ...otherProps } ref={ forwardedRef } />\n\t\t</ItemGroupContext.Provider>\n\t);\n}\n\n/**\n * `ItemGroup` displays a list of `Item`s grouped and styled together.\n *\n * ```jsx\n * import {\n * __experimentalItemGroup as ItemGroup,\n * __experimentalItem as Item,\n * } from '@wordpress/components';\n *\n * function Example() {\n * return (\n * <ItemGroup>\n * <Item>Code</Item>\n * <Item>is</Item>\n * <Item>Poetry</Item>\n * </ItemGroup>\n * );\n * }\n * ```\n */\nexport const ItemGroup = contextConnect( UnconnectedItemGroup, 'ItemGroup' );\n\nexport default ItemGroup;\n","/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { useContextSystem } from '../../context';\n\n/**\n * Internal dependencies\n */\nimport * as styles from '../styles';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { ItemGroupProps } from '../types';\n\nexport function useItemGroup(\n\tprops: WordPressComponentProps< ItemGroupProps, 'div' >\n) {\n\tconst {\n\t\tclassName,\n\t\tisBordered = false,\n\t\tisRounded = true,\n\t\tisSeparated = false,\n\t\trole = 'list',\n\t\t...otherProps\n\t} = useContextSystem( props, 'ItemGroup' );\n\n\tconst cx = useCx();\n\n\tconst classes = cx(\n\t\tisBordered && styles.bordered,\n\t\tisSeparated && styles.separated,\n\t\tisRounded && styles.rounded,\n\t\tclassName\n\t);\n\n\treturn {\n\t\tisBordered,\n\t\tclassName: classes,\n\t\trole,\n\t\tisSeparated,\n\t\t...otherProps,\n\t};\n}\n","export const GRADIENT_MARKERS_WIDTH = 16;\nexport const INSERT_POINT_WIDTH = 16;\nexport const MINIMUM_DISTANCE_BETWEEN_INSERTER_AND_POINT = 10;\nexport const MINIMUM_DISTANCE_BETWEEN_POINTS = 0;\nexport const MINIMUM_SIGNIFICANT_MOVE = 5;\n\nexport const KEYBOARD_CONTROL_POINT_VARIATION =\n\tMINIMUM_DISTANCE_BETWEEN_INSERTER_AND_POINT;\nexport const MINIMUM_DISTANCE_BETWEEN_INSERTER_AND_MARKER =\n\t( INSERT_POINT_WIDTH + GRADIENT_MARKERS_WIDTH ) / 2;\n","/**\n * Internal dependencies\n */\nimport { MINIMUM_DISTANCE_BETWEEN_POINTS } from './constants';\nimport type { ControlPoint } from '../types';\n\n/**\n * Clamps a number between 0 and 100.\n *\n * @param value Value to clamp.\n *\n * @return Value clamped between 0 and 100.\n */\nexport function clampPercent( value: number ) {\n\treturn Math.max( 0, Math.min( 100, value ) );\n}\n\n/**\n * Check if a control point is overlapping with another.\n *\n * @param value Array of control points.\n * @param initialIndex Index of the position to test.\n * @param newPosition New position of the control point.\n * @param minDistance Distance considered to be overlapping.\n *\n * @return True if the point is overlapping.\n */\nexport function isOverlapping(\n\tvalue: ControlPoint[],\n\tinitialIndex: number,\n\tnewPosition: number,\n\tminDistance: number = MINIMUM_DISTANCE_BETWEEN_POINTS\n) {\n\tconst initialPosition = value[ initialIndex ].position;\n\tconst minPosition = Math.min( initialPosition, newPosition );\n\tconst maxPosition = Math.max( initialPosition, newPosition );\n\n\treturn value.some( ( { position }, index ) => {\n\t\treturn (\n\t\t\tindex !== initialIndex &&\n\t\t\t( Math.abs( position - newPosition ) < minDistance ||\n\t\t\t\t( minPosition < position && position < maxPosition ) )\n\t\t);\n\t} );\n}\n\n/**\n * Adds a control point from an array and returns the new array.\n *\n * @param points Array of control points.\n * @param position Position to insert the new point.\n * @param color Color to update the control point at index.\n *\n * @return New array of control points.\n */\nexport function addControlPoint(\n\tpoints: ControlPoint[],\n\tposition: number,\n\tcolor: ControlPoint[ 'color' ]\n) {\n\tconst nextIndex = points.findIndex(\n\t\t( point ) => point.position > position\n\t);\n\tconst newPoint = { color, position };\n\tconst newPoints = points.slice();\n\tnewPoints.splice( nextIndex - 1, 0, newPoint );\n\treturn newPoints;\n}\n\n/**\n * Removes a control point from an array and returns the new array.\n *\n * @param points Array of control points.\n * @param index Index to remove.\n *\n * @return New array of control points.\n */\nexport function removeControlPoint( points: ControlPoint[], index: number ) {\n\treturn points.filter( ( _point, pointIndex ) => {\n\t\treturn pointIndex !== index;\n\t} );\n}\n/**\n * Updates a control point from an array and returns the new array.\n *\n * @param points Array of control points.\n * @param index Index to update.\n * @param newPoint New control point to replace the index.\n *\n * @return New array of control points.\n */\nexport function updateControlPoint(\n\tpoints: ControlPoint[],\n\tindex: number,\n\tnewPoint: ControlPoint\n) {\n\tconst newValue = points.slice();\n\tnewValue[ index ] = newPoint;\n\treturn newValue;\n}\n\n/**\n * Updates the position of a control point from an array and returns the new array.\n *\n * @param points Array of control points.\n * @param index Index to update.\n * @param newPosition Position to move the control point at index.\n *\n * @return New array of control points.\n */\nexport function updateControlPointPosition(\n\tpoints: ControlPoint[],\n\tindex: number,\n\tnewPosition: ControlPoint[ 'position' ]\n) {\n\tif ( isOverlapping( points, index, newPosition ) ) {\n\t\treturn points;\n\t}\n\tconst newPoint = {\n\t\t...points[ index ],\n\t\tposition: newPosition,\n\t};\n\treturn updateControlPoint( points, index, newPoint );\n}\n\n/**\n * Updates the position of a control point from an array and returns the new array.\n *\n * @param points Array of control points.\n * @param index Index to update.\n * @param newColor Color to update the control point at index.\n *\n * @return New array of control points.\n */\nexport function updateControlPointColor(\n\tpoints: ControlPoint[],\n\tindex: number,\n\tnewColor: ControlPoint[ 'color' ]\n) {\n\tconst newPoint = {\n\t\t...points[ index ],\n\t\tcolor: newColor,\n\t};\n\treturn updateControlPoint( points, index, newPoint );\n}\n\n/**\n * Updates the position of a control point from an array and returns the new array.\n *\n * @param points Array of control points.\n * @param position Position of the color stop.\n * @param newColor Color to update the control point at index.\n *\n * @return New array of control points.\n */\nexport function updateControlPointColorByPosition(\n\tpoints: ControlPoint[],\n\tposition: ControlPoint[ 'position' ],\n\tnewColor: ControlPoint[ 'color' ]\n) {\n\tconst index = points.findIndex( ( point ) => point.position === position );\n\treturn updateControlPointColor( points, index, newColor );\n}\n\n/**\n * Gets the horizontal coordinate when dragging a control point with the mouse.\n *\n * @param mouseXcoordinate Horizontal coordinate of the mouse position.\n * @param containerElement Container for the gradient picker.\n *\n * @return Whole number percentage from the left.\n */\nexport function getHorizontalRelativeGradientPosition(\n\tmouseXcoordinate: number,\n\tcontainerElement: HTMLDivElement\n): number;\nexport function getHorizontalRelativeGradientPosition(\n\tmouseXcoordinate: number,\n\tcontainerElement: null\n): undefined;\nexport function getHorizontalRelativeGradientPosition(\n\tmouseXCoordinate: number,\n\tcontainerElement: HTMLDivElement | null\n) {\n\tif ( ! containerElement ) {\n\t\treturn;\n\t}\n\tconst { x, width } = containerElement.getBoundingClientRect();\n\tconst absolutePositionValue = mouseXCoordinate - x;\n\treturn Math.round(\n\t\tclampPercent( ( absolutePositionValue * 100 ) / width )\n\t);\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport { colord } from 'colord';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { useEffect, useRef, useState, useMemo } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { plus } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport { HStack } from '../../h-stack';\nimport { ColorPicker } from '../../color-picker';\nimport { VisuallyHidden } from '../../visually-hidden';\nimport { CustomColorPickerDropdown } from '../../color-palette';\n\nimport {\n\taddControlPoint,\n\tclampPercent,\n\tremoveControlPoint,\n\tupdateControlPointColor,\n\tupdateControlPointColorByPosition,\n\tupdateControlPointPosition,\n\tgetHorizontalRelativeGradientPosition,\n} from './utils';\nimport {\n\tMINIMUM_SIGNIFICANT_MOVE,\n\tKEYBOARD_CONTROL_POINT_VARIATION,\n} from './constants';\nimport type { WordPressComponentProps } from '../../context';\nimport type {\n\tControlPointButtonProps,\n\tControlPointMoveState,\n\tControlPointsProps,\n\tInsertPointProps,\n} from '../types';\nimport type { CustomColorPickerDropdownProps } from '../../color-palette/types';\nimport DropdownContentWrapper from '../../dropdown/dropdown-content-wrapper';\n\nfunction ControlPointButton( {\n\tisOpen,\n\tposition,\n\tcolor,\n\t...additionalProps\n}: WordPressComponentProps< ControlPointButtonProps, 'button', true > ) {\n\tconst instanceId = useInstanceId( ControlPointButton );\n\tconst descriptionId = `components-custom-gradient-picker__control-point-button-description-${ instanceId }`;\n\treturn (\n\t\t<>\n\t\t\t<Button\n\t\t\t\taria-label={ sprintf(\n\t\t\t\t\t// translators: 1: gradient position e.g: 70. 2: gradient color code e.g: rgb(52,121,151).\n\t\t\t\t\t__(\n\t\t\t\t\t\t'Gradient control point at position %1$s%% with color code %2$s.'\n\t\t\t\t\t),\n\t\t\t\t\tposition,\n\t\t\t\t\tcolor\n\t\t\t\t) }\n\t\t\t\taria-describedby={ descriptionId }\n\t\t\t\taria-haspopup=\"true\"\n\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\t'components-custom-gradient-picker__control-point-button',\n\t\t\t\t\t{\n\t\t\t\t\t\t'is-active': isOpen,\n\t\t\t\t\t}\n\t\t\t\t) }\n\t\t\t\t{ ...additionalProps }\n\t\t\t/>\n\t\t\t<VisuallyHidden id={ descriptionId }>\n\t\t\t\t{ __(\n\t\t\t\t\t'Use your left or right arrow keys or drag and drop with the mouse to change the gradient position. Press the button to change the color or remove the control point.'\n\t\t\t\t) }\n\t\t\t</VisuallyHidden>\n\t\t</>\n\t);\n}\n\nfunction GradientColorPickerDropdown( {\n\tisRenderedInSidebar,\n\tclassName,\n\t...props\n}: CustomColorPickerDropdownProps ) {\n\t// Open the popover below the gradient control/insertion point\n\tconst popoverProps = useMemo(\n\t\t() =>\n\t\t\t( {\n\t\t\t\tplacement: 'bottom',\n\t\t\t\toffset: 8,\n\t\t\t\t// Disabling resize as it would otherwise cause the popover to show\n\t\t\t\t// scrollbars while dragging the color picker's handle close to the\n\t\t\t\t// popover edge.\n\t\t\t\tresize: false,\n\t\t\t} ) as const,\n\t\t[]\n\t);\n\n\tconst mergedClassName = clsx(\n\t\t'components-custom-gradient-picker__control-point-dropdown',\n\t\tclassName\n\t);\n\n\treturn (\n\t\t<CustomColorPickerDropdown\n\t\t\tisRenderedInSidebar={ isRenderedInSidebar }\n\t\t\tpopoverProps={ popoverProps }\n\t\t\tclassName={ mergedClassName }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nfunction ControlPoints( {\n\tdisableRemove,\n\tdisableAlpha,\n\tgradientPickerDomRef,\n\tignoreMarkerPosition,\n\tvalue: controlPoints,\n\tonChange,\n\tonStartControlPointChange,\n\tonStopControlPointChange,\n\t__experimentalIsRenderedInSidebar,\n}: ControlPointsProps ) {\n\tconst controlPointMoveStateRef = useRef< ControlPointMoveState >();\n\n\tconst onMouseMove = ( event: MouseEvent ) => {\n\t\tif (\n\t\t\tcontrolPointMoveStateRef.current === undefined ||\n\t\t\tgradientPickerDomRef.current === null\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst relativePosition = getHorizontalRelativeGradientPosition(\n\t\t\tevent.clientX,\n\t\t\tgradientPickerDomRef.current\n\t\t);\n\n\t\tconst { initialPosition, index, significantMoveHappened } =\n\t\t\tcontrolPointMoveStateRef.current;\n\n\t\tif (\n\t\t\t! significantMoveHappened &&\n\t\t\tMath.abs( initialPosition - relativePosition ) >=\n\t\t\t\tMINIMUM_SIGNIFICANT_MOVE\n\t\t) {\n\t\t\tcontrolPointMoveStateRef.current.significantMoveHappened = true;\n\t\t}\n\n\t\tonChange(\n\t\t\tupdateControlPointPosition( controlPoints, index, relativePosition )\n\t\t);\n\t};\n\n\tconst cleanEventListeners = () => {\n\t\tif (\n\t\t\twindow &&\n\t\t\twindow.removeEventListener &&\n\t\t\tcontrolPointMoveStateRef.current &&\n\t\t\tcontrolPointMoveStateRef.current.listenersActivated\n\t\t) {\n\t\t\twindow.removeEventListener( 'mousemove', onMouseMove );\n\t\t\twindow.removeEventListener( 'mouseup', cleanEventListeners );\n\t\t\tonStopControlPointChange();\n\t\t\tcontrolPointMoveStateRef.current.listenersActivated = false;\n\t\t}\n\t};\n\n\t// Adding `cleanEventListeners` to the dependency array below requires the function itself to be wrapped in a `useCallback`\n\t// This memoization would prevent the event listeners from being properly cleaned.\n\t// Instead, we'll pass a ref to the function in our `useEffect` so `cleanEventListeners` itself is no longer a dependency.\n\tconst cleanEventListenersRef = useRef< () => void >();\n\tcleanEventListenersRef.current = cleanEventListeners;\n\n\tuseEffect( () => {\n\t\treturn () => {\n\t\t\tcleanEventListenersRef.current?.();\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<>\n\t\t\t{ controlPoints.map( ( point, index ) => {\n\t\t\t\tconst initialPosition = point?.position;\n\t\t\t\treturn (\n\t\t\t\t\tignoreMarkerPosition !== initialPosition && (\n\t\t\t\t\t\t<GradientColorPickerDropdown\n\t\t\t\t\t\t\tisRenderedInSidebar={\n\t\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\tonClose={ onStopControlPointChange }\n\t\t\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t\t\t<ControlPointButton\n\t\t\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\tcontrolPointMoveStateRef.current &&\n\t\t\t\t\t\t\t\t\t\t\tcontrolPointMoveStateRef.current\n\t\t\t\t\t\t\t\t\t\t\t\t.significantMoveHappened\n\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif ( isOpen ) {\n\t\t\t\t\t\t\t\t\t\t\tonStopControlPointChange();\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tonStartControlPointChange();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonToggle();\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tonMouseDown={ () => {\n\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\twindow &&\n\t\t\t\t\t\t\t\t\t\t\twindow.addEventListener\n\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\tcontrolPointMoveStateRef.current = {\n\t\t\t\t\t\t\t\t\t\t\t\tinitialPosition,\n\t\t\t\t\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\t\t\t\t\tsignificantMoveHappened: false,\n\t\t\t\t\t\t\t\t\t\t\t\tlistenersActivated: true,\n\t\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\t\tonStartControlPointChange();\n\t\t\t\t\t\t\t\t\t\t\twindow.addEventListener(\n\t\t\t\t\t\t\t\t\t\t\t\t'mousemove',\n\t\t\t\t\t\t\t\t\t\t\t\tonMouseMove\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\twindow.addEventListener(\n\t\t\t\t\t\t\t\t\t\t\t\t'mouseup',\n\t\t\t\t\t\t\t\t\t\t\t\tcleanEventListeners\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\t\t\t\tif ( event.code === 'ArrowLeft' ) {\n\t\t\t\t\t\t\t\t\t\t\t// Stop propagation of the key press event to avoid focus moving\n\t\t\t\t\t\t\t\t\t\t\t// to another editor area.\n\t\t\t\t\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\t\t\t\t\tupdateControlPointPosition(\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontrolPoints,\n\t\t\t\t\t\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\t\t\t\t\t\tclampPercent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpoint.position -\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tKEYBOARD_CONTROL_POINT_VARIATION\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\t\t\t\t\tevent.code === 'ArrowRight'\n\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\t// Stop propagation of the key press event to avoid focus moving\n\t\t\t\t\t\t\t\t\t\t\t// to another editor area.\n\t\t\t\t\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\t\t\t\t\tupdateControlPointPosition(\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontrolPoints,\n\t\t\t\t\t\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\t\t\t\t\t\tclampPercent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpoint.position +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tKEYBOARD_CONTROL_POINT_VARIATION\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tisOpen={ isOpen }\n\t\t\t\t\t\t\t\t\tposition={ point.position }\n\t\t\t\t\t\t\t\t\tcolor={ point.color }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t\t\t<DropdownContentWrapper paddingSize=\"none\">\n\t\t\t\t\t\t\t\t\t<ColorPicker\n\t\t\t\t\t\t\t\t\t\tenableAlpha={ ! disableAlpha }\n\t\t\t\t\t\t\t\t\t\tcolor={ point.color }\n\t\t\t\t\t\t\t\t\t\tonChange={ ( color ) => {\n\t\t\t\t\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\t\t\t\t\tupdateControlPointColor(\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontrolPoints,\n\t\t\t\t\t\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\t\t\t\t\t\tcolord(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor\n\t\t\t\t\t\t\t\t\t\t\t\t\t).toRgbString()\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t{ ! disableRemove &&\n\t\t\t\t\t\t\t\t\t\tcontrolPoints.length > 2 && (\n\t\t\t\t\t\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"components-custom-gradient-picker__remove-control-point-wrapper\"\n\t\t\t\t\t\t\t\t\t\t\t\talignment=\"center\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tremoveControlPoint(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontrolPoints,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tindex\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Remove Control Point'\n\t\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</DropdownContentWrapper>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\tleft: `${ point.position }%`,\n\t\t\t\t\t\t\t\ttransform: 'translateX( -50% )',\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</>\n\t);\n}\n\nfunction InsertPoint( {\n\tvalue: controlPoints,\n\tonChange,\n\tonOpenInserter,\n\tonCloseInserter,\n\tinsertPosition,\n\tdisableAlpha,\n\t__experimentalIsRenderedInSidebar,\n}: InsertPointProps ) {\n\tconst [ alreadyInsertedPoint, setAlreadyInsertedPoint ] = useState( false );\n\treturn (\n\t\t<GradientColorPickerDropdown\n\t\t\tisRenderedInSidebar={ __experimentalIsRenderedInSidebar }\n\t\t\tclassName=\"components-custom-gradient-picker__inserter\"\n\t\t\tonClose={ () => {\n\t\t\t\tonCloseInserter();\n\t\t\t} }\n\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t<Button\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\tif ( isOpen ) {\n\t\t\t\t\t\t\tonCloseInserter();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsetAlreadyInsertedPoint( false );\n\t\t\t\t\t\t\tonOpenInserter();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonToggle();\n\t\t\t\t\t} }\n\t\t\t\t\tclassName=\"components-custom-gradient-picker__insert-point-dropdown\"\n\t\t\t\t\ticon={ plus }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\trenderContent={ () => (\n\t\t\t\t<DropdownContentWrapper paddingSize=\"none\">\n\t\t\t\t\t<ColorPicker\n\t\t\t\t\t\tenableAlpha={ ! disableAlpha }\n\t\t\t\t\t\tonChange={ ( color ) => {\n\t\t\t\t\t\t\tif ( ! alreadyInsertedPoint ) {\n\t\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\t\taddControlPoint(\n\t\t\t\t\t\t\t\t\t\tcontrolPoints,\n\t\t\t\t\t\t\t\t\t\tinsertPosition,\n\t\t\t\t\t\t\t\t\t\tcolord( color ).toRgbString()\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tsetAlreadyInsertedPoint( true );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\t\tupdateControlPointColorByPosition(\n\t\t\t\t\t\t\t\t\t\tcontrolPoints,\n\t\t\t\t\t\t\t\t\t\tinsertPosition,\n\t\t\t\t\t\t\t\t\t\tcolord( color ).toRgbString()\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</DropdownContentWrapper>\n\t\t\t) }\n\t\t\tstyle={\n\t\t\t\tinsertPosition !== null\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tleft: `${ insertPosition }%`,\n\t\t\t\t\t\t\ttransform: 'translateX( -50% )',\n\t\t\t\t\t }\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t/>\n\t);\n}\nControlPoints.InsertPoint = InsertPoint;\n\nexport default ControlPoints;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useReducer } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ControlPoints from './control-points';\nimport { getHorizontalRelativeGradientPosition } from './utils';\nimport { MINIMUM_DISTANCE_BETWEEN_INSERTER_AND_POINT } from './constants';\nimport type {\n\tCustomGradientBarProps,\n\tCustomGradientBarReducerState,\n\tCustomGradientBarReducerAction,\n\tCustomGradientBarIdleState,\n} from '../types';\nimport type { MouseEventHandler } from 'react';\n\nconst customGradientBarReducer = (\n\tstate: CustomGradientBarReducerState,\n\taction: CustomGradientBarReducerAction\n): CustomGradientBarReducerState => {\n\tswitch ( action.type ) {\n\t\tcase 'MOVE_INSERTER':\n\t\t\tif ( state.id === 'IDLE' || state.id === 'MOVING_INSERTER' ) {\n\t\t\t\treturn {\n\t\t\t\t\tid: 'MOVING_INSERTER',\n\t\t\t\t\tinsertPosition: action.insertPosition,\n\t\t\t\t};\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'STOP_INSERTER_MOVE':\n\t\t\tif ( state.id === 'MOVING_INSERTER' ) {\n\t\t\t\treturn {\n\t\t\t\t\tid: 'IDLE',\n\t\t\t\t};\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'OPEN_INSERTER':\n\t\t\tif ( state.id === 'MOVING_INSERTER' ) {\n\t\t\t\treturn {\n\t\t\t\t\tid: 'INSERTING_CONTROL_POINT',\n\t\t\t\t\tinsertPosition: state.insertPosition,\n\t\t\t\t};\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'CLOSE_INSERTER':\n\t\t\tif ( state.id === 'INSERTING_CONTROL_POINT' ) {\n\t\t\t\treturn {\n\t\t\t\t\tid: 'IDLE',\n\t\t\t\t};\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'START_CONTROL_CHANGE':\n\t\t\tif ( state.id === 'IDLE' ) {\n\t\t\t\treturn {\n\t\t\t\t\tid: 'MOVING_CONTROL_POINT',\n\t\t\t\t};\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'STOP_CONTROL_CHANGE':\n\t\t\tif ( state.id === 'MOVING_CONTROL_POINT' ) {\n\t\t\t\treturn {\n\t\t\t\t\tid: 'IDLE',\n\t\t\t\t};\n\t\t\t}\n\t\t\tbreak;\n\t}\n\treturn state;\n};\nconst customGradientBarReducerInitialState: CustomGradientBarIdleState = {\n\tid: 'IDLE',\n};\n\nexport default function CustomGradientBar( {\n\tbackground,\n\thasGradient,\n\tvalue: controlPoints,\n\tonChange,\n\tdisableInserter = false,\n\tdisableAlpha = false,\n\t__experimentalIsRenderedInSidebar = false,\n}: CustomGradientBarProps ) {\n\tconst gradientMarkersContainerDomRef = useRef< HTMLDivElement >( null );\n\n\tconst [ gradientBarState, gradientBarStateDispatch ] = useReducer(\n\t\tcustomGradientBarReducer,\n\t\tcustomGradientBarReducerInitialState\n\t);\n\tconst onMouseEnterAndMove: MouseEventHandler< HTMLDivElement > = (\n\t\tevent\n\t) => {\n\t\tif ( ! gradientMarkersContainerDomRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst insertPosition = getHorizontalRelativeGradientPosition(\n\t\t\tevent.clientX,\n\t\t\tgradientMarkersContainerDomRef.current\n\t\t);\n\n\t\t// If the insert point is close to an existing control point don't show it.\n\t\tif (\n\t\t\tcontrolPoints.some( ( { position } ) => {\n\t\t\t\treturn (\n\t\t\t\t\tMath.abs( insertPosition - position ) <\n\t\t\t\t\tMINIMUM_DISTANCE_BETWEEN_INSERTER_AND_POINT\n\t\t\t\t);\n\t\t\t} )\n\t\t) {\n\t\t\tif ( gradientBarState.id === 'MOVING_INSERTER' ) {\n\t\t\t\tgradientBarStateDispatch( { type: 'STOP_INSERTER_MOVE' } );\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tgradientBarStateDispatch( { type: 'MOVE_INSERTER', insertPosition } );\n\t};\n\n\tconst onMouseLeave = () => {\n\t\tgradientBarStateDispatch( { type: 'STOP_INSERTER_MOVE' } );\n\t};\n\n\tconst isMovingInserter = gradientBarState.id === 'MOVING_INSERTER';\n\tconst isInsertingControlPoint =\n\t\tgradientBarState.id === 'INSERTING_CONTROL_POINT';\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ clsx(\n\t\t\t\t'components-custom-gradient-picker__gradient-bar',\n\t\t\t\t{ 'has-gradient': hasGradient }\n\t\t\t) }\n\t\t\tonMouseEnter={ onMouseEnterAndMove }\n\t\t\tonMouseMove={ onMouseEnterAndMove }\n\t\t\tonMouseLeave={ onMouseLeave }\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName=\"components-custom-gradient-picker__gradient-bar-background\"\n\t\t\t\tstyle={ {\n\t\t\t\t\tbackground,\n\t\t\t\t\topacity: hasGradient ? 1 : 0.4,\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<div\n\t\t\t\tref={ gradientMarkersContainerDomRef }\n\t\t\t\tclassName=\"components-custom-gradient-picker__markers-container\"\n\t\t\t>\n\t\t\t\t{ ! disableInserter &&\n\t\t\t\t\t( isMovingInserter || isInsertingControlPoint ) && (\n\t\t\t\t\t\t<ControlPoints.InsertPoint\n\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdisableAlpha={ disableAlpha }\n\t\t\t\t\t\t\tinsertPosition={ gradientBarState.insertPosition }\n\t\t\t\t\t\t\tvalue={ controlPoints }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\tonOpenInserter={ () => {\n\t\t\t\t\t\t\t\tgradientBarStateDispatch( {\n\t\t\t\t\t\t\t\t\ttype: 'OPEN_INSERTER',\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonCloseInserter={ () => {\n\t\t\t\t\t\t\t\tgradientBarStateDispatch( {\n\t\t\t\t\t\t\t\t\ttype: 'CLOSE_INSERTER',\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t<ControlPoints\n\t\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t}\n\t\t\t\t\tdisableAlpha={ disableAlpha }\n\t\t\t\t\tdisableRemove={ disableInserter }\n\t\t\t\t\tgradientPickerDomRef={ gradientMarkersContainerDomRef }\n\t\t\t\t\tignoreMarkerPosition={\n\t\t\t\t\t\tisInsertingControlPoint\n\t\t\t\t\t\t\t? gradientBarState.insertPosition\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t\tvalue={ controlPoints }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\tonStartControlPointChange={ () => {\n\t\t\t\t\t\tgradientBarStateDispatch( {\n\t\t\t\t\t\t\ttype: 'START_CONTROL_CHANGE',\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tonStopControlPointChange={ () => {\n\t\t\t\t\t\tgradientBarStateDispatch( {\n\t\t\t\t\t\t\ttype: 'STOP_CONTROL_CHANGE',\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\nexport const DEFAULT_GRADIENT =\n\t'linear-gradient(135deg, rgba(6, 147, 227, 1) 0%, rgb(155, 81, 224) 100%)';\n\nexport const DEFAULT_LINEAR_GRADIENT_ANGLE = 180;\n\nexport const HORIZONTAL_GRADIENT_ORIENTATION = {\n\ttype: 'angular',\n\tvalue: '90',\n} as const;\n\nexport const GRADIENT_OPTIONS = [\n\t{ value: 'linear-gradient', label: __( 'Linear' ) },\n\t{ value: 'radial-gradient', label: __( 'Radial' ) },\n];\n\nexport const DIRECTIONAL_ORIENTATION_ANGLE_MAP = {\n\ttop: 0,\n\t'top right': 45,\n\t'right top': 45,\n\tright: 90,\n\t'right bottom': 135,\n\t'bottom right': 135,\n\tbottom: 180,\n\t'bottom left': 225,\n\t'left bottom': 225,\n\tleft: 270,\n\t'top left': 315,\n\t'left top': 315,\n};\n","/**\n * External dependencies\n */\nimport type gradientParser from 'gradient-parser';\n\nexport function serializeGradientColor( {\n\ttype,\n\tvalue,\n}: gradientParser.ColorStop ) {\n\tif ( type === 'literal' ) {\n\t\treturn value;\n\t}\n\tif ( type === 'hex' ) {\n\t\treturn `#${ value }`;\n\t}\n\treturn `${ type }(${ value.join( ',' ) })`;\n}\n\nexport function serializeGradientPosition(\n\tposition: gradientParser.ColorStop[ 'length' ]\n) {\n\tif ( ! position ) {\n\t\treturn '';\n\t}\n\tconst { value, type } = position;\n\treturn `${ value }${ type }`;\n}\n\nexport function serializeGradientColorStop( {\n\ttype,\n\tvalue,\n\tlength,\n}: gradientParser.ColorStop ) {\n\treturn `${ serializeGradientColor( {\n\t\ttype,\n\t\tvalue,\n\t} as gradientParser.ColorStop ) } ${ serializeGradientPosition( length ) }`;\n}\n\nexport function serializeGradientOrientation(\n\torientation: gradientParser.GradientNode[ 'orientation' ]\n) {\n\tif (\n\t\tArray.isArray( orientation ) ||\n\t\t! orientation ||\n\t\torientation.type !== 'angular'\n\t) {\n\t\treturn;\n\t}\n\treturn `${ orientation.value }deg`;\n}\n\nexport function serializeGradient( {\n\ttype,\n\torientation,\n\tcolorStops,\n}: gradientParser.GradientNode ) {\n\tconst serializedOrientation = serializeGradientOrientation( orientation );\n\tconst serializedColorStops = colorStops\n\t\t.sort( ( colorStop1, colorStop2 ) => {\n\t\t\tconst getNumericStopValue = (\n\t\t\t\tcolorStop: gradientParser.ColorStop\n\t\t\t) => {\n\t\t\t\treturn colorStop?.length?.value === undefined\n\t\t\t\t\t? 0\n\t\t\t\t\t: parseInt( colorStop.length.value );\n\t\t\t};\n\n\t\t\treturn (\n\t\t\t\tgetNumericStopValue( colorStop1 ) -\n\t\t\t\tgetNumericStopValue( colorStop2 )\n\t\t\t);\n\t\t} )\n\t\t.map( serializeGradientColorStop );\n\treturn `${ type }(${ [ serializedOrientation, ...serializedColorStops ]\n\t\t.filter( Boolean )\n\t\t.join( ',' ) })`;\n}\n","/**\n * External dependencies\n */\nimport gradientParser from 'gradient-parser';\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\n\n/**\n * Internal dependencies\n */\nimport {\n\tDEFAULT_GRADIENT,\n\tHORIZONTAL_GRADIENT_ORIENTATION,\n\tDIRECTIONAL_ORIENTATION_ANGLE_MAP,\n} from './constants';\nimport { serializeGradient } from './serializer';\nimport type { ControlPoint } from './types';\n\nextend( [ namesPlugin ] );\n\nexport function getLinearGradientRepresentation(\n\tgradientAST: gradientParser.GradientNode\n) {\n\treturn serializeGradient( {\n\t\ttype: 'linear-gradient',\n\t\torientation: HORIZONTAL_GRADIENT_ORIENTATION,\n\t\tcolorStops: gradientAST.colorStops,\n\t} );\n}\n\nfunction hasUnsupportedLength( item: gradientParser.ColorStop ) {\n\treturn item.length === undefined || item.length.type !== '%';\n}\n\nexport function getGradientAstWithDefault( value?: string | null ) {\n\t// gradientAST will contain the gradient AST as parsed by gradient-parser npm module.\n\t// More information of its structure available at https://www.npmjs.com/package/gradient-parser#ast.\n\tlet gradientAST: gradientParser.GradientNode | undefined;\n\tlet hasGradient = !! value;\n\n\tconst valueToParse = value ?? DEFAULT_GRADIENT;\n\n\ttry {\n\t\tgradientAST = gradientParser.parse( valueToParse )[ 0 ];\n\t} catch ( error ) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.warn(\n\t\t\t'wp.components.CustomGradientPicker failed to parse the gradient with error',\n\t\t\terror\n\t\t);\n\n\t\tgradientAST = gradientParser.parse( DEFAULT_GRADIENT )[ 0 ];\n\t\thasGradient = false;\n\t}\n\n\tif (\n\t\t! Array.isArray( gradientAST.orientation ) &&\n\t\tgradientAST.orientation?.type === 'directional'\n\t) {\n\t\tgradientAST.orientation = {\n\t\t\ttype: 'angular',\n\t\t\tvalue: DIRECTIONAL_ORIENTATION_ANGLE_MAP[\n\t\t\t\tgradientAST.orientation.value\n\t\t\t].toString(),\n\t\t};\n\t}\n\n\tif ( gradientAST.colorStops.some( hasUnsupportedLength ) ) {\n\t\tconst { colorStops } = gradientAST;\n\t\tconst step = 100 / ( colorStops.length - 1 );\n\t\tcolorStops.forEach( ( stop, index ) => {\n\t\t\tstop.length = {\n\t\t\t\tvalue: `${ step * index }`,\n\t\t\t\ttype: '%',\n\t\t\t};\n\t\t} );\n\t}\n\n\treturn { gradientAST, hasGradient };\n}\n\nexport function getGradientAstWithControlPoints(\n\tgradientAST: gradientParser.GradientNode,\n\tnewControlPoints: ControlPoint[]\n) {\n\treturn {\n\t\t...gradientAST,\n\t\tcolorStops: newControlPoints.map( ( { position, color } ) => {\n\t\t\tconst { r, g, b, a } = colord( color ).toRgb();\n\t\t\treturn {\n\t\t\t\tlength: {\n\t\t\t\t\ttype: '%',\n\t\t\t\t\tvalue: position?.toString(),\n\t\t\t\t},\n\t\t\t\ttype: a < 1 ? 'rgba' : 'rgb',\n\t\t\t\tvalue:\n\t\t\t\t\ta < 1\n\t\t\t\t\t\t? [ `${ r }`, `${ g }`, `${ b }`, `${ a }` ]\n\t\t\t\t\t\t: [ `${ r }`, `${ g }`, `${ b }` ],\n\t\t\t};\n\t\t} ),\n\t} as gradientParser.GradientNode;\n}\n\nexport function getStopCssColor( colorStop: gradientParser.ColorStop ) {\n\tswitch ( colorStop.type ) {\n\t\tcase 'hex':\n\t\t\treturn `#${ colorStop.value }`;\n\t\tcase 'literal':\n\t\t\treturn colorStop.value;\n\t\tcase 'rgb':\n\t\tcase 'rgba':\n\t\t\treturn `${ colorStop.type }(${ colorStop.value.join( ',' ) })`;\n\t\tdefault:\n\t\t\t// Should be unreachable if passing an AST from gradient-parser.\n\t\t\t// See https://github.com/rafaelcaricio/gradient-parser#ast.\n\t\t\treturn 'transparent';\n\t}\n}\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n/**\n * Internal dependencies\n */\nimport { FlexBlock } from '../../flex';\n\nexport const SelectWrapper = styled( FlexBlock )`\n\tflex-grow: 5;\n`;\n\nexport const AccessoryWrapper = styled( FlexBlock )`\n\tflex-grow: 5;\n`;\n","/**\n * External dependencies\n */\nimport { type LinearGradientNode } from 'gradient-parser';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport AnglePickerControl from '../angle-picker-control';\nimport CustomGradientBar from './gradient-bar';\nimport { Flex } from '../flex';\nimport SelectControl from '../select-control';\nimport { VStack } from '../v-stack';\nimport {\n\tgetGradientAstWithDefault,\n\tgetLinearGradientRepresentation,\n\tgetGradientAstWithControlPoints,\n\tgetStopCssColor,\n} from './utils';\nimport { serializeGradient } from './serializer';\nimport {\n\tDEFAULT_LINEAR_GRADIENT_ANGLE,\n\tHORIZONTAL_GRADIENT_ORIENTATION,\n\tGRADIENT_OPTIONS,\n} from './constants';\nimport {\n\tAccessoryWrapper,\n\tSelectWrapper,\n} from './styles/custom-gradient-picker-styles';\nimport type {\n\tCustomGradientPickerProps,\n\tGradientAnglePickerProps,\n\tGradientTypePickerProps,\n} from './types';\n\nconst GradientAnglePicker = ( {\n\tgradientAST,\n\thasGradient,\n\tonChange,\n}: GradientAnglePickerProps ) => {\n\tconst angle =\n\t\tgradientAST?.orientation?.value ?? DEFAULT_LINEAR_GRADIENT_ANGLE;\n\tconst onAngleChange = ( newAngle: number ) => {\n\t\tonChange(\n\t\t\tserializeGradient( {\n\t\t\t\t...gradientAST,\n\t\t\t\torientation: {\n\t\t\t\t\ttype: 'angular',\n\t\t\t\t\tvalue: `${ newAngle }`,\n\t\t\t\t},\n\t\t\t} )\n\t\t);\n\t};\n\treturn (\n\t\t<AnglePickerControl\n\t\t\tonChange={ onAngleChange }\n\t\t\tvalue={ hasGradient ? angle : '' }\n\t\t/>\n\t);\n};\n\nconst GradientTypePicker = ( {\n\tgradientAST,\n\thasGradient,\n\tonChange,\n}: GradientTypePickerProps ) => {\n\tconst { type } = gradientAST;\n\n\tconst onSetLinearGradient = () => {\n\t\tonChange(\n\t\t\tserializeGradient( {\n\t\t\t\t...gradientAST,\n\t\t\t\torientation: gradientAST.orientation\n\t\t\t\t\t? undefined\n\t\t\t\t\t: HORIZONTAL_GRADIENT_ORIENTATION,\n\t\t\t\ttype: 'linear-gradient',\n\t\t\t} satisfies LinearGradientNode )\n\t\t);\n\t};\n\n\tconst onSetRadialGradient = () => {\n\t\tconst { orientation, ...restGradientAST } = gradientAST;\n\t\tonChange(\n\t\t\tserializeGradient( {\n\t\t\t\t...restGradientAST,\n\t\t\t\ttype: 'radial-gradient',\n\t\t\t} )\n\t\t);\n\t};\n\n\tconst handleOnChange = ( next: string ) => {\n\t\tif ( next === 'linear-gradient' ) {\n\t\t\tonSetLinearGradient();\n\t\t}\n\t\tif ( next === 'radial-gradient' ) {\n\t\t\tonSetRadialGradient();\n\t\t}\n\t};\n\n\treturn (\n\t\t<SelectControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tclassName=\"components-custom-gradient-picker__type-picker\"\n\t\t\tlabel={ __( 'Type' ) }\n\t\t\tlabelPosition=\"top\"\n\t\t\tonChange={ handleOnChange }\n\t\t\toptions={ GRADIENT_OPTIONS }\n\t\t\tsize=\"__unstable-large\"\n\t\t\tvalue={ hasGradient ? type : undefined }\n\t\t/>\n\t);\n};\n\n/**\n * CustomGradientPicker is a React component that renders a UI for specifying\n * linear or radial gradients. Radial gradients are displayed in the picker as\n * a slice of the gradient from the center to the outside.\n *\n * ```jsx\n * import { CustomGradientPicker } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyCustomGradientPicker = () => {\n * const [ gradient, setGradient ] = useState();\n *\n * return (\n * <CustomGradientPicker\n *\t\t\tvalue={ gradient }\n *\t\t\tonChange={ setGradient }\n * />\n * );\n * };\n * ```\n */\nexport function CustomGradientPicker( {\n\tvalue,\n\tonChange,\n\tenableAlpha = true,\n\t__experimentalIsRenderedInSidebar = false,\n}: CustomGradientPickerProps ) {\n\tconst { gradientAST, hasGradient } = getGradientAstWithDefault( value );\n\n\t// On radial gradients the bar should display a linear gradient.\n\t// On radial gradients the bar represents a slice of the gradient from the center until the outside.\n\t// On liner gradients the bar represents the color stops from left to right independently of the angle.\n\tconst background = getLinearGradientRepresentation( gradientAST );\n\n\t// Control points color option may be hex from presets, custom colors will be rgb.\n\t// The position should always be a percentage.\n\tconst controlPoints = gradientAST.colorStops.map( ( colorStop ) => {\n\t\treturn {\n\t\t\tcolor: getStopCssColor( colorStop ),\n\t\t\t// Although it's already been checked by `hasUnsupportedLength` in `getGradientAstWithDefault`,\n\t\t\t// TypeScript doesn't know that `colorStop.length` is not undefined here.\n\t\t\t// @ts-expect-error\n\t\t\tposition: parseInt( colorStop.length.value ),\n\t\t};\n\t} );\n\n\treturn (\n\t\t<VStack spacing={ 4 } className=\"components-custom-gradient-picker\">\n\t\t\t<CustomGradientBar\n\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t}\n\t\t\t\tdisableAlpha={ ! enableAlpha }\n\t\t\t\tbackground={ background }\n\t\t\t\thasGradient={ hasGradient }\n\t\t\t\tvalue={ controlPoints }\n\t\t\t\tonChange={ ( newControlPoints ) => {\n\t\t\t\t\tonChange(\n\t\t\t\t\t\tserializeGradient(\n\t\t\t\t\t\t\tgetGradientAstWithControlPoints(\n\t\t\t\t\t\t\t\tgradientAST,\n\t\t\t\t\t\t\t\tnewControlPoints\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<Flex\n\t\t\t\tgap={ 3 }\n\t\t\t\tclassName=\"components-custom-gradient-picker__ui-line\"\n\t\t\t>\n\t\t\t\t<SelectWrapper>\n\t\t\t\t\t<GradientTypePicker\n\t\t\t\t\t\tgradientAST={ gradientAST }\n\t\t\t\t\t\thasGradient={ hasGradient }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t/>\n\t\t\t\t</SelectWrapper>\n\t\t\t\t<AccessoryWrapper>\n\t\t\t\t\t{ gradientAST.type === 'linear-gradient' && (\n\t\t\t\t\t\t<GradientAnglePicker\n\t\t\t\t\t\t\tgradientAST={ gradientAST }\n\t\t\t\t\t\t\thasGradient={ hasGradient }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</AccessoryWrapper>\n\t\t\t</Flex>\n\t\t</VStack>\n\t);\n}\n\nexport default CustomGradientPicker;\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useCallback, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport CircularOptionPicker from '../circular-option-picker';\nimport CustomGradientPicker from '../custom-gradient-picker';\nimport { VStack } from '../v-stack';\nimport { ColorHeading } from '../color-palette/styles';\nimport type {\n\tGradientPickerComponentProps,\n\tPickerProps,\n\tOriginObject,\n\tGradientObject,\n} from './types';\n\n// The Multiple Origin Gradients have a `gradients` property (an array of\n// gradient objects), while Single Origin ones have a `gradient` property.\nconst isMultipleOriginObject = (\n\tobj: Record< string, any >\n): obj is OriginObject =>\n\tArray.isArray( obj.gradients ) && ! ( 'gradient' in obj );\n\nconst isMultipleOriginArray = ( arr: any[] ): arr is OriginObject[] => {\n\treturn (\n\t\tarr.length > 0 &&\n\t\tarr.every( ( gradientObj ) => isMultipleOriginObject( gradientObj ) )\n\t);\n};\n\nfunction SingleOrigin( {\n\tclassName,\n\tclearGradient,\n\tgradients,\n\tonChange,\n\tvalue,\n\t...additionalProps\n}: PickerProps< GradientObject > ) {\n\tconst gradientOptions = useMemo( () => {\n\t\treturn gradients.map( ( { gradient, name, slug }, index ) => (\n\t\t\t<CircularOptionPicker.Option\n\t\t\t\tkey={ slug }\n\t\t\t\tvalue={ gradient }\n\t\t\t\tisSelected={ value === gradient }\n\t\t\t\ttooltipText={\n\t\t\t\t\tname ||\n\t\t\t\t\t// translators: %s: gradient code e.g: \"linear-gradient(90deg, rgba(98,16,153,1) 0%, rgba(172,110,22,1) 100%);\".\n\t\t\t\t\tsprintf( __( 'Gradient code: %s' ), gradient )\n\t\t\t\t}\n\t\t\t\tstyle={ { color: 'rgba( 0,0,0,0 )', background: gradient } }\n\t\t\t\tonClick={\n\t\t\t\t\tvalue === gradient\n\t\t\t\t\t\t? clearGradient\n\t\t\t\t\t\t: () => onChange( gradient, index )\n\t\t\t\t}\n\t\t\t\taria-label={\n\t\t\t\t\tname\n\t\t\t\t\t\t? // translators: %s: The name of the gradient e.g: \"Angular red to blue\".\n\t\t\t\t\t\t sprintf( __( 'Gradient: %s' ), name )\n\t\t\t\t\t\t: // translators: %s: gradient code e.g: \"linear-gradient(90deg, rgba(98,16,153,1) 0%, rgba(172,110,22,1) 100%);\".\n\t\t\t\t\t\t sprintf( __( 'Gradient code: %s' ), gradient )\n\t\t\t\t}\n\t\t\t/>\n\t\t) );\n\t}, [ gradients, value, onChange, clearGradient ] );\n\treturn (\n\t\t<CircularOptionPicker.OptionGroup\n\t\t\tclassName={ className }\n\t\t\toptions={ gradientOptions }\n\t\t\t{ ...additionalProps }\n\t\t/>\n\t);\n}\n\nfunction MultipleOrigin( {\n\tclassName,\n\tclearGradient,\n\tgradients,\n\tonChange,\n\tvalue,\n\theadingLevel,\n}: PickerProps< OriginObject > ) {\n\tconst instanceId = useInstanceId( MultipleOrigin );\n\n\treturn (\n\t\t<VStack spacing={ 3 } className={ className }>\n\t\t\t{ gradients.map( ( { name, gradients: gradientSet }, index ) => {\n\t\t\t\tconst id = `color-palette-${ instanceId }-${ index }`;\n\t\t\t\treturn (\n\t\t\t\t\t<VStack spacing={ 2 } key={ index }>\n\t\t\t\t\t\t<ColorHeading level={ headingLevel } id={ id }>\n\t\t\t\t\t\t\t{ name }\n\t\t\t\t\t\t</ColorHeading>\n\t\t\t\t\t\t<SingleOrigin\n\t\t\t\t\t\t\tclearGradient={ clearGradient }\n\t\t\t\t\t\t\tgradients={ gradientSet }\n\t\t\t\t\t\t\tonChange={ ( gradient ) =>\n\t\t\t\t\t\t\t\tonChange( gradient, index )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\taria-labelledby={ id }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</VStack>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</VStack>\n\t);\n}\n\nfunction Component( props: PickerProps< any > ) {\n\tconst {\n\t\tasButtons,\n\t\tloop,\n\t\tactions,\n\t\theadingLevel,\n\t\t'aria-label': ariaLabel,\n\t\t'aria-labelledby': ariaLabelledby,\n\t\t...additionalProps\n\t} = props;\n\tconst options = isMultipleOriginArray( props.gradients ) ? (\n\t\t<MultipleOrigin headingLevel={ headingLevel } { ...additionalProps } />\n\t) : (\n\t\t<SingleOrigin { ...additionalProps } />\n\t);\n\n\tlet metaProps:\n\t\t| { asButtons: false; loop?: boolean; 'aria-label': string }\n\t\t| { asButtons: false; loop?: boolean; 'aria-labelledby': string }\n\t\t| { asButtons: true };\n\n\tif ( asButtons ) {\n\t\tmetaProps = { asButtons: true };\n\t} else {\n\t\tconst _metaProps: { asButtons: false; loop?: boolean } = {\n\t\t\tasButtons: false,\n\t\t\tloop,\n\t\t};\n\n\t\tif ( ariaLabel ) {\n\t\t\tmetaProps = { ..._metaProps, 'aria-label': ariaLabel };\n\t\t} else if ( ariaLabelledby ) {\n\t\t\tmetaProps = {\n\t\t\t\t..._metaProps,\n\t\t\t\t'aria-labelledby': ariaLabelledby,\n\t\t\t};\n\t\t} else {\n\t\t\tmetaProps = {\n\t\t\t\t..._metaProps,\n\t\t\t\t'aria-label': __( 'Custom color picker.' ),\n\t\t\t};\n\t\t}\n\t}\n\n\treturn (\n\t\t<CircularOptionPicker\n\t\t\t{ ...metaProps }\n\t\t\tactions={ actions }\n\t\t\toptions={ options }\n\t\t/>\n\t);\n}\n\n/**\n * GradientPicker is a React component that renders a color gradient picker to\n * define a multi step gradient. There's either a _linear_ or a _radial_ type\n * available.\n *\n * ```jsx\n * import { useState } from 'react';\n * import { GradientPicker } from '@wordpress/components';\n *\n * const MyGradientPicker = () => {\n * const [ gradient, setGradient ] = useState( null );\n *\n * return (\n * <GradientPicker\n * value={ gradient }\n * onChange={ ( currentGradient ) => setGradient( currentGradient ) }\n * gradients={ [\n * {\n * name: 'JShine',\n * gradient:\n * 'linear-gradient(135deg,#12c2e9 0%,#c471ed 50%,#f64f59 100%)',\n * slug: 'jshine',\n * },\n * {\n * name: 'Moonlit Asteroid',\n * gradient:\n * 'linear-gradient(135deg,#0F2027 0%, #203A43 0%, #2c5364 100%)',\n * slug: 'moonlit-asteroid',\n * },\n * {\n * name: 'Rastafarie',\n * gradient:\n * 'linear-gradient(135deg,#1E9600 0%, #FFF200 0%, #FF0000 100%)',\n * slug: 'rastafari',\n * },\n * ] }\n * />\n * );\n * };\n *```\n *\n */\nexport function GradientPicker( {\n\tclassName,\n\tgradients = [],\n\tonChange,\n\tvalue,\n\tclearable = true,\n\tenableAlpha = true,\n\tdisableCustomGradients = false,\n\t__experimentalIsRenderedInSidebar,\n\theadingLevel = 2,\n\t...additionalProps\n}: GradientPickerComponentProps ) {\n\tconst clearGradient = useCallback(\n\t\t() => onChange( undefined ),\n\t\t[ onChange ]\n\t);\n\n\treturn (\n\t\t<VStack spacing={ gradients.length ? 4 : 0 }>\n\t\t\t{ ! disableCustomGradients && (\n\t\t\t\t<CustomGradientPicker\n\t\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t}\n\t\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ ( gradients.length > 0 || clearable ) && (\n\t\t\t\t<Component\n\t\t\t\t\t{ ...additionalProps }\n\t\t\t\t\tclassName={ className }\n\t\t\t\t\tclearGradient={ clearGradient }\n\t\t\t\t\tgradients={ gradients }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tactions={\n\t\t\t\t\t\tclearable &&\n\t\t\t\t\t\t! disableCustomGradients && (\n\t\t\t\t\t\t\t<CircularOptionPicker.ButtonAction\n\t\t\t\t\t\t\t\tonClick={ clearGradient }\n\t\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\t\tdisabled={ ! value }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Clear' ) }\n\t\t\t\t\t\t\t</CircularOptionPicker.ButtonAction>\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t\theadingLevel={ headingLevel }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n\nexport default GradientPicker;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst menu = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z\" />\n\t</SVG>\n);\n\nexport default menu;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"dom\"];","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { Component, forwardRef } from '@wordpress/element';\nimport { focus } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport type { NavigableContainerProps } from './types';\n\nconst noop = () => {};\nconst MENU_ITEM_ROLES = [ 'menuitem', 'menuitemradio', 'menuitemcheckbox' ];\n\nfunction cycleValue( value: number, total: number, offset: number ) {\n\tconst nextValue = value + offset;\n\tif ( nextValue < 0 ) {\n\t\treturn total + nextValue;\n\t} else if ( nextValue >= total ) {\n\t\treturn nextValue - total;\n\t}\n\n\treturn nextValue;\n}\n\nclass NavigableContainer extends Component< NavigableContainerProps > {\n\tcontainer?: HTMLDivElement;\n\n\tconstructor( args: NavigableContainerProps ) {\n\t\tsuper( args );\n\t\tthis.onKeyDown = this.onKeyDown.bind( this );\n\t\tthis.bindContainer = this.bindContainer.bind( this );\n\n\t\tthis.getFocusableContext = this.getFocusableContext.bind( this );\n\t\tthis.getFocusableIndex = this.getFocusableIndex.bind( this );\n\t}\n\n\tcomponentDidMount() {\n\t\tif ( ! this.container ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// We use DOM event listeners instead of React event listeners\n\t\t// because we want to catch events from the underlying DOM tree\n\t\t// The React Tree can be different from the DOM tree when using\n\t\t// portals. Block Toolbars for instance are rendered in a separate\n\t\t// React Trees.\n\t\tthis.container.addEventListener( 'keydown', this.onKeyDown );\n\t}\n\n\tcomponentWillUnmount() {\n\t\tif ( ! this.container ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.container.removeEventListener( 'keydown', this.onKeyDown );\n\t}\n\n\tbindContainer( ref: HTMLDivElement ) {\n\t\tconst { forwardedRef } = this.props;\n\t\tthis.container = ref;\n\n\t\tif ( typeof forwardedRef === 'function' ) {\n\t\t\tforwardedRef( ref );\n\t\t} else if ( forwardedRef && 'current' in forwardedRef ) {\n\t\t\tforwardedRef.current = ref;\n\t\t}\n\t}\n\n\tgetFocusableContext( target: Element ) {\n\t\tif ( ! this.container ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst { onlyBrowserTabstops } = this.props;\n\t\tconst finder = onlyBrowserTabstops ? focus.tabbable : focus.focusable;\n\t\tconst focusables = finder.find( this.container );\n\n\t\tconst index = this.getFocusableIndex( focusables, target );\n\t\tif ( index > -1 && target ) {\n\t\t\treturn { index, target, focusables };\n\t\t}\n\t\treturn null;\n\t}\n\n\tgetFocusableIndex( focusables: Element[], target: Element ) {\n\t\treturn focusables.indexOf( target );\n\t}\n\n\tonKeyDown( event: KeyboardEvent ) {\n\t\tif ( this.props.onKeyDown ) {\n\t\t\tthis.props.onKeyDown( event );\n\t\t}\n\n\t\tconst { getFocusableContext } = this;\n\t\tconst {\n\t\t\tcycle = true,\n\t\t\teventToOffset,\n\t\t\tonNavigate = noop,\n\t\t\tstopNavigationEvents,\n\t\t} = this.props;\n\n\t\tconst offset = eventToOffset( event );\n\n\t\t// eventToOffset returns undefined if the event is not handled by the component.\n\t\tif ( offset !== undefined && stopNavigationEvents ) {\n\t\t\t// Prevents arrow key handlers bound to the document directly interfering.\n\t\t\tevent.stopImmediatePropagation();\n\n\t\t\t// When navigating a collection of items, prevent scroll containers\n\t\t\t// from scrolling. The preventDefault also prevents Voiceover from\n\t\t\t// 'handling' the event, as voiceover will try to use arrow keys\n\t\t\t// for highlighting text.\n\t\t\tconst targetRole = (\n\t\t\t\tevent.target as HTMLDivElement | null\n\t\t\t )?.getAttribute( 'role' );\n\t\t\tconst targetHasMenuItemRole =\n\t\t\t\t!! targetRole && MENU_ITEM_ROLES.includes( targetRole );\n\n\t\t\tif ( targetHasMenuItemRole ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t}\n\n\t\tif ( ! offset ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst activeElement = ( event.target as HTMLElement | null )\n\t\t\t?.ownerDocument?.activeElement;\n\t\tif ( ! activeElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst context = getFocusableContext( activeElement );\n\t\tif ( ! context ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { index, focusables } = context;\n\t\tconst nextIndex = cycle\n\t\t\t? cycleValue( index, focusables.length, offset )\n\t\t\t: index + offset;\n\n\t\tif ( nextIndex >= 0 && nextIndex < focusables.length ) {\n\t\t\tfocusables[ nextIndex ].focus();\n\t\t\tonNavigate( nextIndex, focusables[ nextIndex ] );\n\n\t\t\t// `preventDefault()` on tab to avoid having the browser move the focus\n\t\t\t// after this component has already moved it.\n\t\t\tif ( event.code === 'Tab' ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t}\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tchildren,\n\t\t\tstopNavigationEvents,\n\t\t\teventToOffset,\n\t\t\tonNavigate,\n\t\t\tonKeyDown,\n\t\t\tcycle,\n\t\t\tonlyBrowserTabstops,\n\t\t\tforwardedRef,\n\t\t\t...restProps\n\t\t} = this.props;\n\t\treturn (\n\t\t\t<div ref={ this.bindContainer } { ...restProps }>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nconst forwardedNavigableContainer = (\n\tprops: NavigableContainerProps,\n\tref: ForwardedRef< HTMLDivElement >\n) => {\n\treturn <NavigableContainer { ...props } forwardedRef={ ref } />;\n};\nforwardedNavigableContainer.displayName = 'NavigableContainer';\n\nexport default forwardRef( forwardedNavigableContainer );\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport NavigableContainer from './container';\nimport type { NavigableMenuProps } from './types';\n\nexport function UnforwardedNavigableMenu(\n\t{ role = 'menu', orientation = 'vertical', ...rest }: NavigableMenuProps,\n\tref: ForwardedRef< any >\n) {\n\tconst eventToOffset = ( evt: KeyboardEvent ) => {\n\t\tconst { code } = evt;\n\n\t\tlet next = [ 'ArrowDown' ];\n\t\tlet previous = [ 'ArrowUp' ];\n\n\t\tif ( orientation === 'horizontal' ) {\n\t\t\tnext = [ 'ArrowRight' ];\n\t\t\tprevious = [ 'ArrowLeft' ];\n\t\t}\n\n\t\tif ( orientation === 'both' ) {\n\t\t\tnext = [ 'ArrowRight', 'ArrowDown' ];\n\t\t\tprevious = [ 'ArrowLeft', 'ArrowUp' ];\n\t\t}\n\n\t\tif ( next.includes( code ) ) {\n\t\t\treturn 1;\n\t\t} else if ( previous.includes( code ) ) {\n\t\t\treturn -1;\n\t\t} else if (\n\t\t\t[ 'ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight' ].includes(\n\t\t\t\tcode\n\t\t\t)\n\t\t) {\n\t\t\t// Key press should be handled, e.g. have event propagation and\n\t\t\t// default behavior handled by NavigableContainer but not result\n\t\t\t// in an offset.\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn undefined;\n\t};\n\n\treturn (\n\t\t<NavigableContainer\n\t\t\tref={ ref }\n\t\t\tstopNavigationEvents\n\t\t\tonlyBrowserTabstops={ false }\n\t\t\trole={ role }\n\t\t\taria-orientation={\n\t\t\t\trole !== 'presentation' &&\n\t\t\t\t( orientation === 'vertical' || orientation === 'horizontal' )\n\t\t\t\t\t? orientation\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\teventToOffset={ eventToOffset }\n\t\t\t{ ...rest }\n\t\t/>\n\t);\n}\n\n/**\n * A container for a navigable menu.\n *\n * ```jsx\n * import {\n * NavigableMenu,\n * Button,\n * } from '@wordpress/components';\n *\n * function onNavigate( index, target ) {\n * console.log( `Navigates to ${ index }`, target );\n * }\n *\n * const MyNavigableContainer = () => (\n * <div>\n * <span>Navigable Menu:</span>\n * <NavigableMenu onNavigate={ onNavigate } orientation=\"horizontal\">\n * <Button variant=\"secondary\">Item 1</Button>\n * <Button variant=\"secondary\">Item 2</Button>\n * <Button variant=\"secondary\">Item 3</Button>\n * </NavigableMenu>\n * </div>\n * );\n * ```\n */\nexport const NavigableMenu = forwardRef( UnforwardedNavigableMenu );\n\nexport default NavigableMenu;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { menu } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { contextConnectWithoutRef, useContextSystem } from '../context';\nimport Button from '../button';\nimport Dropdown from '../dropdown';\nimport { NavigableMenu } from '../navigable-container';\nimport type {\n\tDropdownMenuProps,\n\tDropdownOption,\n\tDropdownMenuInternalContext,\n} from './types';\n\nfunction mergeProps<\n\tT extends { className?: string; [ key: string ]: unknown },\n>( defaultProps: Partial< T > = {}, props: T = {} as T ) {\n\tconst mergedProps: T = {\n\t\t...defaultProps,\n\t\t...props,\n\t};\n\n\tif ( props.className && defaultProps.className ) {\n\t\tmergedProps.className = clsx( props.className, defaultProps.className );\n\t}\n\n\treturn mergedProps;\n}\n\nfunction isFunction( maybeFunc: unknown ): maybeFunc is () => void {\n\treturn typeof maybeFunc === 'function';\n}\n\nfunction UnconnectedDropdownMenu( dropdownMenuProps: DropdownMenuProps ) {\n\tconst {\n\t\tchildren,\n\t\tclassName,\n\t\tcontrols,\n\t\ticon = menu,\n\t\tlabel,\n\t\tpopoverProps,\n\t\ttoggleProps,\n\t\tmenuProps,\n\t\tdisableOpenOnArrowDown = false,\n\t\ttext,\n\t\tnoIcons,\n\n\t\topen,\n\t\tdefaultOpen,\n\t\tonToggle: onToggleProp,\n\n\t\t// Context\n\t\tvariant,\n\t} = useContextSystem< DropdownMenuProps & DropdownMenuInternalContext >(\n\t\tdropdownMenuProps,\n\t\t'DropdownMenu'\n\t);\n\n\tif ( ! controls?.length && ! isFunction( children ) ) {\n\t\treturn null;\n\t}\n\n\t// Normalize controls to nested array of objects (sets of controls)\n\tlet controlSets: DropdownOption[][];\n\tif ( controls?.length ) {\n\t\t// @ts-expect-error The check below is needed because `DropdownMenus`\n\t\t// rendered by `ToolBarGroup` receive controls as a nested array.\n\t\tcontrolSets = controls;\n\t\tif ( ! Array.isArray( controlSets[ 0 ] ) ) {\n\t\t\t// This is not ideal, but at this point we know that `controls` is\n\t\t\t// not a nested array, even if TypeScript doesn't.\n\t\t\tcontrolSets = [ controls as DropdownOption[] ];\n\t\t}\n\t}\n\n\tconst mergedPopoverProps = mergeProps(\n\t\t{\n\t\t\tclassName: 'components-dropdown-menu__popover',\n\t\t\tvariant,\n\t\t},\n\t\tpopoverProps\n\t);\n\n\treturn (\n\t\t<Dropdown\n\t\t\tclassName={ className }\n\t\t\tpopoverProps={ mergedPopoverProps }\n\t\t\trenderToggle={ ( { isOpen, onToggle } ) => {\n\t\t\t\tconst openOnArrowDown = ( event: React.KeyboardEvent ) => {\n\t\t\t\t\tif ( disableOpenOnArrowDown ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ! isOpen && event.code === 'ArrowDown' ) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tonToggle();\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tconst { as: Toggle = Button, ...restToggleProps } =\n\t\t\t\t\ttoggleProps ?? {};\n\n\t\t\t\tconst mergedToggleProps = mergeProps(\n\t\t\t\t\t{\n\t\t\t\t\t\tclassName: clsx( 'components-dropdown-menu__toggle', {\n\t\t\t\t\t\t\t'is-opened': isOpen,\n\t\t\t\t\t\t} ),\n\t\t\t\t\t},\n\t\t\t\t\trestToggleProps\n\t\t\t\t);\n\n\t\t\t\treturn (\n\t\t\t\t\t<Toggle\n\t\t\t\t\t\t{ ...mergedToggleProps }\n\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\t( ( event ) => {\n\t\t\t\t\t\t\t\tonToggle();\n\t\t\t\t\t\t\t\tif ( mergedToggleProps.onClick ) {\n\t\t\t\t\t\t\t\t\tmergedToggleProps.onClick( event );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} ) as React.MouseEventHandler< HTMLButtonElement >\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonKeyDown={\n\t\t\t\t\t\t\t( ( event ) => {\n\t\t\t\t\t\t\t\topenOnArrowDown( event );\n\t\t\t\t\t\t\t\tif ( mergedToggleProps.onKeyDown ) {\n\t\t\t\t\t\t\t\t\tmergedToggleProps.onKeyDown( event );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} ) as React.KeyboardEventHandler< HTMLButtonElement >\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\ttext={ text }\n\t\t\t\t\t\tshowTooltip={ toggleProps?.showTooltip ?? true }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ mergedToggleProps.children }\n\t\t\t\t\t</Toggle>\n\t\t\t\t);\n\t\t\t} }\n\t\t\trenderContent={ ( props ) => {\n\t\t\t\tconst mergedMenuProps = mergeProps(\n\t\t\t\t\t{\n\t\t\t\t\t\t'aria-label': label,\n\t\t\t\t\t\tclassName: clsx( 'components-dropdown-menu__menu', {\n\t\t\t\t\t\t\t'no-icons': noIcons,\n\t\t\t\t\t\t} ),\n\t\t\t\t\t},\n\t\t\t\t\tmenuProps\n\t\t\t\t);\n\n\t\t\t\treturn (\n\t\t\t\t\t<NavigableMenu { ...mergedMenuProps } role=\"menu\">\n\t\t\t\t\t\t{ isFunction( children ) ? children( props ) : null }\n\t\t\t\t\t\t{ controlSets?.flatMap( ( controlSet, indexOfSet ) =>\n\t\t\t\t\t\t\tcontrolSet.map( ( control, indexOfControl ) => (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\tkey={ [\n\t\t\t\t\t\t\t\t\t\tindexOfSet,\n\t\t\t\t\t\t\t\t\t\tindexOfControl,\n\t\t\t\t\t\t\t\t\t].join() }\n\t\t\t\t\t\t\t\t\tonClick={ (\n\t\t\t\t\t\t\t\t\t\tevent: React.MouseEvent< HTMLButtonElement >\n\t\t\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t\t\t\t\tprops.onClose();\n\t\t\t\t\t\t\t\t\t\tif ( control.onClick ) {\n\t\t\t\t\t\t\t\t\t\t\tcontrol.onClick();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t\t\t'components-dropdown-menu__menu-item',\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t'has-separator':\n\t\t\t\t\t\t\t\t\t\t\t\tindexOfSet > 0 &&\n\t\t\t\t\t\t\t\t\t\t\t\tindexOfControl === 0,\n\t\t\t\t\t\t\t\t\t\t\t'is-active': control.isActive,\n\t\t\t\t\t\t\t\t\t\t\t'is-icon-only': ! control.title,\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\ticon={ control.icon }\n\t\t\t\t\t\t\t\t\tlabel={ control.label }\n\t\t\t\t\t\t\t\t\taria-checked={\n\t\t\t\t\t\t\t\t\t\tcontrol.role === 'menuitemcheckbox' ||\n\t\t\t\t\t\t\t\t\t\tcontrol.role === 'menuitemradio'\n\t\t\t\t\t\t\t\t\t\t\t? control.isActive\n\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\trole={\n\t\t\t\t\t\t\t\t\t\tcontrol.role === 'menuitemcheckbox' ||\n\t\t\t\t\t\t\t\t\t\tcontrol.role === 'menuitemradio'\n\t\t\t\t\t\t\t\t\t\t\t? control.role\n\t\t\t\t\t\t\t\t\t\t\t: 'menuitem'\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\t\t\tdisabled={ control.isDisabled }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ control.title }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t) )\n\t\t\t\t\t\t) }\n\t\t\t\t\t</NavigableMenu>\n\t\t\t\t);\n\t\t\t} }\n\t\t\topen={ open }\n\t\t\tdefaultOpen={ defaultOpen }\n\t\t\tonToggle={ onToggleProp }\n\t\t/>\n\t);\n}\n\n/**\n *\n * The DropdownMenu displays a list of actions (each contained in a MenuItem,\n * MenuItemsChoice, or MenuGroup) in a compact way. It appears in a Popover\n * after the user has interacted with an element (a button or icon) or when\n * they perform a specific action.\n *\n * Render a Dropdown Menu with a set of controls:\n *\n * ```jsx\n * import { DropdownMenu } from '@wordpress/components';\n * import {\n * \tmore,\n * \tarrowLeft,\n * \tarrowRight,\n * \tarrowUp,\n * \tarrowDown,\n * } from '@wordpress/icons';\n *\n * const MyDropdownMenu = () => (\n * \t<DropdownMenu\n * \t\ticon={ more }\n * \t\tlabel=\"Select a direction\"\n * \t\tcontrols={ [\n * \t\t\t{\n * \t\t\t\ttitle: 'Up',\n * \t\t\t\ticon: arrowUp,\n * \t\t\t\tonClick: () => console.log( 'up' ),\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\ttitle: 'Right',\n * \t\t\t\ticon: arrowRight,\n * \t\t\t\tonClick: () => console.log( 'right' ),\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\ttitle: 'Down',\n * \t\t\t\ticon: arrowDown,\n * \t\t\t\tonClick: () => console.log( 'down' ),\n * \t\t\t},\n * \t\t\t{\n * \t\t\t\ttitle: 'Left',\n * \t\t\t\ticon: arrowLeft,\n * \t\t\t\tonClick: () => console.log( 'left' ),\n * \t\t\t},\n * \t\t] }\n * \t/>\n * );\n * ```\n *\n * Alternatively, specify a `children` function which returns elements valid for\n * use in a DropdownMenu: `MenuItem`, `MenuItemsChoice`, or `MenuGroup`.\n *\n * ```jsx\n * import { DropdownMenu, MenuGroup, MenuItem } from '@wordpress/components';\n * import { more, arrowUp, arrowDown, trash } from '@wordpress/icons';\n *\n * const MyDropdownMenu = () => (\n * \t<DropdownMenu icon={ more } label=\"Select a direction\">\n * \t\t{ ( { onClose } ) => (\n * \t\t\t<>\n * \t\t\t\t<MenuGroup>\n * \t\t\t\t\t<MenuItem icon={ arrowUp } onClick={ onClose }>\n * \t\t\t\t\t\tMove Up\n * \t\t\t\t\t</MenuItem>\n * \t\t\t\t\t<MenuItem icon={ arrowDown } onClick={ onClose }>\n * \t\t\t\t\t\tMove Down\n * \t\t\t\t\t</MenuItem>\n * \t\t\t\t</MenuGroup>\n * \t\t\t\t<MenuGroup>\n * \t\t\t\t\t<MenuItem icon={ trash } onClick={ onClose }>\n * \t\t\t\t\t\tRemove\n * \t\t\t\t\t</MenuItem>\n * \t\t\t\t</MenuGroup>\n * \t\t\t</>\n * \t\t) }\n * \t</DropdownMenu>\n * );\n * ```\n *\n */\nexport const DropdownMenu = contextConnectWithoutRef(\n\tUnconnectedDropdownMenu,\n\t'DropdownMenu'\n);\n\nexport default DropdownMenu;\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { Heading } from '../heading';\nimport { space } from '../utils/space';\nimport { COLORS, CONFIG } from '../utils';\nimport { View } from '../view';\nimport InputControl from '../input-control';\nimport {\n\tContainer as InputControlContainer,\n\tInput,\n\tBackdropUI as InputBackdropUI,\n} from '../input-control/styles/input-control-styles';\nimport ColorIndicator from '../color-indicator';\n\nexport const IndicatorStyled = styled( ColorIndicator )`\n\t&& {\n\t\tflex-shrink: 0;\n\t\twidth: ${ space( 6 ) };\n\t\theight: ${ space( 6 ) };\n\t}\n`;\n\nexport const NameInputControl = styled( InputControl )`\n\t${ InputControlContainer } {\n\t\tbackground: ${ COLORS.gray[ 100 ] };\n\t\tborder-radius: ${ CONFIG.radiusXSmall };\n\t\t${ Input }${ Input }${ Input }${ Input } {\n\t\t\theight: ${ space( 8 ) };\n\t\t}\n\t\t${ InputBackdropUI }${ InputBackdropUI }${ InputBackdropUI } {\n\t\t\tborder-color: transparent;\n\t\t\tbox-shadow: none;\n\t\t}\n\t}\n`;\n\nexport const NameContainer = styled.div`\n\tline-height: ${ space( 8 ) };\n\tmargin-left: ${ space( 2 ) };\n\tmargin-right: ${ space( 2 ) };\n\twhite-space: nowrap;\n\toverflow: hidden;\n`;\n\nexport const PaletteHeading = styled( Heading )`\n\ttext-transform: uppercase;\n\tline-height: ${ space( 6 ) };\n\tfont-weight: 500;\n\t&&& {\n\t\tfont-size: 11px;\n\t\tmargin-bottom: 0;\n\t}\n`;\n\nexport const PaletteActionsContainer = styled( View )`\n\theight: ${ space( 6 ) };\n\tdisplay: flex;\n`;\n\nexport const PaletteEditContents = styled( View )`\n\tmargin-top: ${ space( 2 ) };\n`;\n\nexport const PaletteEditStyles = styled( View )`\n\t&&& {\n\t\t.components-button.has-icon {\n\t\t\tmin-width: 0;\n\t\t\tpadding: 0;\n\t\t}\n\t}\n`;\n\nexport const DoneButton = styled( Button )`\n\t&& {\n\t\tcolor: ${ COLORS.theme.accent };\n\t}\n`;\n\nexport const RemoveButton = styled( Button )`\n\t&& {\n\t\tmargin-top: ${ space( 1 ) };\n\t}\n`;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseState,\n\tuseRef,\n\tuseEffect,\n\tuseCallback,\n\tuseMemo,\n} from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { lineSolid, moreVertical, plus } from '@wordpress/icons';\nimport { useDebounce } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { ColorPicker } from '../color-picker';\nimport { FlexItem } from '../flex';\nimport { HStack } from '../h-stack';\nimport { Item, ItemGroup } from '../item-group';\nimport { VStack } from '../v-stack';\nimport GradientPicker from '../gradient-picker';\nimport ColorPalette from '../color-palette';\nimport DropdownMenu from '../dropdown-menu';\nimport Popover from '../popover';\nimport {\n\tPaletteActionsContainer,\n\tPaletteEditStyles,\n\tPaletteHeading,\n\tIndicatorStyled,\n\tNameContainer,\n\tNameInputControl,\n\tDoneButton,\n\tRemoveButton,\n\tPaletteEditContents,\n} from './styles';\nimport { NavigableMenu } from '../navigable-container';\nimport { DEFAULT_GRADIENT } from '../custom-gradient-picker/constants';\nimport CustomGradientPicker from '../custom-gradient-picker';\nimport { kebabCase } from '../utils/strings';\nimport type {\n\tColor,\n\tColorPickerPopoverProps,\n\tNameInputProps,\n\tOptionProps,\n\tPaletteEditListViewProps,\n\tPaletteEditProps,\n\tPaletteElement,\n} from './types';\n\nconst DEFAULT_COLOR = '#000';\n\nfunction NameInput( { value, onChange, label }: NameInputProps ) {\n\treturn (\n\t\t<NameInputControl\n\t\t\tsize=\"compact\"\n\t\t\tlabel={ label }\n\t\t\thideLabelFromVision\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t/>\n\t);\n}\n\n/*\n * Deduplicates the slugs of the provided elements.\n */\nexport function deduplicateElementSlugs< T extends PaletteElement >(\n\telements: T[]\n) {\n\tconst slugCounts: { [ slug: string ]: number } = {};\n\n\treturn elements.map( ( element ) => {\n\t\tlet newSlug: string | undefined;\n\n\t\tconst { slug } = element;\n\t\tslugCounts[ slug ] = ( slugCounts[ slug ] || 0 ) + 1;\n\n\t\tif ( slugCounts[ slug ] > 1 ) {\n\t\t\tnewSlug = `${ slug }-${ slugCounts[ slug ] - 1 }`;\n\t\t}\n\n\t\treturn { ...element, slug: newSlug ?? slug };\n\t} );\n}\n\n/**\n * Returns a name and slug for a palette item. The name takes the format \"Color + id\".\n * To ensure there are no duplicate ids, this function checks all slugs.\n * It expects slugs to be in the format: slugPrefix + color- + number.\n * It then sets the id component of the new name based on the incremented id of the highest existing slug id.\n *\n * @param elements An array of color palette items.\n * @param slugPrefix The slug prefix used to match the element slug.\n *\n * @return A name and slug for the new palette item.\n */\nexport function getNameAndSlugForPosition(\n\telements: PaletteElement[],\n\tslugPrefix: string\n) {\n\tconst nameRegex = new RegExp( `^${ slugPrefix }color-([\\\\d]+)$` );\n\tconst position = elements.reduce( ( previousValue, currentValue ) => {\n\t\tif ( typeof currentValue?.slug === 'string' ) {\n\t\t\tconst matches = currentValue?.slug.match( nameRegex );\n\t\t\tif ( matches ) {\n\t\t\t\tconst id = parseInt( matches[ 1 ], 10 );\n\t\t\t\tif ( id >= previousValue ) {\n\t\t\t\t\treturn id + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn previousValue;\n\t}, 1 );\n\n\treturn {\n\t\tname: sprintf(\n\t\t\t/* translators: %s: is an id for a custom color */\n\t\t\t__( 'Color %s' ),\n\t\t\tposition\n\t\t),\n\t\tslug: `${ slugPrefix }color-${ position }`,\n\t};\n}\n\nfunction ColorPickerPopover< T extends PaletteElement >( {\n\tisGradient,\n\telement,\n\tonChange,\n\tpopoverProps: receivedPopoverProps,\n\tonClose = () => {},\n}: ColorPickerPopoverProps< T > ) {\n\tconst popoverProps: ColorPickerPopoverProps< T >[ 'popoverProps' ] =\n\t\tuseMemo(\n\t\t\t() => ( {\n\t\t\t\tshift: true,\n\t\t\t\toffset: 20,\n\t\t\t\t// Disabling resize as it would otherwise cause the popover to show\n\t\t\t\t// scrollbars while dragging the color picker's handle close to the\n\t\t\t\t// popover edge.\n\t\t\t\tresize: false,\n\t\t\t\tplacement: 'left-start',\n\t\t\t\t...receivedPopoverProps,\n\t\t\t\tclassName: clsx(\n\t\t\t\t\t'components-palette-edit__popover',\n\t\t\t\t\treceivedPopoverProps?.className\n\t\t\t\t),\n\t\t\t} ),\n\t\t\t[ receivedPopoverProps ]\n\t\t);\n\n\treturn (\n\t\t<Popover { ...popoverProps } onClose={ onClose }>\n\t\t\t{ ! isGradient && (\n\t\t\t\t<ColorPicker\n\t\t\t\t\tcolor={ element.color }\n\t\t\t\t\tenableAlpha\n\t\t\t\t\tonChange={ ( newColor ) => {\n\t\t\t\t\t\tonChange( {\n\t\t\t\t\t\t\t...element,\n\t\t\t\t\t\t\tcolor: newColor,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ isGradient && (\n\t\t\t\t<div className=\"components-palette-edit__popover-gradient-picker\">\n\t\t\t\t\t<CustomGradientPicker\n\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\tvalue={ element.gradient }\n\t\t\t\t\t\tonChange={ ( newGradient ) => {\n\t\t\t\t\t\t\tonChange( {\n\t\t\t\t\t\t\t\t...element,\n\t\t\t\t\t\t\t\tgradient: newGradient,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</Popover>\n\t);\n}\n\nfunction Option< T extends PaletteElement >( {\n\tcanOnlyChangeValues,\n\telement,\n\tonChange,\n\tonRemove,\n\tpopoverProps: receivedPopoverProps,\n\tslugPrefix,\n\tisGradient,\n}: OptionProps< T > ) {\n\tconst value = isGradient ? element.gradient : element.color;\n\tconst [ isEditingColor, setIsEditingColor ] = useState( false );\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t...receivedPopoverProps,\n\t\t\t// Use the custom palette color item as the popover anchor.\n\t\t\tanchor: popoverAnchor,\n\t\t} ),\n\t\t[ popoverAnchor, receivedPopoverProps ]\n\t);\n\n\treturn (\n\t\t<Item ref={ setPopoverAnchor } size=\"small\">\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t<Button\n\t\t\t\t\tsize=\"small\"\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\tsetIsEditingColor( true );\n\t\t\t\t\t} }\n\t\t\t\t\taria-label={ sprintf(\n\t\t\t\t\t\t// translators: %s is a color or gradient name, e.g. \"Red\".\n\t\t\t\t\t\t__( 'Edit: %s' ),\n\t\t\t\t\t\telement.name.trim().length ? element.name : value\n\t\t\t\t\t) }\n\t\t\t\t\tstyle={ { padding: 0 } }\n\t\t\t\t>\n\t\t\t\t\t<IndicatorStyled colorValue={ value } />\n\t\t\t\t</Button>\n\t\t\t\t<FlexItem>\n\t\t\t\t\t{ ! canOnlyChangeValues ? (\n\t\t\t\t\t\t<NameInput\n\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\tisGradient\n\t\t\t\t\t\t\t\t\t? __( 'Gradient name' )\n\t\t\t\t\t\t\t\t\t: __( 'Color name' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvalue={ element.name }\n\t\t\t\t\t\t\tonChange={ ( nextName?: string ) =>\n\t\t\t\t\t\t\t\tonChange( {\n\t\t\t\t\t\t\t\t\t...element,\n\t\t\t\t\t\t\t\t\tname: nextName,\n\t\t\t\t\t\t\t\t\tslug:\n\t\t\t\t\t\t\t\t\t\tslugPrefix +\n\t\t\t\t\t\t\t\t\t\tkebabCase( nextName ?? '' ),\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<NameContainer>\n\t\t\t\t\t\t\t{ element.name.trim().length\n\t\t\t\t\t\t\t\t? element.name\n\t\t\t\t\t\t\t\t: /* Fall back to non-breaking space to maintain height */\n\t\t\t\t\t\t\t\t '\\u00A0' }\n\t\t\t\t\t\t</NameContainer>\n\t\t\t\t\t) }\n\t\t\t\t</FlexItem>\n\t\t\t\t{ ! canOnlyChangeValues && (\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<RemoveButton\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\ticon={ lineSolid }\n\t\t\t\t\t\t\tlabel={ sprintf(\n\t\t\t\t\t\t\t\t// translators: %s is a color or gradient name, e.g. \"Red\".\n\t\t\t\t\t\t\t\t__( 'Remove color: %s' ),\n\t\t\t\t\t\t\t\telement.name.trim().length\n\t\t\t\t\t\t\t\t\t? element.name\n\t\t\t\t\t\t\t\t\t: value\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonClick={ onRemove }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t\t{ isEditingColor && (\n\t\t\t\t<ColorPickerPopover\n\t\t\t\t\tisGradient={ isGradient }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\telement={ element }\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\tonClose={ () => setIsEditingColor( false ) }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</Item>\n\t);\n}\n\nfunction PaletteEditListView< T extends PaletteElement >( {\n\telements,\n\tonChange,\n\tcanOnlyChangeValues,\n\tslugPrefix,\n\tisGradient,\n\tpopoverProps,\n\taddColorRef,\n}: PaletteEditListViewProps< T > ) {\n\t// When unmounting the component if there are empty elements (the user did not complete the insertion) clean them.\n\tconst elementsReferenceRef = useRef< typeof elements >();\n\tuseEffect( () => {\n\t\telementsReferenceRef.current = elements;\n\t}, [ elements ] );\n\n\tconst debounceOnChange = useDebounce(\n\t\t( updatedElements: T[] ) =>\n\t\t\tonChange( deduplicateElementSlugs( updatedElements ) ),\n\t\t100\n\t);\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t<ItemGroup isRounded isBordered isSeparated>\n\t\t\t\t{ elements.map( ( element, index ) => (\n\t\t\t\t\t<Option\n\t\t\t\t\t\tisGradient={ isGradient }\n\t\t\t\t\t\tcanOnlyChangeValues={ canOnlyChangeValues }\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\telement={ element }\n\t\t\t\t\t\tonChange={ ( newElement ) => {\n\t\t\t\t\t\t\tdebounceOnChange(\n\t\t\t\t\t\t\t\telements.map(\n\t\t\t\t\t\t\t\t\t( currentElement, currentIndex ) => {\n\t\t\t\t\t\t\t\t\t\tif ( currentIndex === index ) {\n\t\t\t\t\t\t\t\t\t\t\treturn newElement;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\treturn currentElement;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonRemove={ () => {\n\t\t\t\t\t\t\tconst newElements = elements.filter(\n\t\t\t\t\t\t\t\t( _currentElement, currentIndex ) => {\n\t\t\t\t\t\t\t\t\tif ( currentIndex === index ) {\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\tnewElements.length ? newElements : undefined\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\taddColorRef.current?.focus();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tslugPrefix={ slugPrefix }\n\t\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</ItemGroup>\n\t\t</VStack>\n\t);\n}\n\nconst EMPTY_ARRAY: Color[] = [];\n\n/**\n * Allows editing a palette of colors or gradients.\n *\n * ```jsx\n * import { PaletteEdit } from '@wordpress/components';\n * const MyPaletteEdit = () => {\n * const [ controlledColors, setControlledColors ] = useState( colors );\n *\n * return (\n * <PaletteEdit\n * colors={ controlledColors }\n * onChange={ ( newColors?: Color[] ) => {\n * setControlledColors( newColors );\n * } }\n * paletteLabel=\"Here is a label\"\n * />\n * );\n * };\n * ```\n */\nexport function PaletteEdit( {\n\tgradients,\n\tcolors = EMPTY_ARRAY,\n\tonChange,\n\tpaletteLabel,\n\tpaletteLabelHeadingLevel = 2,\n\temptyMessage,\n\tcanOnlyChangeValues,\n\tcanReset,\n\tslugPrefix = '',\n\tpopoverProps,\n}: PaletteEditProps ) {\n\tconst isGradient = !! gradients;\n\tconst elements = isGradient ? gradients : colors;\n\tconst [ isEditing, setIsEditing ] = useState( false );\n\tconst [ editingElement, setEditingElement ] = useState<\n\t\tnumber | null | undefined\n\t>( null );\n\tconst isAdding =\n\t\tisEditing &&\n\t\t!! editingElement &&\n\t\telements[ editingElement ] &&\n\t\t! elements[ editingElement ].slug;\n\tconst elementsLength = elements.length;\n\tconst hasElements = elementsLength > 0;\n\tconst debounceOnChange = useDebounce( onChange, 100 );\n\tconst onSelectPaletteItem = useCallback(\n\t\t(\n\t\t\tvalue?: PaletteElement[ keyof PaletteElement ],\n\t\t\tnewEditingElementIndex?: number\n\t\t) => {\n\t\t\tconst selectedElement =\n\t\t\t\tnewEditingElementIndex === undefined\n\t\t\t\t\t? undefined\n\t\t\t\t\t: elements[ newEditingElementIndex ];\n\t\t\tconst key = isGradient ? 'gradient' : 'color';\n\t\t\t// Ensures that the index returned matches a known element value.\n\t\t\tif ( !! selectedElement && selectedElement[ key ] === value ) {\n\t\t\t\tsetEditingElement( newEditingElementIndex );\n\t\t\t} else {\n\t\t\t\tsetIsEditing( true );\n\t\t\t}\n\t\t},\n\t\t[ isGradient, elements ]\n\t);\n\n\tconst addColorRef = useRef< HTMLButtonElement | null >( null );\n\n\treturn (\n\t\t<PaletteEditStyles>\n\t\t\t<HStack>\n\t\t\t\t<PaletteHeading level={ paletteLabelHeadingLevel }>\n\t\t\t\t\t{ paletteLabel }\n\t\t\t\t</PaletteHeading>\n\t\t\t\t<PaletteActionsContainer>\n\t\t\t\t\t{ hasElements && isEditing && (\n\t\t\t\t\t\t<DoneButton\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tsetIsEditing( false );\n\t\t\t\t\t\t\t\tsetEditingElement( null );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Done' ) }\n\t\t\t\t\t\t</DoneButton>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! canOnlyChangeValues && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tref={ addColorRef }\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\tisPressed={ isAdding }\n\t\t\t\t\t\t\ticon={ plus }\n\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\tisGradient\n\t\t\t\t\t\t\t\t\t? __( 'Add gradient' )\n\t\t\t\t\t\t\t\t\t: __( 'Add color' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tconst { name, slug } =\n\t\t\t\t\t\t\t\t\tgetNameAndSlugForPosition(\n\t\t\t\t\t\t\t\t\t\telements,\n\t\t\t\t\t\t\t\t\t\tslugPrefix\n\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\tif ( !! gradients ) {\n\t\t\t\t\t\t\t\t\tonChange( [\n\t\t\t\t\t\t\t\t\t\t...gradients,\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tgradient: DEFAULT_GRADIENT,\n\t\t\t\t\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\t\t\t\t\tslug,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t] );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tonChange( [\n\t\t\t\t\t\t\t\t\t\t...colors,\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tcolor: DEFAULT_COLOR,\n\t\t\t\t\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\t\t\t\t\tslug,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tsetIsEditing( true );\n\t\t\t\t\t\t\t\tsetEditingElement( elements.length );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ hasElements &&\n\t\t\t\t\t\t( ! isEditing ||\n\t\t\t\t\t\t\t! canOnlyChangeValues ||\n\t\t\t\t\t\t\tcanReset ) && (\n\t\t\t\t\t\t\t<DropdownMenu\n\t\t\t\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\tisGradient\n\t\t\t\t\t\t\t\t\t\t? __( 'Gradient options' )\n\t\t\t\t\t\t\t\t\t\t: __( 'Color options' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\ttoggleProps={ {\n\t\t\t\t\t\t\t\t\tsize: 'small',\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ ( { onClose }: { onClose: () => void } ) => (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<NavigableMenu role=\"menu\">\n\t\t\t\t\t\t\t\t\t\t\t{ ! isEditing && (\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetIsEditing( true );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"components-palette-edit__menu-button\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{ __( 'Show details' ) }\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t{ ! canOnlyChangeValues && (\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetEditingElement(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnull\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetIsEditing( false );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"components-palette-edit__menu-button\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{ isGradient\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Remove all gradients'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Remove all colors'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ) }\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t{ canReset && (\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"components-palette-edit__menu-button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetEditingElement(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnull\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{ isGradient\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? __( 'Reset gradient' )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: __( 'Reset colors' ) }\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</NavigableMenu>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</DropdownMenu>\n\t\t\t\t\t\t) }\n\t\t\t\t</PaletteActionsContainer>\n\t\t\t</HStack>\n\t\t\t{ hasElements && (\n\t\t\t\t<PaletteEditContents>\n\t\t\t\t\t{ isEditing && (\n\t\t\t\t\t\t<PaletteEditListView< ( typeof elements )[ number ] >\n\t\t\t\t\t\t\tcanOnlyChangeValues={ canOnlyChangeValues }\n\t\t\t\t\t\t\telements={ elements }\n\t\t\t\t\t\t\t// @ts-expect-error TODO: Don't know how to resolve\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\tslugPrefix={ slugPrefix }\n\t\t\t\t\t\t\tisGradient={ isGradient }\n\t\t\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\t\t\taddColorRef={ addColorRef }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! isEditing && editingElement !== null && (\n\t\t\t\t\t\t<ColorPickerPopover\n\t\t\t\t\t\t\tisGradient={ isGradient }\n\t\t\t\t\t\t\tonClose={ () => setEditingElement( null ) }\n\t\t\t\t\t\t\tonChange={ (\n\t\t\t\t\t\t\t\tnewElement: ( typeof elements )[ number ]\n\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\tdebounceOnChange(\n\t\t\t\t\t\t\t\t\t// @ts-expect-error TODO: Don't know how to resolve\n\t\t\t\t\t\t\t\t\telements.map(\n\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\tcurrentElement: ( typeof elements )[ number ],\n\t\t\t\t\t\t\t\t\t\t\tcurrentIndex: number\n\t\t\t\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\t\tcurrentIndex === editingElement\n\t\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn newElement;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\treturn currentElement;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\telement={ elements[ editingElement ?? -1 ] }\n\t\t\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! isEditing &&\n\t\t\t\t\t\t( isGradient ? (\n\t\t\t\t\t\t\t<GradientPicker\n\t\t\t\t\t\t\t\tgradients={ gradients }\n\t\t\t\t\t\t\t\tonChange={ onSelectPaletteItem }\n\t\t\t\t\t\t\t\tclearable={ false }\n\t\t\t\t\t\t\t\tdisableCustomGradients\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<ColorPalette\n\t\t\t\t\t\t\t\tcolors={ colors }\n\t\t\t\t\t\t\t\tonChange={ onSelectPaletteItem }\n\t\t\t\t\t\t\t\tclearable={ false }\n\t\t\t\t\t\t\t\tdisableCustomColors\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) ) }\n\t\t\t\t</PaletteEditContents>\n\t\t\t) }\n\t\t\t{ ! hasElements && emptyMessage && (\n\t\t\t\t<PaletteEditContents>{ emptyMessage }</PaletteEditContents>\n\t\t\t) }\n\t\t</PaletteEditStyles>\n\t);\n}\n\nexport default PaletteEdit;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst closeSmall = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z\" />\n\t</SVG>\n);\n\nexport default closeSmall;\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { Flex } from '../flex';\nimport { space } from '../utils/space';\nimport type { ComboboxControlProps } from './types';\n\nconst deprecatedDefaultSize = ( {\n\t__next40pxDefaultSize,\n}: Pick< ComboboxControlProps, '__next40pxDefaultSize' > ) =>\n\t! __next40pxDefaultSize &&\n\tcss`\n\t\theight: 28px; // 30px - 2px vertical borders on parent container\n\t\tpadding-left: ${ space( 1 ) };\n\t\tpadding-right: ${ space( 1 ) };\n\t`;\n\nexport const InputWrapperFlex = styled( Flex )`\n\theight: 38px; // 40px - 2px vertical borders on parent container\n\tpadding-left: ${ space( 2 ) };\n\tpadding-right: ${ space( 2 ) };\n\n\t${ deprecatedDefaultSize }\n`;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ChangeEvent, ForwardedRef, FocusEventHandler } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport type { TokenInputProps } from './types';\n\nexport function UnForwardedTokenInput(\n\tprops: WordPressComponentProps< TokenInputProps, 'input', false >,\n\tref: ForwardedRef< HTMLInputElement >\n) {\n\tconst {\n\t\tvalue,\n\t\tisExpanded,\n\t\tinstanceId,\n\t\tselectedSuggestionIndex,\n\t\tclassName,\n\t\tonChange,\n\t\tonFocus,\n\t\tonBlur,\n\t\t...restProps\n\t} = props;\n\n\tconst [ hasFocus, setHasFocus ] = useState( false );\n\n\tconst size = value ? value.length + 1 : 0;\n\n\tconst onChangeHandler = ( event: ChangeEvent< HTMLInputElement > ) => {\n\t\tif ( onChange ) {\n\t\t\tonChange( {\n\t\t\t\tvalue: event.target.value,\n\t\t\t} );\n\t\t}\n\t};\n\n\tconst onFocusHandler: FocusEventHandler< HTMLInputElement > = ( e ) => {\n\t\tsetHasFocus( true );\n\t\tonFocus?.( e );\n\t};\n\n\tconst onBlurHandler: FocusEventHandler< HTMLInputElement > = ( e ) => {\n\t\tsetHasFocus( false );\n\t\tonBlur?.( e );\n\t};\n\n\treturn (\n\t\t<input\n\t\t\tref={ ref }\n\t\t\tid={ `components-form-token-input-${ instanceId }` }\n\t\t\ttype=\"text\"\n\t\t\t{ ...restProps }\n\t\t\tvalue={ value || '' }\n\t\t\tonChange={ onChangeHandler }\n\t\t\tonFocus={ onFocusHandler }\n\t\t\tonBlur={ onBlurHandler }\n\t\t\tsize={ size }\n\t\t\tclassName={ clsx(\n\t\t\t\tclassName,\n\t\t\t\t'components-form-token-field__input'\n\t\t\t) }\n\t\t\tautoComplete=\"off\"\n\t\t\trole=\"combobox\"\n\t\t\taria-expanded={ isExpanded }\n\t\t\taria-autocomplete=\"list\"\n\t\t\taria-owns={\n\t\t\t\tisExpanded\n\t\t\t\t\t? `components-form-token-suggestions-${ instanceId }`\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\taria-activedescendant={\n\t\t\t\t// Only add the `aria-activedescendant` attribute when:\n\t\t\t\t// - the user is actively interacting with the input (`hasFocus`)\n\t\t\t\t// - there is a selected suggestion (`selectedSuggestionIndex !== -1`)\n\t\t\t\t// - the list of suggestions are rendered in the DOM (`isExpanded`)\n\t\t\t\thasFocus && selectedSuggestionIndex !== -1 && isExpanded\n\t\t\t\t\t? `components-form-token-suggestions-${ instanceId }-${ selectedSuggestionIndex }`\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\taria-describedby={ `components-form-token-suggestions-howto-${ instanceId }` }\n\t\t/>\n\t);\n}\n\nexport const TokenInput = forwardRef( UnForwardedTokenInput );\n\nexport default TokenInput;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { MouseEventHandler, ReactNode } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useRefEffect } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { SuggestionsListProps } from './types';\n\nconst handleMouseDown: MouseEventHandler = ( e ) => {\n\t// By preventing default here, we will not lose focus of <input> when clicking a suggestion.\n\te.preventDefault();\n};\n\nexport function SuggestionsList<\n\tT extends string | { value: string; disabled?: boolean },\n>( {\n\tselectedIndex,\n\tscrollIntoView,\n\tmatch,\n\tonHover,\n\tonSelect,\n\tsuggestions = [],\n\tdisplayTransform,\n\tinstanceId,\n\t__experimentalRenderItem,\n}: SuggestionsListProps< T > ) {\n\tconst listRef = useRefEffect< HTMLUListElement >(\n\t\t( listNode ) => {\n\t\t\t// only have to worry about scrolling selected suggestion into view\n\t\t\t// when already expanded.\n\t\t\tlet rafId: number | undefined;\n\t\t\tif (\n\t\t\t\tselectedIndex > -1 &&\n\t\t\t\tscrollIntoView &&\n\t\t\t\tlistNode.children[ selectedIndex ]\n\t\t\t) {\n\t\t\t\tlistNode.children[ selectedIndex ].scrollIntoView( {\n\t\t\t\t\tbehavior: 'instant',\n\t\t\t\t\tblock: 'nearest',\n\t\t\t\t\tinline: 'nearest',\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn () => {\n\t\t\t\tif ( rafId !== undefined ) {\n\t\t\t\t\tcancelAnimationFrame( rafId );\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t\t[ selectedIndex, scrollIntoView ]\n\t);\n\n\tconst handleHover = ( suggestion: T ) => {\n\t\treturn () => {\n\t\t\tonHover?.( suggestion );\n\t\t};\n\t};\n\n\tconst handleClick = ( suggestion: T ) => {\n\t\treturn () => {\n\t\t\tonSelect?.( suggestion );\n\t\t};\n\t};\n\n\tconst computeSuggestionMatch = ( suggestion: T ) => {\n\t\tconst matchText = displayTransform( match ).toLocaleLowerCase();\n\t\tif ( matchText.length === 0 ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst transformedSuggestion = displayTransform( suggestion );\n\t\tconst indexOfMatch = transformedSuggestion\n\t\t\t.toLocaleLowerCase()\n\t\t\t.indexOf( matchText );\n\n\t\treturn {\n\t\t\tsuggestionBeforeMatch: transformedSuggestion.substring(\n\t\t\t\t0,\n\t\t\t\tindexOfMatch\n\t\t\t),\n\t\t\tsuggestionMatch: transformedSuggestion.substring(\n\t\t\t\tindexOfMatch,\n\t\t\t\tindexOfMatch + matchText.length\n\t\t\t),\n\t\t\tsuggestionAfterMatch: transformedSuggestion.substring(\n\t\t\t\tindexOfMatch + matchText.length\n\t\t\t),\n\t\t};\n\t};\n\n\treturn (\n\t\t<ul\n\t\t\tref={ listRef }\n\t\t\tclassName=\"components-form-token-field__suggestions-list\"\n\t\t\tid={ `components-form-token-suggestions-${ instanceId }` }\n\t\t\trole=\"listbox\"\n\t\t>\n\t\t\t{ suggestions.map( ( suggestion, index ) => {\n\t\t\t\tconst matchText = computeSuggestionMatch( suggestion );\n\t\t\t\tconst isSelected = index === selectedIndex;\n\t\t\t\tconst isDisabled =\n\t\t\t\t\ttypeof suggestion === 'object' && suggestion?.disabled;\n\t\t\t\tconst key =\n\t\t\t\t\ttypeof suggestion === 'object' && 'value' in suggestion\n\t\t\t\t\t\t? suggestion?.value\n\t\t\t\t\t\t: displayTransform( suggestion );\n\n\t\t\t\tconst className = clsx(\n\t\t\t\t\t'components-form-token-field__suggestion',\n\t\t\t\t\t{\n\t\t\t\t\t\t'is-selected': isSelected,\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\tlet output: ReactNode;\n\n\t\t\t\tif ( typeof __experimentalRenderItem === 'function' ) {\n\t\t\t\t\toutput = __experimentalRenderItem( { item: suggestion } );\n\t\t\t\t} else if ( matchText ) {\n\t\t\t\t\toutput = (\n\t\t\t\t\t\t<span aria-label={ displayTransform( suggestion ) }>\n\t\t\t\t\t\t\t{ matchText.suggestionBeforeMatch }\n\t\t\t\t\t\t\t<strong className=\"components-form-token-field__suggestion-match\">\n\t\t\t\t\t\t\t\t{ matchText.suggestionMatch }\n\t\t\t\t\t\t\t</strong>\n\t\t\t\t\t\t\t{ matchText.suggestionAfterMatch }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\toutput = displayTransform( suggestion );\n\t\t\t\t}\n\n\t\t\t\t/* eslint-disable jsx-a11y/click-events-have-key-events */\n\t\t\t\treturn (\n\t\t\t\t\t<li\n\t\t\t\t\t\tid={ `components-form-token-suggestions-${ instanceId }-${ index }` }\n\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\tkey={ key }\n\t\t\t\t\t\tonMouseDown={ handleMouseDown }\n\t\t\t\t\t\tonClick={ handleClick( suggestion ) }\n\t\t\t\t\t\tonMouseEnter={ handleHover( suggestion ) }\n\t\t\t\t\t\taria-selected={ index === selectedIndex }\n\t\t\t\t\t\taria-disabled={ isDisabled }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ output }\n\t\t\t\t\t</li>\n\t\t\t\t);\n\t\t\t\t/* eslint-enable jsx-a11y/click-events-have-key-events */\n\t\t\t} ) }\n\t\t\t{ suggestions.length === 0 && (\n\t\t\t\t<li className=\"components-form-token-field__suggestion is-empty\">\n\t\t\t\t\t{ __( 'No items found' ) }\n\t\t\t\t</li>\n\t\t\t) }\n\t\t</ul>\n\t);\n}\n\nexport default SuggestionsList;\n","/**\n * WordPress dependencies\n */\nimport { useCallback, useState } from '@wordpress/element';\nimport {\n\tcreateHigherOrderComponent,\n\t__experimentalUseFocusOutside as useFocusOutside,\n} from '@wordpress/compose';\n\nexport default createHigherOrderComponent(\n\t( WrappedComponent ) => ( props ) => {\n\t\tconst [ handleFocusOutside, setHandleFocusOutside ] = useState<\n\t\t\tundefined | ( ( event: React.FocusEvent ) => void )\n\t\t>( undefined );\n\n\t\tconst bindFocusOutsideHandler = useCallback<\n\t\t\t( node: React.FocusEvent ) => void\n\t\t>(\n\t\t\t( node: any ) =>\n\t\t\t\tsetHandleFocusOutside( () =>\n\t\t\t\t\tnode?.handleFocusOutside\n\t\t\t\t\t\t? node.handleFocusOutside.bind( node )\n\t\t\t\t\t\t: undefined\n\t\t\t\t),\n\t\t\t[]\n\t\t);\n\n\t\treturn (\n\t\t\t<div { ...useFocusOutside( handleFocusOutside ) }>\n\t\t\t\t<WrappedComponent\n\t\t\t\t\tref={ bindFocusOutsideHandler }\n\t\t\t\t\t{ ...props }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t},\n\t'withFocusOutside'\n);\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport {\n\tComponent,\n\tuseState,\n\tuseMemo,\n\tuseRef,\n\tuseEffect,\n} from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\nimport { closeSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { InputWrapperFlex } from './styles';\nimport TokenInput from '../form-token-field/token-input';\nimport SuggestionsList from '../form-token-field/suggestions-list';\nimport BaseControl from '../base-control';\nimport Button from '../button';\nimport { FlexBlock } from '../flex';\nimport withFocusOutside from '../higher-order/with-focus-outside';\nimport { useControlledValue } from '../utils/hooks';\nimport { normalizeTextString } from '../utils/strings';\nimport type { ComboboxControlOption, ComboboxControlProps } from './types';\nimport type { TokenInputProps } from '../form-token-field/types';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\n\nconst noop = () => {};\n\ninterface DetectOutsideComponentProps {\n\tonFocusOutside: ( event: React.FocusEvent ) => void;\n\tchildren?: React.ReactNode;\n}\n\nconst DetectOutside = withFocusOutside(\n\tclass extends Component< DetectOutsideComponentProps > {\n\t\thandleFocusOutside( event: React.FocusEvent ) {\n\t\t\tthis.props.onFocusOutside( event );\n\t\t}\n\n\t\trender() {\n\t\t\treturn this.props.children;\n\t\t}\n\t}\n);\n\nconst getIndexOfMatchingSuggestion = (\n\tselectedSuggestion: ComboboxControlOption | null,\n\tmatchingSuggestions: ComboboxControlOption[]\n) =>\n\tselectedSuggestion === null\n\t\t? -1\n\t\t: matchingSuggestions.indexOf( selectedSuggestion );\n\n/**\n * `ComboboxControl` is an enhanced version of a [`SelectControl`](../select-control/README.md) with the addition of\n * being able to search for options using a search input.\n *\n * ```jsx\n * import { ComboboxControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const options = [\n * \t{\n * \t\tvalue: 'small',\n * \t\tlabel: 'Small',\n * \t},\n * \t{\n * \t\tvalue: 'normal',\n * \t\tlabel: 'Normal',\n * \t\tdisabled: true,\n * \t},\n * \t{\n * \t\tvalue: 'large',\n * \t\tlabel: 'Large',\n * \t\tdisabled: false,\n * \t},\n * ];\n *\n * function MyComboboxControl() {\n * \tconst [ fontSize, setFontSize ] = useState();\n * \tconst [ filteredOptions, setFilteredOptions ] = useState( options );\n * \treturn (\n * \t\t<ComboboxControl\n * \t\t\t__next40pxDefaultSize\n * \t\t\t__nextHasNoMarginBottom\n * \t\t\tlabel=\"Font Size\"\n * \t\t\tvalue={ fontSize }\n * \t\t\tonChange={ setFontSize }\n * \t\t\toptions={ filteredOptions }\n * \t\t\tonFilterValueChange={ ( inputValue ) =>\n * \t\t\t\tsetFilteredOptions(\n * \t\t\t\t\toptions.filter( ( option ) =>\n * \t\t\t\t\t\toption.label\n * \t\t\t\t\t\t\t.toLowerCase()\n * \t\t\t\t\t\t\t.startsWith( inputValue.toLowerCase() )\n * \t\t\t\t\t)\n * \t\t\t\t)\n * \t\t\t}\n * \t\t/>\n * \t);\n * }\n * ```\n */\nfunction ComboboxControl( props: ComboboxControlProps ) {\n\tconst {\n\t\t__nextHasNoMarginBottom = false,\n\t\t__next40pxDefaultSize = false,\n\t\tvalue: valueProp,\n\t\tlabel,\n\t\toptions,\n\t\tonChange: onChangeProp,\n\t\tonFilterValueChange = noop,\n\t\thideLabelFromVision,\n\t\thelp,\n\t\tallowReset = true,\n\t\tclassName,\n\t\tmessages = {\n\t\t\tselected: __( 'Item selected.' ),\n\t\t},\n\t\t__experimentalRenderItem,\n\t\texpandOnFocus = true,\n\t\tplaceholder,\n\t} = useDeprecated36pxDefaultSizeProp( props );\n\n\tconst [ value, setValue ] = useControlledValue( {\n\t\tvalue: valueProp,\n\t\tonChange: onChangeProp,\n\t} );\n\n\tconst currentOption = options.find( ( option ) => option.value === value );\n\tconst currentLabel = currentOption?.label ?? '';\n\t// Use a custom prefix when generating the `instanceId` to avoid having\n\t// duplicate input IDs when rendering this component and `FormTokenField`\n\t// in the same page (see https://github.com/WordPress/gutenberg/issues/42112).\n\tconst instanceId = useInstanceId( ComboboxControl, 'combobox-control' );\n\tconst [ selectedSuggestion, setSelectedSuggestion ] = useState(\n\t\tcurrentOption || null\n\t);\n\tconst [ isExpanded, setIsExpanded ] = useState( false );\n\tconst [ inputHasFocus, setInputHasFocus ] = useState( false );\n\tconst [ inputValue, setInputValue ] = useState( '' );\n\tconst inputContainer = useRef< HTMLInputElement >( null );\n\n\tconst matchingSuggestions = useMemo( () => {\n\t\tconst startsWithMatch: ComboboxControlOption[] = [];\n\t\tconst containsMatch: ComboboxControlOption[] = [];\n\t\tconst match = normalizeTextString( inputValue );\n\t\toptions.forEach( ( option ) => {\n\t\t\tconst index = normalizeTextString( option.label ).indexOf( match );\n\t\t\tif ( index === 0 ) {\n\t\t\t\tstartsWithMatch.push( option );\n\t\t\t} else if ( index > 0 ) {\n\t\t\t\tcontainsMatch.push( option );\n\t\t\t}\n\t\t} );\n\n\t\treturn startsWithMatch.concat( containsMatch );\n\t}, [ inputValue, options ] );\n\n\tconst onSuggestionSelected = (\n\t\tnewSelectedSuggestion: ComboboxControlOption\n\t) => {\n\t\tif ( newSelectedSuggestion.disabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetValue( newSelectedSuggestion.value );\n\t\tspeak( messages.selected, 'assertive' );\n\t\tsetSelectedSuggestion( newSelectedSuggestion );\n\t\tsetInputValue( '' );\n\t\tsetIsExpanded( false );\n\t};\n\n\tconst handleArrowNavigation = ( offset = 1 ) => {\n\t\tconst index = getIndexOfMatchingSuggestion(\n\t\t\tselectedSuggestion,\n\t\t\tmatchingSuggestions\n\t\t);\n\t\tlet nextIndex = index + offset;\n\t\tif ( nextIndex < 0 ) {\n\t\t\tnextIndex = matchingSuggestions.length - 1;\n\t\t} else if ( nextIndex >= matchingSuggestions.length ) {\n\t\t\tnextIndex = 0;\n\t\t}\n\t\tsetSelectedSuggestion( matchingSuggestions[ nextIndex ] );\n\t\tsetIsExpanded( true );\n\t};\n\n\tconst onKeyDown: React.KeyboardEventHandler< HTMLDivElement > =\n\t\twithIgnoreIMEEvents( ( event ) => {\n\t\t\tlet preventDefault = false;\n\n\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tswitch ( event.code ) {\n\t\t\t\tcase 'Enter':\n\t\t\t\t\tif ( selectedSuggestion ) {\n\t\t\t\t\t\tonSuggestionSelected( selectedSuggestion );\n\t\t\t\t\t\tpreventDefault = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ArrowUp':\n\t\t\t\t\thandleArrowNavigation( -1 );\n\t\t\t\t\tpreventDefault = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ArrowDown':\n\t\t\t\t\thandleArrowNavigation( 1 );\n\t\t\t\t\tpreventDefault = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Escape':\n\t\t\t\t\tsetIsExpanded( false );\n\t\t\t\t\tsetSelectedSuggestion( null );\n\t\t\t\t\tpreventDefault = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif ( preventDefault ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t} );\n\n\tconst onBlur = () => {\n\t\tsetInputHasFocus( false );\n\t};\n\n\tconst onFocus = () => {\n\t\tsetInputHasFocus( true );\n\t\tif ( expandOnFocus ) {\n\t\t\tsetIsExpanded( true );\n\t\t}\n\n\t\tonFilterValueChange( '' );\n\t\tsetInputValue( '' );\n\t};\n\n\tconst onClick = () => {\n\t\tsetIsExpanded( true );\n\t};\n\n\tconst onFocusOutside = () => {\n\t\tsetIsExpanded( false );\n\t};\n\n\tconst onInputChange: TokenInputProps[ 'onChange' ] = ( event ) => {\n\t\tconst text = event.value;\n\t\tsetInputValue( text );\n\t\tonFilterValueChange( text );\n\t\tif ( inputHasFocus ) {\n\t\t\tsetIsExpanded( true );\n\t\t}\n\t};\n\n\tconst handleOnReset = () => {\n\t\tsetValue( null );\n\t\tinputContainer.current?.focus();\n\t};\n\n\t// Stop propagation of the keydown event when pressing Enter on the Reset\n\t// button to prevent calling the onKeydown callback on the container div\n\t// element which actually sets the selected suggestion.\n\tconst handleResetStopPropagation: React.KeyboardEventHandler<\n\t\tHTMLButtonElement\n\t> = ( event ) => {\n\t\tevent.stopPropagation();\n\t};\n\n\t// Update current selections when the filter input changes.\n\tuseEffect( () => {\n\t\tconst hasMatchingSuggestions = matchingSuggestions.length > 0;\n\t\tconst hasSelectedMatchingSuggestions =\n\t\t\tgetIndexOfMatchingSuggestion(\n\t\t\t\tselectedSuggestion,\n\t\t\t\tmatchingSuggestions\n\t\t\t) > 0;\n\n\t\tif ( hasMatchingSuggestions && ! hasSelectedMatchingSuggestions ) {\n\t\t\t// If the current selection isn't present in the list of suggestions, then automatically select the first item from the list of suggestions.\n\t\t\tsetSelectedSuggestion( matchingSuggestions[ 0 ] );\n\t\t}\n\t}, [ matchingSuggestions, selectedSuggestion ] );\n\n\t// Announcements.\n\tuseEffect( () => {\n\t\tconst hasMatchingSuggestions = matchingSuggestions.length > 0;\n\t\tif ( isExpanded ) {\n\t\t\tconst message = hasMatchingSuggestions\n\t\t\t\t? sprintf(\n\t\t\t\t\t\t/* translators: %d: number of results. */\n\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t'%d result found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t'%d results found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\tmatchingSuggestions.length\n\t\t\t\t\t\t),\n\t\t\t\t\t\tmatchingSuggestions.length\n\t\t\t\t )\n\t\t\t\t: __( 'No results.' );\n\n\t\t\tspeak( message, 'polite' );\n\t\t}\n\t}, [ matchingSuggestions, isExpanded ] );\n\n\tmaybeWarnDeprecated36pxSize( {\n\t\tcomponentName: 'ComboboxControl',\n\t\t__next40pxDefaultSize,\n\t\tsize: undefined,\n\t} );\n\n\t// Disable reason: There is no appropriate role which describes the\n\t// input container intended accessible usability.\n\t// TODO: Refactor click detection to use blur to stop propagation.\n\t/* eslint-disable jsx-a11y/no-static-element-interactions */\n\treturn (\n\t\t<DetectOutside onFocusOutside={ onFocusOutside }>\n\t\t\t<BaseControl\n\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t\t__associatedWPComponentName=\"ComboboxControl\"\n\t\t\t\tclassName={ clsx( className, 'components-combobox-control' ) }\n\t\t\t\tlabel={ label }\n\t\t\t\tid={ `components-form-token-input-${ instanceId }` }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\thelp={ help }\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"components-combobox-control__suggestions-container\"\n\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\t>\n\t\t\t\t\t<InputWrapperFlex\n\t\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\t>\n\t\t\t\t\t\t<FlexBlock>\n\t\t\t\t\t\t\t<TokenInput\n\t\t\t\t\t\t\t\tclassName=\"components-combobox-control__input\"\n\t\t\t\t\t\t\t\tinstanceId={ instanceId }\n\t\t\t\t\t\t\t\tref={ inputContainer }\n\t\t\t\t\t\t\t\tplaceholder={ placeholder }\n\t\t\t\t\t\t\t\tvalue={ isExpanded ? inputValue : currentLabel }\n\t\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\t\tonBlur={ onBlur }\n\t\t\t\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t\t\t\tisExpanded={ isExpanded }\n\t\t\t\t\t\t\t\tselectedSuggestionIndex={ getIndexOfMatchingSuggestion(\n\t\t\t\t\t\t\t\t\tselectedSuggestion,\n\t\t\t\t\t\t\t\t\tmatchingSuggestions\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tonChange={ onInputChange }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</FlexBlock>\n\t\t\t\t\t\t{ allowReset && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\t\t\t// Disable reason: Focus returns to input field when reset is clicked.\n\t\t\t\t\t\t\t\t// eslint-disable-next-line no-restricted-syntax\n\t\t\t\t\t\t\t\tdisabled={ ! value }\n\t\t\t\t\t\t\t\tonClick={ handleOnReset }\n\t\t\t\t\t\t\t\tonKeyDown={ handleResetStopPropagation }\n\t\t\t\t\t\t\t\tlabel={ __( 'Reset' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</InputWrapperFlex>\n\t\t\t\t\t{ isExpanded && (\n\t\t\t\t\t\t<SuggestionsList\n\t\t\t\t\t\t\tinstanceId={ instanceId }\n\t\t\t\t\t\t\t// The empty string for `value` here is not actually used, but is\n\t\t\t\t\t\t\t// just a quick way to satisfy the TypeScript requirements of SuggestionsList.\n\t\t\t\t\t\t\t// See: https://github.com/WordPress/gutenberg/pull/47581/files#r1091089330\n\t\t\t\t\t\t\tmatch={ { label: inputValue, value: '' } }\n\t\t\t\t\t\t\tdisplayTransform={ ( suggestion ) =>\n\t\t\t\t\t\t\t\tsuggestion.label\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsuggestions={ matchingSuggestions }\n\t\t\t\t\t\t\tselectedIndex={ getIndexOfMatchingSuggestion(\n\t\t\t\t\t\t\t\tselectedSuggestion,\n\t\t\t\t\t\t\t\tmatchingSuggestions\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonHover={ setSelectedSuggestion }\n\t\t\t\t\t\t\tonSelect={ onSuggestionSelected }\n\t\t\t\t\t\t\tscrollIntoView\n\t\t\t\t\t\t\t__experimentalRenderItem={\n\t\t\t\t\t\t\t\t__experimentalRenderItem\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</BaseControl>\n\t\t</DetectOutside>\n\t);\n\t/* eslint-enable jsx-a11y/no-static-element-interactions */\n}\n\nexport default ComboboxControl;\n","/**\n * Composite is a component that may contain navigable items represented by\n * CompositeItem. It's inspired by the WAI-ARIA Composite Role and implements\n * all the keyboard navigation mechanisms to ensure that there's only one\n * tab stop for the whole Composite element. This means that it can behave as\n * a roving tabindex or aria-activedescendant container.\n *\n * This file aims at providing components that are as close as possible to the\n * original `reakit`-based implementation (which was removed from the codebase),\n * although it is recommended that consumers of the package switch to the stable,\n * un-prefixed, `ariakit`-based version of `Composite`.\n *\n * @see https://ariakit.org/components/composite\n */\n\n/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { Composite as Current } from '..';\n\ntype Orientation = 'horizontal' | 'vertical';\n\nexport interface LegacyStateOptions {\n\t/**\n\t * ID that will serve as a base for all the items IDs.\n\t */\n\tbaseId?: string;\n\t/**\n\t * Determines how next and previous functions will behave. If `rtl` is set\n\t * to `true`, they will be inverted. This only affects the composite widget\n\t * behavior. You still need to set `dir=\"rtl\"` on HTML/CSS.\n\t *\n\t * @default false\n\t */\n\trtl?: boolean;\n\t/**\n\t * Defines the orientation of the composite widget. If the composite has a\n\t * single row or column (one-dimensional), the orientation value determines\n\t * which arrow keys can be used to move focus.\n\t */\n\torientation?: Orientation;\n\t/**\n\t * The current focused item `id`.\n\t */\n\tcurrentId?: string;\n\t/**\n\t * Determines how focus moves from the start and end of rows and columns.\n\t *\n\t * @default false\n\t */\n\tloop?: boolean | Orientation;\n\t/**\n\t * If enabled, moving to the next item from the last one in a row or column\n\t * will focus the first item in the next row or column and vice-versa.\n\t *\n\t * ** Has effect only on two-dimensional composites. **\n\t *\n\t * @default false\n\t */\n\twrap?: boolean | Orientation;\n\t/**\n\t * If enabled, moving up or down when there's no next item or the next item\n\t * is disabled will shift to the item right before it.\n\t *\n\t * ** Has effect only on two-dimensional composites. **\n\t *\n\t * @default false\n\t */\n\tshift?: boolean;\n\tunstable_virtual?: boolean;\n}\n\ntype Component = React.FunctionComponent< any >;\n\ntype CompositeStore = ReturnType< typeof Ariakit.useCompositeStore >;\ntype CompositeStoreState = { store: CompositeStore };\nexport type CompositeState = CompositeStoreState &\n\tRequired< Pick< LegacyStateOptions, 'baseId' > >;\n\n// Legacy composite components can either provide state through a\n// single `state` prop, or via individual props, usually through\n// spreading the state generated by `useCompositeState`.\n// That is, `<Composite* { ...state }>`.\nexport type CompositeStateProps =\n\t| { state: CompositeState }\n\t| ( CompositeState & { state?: never } );\ntype ComponentProps< C extends Component > = React.ComponentPropsWithRef< C >;\nexport type CompositeProps< C extends Component > = ComponentProps< C > &\n\tCompositeStateProps;\ntype CompositeComponent< C extends Component > = (\n\tprops: CompositeProps< C >\n) => React.ReactElement;\ntype CompositeComponentProps = CompositeState &\n\t(\n\t\t| ComponentProps< typeof Current.Group >\n\t\t| ComponentProps< typeof Current.Item >\n\t\t| ComponentProps< typeof Current.Row >\n\t);\n\nfunction mapLegacyStatePropsToComponentProps(\n\tlegacyProps: CompositeStateProps\n): CompositeComponentProps {\n\t// If a `state` prop is provided, we unpack that; otherwise,\n\t// the necessary props are provided directly in `legacyProps`.\n\tif ( legacyProps.state ) {\n\t\tconst { state, ...rest } = legacyProps;\n\t\tconst { store, ...props } =\n\t\t\tmapLegacyStatePropsToComponentProps( state );\n\t\treturn { ...rest, ...props, store };\n\t}\n\n\treturn legacyProps;\n}\n\nconst LEGACY_TO_NEW_DISPLAY_NAME = {\n\t__unstableComposite: 'Composite',\n\t__unstableCompositeGroup: 'Composite.Group or Composite.Row',\n\t__unstableCompositeItem: 'Composite.Item',\n\t__unstableUseCompositeState: 'Composite',\n};\n\nfunction proxyComposite< C extends Component >(\n\tProxiedComponent: C | React.ForwardRefExoticComponent< C >,\n\tpropMap: Record< string, string > = {}\n): CompositeComponent< C > {\n\tconst displayName = ProxiedComponent.displayName ?? '';\n\n\tconst Component = ( legacyProps: CompositeStateProps ) => {\n\t\tdeprecated( `wp.components.${ displayName }`, {\n\t\t\tsince: '6.7',\n\t\t\talternative: LEGACY_TO_NEW_DISPLAY_NAME.hasOwnProperty(\n\t\t\t\tdisplayName\n\t\t\t)\n\t\t\t\t? LEGACY_TO_NEW_DISPLAY_NAME[\n\t\t\t\t\t\tdisplayName as keyof typeof LEGACY_TO_NEW_DISPLAY_NAME\n\t\t\t\t ]\n\t\t\t\t: undefined,\n\t\t} );\n\n\t\tconst { store, ...rest } =\n\t\t\tmapLegacyStatePropsToComponentProps( legacyProps );\n\t\tlet props = rest as ComponentProps< C >;\n\t\tprops = {\n\t\t\t...props,\n\t\t\tid: useInstanceId( store, props.baseId, props.id ),\n\t\t};\n\n\t\tObject.entries( propMap ).forEach( ( [ from, to ] ) => {\n\t\t\tif ( props.hasOwnProperty( from ) ) {\n\t\t\t\tObject.assign( props, { [ to ]: props[ from ] } );\n\t\t\t\tdelete props[ from ];\n\t\t\t}\n\t\t} );\n\n\t\tdelete props.baseId;\n\n\t\treturn <ProxiedComponent { ...props } store={ store } />;\n\t};\n\tComponent.displayName = displayName;\n\treturn Component;\n}\n\n// The old `CompositeGroup` used to behave more like the current\n// `CompositeRow`, but this has been split into two different\n// components. We handle that difference by checking on the\n// provided role, and returning the appropriate component.\nconst UnproxiedCompositeGroup = forwardRef<\n\tany,\n\tReact.ComponentPropsWithoutRef< typeof Current.Group | typeof Current.Row >\n>( ( { role, ...props }, ref ) => {\n\tconst Component = role === 'row' ? Current.Row : Current.Group;\n\treturn <Component ref={ ref } role={ role } { ...props } />;\n} );\n\n/**\n * _Note: please use the `Composite` component instead._\n *\n * @deprecated\n */\nexport const Composite = proxyComposite(\n\tObject.assign( Current, { displayName: '__unstableComposite' } ),\n\t{ baseId: 'id' }\n);\n/**\n * _Note: please use the `Composite.Row` or `Composite.Group` components instead._\n *\n * @deprecated\n */\nexport const CompositeGroup = proxyComposite(\n\tObject.assign( UnproxiedCompositeGroup, {\n\t\tdisplayName: '__unstableCompositeGroup',\n\t} )\n);\n/**\n * _Note: please use the `Composite.Item` component instead._\n *\n * @deprecated\n */\nexport const CompositeItem = proxyComposite(\n\tObject.assign( Current.Item, {\n\t\tdisplayName: '__unstableCompositeItem',\n\t} ),\n\t{\n\t\tfocusable: 'accessibleWhenDisabled',\n\t}\n);\n\n/**\n * _Note: please use the `Composite` component instead._\n *\n * @deprecated\n */\nexport function useCompositeState(\n\tlegacyStateOptions: LegacyStateOptions = {}\n): CompositeState {\n\tdeprecated( `wp.components.__unstableUseCompositeState`, {\n\t\tsince: '6.7',\n\t\talternative: LEGACY_TO_NEW_DISPLAY_NAME.__unstableUseCompositeState,\n\t} );\n\n\tconst {\n\t\tbaseId,\n\t\tcurrentId: defaultActiveId,\n\t\torientation,\n\t\trtl = false,\n\t\tloop: focusLoop = false,\n\t\twrap: focusWrap = false,\n\t\tshift: focusShift = false,\n\t\t// eslint-disable-next-line camelcase\n\t\tunstable_virtual: virtualFocus,\n\t} = legacyStateOptions;\n\n\treturn {\n\t\tbaseId: useInstanceId( Composite, 'composite', baseId ),\n\t\tstore: Ariakit.useCompositeStore( {\n\t\t\tdefaultActiveId,\n\t\t\trtl,\n\t\t\torientation,\n\t\t\tfocusLoop,\n\t\t\tfocusShift,\n\t\t\tfocusWrap,\n\t\t\tvirtualFocus,\n\t\t} ),\n\t};\n}\n","const LIVE_REGION_ARIA_ROLES = new Set( [\n\t'alert',\n\t'status',\n\t'log',\n\t'marquee',\n\t'timer',\n] );\n\nconst hiddenElementsByDepth: Element[][] = [];\n\n/**\n * Hides all elements in the body element from screen-readers except\n * the provided element and elements that should not be hidden from\n * screen-readers.\n *\n * The reason we do this is because `aria-modal=\"true\"` currently is bugged\n * in Safari, and support is spotty in other browsers overall. In the future\n * we should consider removing these helper functions in favor of\n * `aria-modal=\"true\"`.\n *\n * @param modalElement The element that should not be hidden.\n */\nexport function modalize( modalElement?: HTMLDivElement ) {\n\tconst elements = Array.from( document.body.children );\n\tconst hiddenElements: Element[] = [];\n\thiddenElementsByDepth.push( hiddenElements );\n\tfor ( const element of elements ) {\n\t\tif ( element === modalElement ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif ( elementShouldBeHidden( element ) ) {\n\t\t\telement.setAttribute( 'aria-hidden', 'true' );\n\t\t\thiddenElements.push( element );\n\t\t}\n\t}\n}\n\n/**\n * Determines if the passed element should not be hidden from screen readers.\n *\n * @param element The element that should be checked.\n *\n * @return Whether the element should not be hidden from screen-readers.\n */\nexport function elementShouldBeHidden( element: Element ) {\n\tconst role = element.getAttribute( 'role' );\n\treturn ! (\n\t\telement.tagName === 'SCRIPT' ||\n\t\telement.hasAttribute( 'hidden' ) ||\n\t\telement.hasAttribute( 'aria-hidden' ) ||\n\t\telement.hasAttribute( 'aria-live' ) ||\n\t\t( role && LIVE_REGION_ARIA_ROLES.has( role ) )\n\t);\n}\n\n/**\n * Accessibly reveals the elements hidden by the latest modal.\n */\nexport function unmodalize() {\n\tconst hiddenElements = hiddenElementsByDepth.pop();\n\tif ( ! hiddenElements ) {\n\t\treturn;\n\t}\n\n\tfor ( const element of hiddenElements ) {\n\t\telement.removeAttribute( 'aria-hidden' );\n\t}\n}\n","/**\n * WordPress dependencies\n */\nimport { useReducedMotion } from '@wordpress/compose';\nimport { useCallback, useRef, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { CONFIG } from '../utils';\nimport warning from '@wordpress/warning';\n\n// Animation duration (ms) extracted to JS in order to be used on a setTimeout.\nconst FRAME_ANIMATION_DURATION = CONFIG.transitionDuration;\nconst FRAME_ANIMATION_DURATION_NUMBER = Number.parseInt(\n\tCONFIG.transitionDuration\n);\n\nconst EXIT_ANIMATION_NAME = 'components-modal__disappear-animation';\n\nexport function useModalExitAnimation() {\n\tconst frameRef = useRef< HTMLDivElement >();\n\tconst [ isAnimatingOut, setIsAnimatingOut ] = useState( false );\n\tconst isReducedMotion = useReducedMotion();\n\n\tconst closeModal = useCallback(\n\t\t() =>\n\t\t\tnew Promise< void >( ( closeModalResolve ) => {\n\t\t\t\t// Grab a \"stable\" reference of the frame element, since\n\t\t\t\t// the value held by the react ref might change at runtime.\n\t\t\t\tconst frameEl = frameRef.current;\n\n\t\t\t\tif ( isReducedMotion ) {\n\t\t\t\t\tcloseModalResolve();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( ! frameEl ) {\n\t\t\t\t\twarning(\n\t\t\t\t\t\t\"wp.components.Modal: the Modal component can't be closed with an exit animation because of a missing reference to the modal frame element.\"\n\t\t\t\t\t);\n\t\t\t\t\tcloseModalResolve();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tlet handleAnimationEnd:\n\t\t\t\t\t| undefined\n\t\t\t\t\t| ( ( e: AnimationEvent ) => void );\n\n\t\t\t\tconst startAnimation = () =>\n\t\t\t\t\tnew Promise< void >( ( animationResolve ) => {\n\t\t\t\t\t\thandleAnimationEnd = ( e: AnimationEvent ) => {\n\t\t\t\t\t\t\tif ( e.animationName === EXIT_ANIMATION_NAME ) {\n\t\t\t\t\t\t\t\tanimationResolve();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tframeEl.addEventListener(\n\t\t\t\t\t\t\t'animationend',\n\t\t\t\t\t\t\thandleAnimationEnd\n\t\t\t\t\t\t);\n\t\t\t\t\t\tsetIsAnimatingOut( true );\n\t\t\t\t\t} );\n\t\t\t\tconst animationTimeout = () =>\n\t\t\t\t\tnew Promise< void >( ( timeoutResolve ) => {\n\t\t\t\t\t\tsetTimeout(\n\t\t\t\t\t\t\t() => timeoutResolve(),\n\t\t\t\t\t\t\t// Allow an extra 20% of the animation duration for the\n\t\t\t\t\t\t\t// animationend event to fire, in case the animation frame is\n\t\t\t\t\t\t\t// slightly delayes by some other events in the event loop.\n\t\t\t\t\t\t\tFRAME_ANIMATION_DURATION_NUMBER * 1.2\n\t\t\t\t\t\t);\n\t\t\t\t\t} );\n\n\t\t\t\tPromise.race( [ startAnimation(), animationTimeout() ] ).then(\n\t\t\t\t\t() => {\n\t\t\t\t\t\tif ( handleAnimationEnd ) {\n\t\t\t\t\t\t\tframeEl.removeEventListener(\n\t\t\t\t\t\t\t\t'animationend',\n\t\t\t\t\t\t\t\thandleAnimationEnd\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsetIsAnimatingOut( false );\n\t\t\t\t\t\tcloseModalResolve();\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t} ),\n\t\t[ isReducedMotion ]\n\t);\n\n\treturn {\n\t\toverlayClassname: isAnimatingOut ? 'is-animating-out' : undefined,\n\t\tframeRef,\n\t\tframeStyle: {\n\t\t\t'--modal-frame-animation-duration': `${ FRAME_ANIMATION_DURATION }`,\n\t\t},\n\t\tcloseModal,\n\t};\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tcreatePortal,\n\tuseCallback,\n\tuseEffect,\n\tuseRef,\n\tuseState,\n\tforwardRef,\n\tuseLayoutEffect,\n\tcreateContext,\n\tuseContext,\n} from '@wordpress/element';\nimport {\n\tuseInstanceId,\n\tuseFocusReturn,\n\tuseFocusOnMount,\n\tuseConstrainedTabbing,\n\tuseMergeRefs,\n} from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { close } from '@wordpress/icons';\nimport { getScrollContainer } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport * as ariaHelper from './aria-helper';\nimport Button from '../button';\nimport StyleProvider from '../style-provider';\nimport type { ModalProps } from './types';\nimport { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';\nimport { Spacer } from '../spacer';\nimport { useModalExitAnimation } from './use-modal-exit-animation';\n\n// Used to track and dismiss the prior modal when another opens unless nested.\ntype Dismissers = Set<\n\tReact.RefObject< ModalProps[ 'onRequestClose' ] | undefined >\n>;\nconst ModalContext = createContext< Dismissers >( new Set() );\n\n// Used to track body class names applied while modals are open.\nconst bodyOpenClasses = new Map< string, number >();\n\nfunction UnforwardedModal(\n\tprops: ModalProps,\n\tforwardedRef: React.ForwardedRef< HTMLDivElement >\n) {\n\tconst {\n\t\tbodyOpenClassName = 'modal-open',\n\t\trole = 'dialog',\n\t\ttitle = null,\n\t\tfocusOnMount = true,\n\t\tshouldCloseOnEsc = true,\n\t\tshouldCloseOnClickOutside = true,\n\t\tisDismissible = true,\n\t\t/* Accessibility. */\n\t\taria = {\n\t\t\tlabelledby: undefined,\n\t\t\tdescribedby: undefined,\n\t\t},\n\t\tonRequestClose,\n\t\ticon,\n\t\tcloseButtonLabel,\n\t\tchildren,\n\t\tstyle,\n\t\toverlayClassName: overlayClassnameProp,\n\t\tclassName,\n\t\tcontentLabel,\n\t\tonKeyDown,\n\t\tisFullScreen = false,\n\t\tsize,\n\t\theaderActions = null,\n\t\t__experimentalHideHeader = false,\n\t} = props;\n\n\tconst ref = useRef< HTMLDivElement >();\n\n\tconst instanceId = useInstanceId( Modal );\n\tconst headingId = title\n\t\t? `components-modal-header-${ instanceId }`\n\t\t: aria.labelledby;\n\n\t// The focus hook does not support 'firstContentElement' but this is a valid\n\t// value for the Modal's focusOnMount prop. The following code ensures the focus\n\t// hook will focus the first focusable node within the element to which it is applied.\n\t// When `firstContentElement` is passed as the value of the focusOnMount prop,\n\t// the focus hook is applied to the Modal's content element.\n\t// Otherwise, the focus hook is applied to the Modal's ref. This ensures that the\n\t// focus hook will focus the first element in the Modal's **content** when\n\t// `firstContentElement` is passed.\n\tconst focusOnMountRef = useFocusOnMount(\n\t\tfocusOnMount === 'firstContentElement' ? 'firstElement' : focusOnMount\n\t);\n\tconst constrainedTabbingRef = useConstrainedTabbing();\n\tconst focusReturnRef = useFocusReturn();\n\tconst contentRef = useRef< HTMLDivElement >( null );\n\tconst childrenContainerRef = useRef< HTMLDivElement >( null );\n\n\tconst [ hasScrolledContent, setHasScrolledContent ] = useState( false );\n\tconst [ hasScrollableContent, setHasScrollableContent ] = useState( false );\n\n\tlet sizeClass;\n\tif ( isFullScreen || size === 'fill' ) {\n\t\tsizeClass = 'is-full-screen';\n\t} else if ( size ) {\n\t\tsizeClass = `has-size-${ size }`;\n\t}\n\n\t// Determines whether the Modal content is scrollable and updates the state.\n\tconst isContentScrollable = useCallback( () => {\n\t\tif ( ! contentRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst closestScrollContainer = getScrollContainer( contentRef.current );\n\n\t\tif ( contentRef.current === closestScrollContainer ) {\n\t\t\tsetHasScrollableContent( true );\n\t\t} else {\n\t\t\tsetHasScrollableContent( false );\n\t\t}\n\t}, [ contentRef ] );\n\n\t// Accessibly isolates/unisolates the modal.\n\tuseEffect( () => {\n\t\tariaHelper.modalize( ref.current );\n\t\treturn () => ariaHelper.unmodalize();\n\t}, [] );\n\n\t// Keeps a fresh ref for the subsequent effect.\n\tconst onRequestCloseRef = useRef< ModalProps[ 'onRequestClose' ] >();\n\tuseEffect( () => {\n\t\tonRequestCloseRef.current = onRequestClose;\n\t}, [ onRequestClose ] );\n\n\t// The list of `onRequestClose` callbacks of open (non-nested) Modals. Only\n\t// one should remain open at a time and the list enables closing prior ones.\n\tconst dismissers = useContext( ModalContext );\n\t// Used for the tracking and dismissing any nested modals.\n\tconst [ nestedDismissers ] = useState< Dismissers >( () => new Set() );\n\n\t// Updates the stack tracking open modals at this level and calls\n\t// onRequestClose for any prior and/or nested modals as applicable.\n\tuseEffect( () => {\n\t\t// add this modal instance to the dismissers set\n\t\tdismissers.add( onRequestCloseRef );\n\t\t// request that all the other modals close themselves\n\t\tfor ( const dismisser of dismissers ) {\n\t\t\tif ( dismisser !== onRequestCloseRef ) {\n\t\t\t\tdismisser.current?.();\n\t\t\t}\n\t\t}\n\t\treturn () => {\n\t\t\t// request that all the nested modals close themselves\n\t\t\tfor ( const dismisser of nestedDismissers ) {\n\t\t\t\tdismisser.current?.();\n\t\t\t}\n\t\t\t// remove this modal instance from the dismissers set\n\t\t\tdismissers.delete( onRequestCloseRef );\n\t\t};\n\t}, [ dismissers, nestedDismissers ] );\n\n\t// Adds/removes the value of bodyOpenClassName to body element.\n\tuseEffect( () => {\n\t\tconst theClass = bodyOpenClassName;\n\t\tconst oneMore = 1 + ( bodyOpenClasses.get( theClass ) ?? 0 );\n\t\tbodyOpenClasses.set( theClass, oneMore );\n\t\tdocument.body.classList.add( bodyOpenClassName );\n\t\treturn () => {\n\t\t\tconst oneLess = bodyOpenClasses.get( theClass )! - 1;\n\t\t\tif ( oneLess === 0 ) {\n\t\t\t\tdocument.body.classList.remove( theClass );\n\t\t\t\tbodyOpenClasses.delete( theClass );\n\t\t\t} else {\n\t\t\t\tbodyOpenClasses.set( theClass, oneLess );\n\t\t\t}\n\t\t};\n\t}, [ bodyOpenClassName ] );\n\n\tconst { closeModal, frameRef, frameStyle, overlayClassname } =\n\t\tuseModalExitAnimation();\n\n\t// Calls the isContentScrollable callback when the Modal children container resizes.\n\tuseLayoutEffect( () => {\n\t\tif ( ! window.ResizeObserver || ! childrenContainerRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst resizeObserver = new ResizeObserver( isContentScrollable );\n\t\tresizeObserver.observe( childrenContainerRef.current );\n\n\t\tisContentScrollable();\n\n\t\treturn () => {\n\t\t\tresizeObserver.disconnect();\n\t\t};\n\t}, [ isContentScrollable, childrenContainerRef ] );\n\n\tfunction handleEscapeKeyDown(\n\t\tevent: React.KeyboardEvent< HTMLDivElement >\n\t) {\n\t\tif (\n\t\t\tshouldCloseOnEsc &&\n\t\t\t( event.code === 'Escape' || event.key === 'Escape' ) &&\n\t\t\t! event.defaultPrevented\n\t\t) {\n\t\t\tevent.preventDefault();\n\t\t\tcloseModal().then( () => onRequestClose( event ) );\n\t\t}\n\t}\n\n\tconst onContentContainerScroll = useCallback(\n\t\t( e: React.UIEvent< HTMLDivElement > ) => {\n\t\t\tconst scrollY = e?.currentTarget?.scrollTop ?? -1;\n\n\t\t\tif ( ! hasScrolledContent && scrollY > 0 ) {\n\t\t\t\tsetHasScrolledContent( true );\n\t\t\t} else if ( hasScrolledContent && scrollY <= 0 ) {\n\t\t\t\tsetHasScrolledContent( false );\n\t\t\t}\n\t\t},\n\t\t[ hasScrolledContent ]\n\t);\n\n\tlet pressTarget: EventTarget | null = null;\n\tconst overlayPressHandlers: {\n\t\tonPointerDown: React.PointerEventHandler< HTMLDivElement >;\n\t\tonPointerUp: React.PointerEventHandler< HTMLDivElement >;\n\t} = {\n\t\tonPointerDown: ( event ) => {\n\t\t\tif ( event.target === event.currentTarget ) {\n\t\t\t\tpressTarget = event.target;\n\t\t\t\t// Avoids focus changing so that focus return works as expected.\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\t// Closes the modal with two exceptions. 1. Opening the context menu on\n\t\t// the overlay. 2. Pressing on the overlay then dragging the pointer\n\t\t// over the modal and releasing. Due to the modal being a child of the\n\t\t// overlay, such a gesture is a `click` on the overlay and cannot be\n\t\t// excepted by a `click` handler. Thus the tactic of handling\n\t\t// `pointerup` and comparing its target to that of the `pointerdown`.\n\t\tonPointerUp: ( { target, button } ) => {\n\t\t\tconst isSameTarget = target === pressTarget;\n\t\t\tpressTarget = null;\n\t\t\tif ( button === 0 && isSameTarget ) {\n\t\t\t\tcloseModal().then( () => onRequestClose() );\n\t\t\t}\n\t\t},\n\t};\n\n\tconst modal = (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div\n\t\t\tref={ useMergeRefs( [ ref, forwardedRef ] ) }\n\t\t\tclassName={ clsx(\n\t\t\t\t'components-modal__screen-overlay',\n\t\t\t\toverlayClassname,\n\t\t\t\toverlayClassnameProp\n\t\t\t) }\n\t\t\tonKeyDown={ withIgnoreIMEEvents( handleEscapeKeyDown ) }\n\t\t\t{ ...( shouldCloseOnClickOutside ? overlayPressHandlers : {} ) }\n\t\t>\n\t\t\t<StyleProvider document={ document }>\n\t\t\t\t<div\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'components-modal__frame',\n\t\t\t\t\t\tsizeClass,\n\t\t\t\t\t\tclassName\n\t\t\t\t\t) }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t...frameStyle,\n\t\t\t\t\t\t...style,\n\t\t\t\t\t} }\n\t\t\t\t\tref={ useMergeRefs( [\n\t\t\t\t\t\tframeRef,\n\t\t\t\t\t\tconstrainedTabbingRef,\n\t\t\t\t\t\tfocusReturnRef,\n\t\t\t\t\t\tfocusOnMount !== 'firstContentElement'\n\t\t\t\t\t\t\t? focusOnMountRef\n\t\t\t\t\t\t\t: null,\n\t\t\t\t\t] ) }\n\t\t\t\t\trole={ role }\n\t\t\t\t\taria-label={ contentLabel }\n\t\t\t\t\taria-labelledby={ contentLabel ? undefined : headingId }\n\t\t\t\t\taria-describedby={ aria.describedby }\n\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ clsx( 'components-modal__content', {\n\t\t\t\t\t\t\t'hide-header': __experimentalHideHeader,\n\t\t\t\t\t\t\t'is-scrollable': hasScrollableContent,\n\t\t\t\t\t\t\t'has-scrolled-content': hasScrolledContent,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t\trole=\"document\"\n\t\t\t\t\t\tonScroll={ onContentContainerScroll }\n\t\t\t\t\t\tref={ contentRef }\n\t\t\t\t\t\taria-label={\n\t\t\t\t\t\t\thasScrollableContent\n\t\t\t\t\t\t\t\t? __( 'Scrollable section' )\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttabIndex={ hasScrollableContent ? 0 : undefined }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ! __experimentalHideHeader && (\n\t\t\t\t\t\t\t<div className=\"components-modal__header\">\n\t\t\t\t\t\t\t\t<div className=\"components-modal__header-heading-container\">\n\t\t\t\t\t\t\t\t\t{ icon && (\n\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"components-modal__icon-container\"\n\t\t\t\t\t\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ icon }\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t{ title && (\n\t\t\t\t\t\t\t\t\t\t<h1\n\t\t\t\t\t\t\t\t\t\t\tid={ headingId }\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"components-modal__header-heading\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{ headerActions }\n\t\t\t\t\t\t\t\t{ isDismissible && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<Spacer\n\t\t\t\t\t\t\t\t\t\t\tmarginBottom={ 0 }\n\t\t\t\t\t\t\t\t\t\t\tmarginLeft={ 2 }\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={ (\n\t\t\t\t\t\t\t\t\t\t\t\tevent: React.MouseEvent< HTMLButtonElement >\n\t\t\t\t\t\t\t\t\t\t\t) =>\n\t\t\t\t\t\t\t\t\t\t\t\tcloseModal().then( () =>\n\t\t\t\t\t\t\t\t\t\t\t\t\tonRequestClose( event )\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\ticon={ close }\n\t\t\t\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\t\t\t\tcloseButtonLabel ||\n\t\t\t\t\t\t\t\t\t\t\t\t__( 'Close' )\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tref={ useMergeRefs( [\n\t\t\t\t\t\t\t\tchildrenContainerRef,\n\t\t\t\t\t\t\t\tfocusOnMount === 'firstContentElement'\n\t\t\t\t\t\t\t\t\t? focusOnMountRef\n\t\t\t\t\t\t\t\t\t: null,\n\t\t\t\t\t\t\t] ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</StyleProvider>\n\t\t</div>\n\t);\n\n\treturn createPortal(\n\t\t<ModalContext.Provider value={ nestedDismissers }>\n\t\t\t{ modal }\n\t\t</ModalContext.Provider>,\n\t\tdocument.body\n\t);\n}\n\n/**\n * Modals give users information and choices related to a task they’re trying to\n * accomplish. They can contain critical information, require decisions, or\n * involve multiple tasks.\n *\n * ```jsx\n * import { Button, Modal } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyModal = () => {\n * const [ isOpen, setOpen ] = useState( false );\n * const openModal = () => setOpen( true );\n * const closeModal = () => setOpen( false );\n *\n * return (\n * <>\n * <Button variant=\"secondary\" onClick={ openModal }>\n * Open Modal\n * </Button>\n * { isOpen && (\n * <Modal title=\"This is my modal\" onRequestClose={ closeModal }>\n * <Button variant=\"secondary\" onClick={ closeModal }>\n * My custom close button\n * </Button>\n * </Modal>\n * ) }\n * </>\n * );\n * };\n * ```\n */\nexport const Modal = forwardRef( UnforwardedModal );\n\nexport default Modal;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * The z-index for ConfirmDialog is being set here instead of in\n * packages/base-styles/_z-index.scss, because this component uses\n * emotion instead of sass.\n *\n * ConfirmDialog needs this higher z-index to ensure it renders on top of\n * any parent Popover component.\n */\nexport const wrapper = css`\n\t&& {\n\t\tz-index: 1000001;\n\t}\n`;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useCallback, useEffect, useRef, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Modal from '../modal';\nimport type { ConfirmDialogProps, DialogInputEvent } from './types';\nimport type { WordPressComponentProps } from '../context';\nimport { useContextSystem, contextConnect } from '../context';\nimport { Flex } from '../flex';\nimport Button from '../button';\nimport { Text } from '../text';\nimport { VStack } from '../v-stack';\nimport * as styles from './styles';\nimport { useCx } from '../utils/hooks/use-cx';\n\nconst UnconnectedConfirmDialog = (\n\tprops: WordPressComponentProps< ConfirmDialogProps, 'div', false >,\n\tforwardedRef: React.ForwardedRef< any >\n) => {\n\tconst {\n\t\tisOpen: isOpenProp,\n\t\tonConfirm,\n\t\tonCancel,\n\t\tchildren,\n\t\tconfirmButtonText,\n\t\tcancelButtonText,\n\t\t...otherProps\n\t} = useContextSystem( props, 'ConfirmDialog' );\n\n\tconst cx = useCx();\n\tconst wrapperClassName = cx( styles.wrapper );\n\tconst cancelButtonRef = useRef();\n\tconst confirmButtonRef = useRef();\n\n\tconst [ isOpen, setIsOpen ] = useState< boolean >();\n\tconst [ shouldSelfClose, setShouldSelfClose ] = useState< boolean >();\n\n\tuseEffect( () => {\n\t\t// We only allow the dialog to close itself if `isOpenProp` is *not* set.\n\t\t// If `isOpenProp` is set, then it (probably) means it's controlled by a\n\t\t// parent component. In that case, `shouldSelfClose` might do more harm than\n\t\t// good, so we disable it.\n\t\tconst isIsOpenSet = typeof isOpenProp !== 'undefined';\n\t\tsetIsOpen( isIsOpenSet ? isOpenProp : true );\n\t\tsetShouldSelfClose( ! isIsOpenSet );\n\t}, [ isOpenProp ] );\n\n\tconst handleEvent = useCallback(\n\t\t( callback?: ( event: DialogInputEvent ) => void ) =>\n\t\t\t( event: DialogInputEvent ) => {\n\t\t\t\tcallback?.( event );\n\t\t\t\tif ( shouldSelfClose ) {\n\t\t\t\t\tsetIsOpen( false );\n\t\t\t\t}\n\t\t\t},\n\t\t[ shouldSelfClose, setIsOpen ]\n\t);\n\n\tconst handleEnter = useCallback(\n\t\t( event: React.KeyboardEvent< HTMLDivElement > ) => {\n\t\t\t// Avoid triggering the 'confirm' action when a button is focused,\n\t\t\t// as this can cause a double submission.\n\t\t\tconst isConfirmOrCancelButton =\n\t\t\t\tevent.target === cancelButtonRef.current ||\n\t\t\t\tevent.target === confirmButtonRef.current;\n\n\t\t\tif ( ! isConfirmOrCancelButton && event.key === 'Enter' ) {\n\t\t\t\thandleEvent( onConfirm )( event );\n\t\t\t}\n\t\t},\n\t\t[ handleEvent, onConfirm ]\n\t);\n\n\tconst cancelLabel = cancelButtonText ?? __( 'Cancel' );\n\tconst confirmLabel = confirmButtonText ?? __( 'OK' );\n\n\treturn (\n\t\t<>\n\t\t\t{ isOpen && (\n\t\t\t\t<Modal\n\t\t\t\t\tonRequestClose={ handleEvent( onCancel ) }\n\t\t\t\t\tonKeyDown={ handleEnter }\n\t\t\t\t\tcloseButtonLabel={ cancelLabel }\n\t\t\t\t\tisDismissible\n\t\t\t\t\tref={ forwardedRef }\n\t\t\t\t\toverlayClassName={ wrapperClassName }\n\t\t\t\t\t__experimentalHideHeader\n\t\t\t\t\t{ ...otherProps }\n\t\t\t\t>\n\t\t\t\t\t<VStack spacing={ 8 }>\n\t\t\t\t\t\t<Text>{ children }</Text>\n\t\t\t\t\t\t<Flex direction=\"row\" justify=\"flex-end\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tref={ cancelButtonRef }\n\t\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\t\tonClick={ handleEvent( onCancel ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ cancelLabel }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tref={ confirmButtonRef }\n\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\tonClick={ handleEvent( onConfirm ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ confirmLabel }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</Flex>\n\t\t\t\t\t</VStack>\n\t\t\t\t</Modal>\n\t\t\t) }\n\t\t</>\n\t);\n};\n\n/**\n * `ConfirmDialog` is built of top of [`Modal`](/packages/components/src/modal/README.md)\n * and displays a confirmation dialog, with _confirm_ and _cancel_ buttons.\n * The dialog is confirmed by clicking the _confirm_ button or by pressing the `Enter` key.\n * It is cancelled (closed) by clicking the _cancel_ button, by pressing the `ESC` key, or by\n * clicking outside the dialog focus (i.e, the overlay).\n *\n * `ConfirmDialog` has two main implicit modes: controlled and uncontrolled.\n *\n * UnControlled:\n *\n * Allows the component to be used standalone, just by declaring it as part of another React's component render method:\n * - It will be automatically open (displayed) upon mounting;\n * - It will be automatically closed when clicking the _cancel_ button, by pressing the `ESC` key, or by clicking outside the dialog focus (i.e, the overlay);\n * - `onCancel` is not mandatory but can be passed. Even if passed, the dialog will still be able to close itself.\n *\n * Activating this mode is as simple as omitting the `isOpen` prop. The only mandatory prop, in this case, is the `onConfirm` callback. The message is passed as the `children`. You can pass any JSX you'd like, which allows to further format the message or include sub-component if you'd like:\n *\n * ```jsx\n * import { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';\n *\n * function Example() {\n * \treturn (\n * \t\t<ConfirmDialog onConfirm={ () => console.debug( ' Confirmed! ' ) }>\n * \t\t\tAre you sure? <strong>This action cannot be undone!</strong>\n * \t\t</ConfirmDialog>\n * \t);\n * }\n * ```\n *\n *\n * Controlled mode:\n * Let the parent component control when the dialog is open/closed. It's activated when a\n * boolean value is passed to `isOpen`:\n * - It will not be automatically closed. You need to let it know when to open/close by updating the value of the `isOpen` prop;\n * - Both `onConfirm` and the `onCancel` callbacks are mandatory props in this mode;\n * - You'll want to update the state that controls `isOpen` by updating it from the `onCancel` and `onConfirm` callbacks.\n *\n *```jsx\n * import { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * function Example() {\n * \tconst [ isOpen, setIsOpen ] = useState( true );\n *\n * \tconst handleConfirm = () => {\n * \t\tconsole.debug( 'Confirmed!' );\n * \t\tsetIsOpen( false );\n * \t};\n *\n * \tconst handleCancel = () => {\n * \t\tconsole.debug( 'Cancelled!' );\n * \t\tsetIsOpen( false );\n * \t};\n *\n * \treturn (\n * \t\t<ConfirmDialog\n * \t\t\tisOpen={ isOpen }\n * \t\t\tonConfirm={ handleConfirm }\n * \t\t\tonCancel={ handleCancel }\n * \t\t>\n * \t\t\tAre you sure? <strong>This action cannot be undone!</strong>\n * \t\t</ConfirmDialog>\n * \t);\n * }\n * ```\n */\nexport const ConfirmDialog = contextConnect(\n\tUnconnectedConfirmDialog,\n\t'ConfirmDialog'\n);\nexport default ConfirmDialog;\n","\"use client\";\nimport {\n CompositeContextProvider,\n CompositeScopedContextProvider\n} from \"./P7GR5CS5.js\";\nimport {\n PopoverContextProvider,\n PopoverScopedContextProvider\n} from \"./MTZPJQMC.js\";\nimport {\n createStoreContext\n} from \"./LMDWO4NN.js\";\n\n// src/combobox/combobox-context.tsx\nimport { createContext } from \"react\";\nvar ComboboxListRoleContext = createContext(\n void 0\n);\nvar ctx = createStoreContext(\n [PopoverContextProvider, CompositeContextProvider],\n [PopoverScopedContextProvider, CompositeScopedContextProvider]\n);\nvar useComboboxContext = ctx.useContext;\nvar useComboboxScopedContext = ctx.useScopedContext;\nvar useComboboxProviderContext = ctx.useProviderContext;\nvar ComboboxContextProvider = ctx.ContextProvider;\nvar ComboboxScopedContextProvider = ctx.ScopedContextProvider;\nvar ComboboxItemValueContext = createContext(\n void 0\n);\nvar ComboboxItemCheckedContext = createContext(false);\n\nexport {\n ComboboxListRoleContext,\n useComboboxContext,\n useComboboxScopedContext,\n useComboboxProviderContext,\n ComboboxContextProvider,\n ComboboxScopedContextProvider,\n ComboboxItemValueContext,\n ComboboxItemCheckedContext\n};\n","\"use client\";\nimport {\n createCompositeStore\n} from \"../__chunks/AJZ4BYF3.js\";\nimport \"../__chunks/CYQWQL4J.js\";\nimport {\n toArray\n} from \"../__chunks/7PRQYBBV.js\";\nimport {\n createPopoverStore\n} from \"../__chunks/ME2CUF3F.js\";\nimport \"../__chunks/FZZ2AVHF.js\";\nimport \"../__chunks/RCQ5P4YE.js\";\nimport {\n batch,\n createStore,\n mergeStore,\n omit,\n setup,\n sync,\n throwOnConflictingProps\n} from \"../__chunks/BCALMBPZ.js\";\nimport {\n defaultValue\n} from \"../__chunks/PBFD2E7P.js\";\nimport \"../__chunks/DTR5TSDJ.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"../__chunks/3YLGPPWQ.js\";\n\n// src/select/select-store.ts\nfunction createSelectStore(_a = {}) {\n var _b = _a, {\n combobox\n } = _b, props = __objRest(_b, [\n \"combobox\"\n ]);\n const store = mergeStore(\n props.store,\n omit(combobox, [\n \"value\",\n \"items\",\n \"renderedItems\",\n \"baseElement\",\n \"arrowElement\",\n \"anchorElement\",\n \"contentElement\",\n \"popoverElement\",\n \"disclosureElement\"\n ])\n );\n throwOnConflictingProps(props, store);\n const syncState = store.getState();\n const composite = createCompositeStore(__spreadProps(__spreadValues({}, props), {\n store,\n virtualFocus: defaultValue(\n props.virtualFocus,\n syncState.virtualFocus,\n true\n ),\n includesBaseElement: defaultValue(\n props.includesBaseElement,\n syncState.includesBaseElement,\n false\n ),\n activeId: defaultValue(\n props.activeId,\n syncState.activeId,\n props.defaultActiveId,\n null\n ),\n orientation: defaultValue(\n props.orientation,\n syncState.orientation,\n \"vertical\"\n )\n }));\n const popover = createPopoverStore(__spreadProps(__spreadValues({}, props), {\n store,\n placement: defaultValue(\n props.placement,\n syncState.placement,\n \"bottom-start\"\n )\n }));\n const initialValue = new String(\"\");\n const initialState = __spreadProps(__spreadValues(__spreadValues({}, composite.getState()), popover.getState()), {\n value: defaultValue(\n props.value,\n syncState.value,\n props.defaultValue,\n initialValue\n ),\n setValueOnMove: defaultValue(\n props.setValueOnMove,\n syncState.setValueOnMove,\n false\n ),\n labelElement: defaultValue(syncState.labelElement, null),\n selectElement: defaultValue(syncState.selectElement, null),\n listElement: defaultValue(syncState.listElement, null)\n });\n const select = createStore(initialState, composite, popover, store);\n setup(\n select,\n () => sync(select, [\"value\", \"items\"], (state) => {\n if (state.value !== initialValue) return;\n if (!state.items.length) return;\n const item = state.items.find(\n (item2) => !item2.disabled && item2.value != null\n );\n if ((item == null ? void 0 : item.value) == null) return;\n select.setState(\"value\", item.value);\n })\n );\n setup(\n select,\n () => sync(select, [\"mounted\"], (state) => {\n if (state.mounted) return;\n select.setState(\"activeId\", initialState.activeId);\n })\n );\n setup(\n select,\n () => sync(select, [\"mounted\", \"items\", \"value\"], (state) => {\n if (combobox) return;\n if (state.mounted) return;\n const values = toArray(state.value);\n const lastValue = values[values.length - 1];\n if (lastValue == null) return;\n const item = state.items.find(\n (item2) => !item2.disabled && item2.value === lastValue\n );\n if (!item) return;\n select.setState(\"activeId\", item.id);\n })\n );\n setup(\n select,\n () => batch(select, [\"setValueOnMove\", \"moves\"], (state) => {\n const { mounted, value, activeId } = select.getState();\n if (!state.setValueOnMove && mounted) return;\n if (Array.isArray(value)) return;\n if (!state.moves) return;\n if (!activeId) return;\n const item = composite.item(activeId);\n if (!item || item.disabled || item.value == null) return;\n select.setState(\"value\", item.value);\n })\n );\n return __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, composite), popover), select), {\n combobox,\n setValue: (value) => select.setState(\"value\", value),\n setLabelElement: (element) => select.setState(\"labelElement\", element),\n setSelectElement: (element) => select.setState(\"selectElement\", element),\n setListElement: (element) => select.setState(\"listElement\", element)\n });\n}\nexport {\n createSelectStore\n};\n","\"use client\";\nimport {\n CompositeContextProvider,\n CompositeScopedContextProvider\n} from \"./P7GR5CS5.js\";\nimport {\n PopoverContextProvider,\n PopoverScopedContextProvider\n} from \"./MTZPJQMC.js\";\nimport {\n createStoreContext\n} from \"./LMDWO4NN.js\";\n\n// src/select/select-context.tsx\nimport { createContext } from \"react\";\nvar ctx = createStoreContext(\n [PopoverContextProvider, CompositeContextProvider],\n [PopoverScopedContextProvider, CompositeScopedContextProvider]\n);\nvar useSelectContext = ctx.useContext;\nvar useSelectScopedContext = ctx.useScopedContext;\nvar useSelectProviderContext = ctx.useProviderContext;\nvar SelectContextProvider = ctx.ContextProvider;\nvar SelectScopedContextProvider = ctx.ScopedContextProvider;\nvar SelectItemCheckedContext = createContext(false);\nvar SelectHeadingContext = createContext(null);\n\nexport {\n useSelectContext,\n useSelectScopedContext,\n useSelectProviderContext,\n SelectContextProvider,\n SelectScopedContextProvider,\n SelectItemCheckedContext,\n SelectHeadingContext\n};\n","\"use client\";\nimport {\n useSelectProviderContext\n} from \"../__chunks/KPEX55MY.js\";\nimport \"../__chunks/P7GR5CS5.js\";\nimport \"../__chunks/VDHZ5F7K.js\";\nimport \"../__chunks/MTZPJQMC.js\";\nimport \"../__chunks/RS7LB2H4.js\";\nimport \"../__chunks/S6EF7IVO.js\";\nimport {\n createElement,\n createHook,\n forwardRef,\n memo\n} from \"../__chunks/LMDWO4NN.js\";\nimport {\n useEvent,\n useId,\n useMergeRefs\n} from \"../__chunks/ABQUS43J.js\";\nimport \"../__chunks/SK3NAZA3.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"../__chunks/3YLGPPWQ.js\";\n\n// src/select/select-label.tsx\nimport { invariant, removeUndefinedValues } from \"@ariakit/core/utils/misc\";\nvar TagName = \"div\";\nvar useSelectLabel = createHook(\n function useSelectLabel2(_a) {\n var _b = _a, { store } = _b, props = __objRest(_b, [\"store\"]);\n const context = useSelectProviderContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"SelectLabel must receive a `store` prop or be wrapped in a SelectProvider component.\"\n );\n const id = useId(props.id);\n const onClickProp = props.onClick;\n const onClick = useEvent((event) => {\n onClickProp == null ? void 0 : onClickProp(event);\n if (event.defaultPrevented) return;\n queueMicrotask(() => {\n const select = store == null ? void 0 : store.getState().selectElement;\n select == null ? void 0 : select.focus();\n });\n });\n props = __spreadProps(__spreadValues({\n id\n }, props), {\n ref: useMergeRefs(store.setLabelElement, props.ref),\n onClick,\n style: __spreadValues({\n cursor: \"default\"\n }, props.style)\n });\n return removeUndefinedValues(props);\n }\n);\nvar SelectLabel = memo(\n forwardRef(function SelectLabel2(props) {\n const htmlProps = useSelectLabel(props);\n return createElement(TagName, htmlProps);\n })\n);\nexport {\n SelectLabel,\n useSelectLabel\n};\n","\"use client\";\nimport {\n useCommand\n} from \"./KUU7WJ55.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n useMergeRefs,\n useTagName\n} from \"./ABQUS43J.js\";\nimport {\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/button/button.tsx\nimport { isButton } from \"@ariakit/core/utils/dom\";\nimport { useEffect, useRef, useState } from \"react\";\nvar TagName = \"button\";\nvar useButton = createHook(\n function useButton2(props) {\n const ref = useRef(null);\n const tagName = useTagName(ref, TagName);\n const [isNativeButton, setIsNativeButton] = useState(\n () => !!tagName && isButton({ tagName, type: props.type })\n );\n useEffect(() => {\n if (!ref.current) return;\n setIsNativeButton(isButton(ref.current));\n }, []);\n props = __spreadProps(__spreadValues({\n role: !isNativeButton && tagName !== \"a\" ? \"button\" : void 0\n }, props), {\n ref: useMergeRefs(ref, props.ref)\n });\n props = useCommand(props);\n return props;\n }\n);\nvar Button = forwardRef(function Button2(props) {\n const htmlProps = useButton(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n useButton,\n Button\n};\n","\"use client\";\nimport {\n useButton\n} from \"./X5NMLKT6.js\";\nimport {\n useDisclosureProviderContext\n} from \"./S6EF7IVO.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n useBooleanEvent,\n useEvent,\n useMergeRefs,\n useMetadataProps\n} from \"./ABQUS43J.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/disclosure/disclosure.tsx\nimport { invariant } from \"@ariakit/core/utils/misc\";\nimport { useEffect, useRef, useState } from \"react\";\nvar TagName = \"button\";\nvar symbol = Symbol(\"disclosure\");\nvar useDisclosure = createHook(\n function useDisclosure2(_a) {\n var _b = _a, { store, toggleOnClick = true } = _b, props = __objRest(_b, [\"store\", \"toggleOnClick\"]);\n const context = useDisclosureProviderContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"Disclosure must receive a `store` prop or be wrapped in a DisclosureProvider component.\"\n );\n const ref = useRef(null);\n const [expanded, setExpanded] = useState(false);\n const disclosureElement = store.useState(\"disclosureElement\");\n const open = store.useState(\"open\");\n useEffect(() => {\n let isCurrentDisclosure = disclosureElement === ref.current;\n if (!(disclosureElement == null ? void 0 : disclosureElement.isConnected)) {\n store == null ? void 0 : store.setDisclosureElement(ref.current);\n isCurrentDisclosure = true;\n }\n setExpanded(open && isCurrentDisclosure);\n }, [disclosureElement, store, open]);\n const onClickProp = props.onClick;\n const toggleOnClickProp = useBooleanEvent(toggleOnClick);\n const [isDuplicate, metadataProps] = useMetadataProps(props, symbol, true);\n const onClick = useEvent((event) => {\n onClickProp == null ? void 0 : onClickProp(event);\n if (event.defaultPrevented) return;\n if (isDuplicate) return;\n if (!toggleOnClickProp(event)) return;\n store == null ? void 0 : store.setDisclosureElement(event.currentTarget);\n store == null ? void 0 : store.toggle();\n });\n const contentElement = store.useState(\"contentElement\");\n props = __spreadProps(__spreadValues(__spreadValues({\n \"aria-expanded\": expanded,\n \"aria-controls\": contentElement == null ? void 0 : contentElement.id\n }, metadataProps), props), {\n ref: useMergeRefs(ref, props.ref),\n onClick\n });\n props = useButton(props);\n return props;\n }\n);\nvar Disclosure = forwardRef(function Disclosure2(props) {\n const htmlProps = useDisclosure(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n useDisclosure,\n Disclosure\n};\n","\"use client\";\nimport {\n useDisclosure\n} from \"./P4IRICAX.js\";\nimport {\n useDialogProviderContext\n} from \"./RS7LB2H4.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n __objRest,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/dialog/dialog-disclosure.tsx\nimport { getPopupRole } from \"@ariakit/core/utils/dom\";\nimport { invariant } from \"@ariakit/core/utils/misc\";\nvar TagName = \"button\";\nvar useDialogDisclosure = createHook(\n function useDialogDisclosure2(_a) {\n var _b = _a, { store } = _b, props = __objRest(_b, [\"store\"]);\n const context = useDialogProviderContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"DialogDisclosure must receive a `store` prop or be wrapped in a DialogProvider component.\"\n );\n const contentElement = store.useState(\"contentElement\");\n props = __spreadValues({\n \"aria-haspopup\": getPopupRole(contentElement, \"dialog\")\n }, props);\n props = useDisclosure(__spreadValues({ store }, props));\n return props;\n }\n);\nvar DialogDisclosure = forwardRef(function DialogDisclosure2(props) {\n const htmlProps = useDialogDisclosure(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n useDialogDisclosure,\n DialogDisclosure\n};\n","\"use client\";\nimport {\n usePopoverProviderContext\n} from \"./MTZPJQMC.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n useMergeRefs\n} from \"./ABQUS43J.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/popover/popover-anchor.tsx\nvar TagName = \"div\";\nvar usePopoverAnchor = createHook(\n function usePopoverAnchor2(_a) {\n var _b = _a, { store } = _b, props = __objRest(_b, [\"store\"]);\n const context = usePopoverProviderContext();\n store = store || context;\n props = __spreadProps(__spreadValues({}, props), {\n ref: useMergeRefs(store == null ? void 0 : store.setAnchorElement, props.ref)\n });\n return props;\n }\n);\nvar PopoverAnchor = forwardRef(function PopoverAnchor2(props) {\n const htmlProps = usePopoverAnchor(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n usePopoverAnchor,\n PopoverAnchor\n};\n","\"use client\";\nimport {\n useDialogDisclosure\n} from \"./AXB53BZF.js\";\nimport {\n usePopoverAnchor\n} from \"./OMU7RWRV.js\";\nimport {\n PopoverScopedContextProvider,\n usePopoverProviderContext\n} from \"./MTZPJQMC.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n useEvent,\n useWrapElement\n} from \"./ABQUS43J.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/popover/popover-disclosure.tsx\nimport { invariant } from \"@ariakit/core/utils/misc\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"button\";\nvar usePopoverDisclosure = createHook(function usePopoverDisclosure2(_a) {\n var _b = _a, { store } = _b, props = __objRest(_b, [\"store\"]);\n const context = usePopoverProviderContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"PopoverDisclosure must receive a `store` prop or be wrapped in a PopoverProvider component.\"\n );\n const onClickProp = props.onClick;\n const onClick = useEvent((event) => {\n store == null ? void 0 : store.setAnchorElement(event.currentTarget);\n onClickProp == null ? void 0 : onClickProp(event);\n });\n props = useWrapElement(\n props,\n (element) => /* @__PURE__ */ jsx(PopoverScopedContextProvider, { value: store, children: element }),\n [store]\n );\n props = __spreadProps(__spreadValues({}, props), {\n onClick\n });\n props = usePopoverAnchor(__spreadValues({ store }, props));\n props = useDialogDisclosure(__spreadValues({ store }, props));\n return props;\n});\nvar PopoverDisclosure = forwardRef(function PopoverDisclosure2(props) {\n const htmlProps = usePopoverDisclosure(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n usePopoverDisclosure,\n PopoverDisclosure\n};\n","\"use client\";\nimport {\n usePopoverContext\n} from \"./MTZPJQMC.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/popover/popover-disclosure-arrow.tsx\nimport { invariant, removeUndefinedValues } from \"@ariakit/core/utils/misc\";\nimport { useMemo } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"span\";\nvar pointsMap = {\n top: \"4,10 8,6 12,10\",\n right: \"6,4 10,8 6,12\",\n bottom: \"4,6 8,10 12,6\",\n left: \"10,4 6,8 10,12\"\n};\nvar usePopoverDisclosureArrow = createHook(function usePopoverDisclosureArrow2(_a) {\n var _b = _a, { store, placement } = _b, props = __objRest(_b, [\"store\", \"placement\"]);\n const context = usePopoverContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"PopoverDisclosureArrow must be wrapped in a PopoverDisclosure component.\"\n );\n const position = store.useState((state) => placement || state.placement);\n const dir = position.split(\"-\")[0];\n const points = pointsMap[dir];\n const children = useMemo(\n () => /* @__PURE__ */ jsx(\n \"svg\",\n {\n display: \"block\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 1.5,\n viewBox: \"0 0 16 16\",\n height: \"1em\",\n width: \"1em\",\n children: /* @__PURE__ */ jsx(\"polyline\", { points })\n }\n ),\n [points]\n );\n props = __spreadProps(__spreadValues({\n children,\n \"aria-hidden\": true\n }, props), {\n style: __spreadValues({\n width: \"1em\",\n height: \"1em\",\n pointerEvents: \"none\"\n }, props.style)\n });\n return removeUndefinedValues(props);\n});\nvar PopoverDisclosureArrow = forwardRef(\n function PopoverDisclosureArrow2(props) {\n const htmlProps = usePopoverDisclosureArrow(props);\n return createElement(TagName, htmlProps);\n }\n);\n\nexport {\n usePopoverDisclosureArrow,\n PopoverDisclosureArrow\n};\n","\"use client\";\nimport {\n usePopoverDisclosureArrow\n} from \"./DR55NYVS.js\";\nimport {\n useSelectContext\n} from \"./KPEX55MY.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n __objRest,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/select/select-arrow.tsx\nvar TagName = \"span\";\nvar useSelectArrow = createHook(\n function useSelectArrow2(_a) {\n var _b = _a, { store } = _b, props = __objRest(_b, [\"store\"]);\n const context = useSelectContext();\n store = store || context;\n props = usePopoverDisclosureArrow(__spreadValues({ store }, props));\n return props;\n }\n);\nvar SelectArrow = forwardRef(function SelectArrow2(props) {\n const htmlProps = useSelectArrow(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n useSelectArrow,\n SelectArrow\n};\n","\"use client\";\nimport {\n usePopoverDisclosure\n} from \"../__chunks/QYJ6MIDR.js\";\nimport \"../__chunks/AXB53BZF.js\";\nimport \"../__chunks/P4IRICAX.js\";\nimport \"../__chunks/OMU7RWRV.js\";\nimport {\n SelectArrow\n} from \"../__chunks/UD53QJDV.js\";\nimport \"../__chunks/DR55NYVS.js\";\nimport \"../__chunks/X5NMLKT6.js\";\nimport {\n useCompositeTypeahead\n} from \"../__chunks/T7VMP3TM.js\";\nimport {\n SelectScopedContextProvider,\n useSelectProviderContext\n} from \"../__chunks/KPEX55MY.js\";\nimport \"../__chunks/KUU7WJ55.js\";\nimport \"../__chunks/5VQZOHHZ.js\";\nimport \"../__chunks/P7GR5CS5.js\";\nimport \"../__chunks/VDHZ5F7K.js\";\nimport \"../__chunks/MTZPJQMC.js\";\nimport \"../__chunks/RS7LB2H4.js\";\nimport \"../__chunks/S6EF7IVO.js\";\nimport \"../__chunks/LVA2YJMS.js\";\nimport \"../__chunks/SWN3JYXT.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"../__chunks/LMDWO4NN.js\";\nimport {\n useBooleanEvent,\n useEvent,\n useMergeRefs,\n useWrapElement\n} from \"../__chunks/ABQUS43J.js\";\nimport \"../__chunks/SK3NAZA3.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"../__chunks/3YLGPPWQ.js\";\n\n// src/select/select.tsx\nimport { toArray } from \"@ariakit/core/utils/array\";\nimport { getPopupRole } from \"@ariakit/core/utils/dom\";\nimport { queueBeforeEvent } from \"@ariakit/core/utils/events\";\nimport { invariant } from \"@ariakit/core/utils/misc\";\nimport { useEffect, useMemo, useRef, useState } from \"react\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar TagName = \"button\";\nfunction getSelectedValues(select) {\n return Array.from(select.selectedOptions).map((option) => option.value);\n}\nfunction nextWithValue(store, next) {\n return () => {\n const nextId = next();\n if (!nextId) return;\n let i = 0;\n let nextItem = store.item(nextId);\n const firstItem = nextItem;\n while (nextItem && nextItem.value == null) {\n const nextId2 = next(++i);\n if (!nextId2) return;\n nextItem = store.item(nextId2);\n if (nextItem === firstItem) break;\n }\n return nextItem == null ? void 0 : nextItem.id;\n };\n}\nvar useSelect = createHook(function useSelect2(_a) {\n var _b = _a, {\n store,\n name,\n form,\n required,\n showOnKeyDown = true,\n moveOnKeyDown = true,\n toggleOnPress = true,\n toggleOnClick = toggleOnPress\n } = _b, props = __objRest(_b, [\n \"store\",\n \"name\",\n \"form\",\n \"required\",\n \"showOnKeyDown\",\n \"moveOnKeyDown\",\n \"toggleOnPress\",\n \"toggleOnClick\"\n ]);\n const context = useSelectProviderContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"Select must receive a `store` prop or be wrapped in a SelectProvider component.\"\n );\n const onKeyDownProp = props.onKeyDown;\n const showOnKeyDownProp = useBooleanEvent(showOnKeyDown);\n const moveOnKeyDownProp = useBooleanEvent(moveOnKeyDown);\n const placement = store.useState(\"placement\");\n const dir = placement.split(\"-\")[0];\n const value = store.useState(\"value\");\n const multiSelectable = Array.isArray(value);\n const onKeyDown = useEvent((event) => {\n var _a2;\n onKeyDownProp == null ? void 0 : onKeyDownProp(event);\n if (event.defaultPrevented) return;\n if (!store) return;\n const { orientation, items: items2, activeId } = store.getState();\n const isVertical = orientation !== \"horizontal\";\n const isHorizontal = orientation !== \"vertical\";\n const isGrid = !!((_a2 = items2.find((item) => !item.disabled && item.value != null)) == null ? void 0 : _a2.rowId);\n const moveKeyMap = {\n ArrowUp: (isGrid || isVertical) && nextWithValue(store, store.up),\n ArrowRight: (isGrid || isHorizontal) && nextWithValue(store, store.next),\n ArrowDown: (isGrid || isVertical) && nextWithValue(store, store.down),\n ArrowLeft: (isGrid || isHorizontal) && nextWithValue(store, store.previous)\n };\n const getId = moveKeyMap[event.key];\n if (getId && moveOnKeyDownProp(event)) {\n event.preventDefault();\n store.move(getId());\n }\n const isTopOrBottom = dir === \"top\" || dir === \"bottom\";\n const isLeft = dir === \"left\";\n const isRight = dir === \"right\";\n const canShowKeyMap = {\n ArrowDown: isTopOrBottom,\n ArrowUp: isTopOrBottom,\n ArrowLeft: isLeft,\n ArrowRight: isRight\n };\n const canShow = canShowKeyMap[event.key];\n if (canShow && showOnKeyDownProp(event)) {\n event.preventDefault();\n store.move(activeId);\n queueBeforeEvent(event.currentTarget, \"keyup\", store.show);\n }\n });\n props = useWrapElement(\n props,\n (element) => /* @__PURE__ */ jsx(SelectScopedContextProvider, { value: store, children: element }),\n [store]\n );\n const [autofill, setAutofill] = useState(false);\n const nativeSelectChangedRef = useRef(false);\n useEffect(() => {\n const nativeSelectChanged = nativeSelectChangedRef.current;\n nativeSelectChangedRef.current = false;\n if (nativeSelectChanged) return;\n setAutofill(false);\n }, [value]);\n const labelId = store.useState((state) => {\n var _a2;\n return (_a2 = state.labelElement) == null ? void 0 : _a2.id;\n });\n const label = props[\"aria-label\"];\n const labelledBy = props[\"aria-labelledby\"] || labelId;\n const items = store.useState((state) => {\n if (!name) return;\n return state.items;\n });\n const values = useMemo(() => {\n return [...new Set(items == null ? void 0 : items.map((i) => i.value).filter((v) => v != null))];\n }, [items]);\n props = useWrapElement(\n props,\n (element) => {\n if (!name) return element;\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsxs(\n \"select\",\n {\n style: {\n border: 0,\n clip: \"rect(0 0 0 0)\",\n height: \"1px\",\n margin: \"-1px\",\n overflow: \"hidden\",\n padding: 0,\n position: \"absolute\",\n whiteSpace: \"nowrap\",\n width: \"1px\"\n },\n tabIndex: -1,\n \"aria-hidden\": true,\n \"aria-label\": label,\n \"aria-labelledby\": labelledBy,\n name,\n form,\n required,\n value,\n multiple: multiSelectable,\n onFocus: () => {\n var _a2;\n return (_a2 = store == null ? void 0 : store.getState().selectElement) == null ? void 0 : _a2.focus();\n },\n onChange: (event) => {\n nativeSelectChangedRef.current = true;\n setAutofill(true);\n store == null ? void 0 : store.setValue(\n multiSelectable ? getSelectedValues(event.target) : event.target.value\n );\n },\n children: [\n toArray(value).map((value2) => {\n if (value2 == null) return null;\n if (values.includes(value2)) return null;\n return /* @__PURE__ */ jsx(\"option\", { value: value2, children: value2 }, value2);\n }),\n values.map((value2) => /* @__PURE__ */ jsx(\"option\", { value: value2, children: value2 }, value2))\n ]\n }\n ),\n element\n ] });\n },\n [\n store,\n label,\n labelledBy,\n name,\n form,\n required,\n value,\n multiSelectable,\n values\n ]\n );\n const children = /* @__PURE__ */ jsxs(Fragment, { children: [\n value,\n /* @__PURE__ */ jsx(SelectArrow, {})\n ] });\n const contentElement = store.useState(\"contentElement\");\n props = __spreadProps(__spreadValues({\n role: \"combobox\",\n \"aria-autocomplete\": \"none\",\n \"aria-labelledby\": labelId,\n \"aria-haspopup\": getPopupRole(contentElement, \"listbox\"),\n \"data-autofill\": autofill || void 0,\n \"data-name\": name,\n children\n }, props), {\n ref: useMergeRefs(store.setSelectElement, props.ref),\n onKeyDown\n });\n props = usePopoverDisclosure(__spreadValues({ store, toggleOnClick }, props));\n props = useCompositeTypeahead(__spreadValues({ store }, props));\n return props;\n});\nvar Select = forwardRef(function Select2(props) {\n const htmlProps = useSelect(props);\n return createElement(TagName, htmlProps);\n});\nexport {\n Select,\n useSelect\n};\n","\"use client\";\nimport {\n useCompositeTypeahead\n} from \"./T7VMP3TM.js\";\nimport {\n SelectHeadingContext,\n SelectScopedContextProvider,\n useSelectContext\n} from \"./KPEX55MY.js\";\nimport {\n useComposite\n} from \"./ITI7HKP4.js\";\nimport {\n isHidden\n} from \"./VGCJ63VH.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n useAttribute,\n useBooleanEvent,\n useEvent,\n useId,\n useMergeRefs,\n useTransactionState,\n useWrapElement\n} from \"./ABQUS43J.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/select/select-list.tsx\nimport { isSelfTarget } from \"@ariakit/core/utils/events\";\nimport { invariant } from \"@ariakit/core/utils/misc\";\nimport { createContext, useContext, useEffect, useMemo, useState } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"div\";\nvar SelectListContext = createContext(null);\nvar useSelectList = createHook(\n function useSelectList2(_a) {\n var _b = _a, {\n store,\n resetOnEscape = true,\n hideOnEnter = true,\n focusOnMove = true,\n composite,\n alwaysVisible\n } = _b, props = __objRest(_b, [\n \"store\",\n \"resetOnEscape\",\n \"hideOnEnter\",\n \"focusOnMove\",\n \"composite\",\n \"alwaysVisible\"\n ]);\n const context = useSelectContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"SelectList must receive a `store` prop or be wrapped in a SelectProvider component.\"\n );\n const id = useId(props.id);\n const value = store.useState(\"value\");\n const multiSelectable = Array.isArray(value);\n const [defaultValue, setDefaultValue] = useState(value);\n const mounted = store.useState(\"mounted\");\n useEffect(() => {\n if (mounted) return;\n setDefaultValue(value);\n }, [mounted, value]);\n resetOnEscape = resetOnEscape && !multiSelectable;\n const onKeyDownProp = props.onKeyDown;\n const resetOnEscapeProp = useBooleanEvent(resetOnEscape);\n const hideOnEnterProp = useBooleanEvent(hideOnEnter);\n const onKeyDown = useEvent((event) => {\n onKeyDownProp == null ? void 0 : onKeyDownProp(event);\n if (event.defaultPrevented) return;\n if (event.key === \"Escape\" && resetOnEscapeProp(event)) {\n store == null ? void 0 : store.setValue(defaultValue);\n }\n if (event.key === \" \" || event.key === \"Enter\") {\n if (isSelfTarget(event) && hideOnEnterProp(event)) {\n event.preventDefault();\n store == null ? void 0 : store.hide();\n }\n }\n });\n const headingContext = useContext(SelectHeadingContext);\n const headingState = useState();\n const [headingId, setHeadingId] = headingContext || headingState;\n const headingContextValue = useMemo(\n () => [headingId, setHeadingId],\n [headingId]\n );\n const [childStore, setChildStore] = useState(null);\n const setStore = useContext(SelectListContext);\n useEffect(() => {\n if (!setStore) return;\n setStore(store);\n return () => setStore(null);\n }, [setStore, store]);\n props = useWrapElement(\n props,\n (element2) => /* @__PURE__ */ jsx(SelectScopedContextProvider, { value: store, children: /* @__PURE__ */ jsx(SelectListContext.Provider, { value: setChildStore, children: /* @__PURE__ */ jsx(SelectHeadingContext.Provider, { value: headingContextValue, children: element2 }) }) }),\n [store, headingContextValue]\n );\n const hasCombobox = !!store.combobox;\n composite = composite != null ? composite : !hasCombobox && childStore !== store;\n const [element, setElement] = useTransactionState(\n composite ? store.setListElement : null\n );\n const role = useAttribute(element, \"role\", props.role);\n const isCompositeRole = role === \"listbox\" || role === \"menu\" || role === \"tree\" || role === \"grid\";\n const ariaMultiSelectable = composite || isCompositeRole ? multiSelectable || void 0 : void 0;\n const hidden = isHidden(mounted, props.hidden, alwaysVisible);\n const style = hidden ? __spreadProps(__spreadValues({}, props.style), { display: \"none\" }) : props.style;\n if (composite) {\n props = __spreadValues({\n role: \"listbox\",\n \"aria-multiselectable\": ariaMultiSelectable\n }, props);\n }\n const labelId = store.useState(\n (state) => {\n var _a2;\n return headingId || ((_a2 = state.labelElement) == null ? void 0 : _a2.id);\n }\n );\n props = __spreadProps(__spreadValues({\n id,\n \"aria-labelledby\": labelId,\n hidden\n }, props), {\n ref: useMergeRefs(setElement, props.ref),\n style,\n onKeyDown\n });\n props = useComposite(__spreadProps(__spreadValues({ store }, props), { composite }));\n props = useCompositeTypeahead(__spreadValues({ store, typeahead: !hasCombobox }, props));\n return props;\n }\n);\nvar SelectList = forwardRef(function SelectList2(props) {\n const htmlProps = useSelectList(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n useSelectList,\n SelectList\n};\n","\"use client\";\nimport {\n useSelectList\n} from \"../__chunks/XRBJGF7I.js\";\nimport \"../__chunks/T7VMP3TM.js\";\nimport {\n useSelectProviderContext\n} from \"../__chunks/KPEX55MY.js\";\nimport \"../__chunks/ITI7HKP4.js\";\nimport \"../__chunks/5VQZOHHZ.js\";\nimport \"../__chunks/P7GR5CS5.js\";\nimport \"../__chunks/VDHZ5F7K.js\";\nimport {\n usePopover\n} from \"../__chunks/T6C2RYFI.js\";\nimport {\n createDialogComponent\n} from \"../__chunks/JC64G2H7.js\";\nimport \"../__chunks/63FEHJZV.js\";\nimport \"../__chunks/KZAQFFOU.js\";\nimport \"../__chunks/IGR4SXG2.js\";\nimport \"../__chunks/ESSM74HH.js\";\nimport \"../__chunks/BGQ3KQ5M.js\";\nimport \"../__chunks/YKJECYU7.js\";\nimport \"../__chunks/TOU75OXH.js\";\nimport \"../__chunks/WBDYNH73.js\";\nimport \"../__chunks/2PGBN2Y4.js\";\nimport \"../__chunks/63XF7ACK.js\";\nimport \"../__chunks/HLTQOHKZ.js\";\nimport \"../__chunks/677M2CI3.js\";\nimport \"../__chunks/6GXEOXGT.js\";\nimport \"../__chunks/AOUGVQZ3.js\";\nimport \"../__chunks/K2ZF5NU7.js\";\nimport \"../__chunks/ZWYATQFU.js\";\nimport \"../__chunks/5M6RIVE2.js\";\nimport \"../__chunks/O37CNYMR.js\";\nimport \"../__chunks/W3VI7GFU.js\";\nimport \"../__chunks/AOQQTIBO.js\";\nimport \"../__chunks/CZ4GFWYL.js\";\nimport \"../__chunks/VGCJ63VH.js\";\nimport \"../__chunks/XL7CSKGW.js\";\nimport \"../__chunks/MTZPJQMC.js\";\nimport \"../__chunks/RS7LB2H4.js\";\nimport \"../__chunks/S6EF7IVO.js\";\nimport \"../__chunks/LVA2YJMS.js\";\nimport \"../__chunks/SWN3JYXT.js\";\nimport \"../__chunks/XX67R432.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"../__chunks/LMDWO4NN.js\";\nimport \"../__chunks/BM6PGYQY.js\";\nimport \"../__chunks/WYCIER3C.js\";\nimport \"../__chunks/YV4JVR4I.js\";\nimport \"../__chunks/ABQUS43J.js\";\nimport \"../__chunks/SK3NAZA3.js\";\nimport {\n __objRest,\n __spreadValues\n} from \"../__chunks/3YLGPPWQ.js\";\n\n// src/select/select-popover.tsx\nvar TagName = \"div\";\nvar useSelectPopover = createHook(\n function useSelectPopover2(_a) {\n var _b = _a, { store, alwaysVisible } = _b, props = __objRest(_b, [\"store\", \"alwaysVisible\"]);\n const context = useSelectProviderContext();\n store = store || context;\n props = useSelectList(__spreadValues({ store, alwaysVisible }, props));\n props = usePopover(__spreadValues({ store, alwaysVisible }, props));\n return props;\n }\n);\nvar SelectPopover = createDialogComponent(\n forwardRef(function SelectPopover2(props) {\n const htmlProps = useSelectPopover(props);\n return createElement(TagName, htmlProps);\n }),\n useSelectProviderContext\n);\nexport {\n SelectPopover,\n useSelectPopover\n};\n","\"use client\";\nimport {\n useCompositeHover\n} from \"./UQQRIHDV.js\";\nimport {\n SelectItemCheckedContext,\n useSelectScopedContext\n} from \"./KPEX55MY.js\";\nimport {\n useCompositeItem\n} from \"./P2CTZE2T.js\";\nimport {\n createElement,\n createHook,\n forwardRef,\n memo\n} from \"./LMDWO4NN.js\";\nimport {\n useStoreStateObject\n} from \"./YV4JVR4I.js\";\nimport {\n useBooleanEvent,\n useEvent,\n useId,\n useWrapElement\n} from \"./ABQUS43J.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/select/select-item.tsx\nimport { getPopupItemRole } from \"@ariakit/core/utils/dom\";\nimport { isDownloading, isOpeningInNewTab } from \"@ariakit/core/utils/events\";\nimport { disabledFromProps, invariant } from \"@ariakit/core/utils/misc\";\nimport { useCallback } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"div\";\nfunction isSelected(storeValue, itemValue) {\n if (itemValue == null) return;\n if (storeValue == null) return false;\n if (Array.isArray(storeValue)) {\n return storeValue.includes(itemValue);\n }\n return storeValue === itemValue;\n}\nvar useSelectItem = createHook(\n function useSelectItem2(_a) {\n var _b = _a, {\n store,\n value,\n getItem: getItemProp,\n hideOnClick,\n setValueOnClick = value != null,\n preventScrollOnKeyDown = true,\n focusOnHover = true\n } = _b, props = __objRest(_b, [\n \"store\",\n \"value\",\n \"getItem\",\n \"hideOnClick\",\n \"setValueOnClick\",\n \"preventScrollOnKeyDown\",\n \"focusOnHover\"\n ]);\n var _a2;\n const context = useSelectScopedContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"SelectItem must be wrapped in a SelectList or SelectPopover component.\"\n );\n const id = useId(props.id);\n const disabled = disabledFromProps(props);\n const { listElement, multiSelectable, selected, autoFocus } = useStoreStateObject(store, {\n listElement: \"listElement\",\n multiSelectable(state) {\n return Array.isArray(state.value);\n },\n selected(state) {\n return isSelected(state.value, value);\n },\n autoFocus(state) {\n if (value == null) return false;\n if (state.value == null) return false;\n if (state.activeId !== id && (store == null ? void 0 : store.item(state.activeId))) {\n return false;\n }\n if (Array.isArray(state.value)) {\n return state.value[state.value.length - 1] === value;\n }\n return state.value === value;\n }\n });\n const getItem = useCallback(\n (item) => {\n const nextItem = __spreadProps(__spreadValues({}, item), {\n value: disabled ? void 0 : value,\n children: value\n });\n if (getItemProp) {\n return getItemProp(nextItem);\n }\n return nextItem;\n },\n [disabled, value, getItemProp]\n );\n hideOnClick = hideOnClick != null ? hideOnClick : value != null && !multiSelectable;\n const onClickProp = props.onClick;\n const setValueOnClickProp = useBooleanEvent(setValueOnClick);\n const hideOnClickProp = useBooleanEvent(hideOnClick);\n const onClick = useEvent((event) => {\n onClickProp == null ? void 0 : onClickProp(event);\n if (event.defaultPrevented) return;\n if (isDownloading(event)) return;\n if (isOpeningInNewTab(event)) return;\n if (setValueOnClickProp(event) && value != null) {\n store == null ? void 0 : store.setValue((prevValue) => {\n if (!Array.isArray(prevValue)) return value;\n if (prevValue.includes(value)) {\n return prevValue.filter((v) => v !== value);\n }\n return [...prevValue, value];\n });\n }\n if (hideOnClickProp(event)) {\n store == null ? void 0 : store.hide();\n }\n });\n props = useWrapElement(\n props,\n (element) => /* @__PURE__ */ jsx(SelectItemCheckedContext.Provider, { value: selected != null ? selected : false, children: element }),\n [selected]\n );\n props = __spreadProps(__spreadValues({\n id,\n role: getPopupItemRole(listElement),\n \"aria-selected\": selected,\n children: value\n }, props), {\n autoFocus: (_a2 = props.autoFocus) != null ? _a2 : autoFocus,\n onClick\n });\n props = useCompositeItem(__spreadValues({\n store,\n getItem,\n preventScrollOnKeyDown\n }, props));\n const focusOnHoverProp = useBooleanEvent(focusOnHover);\n props = useCompositeHover(__spreadProps(__spreadValues({\n store\n }, props), {\n // We have to disable focusOnHover when the popup is closed, otherwise\n // the active item will change to null (the container) when the popup is\n // closed by clicking on an item.\n focusOnHover(event) {\n if (!focusOnHoverProp(event)) return false;\n const state = store == null ? void 0 : store.getState();\n return !!(state == null ? void 0 : state.open);\n }\n }));\n return props;\n }\n);\nvar SelectItem = memo(\n forwardRef(function SelectItem2(props) {\n const htmlProps = useSelectItem(props);\n return createElement(TagName, htmlProps);\n })\n);\n\nexport {\n useSelectItem,\n SelectItem\n};\n","\"use client\";\n\n// src/checkbox/checkbox-checked-context.tsx\nimport { createContext } from \"react\";\nvar CheckboxCheckedContext = createContext(false);\n\nexport {\n CheckboxCheckedContext\n};\n","\"use client\";\nimport {\n CheckboxCheckedContext\n} from \"./EYKMH5G5.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/checkbox/checkbox-check.tsx\nimport { removeUndefinedValues } from \"@ariakit/core/utils/misc\";\nimport { useContext } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"span\";\nvar checkmark = /* @__PURE__ */ jsx(\n \"svg\",\n {\n display: \"block\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 1.5,\n viewBox: \"0 0 16 16\",\n height: \"1em\",\n width: \"1em\",\n children: /* @__PURE__ */ jsx(\"polyline\", { points: \"4,8 7,12 12,4\" })\n }\n);\nfunction getChildren(props) {\n if (props.checked) {\n return props.children || checkmark;\n }\n if (typeof props.children === \"function\") {\n return props.children;\n }\n return null;\n}\nvar useCheckboxCheck = createHook(\n function useCheckboxCheck2(_a) {\n var _b = _a, { store, checked } = _b, props = __objRest(_b, [\"store\", \"checked\"]);\n const context = useContext(CheckboxCheckedContext);\n checked = checked != null ? checked : context;\n const children = getChildren({ checked, children: props.children });\n props = __spreadProps(__spreadValues({\n \"aria-hidden\": true\n }, props), {\n children,\n style: __spreadValues({\n width: \"1em\",\n height: \"1em\",\n pointerEvents: \"none\"\n }, props.style)\n });\n return removeUndefinedValues(props);\n }\n);\nvar CheckboxCheck = forwardRef(function CheckboxCheck2(props) {\n const htmlProps = useCheckboxCheck(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n useCheckboxCheck,\n CheckboxCheck\n};\n","\"use client\";\nimport {\n useCheckboxCheck\n} from \"../__chunks/5JCRYSSV.js\";\nimport \"../__chunks/EYKMH5G5.js\";\nimport {\n SelectItemCheckedContext\n} from \"../__chunks/KPEX55MY.js\";\nimport \"../__chunks/P7GR5CS5.js\";\nimport \"../__chunks/VDHZ5F7K.js\";\nimport \"../__chunks/MTZPJQMC.js\";\nimport \"../__chunks/RS7LB2H4.js\";\nimport \"../__chunks/S6EF7IVO.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"../__chunks/LMDWO4NN.js\";\nimport \"../__chunks/ABQUS43J.js\";\nimport \"../__chunks/SK3NAZA3.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"../__chunks/3YLGPPWQ.js\";\n\n// src/select/select-item-check.tsx\nimport { useContext } from \"react\";\nvar TagName = \"span\";\nvar useSelectItemCheck = createHook(\n function useSelectItemCheck2(_a) {\n var _b = _a, { store, checked } = _b, props = __objRest(_b, [\"store\", \"checked\"]);\n const context = useContext(SelectItemCheckedContext);\n checked = checked != null ? checked : context;\n props = useCheckboxCheck(__spreadProps(__spreadValues({}, props), { checked }));\n return props;\n }\n);\nvar SelectItemCheck = forwardRef(function SelectItemCheck2(props) {\n const htmlProps = useSelectItemCheck(props);\n return createElement(TagName, htmlProps);\n});\nexport {\n SelectItemCheck,\n useSelectItemCheck\n};\n","/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\nimport { css, keyframes } from '@emotion/react';\nimport styled from '@emotion/styled';\n/**\n * Internal dependencies\n */\nimport { COLORS, CONFIG } from '../utils';\nimport { space } from '../utils/space';\nimport { chevronIconSize } from '../select-control/styles/select-control-styles';\nimport { fontSizeStyles } from '../input-control/styles/input-control-styles';\nimport type { CustomSelectButtonSize } from './types';\n\n// TODO: extract to common utils and apply to relevant components\nconst ANIMATION_PARAMS = {\n\tSLIDE_AMOUNT: '2px',\n\tDURATION: '400ms',\n\tEASING: 'cubic-bezier( 0.16, 1, 0.3, 1 )',\n};\n\nconst INLINE_PADDING = {\n\tcompact: CONFIG.controlPaddingXSmall,\n\tsmall: CONFIG.controlPaddingXSmall,\n\tdefault: CONFIG.controlPaddingX,\n};\n\nconst getSelectSize = (\n\tsize: NonNullable< CustomSelectButtonSize[ 'size' ] >,\n\theightProperty: 'minHeight' | 'height'\n) => {\n\tconst sizes = {\n\t\tcompact: {\n\t\t\t[ heightProperty ]: 32,\n\t\t\tpaddingInlineStart: INLINE_PADDING.compact,\n\t\t\tpaddingInlineEnd: INLINE_PADDING.compact + chevronIconSize,\n\t\t},\n\t\tdefault: {\n\t\t\t[ heightProperty ]: 40,\n\t\t\tpaddingInlineStart: INLINE_PADDING.default,\n\t\t\tpaddingInlineEnd: INLINE_PADDING.default + chevronIconSize,\n\t\t},\n\t\tsmall: {\n\t\t\t[ heightProperty ]: 24,\n\t\t\tpaddingInlineStart: INLINE_PADDING.small,\n\t\t\tpaddingInlineEnd: INLINE_PADDING.small + chevronIconSize,\n\t\t},\n\t};\n\n\treturn sizes[ size ] || sizes.default;\n};\n\nconst getSelectItemSize = (\n\tsize: NonNullable< CustomSelectButtonSize[ 'size' ] >\n) => {\n\t// Used to visually align the checkmark with the chevron\n\tconst checkmarkCorrection = 6;\n\tconst sizes = {\n\t\tcompact: {\n\t\t\tpaddingInlineStart: INLINE_PADDING.compact,\n\t\t\tpaddingInlineEnd: INLINE_PADDING.compact - checkmarkCorrection,\n\t\t},\n\t\tdefault: {\n\t\t\tpaddingInlineStart: INLINE_PADDING.default,\n\t\t\tpaddingInlineEnd: INLINE_PADDING.default - checkmarkCorrection,\n\t\t},\n\t\tsmall: {\n\t\t\tpaddingInlineStart: INLINE_PADDING.small,\n\t\t\tpaddingInlineEnd: INLINE_PADDING.small - checkmarkCorrection,\n\t\t},\n\t};\n\n\treturn sizes[ size ] || sizes.default;\n};\n\nexport const Select = styled( Ariakit.Select, {\n\t// Do not forward `hasCustomRenderProp` to the underlying Ariakit.Select component\n\tshouldForwardProp: ( prop ) => prop !== 'hasCustomRenderProp',\n} )(\n\t( {\n\t\tsize,\n\t\thasCustomRenderProp,\n\t}: {\n\t\tsize: NonNullable< CustomSelectButtonSize[ 'size' ] >;\n\t\thasCustomRenderProp: boolean;\n\t} ) => css`\n\t\tdisplay: block;\n\t\tbackground-color: ${ COLORS.theme.background };\n\t\tborder: none;\n\t\tcolor: ${ COLORS.theme.foreground };\n\t\tcursor: pointer;\n\t\tfont-family: inherit;\n\t\ttext-align: start;\n\t\tuser-select: none;\n\t\twidth: 100%;\n\n\t\t&[data-focus-visible] {\n\t\t\toutline: none; // handled by InputBase component\n\t\t}\n\n\t\t${ getSelectSize( size, hasCustomRenderProp ? 'minHeight' : 'height' ) }\n\t\t${ ! hasCustomRenderProp && truncateStyles }\n\t\t${ fontSizeStyles( { inputSize: size } ) }\n\t`\n);\n\nconst slideDownAndFade = keyframes( {\n\t'0%': {\n\t\topacity: 0,\n\t\ttransform: `translateY(-${ ANIMATION_PARAMS.SLIDE_AMOUNT })`,\n\t},\n\t'100%': { opacity: 1, transform: 'translateY(0)' },\n} );\n\nexport const SelectPopover = styled( Ariakit.SelectPopover )`\n\tdisplay: flex;\n\tflex-direction: column;\n\n\tbackground-color: ${ COLORS.theme.background };\n\tborder-radius: ${ CONFIG.radiusSmall };\n\tborder: 1px solid ${ COLORS.theme.foreground };\n\tbox-shadow: ${ CONFIG.elevationMedium };\n\n\t/* z-index(\".components-popover\") */\n\tz-index: 1000000;\n\n\tmax-height: min( var( --popover-available-height, 400px ), 400px );\n\toverflow: auto;\n\toverscroll-behavior: contain;\n\n\t/* The smallest size without overflowing the container. */\n\tmin-width: min-content;\n\n\t/* Animation */\n\t&[data-open] {\n\t\t@media not ( prefers-reduced-motion ) {\n\t\t\tanimation-duration: ${ ANIMATION_PARAMS.DURATION };\n\t\t\tanimation-timing-function: ${ ANIMATION_PARAMS.EASING };\n\t\t\tanimation-name: ${ slideDownAndFade };\n\t\t\twill-change: transform, opacity;\n\t\t}\n\t}\n\n\t&[data-focus-visible] {\n\t\t/* The outline will be on the trigger, rather than the popover. */\n\t\toutline: none;\n\t}\n`;\n\nexport const SelectItem = styled( Ariakit.SelectItem )(\n\t( {\n\t\tsize,\n\t}: {\n\t\tsize: NonNullable< CustomSelectButtonSize[ 'size' ] >;\n\t} ) => css`\n\t\tcursor: default;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: space-between;\n\t\tfont-size: ${ CONFIG.fontSize };\n\t\t// TODO: reassess line-height for non-legacy v2\n\t\tline-height: 28px;\n\t\tpadding-block: ${ space( 2 ) };\n\t\tscroll-margin: ${ space( 1 ) };\n\t\tuser-select: none;\n\n\t\t&[aria-disabled='true'] {\n\t\t\tcursor: not-allowed;\n\t\t}\n\n\t\t&[data-active-item] {\n\t\t\tbackground-color: ${ COLORS.theme.gray[ 300 ] };\n\t\t}\n\n\t\t${ getSelectItemSize( size ) }\n\t`\n);\n\nconst truncateStyles = css`\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n`;\n\nexport const SelectedExperimentalHintWrapper = styled.div`\n\t${ truncateStyles }\n`;\n\nexport const SelectedExperimentalHintItem = styled.span`\n\tcolor: ${ COLORS.theme.gray[ 600 ] };\n\tmargin-inline-start: ${ space( 2 ) };\n`;\n\nexport const WithHintItemWrapper = styled.div`\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tflex-wrap: wrap;\n\tflex: 1;\n\tcolumn-gap: ${ space( 4 ) };\n`;\n\nexport const WithHintItemHint = styled.span`\n\tcolor: ${ COLORS.theme.gray[ 600 ] };\n\ttext-align: initial;\n\tline-height: ${ CONFIG.fontLineHeightBase };\n\tpadding-inline-end: ${ space( 1 ) };\n\tmargin-block: ${ space( 1 ) };\n`;\n\nexport const SelectedItemCheck = styled( Ariakit.SelectItemCheck )`\n\tdisplay: flex;\n\talign-items: center;\n\tmargin-inline-start: ${ space( 2 ) };\n\n\t// Keep the checkmark vertically aligned at the top. Since the item text has a\n\t// 28px line height and the checkmark is 24px tall, a (28-24)/2 = 2px margin\n\t// is applied to keep the correct alignment between the text and the checkmark.\n\talign-self: start;\n\tmargin-block-start: 2px;\n\n\t// Since the checkmark's dimensions are applied with 'em' units, setting a\n\t// font size of 0 allows the space reserved for the checkmark to collapse for\n\t// items that are not selected or that don't have an associated item hint.\n\tfont-size: 0;\n\t${ WithHintItemWrapper } ~ &,\n\t&:not(:empty) {\n\t\tfont-size: 24px; // Size of checkmark icon\n\t}\n`;\n","/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { createContext, useCallback, useMemo } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { VisuallyHidden } from '..';\nimport * as Styled from './styles';\nimport type {\n\tCustomSelectContext as CustomSelectContextType,\n\tCustomSelectStore,\n\tCustomSelectButtonProps,\n\tCustomSelectButtonSize,\n\t_CustomSelectInternalProps,\n\t_CustomSelectProps,\n} from './types';\nimport InputBase from '../input-control/input-base';\nimport SelectControlChevronDown from '../select-control/chevron-down';\nimport BaseControl from '../base-control';\n\nexport const CustomSelectContext =\n\tcreateContext< CustomSelectContextType >( undefined );\n\nfunction defaultRenderSelectedValue(\n\tvalue: CustomSelectButtonProps[ 'value' ]\n) {\n\tconst isValueEmpty = Array.isArray( value )\n\t\t? value.length === 0\n\t\t: value === undefined || value === null;\n\n\tif ( isValueEmpty ) {\n\t\treturn __( 'Select an item' );\n\t}\n\n\tif ( Array.isArray( value ) ) {\n\t\treturn value.length === 1\n\t\t\t? value[ 0 ]\n\t\t\t: // translators: %s: number of items selected (it will always be 2 or more items)\n\t\t\t sprintf( __( '%s items selected' ), value.length );\n\t}\n\n\treturn value;\n}\n\nconst CustomSelectButton = ( {\n\trenderSelectedValue,\n\tsize = 'default',\n\tstore,\n\t...restProps\n}: Omit<\n\tReact.ComponentProps< typeof Ariakit.Select > &\n\t\tCustomSelectButtonProps &\n\t\tCustomSelectButtonSize &\n\t\tCustomSelectStore,\n\t'onChange'\n> ) => {\n\tconst { value: currentValue } = Ariakit.useStoreState( store );\n\n\tconst computedRenderSelectedValue = useMemo(\n\t\t() => renderSelectedValue ?? defaultRenderSelectedValue,\n\t\t[ renderSelectedValue ]\n\t);\n\n\treturn (\n\t\t<Styled.Select\n\t\t\t{ ...restProps }\n\t\t\tsize={ size }\n\t\t\thasCustomRenderProp={ !! renderSelectedValue }\n\t\t\tstore={ store }\n\t\t>\n\t\t\t{ computedRenderSelectedValue( currentValue ) }\n\t\t</Styled.Select>\n\t);\n};\n\nfunction _CustomSelect(\n\tprops: _CustomSelectInternalProps &\n\t\t_CustomSelectProps &\n\t\tCustomSelectStore &\n\t\tCustomSelectButtonSize\n) {\n\tconst {\n\t\tchildren,\n\t\thideLabelFromVision = false,\n\t\tlabel,\n\t\tsize,\n\t\tstore,\n\t\tclassName,\n\t\tisLegacy = false,\n\t\t...restProps\n\t} = props;\n\n\tconst onSelectPopoverKeyDown: React.KeyboardEventHandler< HTMLDivElement > =\n\t\tuseCallback(\n\t\t\t( e ) => {\n\t\t\t\tif ( isLegacy ) {\n\t\t\t\t\te.stopPropagation();\n\t\t\t\t}\n\t\t\t},\n\t\t\t[ isLegacy ]\n\t\t);\n\n\tconst contextValue = useMemo( () => ( { store, size } ), [ store, size ] );\n\n\treturn (\n\t\t// Where should `restProps` be forwarded to?\n\t\t<div className={ className }>\n\t\t\t<Ariakit.SelectLabel\n\t\t\t\tstore={ store }\n\t\t\t\trender={\n\t\t\t\t\thideLabelFromVision ? (\n\t\t\t\t\t\t// @ts-expect-error `children` are passed via the render prop\n\t\t\t\t\t\t<VisuallyHidden />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t// @ts-expect-error `children` are passed via the render prop\n\t\t\t\t\t\t<BaseControl.VisualLabel as=\"div\" />\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t{ label }\n\t\t\t</Ariakit.SelectLabel>\n\t\t\t<InputBase\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tsize={ size }\n\t\t\t\tsuffix={ <SelectControlChevronDown /> }\n\t\t\t>\n\t\t\t\t<CustomSelectButton\n\t\t\t\t\t{ ...restProps }\n\t\t\t\t\tsize={ size }\n\t\t\t\t\tstore={ store }\n\t\t\t\t\t// Match legacy behavior (move selection rather than open the popover)\n\t\t\t\t\tshowOnKeyDown={ ! isLegacy }\n\t\t\t\t/>\n\t\t\t\t<Styled.SelectPopover\n\t\t\t\t\tgutter={ 12 }\n\t\t\t\t\tstore={ store }\n\t\t\t\t\tsameWidth\n\t\t\t\t\tslide={ false }\n\t\t\t\t\tonKeyDown={ onSelectPopoverKeyDown }\n\t\t\t\t\t// Match legacy behavior\n\t\t\t\t\tflip={ ! isLegacy }\n\t\t\t\t>\n\t\t\t\t\t<CustomSelectContext.Provider value={ contextValue }>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</CustomSelectContext.Provider>\n\t\t\t\t</Styled.SelectPopover>\n\t\t\t</InputBase>\n\t\t</div>\n\t);\n}\n\nexport default _CustomSelect;\n","/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\nimport { Icon, check } from '@wordpress/icons';\n/**\n * Internal dependencies\n */\nimport type { CustomSelectItemProps } from './types';\nimport type { WordPressComponentProps } from '../context';\nimport * as Styled from './styles';\nimport { CustomSelectContext } from './custom-select';\n\nexport function CustomSelectItem( {\n\tchildren,\n\t...props\n}: WordPressComponentProps< CustomSelectItemProps, 'div', false > ) {\n\tconst customSelectContext = useContext( CustomSelectContext );\n\treturn (\n\t\t<Styled.SelectItem\n\t\t\tstore={ customSelectContext?.store }\n\t\t\tsize={ customSelectContext?.size ?? 'default' }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ children ?? props.value }\n\t\t\t<Styled.SelectedItemCheck>\n\t\t\t\t<Icon icon={ check } />\n\t\t\t</Styled.SelectedItemCheck>\n\t\t</Styled.SelectItem>\n\t);\n}\n\nCustomSelectItem.displayName = 'CustomSelectControlV2.Item';\n\nexport default CustomSelectItem;\n","/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport _CustomSelect from '../custom-select-control-v2/custom-select';\nimport CustomSelectItem from '../custom-select-control-v2/item';\nimport * as Styled from '../custom-select-control-v2/styles';\nimport type { CustomSelectProps, CustomSelectOption } from './types';\nimport { VisuallyHidden } from '../visually-hidden';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\n\nfunction useDeprecatedProps< T extends CustomSelectOption >( {\n\t__experimentalShowSelectedHint,\n\t...otherProps\n}: CustomSelectProps< T > ) {\n\treturn {\n\t\tshowSelectedHint: __experimentalShowSelectedHint,\n\t\t...otherProps,\n\t};\n}\n\n// The removal of `__experimentalHint` in favour of `hint` doesn't happen in\n// the `useDeprecatedProps` hook in order not to break consumers that rely\n// on object identity (see https://github.com/WordPress/gutenberg/pull/63248#discussion_r1672213131)\nfunction applyOptionDeprecations( {\n\t__experimentalHint,\n\t...rest\n}: CustomSelectOption ) {\n\treturn {\n\t\thint: __experimentalHint,\n\t\t...rest,\n\t};\n}\n\nfunction getDescribedBy( currentValue: string, describedBy?: string ) {\n\tif ( describedBy ) {\n\t\treturn describedBy;\n\t}\n\n\t// translators: %s: The selected option.\n\treturn sprintf( __( 'Currently selected: %s' ), currentValue );\n}\n\nfunction CustomSelectControl< T extends CustomSelectOption >(\n\tprops: CustomSelectProps< T >\n) {\n\tconst {\n\t\t__next40pxDefaultSize = false,\n\t\t__shouldNotWarnDeprecated36pxSize,\n\t\tdescribedBy,\n\t\toptions,\n\t\tonChange,\n\t\tsize = 'default',\n\t\tvalue,\n\t\tclassName: classNameProp,\n\t\tshowSelectedHint = false,\n\t\t...restProps\n\t} = useDeprecatedProps( props );\n\n\tmaybeWarnDeprecated36pxSize( {\n\t\tcomponentName: 'CustomSelectControl',\n\t\t__next40pxDefaultSize,\n\t\tsize,\n\t\t__shouldNotWarnDeprecated36pxSize,\n\t} );\n\n\tconst descriptionId = useInstanceId(\n\t\tCustomSelectControl,\n\t\t'custom-select-control__description'\n\t);\n\n\t// Forward props + store from v2 implementation\n\tconst store = Ariakit.useSelectStore< string >( {\n\t\tasync setValue( nextValue ) {\n\t\t\tconst nextOption = options.find(\n\t\t\t\t( item ) => item.name === nextValue\n\t\t\t);\n\n\t\t\tif ( ! onChange || ! nextOption ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Executes the logic in a microtask after the popup is closed.\n\t\t\t// This is simply to ensure the isOpen state matches the one from the\n\t\t\t// previous legacy implementation.\n\t\t\tawait Promise.resolve();\n\t\t\tconst state = store.getState();\n\n\t\t\tconst changeObject = {\n\t\t\t\thighlightedIndex: state.renderedItems.findIndex(\n\t\t\t\t\t( item ) => item.value === nextValue\n\t\t\t\t),\n\t\t\t\tinputValue: '',\n\t\t\t\tisOpen: state.open,\n\t\t\t\tselectedItem: nextOption,\n\t\t\t\ttype: '',\n\t\t\t};\n\t\t\tonChange( changeObject );\n\t\t},\n\t\tvalue: value?.name,\n\t\t// Setting the first option as a default value when no value is provided\n\t\t// is already done natively by the underlying Ariakit component,\n\t\t// but doing this explicitly avoids the `onChange` callback from firing\n\t\t// on initial render, thus making this implementation closer to the v1.\n\t\tdefaultValue: options[ 0 ]?.name,\n\t} );\n\n\tconst children = options\n\t\t.map( applyOptionDeprecations )\n\t\t.map( ( { name, key, hint, style, className } ) => {\n\t\t\tconst withHint = (\n\t\t\t\t<Styled.WithHintItemWrapper>\n\t\t\t\t\t<span>{ name }</span>\n\t\t\t\t\t<Styled.WithHintItemHint\n\t\t\t\t\t\t// Keeping the classname for legacy reasons\n\t\t\t\t\t\tclassName=\"components-custom-select-control__item-hint\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ hint }\n\t\t\t\t\t</Styled.WithHintItemHint>\n\t\t\t\t</Styled.WithHintItemWrapper>\n\t\t\t);\n\n\t\t\treturn (\n\t\t\t\t<CustomSelectItem\n\t\t\t\t\tkey={ key }\n\t\t\t\t\tvalue={ name }\n\t\t\t\t\tchildren={ hint ? withHint : name }\n\t\t\t\t\tstyle={ style }\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t// Keeping the classnames for legacy reasons\n\t\t\t\t\t\t'components-custom-select-control__item',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'has-hint': hint,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t);\n\t\t} );\n\n\tconst currentValue = Ariakit.useStoreState( store, 'value' );\n\n\tconst renderSelectedValueHint = () => {\n\t\tconst selectedOptionHint = options\n\t\t\t?.map( applyOptionDeprecations )\n\t\t\t?.find( ( { name } ) => currentValue === name )?.hint;\n\n\t\treturn (\n\t\t\t<Styled.SelectedExperimentalHintWrapper>\n\t\t\t\t{ currentValue }\n\t\t\t\t{ selectedOptionHint && (\n\t\t\t\t\t<Styled.SelectedExperimentalHintItem\n\t\t\t\t\t\t// Keeping the classname for legacy reasons\n\t\t\t\t\t\tclassName=\"components-custom-select-control__hint\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ selectedOptionHint }\n\t\t\t\t\t</Styled.SelectedExperimentalHintItem>\n\t\t\t\t) }\n\t\t\t</Styled.SelectedExperimentalHintWrapper>\n\t\t);\n\t};\n\n\tconst translatedSize = ( () => {\n\t\tif (\n\t\t\t( __next40pxDefaultSize && size === 'default' ) ||\n\t\t\tsize === '__unstable-large'\n\t\t) {\n\t\t\treturn 'default';\n\t\t}\n\t\tif ( ! __next40pxDefaultSize && size === 'default' ) {\n\t\t\treturn 'compact';\n\t\t}\n\t\treturn size;\n\t} )();\n\n\treturn (\n\t\t<>\n\t\t\t<_CustomSelect\n\t\t\t\taria-describedby={ descriptionId }\n\t\t\t\trenderSelectedValue={\n\t\t\t\t\tshowSelectedHint ? renderSelectedValueHint : undefined\n\t\t\t\t}\n\t\t\t\tsize={ translatedSize }\n\t\t\t\tstore={ store }\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\t// Keeping the classname for legacy reasons\n\t\t\t\t\t'components-custom-select-control',\n\t\t\t\t\tclassNameProp\n\t\t\t\t) }\n\t\t\t\tisLegacy\n\t\t\t\t{ ...restProps }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</_CustomSelect>\n\t\t\t<VisuallyHidden>\n\t\t\t\t<span id={ descriptionId }>\n\t\t\t\t\t{ getDescribedBy( currentValue, describedBy ) }\n\t\t\t\t</span>\n\t\t\t</VisuallyHidden>\n\t\t</>\n\t);\n}\n\nexport default CustomSelectControl;\n","\"use client\";\nimport {\n useComboboxProviderContext\n} from \"./VEVQD5MH.js\";\nimport {\n useCompositeStoreOptions,\n useCompositeStoreProps\n} from \"./4CMBR7SL.js\";\nimport {\n usePopoverStoreProps\n} from \"./O2PQ2652.js\";\nimport {\n useStore,\n useStoreProps\n} from \"./YV4JVR4I.js\";\nimport {\n useUpdateEffect\n} from \"./ABQUS43J.js\";\nimport {\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/select/select-store.ts\nimport * as Core from \"@ariakit/core/select/select-store\";\nfunction useSelectStoreOptions(props) {\n const combobox = useComboboxProviderContext();\n props = __spreadProps(__spreadValues({}, props), {\n combobox: props.combobox !== void 0 ? props.combobox : combobox\n });\n return useCompositeStoreOptions(props);\n}\nfunction useSelectStoreProps(store, update, props) {\n useUpdateEffect(update, [props.combobox]);\n useStoreProps(store, props, \"value\", \"setValue\");\n useStoreProps(store, props, \"setValueOnMove\");\n return Object.assign(\n usePopoverStoreProps(\n useCompositeStoreProps(store, update, props),\n update,\n props\n ),\n { combobox: props.combobox }\n );\n}\nfunction useSelectStore(props = {}) {\n props = useSelectStoreOptions(props);\n const [store, update] = useStore(Core.createSelectStore, props);\n return useSelectStoreProps(store, update, props);\n}\n\nexport {\n useSelectStoreOptions,\n useSelectStoreProps,\n useSelectStore\n};\n","/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param argument - The value to convert\n *\n * @returns The parsed date in the local time zone\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\nexport function toDate(argument) {\n const argStr = Object.prototype.toString.call(argument);\n\n // Clone the date\n if (\n argument instanceof Date ||\n (typeof argument === \"object\" && argStr === \"[object Date]\")\n ) {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new argument.constructor(+argument);\n } else if (\n typeof argument === \"number\" ||\n argStr === \"[object Number]\" ||\n typeof argument === \"string\" ||\n argStr === \"[object String]\"\n ) {\n // TODO: Can we get rid of as?\n return new Date(argument);\n } else {\n // TODO: Can we get rid of as?\n return new Date(NaN);\n }\n}\n\n// Fallback for modularized imports:\nexport default toDate;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name startOfDay\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The start of a day\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\nexport function startOfDay(date) {\n const _date = toDate(date);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfDay;\n","/**\n * @name constructFrom\n * @category Generic Helpers\n * @summary Constructs a date using the reference date and the value\n *\n * @description\n * The function constructs a new date using the constructor from the reference\n * date and the given value. It helps to build generic functions that accept\n * date extensions.\n *\n * It defaults to `Date` if the passed reference date is a number or a string.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The reference date to take constructor from\n * @param value - The value to create the date\n *\n * @returns Date initialized using the given date and value\n *\n * @example\n * import { constructFrom } from 'date-fns'\n *\n * // A function that clones a date preserving the original type\n * function cloneDate<DateType extends Date(date: DateType): DateType {\n * return constructFrom(\n * date, // Use contrustor from the given date\n * date.getTime() // Use the date value to create a new date\n * )\n * }\n */\nexport function constructFrom(date, value) {\n if (date instanceof Date) {\n return new date.constructor(value);\n } else {\n return new Date(value);\n }\n}\n\n// Fallback for modularized imports:\nexport default constructFrom;\n","import { toDate } from \"./toDate.mjs\";\nimport { constructFrom } from \"./constructFrom.mjs\";\n\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param amount - The amount of months to be added.\n *\n * @returns The new date with the months added\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n *\n * // Add one month to 30 January 2023:\n * const result = addMonths(new Date(2023, 0, 30), 1)\n * //=> Tue Feb 28 2023 00:00:00\n */\nexport function addMonths(date, amount) {\n const _date = toDate(date);\n if (isNaN(amount)) return constructFrom(date, NaN);\n if (!amount) {\n // If 0 months, no-op to avoid changing times in the hour before end of DST\n return _date;\n }\n const dayOfMonth = _date.getDate();\n\n // The JS Date object supports date math by accepting out-of-bounds values for\n // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we\n // want except that dates will wrap around the end of a month, meaning that\n // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n // we'll default to the end of the desired month by adding 1 to the desired\n // month and using a date of 0 to back up one day to the end of the desired\n // month.\n const endOfDesiredMonth = constructFrom(date, _date.getTime());\n endOfDesiredMonth.setMonth(_date.getMonth() + amount + 1, 0);\n const daysInMonth = endOfDesiredMonth.getDate();\n if (dayOfMonth >= daysInMonth) {\n // If we're already at the end of the month, then this is the correct date\n // and we're done.\n return endOfDesiredMonth;\n } else {\n // Otherwise, we now know that setting the original day-of-month value won't\n // cause an overflow, so set the desired day-of-month. Note that we can't\n // just set the date of `endOfDesiredMonth` because that object may have had\n // its time changed in the unusual case where where a DST transition was on\n // the last day of the month and its local time was in the hour skipped or\n // repeated next to a DST transition. So we use `date` instead which is\n // guaranteed to still have the original time.\n _date.setFullYear(\n endOfDesiredMonth.getFullYear(),\n endOfDesiredMonth.getMonth(),\n dayOfMonth,\n );\n return _date;\n }\n}\n\n// Fallback for modularized imports:\nexport default addMonths;\n","import { addMonths } from \"./addMonths.mjs\";\n\n/**\n * @name subMonths\n * @category Month Helpers\n * @summary Subtract the specified number of months from the given date.\n *\n * @description\n * Subtract the specified number of months from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param amount - The amount of months to be subtracted.\n *\n * @returns The new date with the months subtracted\n *\n * @example\n * // Subtract 5 months from 1 February 2015:\n * const result = subMonths(new Date(2015, 1, 1), 5)\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function subMonths(date, amount) {\n return addMonths(date, -amount);\n}\n\n// Fallback for modularized imports:\nexport default subMonths;\n","const formatDistanceLocale = {\n lessThanXSeconds: {\n one: \"less than a second\",\n other: \"less than {{count}} seconds\",\n },\n\n xSeconds: {\n one: \"1 second\",\n other: \"{{count}} seconds\",\n },\n\n halfAMinute: \"half a minute\",\n\n lessThanXMinutes: {\n one: \"less than a minute\",\n other: \"less than {{count}} minutes\",\n },\n\n xMinutes: {\n one: \"1 minute\",\n other: \"{{count}} minutes\",\n },\n\n aboutXHours: {\n one: \"about 1 hour\",\n other: \"about {{count}} hours\",\n },\n\n xHours: {\n one: \"1 hour\",\n other: \"{{count}} hours\",\n },\n\n xDays: {\n one: \"1 day\",\n other: \"{{count}} days\",\n },\n\n aboutXWeeks: {\n one: \"about 1 week\",\n other: \"about {{count}} weeks\",\n },\n\n xWeeks: {\n one: \"1 week\",\n other: \"{{count}} weeks\",\n },\n\n aboutXMonths: {\n one: \"about 1 month\",\n other: \"about {{count}} months\",\n },\n\n xMonths: {\n one: \"1 month\",\n other: \"{{count}} months\",\n },\n\n aboutXYears: {\n one: \"about 1 year\",\n other: \"about {{count}} years\",\n },\n\n xYears: {\n one: \"1 year\",\n other: \"{{count}} years\",\n },\n\n overXYears: {\n one: \"over 1 year\",\n other: \"over {{count}} years\",\n },\n\n almostXYears: {\n one: \"almost 1 year\",\n other: \"almost {{count}} years\",\n },\n};\n\nexport const formatDistance = (token, count, options) => {\n let result;\n\n const tokenValue = formatDistanceLocale[token];\n if (typeof tokenValue === \"string\") {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace(\"{{count}}\", count.toString());\n }\n\n if (options?.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return \"in \" + result;\n } else {\n return result + \" ago\";\n }\n }\n\n return result;\n};\n","export function buildFormatLongFn(args) {\n return (options = {}) => {\n // TODO: Remove String()\n const width = options.width ? String(options.width) : args.defaultWidth;\n const format = args.formats[width] || args.formats[args.defaultWidth];\n return format;\n };\n}\n","import { buildFormatLongFn } from \"../../_lib/buildFormatLongFn.mjs\";\n\nconst dateFormats = {\n full: \"EEEE, MMMM do, y\",\n long: \"MMMM do, y\",\n medium: \"MMM d, y\",\n short: \"MM/dd/yyyy\",\n};\n\nconst timeFormats = {\n full: \"h:mm:ss a zzzz\",\n long: \"h:mm:ss a z\",\n medium: \"h:mm:ss a\",\n short: \"h:mm a\",\n};\n\nconst dateTimeFormats = {\n full: \"{{date}} 'at' {{time}}\",\n long: \"{{date}} 'at' {{time}}\",\n medium: \"{{date}}, {{time}}\",\n short: \"{{date}}, {{time}}\",\n};\n\nexport const formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: \"full\",\n }),\n\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: \"full\",\n }),\n\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: \"full\",\n }),\n};\n","const formatRelativeLocale = {\n lastWeek: \"'last' eeee 'at' p\",\n yesterday: \"'yesterday at' p\",\n today: \"'today at' p\",\n tomorrow: \"'tomorrow at' p\",\n nextWeek: \"eeee 'at' p\",\n other: \"P\",\n};\n\nexport const formatRelative = (token, _date, _baseDate, _options) =>\n formatRelativeLocale[token];\n","/* eslint-disable no-unused-vars */\n\n/**\n * The localize function argument callback which allows to convert raw value to\n * the actual type.\n *\n * @param value - The value to convert\n *\n * @returns The converted value\n */\n\n/**\n * The map of localized values for each width.\n */\n\n/**\n * The index type of the locale unit value. It types conversion of units of\n * values that don't start at 0 (i.e. quarters).\n */\n\n/**\n * Converts the unit value to the tuple of values.\n */\n\n/**\n * The tuple of localized era values. The first element represents BC,\n * the second element represents AD.\n */\n\n/**\n * The tuple of localized quarter values. The first element represents Q1.\n */\n\n/**\n * The tuple of localized day values. The first element represents Sunday.\n */\n\n/**\n * The tuple of localized month values. The first element represents January.\n */\n\nexport function buildLocalizeFn(args) {\n return (value, options) => {\n const context = options?.context ? String(options.context) : \"standalone\";\n\n let valuesArray;\n if (context === \"formatting\" && args.formattingValues) {\n const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n const width = options?.width ? String(options.width) : defaultWidth;\n\n valuesArray =\n args.formattingValues[width] || args.formattingValues[defaultWidth];\n } else {\n const defaultWidth = args.defaultWidth;\n const width = options?.width ? String(options.width) : args.defaultWidth;\n\n valuesArray = args.values[width] || args.values[defaultWidth];\n }\n const index = args.argumentCallback ? args.argumentCallback(value) : value;\n\n // @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n return valuesArray[index];\n };\n}\n","import { buildLocalizeFn } from \"../../_lib/buildLocalizeFn.mjs\";\n\nconst eraValues = {\n narrow: [\"B\", \"A\"],\n abbreviated: [\"BC\", \"AD\"],\n wide: [\"Before Christ\", \"Anno Domini\"],\n};\n\nconst quarterValues = {\n narrow: [\"1\", \"2\", \"3\", \"4\"],\n abbreviated: [\"Q1\", \"Q2\", \"Q3\", \"Q4\"],\n wide: [\"1st quarter\", \"2nd quarter\", \"3rd quarter\", \"4th quarter\"],\n};\n\n// Note: in English, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\nconst monthValues = {\n narrow: [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"],\n abbreviated: [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n ],\n\n wide: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n};\n\nconst dayValues = {\n narrow: [\"S\", \"M\", \"T\", \"W\", \"T\", \"F\", \"S\"],\n short: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n abbreviated: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n wide: [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n ],\n};\n\nconst dayPeriodValues = {\n narrow: {\n am: \"a\",\n pm: \"p\",\n midnight: \"mi\",\n noon: \"n\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n abbreviated: {\n am: \"AM\",\n pm: \"PM\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n wide: {\n am: \"a.m.\",\n pm: \"p.m.\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n};\n\nconst formattingDayPeriodValues = {\n narrow: {\n am: \"a\",\n pm: \"p\",\n midnight: \"mi\",\n noon: \"n\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n abbreviated: {\n am: \"AM\",\n pm: \"PM\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n wide: {\n am: \"a.m.\",\n pm: \"p.m.\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n};\n\nconst ordinalNumber = (dirtyNumber, _options) => {\n const number = Number(dirtyNumber);\n\n // If ordinal numbers depend on context, for example,\n // if they are different for different grammatical genders,\n // use `options.unit`.\n //\n // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n // 'day', 'hour', 'minute', 'second'.\n\n const rem100 = number % 100;\n if (rem100 > 20 || rem100 < 10) {\n switch (rem100 % 10) {\n case 1:\n return number + \"st\";\n case 2:\n return number + \"nd\";\n case 3:\n return number + \"rd\";\n }\n }\n return number + \"th\";\n};\n\nexport const localize = {\n ordinalNumber,\n\n era: buildLocalizeFn({\n values: eraValues,\n defaultWidth: \"wide\",\n }),\n\n quarter: buildLocalizeFn({\n values: quarterValues,\n defaultWidth: \"wide\",\n argumentCallback: (quarter) => quarter - 1,\n }),\n\n month: buildLocalizeFn({\n values: monthValues,\n defaultWidth: \"wide\",\n }),\n\n day: buildLocalizeFn({\n values: dayValues,\n defaultWidth: \"wide\",\n }),\n\n dayPeriod: buildLocalizeFn({\n values: dayPeriodValues,\n defaultWidth: \"wide\",\n formattingValues: formattingDayPeriodValues,\n defaultFormattingWidth: \"wide\",\n }),\n};\n","export function buildMatchFn(args) {\n return (string, options = {}) => {\n const width = options.width;\n\n const matchPattern =\n (width && args.matchPatterns[width]) ||\n args.matchPatterns[args.defaultMatchWidth];\n const matchResult = string.match(matchPattern);\n\n if (!matchResult) {\n return null;\n }\n const matchedString = matchResult[0];\n\n const parsePatterns =\n (width && args.parsePatterns[width]) ||\n args.parsePatterns[args.defaultParseWidth];\n\n const key = Array.isArray(parsePatterns)\n ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type\n findKey(parsePatterns, (pattern) => pattern.test(matchedString));\n\n let value;\n\n value = args.valueCallback ? args.valueCallback(key) : key;\n value = options.valueCallback\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type\n options.valueCallback(value)\n : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n\nfunction findKey(object, predicate) {\n for (const key in object) {\n if (\n Object.prototype.hasOwnProperty.call(object, key) &&\n predicate(object[key])\n ) {\n return key;\n }\n }\n return undefined;\n}\n\nfunction findIndex(array, predicate) {\n for (let key = 0; key < array.length; key++) {\n if (predicate(array[key])) {\n return key;\n }\n }\n return undefined;\n}\n","import { buildMatchFn } from \"../../_lib/buildMatchFn.mjs\";\nimport { buildMatchPatternFn } from \"../../_lib/buildMatchPatternFn.mjs\";\n\nconst matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nconst parseOrdinalNumberPattern = /\\d+/i;\n\nconst matchEraPatterns = {\n narrow: /^(b|a)/i,\n abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n wide: /^(before christ|before common era|anno domini|common era)/i,\n};\nconst parseEraPatterns = {\n any: [/^b/i, /^(a|c)/i],\n};\n\nconst matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^q[1234]/i,\n wide: /^[1234](th|st|nd|rd)? quarter/i,\n};\nconst parseQuarterPatterns = {\n any: [/1/i, /2/i, /3/i, /4/i],\n};\n\nconst matchMonthPatterns = {\n narrow: /^[jfmasond]/i,\n abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i,\n};\nconst parseMonthPatterns = {\n narrow: [\n /^j/i,\n /^f/i,\n /^m/i,\n /^a/i,\n /^m/i,\n /^j/i,\n /^j/i,\n /^a/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n\n any: [\n /^ja/i,\n /^f/i,\n /^mar/i,\n /^ap/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^au/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n};\n\nconst matchDayPatterns = {\n narrow: /^[smtwf]/i,\n short: /^(su|mo|tu|we|th|fr|sa)/i,\n abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i,\n};\nconst parseDayPatterns = {\n narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i],\n};\n\nconst matchDayPeriodPatterns = {\n narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i,\n};\nconst parseDayPeriodPatterns = {\n any: {\n am: /^a/i,\n pm: /^p/i,\n midnight: /^mi/i,\n noon: /^no/i,\n morning: /morning/i,\n afternoon: /afternoon/i,\n evening: /evening/i,\n night: /night/i,\n },\n};\n\nexport const match = {\n ordinalNumber: buildMatchPatternFn({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: (value) => parseInt(value, 10),\n }),\n\n era: buildMatchFn({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseEraPatterns,\n defaultParseWidth: \"any\",\n }),\n\n quarter: buildMatchFn({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: \"any\",\n valueCallback: (index) => index + 1,\n }),\n\n month: buildMatchFn({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: \"any\",\n }),\n\n day: buildMatchFn({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseDayPatterns,\n defaultParseWidth: \"any\",\n }),\n\n dayPeriod: buildMatchFn({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: \"any\",\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: \"any\",\n }),\n};\n","export function buildMatchPatternFn(args) {\n return (string, options = {}) => {\n const matchResult = string.match(args.matchPattern);\n if (!matchResult) return null;\n const matchedString = matchResult[0];\n\n const parseResult = string.match(args.parsePattern);\n if (!parseResult) return null;\n let value = args.valueCallback\n ? args.valueCallback(parseResult[0])\n : parseResult[0];\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type\n value = options.valueCallback ? options.valueCallback(value) : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n","import { formatDistance } from \"./en-US/_lib/formatDistance.mjs\";\nimport { formatLong } from \"./en-US/_lib/formatLong.mjs\";\nimport { formatRelative } from \"./en-US/_lib/formatRelative.mjs\";\nimport { localize } from \"./en-US/_lib/localize.mjs\";\nimport { match } from \"./en-US/_lib/match.mjs\";\n\n/**\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)\n * @author Lesha Koss [@leshakoss](https://github.com/leshakoss)\n */\nexport const enUS = {\n code: \"en-US\",\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 0 /* Sunday */,\n firstWeekContainsDate: 1,\n },\n};\n\n// Fallback for modularized imports:\nexport default enUS;\n","let defaultOptions = {};\n\nexport function getDefaultOptions() {\n return defaultOptions;\n}\n\nexport function setDefaultOptions(newOptions) {\n defaultOptions = newOptions;\n}\n","/**\n * @module constants\n * @summary Useful constants\n * @description\n * Collection of useful date constants.\n *\n * The constants could be imported from `date-fns/constants`:\n *\n * ```ts\n * import { maxTime, minTime } from \"./constants/date-fns/constants\";\n *\n * function isAllowedTime(time) {\n * return time <= maxTime && time >= minTime;\n * }\n * ```\n */\n\n/**\n * @constant\n * @name daysInWeek\n * @summary Days in 1 week.\n */\nexport const daysInWeek = 7;\n\n/**\n * @constant\n * @name daysInYear\n * @summary Days in 1 year.\n *\n * @description\n * How many days in a year.\n *\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occures every 4 years, except for years that are divisable by 100 and not divisable by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n */\nexport const daysInYear = 365.2425;\n\n/**\n * @constant\n * @name maxTime\n * @summary Maximum allowed time.\n *\n * @example\n * import { maxTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = 8640000000000001 <= maxTime;\n * //=> false\n *\n * new Date(8640000000000001);\n * //=> Invalid Date\n */\nexport const maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n\n/**\n * @constant\n * @name minTime\n * @summary Minimum allowed time.\n *\n * @example\n * import { minTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = -8640000000000001 >= minTime;\n * //=> false\n *\n * new Date(-8640000000000001)\n * //=> Invalid Date\n */\nexport const minTime = -maxTime;\n\n/**\n * @constant\n * @name millisecondsInWeek\n * @summary Milliseconds in 1 week.\n */\nexport const millisecondsInWeek = 604800000;\n\n/**\n * @constant\n * @name millisecondsInDay\n * @summary Milliseconds in 1 day.\n */\nexport const millisecondsInDay = 86400000;\n\n/**\n * @constant\n * @name millisecondsInMinute\n * @summary Milliseconds in 1 minute\n */\nexport const millisecondsInMinute = 60000;\n\n/**\n * @constant\n * @name millisecondsInHour\n * @summary Milliseconds in 1 hour\n */\nexport const millisecondsInHour = 3600000;\n\n/**\n * @constant\n * @name millisecondsInSecond\n * @summary Milliseconds in 1 second\n */\nexport const millisecondsInSecond = 1000;\n\n/**\n * @constant\n * @name minutesInYear\n * @summary Minutes in 1 year.\n */\nexport const minutesInYear = 525600;\n\n/**\n * @constant\n * @name minutesInMonth\n * @summary Minutes in 1 month.\n */\nexport const minutesInMonth = 43200;\n\n/**\n * @constant\n * @name minutesInDay\n * @summary Minutes in 1 day.\n */\nexport const minutesInDay = 1440;\n\n/**\n * @constant\n * @name minutesInHour\n * @summary Minutes in 1 hour.\n */\nexport const minutesInHour = 60;\n\n/**\n * @constant\n * @name monthsInQuarter\n * @summary Months in 1 quarter.\n */\nexport const monthsInQuarter = 3;\n\n/**\n * @constant\n * @name monthsInYear\n * @summary Months in 1 year.\n */\nexport const monthsInYear = 12;\n\n/**\n * @constant\n * @name quartersInYear\n * @summary Quarters in 1 year\n */\nexport const quartersInYear = 4;\n\n/**\n * @constant\n * @name secondsInHour\n * @summary Seconds in 1 hour.\n */\nexport const secondsInHour = 3600;\n\n/**\n * @constant\n * @name secondsInMinute\n * @summary Seconds in 1 minute.\n */\nexport const secondsInMinute = 60;\n\n/**\n * @constant\n * @name secondsInDay\n * @summary Seconds in 1 day.\n */\nexport const secondsInDay = secondsInHour * 24;\n\n/**\n * @constant\n * @name secondsInWeek\n * @summary Seconds in 1 week.\n */\nexport const secondsInWeek = secondsInDay * 7;\n\n/**\n * @constant\n * @name secondsInYear\n * @summary Seconds in 1 year.\n */\nexport const secondsInYear = secondsInDay * daysInYear;\n\n/**\n * @constant\n * @name secondsInMonth\n * @summary Seconds in 1 month\n */\nexport const secondsInMonth = secondsInYear / 12;\n\n/**\n * @constant\n * @name secondsInQuarter\n * @summary Seconds in 1 quarter.\n */\nexport const secondsInQuarter = secondsInMonth * 3;\n","import { toDate } from \"../toDate.mjs\";\n\n/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport function getTimezoneOffsetInMilliseconds(date) {\n const _date = toDate(date);\n const utcDate = new Date(\n Date.UTC(\n _date.getFullYear(),\n _date.getMonth(),\n _date.getDate(),\n _date.getHours(),\n _date.getMinutes(),\n _date.getSeconds(),\n _date.getMilliseconds(),\n ),\n );\n utcDate.setUTCFullYear(_date.getFullYear());\n return +date - +utcDate;\n}\n","import { differenceInCalendarDays } from \"./differenceInCalendarDays.mjs\";\nimport { startOfYear } from \"./startOfYear.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name getDayOfYear\n * @category Day Helpers\n * @summary Get the day of the year of the given date.\n *\n * @description\n * Get the day of the year of the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The given date\n *\n * @returns The day of year\n *\n * @example\n * // Which day of the year is 2 July 2014?\n * const result = getDayOfYear(new Date(2014, 6, 2))\n * //=> 183\n */\nexport function getDayOfYear(date) {\n const _date = toDate(date);\n const diff = differenceInCalendarDays(_date, startOfYear(_date));\n const dayOfYear = diff + 1;\n return dayOfYear;\n}\n\n// Fallback for modularized imports:\nexport default getDayOfYear;\n","import { millisecondsInDay } from \"./constants.mjs\";\nimport { startOfDay } from \"./startOfDay.mjs\";\nimport { getTimezoneOffsetInMilliseconds } from \"./_lib/getTimezoneOffsetInMilliseconds.mjs\";\n\n/**\n * @name differenceInCalendarDays\n * @category Day Helpers\n * @summary Get the number of calendar days between the given dates.\n *\n * @description\n * Get the number of calendar days between the given dates. This means that the times are removed\n * from the dates and then the difference in days is calculated.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The later date\n * @param dateRight - The earlier date\n *\n * @returns The number of calendar days\n *\n * @example\n * // How many calendar days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInCalendarDays(\n * new Date(2012, 6, 2, 0, 0),\n * new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 366\n * // How many calendar days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInCalendarDays(\n * new Date(2011, 6, 3, 0, 1),\n * new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 1\n */\nexport function differenceInCalendarDays(dateLeft, dateRight) {\n const startOfDayLeft = startOfDay(dateLeft);\n const startOfDayRight = startOfDay(dateRight);\n\n const timestampLeft =\n +startOfDayLeft - getTimezoneOffsetInMilliseconds(startOfDayLeft);\n const timestampRight =\n +startOfDayRight - getTimezoneOffsetInMilliseconds(startOfDayRight);\n\n // Round the number of days to the nearest integer because the number of\n // milliseconds in a day is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round((timestampLeft - timestampRight) / millisecondsInDay);\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarDays;\n","import { toDate } from \"./toDate.mjs\";\nimport { constructFrom } from \"./constructFrom.mjs\";\n\n/**\n * @name startOfYear\n * @category Year Helpers\n * @summary Return the start of a year for the given date.\n *\n * @description\n * Return the start of a year for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The start of a year\n *\n * @example\n * // The start of a year for 2 September 2014 11:55:00:\n * const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Jan 01 2014 00:00:00\n */\nexport function startOfYear(date) {\n const cleanDate = toDate(date);\n const _date = constructFrom(date, 0);\n _date.setFullYear(cleanDate.getFullYear(), 0, 1);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfYear;\n","import { toDate } from \"./toDate.mjs\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.mjs\";\n\n/**\n * The {@link startOfWeek} function options.\n */\n\n/**\n * @name startOfWeek\n * @category Week Helpers\n * @summary Return the start of a week for the given date.\n *\n * @description\n * Return the start of a week for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week\n *\n * @example\n * // The start of a week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfWeek(date, options) {\n const defaultOptions = getDefaultOptions();\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const _date = toDate(date);\n const day = _date.getDay();\n const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n\n _date.setDate(_date.getDate() - diff);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeek;\n","import { startOfWeek } from \"./startOfWeek.mjs\";\n\n/**\n * @name startOfISOWeek\n * @category ISO Week Helpers\n * @summary Return the start of an ISO week for the given date.\n *\n * @description\n * Return the start of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The start of an ISO week\n *\n * @example\n * // The start of an ISO week for 2 September 2014 11:55:00:\n * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfISOWeek(date) {\n return startOfWeek(date, { weekStartsOn: 1 });\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeek;\n","import { constructFrom } from \"./constructFrom.mjs\";\nimport { startOfISOWeek } from \"./startOfISOWeek.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name getISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the ISO week-numbering year of the given date.\n *\n * @description\n * Get the ISO week-numbering year of the given date,\n * which always starts 3 days before the year's first Thursday.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The given date\n *\n * @returns The ISO week-numbering year\n *\n * @example\n * // Which ISO-week numbering year is 2 January 2005?\n * const result = getISOWeekYear(new Date(2005, 0, 2))\n * //=> 2004\n */\nexport function getISOWeekYear(date) {\n const _date = toDate(date);\n const year = _date.getFullYear();\n\n const fourthOfJanuaryOfNextYear = constructFrom(date, 0);\n fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);\n fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);\n const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);\n\n const fourthOfJanuaryOfThisYear = constructFrom(date, 0);\n fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);\n fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);\n const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);\n\n if (_date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (_date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}\n\n// Fallback for modularized imports:\nexport default getISOWeekYear;\n","import { millisecondsInWeek } from \"./constants.mjs\";\nimport { startOfISOWeek } from \"./startOfISOWeek.mjs\";\nimport { startOfISOWeekYear } from \"./startOfISOWeekYear.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name getISOWeek\n * @category ISO Week Helpers\n * @summary Get the ISO week of the given date.\n *\n * @description\n * Get the ISO week of the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The given date\n *\n * @returns The ISO week\n *\n * @example\n * // Which week of the ISO-week numbering year is 2 January 2005?\n * const result = getISOWeek(new Date(2005, 0, 2))\n * //=> 53\n */\nexport function getISOWeek(date) {\n const _date = toDate(date);\n const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);\n\n // Round the number of weeks to the nearest integer because the number of\n // milliseconds in a week is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getISOWeek;\n","import { getISOWeekYear } from \"./getISOWeekYear.mjs\";\nimport { startOfISOWeek } from \"./startOfISOWeek.mjs\";\nimport { constructFrom } from \"./constructFrom.mjs\";\n\n/**\n * @name startOfISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Return the start of an ISO week-numbering year for the given date.\n *\n * @description\n * Return the start of an ISO week-numbering year,\n * which always starts 3 days before the year's first Thursday.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The start of an ISO week-numbering year\n *\n * @example\n * // The start of an ISO week-numbering year for 2 July 2005:\n * const result = startOfISOWeekYear(new Date(2005, 6, 2))\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfISOWeekYear(date) {\n const year = getISOWeekYear(date);\n const fourthOfJanuary = constructFrom(date, 0);\n fourthOfJanuary.setFullYear(year, 0, 4);\n fourthOfJanuary.setHours(0, 0, 0, 0);\n return startOfISOWeek(fourthOfJanuary);\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeekYear;\n","import { constructFrom } from \"./constructFrom.mjs\";\nimport { startOfWeek } from \"./startOfWeek.mjs\";\nimport { toDate } from \"./toDate.mjs\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.mjs\";\n\n/**\n * The {@link getWeekYear} function options.\n */\n\n/**\n * @name getWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Get the local week-numbering year of the given date.\n *\n * @description\n * Get the local week-numbering year of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The given date\n * @param options - An object with options.\n *\n * @returns The local week-numbering year\n *\n * @example\n * // Which week numbering year is 26 December 2004 with the default settings?\n * const result = getWeekYear(new Date(2004, 11, 26))\n * //=> 2005\n *\n * @example\n * // Which week numbering year is 26 December 2004 if week starts on Saturday?\n * const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 })\n * //=> 2004\n *\n * @example\n * // Which week numbering year is 26 December 2004 if the first week contains 4 January?\n * const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 })\n * //=> 2004\n */\nexport function getWeekYear(date, options) {\n const _date = toDate(date);\n const year = _date.getFullYear();\n\n const defaultOptions = getDefaultOptions();\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const firstWeekOfNextYear = constructFrom(date, 0);\n firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);\n firstWeekOfNextYear.setHours(0, 0, 0, 0);\n const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);\n\n const firstWeekOfThisYear = constructFrom(date, 0);\n firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);\n firstWeekOfThisYear.setHours(0, 0, 0, 0);\n const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);\n\n if (_date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (_date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}\n\n// Fallback for modularized imports:\nexport default getWeekYear;\n","import { millisecondsInWeek } from \"./constants.mjs\";\nimport { startOfWeek } from \"./startOfWeek.mjs\";\nimport { startOfWeekYear } from \"./startOfWeekYear.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * The {@link getWeek} function options.\n */\n\n/**\n * @name getWeek\n * @category Week Helpers\n * @summary Get the local week index of the given date.\n *\n * @description\n * Get the local week index of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The week\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005 with default options?\n * const result = getWeek(new Date(2005, 0, 2))\n * //=> 2\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005,\n * // if Monday is the first day of the week,\n * // and the first week of the year always contains 4 January?\n * const result = getWeek(new Date(2005, 0, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> 53\n */\n\nexport function getWeek(date, options) {\n const _date = toDate(date);\n const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);\n\n // Round the number of weeks to the nearest integer because the number of\n // milliseconds in a week is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getWeek;\n","import { constructFrom } from \"./constructFrom.mjs\";\nimport { getWeekYear } from \"./getWeekYear.mjs\";\nimport { startOfWeek } from \"./startOfWeek.mjs\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.mjs\";\n\n/**\n * The {@link startOfWeekYear} function options.\n */\n\n/**\n * @name startOfWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Return the start of a local week-numbering year for the given date.\n *\n * @description\n * Return the start of a local week-numbering year.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week-numbering year\n *\n * @example\n * // The start of an a week-numbering year for 2 July 2005 with default settings:\n * const result = startOfWeekYear(new Date(2005, 6, 2))\n * //=> Sun Dec 26 2004 00:00:00\n *\n * @example\n * // The start of a week-numbering year for 2 July 2005\n * // if Monday is the first day of week\n * // and 4 January is always in the first week of the year:\n * const result = startOfWeekYear(new Date(2005, 6, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfWeekYear(date, options) {\n const defaultOptions = getDefaultOptions();\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const year = getWeekYear(date, options);\n const firstWeek = constructFrom(date, 0);\n firstWeek.setFullYear(year, 0, firstWeekContainsDate);\n firstWeek.setHours(0, 0, 0, 0);\n const _date = startOfWeek(firstWeek, options);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeekYear;\n","export function addLeadingZeros(number, targetLength) {\n const sign = number < 0 ? \"-\" : \"\";\n const output = Math.abs(number).toString().padStart(targetLength, \"0\");\n return sign + output;\n}\n","import { addLeadingZeros } from \"../addLeadingZeros.mjs\";\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | |\n * | d | Day of month | D | |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | m | Minute | M | Month |\n * | s | Second | S | Fraction of second |\n * | y | Year (abs) | Y | |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n */\n\nexport const lightFormatters = {\n // Year\n y(date, token) {\n // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens\n // | Year | y | yy | yyy | yyyy | yyyyy |\n // |----------|-------|----|-------|-------|-------|\n // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n\n const signedYear = date.getFullYear();\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const year = signedYear > 0 ? signedYear : 1 - signedYear;\n return addLeadingZeros(token === \"yy\" ? year % 100 : year, token.length);\n },\n\n // Month\n M(date, token) {\n const month = date.getMonth();\n return token === \"M\" ? String(month + 1) : addLeadingZeros(month + 1, 2);\n },\n\n // Day of the month\n d(date, token) {\n return addLeadingZeros(date.getDate(), token.length);\n },\n\n // AM or PM\n a(date, token) {\n const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? \"pm\" : \"am\";\n\n switch (token) {\n case \"a\":\n case \"aa\":\n return dayPeriodEnumValue.toUpperCase();\n case \"aaa\":\n return dayPeriodEnumValue;\n case \"aaaaa\":\n return dayPeriodEnumValue[0];\n case \"aaaa\":\n default:\n return dayPeriodEnumValue === \"am\" ? \"a.m.\" : \"p.m.\";\n }\n },\n\n // Hour [1-12]\n h(date, token) {\n return addLeadingZeros(date.getHours() % 12 || 12, token.length);\n },\n\n // Hour [0-23]\n H(date, token) {\n return addLeadingZeros(date.getHours(), token.length);\n },\n\n // Minute\n m(date, token) {\n return addLeadingZeros(date.getMinutes(), token.length);\n },\n\n // Second\n s(date, token) {\n return addLeadingZeros(date.getSeconds(), token.length);\n },\n\n // Fraction of second\n S(date, token) {\n const numberOfDigits = token.length;\n const milliseconds = date.getMilliseconds();\n const fractionalSeconds = Math.trunc(\n milliseconds * Math.pow(10, numberOfDigits - 3),\n );\n return addLeadingZeros(fractionalSeconds, token.length);\n },\n};\n","import { getDayOfYear } from \"../../getDayOfYear.mjs\";\nimport { getISOWeek } from \"../../getISOWeek.mjs\";\nimport { getISOWeekYear } from \"../../getISOWeekYear.mjs\";\nimport { getWeek } from \"../../getWeek.mjs\";\nimport { getWeekYear } from \"../../getWeekYear.mjs\";\nimport { addLeadingZeros } from \"../addLeadingZeros.mjs\";\nimport { lightFormatters } from \"./lightFormatters.mjs\";\n\nconst dayPeriodEnum = {\n am: \"am\",\n pm: \"pm\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n};\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O | Timezone (GMT) |\n * | p! | Long localized time | P! | Long localized date |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\n\nexport const formatters = {\n // Era\n G: function (date, token, localize) {\n const era = date.getFullYear() > 0 ? 1 : 0;\n switch (token) {\n // AD, BC\n case \"G\":\n case \"GG\":\n case \"GGG\":\n return localize.era(era, { width: \"abbreviated\" });\n // A, B\n case \"GGGGG\":\n return localize.era(era, { width: \"narrow\" });\n // Anno Domini, Before Christ\n case \"GGGG\":\n default:\n return localize.era(era, { width: \"wide\" });\n }\n },\n\n // Year\n y: function (date, token, localize) {\n // Ordinal number\n if (token === \"yo\") {\n const signedYear = date.getFullYear();\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const year = signedYear > 0 ? signedYear : 1 - signedYear;\n return localize.ordinalNumber(year, { unit: \"year\" });\n }\n\n return lightFormatters.y(date, token);\n },\n\n // Local week-numbering year\n Y: function (date, token, localize, options) {\n const signedWeekYear = getWeekYear(date, options);\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;\n\n // Two digit year\n if (token === \"YY\") {\n const twoDigitYear = weekYear % 100;\n return addLeadingZeros(twoDigitYear, 2);\n }\n\n // Ordinal number\n if (token === \"Yo\") {\n return localize.ordinalNumber(weekYear, { unit: \"year\" });\n }\n\n // Padding\n return addLeadingZeros(weekYear, token.length);\n },\n\n // ISO week-numbering year\n R: function (date, token) {\n const isoWeekYear = getISOWeekYear(date);\n\n // Padding\n return addLeadingZeros(isoWeekYear, token.length);\n },\n\n // Extended year. This is a single number designating the year of this calendar system.\n // The main difference between `y` and `u` localizers are B.C. years:\n // | Year | `y` | `u` |\n // |------|-----|-----|\n // | AC 1 | 1 | 1 |\n // | BC 1 | 1 | 0 |\n // | BC 2 | 2 | -1 |\n // Also `yy` always returns the last two digits of a year,\n // while `uu` pads single digit years to 2 characters and returns other years unchanged.\n u: function (date, token) {\n const year = date.getFullYear();\n return addLeadingZeros(year, token.length);\n },\n\n // Quarter\n Q: function (date, token, localize) {\n const quarter = Math.ceil((date.getMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case \"Q\":\n return String(quarter);\n // 01, 02, 03, 04\n case \"QQ\":\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n case \"Qo\":\n return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n // Q1, Q2, Q3, Q4\n case \"QQQ\":\n return localize.quarter(quarter, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case \"QQQQQ\":\n return localize.quarter(quarter, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // 1st quarter, 2nd quarter, ...\n case \"QQQQ\":\n default:\n return localize.quarter(quarter, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Stand-alone quarter\n q: function (date, token, localize) {\n const quarter = Math.ceil((date.getMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case \"q\":\n return String(quarter);\n // 01, 02, 03, 04\n case \"qq\":\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n case \"qo\":\n return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n // Q1, Q2, Q3, Q4\n case \"qqq\":\n return localize.quarter(quarter, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case \"qqqqq\":\n return localize.quarter(quarter, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // 1st quarter, 2nd quarter, ...\n case \"qqqq\":\n default:\n return localize.quarter(quarter, {\n width: \"wide\",\n context: \"standalone\",\n });\n }\n },\n\n // Month\n M: function (date, token, localize) {\n const month = date.getMonth();\n switch (token) {\n case \"M\":\n case \"MM\":\n return lightFormatters.M(date, token);\n // 1st, 2nd, ..., 12th\n case \"Mo\":\n return localize.ordinalNumber(month + 1, { unit: \"month\" });\n // Jan, Feb, ..., Dec\n case \"MMM\":\n return localize.month(month, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // J, F, ..., D\n case \"MMMMM\":\n return localize.month(month, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // January, February, ..., December\n case \"MMMM\":\n default:\n return localize.month(month, { width: \"wide\", context: \"formatting\" });\n }\n },\n\n // Stand-alone month\n L: function (date, token, localize) {\n const month = date.getMonth();\n switch (token) {\n // 1, 2, ..., 12\n case \"L\":\n return String(month + 1);\n // 01, 02, ..., 12\n case \"LL\":\n return addLeadingZeros(month + 1, 2);\n // 1st, 2nd, ..., 12th\n case \"Lo\":\n return localize.ordinalNumber(month + 1, { unit: \"month\" });\n // Jan, Feb, ..., Dec\n case \"LLL\":\n return localize.month(month, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // J, F, ..., D\n case \"LLLLL\":\n return localize.month(month, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // January, February, ..., December\n case \"LLLL\":\n default:\n return localize.month(month, { width: \"wide\", context: \"standalone\" });\n }\n },\n\n // Local week of year\n w: function (date, token, localize, options) {\n const week = getWeek(date, options);\n\n if (token === \"wo\") {\n return localize.ordinalNumber(week, { unit: \"week\" });\n }\n\n return addLeadingZeros(week, token.length);\n },\n\n // ISO week of year\n I: function (date, token, localize) {\n const isoWeek = getISOWeek(date);\n\n if (token === \"Io\") {\n return localize.ordinalNumber(isoWeek, { unit: \"week\" });\n }\n\n return addLeadingZeros(isoWeek, token.length);\n },\n\n // Day of the month\n d: function (date, token, localize) {\n if (token === \"do\") {\n return localize.ordinalNumber(date.getDate(), { unit: \"date\" });\n }\n\n return lightFormatters.d(date, token);\n },\n\n // Day of year\n D: function (date, token, localize) {\n const dayOfYear = getDayOfYear(date);\n\n if (token === \"Do\") {\n return localize.ordinalNumber(dayOfYear, { unit: \"dayOfYear\" });\n }\n\n return addLeadingZeros(dayOfYear, token.length);\n },\n\n // Day of week\n E: function (date, token, localize) {\n const dayOfWeek = date.getDay();\n switch (token) {\n // Tue\n case \"E\":\n case \"EE\":\n case \"EEE\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"EEEEE\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"EEEEEE\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"EEEE\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Local day of week\n e: function (date, token, localize, options) {\n const dayOfWeek = date.getDay();\n const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n switch (token) {\n // Numerical value (Nth day of week with current locale or weekStartsOn)\n case \"e\":\n return String(localDayOfWeek);\n // Padded numerical value\n case \"ee\":\n return addLeadingZeros(localDayOfWeek, 2);\n // 1st, 2nd, ..., 7th\n case \"eo\":\n return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n case \"eee\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"eeeee\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"eeeeee\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"eeee\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Stand-alone local day of week\n c: function (date, token, localize, options) {\n const dayOfWeek = date.getDay();\n const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n switch (token) {\n // Numerical value (same as in `e`)\n case \"c\":\n return String(localDayOfWeek);\n // Padded numerical value\n case \"cc\":\n return addLeadingZeros(localDayOfWeek, token.length);\n // 1st, 2nd, ..., 7th\n case \"co\":\n return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n case \"ccc\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // T\n case \"ccccc\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // Tu\n case \"cccccc\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"standalone\",\n });\n // Tuesday\n case \"cccc\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"standalone\",\n });\n }\n },\n\n // ISO day of week\n i: function (date, token, localize) {\n const dayOfWeek = date.getDay();\n const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n switch (token) {\n // 2\n case \"i\":\n return String(isoDayOfWeek);\n // 02\n case \"ii\":\n return addLeadingZeros(isoDayOfWeek, token.length);\n // 2nd\n case \"io\":\n return localize.ordinalNumber(isoDayOfWeek, { unit: \"day\" });\n // Tue\n case \"iii\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"iiiii\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"iiiiii\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"iiii\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // AM or PM\n a: function (date, token, localize) {\n const hours = date.getHours();\n const dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n\n switch (token) {\n case \"a\":\n case \"aa\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"aaa\":\n return localize\n .dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n })\n .toLowerCase();\n case \"aaaaa\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"aaaa\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // AM, PM, midnight, noon\n b: function (date, token, localize) {\n const hours = date.getHours();\n let dayPeriodEnumValue;\n if (hours === 12) {\n dayPeriodEnumValue = dayPeriodEnum.noon;\n } else if (hours === 0) {\n dayPeriodEnumValue = dayPeriodEnum.midnight;\n } else {\n dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n }\n\n switch (token) {\n case \"b\":\n case \"bb\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"bbb\":\n return localize\n .dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n })\n .toLowerCase();\n case \"bbbbb\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"bbbb\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // in the morning, in the afternoon, in the evening, at night\n B: function (date, token, localize) {\n const hours = date.getHours();\n let dayPeriodEnumValue;\n if (hours >= 17) {\n dayPeriodEnumValue = dayPeriodEnum.evening;\n } else if (hours >= 12) {\n dayPeriodEnumValue = dayPeriodEnum.afternoon;\n } else if (hours >= 4) {\n dayPeriodEnumValue = dayPeriodEnum.morning;\n } else {\n dayPeriodEnumValue = dayPeriodEnum.night;\n }\n\n switch (token) {\n case \"B\":\n case \"BB\":\n case \"BBB\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"BBBBB\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"BBBB\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Hour [1-12]\n h: function (date, token, localize) {\n if (token === \"ho\") {\n let hours = date.getHours() % 12;\n if (hours === 0) hours = 12;\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return lightFormatters.h(date, token);\n },\n\n // Hour [0-23]\n H: function (date, token, localize) {\n if (token === \"Ho\") {\n return localize.ordinalNumber(date.getHours(), { unit: \"hour\" });\n }\n\n return lightFormatters.H(date, token);\n },\n\n // Hour [0-11]\n K: function (date, token, localize) {\n const hours = date.getHours() % 12;\n\n if (token === \"Ko\") {\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n\n // Hour [1-24]\n k: function (date, token, localize) {\n let hours = date.getHours();\n if (hours === 0) hours = 24;\n\n if (token === \"ko\") {\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n\n // Minute\n m: function (date, token, localize) {\n if (token === \"mo\") {\n return localize.ordinalNumber(date.getMinutes(), { unit: \"minute\" });\n }\n\n return lightFormatters.m(date, token);\n },\n\n // Second\n s: function (date, token, localize) {\n if (token === \"so\") {\n return localize.ordinalNumber(date.getSeconds(), { unit: \"second\" });\n }\n\n return lightFormatters.s(date, token);\n },\n\n // Fraction of second\n S: function (date, token) {\n return lightFormatters.S(date, token);\n },\n\n // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n X: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n if (timezoneOffset === 0) {\n return \"Z\";\n }\n\n switch (token) {\n // Hours and optional minutes\n case \"X\":\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XX`\n case \"XXXX\":\n case \"XX\": // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XXX`\n case \"XXXXX\":\n case \"XXX\": // Hours and minutes with `:` delimiter\n default:\n return formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n x: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Hours and optional minutes\n case \"x\":\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xx`\n case \"xxxx\":\n case \"xx\": // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xxx`\n case \"xxxxx\":\n case \"xxx\": // Hours and minutes with `:` delimiter\n default:\n return formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (GMT)\n O: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Short\n case \"O\":\n case \"OO\":\n case \"OOO\":\n return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n // Long\n case \"OOOO\":\n default:\n return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (specific non-location)\n z: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Short\n case \"z\":\n case \"zz\":\n case \"zzz\":\n return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n // Long\n case \"zzzz\":\n default:\n return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Seconds timestamp\n t: function (date, token, _localize) {\n const timestamp = Math.trunc(date.getTime() / 1000);\n return addLeadingZeros(timestamp, token.length);\n },\n\n // Milliseconds timestamp\n T: function (date, token, _localize) {\n const timestamp = date.getTime();\n return addLeadingZeros(timestamp, token.length);\n },\n};\n\nfunction formatTimezoneShort(offset, delimiter = \"\") {\n const sign = offset > 0 ? \"-\" : \"+\";\n const absOffset = Math.abs(offset);\n const hours = Math.trunc(absOffset / 60);\n const minutes = absOffset % 60;\n if (minutes === 0) {\n return sign + String(hours);\n }\n return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);\n}\n\nfunction formatTimezoneWithOptionalMinutes(offset, delimiter) {\n if (offset % 60 === 0) {\n const sign = offset > 0 ? \"-\" : \"+\";\n return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n }\n return formatTimezone(offset, delimiter);\n}\n\nfunction formatTimezone(offset, delimiter = \"\") {\n const sign = offset > 0 ? \"-\" : \"+\";\n const absOffset = Math.abs(offset);\n const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);\n const minutes = addLeadingZeros(absOffset % 60, 2);\n return sign + hours + delimiter + minutes;\n}\n","const dateLongFormatter = (pattern, formatLong) => {\n switch (pattern) {\n case \"P\":\n return formatLong.date({ width: \"short\" });\n case \"PP\":\n return formatLong.date({ width: \"medium\" });\n case \"PPP\":\n return formatLong.date({ width: \"long\" });\n case \"PPPP\":\n default:\n return formatLong.date({ width: \"full\" });\n }\n};\n\nconst timeLongFormatter = (pattern, formatLong) => {\n switch (pattern) {\n case \"p\":\n return formatLong.time({ width: \"short\" });\n case \"pp\":\n return formatLong.time({ width: \"medium\" });\n case \"ppp\":\n return formatLong.time({ width: \"long\" });\n case \"pppp\":\n default:\n return formatLong.time({ width: \"full\" });\n }\n};\n\nconst dateTimeLongFormatter = (pattern, formatLong) => {\n const matchResult = pattern.match(/(P+)(p+)?/) || [];\n const datePattern = matchResult[1];\n const timePattern = matchResult[2];\n\n if (!timePattern) {\n return dateLongFormatter(pattern, formatLong);\n }\n\n let dateTimeFormat;\n\n switch (datePattern) {\n case \"P\":\n dateTimeFormat = formatLong.dateTime({ width: \"short\" });\n break;\n case \"PP\":\n dateTimeFormat = formatLong.dateTime({ width: \"medium\" });\n break;\n case \"PPP\":\n dateTimeFormat = formatLong.dateTime({ width: \"long\" });\n break;\n case \"PPPP\":\n default:\n dateTimeFormat = formatLong.dateTime({ width: \"full\" });\n break;\n }\n\n return dateTimeFormat\n .replace(\"{{date}}\", dateLongFormatter(datePattern, formatLong))\n .replace(\"{{time}}\", timeLongFormatter(timePattern, formatLong));\n};\n\nexport const longFormatters = {\n p: timeLongFormatter,\n P: dateTimeLongFormatter,\n};\n","const dayOfYearTokenRE = /^D+$/;\nconst weekYearTokenRE = /^Y+$/;\n\nconst throwTokens = [\"D\", \"DD\", \"YY\", \"YYYY\"];\n\nexport function isProtectedDayOfYearToken(token) {\n return dayOfYearTokenRE.test(token);\n}\n\nexport function isProtectedWeekYearToken(token) {\n return weekYearTokenRE.test(token);\n}\n\nexport function warnOrThrowProtectedError(token, format, input) {\n const _message = message(token, format, input);\n console.warn(_message);\n if (throwTokens.includes(token)) throw new RangeError(_message);\n}\n\nfunction message(token, format, input) {\n const subject = token[0] === \"Y\" ? \"years\" : \"days of the month\";\n return `Use \\`${token.toLowerCase()}\\` instead of \\`${token}\\` (in \\`${format}\\`) for formatting ${subject} to the input \\`${input}\\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;\n}\n","import { isDate } from \"./isDate.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate)\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to check\n *\n * @returns The date is valid\n *\n * @example\n * // For the valid date:\n * const result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertable into a date:\n * const result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * const result = isValid(new Date(''))\n * //=> false\n */\nexport function isValid(date) {\n if (!isDate(date) && typeof date !== \"number\") {\n return false;\n }\n const _date = toDate(date);\n return !isNaN(Number(_date));\n}\n\n// Fallback for modularized imports:\nexport default isValid;\n","/**\n * @name isDate\n * @category Common Helpers\n * @summary Is the given value a date?\n *\n * @description\n * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.\n *\n * @param value - The value to check\n *\n * @returns True if the given value is a date\n *\n * @example\n * // For a valid date:\n * const result = isDate(new Date())\n * //=> true\n *\n * @example\n * // For an invalid date:\n * const result = isDate(new Date(NaN))\n * //=> true\n *\n * @example\n * // For some value:\n * const result = isDate('2014-02-31')\n * //=> false\n *\n * @example\n * // For an object:\n * const result = isDate({})\n * //=> false\n */\nexport function isDate(value) {\n return (\n value instanceof Date ||\n (typeof value === \"object\" &&\n Object.prototype.toString.call(value) === \"[object Date]\")\n );\n}\n\n// Fallback for modularized imports:\nexport default isDate;\n","import { defaultLocale } from \"./_lib/defaultLocale.mjs\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.mjs\";\nimport { formatters } from \"./_lib/format/formatters.mjs\";\nimport { longFormatters } from \"./_lib/format/longFormatters.mjs\";\nimport {\n isProtectedDayOfYearToken,\n isProtectedWeekYearToken,\n warnOrThrowProtectedError,\n} from \"./_lib/protectedTokens.mjs\";\nimport { isValid } from \"./isValid.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n// Rexports of internal for libraries to use.\n// See: https://github.com/date-fns/date-fns/issues/3638#issuecomment-1877082874\nexport { formatters, longFormatters };\n\n// This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\nconst formattingTokensRegExp =\n /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g;\n\n// This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\nconst longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\n\nconst escapedStringRegExp = /^'([^]*?)'?$/;\nconst doubleQuoteRegExp = /''/g;\nconst unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n\nexport { format as formatDate };\n\n/**\n * The {@link format} function options.\n */\n\n/**\n * @name format\n * @alias formatDate\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > âš ï¸ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit | Pattern | Result examples | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era | G..GGG | AD, BC | |\n * | | GGGG | Anno Domini, Before Christ | 2 |\n * | | GGGGG | A, B | |\n * | Calendar year | y | 44, 1, 1900, 2017 | 5 |\n * | | yo | 44th, 1st, 0th, 17th | 5,7 |\n * | | yy | 44, 01, 00, 17 | 5 |\n * | | yyy | 044, 001, 1900, 2017 | 5 |\n * | | yyyy | 0044, 0001, 1900, 2017 | 5 |\n * | | yyyyy | ... | 3,5 |\n * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |\n * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |\n * | | YY | 44, 01, 00, 17 | 5,8 |\n * | | YYY | 044, 001, 1900, 2017 | 5 |\n * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |\n * | | YYYYY | ... | 3,5 |\n * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |\n * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |\n * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |\n * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |\n * | | RRRRR | ... | 3,5,7 |\n * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |\n * | | uu | -43, 01, 1900, 2017 | 5 |\n * | | uuu | -043, 001, 1900, 2017 | 5 |\n * | | uuuu | -0043, 0001, 1900, 2017 | 5 |\n * | | uuuuu | ... | 3,5 |\n * | Quarter (formatting) | Q | 1, 2, 3, 4 | |\n * | | Qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | QQ | 01, 02, 03, 04 | |\n * | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |\n * | | qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | qq | 01, 02, 03, 04 | |\n * | | qqq | Q1, Q2, Q3, Q4 | |\n * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | qqqqq | 1, 2, 3, 4 | 4 |\n * | Month (formatting) | M | 1, 2, ..., 12 | |\n * | | Mo | 1st, 2nd, ..., 12th | 7 |\n * | | MM | 01, 02, ..., 12 | |\n * | | MMM | Jan, Feb, ..., Dec | |\n * | | MMMM | January, February, ..., December | 2 |\n * | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | L | 1, 2, ..., 12 | |\n * | | Lo | 1st, 2nd, ..., 12th | 7 |\n * | | LL | 01, 02, ..., 12 | |\n * | | LLL | Jan, Feb, ..., Dec | |\n * | | LLLL | January, February, ..., December | 2 |\n * | | LLLLL | J, F, ..., D | |\n * | Local week of year | w | 1, 2, ..., 53 | |\n * | | wo | 1st, 2nd, ..., 53th | 7 |\n * | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | I | 1, 2, ..., 53 | 7 |\n * | | Io | 1st, 2nd, ..., 53th | 7 |\n * | | II | 01, 02, ..., 53 | 7 |\n * | Day of month | d | 1, 2, ..., 31 | |\n * | | do | 1st, 2nd, ..., 31st | 7 |\n * | | dd | 01, 02, ..., 31 | |\n * | Day of year | D | 1, 2, ..., 365, 366 | 9 |\n * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |\n * | | DD | 01, 02, ..., 365, 366 | 9 |\n * | | DDD | 001, 002, ..., 365, 366 | |\n * | | DDDD | ... | 3 |\n * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | EEEEE | M, T, W, T, F, S, S | |\n * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |\n * | | io | 1st, 2nd, ..., 7th | 7 |\n * | | ii | 01, 02, ..., 07 | 7 |\n * | | iii | Mon, Tue, Wed, ..., Sun | 7 |\n * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |\n * | | iiiii | M, T, W, T, F, S, S | 7 |\n * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |\n * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |\n * | | eo | 2nd, 3rd, ..., 1st | 7 |\n * | | ee | 02, 03, ..., 01 | |\n * | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | eeeee | M, T, W, T, F, S, S | |\n * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |\n * | | co | 2nd, 3rd, ..., 1st | 7 |\n * | | cc | 02, 03, ..., 01 | |\n * | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | ccccc | M, T, W, T, F, S, S | |\n * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | AM, PM | a..aa | AM, PM | |\n * | | aaa | am, pm | |\n * | | aaaa | a.m., p.m. | 2 |\n * | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |\n * | | bbb | am, pm, noon, midnight | |\n * | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | bbbbb | a, p, n, mi | |\n * | Flexible day period | B..BBB | at night, in the morning, ... | |\n * | | BBBB | at night, in the morning, ... | 2 |\n * | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |\n * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |\n * | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |\n * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |\n * | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |\n * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |\n * | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |\n * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |\n * | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | m | 0, 1, ..., 59 | |\n * | | mo | 0th, 1st, ..., 59th | 7 |\n * | | mm | 00, 01, ..., 59 | |\n * | Second | s | 0, 1, ..., 59 | |\n * | | so | 0th, 1st, ..., 59th | 7 |\n * | | ss | 00, 01, ..., 59 | |\n * | Fraction of second | S | 0, 1, ..., 9 | |\n * | | SS | 00, 01, ..., 99 | |\n * | | SSS | 000, 001, ..., 999 | |\n * | | SSSS | ... | 3 |\n * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |\n * | | XX | -0800, +0530, Z | |\n * | | XXX | -08:00, +05:30, Z | |\n * | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |\n * | | xx | -0800, +0530, +0000 | |\n * | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |\n * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |\n * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |\n * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |\n * | Seconds timestamp | t | 512969520 | 7 |\n * | | tt | ... | 3,7 |\n * | Milliseconds timestamp | T | 512969520900 | 7 |\n * | | TT | ... | 3,7 |\n * | Long localized date | P | 04/29/1453 | 7 |\n * | | PP | Apr 29, 1453 | 7 |\n * | | PPP | April 29th, 1453 | 7 |\n * | | PPPP | Friday, April 29th, 1453 | 2,7 |\n * | Long localized time | p | 12:00 AM | 7 |\n * | | pp | 12:00:00 AM | 7 |\n * | | ppp | 12:00:00 AM GMT+2 | 7 |\n * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |\n * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |\n * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |\n * | | PPPppp | April 29th, 1453 at ... | 7 |\n * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n * the output will be the same as default pattern for this unit, usually\n * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n * are marked with \"2\" in the last column of the table.\n *\n * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n * The output will be padded with zeros to match the length of the pattern.\n *\n * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` always returns the last two digits of a year,\n * while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n * | Year | `yy` | `uu` |\n * |------|------|------|\n * | 1 | 01 | 01 |\n * | 14 | 14 | 14 |\n * | 376 | 76 | 376 |\n * | 1453 | 53 | 1453 |\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [getISOWeekYear](https://date-fns.org/docs/getISOWeekYear)\n * and [getWeekYear](https://date-fns.org/docs/getWeekYear)).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n * so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `t`: seconds timestamp\n * - `T`: milliseconds timestamp\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n * @param format - The string of tokens\n * @param options - An object with options\n *\n * @returns The formatted date string\n *\n * @throws `date` must not be Invalid Date\n * @throws `options.locale` must contain `localize` property\n * @throws `options.locale` must contain `formatLong` property\n * @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n * locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * const result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\nexport function format(date, formatStr, options) {\n const defaultOptions = getDefaultOptions();\n const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const originalDate = toDate(date);\n\n if (!isValid(originalDate)) {\n throw new RangeError(\"Invalid time value\");\n }\n\n let parts = formatStr\n .match(longFormattingTokensRegExp)\n .map((substring) => {\n const firstCharacter = substring[0];\n if (firstCharacter === \"p\" || firstCharacter === \"P\") {\n const longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong);\n }\n return substring;\n })\n .join(\"\")\n .match(formattingTokensRegExp)\n .map((substring) => {\n // Replace two single quote characters with one single quote character\n if (substring === \"''\") {\n return { isToken: false, value: \"'\" };\n }\n\n const firstCharacter = substring[0];\n if (firstCharacter === \"'\") {\n return { isToken: false, value: cleanEscapedString(substring) };\n }\n\n if (formatters[firstCharacter]) {\n return { isToken: true, value: substring };\n }\n\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError(\n \"Format string contains an unescaped latin alphabet character `\" +\n firstCharacter +\n \"`\",\n );\n }\n\n return { isToken: false, value: substring };\n });\n\n // invoke localize preprocessor (only for french locales at the moment)\n if (locale.localize.preprocessor) {\n parts = locale.localize.preprocessor(originalDate, parts);\n }\n\n const formatterOptions = {\n firstWeekContainsDate,\n weekStartsOn,\n locale,\n };\n\n return parts\n .map((part) => {\n if (!part.isToken) return part.value;\n\n const token = part.value;\n\n if (\n (!options?.useAdditionalWeekYearTokens &&\n isProtectedWeekYearToken(token)) ||\n (!options?.useAdditionalDayOfYearTokens &&\n isProtectedDayOfYearToken(token))\n ) {\n warnOrThrowProtectedError(token, formatStr, String(date));\n }\n\n const formatter = formatters[token[0]];\n return formatter(originalDate, token, locale.localize, formatterOptions);\n })\n .join(\"\");\n}\n\nfunction cleanEscapedString(input) {\n const matched = input.match(escapedStringRegExp);\n\n if (!matched) {\n return input;\n }\n\n return matched[1].replace(doubleQuoteRegExp, \"'\");\n}\n\n// Fallback for modularized imports:\nexport default format;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name isSameMonth\n * @category Month Helpers\n * @summary Are the given dates in the same month (and year)?\n *\n * @description\n * Are the given dates in the same month (and year)?\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The first date to check\n * @param dateRight - The second date to check\n *\n * @returns The dates are in the same month (and year)\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n *\n * @example\n * // Are 2 September 2014 and 25 September 2015 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))\n * //=> false\n */\nexport function isSameMonth(dateLeft, dateRight) {\n const _dateLeft = toDate(dateLeft);\n const _dateRight = toDate(dateRight);\n return (\n _dateLeft.getFullYear() === _dateRight.getFullYear() &&\n _dateLeft.getMonth() === _dateRight.getMonth()\n );\n}\n\n// Fallback for modularized imports:\nexport default isSameMonth;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name isEqual\n * @category Common Helpers\n * @summary Are the given dates equal?\n *\n * @description\n * Are the given dates equal?\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The first date to compare\n * @param dateRight - The second date to compare\n *\n * @returns The dates are equal\n *\n * @example\n * // Are 2 July 2014 06:30:45.000 and 2 July 2014 06:30:45.500 equal?\n * const result = isEqual(\n * new Date(2014, 6, 2, 6, 30, 45, 0),\n * new Date(2014, 6, 2, 6, 30, 45, 500)\n * )\n * //=> false\n */\nexport function isEqual(leftDate, rightDate) {\n const _dateLeft = toDate(leftDate);\n const _dateRight = toDate(rightDate);\n return +_dateLeft === +_dateRight;\n}\n\n// Fallback for modularized imports:\nexport default isEqual;\n","import { startOfDay } from \"./startOfDay.mjs\";\n\n/**\n * @name isSameDay\n * @category Day Helpers\n * @summary Are the given dates in the same day (and year and month)?\n *\n * @description\n * Are the given dates in the same day (and year and month)?\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The first date to check\n * @param dateRight - The second date to check\n\n * @returns The dates are in the same day (and year and month)\n *\n * @example\n * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?\n * const result = isSameDay(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 18, 0))\n * //=> true\n *\n * @example\n * // Are 4 September and 4 October in the same day?\n * const result = isSameDay(new Date(2014, 8, 4), new Date(2014, 9, 4))\n * //=> false\n *\n * @example\n * // Are 4 September, 2014 and 4 September, 2015 in the same day?\n * const result = isSameDay(new Date(2014, 8, 4), new Date(2015, 8, 4))\n * //=> false\n */\nexport function isSameDay(dateLeft, dateRight) {\n const dateLeftStartOfDay = startOfDay(dateLeft);\n const dateRightStartOfDay = startOfDay(dateRight);\n\n return +dateLeftStartOfDay === +dateRightStartOfDay;\n}\n\n// Fallback for modularized imports:\nexport default isSameDay;\n","import { toDate } from \"./toDate.mjs\";\nimport { constructFrom } from \"./constructFrom.mjs\";\n\n/**\n * @name addDays\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param amount - The amount of days to be added.\n *\n * @returns The new date with the days added\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * const result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\nexport function addDays(date, amount) {\n const _date = toDate(date);\n if (isNaN(amount)) return constructFrom(date, NaN);\n if (!amount) {\n // If 0 days, no-op to avoid changing times in the hour before end of DST\n return _date;\n }\n _date.setDate(_date.getDate() + amount);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default addDays;\n","import { addDays } from \"./addDays.mjs\";\n\n/**\n * @name addWeeks\n * @category Week Helpers\n * @summary Add the specified number of weeks to the given date.\n *\n * @description\n * Add the specified number of week to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param amount - The amount of weeks to be added.\n *\n * @returns The new date with the weeks added\n *\n * @example\n * // Add 4 weeks to 1 September 2014:\n * const result = addWeeks(new Date(2014, 8, 1), 4)\n * //=> Mon Sep 29 2014 00:00:00\n */\nexport function addWeeks(date, amount) {\n const days = amount * 7;\n return addDays(date, days);\n}\n\n// Fallback for modularized imports:\nexport default addWeeks;\n","import { toDate } from \"./toDate.mjs\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.mjs\";\n\n/**\n * The {@link endOfWeek} function options.\n */\n\n/**\n * @name endOfWeek\n * @category Week Helpers\n * @summary Return the end of a week for the given date.\n *\n * @description\n * Return the end of a week for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a week\n *\n * @example\n * // The end of a week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sat Sep 06 2014 23:59:59.999\n *\n * @example\n * // If the week starts on Monday, the end of the week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Sun Sep 07 2014 23:59:59.999\n */\nexport function endOfWeek(date, options) {\n const defaultOptions = getDefaultOptions();\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const _date = toDate(date);\n const day = _date.getDay();\n const diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);\n\n _date.setDate(_date.getDate() + diff);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfWeek;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst arrowRight = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z\" />\n\t</SVG>\n);\n\nexport default arrowRight;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst arrowLeft = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z\" />\n\t</SVG>\n);\n\nexport default arrowLeft;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"date\"];","import { constructFrom } from \"./constructFrom.mjs\";\nimport { getDaysInMonth } from \"./getDaysInMonth.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name setMonth\n * @category Month Helpers\n * @summary Set the month to the given date.\n *\n * @description\n * Set the month to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param month - The month index to set (0-11)\n *\n * @returns The new date with the month set\n *\n * @example\n * // Set February to 1 September 2014:\n * const result = setMonth(new Date(2014, 8, 1), 1)\n * //=> Sat Feb 01 2014 00:00:00\n */\nexport function setMonth(date, month) {\n const _date = toDate(date);\n const year = _date.getFullYear();\n const day = _date.getDate();\n\n const dateWithDesiredMonth = constructFrom(date, 0);\n dateWithDesiredMonth.setFullYear(year, month, 15);\n dateWithDesiredMonth.setHours(0, 0, 0, 0);\n const daysInMonth = getDaysInMonth(dateWithDesiredMonth);\n // Set the last day of the new month\n // if the original date was the last day of the longer month\n _date.setMonth(month, Math.min(day, daysInMonth));\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default setMonth;\n","import { toDate } from \"./toDate.mjs\";\nimport { constructFrom } from \"./constructFrom.mjs\";\n\n/**\n * @name getDaysInMonth\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The given date\n *\n * @returns The number of days in a month\n *\n * @example\n * // How many days are in February 2000?\n * const result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\nexport function getDaysInMonth(date) {\n const _date = toDate(date);\n const year = _date.getFullYear();\n const monthIndex = _date.getMonth();\n const lastDayOfMonth = constructFrom(date, 0);\n lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);\n lastDayOfMonth.setHours(0, 0, 0, 0);\n return lastDayOfMonth.getDate();\n}\n\n// Fallback for modularized imports:\nexport default getDaysInMonth;\n","import { constructFrom } from \"./constructFrom.mjs\";\nimport { setMonth } from \"./setMonth.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name set\n * @category Common Helpers\n * @summary Set date values to a given date.\n *\n * @description\n * Set date values to a given date.\n *\n * Sets time values to date from object `values`.\n * A value is not set if it is undefined or null or doesn't exist in `values`.\n *\n * Note about bundle size: `set` does not internally use `setX` functions from date-fns but instead opts\n * to use native `Date#setX` methods. If you use this function, you may not want to include the\n * other `setX` functions that date-fns provides if you are concerned about the bundle size.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param values - The date values to be set\n *\n * @returns The new date with options set\n *\n * @example\n * // Transform 1 September 2014 into 20 October 2015 in a single line:\n * const result = set(new Date(2014, 8, 20), { year: 2015, month: 9, date: 20 })\n * //=> Tue Oct 20 2015 00:00:00\n *\n * @example\n * // Set 12 PM to 1 September 2014 01:23:45 to 1 September 2014 12:00:00:\n * const result = set(new Date(2014, 8, 1, 1, 23, 45), { hours: 12 })\n * //=> Mon Sep 01 2014 12:23:45\n */\n\nexport function set(date, values) {\n let _date = toDate(date);\n\n // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n if (isNaN(+_date)) {\n return constructFrom(date, NaN);\n }\n\n if (values.year != null) {\n _date.setFullYear(values.year);\n }\n\n if (values.month != null) {\n _date = setMonth(_date, values.month);\n }\n\n if (values.date != null) {\n _date.setDate(values.date);\n }\n\n if (values.hours != null) {\n _date.setHours(values.hours);\n }\n\n if (values.minutes != null) {\n _date.setMinutes(values.minutes);\n }\n\n if (values.seconds != null) {\n _date.setSeconds(values.seconds);\n }\n\n if (values.milliseconds != null) {\n _date.setMilliseconds(values.milliseconds);\n }\n\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default set;\n","import { addMonths } from \"./addMonths.mjs\";\n\n/**\n * @name addYears\n * @category Year Helpers\n * @summary Add the specified number of years to the given date.\n *\n * @description\n * Add the specified number of years to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param amount - The amount of years to be added.\n *\n * @returns The new date with the years added\n *\n * @example\n * // Add 5 years to 1 September 2014:\n * const result = addYears(new Date(2014, 8, 1), 5)\n * //=> Sun Sep 01 2019 00:00:00\n */\nexport function addYears(date, amount) {\n return addMonths(date, amount * 12);\n}\n\n// Fallback for modularized imports:\nexport default addYears;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * The {@link eachDayOfInterval} function options.\n */\n\n/**\n * @name eachDayOfInterval\n * @category Interval Helpers\n * @summary Return the array of dates within the specified time interval.\n *\n * @description\n * Return the array of dates within the specified time interval.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param interval - The interval.\n * @param options - An object with options.\n *\n * @returns The array with starts of days from the day of the interval start to the day of the interval end\n *\n * @example\n * // Each day between 6 October 2014 and 10 October 2014:\n * const result = eachDayOfInterval({\n * start: new Date(2014, 9, 6),\n * end: new Date(2014, 9, 10)\n * })\n * //=> [\n * // Mon Oct 06 2014 00:00:00,\n * // Tue Oct 07 2014 00:00:00,\n * // Wed Oct 08 2014 00:00:00,\n * // Thu Oct 09 2014 00:00:00,\n * // Fri Oct 10 2014 00:00:00\n * // ]\n */\nexport function eachDayOfInterval(interval, options) {\n const startDate = toDate(interval.start);\n const endDate = toDate(interval.end);\n\n let reversed = +startDate > +endDate;\n const endTime = reversed ? +startDate : +endDate;\n const currentDate = reversed ? endDate : startDate;\n currentDate.setHours(0, 0, 0, 0);\n\n let step = options?.step ?? 1;\n if (!step) return [];\n if (step < 0) {\n step = -step;\n reversed = !reversed;\n }\n\n const dates = [];\n\n while (+currentDate <= endTime) {\n dates.push(toDate(currentDate));\n currentDate.setDate(currentDate.getDate() + step);\n currentDate.setHours(0, 0, 0, 0);\n }\n\n return reversed ? dates.reverse() : dates;\n}\n\n// Fallback for modularized imports:\nexport default eachDayOfInterval;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name startOfMonth\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The start of a month\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfMonth(date) {\n const _date = toDate(date);\n _date.setDate(1);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfMonth;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The end of a month\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport function endOfMonth(date) {\n const _date = toDate(date);\n const month = _date.getMonth();\n _date.setFullYear(_date.getFullYear(), month + 1, 0);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfMonth;\n","/**\n * This source is a local copy of the use-lilius library, since the original\n * library is not actively maintained.\n * @see https://github.com/WordPress/gutenberg/discussions/64968\n *\n * use-lilius@2.0.5\n * https://github.com/Avarios/use-lilius\n *\n * The MIT License (MIT)\n *\n * Copyright (c) 2021-Present Danny Tatom\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n/**\n * External dependencies\n */\nimport {\n\taddMonths,\n\taddYears,\n\teachDayOfInterval,\n\teachMonthOfInterval,\n\teachWeekOfInterval,\n\tendOfMonth,\n\tendOfWeek,\n\tisAfter,\n\tisBefore,\n\tisEqual,\n\tset,\n\tsetMonth,\n\tsetYear,\n\tstartOfMonth,\n\tstartOfToday,\n\tstartOfWeek,\n\tsubMonths,\n\tsubYears,\n} from 'date-fns';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback, useMemo, useState } from '@wordpress/element';\n\nexport enum Month {\n\tJANUARY,\n\tFEBRUARY,\n\tMARCH,\n\tAPRIL,\n\tMAY,\n\tJUNE,\n\tJULY,\n\tAUGUST,\n\tSEPTEMBER,\n\tOCTOBER,\n\tNOVEMBER,\n\tDECEMBER,\n}\n\nexport enum Day {\n\tSUNDAY,\n\tMONDAY,\n\tTUESDAY,\n\tWEDNESDAY,\n\tTHURSDAY,\n\tFRIDAY,\n\tSATURDAY,\n}\n\nexport interface Options {\n\t/**\n\t * What day a week starts on within the calendar matrix.\n\t *\n\t * @default Day.SUNDAY\n\t */\n\tweekStartsOn?: Day;\n\n\t/**\n\t * The initial viewing date.\n\t *\n\t * @default new Date()\n\t */\n\tviewing?: Date;\n\n\t/**\n\t * The initial date(s) selection.\n\t *\n\t * @default []\n\t */\n\tselected?: Date[];\n\n\t/**\n\t * The number of months in the calendar.\n\t *\n\t * @default 1\n\t */\n\tnumberOfMonths?: number;\n}\n\nexport interface Returns {\n\t/**\n\t * Returns a copy of the given date with the time set to 00:00:00:00.\n\t */\n\tclearTime: ( date: Date ) => Date;\n\n\t/**\n\t * Returns whether or not a date is between 2 other dates (inclusive).\n\t */\n\tinRange: ( date: Date, min: Date, max: Date ) => boolean;\n\n\t/**\n\t * The date represented in the calendar matrix. Note that\n\t * the month and year are the only parts used.\n\t */\n\tviewing: Date;\n\n\t/**\n\t * Set the date represented in the calendar matrix. Note that\n\t * the month and year are the only parts used.\n\t */\n\tsetViewing: React.Dispatch< React.SetStateAction< Date > >;\n\n\t/**\n\t * Set the viewing date to today.\n\t */\n\tviewToday: () => void;\n\n\t/**\n\t * Set the viewing date to the given month.\n\t */\n\tviewMonth: ( month: Month ) => void;\n\n\t/**\n\t * Set the viewing date to the month before the current.\n\t */\n\tviewPreviousMonth: () => void;\n\n\t/**\n\t * Set the viewing date to the month after the current.\n\t */\n\tviewNextMonth: () => void;\n\n\t/**\n\t * Set the viewing date to the given year.\n\t */\n\tviewYear: ( year: number ) => void;\n\n\t/**\n\t * Set the viewing date to the year before the current.\n\t */\n\tviewPreviousYear: () => void;\n\n\t/**\n\t * Set the viewing date to the year after the current.\n\t */\n\tviewNextYear: () => void;\n\n\t/**\n\t * The dates currently selected.\n\t */\n\tselected: Date[];\n\n\t/**\n\t * Override the currently selected dates.\n\t */\n\tsetSelected: React.Dispatch< React.SetStateAction< Date[] > >;\n\n\t/**\n\t * Reset the selected dates to [].\n\t */\n\tclearSelected: () => void;\n\n\t/**\n\t * Determine whether or not a date has been selected.\n\t */\n\tisSelected: ( date: Date ) => boolean;\n\n\t/**\n\t * Select one or more dates.\n\t */\n\tselect: ( date: Date | Date[], replaceExisting?: boolean ) => void;\n\n\t/**\n\t * Deselect one or more dates.\n\t */\n\tdeselect: ( date: Date | Date[] ) => void;\n\n\t/**\n\t * Toggle the selection of a date.\n\t */\n\ttoggle: ( date: Date, replaceExisting?: boolean ) => void;\n\n\t/**\n\t * Select a range of dates (inclusive).\n\t */\n\tselectRange: ( start: Date, end: Date, replaceExisting?: boolean ) => void;\n\n\t/**\n\t * Deselect a range of dates (inclusive).\n\t */\n\tdeselectRange: ( start: Date, end: Date ) => void;\n\n\t/**\n\t * A matrix of days based on the current viewing date.\n\t */\n\tcalendar: Date[][][];\n}\n\nconst inRange = ( date: Date, min: Date, max: Date ) =>\n\t( isEqual( date, min ) || isAfter( date, min ) ) &&\n\t( isEqual( date, max ) || isBefore( date, max ) );\n\nconst clearTime = ( date: Date ) =>\n\tset( date, { hours: 0, minutes: 0, seconds: 0, milliseconds: 0 } );\n\nexport const useLilius = ( {\n\tweekStartsOn = Day.SUNDAY,\n\tviewing: initialViewing = new Date(),\n\tselected: initialSelected = [],\n\tnumberOfMonths = 1,\n}: Options = {} ): Returns => {\n\tconst [ viewing, setViewing ] = useState< Date >( initialViewing );\n\n\tconst viewToday = useCallback(\n\t\t() => setViewing( startOfToday() ),\n\t\t[ setViewing ]\n\t);\n\n\tconst viewMonth = useCallback(\n\t\t( month: Month ) => setViewing( ( v ) => setMonth( v, month ) ),\n\t\t[]\n\t);\n\n\tconst viewPreviousMonth = useCallback(\n\t\t() => setViewing( ( v ) => subMonths( v, 1 ) ),\n\t\t[]\n\t);\n\n\tconst viewNextMonth = useCallback(\n\t\t() => setViewing( ( v ) => addMonths( v, 1 ) ),\n\t\t[]\n\t);\n\n\tconst viewYear = useCallback(\n\t\t( year: number ) => setViewing( ( v ) => setYear( v, year ) ),\n\t\t[]\n\t);\n\n\tconst viewPreviousYear = useCallback(\n\t\t() => setViewing( ( v ) => subYears( v, 1 ) ),\n\t\t[]\n\t);\n\n\tconst viewNextYear = useCallback(\n\t\t() => setViewing( ( v ) => addYears( v, 1 ) ),\n\t\t[]\n\t);\n\n\tconst [ selected, setSelected ] = useState< Date[] >(\n\t\tinitialSelected.map( clearTime )\n\t);\n\n\tconst clearSelected = () => setSelected( [] );\n\n\tconst isSelected = useCallback(\n\t\t( date: Date ) =>\n\t\t\tselected.findIndex( ( s ) => isEqual( s, date ) ) > -1,\n\t\t[ selected ]\n\t);\n\n\tconst select = useCallback(\n\t\t( date: Date | Date[], replaceExisting?: boolean ) => {\n\t\t\tif ( replaceExisting ) {\n\t\t\t\tsetSelected( Array.isArray( date ) ? date : [ date ] );\n\t\t\t} else {\n\t\t\t\tsetSelected( ( selectedItems ) =>\n\t\t\t\t\tselectedItems.concat(\n\t\t\t\t\t\tArray.isArray( date ) ? date : [ date ]\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[]\n\t);\n\n\tconst deselect = useCallback(\n\t\t( date: Date | Date[] ) =>\n\t\t\tsetSelected( ( selectedItems ) =>\n\t\t\t\tArray.isArray( date )\n\t\t\t\t\t? selectedItems.filter(\n\t\t\t\t\t\t\t( s ) =>\n\t\t\t\t\t\t\t\t! date\n\t\t\t\t\t\t\t\t\t.map( ( d ) => d.getTime() )\n\t\t\t\t\t\t\t\t\t.includes( s.getTime() )\n\t\t\t\t\t )\n\t\t\t\t\t: selectedItems.filter( ( s ) => ! isEqual( s, date ) )\n\t\t\t),\n\t\t[]\n\t);\n\n\tconst toggle = useCallback(\n\t\t( date: Date, replaceExisting?: boolean ) =>\n\t\t\tisSelected( date )\n\t\t\t\t? deselect( date )\n\t\t\t\t: select( date, replaceExisting ),\n\t\t[ deselect, isSelected, select ]\n\t);\n\n\tconst selectRange = useCallback(\n\t\t( start: Date, end: Date, replaceExisting?: boolean ) => {\n\t\t\tif ( replaceExisting ) {\n\t\t\t\tsetSelected( eachDayOfInterval( { start, end } ) );\n\t\t\t} else {\n\t\t\t\tsetSelected( ( selectedItems ) =>\n\t\t\t\t\tselectedItems.concat( eachDayOfInterval( { start, end } ) )\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[]\n\t);\n\n\tconst deselectRange = useCallback( ( start: Date, end: Date ) => {\n\t\tsetSelected( ( selectedItems ) =>\n\t\t\tselectedItems.filter(\n\t\t\t\t( s ) =>\n\t\t\t\t\t! eachDayOfInterval( { start, end } )\n\t\t\t\t\t\t.map( ( d ) => d.getTime() )\n\t\t\t\t\t\t.includes( s.getTime() )\n\t\t\t)\n\t\t);\n\t}, [] );\n\n\tconst calendar = useMemo< Date[][][] >(\n\t\t() =>\n\t\t\teachMonthOfInterval( {\n\t\t\t\tstart: startOfMonth( viewing ),\n\t\t\t\tend: endOfMonth( addMonths( viewing, numberOfMonths - 1 ) ),\n\t\t\t} ).map( ( month ) =>\n\t\t\t\teachWeekOfInterval(\n\t\t\t\t\t{\n\t\t\t\t\t\tstart: startOfMonth( month ),\n\t\t\t\t\t\tend: endOfMonth( month ),\n\t\t\t\t\t},\n\t\t\t\t\t{ weekStartsOn }\n\t\t\t\t).map( ( week ) =>\n\t\t\t\t\teachDayOfInterval( {\n\t\t\t\t\t\tstart: startOfWeek( week, { weekStartsOn } ),\n\t\t\t\t\t\tend: endOfWeek( week, { weekStartsOn } ),\n\t\t\t\t\t} )\n\t\t\t\t)\n\t\t\t),\n\t\t[ viewing, weekStartsOn, numberOfMonths ]\n\t);\n\n\treturn {\n\t\tclearTime,\n\t\tinRange,\n\t\tviewing,\n\t\tsetViewing,\n\t\tviewToday,\n\t\tviewMonth,\n\t\tviewPreviousMonth,\n\t\tviewNextMonth,\n\t\tviewYear,\n\t\tviewPreviousYear,\n\t\tviewNextYear,\n\t\tselected,\n\t\tsetSelected,\n\t\tclearSelected,\n\t\tisSelected,\n\t\tselect,\n\t\tdeselect,\n\t\ttoggle,\n\t\tselectRange,\n\t\tdeselectRange,\n\t\tcalendar,\n\t};\n};\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name isAfter\n * @category Common Helpers\n * @summary Is the first date after the second one?\n *\n * @description\n * Is the first date after the second one?\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date that should be after the other one to return true\n * @param dateToCompare - The date to compare with\n *\n * @returns The first date is after the second date\n *\n * @example\n * // Is 10 July 1989 after 11 February 1987?\n * const result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> true\n */\nexport function isAfter(date, dateToCompare) {\n const _date = toDate(date);\n const _dateToCompare = toDate(dateToCompare);\n return _date.getTime() > _dateToCompare.getTime();\n}\n\n// Fallback for modularized imports:\nexport default isAfter;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name isBefore\n * @category Common Helpers\n * @summary Is the first date before the second one?\n *\n * @description\n * Is the first date before the second one?\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date that should be before the other one to return true\n * @param dateToCompare - The date to compare with\n *\n * @returns The first date is before the second date\n *\n * @example\n * // Is 10 July 1989 before 11 February 1987?\n * const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> false\n */\nexport function isBefore(date, dateToCompare) {\n const _date = toDate(date);\n const _dateToCompare = toDate(dateToCompare);\n return +_date < +_dateToCompare;\n}\n\n// Fallback for modularized imports:\nexport default isBefore;\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport { boxSizingReset, COLORS, CONFIG } from '../../utils';\nimport { HStack } from '../../h-stack';\nimport { Heading } from '../../heading';\nimport { space } from '../../utils/space';\n\nexport const Wrapper = styled.div`\n\t${ boxSizingReset }\n`;\n\nexport const Navigator = styled( HStack )`\n\tmargin-bottom: ${ space( 4 ) };\n`;\n\nexport const NavigatorHeading = styled( Heading )`\n\tfont-size: ${ CONFIG.fontSize };\n\tfont-weight: ${ CONFIG.fontWeight };\n\n\tstrong {\n\t\tfont-weight: ${ CONFIG.fontWeightHeading };\n\t}\n`;\n\nexport const Calendar = styled.div`\n\tcolumn-gap: ${ space( 2 ) };\n\tdisplay: grid;\n\tgrid-template-columns: 0.5fr repeat( 5, 1fr ) 0.5fr;\n\tjustify-items: center;\n\trow-gap: ${ space( 2 ) };\n`;\n\nexport const DayOfWeek = styled.div`\n\tcolor: ${ COLORS.theme.gray[ 700 ] };\n\tfont-size: ${ CONFIG.fontSize };\n\tline-height: ${ CONFIG.fontLineHeightBase };\n\n\t&:nth-of-type( 1 ) {\n\t\tjustify-self: start;\n\t}\n\n\t&:nth-of-type( 7 ) {\n\t\tjustify-self: end;\n\t}\n`;\n\nexport const DayButton = styled( Button, {\n\tshouldForwardProp: ( prop: string ) =>\n\t\t! [ 'column', 'isSelected', 'isToday', 'hasEvents' ].includes( prop ),\n} )< {\n\tcolumn: number;\n\tisSelected: boolean;\n\tisToday: boolean;\n\thasEvents: boolean;\n} >`\n\tgrid-column: ${ ( props ) => props.column };\n\tposition: relative;\n\tjustify-content: center;\n\n\t${ ( props ) =>\n\t\tprops.column === 1 &&\n\t\t`\n\t\tjustify-self: start;\n\t\t` }\n\n\t${ ( props ) =>\n\t\tprops.column === 7 &&\n\t\t`\n\t\tjustify-self: end;\n\t\t` }\n\n\t${ ( props ) =>\n\t\tprops.disabled &&\n\t\t`\n\t\tpointer-events: none;\n\t\t` }\n\n\t&&& {\n\t\tborder-radius: ${ CONFIG.radiusRound };\n\t\theight: ${ space( 7 ) };\n\t\twidth: ${ space( 7 ) };\n\n\t\t${ ( props ) =>\n\t\t\tprops.isSelected &&\n\t\t\t`\n\t\t\t\tbackground: ${ COLORS.theme.accent };\n\n\t\t\t\t&,\n\t\t\t\t&:hover:not(:disabled, [aria-disabled=true]) {\n\t\t\t\t\tcolor: ${ COLORS.theme.accentInverted };\n\t\t\t\t}\n\n\t\t\t\t&:focus:not(:disabled),\n\t\t\t\t&:focus:not(:disabled) {\n\t\t\t\t\tborder: ${ CONFIG.borderWidthFocus } solid currentColor;\n\t\t\t\t}\n\n\t\t\t\t/* Highlight the selected day for high-contrast mode */\n\t\t\t\t&::after {\n\t\t\t\t\tcontent: '';\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\tpointer-events: none;\n\t\t\t\t\tinset: 0;\n\t\t\t\t\tborder-radius: inherit;\n\t\t\t\t\tborder: 1px solid transparent;\n\t\t\t\t}\n\t\t\t` }\n\n\t\t${ ( props ) =>\n\t\t\t! props.isSelected &&\n\t\t\tprops.isToday &&\n\t\t\t`\n\t\t\tbackground: ${ COLORS.theme.gray[ 200 ] };\n\t\t\t` }\n\t}\n\n\t${ ( props ) =>\n\t\tprops.hasEvents &&\n\t\t`\n\t\t::before {\n\t\t\tborder: 2px solid ${\n\t\t\t\tprops.isSelected\n\t\t\t\t\t? COLORS.theme.accentInverted\n\t\t\t\t\t: COLORS.theme.accent\n\t\t\t};\n\t\t\tborder-radius: ${ CONFIG.radiusRound };\n\t\t\tcontent: \" \";\n\t\t\tleft: 50%;\n\t\t\tposition: absolute;\n\t\t\ttransform: translate(-50%, 9px);\n\t\t}\n\t\t` }\n`;\n","/**\n * External dependencies\n */\nimport { toDate } from 'date-fns';\n\n/**\n * Internal dependencies\n */\nimport type { InputState } from '../input-control/reducer/state';\nimport type { InputAction } from '../input-control/reducer/actions';\nimport { COMMIT, PRESS_DOWN, PRESS_UP } from '../input-control/reducer/actions';\n\n/**\n * Like date-fn's toDate, but tries to guess the format when a string is\n * given.\n *\n * @param input Value to turn into a date.\n */\nexport function inputToDate( input: Date | string | number ): Date {\n\tif ( typeof input === 'string' ) {\n\t\treturn new Date( input );\n\t}\n\treturn toDate( input );\n}\n\n/**\n * Converts a 12-hour time to a 24-hour time.\n * @param hours\n * @param isPm\n */\nexport function from12hTo24h( hours: number, isPm: boolean ) {\n\treturn isPm ? ( ( hours % 12 ) + 12 ) % 24 : hours % 12;\n}\n\n/**\n * Converts a 24-hour time to a 12-hour time.\n * @param hours\n */\nexport function from24hTo12h( hours: number ) {\n\treturn hours % 12 || 12;\n}\n\n/**\n * Creates an InputControl reducer used to pad an input so that it is always a\n * given width. For example, the hours and minutes inputs are padded to 2 so\n * that '4' appears as '04'.\n *\n * @param pad How many digits the value should be.\n */\nexport function buildPadInputStateReducer( pad: number ) {\n\treturn ( state: InputState, action: InputAction ) => {\n\t\tconst nextState = { ...state };\n\t\tif (\n\t\t\taction.type === COMMIT ||\n\t\t\taction.type === PRESS_UP ||\n\t\t\taction.type === PRESS_DOWN\n\t\t) {\n\t\t\tif ( nextState.value !== undefined ) {\n\t\t\t\tnextState.value = nextState.value\n\t\t\t\t\t.toString()\n\t\t\t\t\t.padStart( pad, '0' );\n\t\t\t}\n\t\t}\n\t\treturn nextState;\n\t};\n}\n\n/**\n * Validates the target of a React event to ensure it is an input element and\n * that the input is valid.\n * @param event\n */\nexport function validateInputElementTarget( event: React.SyntheticEvent ) {\n\t// `instanceof` checks need to get the instance definition from the\n\t// corresponding window object — therefore, the following logic makes\n\t// the component work correctly even when rendered inside an iframe.\n\tconst HTMLInputElementInstance =\n\t\t( event.target as HTMLInputElement )?.ownerDocument.defaultView\n\t\t\t?.HTMLInputElement ?? HTMLInputElement;\n\n\tif ( ! ( event.target instanceof HTMLInputElementInstance ) ) {\n\t\treturn false;\n\t}\n\n\treturn event.target.validity.valid;\n}\n","export const TIMEZONELESS_FORMAT = \"yyyy-MM-dd'T'HH:mm:ss\";\n","/**\n * External dependencies\n */\nimport {\n\tformat,\n\tisSameDay,\n\tsubMonths,\n\taddMonths,\n\tstartOfDay,\n\tisEqual,\n\taddDays,\n\tsubWeeks,\n\taddWeeks,\n\tisSameMonth,\n\tstartOfWeek,\n\tendOfWeek,\n} from 'date-fns';\nimport type { KeyboardEventHandler } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { __, _n, sprintf, isRTL } from '@wordpress/i18n';\nimport { arrowLeft, arrowRight } from '@wordpress/icons';\nimport { dateI18n, getSettings } from '@wordpress/date';\nimport { useState, useRef, useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useLilius } from './use-lilius';\nimport type { DatePickerProps } from '../types';\nimport {\n\tWrapper,\n\tNavigator,\n\tNavigatorHeading,\n\tCalendar,\n\tDayOfWeek,\n\tDayButton,\n} from './styles';\nimport { inputToDate } from '../utils';\nimport Button from '../../button';\nimport { TIMEZONELESS_FORMAT } from '../constants';\n\n/**\n * DatePicker is a React component that renders a calendar for date selection.\n *\n * ```jsx\n * import { DatePicker } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyDatePicker = () => {\n * const [ date, setDate ] = useState( new Date() );\n *\n * return (\n * <DatePicker\n * currentDate={ date }\n * onChange={ ( newDate ) => setDate( newDate ) }\n * />\n * );\n * };\n * ```\n */\nexport function DatePicker( {\n\tcurrentDate,\n\tonChange,\n\tevents = [],\n\tisInvalidDate,\n\tonMonthPreviewed,\n\tstartOfWeek: weekStartsOn = 0,\n}: DatePickerProps ) {\n\tconst date = currentDate ? inputToDate( currentDate ) : new Date();\n\n\tconst {\n\t\tcalendar,\n\t\tviewing,\n\t\tsetSelected,\n\t\tsetViewing,\n\t\tisSelected,\n\t\tviewPreviousMonth,\n\t\tviewNextMonth,\n\t} = useLilius( {\n\t\tselected: [ startOfDay( date ) ],\n\t\tviewing: startOfDay( date ),\n\t\tweekStartsOn,\n\t} );\n\n\t// Used to implement a roving tab index. Tracks the day that receives focus\n\t// when the user tabs into the calendar.\n\tconst [ focusable, setFocusable ] = useState( startOfDay( date ) );\n\n\t// Allows us to only programmatically focus() a day when focus was already\n\t// within the calendar. This stops us stealing focus from e.g. a TimePicker\n\t// input.\n\tconst [ isFocusWithinCalendar, setIsFocusWithinCalendar ] =\n\t\tuseState( false );\n\n\t// Update internal state when currentDate prop changes.\n\tconst [ prevCurrentDate, setPrevCurrentDate ] = useState( currentDate );\n\tif ( currentDate !== prevCurrentDate ) {\n\t\tsetPrevCurrentDate( currentDate );\n\t\tsetSelected( [ startOfDay( date ) ] );\n\t\tsetViewing( startOfDay( date ) );\n\t\tsetFocusable( startOfDay( date ) );\n\t}\n\n\treturn (\n\t\t<Wrapper\n\t\t\tclassName=\"components-datetime__date\"\n\t\t\trole=\"application\"\n\t\t\taria-label={ __( 'Calendar' ) }\n\t\t>\n\t\t\t<Navigator>\n\t\t\t\t<Button\n\t\t\t\t\ticon={ isRTL() ? arrowRight : arrowLeft }\n\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\taria-label={ __( 'View previous month' ) }\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\tviewPreviousMonth();\n\t\t\t\t\t\tsetFocusable( subMonths( focusable, 1 ) );\n\t\t\t\t\t\tonMonthPreviewed?.(\n\t\t\t\t\t\t\tformat(\n\t\t\t\t\t\t\t\tsubMonths( viewing, 1 ),\n\t\t\t\t\t\t\t\tTIMEZONELESS_FORMAT\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t} }\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t/>\n\t\t\t\t<NavigatorHeading level={ 3 }>\n\t\t\t\t\t<strong>\n\t\t\t\t\t\t{ dateI18n(\n\t\t\t\t\t\t\t'F',\n\t\t\t\t\t\t\tviewing,\n\t\t\t\t\t\t\t-viewing.getTimezoneOffset()\n\t\t\t\t\t\t) }\n\t\t\t\t\t</strong>{ ' ' }\n\t\t\t\t\t{ dateI18n( 'Y', viewing, -viewing.getTimezoneOffset() ) }\n\t\t\t\t</NavigatorHeading>\n\t\t\t\t<Button\n\t\t\t\t\ticon={ isRTL() ? arrowLeft : arrowRight }\n\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\taria-label={ __( 'View next month' ) }\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\tviewNextMonth();\n\t\t\t\t\t\tsetFocusable( addMonths( focusable, 1 ) );\n\t\t\t\t\t\tonMonthPreviewed?.(\n\t\t\t\t\t\t\tformat(\n\t\t\t\t\t\t\t\taddMonths( viewing, 1 ),\n\t\t\t\t\t\t\t\tTIMEZONELESS_FORMAT\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t} }\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t/>\n\t\t\t</Navigator>\n\t\t\t<Calendar\n\t\t\t\tonFocus={ () => setIsFocusWithinCalendar( true ) }\n\t\t\t\tonBlur={ () => setIsFocusWithinCalendar( false ) }\n\t\t\t>\n\t\t\t\t{ calendar[ 0 ][ 0 ].map( ( day ) => (\n\t\t\t\t\t<DayOfWeek key={ day.toString() }>\n\t\t\t\t\t\t{ dateI18n( 'D', day, -day.getTimezoneOffset() ) }\n\t\t\t\t\t</DayOfWeek>\n\t\t\t\t) ) }\n\t\t\t\t{ calendar[ 0 ].map( ( week ) =>\n\t\t\t\t\tweek.map( ( day, index ) => {\n\t\t\t\t\t\tif ( ! isSameMonth( day, viewing ) ) {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<Day\n\t\t\t\t\t\t\t\tkey={ day.toString() }\n\t\t\t\t\t\t\t\tday={ day }\n\t\t\t\t\t\t\t\tcolumn={ index + 1 }\n\t\t\t\t\t\t\t\tisSelected={ isSelected( day ) }\n\t\t\t\t\t\t\t\tisFocusable={ isEqual( day, focusable ) }\n\t\t\t\t\t\t\t\tisFocusAllowed={ isFocusWithinCalendar }\n\t\t\t\t\t\t\t\tisToday={ isSameDay( day, new Date() ) }\n\t\t\t\t\t\t\t\tisInvalid={\n\t\t\t\t\t\t\t\t\tisInvalidDate ? isInvalidDate( day ) : false\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tnumEvents={\n\t\t\t\t\t\t\t\t\tevents.filter( ( event ) =>\n\t\t\t\t\t\t\t\t\t\tisSameDay( event.date, day )\n\t\t\t\t\t\t\t\t\t).length\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tsetSelected( [ day ] );\n\t\t\t\t\t\t\t\t\tsetFocusable( day );\n\t\t\t\t\t\t\t\t\tonChange?.(\n\t\t\t\t\t\t\t\t\t\tformat(\n\t\t\t\t\t\t\t\t\t\t\t// Don't change the selected date's time fields.\n\t\t\t\t\t\t\t\t\t\t\tnew Date(\n\t\t\t\t\t\t\t\t\t\t\t\tday.getFullYear(),\n\t\t\t\t\t\t\t\t\t\t\t\tday.getMonth(),\n\t\t\t\t\t\t\t\t\t\t\t\tday.getDate(),\n\t\t\t\t\t\t\t\t\t\t\t\tdate.getHours(),\n\t\t\t\t\t\t\t\t\t\t\t\tdate.getMinutes(),\n\t\t\t\t\t\t\t\t\t\t\t\tdate.getSeconds(),\n\t\t\t\t\t\t\t\t\t\t\t\tdate.getMilliseconds()\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\tTIMEZONELESS_FORMAT\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\t\t\tlet nextFocusable;\n\t\t\t\t\t\t\t\t\tif ( event.key === 'ArrowLeft' ) {\n\t\t\t\t\t\t\t\t\t\tnextFocusable = addDays(\n\t\t\t\t\t\t\t\t\t\t\tday,\n\t\t\t\t\t\t\t\t\t\t\tisRTL() ? 1 : -1\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ( event.key === 'ArrowRight' ) {\n\t\t\t\t\t\t\t\t\t\tnextFocusable = addDays(\n\t\t\t\t\t\t\t\t\t\t\tday,\n\t\t\t\t\t\t\t\t\t\t\tisRTL() ? -1 : 1\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ( event.key === 'ArrowUp' ) {\n\t\t\t\t\t\t\t\t\t\tnextFocusable = subWeeks( day, 1 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ( event.key === 'ArrowDown' ) {\n\t\t\t\t\t\t\t\t\t\tnextFocusable = addWeeks( day, 1 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ( event.key === 'PageUp' ) {\n\t\t\t\t\t\t\t\t\t\tnextFocusable = subMonths( day, 1 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ( event.key === 'PageDown' ) {\n\t\t\t\t\t\t\t\t\t\tnextFocusable = addMonths( day, 1 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ( event.key === 'Home' ) {\n\t\t\t\t\t\t\t\t\t\tnextFocusable = startOfWeek( day );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ( event.key === 'End' ) {\n\t\t\t\t\t\t\t\t\t\tnextFocusable = startOfDay(\n\t\t\t\t\t\t\t\t\t\t\tendOfWeek( day )\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ( nextFocusable ) {\n\t\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t\t\tsetFocusable( nextFocusable );\n\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\t! isSameMonth(\n\t\t\t\t\t\t\t\t\t\t\t\tnextFocusable,\n\t\t\t\t\t\t\t\t\t\t\t\tviewing\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\tsetViewing( nextFocusable );\n\t\t\t\t\t\t\t\t\t\t\tonMonthPreviewed?.(\n\t\t\t\t\t\t\t\t\t\t\t\tformat(\n\t\t\t\t\t\t\t\t\t\t\t\t\tnextFocusable,\n\t\t\t\t\t\t\t\t\t\t\t\t\tTIMEZONELESS_FORMAT\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t);\n\t\t\t\t\t} )\n\t\t\t\t) }\n\t\t\t</Calendar>\n\t\t</Wrapper>\n\t);\n}\n\ntype DayProps = {\n\tday: Date;\n\tcolumn: number;\n\tisSelected: boolean;\n\tisFocusable: boolean;\n\tisFocusAllowed: boolean;\n\tisToday: boolean;\n\tnumEvents: number;\n\tisInvalid: boolean;\n\tonClick: () => void;\n\tonKeyDown: KeyboardEventHandler;\n};\n\nfunction Day( {\n\tday,\n\tcolumn,\n\tisSelected,\n\tisFocusable,\n\tisFocusAllowed,\n\tisToday,\n\tisInvalid,\n\tnumEvents,\n\tonClick,\n\tonKeyDown,\n}: DayProps ) {\n\tconst ref = useRef< HTMLButtonElement >();\n\n\t// Focus the day when it becomes focusable, e.g. because an arrow key is\n\t// pressed. Only do this if focus is allowed - this stops us stealing focus\n\t// from e.g. a TimePicker input.\n\tuseEffect( () => {\n\t\tif ( ref.current && isFocusable && isFocusAllowed ) {\n\t\t\tref.current.focus();\n\t\t}\n\t\t// isFocusAllowed is not a dep as there is no point calling focus() on\n\t\t// an already focused element.\n\t}, [ isFocusable ] );\n\n\treturn (\n\t\t<DayButton\n\t\t\t__next40pxDefaultSize\n\t\t\tref={ ref }\n\t\t\tclassName=\"components-datetime__date__day\" // Unused, for backwards compatibility.\n\t\t\tdisabled={ isInvalid }\n\t\t\ttabIndex={ isFocusable ? 0 : -1 }\n\t\t\taria-label={ getDayLabel( day, isSelected, numEvents ) }\n\t\t\tcolumn={ column }\n\t\t\tisSelected={ isSelected }\n\t\t\tisToday={ isToday }\n\t\t\thasEvents={ numEvents > 0 }\n\t\t\tonClick={ onClick }\n\t\t\tonKeyDown={ onKeyDown }\n\t\t>\n\t\t\t{ dateI18n( 'j', day, -day.getTimezoneOffset() ) }\n\t\t</DayButton>\n\t);\n}\n\nfunction getDayLabel( date: Date, isSelected: boolean, numEvents: number ) {\n\tconst { formats } = getSettings();\n\tconst localizedDate = dateI18n(\n\t\tformats.date,\n\t\tdate,\n\t\t-date.getTimezoneOffset()\n\t);\n\tif ( isSelected && numEvents > 0 ) {\n\t\treturn sprintf(\n\t\t\t// translators: 1: The calendar date. 2: Number of events on the calendar date.\n\t\t\t_n(\n\t\t\t\t'%1$s. Selected. There is %2$d event',\n\t\t\t\t'%1$s. Selected. There are %2$d events',\n\t\t\t\tnumEvents\n\t\t\t),\n\t\t\tlocalizedDate,\n\t\t\tnumEvents\n\t\t);\n\t} else if ( isSelected ) {\n\t\treturn sprintf(\n\t\t\t// translators: %s: The calendar date.\n\t\t\t__( '%1$s. Selected' ),\n\t\t\tlocalizedDate\n\t\t);\n\t} else if ( numEvents > 0 ) {\n\t\treturn sprintf(\n\t\t\t// translators: 1: The calendar date. 2: Number of events on the calendar date.\n\t\t\t_n(\n\t\t\t\t'%1$s. There is %2$d event',\n\t\t\t\t'%1$s. There are %2$d events',\n\t\t\t\tnumEvents\n\t\t\t),\n\t\t\tlocalizedDate,\n\t\t\tnumEvents\n\t\t);\n\t}\n\treturn localizedDate;\n}\n\nexport default DatePicker;\n","import { startOfDay } from \"./startOfDay.mjs\";\n\n/**\n * @name startOfToday\n * @category Day Helpers\n * @summary Return the start of today.\n * @pure false\n *\n * @description\n * Return the start of today.\n *\n * @returns The start of today\n *\n * @example\n * // If today is 6 October 2014:\n * const result = startOfToday()\n * //=> Mon Oct 6 2014 00:00:00\n */\nexport function startOfToday() {\n return startOfDay(Date.now());\n}\n\n// Fallback for modularized imports:\nexport default startOfToday;\n","import { constructFrom } from \"./constructFrom.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name setYear\n * @category Year Helpers\n * @summary Set the year to the given date.\n *\n * @description\n * Set the year to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param year - The year of the new date\n *\n * @returns The new date with the year set\n *\n * @example\n * // Set year 2013 to 1 September 2014:\n * const result = setYear(new Date(2014, 8, 1), 2013)\n * //=> Sun Sep 01 2013 00:00:00\n */\nexport function setYear(date, year) {\n const _date = toDate(date);\n\n // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n if (isNaN(+_date)) {\n return constructFrom(date, NaN);\n }\n\n _date.setFullYear(year);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default setYear;\n","import { addYears } from \"./addYears.mjs\";\n\n/**\n * @name subYears\n * @category Year Helpers\n * @summary Subtract the specified number of years from the given date.\n *\n * @description\n * Subtract the specified number of years from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param amount - The amount of years to be subtracted.\n *\n * @returns The new date with the years subtracted\n *\n * @example\n * // Subtract 5 years from 1 September 2014:\n * const result = subYears(new Date(2014, 8, 1), 5)\n * //=> Tue Sep 01 2009 00:00:00\n */\nexport function subYears(date, amount) {\n return addYears(date, -amount);\n}\n\n// Fallback for modularized imports:\nexport default subYears;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * The {@link eachMonthOfInterval} function options.\n */\n\n/**\n * @name eachMonthOfInterval\n * @category Interval Helpers\n * @summary Return the array of months within the specified time interval.\n *\n * @description\n * Return the array of months within the specified time interval.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param interval - The interval\n *\n * @returns The array with starts of months from the month of the interval start to the month of the interval end\n *\n * @example\n * // Each month between 6 February 2014 and 10 August 2014:\n * const result = eachMonthOfInterval({\n * start: new Date(2014, 1, 6),\n * end: new Date(2014, 7, 10)\n * })\n * //=> [\n * // Sat Feb 01 2014 00:00:00,\n * // Sat Mar 01 2014 00:00:00,\n * // Tue Apr 01 2014 00:00:00,\n * // Thu May 01 2014 00:00:00,\n * // Sun Jun 01 2014 00:00:00,\n * // Tue Jul 01 2014 00:00:00,\n * // Fri Aug 01 2014 00:00:00\n * // ]\n */\nexport function eachMonthOfInterval(interval, options) {\n const startDate = toDate(interval.start);\n const endDate = toDate(interval.end);\n\n let reversed = +startDate > +endDate;\n const endTime = reversed ? +startDate : +endDate;\n const currentDate = reversed ? endDate : startDate;\n currentDate.setHours(0, 0, 0, 0);\n currentDate.setDate(1);\n\n let step = options?.step ?? 1;\n if (!step) return [];\n if (step < 0) {\n step = -step;\n reversed = !reversed;\n }\n\n const dates = [];\n\n while (+currentDate <= endTime) {\n dates.push(toDate(currentDate));\n currentDate.setMonth(currentDate.getMonth() + step);\n }\n\n return reversed ? dates.reverse() : dates;\n}\n\n// Fallback for modularized imports:\nexport default eachMonthOfInterval;\n","import { addWeeks } from \"./addWeeks.mjs\";\nimport { startOfWeek } from \"./startOfWeek.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * The {@link eachWeekOfInterval} function options.\n */\n\n/**\n * @name eachWeekOfInterval\n * @category Interval Helpers\n * @summary Return the array of weeks within the specified time interval.\n *\n * @description\n * Return the array of weeks within the specified time interval.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param interval - The interval.\n * @param options - An object with options.\n *\n * @returns The array with starts of weeks from the week of the interval start to the week of the interval end\n *\n * @example\n * // Each week within interval 6 October 2014 - 23 November 2014:\n * const result = eachWeekOfInterval({\n * start: new Date(2014, 9, 6),\n * end: new Date(2014, 10, 23)\n * })\n * //=> [\n * // Sun Oct 05 2014 00:00:00,\n * // Sun Oct 12 2014 00:00:00,\n * // Sun Oct 19 2014 00:00:00,\n * // Sun Oct 26 2014 00:00:00,\n * // Sun Nov 02 2014 00:00:00,\n * // Sun Nov 09 2014 00:00:00,\n * // Sun Nov 16 2014 00:00:00,\n * // Sun Nov 23 2014 00:00:00\n * // ]\n */\nexport function eachWeekOfInterval(interval, options) {\n const startDate = toDate(interval.start);\n const endDate = toDate(interval.end);\n\n let reversed = +startDate > +endDate;\n const startDateWeek = reversed\n ? startOfWeek(endDate, options)\n : startOfWeek(startDate, options);\n const endDateWeek = reversed\n ? startOfWeek(startDate, options)\n : startOfWeek(endDate, options);\n\n // Some timezones switch DST at midnight, making start of day unreliable in these timezones, 3pm is a safe bet\n startDateWeek.setHours(15);\n endDateWeek.setHours(15);\n\n const endTime = +endDateWeek.getTime();\n let currentDate = startDateWeek;\n\n let step = options?.step ?? 1;\n if (!step) return [];\n if (step < 0) {\n step = -step;\n reversed = !reversed;\n }\n\n const dates = [];\n\n while (+currentDate <= endTime) {\n currentDate.setHours(0);\n dates.push(toDate(currentDate));\n currentDate = addWeeks(currentDate, step);\n currentDate.setHours(15);\n }\n\n return reversed ? dates.reverse() : dates;\n}\n\n// Fallback for modularized imports:\nexport default eachWeekOfInterval;\n","import { addWeeks } from \"./addWeeks.mjs\";\n\n/**\n * @name subWeeks\n * @category Week Helpers\n * @summary Subtract the specified number of weeks from the given date.\n *\n * @description\n * Subtract the specified number of weeks from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to be changed\n * @param amount - The amount of weeks to be subtracted.\n *\n * @returns The new date with the weeks subtracted\n *\n * @example\n * // Subtract 4 weeks from 1 September 2014:\n * const result = subWeeks(new Date(2014, 8, 1), 4)\n * //=> Mon Aug 04 2014 00:00:00\n */\nexport function subWeeks(date, amount) {\n return addWeeks(date, -amount);\n}\n\n// Fallback for modularized imports:\nexport default subWeeks;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name startOfMinute\n * @category Minute Helpers\n * @summary Return the start of a minute for the given date.\n *\n * @description\n * Return the start of a minute for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The start of a minute\n *\n * @example\n * // The start of a minute for 1 December 2014 22:15:45.400:\n * const result = startOfMinute(new Date(2014, 11, 1, 22, 15, 45, 400))\n * //=> Mon Dec 01 2014 22:15:00\n */\nexport function startOfMinute(date) {\n const _date = toDate(date);\n _date.setSeconds(0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfMinute;\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { COLORS, CONFIG } from '../../utils';\nimport { space } from '../../utils/space';\nimport {\n\tInput,\n\tBackdropUI,\n} from '../../input-control/styles/input-control-styles';\nimport NumberControl from '../../number-control';\n\nexport const Wrapper = styled.div`\n\tbox-sizing: border-box;\n\tfont-size: ${ CONFIG.fontSize };\n`;\n\nexport const Fieldset = styled.fieldset`\n\tborder: 0;\n\tmargin: 0 0 ${ space( 2 * 2 ) } 0;\n\tpadding: 0;\n\n\t&:last-child {\n\t\tmargin-bottom: 0;\n\t}\n`;\n\nexport const TimeWrapper = styled.div`\n\tdirection: ltr;\n\tdisplay: flex;\n`;\n\nconst baseInput = css`\n\t&&& ${ Input } {\n\t\tpadding-left: ${ space( 2 ) };\n\t\tpadding-right: ${ space( 2 ) };\n\t\ttext-align: center;\n\t}\n`;\n\nexport const HoursInput = styled( NumberControl )`\n\t${ baseInput }\n\n\twidth: ${ space( 9 ) };\n\n\t&&& ${ Input } {\n\t\tpadding-right: 0;\n\t}\n\n\t&&& ${ BackdropUI } {\n\t\tborder-right: 0;\n\t\tborder-top-right-radius: 0;\n\t\tborder-bottom-right-radius: 0;\n\t}\n`;\n\nexport const TimeSeparator = styled.span`\n\tborder-top: ${ CONFIG.borderWidth } solid ${ COLORS.gray[ 700 ] };\n\tborder-bottom: ${ CONFIG.borderWidth } solid ${ COLORS.gray[ 700 ] };\n\tfont-size: ${ CONFIG.fontSize };\n\tline-height: calc(\n\t\t${ CONFIG.controlHeight } - ${ CONFIG.borderWidth } * 2\n\t);\n\tdisplay: inline-block;\n`;\n\nexport const MinutesInput = styled( NumberControl )`\n\t${ baseInput }\n\n\twidth: ${ space( 9 ) };\n\n\t&&& ${ Input } {\n\t\tpadding-left: 0;\n\t}\n\n\t&&& ${ BackdropUI } {\n\t\tborder-left: 0;\n\t\tborder-top-left-radius: 0;\n\t\tborder-bottom-left-radius: 0;\n\t}\n`;\n\n// Ideally we wouldn't need a wrapper, but can't otherwise target the\n// <BaseControl> in <SelectControl>\nexport const MonthSelectWrapper = styled.div`\n\tflex-grow: 1;\n`;\n\nexport const DayInput = styled( NumberControl )`\n\t${ baseInput }\n\n\twidth: ${ space( 9 ) };\n`;\n\nexport const YearInput = styled( NumberControl )`\n\t${ baseInput }\n\n\twidth: ${ space( 14 ) };\n`;\n\nexport const TimeZone = styled.div`\n\ttext-decoration: underline dotted;\n`;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { getSettings as getDateSettings } from '@wordpress/date';\n\n/**\n * Internal dependencies\n */\nimport Tooltip from '../../tooltip';\nimport { TimeZone as StyledComponent } from './styles';\n\n/**\n * Displays timezone information when user timezone is different from site\n * timezone.\n */\nconst TimeZone = () => {\n\tconst { timezone } = getDateSettings();\n\n\t// Convert timezone offset to hours.\n\tconst userTimezoneOffset = -1 * ( new Date().getTimezoneOffset() / 60 );\n\n\t// System timezone and user timezone match, nothing needed.\n\t// Compare as numbers because it comes over as string.\n\tif ( Number( timezone.offset ) === userTimezoneOffset ) {\n\t\treturn null;\n\t}\n\n\tconst offsetSymbol = Number( timezone.offset ) >= 0 ? '+' : '';\n\tconst zoneAbbr =\n\t\t'' !== timezone.abbr && isNaN( Number( timezone.abbr ) )\n\t\t\t? timezone.abbr\n\t\t\t: `UTC${ offsetSymbol }${ timezone.offsetFormatted }`;\n\n\t// Replace underscore with space in strings like `America/Costa_Rica`.\n\tconst prettyTimezoneString = timezone.string.replace( '_', ' ' );\n\n\tconst timezoneDetail =\n\t\t'UTC' === timezone.string\n\t\t\t? __( 'Coordinated Universal Time' )\n\t\t\t: `(${ zoneAbbr }) ${ prettyTimezoneString }`;\n\n\t// When the prettyTimezoneString is empty, there is no additional timezone\n\t// detail information to show in a Tooltip.\n\tconst hasNoAdditionalTimezoneDetail =\n\t\tprettyTimezoneString.trim().length === 0;\n\n\treturn hasNoAdditionalTimezoneDetail ? (\n\t\t<StyledComponent className=\"components-datetime__timezone\">\n\t\t\t{ zoneAbbr }\n\t\t</StyledComponent>\n\t) : (\n\t\t<Tooltip placement=\"top\" text={ timezoneDetail }>\n\t\t\t<StyledComponent className=\"components-datetime__timezone\">\n\t\t\t\t{ zoneAbbr }\n\t\t\t</StyledComponent>\n\t\t</Tooltip>\n\t);\n};\n\nexport default TimeZone;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport type { ToggleGroupControlOptionProps } from '../types';\nimport { ToggleGroupControlOptionBase } from '../toggle-group-control-option-base';\n\nfunction UnforwardedToggleGroupControlOption(\n\tprops: WordPressComponentProps<\n\t\tToggleGroupControlOptionProps,\n\t\t'button',\n\t\tfalse\n\t>,\n\tref: ForwardedRef< any >\n) {\n\tconst { label, ...restProps } = props;\n\tconst optionLabel = restProps[ 'aria-label' ] || label;\n\treturn (\n\t\t<ToggleGroupControlOptionBase\n\t\t\t{ ...restProps }\n\t\t\taria-label={ optionLabel }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t{ label }\n\t\t</ToggleGroupControlOptionBase>\n\t);\n}\n\n/**\n * `ToggleGroupControlOption` is a form component and is meant to be used as a\n * child of `ToggleGroupControl`.\n *\n * ```jsx\n * import {\n * __experimentalToggleGroupControl as ToggleGroupControl,\n * __experimentalToggleGroupControlOption as ToggleGroupControlOption,\n * } from '@wordpress/components';\n *\n * function Example() {\n * return (\n * <ToggleGroupControl\n * label=\"my label\"\n * value=\"vertical\"\n * isBlock\n * __nextHasNoMarginBottom\n * __next40pxDefaultSize\n * >\n * <ToggleGroupControlOption value=\"horizontal\" label=\"Horizontal\" />\n * <ToggleGroupControlOption value=\"vertical\" label=\"Vertical\" />\n * </ToggleGroupControl>\n * );\n * }\n * ```\n */\nexport const ToggleGroupControlOption = forwardRef(\n\tUnforwardedToggleGroupControlOption\n);\n\nexport default ToggleGroupControlOption;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Fragment } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport {\n\tTimeWrapper,\n\tTimeSeparator,\n\tHoursInput,\n\tMinutesInput,\n\tFieldset,\n} from '../styles';\nimport { HStack } from '../../../h-stack';\nimport {\n\tfrom12hTo24h,\n\tfrom24hTo12h,\n\tbuildPadInputStateReducer,\n\tvalidateInputElementTarget,\n} from '../../utils';\nimport type { TimeInputProps } from '../../types';\nimport type { InputChangeCallback } from '../../../input-control/types';\nimport { useControlledValue } from '../../../utils';\nimport BaseControl from '../../../base-control';\nimport {\n\tToggleGroupControl,\n\tToggleGroupControlOption,\n} from '../../../toggle-group-control';\n\nexport function TimeInput( {\n\tvalue: valueProp,\n\tdefaultValue,\n\tis12Hour,\n\tlabel,\n\tminutesProps,\n\tonChange,\n}: TimeInputProps ) {\n\tconst [\n\t\tvalue = {\n\t\t\thours: new Date().getHours(),\n\t\t\tminutes: new Date().getMinutes(),\n\t\t},\n\t\tsetValue,\n\t] = useControlledValue( {\n\t\tvalue: valueProp,\n\t\tonChange,\n\t\tdefaultValue,\n\t} );\n\tconst dayPeriod = parseDayPeriod( value.hours );\n\tconst hours12Format = from24hTo12h( value.hours );\n\n\tconst buildNumberControlChangeCallback = (\n\t\tmethod: 'hours' | 'minutes'\n\t): InputChangeCallback => {\n\t\treturn ( _value, { event } ) => {\n\t\t\tif ( ! validateInputElementTarget( event ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// We can safely assume value is a number if target is valid.\n\t\t\tconst numberValue = Number( _value );\n\n\t\t\tsetValue( {\n\t\t\t\t...value,\n\t\t\t\t[ method ]:\n\t\t\t\t\tmethod === 'hours' && is12Hour\n\t\t\t\t\t\t? from12hTo24h( numberValue, dayPeriod === 'PM' )\n\t\t\t\t\t\t: numberValue,\n\t\t\t} );\n\t\t};\n\t};\n\n\tconst buildAmPmChangeCallback = ( _value: 'AM' | 'PM' ) => {\n\t\treturn () => {\n\t\t\tif ( dayPeriod === _value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsetValue( {\n\t\t\t\t...value,\n\t\t\t\thours: from12hTo24h( hours12Format, _value === 'PM' ),\n\t\t\t} );\n\t\t};\n\t};\n\n\tfunction parseDayPeriod( _hours: number ) {\n\t\treturn _hours < 12 ? 'AM' : 'PM';\n\t}\n\n\tconst Wrapper = label ? Fieldset : Fragment;\n\n\treturn (\n\t\t<Wrapper>\n\t\t\t{ label && (\n\t\t\t\t<BaseControl.VisualLabel as=\"legend\">\n\t\t\t\t\t{ label }\n\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t) }\n\n\t\t\t<HStack alignment=\"left\" expanded={ false }>\n\t\t\t\t<TimeWrapper\n\t\t\t\t\tclassName=\"components-datetime__time-field components-datetime__time-field-time\" // Unused, for backwards compatibility.\n\t\t\t\t>\n\t\t\t\t\t<HoursInput\n\t\t\t\t\t\tclassName=\"components-datetime__time-field-hours-input\" // Unused, for backwards compatibility.\n\t\t\t\t\t\tlabel={ __( 'Hours' ) }\n\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvalue={ String(\n\t\t\t\t\t\t\tis12Hour ? hours12Format : value.hours\n\t\t\t\t\t\t).padStart( 2, '0' ) }\n\t\t\t\t\t\tstep={ 1 }\n\t\t\t\t\t\tmin={ is12Hour ? 1 : 0 }\n\t\t\t\t\t\tmax={ is12Hour ? 12 : 23 }\n\t\t\t\t\t\trequired\n\t\t\t\t\t\tspinControls=\"none\"\n\t\t\t\t\t\tisPressEnterToChange\n\t\t\t\t\t\tisDragEnabled={ false }\n\t\t\t\t\t\tisShiftStepEnabled={ false }\n\t\t\t\t\t\tonChange={ buildNumberControlChangeCallback( 'hours' ) }\n\t\t\t\t\t\t__unstableStateReducer={ buildPadInputStateReducer(\n\t\t\t\t\t\t\t2\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t\t<TimeSeparator\n\t\t\t\t\t\tclassName=\"components-datetime__time-separator\" // Unused, for backwards compatibility.\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t>\n\t\t\t\t\t\t:\n\t\t\t\t\t</TimeSeparator>\n\t\t\t\t\t<MinutesInput\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t'components-datetime__time-field-minutes-input', // Unused, for backwards compatibility.\n\t\t\t\t\t\t\tminutesProps?.className\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tlabel={ __( 'Minutes' ) }\n\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvalue={ String( value.minutes ).padStart( 2, '0' ) }\n\t\t\t\t\t\tstep={ 1 }\n\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\tmax={ 59 }\n\t\t\t\t\t\trequired\n\t\t\t\t\t\tspinControls=\"none\"\n\t\t\t\t\t\tisPressEnterToChange\n\t\t\t\t\t\tisDragEnabled={ false }\n\t\t\t\t\t\tisShiftStepEnabled={ false }\n\t\t\t\t\t\tonChange={ ( ...args ) => {\n\t\t\t\t\t\t\tbuildNumberControlChangeCallback( 'minutes' )(\n\t\t\t\t\t\t\t\t...args\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tminutesProps?.onChange?.( ...args );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\t__unstableStateReducer={ buildPadInputStateReducer(\n\t\t\t\t\t\t\t2\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ...minutesProps }\n\t\t\t\t\t/>\n\t\t\t\t</TimeWrapper>\n\t\t\t\t{ is12Hour && (\n\t\t\t\t\t<ToggleGroupControl\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tisBlock\n\t\t\t\t\t\tlabel={ __( 'Select AM or PM' ) }\n\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\tvalue={ dayPeriod }\n\t\t\t\t\t\tonChange={ ( newValue ) => {\n\t\t\t\t\t\t\tbuildAmPmChangeCallback(\n\t\t\t\t\t\t\t\tnewValue as 'AM' | 'PM'\n\t\t\t\t\t\t\t)();\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"AM\"\n\t\t\t\t\t\t\tlabel={ __( 'AM' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"PM\"\n\t\t\t\t\t\t\tlabel={ __( 'PM' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToggleGroupControl>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t</Wrapper>\n\t);\n}\nexport default TimeInput;\n","/**\n * External dependencies\n */\nimport { startOfMinute, format, set, setMonth } from 'date-fns';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useMemo, useEffect } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../../base-control';\nimport { VisuallyHidden } from '../../visually-hidden';\nimport SelectControl from '../../select-control';\nimport TimeZone from './timezone';\nimport type { TimeInputValue, TimePickerProps } from '../types';\nimport {\n\tWrapper,\n\tFieldset,\n\tMonthSelectWrapper,\n\tDayInput,\n\tYearInput,\n} from './styles';\nimport { HStack } from '../../h-stack';\nimport { Spacer } from '../../spacer';\nimport type { InputChangeCallback } from '../../input-control/types';\nimport {\n\tinputToDate,\n\tbuildPadInputStateReducer,\n\tvalidateInputElementTarget,\n} from '../utils';\nimport { TIMEZONELESS_FORMAT } from '../constants';\nimport { TimeInput } from './time-input';\n\nconst VALID_DATE_ORDERS = [ 'dmy', 'mdy', 'ymd' ];\n\n/**\n * TimePicker is a React component that renders a clock for time selection.\n *\n * ```jsx\n * import { TimePicker } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyTimePicker = () => {\n * const [ time, setTime ] = useState( new Date() );\n *\n * return (\n * <TimePicker\n * currentTime={ date }\n * onChange={ ( newTime ) => setTime( newTime ) }\n * is12Hour\n * />\n * );\n * };\n * ```\n */\nexport function TimePicker( {\n\tis12Hour,\n\tcurrentTime,\n\tonChange,\n\tdateOrder: dateOrderProp,\n\thideLabelFromVision = false,\n}: TimePickerProps ) {\n\tconst [ date, setDate ] = useState( () =>\n\t\t// Truncate the date at the minutes, see: #15495.\n\t\tcurrentTime ? startOfMinute( inputToDate( currentTime ) ) : new Date()\n\t);\n\n\t// Reset the state when currentTime changed.\n\t// TODO: useEffect() shouldn't be used like this, causes an unnecessary render\n\tuseEffect( () => {\n\t\tsetDate(\n\t\t\tcurrentTime\n\t\t\t\t? startOfMinute( inputToDate( currentTime ) )\n\t\t\t\t: new Date()\n\t\t);\n\t}, [ currentTime ] );\n\n\tconst monthOptions = [\n\t\t{ value: '01', label: __( 'January' ) },\n\t\t{ value: '02', label: __( 'February' ) },\n\t\t{ value: '03', label: __( 'March' ) },\n\t\t{ value: '04', label: __( 'April' ) },\n\t\t{ value: '05', label: __( 'May' ) },\n\t\t{ value: '06', label: __( 'June' ) },\n\t\t{ value: '07', label: __( 'July' ) },\n\t\t{ value: '08', label: __( 'August' ) },\n\t\t{ value: '09', label: __( 'September' ) },\n\t\t{ value: '10', label: __( 'October' ) },\n\t\t{ value: '11', label: __( 'November' ) },\n\t\t{ value: '12', label: __( 'December' ) },\n\t] as const;\n\n\tconst { day, month, year, minutes, hours } = useMemo(\n\t\t() => ( {\n\t\t\tday: format( date, 'dd' ),\n\t\t\tmonth: format(\n\t\t\t\tdate,\n\t\t\t\t'MM'\n\t\t\t) as ( typeof monthOptions )[ number ][ 'value' ],\n\t\t\tyear: format( date, 'yyyy' ),\n\t\t\tminutes: format( date, 'mm' ),\n\t\t\thours: format( date, 'HH' ),\n\t\t\tam: format( date, 'a' ),\n\t\t} ),\n\t\t[ date ]\n\t);\n\n\tconst buildNumberControlChangeCallback = ( method: 'date' | 'year' ) => {\n\t\tconst callback: InputChangeCallback = ( value, { event } ) => {\n\t\t\tif ( ! validateInputElementTarget( event ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// We can safely assume value is a number if target is valid.\n\t\t\tconst numberValue = Number( value );\n\n\t\t\tconst newDate = set( date, { [ method ]: numberValue } );\n\t\t\tsetDate( newDate );\n\t\t\tonChange?.( format( newDate, TIMEZONELESS_FORMAT ) );\n\t\t};\n\t\treturn callback;\n\t};\n\n\tconst onTimeInputChangeCallback = ( {\n\t\thours: newHours,\n\t\tminutes: newMinutes,\n\t}: TimeInputValue ) => {\n\t\tconst newDate = set( date, {\n\t\t\thours: newHours,\n\t\t\tminutes: newMinutes,\n\t\t} );\n\t\tsetDate( newDate );\n\t\tonChange?.( format( newDate, TIMEZONELESS_FORMAT ) );\n\t};\n\n\tconst dayField = (\n\t\t<DayInput\n\t\t\tkey=\"day\"\n\t\t\tclassName=\"components-datetime__time-field components-datetime__time-field-day\" // Unused, for backwards compatibility.\n\t\t\tlabel={ __( 'Day' ) }\n\t\t\thideLabelFromVision\n\t\t\t__next40pxDefaultSize\n\t\t\tvalue={ day }\n\t\t\tstep={ 1 }\n\t\t\tmin={ 1 }\n\t\t\tmax={ 31 }\n\t\t\trequired\n\t\t\tspinControls=\"none\"\n\t\t\tisPressEnterToChange\n\t\t\tisDragEnabled={ false }\n\t\t\tisShiftStepEnabled={ false }\n\t\t\tonChange={ buildNumberControlChangeCallback( 'date' ) }\n\t\t/>\n\t);\n\n\tconst monthField = (\n\t\t<MonthSelectWrapper key=\"month\">\n\t\t\t<SelectControl\n\t\t\t\tclassName=\"components-datetime__time-field components-datetime__time-field-month\" // Unused, for backwards compatibility.\n\t\t\t\tlabel={ __( 'Month' ) }\n\t\t\t\thideLabelFromVision\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tvalue={ month }\n\t\t\t\toptions={ monthOptions }\n\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\tconst newDate = setMonth( date, Number( value ) - 1 );\n\t\t\t\t\tsetDate( newDate );\n\t\t\t\t\tonChange?.( format( newDate, TIMEZONELESS_FORMAT ) );\n\t\t\t\t} }\n\t\t\t/>\n\t\t</MonthSelectWrapper>\n\t);\n\n\tconst yearField = (\n\t\t<YearInput\n\t\t\tkey=\"year\"\n\t\t\tclassName=\"components-datetime__time-field components-datetime__time-field-year\" // Unused, for backwards compatibility.\n\t\t\tlabel={ __( 'Year' ) }\n\t\t\thideLabelFromVision\n\t\t\t__next40pxDefaultSize\n\t\t\tvalue={ year }\n\t\t\tstep={ 1 }\n\t\t\tmin={ 1 }\n\t\t\tmax={ 9999 }\n\t\t\trequired\n\t\t\tspinControls=\"none\"\n\t\t\tisPressEnterToChange\n\t\t\tisDragEnabled={ false }\n\t\t\tisShiftStepEnabled={ false }\n\t\t\tonChange={ buildNumberControlChangeCallback( 'year' ) }\n\t\t\t__unstableStateReducer={ buildPadInputStateReducer( 4 ) }\n\t\t/>\n\t);\n\n\tconst defaultDateOrder = is12Hour ? 'mdy' : 'dmy';\n\tconst dateOrder =\n\t\tdateOrderProp && VALID_DATE_ORDERS.includes( dateOrderProp )\n\t\t\t? dateOrderProp\n\t\t\t: defaultDateOrder;\n\n\tconst fields = dateOrder.split( '' ).map( ( field ) => {\n\t\tswitch ( field ) {\n\t\t\tcase 'd':\n\t\t\t\treturn dayField;\n\t\t\tcase 'm':\n\t\t\t\treturn monthField;\n\t\t\tcase 'y':\n\t\t\t\treturn yearField;\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t}\n\t} );\n\n\treturn (\n\t\t<Wrapper\n\t\t\tclassName=\"components-datetime__time\" // Unused, for backwards compatibility.\n\t\t>\n\t\t\t<Fieldset>\n\t\t\t\t{ hideLabelFromVision ? (\n\t\t\t\t\t<VisuallyHidden as=\"legend\">\n\t\t\t\t\t\t{ __( 'Time' ) }\n\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t) : (\n\t\t\t\t\t<BaseControl.VisualLabel\n\t\t\t\t\t\tas=\"legend\"\n\t\t\t\t\t\tclassName=\"components-datetime__time-legend\" // Unused, for backwards compatibility.\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Time' ) }\n\t\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t\t) }\n\t\t\t\t<HStack\n\t\t\t\t\tclassName=\"components-datetime__time-wrapper\" // Unused, for backwards compatibility.\n\t\t\t\t>\n\t\t\t\t\t<TimeInput\n\t\t\t\t\t\tvalue={ {\n\t\t\t\t\t\t\thours: Number( hours ),\n\t\t\t\t\t\t\tminutes: Number( minutes ),\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tis12Hour={ is12Hour }\n\t\t\t\t\t\tonChange={ onTimeInputChangeCallback }\n\t\t\t\t\t/>\n\t\t\t\t\t<Spacer />\n\t\t\t\t\t<TimeZone />\n\t\t\t\t</HStack>\n\t\t\t</Fieldset>\n\t\t\t<Fieldset>\n\t\t\t\t{ hideLabelFromVision ? (\n\t\t\t\t\t<VisuallyHidden as=\"legend\">\n\t\t\t\t\t\t{ __( 'Date' ) }\n\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t) : (\n\t\t\t\t\t<BaseControl.VisualLabel\n\t\t\t\t\t\tas=\"legend\"\n\t\t\t\t\t\tclassName=\"components-datetime__time-legend\" // Unused, for backwards compatibility.\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Date' ) }\n\t\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t\t) }\n\t\t\t\t<HStack\n\t\t\t\t\tclassName=\"components-datetime__time-wrapper\" // Unused, for backwards compatibility.\n\t\t\t\t>\n\t\t\t\t\t{ fields }\n\t\t\t\t</HStack>\n\t\t\t</Fieldset>\n\t\t</Wrapper>\n\t);\n}\n\n/**\n * A component to input a time.\n *\n * Values are passed as an object in 24-hour format (`{ hours: number, minutes: number }`).\n *\n * ```jsx\n * import { TimePicker } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyTimeInput = () => {\n * \tconst [ time, setTime ] = useState( { hours: 13, minutes: 30 } );\n *\n * \treturn (\n * \t\t<TimePicker.TimeInput\n * \t\t\tvalue={ time }\n * \t\t\tonChange={ setTime }\n * \t\t\tlabel=\"Time\"\n * \t\t/>\n * \t);\n * };\n * ```\n */\nTimePicker.TimeInput = TimeInput;\nObject.assign( TimePicker.TimeInput, { displayName: 'TimePicker.TimeInput' } );\n\nexport default TimePicker;\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport { VStack } from '../../v-stack';\n\nexport const Wrapper = styled( VStack )`\n\tbox-sizing: border-box;\n`;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { default as DatePicker } from '../date';\nimport { default as TimePicker } from '../time';\nimport type { DateTimePickerProps } from '../types';\nimport { Wrapper } from './styles';\n\nexport { DatePicker, TimePicker };\n\nconst noop = () => {};\n\nfunction UnforwardedDateTimePicker(\n\t{\n\t\tcurrentDate,\n\t\tis12Hour,\n\t\tdateOrder,\n\t\tisInvalidDate,\n\t\tonMonthPreviewed = noop,\n\t\tonChange,\n\t\tevents,\n\t\tstartOfWeek,\n\t}: DateTimePickerProps,\n\tref: ForwardedRef< any >\n) {\n\treturn (\n\t\t<Wrapper ref={ ref } className=\"components-datetime\" spacing={ 4 }>\n\t\t\t<>\n\t\t\t\t<TimePicker\n\t\t\t\t\tcurrentTime={ currentDate }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\tis12Hour={ is12Hour }\n\t\t\t\t\tdateOrder={ dateOrder }\n\t\t\t\t/>\n\t\t\t\t<DatePicker\n\t\t\t\t\tcurrentDate={ currentDate }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\tisInvalidDate={ isInvalidDate }\n\t\t\t\t\tevents={ events }\n\t\t\t\t\tonMonthPreviewed={ onMonthPreviewed }\n\t\t\t\t\tstartOfWeek={ startOfWeek }\n\t\t\t\t/>\n\t\t\t</>\n\t\t</Wrapper>\n\t);\n}\n\n/**\n * DateTimePicker is a React component that renders a calendar and clock for\n * date and time selection. The calendar and clock components can be accessed\n * individually using the `DatePicker` and `TimePicker` components respectively.\n *\n * ```jsx\n * import { DateTimePicker } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyDateTimePicker = () => {\n * const [ date, setDate ] = useState( new Date() );\n *\n * return (\n * <DateTimePicker\n * currentDate={ date }\n * onChange={ ( newDate ) => setDate( newDate ) }\n * is12Hour\n * />\n * );\n * };\n * ```\n */\nexport const DateTimePicker = forwardRef( UnforwardedDateTimePicker );\n\nexport default DateTimePicker;\n","/**\n * Internal dependencies\n */\nimport { default as DatePicker } from './date';\nimport { default as TimePicker } from './time';\nimport { default as DateTimePicker } from './date-time';\n\nexport { DatePicker, TimePicker };\nexport default DateTimePicker;\n","/**\n * Sizes\n *\n * defines the sizes used in dimension controls\n * all hardcoded `size` values are based on the value of\n * the Sass variable `$block-padding` from\n * `packages/block-editor/src/components/dimension-control/sizes.js`.\n */\n\n/**\n * WordPress dependencies\n */\nimport { _x } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { Size } from './types';\n\n/**\n * Finds the correct size object from the provided sizes\n * table by size slug (eg: `medium`)\n *\n * @param sizes containing objects for each size definition.\n * @param slug a string representation of the size (eg: `medium`).\n */\nexport const findSizeBySlug = ( sizes: Size[], slug: string ) =>\n\tsizes.find( ( size ) => slug === size.slug );\n\nexport default [\n\t{\n\t\tname: _x( 'None', 'Size of a UI element' ),\n\t\tslug: 'none',\n\t},\n\t{\n\t\tname: _x( 'Small', 'Size of a UI element' ),\n\t\tslug: 'small',\n\t},\n\t{\n\t\tname: _x( 'Medium', 'Size of a UI element' ),\n\t\tslug: 'medium',\n\t},\n\t{\n\t\tname: _x( 'Large', 'Size of a UI element' ),\n\t\tslug: 'large',\n\t},\n\t{\n\t\tname: _x( 'Extra Large', 'Size of a UI element' ),\n\t\tslug: 'xlarge',\n\t},\n];\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Icon from '../icon';\nimport SelectControl from '../select-control';\nimport sizesTable, { findSizeBySlug } from './sizes';\nimport type { DimensionControlProps, Size } from './types';\nimport type { SelectControlSingleSelectionProps } from '../select-control/types';\nimport { ContextSystemProvider } from '../context';\nimport deprecated from '@wordpress/deprecated';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\n\nconst CONTEXT_VALUE = {\n\tBaseControl: {\n\t\t// Temporary during deprecation grace period: Overrides the underlying `__associatedWPComponentName`\n\t\t// via the context system to override the value set by SelectControl.\n\t\t_overrides: { __associatedWPComponentName: 'DimensionControl' },\n\t},\n};\n\n/**\n * `DimensionControl` is a component designed to provide a UI to control spacing and/or dimensions.\n *\n * @deprecated\n *\n * ```jsx\n * import { __experimentalDimensionControl as DimensionControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * export default function MyCustomDimensionControl() {\n * \tconst [ paddingSize, setPaddingSize ] = useState( '' );\n *\n * \treturn (\n * \t\t<DimensionControl\n * \t\t\t__next40pxDefaultSize\n * \t\t\t__nextHasNoMarginBottom\n * \t\t\tlabel={ 'Padding' }\n * \t\t\ticon={ 'desktop' }\n * \t\t\tonChange={ ( value ) => setPaddingSize( value ) }\n * \t\t\tvalue={ paddingSize }\n * \t\t/>\n * \t);\n * }\n * ```\n */\nexport function DimensionControl( props: DimensionControlProps ) {\n\tconst {\n\t\t__next40pxDefaultSize = false,\n\t\t__nextHasNoMarginBottom = false,\n\t\tlabel,\n\t\tvalue,\n\t\tsizes = sizesTable,\n\t\ticon,\n\t\tonChange,\n\t\tclassName = '',\n\t} = props;\n\n\tdeprecated( 'wp.components.DimensionControl', {\n\t\tsince: '6.7',\n\t\tversion: '7.0',\n\t} );\n\n\tmaybeWarnDeprecated36pxSize( {\n\t\tcomponentName: 'DimensionControl',\n\t\t__next40pxDefaultSize,\n\t\tsize: undefined,\n\t} );\n\n\tconst onChangeSpacingSize: SelectControlSingleSelectionProps[ 'onChange' ] =\n\t\t( val ) => {\n\t\t\tconst theSize = findSizeBySlug( sizes, val );\n\n\t\t\tif ( ! theSize || value === theSize.slug ) {\n\t\t\t\tonChange?.( undefined );\n\t\t\t} else if ( typeof onChange === 'function' ) {\n\t\t\t\tonChange( theSize.slug );\n\t\t\t}\n\t\t};\n\n\tconst formatSizesAsOptions = ( theSizes: Size[] ) => {\n\t\tconst options = theSizes.map( ( { name, slug } ) => ( {\n\t\t\tlabel: name,\n\t\t\tvalue: slug,\n\t\t} ) );\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tlabel: __( 'Default' ),\n\t\t\t\tvalue: '',\n\t\t\t},\n\t\t\t...options,\n\t\t];\n\t};\n\n\tconst selectLabel = (\n\t\t<>\n\t\t\t{ icon && <Icon icon={ icon } /> }\n\t\t\t{ label }\n\t\t</>\n\t);\n\n\treturn (\n\t\t<ContextSystemProvider value={ CONTEXT_VALUE }>\n\t\t\t<SelectControl\n\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t__shouldNotWarnDeprecated36pxSize\n\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\tclassName,\n\t\t\t\t\t'block-editor-dimension-control'\n\t\t\t\t) }\n\t\t\t\tlabel={ selectLabel }\n\t\t\t\thideLabelFromVision={ false }\n\t\t\t\tvalue={ value }\n\t\t\t\tonChange={ onChangeSpacingSize }\n\t\t\t\toptions={ formatSizesAsOptions( sizes ) }\n\t\t\t/>\n\t\t</ContextSystemProvider>\n\t);\n}\n\nexport default DimensionControl;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\nexport const disabledStyles = css`\n\tposition: relative;\n\tpointer-events: none;\n\n\t&::after {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t}\n\n\t// Also make nested blocks unselectable.\n\t* {\n\t\tpointer-events: none;\n\t}\n`;\n","/**\n * WordPress dependencies\n */\nimport { createContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { disabledStyles } from './styles/disabled-styles';\nimport type { DisabledProps } from './types';\nimport type { WordPressComponentProps } from '../context';\nimport { useCx } from '../utils';\n\nconst Context = createContext< boolean >( false );\nconst { Consumer, Provider } = Context;\n\n/**\n * `Disabled` is a component which disables descendant tabbable elements and\n * prevents pointer interaction.\n *\n * _Note: this component may not behave as expected in browsers that don't\n * support the `inert` HTML attribute. We recommend adding the official WICG\n * polyfill when using this component in your project._\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert\n *\n * ```jsx\n * import { Button, Disabled, TextControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyDisabled = () => {\n * \tconst [ isDisabled, setIsDisabled ] = useState( true );\n *\n *\tlet input = (\n *\t\t<TextControl\n *\t\t\t__next40pxDefaultSize\n *\t\t\t__nextHasNoMarginBottom\n *\t\t\tlabel=\"Input\"\n *\t\t\tonChange={ () => {} }\n *\t\t/>\n *\t);\n * \tif ( isDisabled ) {\n * \t\tinput = <Disabled>{ input }</Disabled>;\n * \t}\n *\n * \tconst toggleDisabled = () => {\n * \t\tsetIsDisabled( ( state ) => ! state );\n * \t};\n *\n * \treturn (\n * \t\t<div>\n * \t\t\t{ input }\n * \t\t\t<Button variant=\"primary\" onClick={ toggleDisabled }>\n * \t\t\t\tToggle Disabled\n * \t\t\t</Button>\n * \t\t</div>\n * \t);\n * };\n * ```\n */\nfunction Disabled( {\n\tclassName,\n\tchildren,\n\tisDisabled = true,\n\t...props\n}: WordPressComponentProps< DisabledProps, 'div' > ) {\n\tconst cx = useCx();\n\n\treturn (\n\t\t<Provider value={ isDisabled }>\n\t\t\t<div\n\t\t\t\t// @ts-ignore Reason: inert is a recent HTML attribute\n\t\t\t\tinert={ isDisabled ? 'true' : undefined }\n\t\t\t\tclassName={\n\t\t\t\t\tisDisabled\n\t\t\t\t\t\t? cx( disabledStyles, className, 'components-disabled' )\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t\t{ ...props }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t</Provider>\n\t);\n}\n\nDisabled.Context = Context;\nDisabled.Consumer = Consumer;\n\nexport default Disabled;\n","/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { DisclosureContentProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\n/**\n * Accessible Disclosure component that controls visibility of a section of\n * content. It follows the WAI-ARIA Disclosure Pattern.\n */\nconst UnforwardedDisclosureContent = (\n\t{\n\t\tvisible,\n\t\tchildren,\n\t\t...props\n\t}: WordPressComponentProps< DisclosureContentProps, 'div', false >,\n\tref: React.ForwardedRef< any >\n) => {\n\tconst disclosure = Ariakit.useDisclosureStore( { open: visible } );\n\n\treturn (\n\t\t<Ariakit.DisclosureContent\n\t\t\tstore={ disclosure }\n\t\t\tref={ ref }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ children }\n\t\t</Ariakit.DisclosureContent>\n\t);\n};\n\nexport const DisclosureContent = forwardRef( UnforwardedDisclosureContent );\nexport default DisclosureContent;\n","/**\n * External dependencies\n */\nimport type { DragEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { throttle } from '@wordpress/compose';\nimport { useEffect, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { DraggableProps } from './types';\n\nconst dragImageClass = 'components-draggable__invisible-drag-image';\nconst cloneWrapperClass = 'components-draggable__clone';\nconst clonePadding = 0;\nconst bodyClass = 'is-dragging-components-draggable';\n\n/**\n * `Draggable` is a Component that provides a way to set up a cross-browser\n * (including IE) customizable drag image and the transfer data for the drag\n * event. It decouples the drag handle and the element to drag: use it by\n * wrapping the component that will become the drag handle and providing the DOM\n * ID of the element to drag.\n *\n * Note that the drag handle needs to declare the `draggable=\"true\"` property\n * and bind the `Draggable`s `onDraggableStart` and `onDraggableEnd` event\n * handlers to its own `onDragStart` and `onDragEnd` respectively. `Draggable`\n * takes care of the logic to setup the drag image and the transfer data, but is\n * not concerned with creating an actual DOM element that is draggable.\n *\n * ```jsx\n * import { Draggable, Panel, PanelBody } from '@wordpress/components';\n * import { Icon, more } from '@wordpress/icons';\n *\n * const MyDraggable = () => (\n * <div id=\"draggable-panel\">\n * <Panel header=\"Draggable panel\">\n * <PanelBody>\n * <Draggable elementId=\"draggable-panel\" transferData={ {} }>\n * { ( { onDraggableStart, onDraggableEnd } ) => (\n * <div\n * className=\"example-drag-handle\"\n * draggable\n * onDragStart={ onDraggableStart }\n * onDragEnd={ onDraggableEnd }\n * >\n * <Icon icon={ more } />\n * </div>\n * ) }\n * </Draggable>\n * </PanelBody>\n * </Panel>\n * </div>\n * );\n * ```\n */\nexport function Draggable( {\n\tchildren,\n\tonDragStart,\n\tonDragOver,\n\tonDragEnd,\n\tappendToOwnerDocument = false,\n\tcloneClassname,\n\telementId,\n\ttransferData,\n\t__experimentalTransferDataType: transferDataType = 'text',\n\t__experimentalDragComponent: dragComponent,\n}: DraggableProps ) {\n\tconst dragComponentRef = useRef< HTMLDivElement >( null );\n\tconst cleanupRef = useRef( () => {} );\n\n\t/**\n\t * Removes the element clone, resets cursor, and removes drag listener.\n\t *\n\t * @param event The non-custom DragEvent.\n\t */\n\tfunction end( event: DragEvent ) {\n\t\tevent.preventDefault();\n\t\tcleanupRef.current();\n\n\t\tif ( onDragEnd ) {\n\t\t\tonDragEnd( event );\n\t\t}\n\t}\n\n\t/**\n\t * This method does a couple of things:\n\t *\n\t * - Clones the current element and spawns clone over original element.\n\t * - Adds a fake temporary drag image to avoid browser defaults.\n\t * - Sets transfer data.\n\t * - Adds dragover listener.\n\t *\n\t * @param event The non-custom DragEvent.\n\t */\n\tfunction start( event: DragEvent ) {\n\t\tconst { ownerDocument } = event.target as HTMLElement;\n\n\t\tevent.dataTransfer.setData(\n\t\t\ttransferDataType,\n\t\t\tJSON.stringify( transferData )\n\t\t);\n\n\t\tconst cloneWrapper = ownerDocument.createElement( 'div' );\n\t\t// Reset position to 0,0. Natural stacking order will position this lower, even with a transform otherwise.\n\t\tcloneWrapper.style.top = '0';\n\t\tcloneWrapper.style.left = '0';\n\n\t\tconst dragImage = ownerDocument.createElement( 'div' );\n\n\t\t// Set a fake drag image to avoid browser defaults. Remove from DOM\n\t\t// right after. event.dataTransfer.setDragImage is not supported yet in\n\t\t// IE, we need to check for its existence first.\n\t\tif ( 'function' === typeof event.dataTransfer.setDragImage ) {\n\t\t\tdragImage.classList.add( dragImageClass );\n\t\t\townerDocument.body.appendChild( dragImage );\n\t\t\tevent.dataTransfer.setDragImage( dragImage, 0, 0 );\n\t\t}\n\n\t\tcloneWrapper.classList.add( cloneWrapperClass );\n\n\t\tif ( cloneClassname ) {\n\t\t\tcloneWrapper.classList.add( cloneClassname );\n\t\t}\n\n\t\tlet x = 0;\n\t\tlet y = 0;\n\t\t// If a dragComponent is defined, the following logic will clone the\n\t\t// HTML node and inject it into the cloneWrapper.\n\t\tif ( dragComponentRef.current ) {\n\t\t\t// Position dragComponent at the same position as the cursor.\n\t\t\tx = event.clientX;\n\t\t\ty = event.clientY;\n\t\t\tcloneWrapper.style.transform = `translate( ${ x }px, ${ y }px )`;\n\n\t\t\tconst clonedDragComponent = ownerDocument.createElement( 'div' );\n\t\t\tclonedDragComponent.innerHTML = dragComponentRef.current.innerHTML;\n\t\t\tcloneWrapper.appendChild( clonedDragComponent );\n\n\t\t\t// Inject the cloneWrapper into the DOM.\n\t\t\townerDocument.body.appendChild( cloneWrapper );\n\t\t} else {\n\t\t\tconst element = ownerDocument.getElementById(\n\t\t\t\telementId\n\t\t\t) as HTMLElement;\n\n\t\t\t// Prepare element clone and append to element wrapper.\n\t\t\tconst elementRect = element.getBoundingClientRect();\n\t\t\tconst elementWrapper = element.parentNode;\n\t\t\tconst elementTopOffset = elementRect.top;\n\t\t\tconst elementLeftOffset = elementRect.left;\n\n\t\t\tcloneWrapper.style.width = `${\n\t\t\t\telementRect.width + clonePadding * 2\n\t\t\t}px`;\n\n\t\t\tconst clone = element.cloneNode( true ) as HTMLElement;\n\t\t\tclone.id = `clone-${ elementId }`;\n\n\t\t\t// Position clone right over the original element (20px padding).\n\t\t\tx = elementLeftOffset - clonePadding;\n\t\t\ty = elementTopOffset - clonePadding;\n\t\t\tcloneWrapper.style.transform = `translate( ${ x }px, ${ y }px )`;\n\n\t\t\t// Hack: Remove iFrames as it's causing the embeds drag clone to freeze.\n\t\t\tArray.from< HTMLIFrameElement >(\n\t\t\t\tclone.querySelectorAll( 'iframe' )\n\t\t\t).forEach( ( child ) => child.parentNode?.removeChild( child ) );\n\n\t\t\tcloneWrapper.appendChild( clone );\n\n\t\t\t// Inject the cloneWrapper into the DOM.\n\t\t\tif ( appendToOwnerDocument ) {\n\t\t\t\townerDocument.body.appendChild( cloneWrapper );\n\t\t\t} else {\n\t\t\t\telementWrapper?.appendChild( cloneWrapper );\n\t\t\t}\n\t\t}\n\n\t\t// Mark the current cursor coordinates.\n\t\tlet cursorLeft = event.clientX;\n\t\tlet cursorTop = event.clientY;\n\n\t\tfunction over( e: DragEvent ) {\n\t\t\t// Skip doing any work if mouse has not moved.\n\t\t\tif ( cursorLeft === e.clientX && cursorTop === e.clientY ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst nextX = x + e.clientX - cursorLeft;\n\t\t\tconst nextY = y + e.clientY - cursorTop;\n\t\t\tcloneWrapper.style.transform = `translate( ${ nextX }px, ${ nextY }px )`;\n\t\t\tcursorLeft = e.clientX;\n\t\t\tcursorTop = e.clientY;\n\t\t\tx = nextX;\n\t\t\ty = nextY;\n\t\t\tif ( onDragOver ) {\n\t\t\t\tonDragOver( e );\n\t\t\t}\n\t\t}\n\n\t\t// Aim for 60fps (16 ms per frame) for now. We can potentially use requestAnimationFrame (raf) instead,\n\t\t// note that browsers may throttle raf below 60fps in certain conditions.\n\t\t// @ts-ignore\n\t\tconst throttledDragOver = throttle( over, 16 );\n\n\t\townerDocument.addEventListener( 'dragover', throttledDragOver );\n\n\t\t// Update cursor to 'grabbing', document wide.\n\t\townerDocument.body.classList.add( bodyClass );\n\n\t\tif ( onDragStart ) {\n\t\t\tonDragStart( event );\n\t\t}\n\n\t\tcleanupRef.current = () => {\n\t\t\t// Remove drag clone.\n\t\t\tif ( cloneWrapper && cloneWrapper.parentNode ) {\n\t\t\t\tcloneWrapper.parentNode.removeChild( cloneWrapper );\n\t\t\t}\n\n\t\t\tif ( dragImage && dragImage.parentNode ) {\n\t\t\t\tdragImage.parentNode.removeChild( dragImage );\n\t\t\t}\n\n\t\t\t// Reset cursor.\n\t\t\townerDocument.body.classList.remove( bodyClass );\n\n\t\t\townerDocument.removeEventListener( 'dragover', throttledDragOver );\n\t\t};\n\t}\n\n\tuseEffect(\n\t\t() => () => {\n\t\t\tcleanupRef.current();\n\t\t},\n\t\t[]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ children( {\n\t\t\t\tonDraggableStart: start,\n\t\t\t\tonDraggableEnd: end,\n\t\t\t} ) }\n\t\t\t{ dragComponent && (\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"components-draggable-drag-component-root\"\n\t\t\t\t\tstyle={ { display: 'none' } }\n\t\t\t\t\tref={ dragComponentRef }\n\t\t\t\t>\n\t\t\t\t\t{ dragComponent }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default Draggable;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst upload = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z\" />\n\t</SVG>\n);\n\nexport default upload;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport { upload, Icon } from '@wordpress/icons';\nimport { getFilesFromDataTransfer } from '@wordpress/dom';\nimport { __experimentalUseDropZone as useDropZone } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport type { DropZoneProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\n/**\n * `DropZone` is a component creating a drop zone area taking the full size of its parent element. It supports dropping files, HTML content or any other HTML drop event.\n *\n * ```jsx\n * import { DropZone } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyDropZone = () => {\n * const [ hasDropped, setHasDropped ] = useState( false );\n *\n * return (\n * <div>\n * { hasDropped ? 'Dropped!' : 'Drop something here' }\n * <DropZone\n * onFilesDrop={ () => setHasDropped( true ) }\n * onHTMLDrop={ () => setHasDropped( true ) }\n * onDrop={ () => setHasDropped( true ) }\n * />\n * </div>\n * );\n * }\n * ```\n */\nexport function DropZoneComponent( {\n\tclassName,\n\tlabel,\n\tonFilesDrop,\n\tonHTMLDrop,\n\tonDrop,\n\tisEligible = () => true,\n\t...restProps\n}: WordPressComponentProps< DropZoneProps, 'div', false > ) {\n\tconst [ isDraggingOverDocument, setIsDraggingOverDocument ] =\n\t\tuseState< boolean >();\n\tconst [ isDraggingOverElement, setIsDraggingOverElement ] =\n\t\tuseState< boolean >();\n\tconst [ isActive, setIsActive ] = useState< boolean >();\n\tconst ref = useDropZone( {\n\t\tonDrop( event ) {\n\t\t\tif ( ! event.dataTransfer ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst files = getFilesFromDataTransfer( event.dataTransfer );\n\t\t\tconst html = event.dataTransfer.getData( 'text/html' );\n\n\t\t\t/**\n\t\t\t * From Windows Chrome 96, the `event.dataTransfer` returns both file object and HTML.\n\t\t\t * The order of the checks is important to recognize the HTML drop.\n\t\t\t */\n\t\t\tif ( html && onHTMLDrop ) {\n\t\t\t\tonHTMLDrop( html );\n\t\t\t} else if ( files.length && onFilesDrop ) {\n\t\t\t\tonFilesDrop( files );\n\t\t\t} else if ( onDrop ) {\n\t\t\t\tonDrop( event );\n\t\t\t}\n\t\t},\n\t\tonDragStart( event ) {\n\t\t\tsetIsDraggingOverDocument( true );\n\n\t\t\tif ( ! event.dataTransfer ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * From Windows Chrome 96, the `event.dataTransfer` returns both file object and HTML.\n\t\t\t * The order of the checks is important to recognize the HTML drop.\n\t\t\t */\n\t\t\tif ( event.dataTransfer.types.includes( 'text/html' ) ) {\n\t\t\t\tsetIsActive( !! onHTMLDrop );\n\t\t\t} else if (\n\t\t\t\t// Check for the types because sometimes the files themselves\n\t\t\t\t// are only available on drop.\n\t\t\t\tevent.dataTransfer.types.includes( 'Files' ) ||\n\t\t\t\tgetFilesFromDataTransfer( event.dataTransfer ).length > 0\n\t\t\t) {\n\t\t\t\tsetIsActive( !! onFilesDrop );\n\t\t\t} else {\n\t\t\t\tsetIsActive( !! onDrop && isEligible( event.dataTransfer ) );\n\t\t\t}\n\t\t},\n\t\tonDragEnd() {\n\t\t\tsetIsDraggingOverElement( false );\n\t\t\tsetIsDraggingOverDocument( false );\n\t\t\tsetIsActive( undefined );\n\t\t},\n\t\tonDragEnter() {\n\t\t\tsetIsDraggingOverElement( true );\n\t\t},\n\t\tonDragLeave() {\n\t\t\tsetIsDraggingOverElement( false );\n\t\t},\n\t} );\n\n\tconst classes = clsx( 'components-drop-zone', className, {\n\t\t'is-active': isActive,\n\t\t'is-dragging-over-document': isDraggingOverDocument,\n\t\t'is-dragging-over-element': isDraggingOverElement,\n\t} );\n\n\treturn (\n\t\t<div { ...restProps } ref={ ref } className={ classes }>\n\t\t\t<div className=\"components-drop-zone__content\">\n\t\t\t\t<div className=\"components-drop-zone__content-inner\">\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={ upload }\n\t\t\t\t\t\tclassName=\"components-drop-zone__content-icon\"\n\t\t\t\t\t/>\n\t\t\t\t\t<span className=\"components-drop-zone__content-text\">\n\t\t\t\t\t\t{ label ? label : __( 'Drop files to upload' ) }\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nexport default DropZoneComponent;\n","/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\n\nexport default function DropZoneProvider( {\n\tchildren,\n}: {\n\tchildren: React.ReactNode;\n} ) {\n\tdeprecated( 'wp.components.DropZoneProvider', {\n\t\tsince: '5.8',\n\t\thint: 'wp.component.DropZone no longer needs a provider. wp.components.DropZoneProvider is safe to remove from your code.',\n\t} );\n\treturn children;\n}\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst swatch = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M5 17.7c.4.5.8.9 1.2 1.2l1.1-1.4c-.4-.3-.7-.6-1-1L5 17.7zM5 6.3l1.4 1.1c.3-.4.6-.7 1-1L6.3 5c-.5.4-.9.8-1.3 1.3zm.1 7.8l-1.7.5c.2.6.4 1.1.7 1.6l1.5-.8c-.2-.4-.4-.8-.5-1.3zM4.8 12v-.7L3 11.1v1.8l1.7-.2c.1-.2.1-.5.1-.7zm3 7.9c.5.3 1.1.5 1.6.7l.5-1.7c-.5-.1-.9-.3-1.3-.5l-.8 1.5zM19 6.3c-.4-.5-.8-.9-1.2-1.2l-1.1 1.4c.4.3.7.6 1 1L19 6.3zm-.1 3.6l1.7-.5c-.2-.6-.4-1.1-.7-1.6l-1.5.8c.2.4.4.8.5 1.3zM5.6 8.6l-1.5-.8c-.3.5-.5 1-.7 1.6l1.7.5c.1-.5.3-.9.5-1.3zm2.2-4.5l.8 1.5c.4-.2.8-.4 1.3-.5l-.5-1.7c-.6.2-1.1.4-1.6.7zm8.8 13.5l1.1 1.4c.5-.4.9-.8 1.2-1.2l-1.4-1.1c-.2.3-.5.6-.9.9zm1.8-2.2l1.5.8c.3-.5.5-1.1.7-1.6l-1.7-.5c-.1.5-.3.9-.5 1.3zm2.6-4.3l-1.7.2v1.4l1.7.2V12v-.9zM11.1 3l.2 1.7h1.4l.2-1.7h-1.8zm3 2.1c.5.1.9.3 1.3.5l.8-1.5c-.5-.3-1.1-.5-1.6-.7l-.5 1.7zM12 19.2h-.7l-.2 1.8h1.8l-.2-1.7c-.2-.1-.5-.1-.7-.1zm2.1-.3l.5 1.7c.6-.2 1.1-.4 1.6-.7l-.8-1.5c-.4.2-.8.4-1.3.5z\" />\n\t</SVG>\n);\n\nexport default swatch;\n","/**\n * External dependencies\n */\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\n\n/**\n * Internal dependencies\n */\nimport type { DuotonePickerProps } from './types';\n\nextend( [ namesPlugin ] );\n\n/**\n * Object representation for a color.\n *\n * @typedef {Object} RGBColor\n * @property {number} r Red component of the color in the range [0,1].\n * @property {number} g Green component of the color in the range [0,1].\n * @property {number} b Blue component of the color in the range [0,1].\n */\n\n/**\n * Calculate the brightest and darkest values from a color palette.\n *\n * @param palette Color palette for the theme.\n *\n * @return Tuple of the darkest color and brightest color.\n */\nexport function getDefaultColors(\n\tpalette: DuotonePickerProps[ 'colorPalette' ]\n) {\n\t// A default dark and light color are required.\n\tif ( ! palette || palette.length < 2 ) {\n\t\treturn [ '#000', '#fff' ];\n\t}\n\n\treturn palette\n\t\t.map( ( { color } ) => ( {\n\t\t\tcolor,\n\t\t\tbrightness: colord( color ).brightness(),\n\t\t} ) )\n\t\t.reduce(\n\t\t\t( [ min, max ], current ) => {\n\t\t\t\treturn [\n\t\t\t\t\tcurrent.brightness <= min.brightness ? current : min,\n\t\t\t\t\tcurrent.brightness >= max.brightness ? current : max,\n\t\t\t\t];\n\t\t\t},\n\t\t\t[\n\t\t\t\t{ brightness: 1, color: '' },\n\t\t\t\t{ brightness: 0, color: '' },\n\t\t\t]\n\t\t)\n\t\t.map( ( { color } ) => color );\n}\n\n/**\n * Generate a duotone gradient from a list of colors.\n *\n * @param colors CSS color strings.\n * @param angle CSS gradient angle.\n *\n * @return CSS gradient string for the duotone swatch.\n */\nexport function getGradientFromCSSColors(\n\tcolors: string[] = [],\n\tangle = '90deg'\n) {\n\tconst l = 100 / colors.length;\n\n\tconst stops = colors\n\t\t.map( ( c, i ) => `${ c } ${ i * l }%, ${ c } ${ ( i + 1 ) * l }%` )\n\t\t.join( ', ' );\n\n\treturn `linear-gradient( ${ angle }, ${ stops } )`;\n}\n\n/**\n * Convert a color array to an array of color stops.\n *\n * @param colors CSS colors array\n *\n * @return Color stop information.\n */\nexport function getColorStopsFromColors( colors: string[] ) {\n\treturn colors.map( ( color, i ) => ( {\n\t\tposition: ( i * 100 ) / ( colors.length - 1 ),\n\t\tcolor,\n\t} ) );\n}\n\n/**\n * Convert a color stop array to an array colors.\n *\n * @param colorStops Color stop information.\n *\n * @return CSS colors array.\n */\nexport function getColorsFromColorStops(\n\tcolorStops: { position: number; color: string }[] = []\n) {\n\treturn colorStops.map( ( { color } ) => color );\n}\n","/**\n * WordPress dependencies\n */\nimport { swatch } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport ColorIndicator from '../color-indicator';\nimport Icon from '../icon';\nimport { getGradientFromCSSColors } from './utils';\nimport type { DuotoneSwatchProps } from './types';\n\nfunction DuotoneSwatch( { values }: DuotoneSwatchProps ) {\n\treturn values ? (\n\t\t<ColorIndicator\n\t\t\tcolorValue={ getGradientFromCSSColors( values, '135deg' ) }\n\t\t/>\n\t) : (\n\t\t<Icon icon={ swatch } />\n\t);\n}\n\nexport default DuotoneSwatch;\n","/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport { swatch } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport ColorPalette from '../../color-palette';\nimport ColorIndicator from '../../color-indicator';\nimport Icon from '../../icon';\nimport type { ColorListPickerProps, ColorOptionProps } from './types';\nimport { useInstanceId } from '@wordpress/compose';\n\nfunction ColorOption( {\n\tlabel,\n\tvalue,\n\tcolors,\n\tdisableCustomColors,\n\tenableAlpha,\n\tonChange,\n}: ColorOptionProps ) {\n\tconst [ isOpen, setIsOpen ] = useState( false );\n\tconst idRoot = useInstanceId( ColorOption, 'color-list-picker-option' );\n\tconst labelId = `${ idRoot }__label`;\n\tconst contentId = `${ idRoot }__content`;\n\n\treturn (\n\t\t<>\n\t\t\t<Button\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tclassName=\"components-color-list-picker__swatch-button\"\n\t\t\t\tid={ labelId }\n\t\t\t\tonClick={ () => setIsOpen( ( prev ) => ! prev ) }\n\t\t\t\taria-expanded={ isOpen }\n\t\t\t\taria-controls={ contentId }\n\t\t\t\ticon={\n\t\t\t\t\tvalue ? (\n\t\t\t\t\t\t<ColorIndicator\n\t\t\t\t\t\t\tcolorValue={ value }\n\t\t\t\t\t\t\tclassName=\"components-color-list-picker__swatch-color\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<Icon icon={ swatch } />\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\ttext={ label }\n\t\t\t/>\n\t\t\t<div\n\t\t\t\trole=\"group\"\n\t\t\t\tid={ contentId }\n\t\t\t\taria-labelledby={ labelId }\n\t\t\t\taria-hidden={ ! isOpen }\n\t\t\t>\n\t\t\t\t{ isOpen && (\n\t\t\t\t\t<ColorPalette\n\t\t\t\t\t\taria-label={ __( 'Color options' ) }\n\t\t\t\t\t\tclassName=\"components-color-list-picker__color-picker\"\n\t\t\t\t\t\tcolors={ colors }\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\tclearable={ false }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tdisableCustomColors={ disableCustomColors }\n\t\t\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nfunction ColorListPicker( {\n\tcolors,\n\tlabels,\n\tvalue = [],\n\tdisableCustomColors,\n\tenableAlpha,\n\tonChange,\n}: ColorListPickerProps ) {\n\treturn (\n\t\t<div className=\"components-color-list-picker\">\n\t\t\t{ labels.map( ( label, index ) => (\n\t\t\t\t<ColorOption\n\t\t\t\t\tkey={ index }\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tvalue={ value[ index ] }\n\t\t\t\t\tcolors={ colors }\n\t\t\t\t\tdisableCustomColors={ disableCustomColors }\n\t\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t\t\tonChange={ ( newColor ) => {\n\t\t\t\t\t\tconst newColors: ( string | undefined )[] =\n\t\t\t\t\t\t\tvalue.slice();\n\t\t\t\t\t\tnewColors[ index ] = newColor;\n\t\t\t\t\t\tonChange( newColors );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</div>\n\t);\n}\n\nexport default ColorListPicker;\n","/**\n * Internal dependencies\n */\nimport CustomGradientBar from '../custom-gradient-picker/gradient-bar';\n\nimport {\n\tgetColorStopsFromColors,\n\tgetGradientFromCSSColors,\n\tgetColorsFromColorStops,\n} from './utils';\n\nconst PLACEHOLDER_VALUES = [ '#333', '#CCC' ];\n\nexport default function CustomDuotoneBar( {\n\tvalue,\n\tonChange,\n}: {\n\tvalue?: string[];\n\tonChange: ( value?: string[] ) => void;\n} ) {\n\tconst hasGradient = !! value;\n\tconst values = hasGradient ? value : PLACEHOLDER_VALUES;\n\tconst background = getGradientFromCSSColors( values );\n\tconst controlPoints = getColorStopsFromColors( values );\n\treturn (\n\t\t<CustomGradientBar\n\t\t\tdisableInserter\n\t\t\tbackground={ background }\n\t\t\thasGradient={ hasGradient }\n\t\t\tvalue={ controlPoints }\n\t\t\tonChange={ ( newColorStops ) => {\n\t\t\t\tconst newValue = getColorsFromColorStops( newColorStops );\n\t\t\t\tonChange( newValue );\n\t\t\t} }\n\t\t/>\n\t);\n}\n","/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal/es6';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ColorListPicker from './color-list-picker';\nimport CircularOptionPicker from '../circular-option-picker';\nimport { VStack } from '../v-stack';\n\nimport CustomDuotoneBar from './custom-duotone-bar';\nimport { getDefaultColors, getGradientFromCSSColors } from './utils';\nimport { Spacer } from '../spacer';\nimport type { DuotonePickerProps } from './types';\n\n/**\n * ```jsx\n * import { DuotonePicker, DuotoneSwatch } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const DUOTONE_PALETTE = [\n * \t{ colors: [ '#8c00b7', '#fcff41' ], name: 'Purple and yellow', slug: 'purple-yellow' },\n * \t{ colors: [ '#000097', '#ff4747' ], name: 'Blue and red', slug: 'blue-red' },\n * ];\n *\n * const COLOR_PALETTE = [\n * \t{ color: '#ff4747', name: 'Red', slug: 'red' },\n * \t{ color: '#fcff41', name: 'Yellow', slug: 'yellow' },\n * \t{ color: '#000097', name: 'Blue', slug: 'blue' },\n * \t{ color: '#8c00b7', name: 'Purple', slug: 'purple' },\n * ];\n *\n * const Example = () => {\n * \tconst [ duotone, setDuotone ] = useState( [ '#000000', '#ffffff' ] );\n * \treturn (\n * \t\t<>\n * \t\t\t<DuotonePicker\n * \t\t\t\tduotonePalette={ DUOTONE_PALETTE }\n * \t\t\t\tcolorPalette={ COLOR_PALETTE }\n * \t\t\t\tvalue={ duotone }\n * \t\t\t\tonChange={ setDuotone }\n * \t\t\t/>\n * \t\t\t<DuotoneSwatch values={ duotone } />\n * \t\t</>\n * \t);\n * };\n * ```\n */\nfunction DuotonePicker( {\n\tasButtons,\n\tloop,\n\tclearable = true,\n\tunsetable = true,\n\tcolorPalette,\n\tduotonePalette,\n\tdisableCustomColors,\n\tdisableCustomDuotone,\n\tvalue,\n\tonChange,\n\t'aria-label': ariaLabel,\n\t'aria-labelledby': ariaLabelledby,\n\t...otherProps\n}: DuotonePickerProps ) {\n\tconst [ defaultDark, defaultLight ] = useMemo(\n\t\t() => getDefaultColors( colorPalette ),\n\t\t[ colorPalette ]\n\t);\n\n\tconst isUnset = value === 'unset';\n\tconst unsetOptionLabel = __( 'Unset' );\n\n\tconst unsetOption = (\n\t\t<CircularOptionPicker.Option\n\t\t\tkey=\"unset\"\n\t\t\tvalue=\"unset\"\n\t\t\tisSelected={ isUnset }\n\t\t\ttooltipText={ unsetOptionLabel }\n\t\t\taria-label={ unsetOptionLabel }\n\t\t\tclassName=\"components-duotone-picker__color-indicator\"\n\t\t\tonClick={ () => {\n\t\t\t\tonChange( isUnset ? undefined : 'unset' );\n\t\t\t} }\n\t\t/>\n\t);\n\n\tconst duotoneOptions = duotonePalette.map( ( { colors, slug, name } ) => {\n\t\tconst style = {\n\t\t\tbackground: getGradientFromCSSColors( colors, '135deg' ),\n\t\t\tcolor: 'transparent',\n\t\t};\n\t\tconst tooltipText =\n\t\t\tname ??\n\t\t\tsprintf(\n\t\t\t\t// translators: %s: duotone code e.g: \"dark-grayscale\" or \"7f7f7f-ffffff\".\n\t\t\t\t__( 'Duotone code: %s' ),\n\t\t\t\tslug\n\t\t\t);\n\t\tconst label = name\n\t\t\t? sprintf(\n\t\t\t\t\t// translators: %s: The name of the option e.g: \"Dark grayscale\".\n\t\t\t\t\t__( 'Duotone: %s' ),\n\t\t\t\t\tname\n\t\t\t )\n\t\t\t: tooltipText;\n\t\tconst isSelected = fastDeepEqual( colors, value );\n\n\t\treturn (\n\t\t\t<CircularOptionPicker.Option\n\t\t\t\tkey={ slug }\n\t\t\t\tvalue={ colors }\n\t\t\t\tisSelected={ isSelected }\n\t\t\t\taria-label={ label }\n\t\t\t\ttooltipText={ tooltipText }\n\t\t\t\tstyle={ style }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tonChange( isSelected ? undefined : colors );\n\t\t\t\t} }\n\t\t\t/>\n\t\t);\n\t} );\n\n\tlet metaProps:\n\t\t| { asButtons: false; loop?: boolean; 'aria-label': string }\n\t\t| { asButtons: false; loop?: boolean; 'aria-labelledby': string }\n\t\t| { asButtons: true };\n\n\tif ( asButtons ) {\n\t\tmetaProps = { asButtons: true };\n\t} else {\n\t\tconst _metaProps: { asButtons: false; loop?: boolean } = {\n\t\t\tasButtons: false,\n\t\t\tloop,\n\t\t};\n\n\t\tif ( ariaLabel ) {\n\t\t\tmetaProps = { ..._metaProps, 'aria-label': ariaLabel };\n\t\t} else if ( ariaLabelledby ) {\n\t\t\tmetaProps = {\n\t\t\t\t..._metaProps,\n\t\t\t\t'aria-labelledby': ariaLabelledby,\n\t\t\t};\n\t\t} else {\n\t\t\tmetaProps = {\n\t\t\t\t..._metaProps,\n\t\t\t\t'aria-label': __( 'Custom color picker.' ),\n\t\t\t};\n\t\t}\n\t}\n\n\tconst options = unsetable\n\t\t? [ unsetOption, ...duotoneOptions ]\n\t\t: duotoneOptions;\n\n\treturn (\n\t\t<CircularOptionPicker\n\t\t\t{ ...otherProps }\n\t\t\t{ ...metaProps }\n\t\t\toptions={ options }\n\t\t\tactions={\n\t\t\t\t!! clearable && (\n\t\t\t\t\t<CircularOptionPicker.ButtonAction\n\t\t\t\t\t\tonClick={ () => onChange( undefined ) }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\tdisabled={ ! value }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Clear' ) }\n\t\t\t\t\t</CircularOptionPicker.ButtonAction>\n\t\t\t\t)\n\t\t\t}\n\t\t>\n\t\t\t<Spacer paddingTop={ options.length === 0 ? 0 : 4 }>\n\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t{ ! disableCustomColors && ! disableCustomDuotone && (\n\t\t\t\t\t\t<CustomDuotoneBar\n\t\t\t\t\t\t\tvalue={ isUnset ? undefined : value }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! disableCustomDuotone && (\n\t\t\t\t\t\t<ColorListPicker\n\t\t\t\t\t\t\tlabels={ [ __( 'Shadows' ), __( 'Highlights' ) ] }\n\t\t\t\t\t\t\tcolors={ colorPalette }\n\t\t\t\t\t\t\tvalue={ isUnset ? undefined : value }\n\t\t\t\t\t\t\tdisableCustomColors={ disableCustomColors }\n\t\t\t\t\t\t\tenableAlpha\n\t\t\t\t\t\t\tonChange={ ( newColors ) => {\n\t\t\t\t\t\t\t\tif ( ! newColors[ 0 ] ) {\n\t\t\t\t\t\t\t\t\tnewColors[ 0 ] = defaultDark;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ( ! newColors[ 1 ] ) {\n\t\t\t\t\t\t\t\t\tnewColors[ 1 ] = defaultLight;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tconst newValue =\n\t\t\t\t\t\t\t\t\tnewColors.length >= 2\n\t\t\t\t\t\t\t\t\t\t? newColors\n\t\t\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\t\t\t// @ts-expect-error TODO: The color arrays for a DuotonePicker should be a tuple of two colors,\n\t\t\t\t\t\t\t\t// but it's currently typed as a string[].\n\t\t\t\t\t\t\t\t// See also https://github.com/WordPress/gutenberg/pull/49060#discussion_r1136951035\n\t\t\t\t\t\t\t\tonChange( newValue );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</VStack>\n\t\t\t</Spacer>\n\t\t</CircularOptionPicker>\n\t);\n}\n\nexport default DuotonePicker;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { ExternalLinkProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nfunction UnforwardedExternalLink(\n\tprops: Omit<\n\t\tWordPressComponentProps< ExternalLinkProps, 'a', false >,\n\t\t'target'\n\t>,\n\tref: ForwardedRef< HTMLAnchorElement >\n) {\n\tconst { href, children, className, rel = '', ...additionalProps } = props;\n\tconst optimizedRel = [\n\t\t...new Set(\n\t\t\t[\n\t\t\t\t...rel.split( ' ' ),\n\t\t\t\t'external',\n\t\t\t\t'noreferrer',\n\t\t\t\t'noopener',\n\t\t\t].filter( Boolean )\n\t\t),\n\t].join( ' ' );\n\tconst classes = clsx( 'components-external-link', className );\n\t/* Anchor links are perceived as external links.\n\tThis constant helps check for on page anchor links,\n\tto prevent them from being opened in the editor. */\n\tconst isInternalAnchor = !! href?.startsWith( '#' );\n\n\tconst onClickHandler = (\n\t\tevent: React.MouseEvent< HTMLAnchorElement, MouseEvent >\n\t) => {\n\t\tif ( isInternalAnchor ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\n\t\tif ( props.onClick ) {\n\t\t\tprops.onClick( event );\n\t\t}\n\t};\n\n\treturn (\n\t\t/* eslint-disable react/jsx-no-target-blank */\n\t\t<a\n\t\t\t{ ...additionalProps }\n\t\t\tclassName={ classes }\n\t\t\thref={ href }\n\t\t\tonClick={ onClickHandler }\n\t\t\ttarget=\"_blank\"\n\t\t\trel={ optimizedRel }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t<span className=\"components-external-link__contents\">\n\t\t\t\t{ children }\n\t\t\t</span>\n\t\t\t<span\n\t\t\t\tclassName=\"components-external-link__icon\"\n\t\t\t\taria-label={\n\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t↗\n\t\t\t</span>\n\t\t</a>\n\t\t/* eslint-enable react/jsx-no-target-blank */\n\t);\n}\n\n/**\n * Link to an external resource.\n *\n * ```jsx\n * import { ExternalLink } from '@wordpress/components';\n *\n * const MyExternalLink = () => (\n * <ExternalLink href=\"https://wordpress.org\">WordPress.org</ExternalLink>\n * );\n * ```\n */\nexport const ExternalLink = forwardRef( UnforwardedExternalLink );\n\nexport default ExternalLink;\n","export const INITIAL_BOUNDS = {\n\twidth: 200,\n\theight: 170,\n};\n\nconst VIDEO_EXTENSIONS = [\n\t'avi',\n\t'mpg',\n\t'mpeg',\n\t'mov',\n\t'mp4',\n\t'm4v',\n\t'ogg',\n\t'ogv',\n\t'webm',\n\t'wmv',\n];\n\n/**\n * Gets the extension of a file name.\n *\n * @param filename The file name.\n * @return The extension of the file name.\n */\nexport function getExtension( filename = '' ): string {\n\tconst parts = filename.split( '.' );\n\treturn parts[ parts.length - 1 ];\n}\n\n/**\n * Checks if a file is a video.\n *\n * @param filename The file name.\n * @return Whether the file is a video.\n */\nexport function isVideoType( filename: string = '' ): boolean {\n\tif ( ! filename ) {\n\t\treturn false;\n\t}\n\treturn (\n\t\tfilename.startsWith( 'data:video/' ) ||\n\t\tVIDEO_EXTENSIONS.includes( getExtension( filename ) )\n\t);\n}\n\n/**\n * Transforms a fraction value to a percentage value.\n *\n * @param fraction The fraction value.\n * @return A percentage value.\n */\nexport function fractionToPercentage( fraction: number ): number {\n\treturn Math.round( fraction * 100 );\n}\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport { Flex } from '../../flex';\nimport UnitControl from '../../unit-control';\nimport { COLORS, CONFIG } from '../../utils';\nimport type { FocalPointPickerControlsProps } from '../types';\nimport { INITIAL_BOUNDS } from '../utils';\n\nexport const MediaWrapper = styled.div`\n\tbackground-color: transparent;\n\tdisplay: flex;\n\ttext-align: center;\n\twidth: 100%;\n`;\n\nexport const MediaContainer = styled.div`\n\talign-items: center;\n\tborder-radius: ${ CONFIG.radiusSmall };\n\tcursor: pointer;\n\tdisplay: inline-flex;\n\tjustify-content: center;\n\tmargin: auto;\n\tposition: relative;\n\theight: 100%;\n\n\t&:after {\n\t\tborder-radius: inherit;\n\t\tbottom: 0;\n\t\tbox-shadow: inset 0 0 0 1px rgba( 0, 0, 0, 0.1 );\n\t\tcontent: '';\n\t\tleft: 0;\n\t\tpointer-events: none;\n\t\tposition: absolute;\n\t\tright: 0;\n\t\ttop: 0;\n\t}\n\n\timg,\n\tvideo {\n\t\tborder-radius: inherit;\n\t\tbox-sizing: border-box;\n\t\tdisplay: block;\n\t\theight: auto;\n\t\tmargin: 0;\n\t\tmax-height: 100%;\n\t\tmax-width: 100%;\n\t\tpointer-events: none;\n\t\tuser-select: none;\n\t\twidth: auto;\n\t}\n`;\n\nexport const MediaPlaceholder = styled.div`\n\tbackground: ${ COLORS.gray[ 100 ] };\n\tborder-radius: inherit;\n\tbox-sizing: border-box;\n\theight: ${ INITIAL_BOUNDS.height }px;\n\tmax-width: 280px;\n\tmin-width: ${ INITIAL_BOUNDS.width }px;\n\twidth: 100%;\n`;\n\nexport const StyledUnitControl = styled( UnitControl )`\n\twidth: 100%;\n`;\n\nconst deprecatedBottomMargin = ( {\n\t__nextHasNoMarginBottom,\n}: FocalPointPickerControlsProps ) => {\n\treturn ! __nextHasNoMarginBottom\n\t\t? css`\n\t\t\t\tpadding-bottom: 1em;\n\t\t `\n\t\t: undefined;\n};\n\nconst extraHelpTextMargin = ( {\n\thasHelpText = false,\n}: FocalPointPickerControlsProps ) => {\n\treturn hasHelpText\n\t\t? css`\n\t\t\t\tpadding-bottom: 1em;\n\t\t `\n\t\t: undefined;\n};\n\nexport const ControlWrapper = styled( Flex )`\n\tmax-width: 320px;\n\tpadding-top: 1em;\n\n\t${ extraHelpTextMargin }\n\t${ deprecatedBottomMargin }\n`;\n\nexport const GridView = styled.div`\n\tleft: 50%;\n\toverflow: hidden;\n\tpointer-events: none;\n\tposition: absolute;\n\ttop: 50%;\n\ttransform: translate3d( -50%, -50%, 0 );\n\tz-index: 1;\n\n\t@media not ( prefers-reduced-motion ) {\n\t\ttransition: opacity 100ms linear;\n\t}\n\n\topacity: ${ ( { showOverlay }: { showOverlay?: boolean } ) =>\n\t\tshowOverlay ? 1 : 0 };\n`;\n\nexport const GridLine = styled.div`\n\tbackground: rgba( 255, 255, 255, 0.4 );\n\tbackdrop-filter: blur( 16px ) saturate( 180% );\n\tposition: absolute;\n\ttransform: translateZ( 0 );\n`;\n\nexport const GridLineX = styled( GridLine )`\n\theight: 1px;\n\tleft: 1px;\n\tright: 1px;\n`;\n\nexport const GridLineY = styled( GridLine )`\n\twidth: 1px;\n\ttop: 1px;\n\tbottom: 1px;\n`;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport {\n\tStyledUnitControl,\n\tControlWrapper,\n} from './styles/focal-point-picker-style';\nimport { fractionToPercentage } from './utils';\nimport type {\n\tUnitControlProps,\n\tUnitControlOnChangeCallback,\n} from '../unit-control/types';\nimport type { FocalPointAxis, FocalPointPickerControlsProps } from './types';\n\nconst TEXTCONTROL_MIN = 0;\nconst TEXTCONTROL_MAX = 100;\nconst noop = () => {};\n\nexport default function FocalPointPickerControls( {\n\t__nextHasNoMarginBottom,\n\thasHelpText,\n\tonChange = noop,\n\tpoint = {\n\t\tx: 0.5,\n\t\ty: 0.5,\n\t},\n}: FocalPointPickerControlsProps ) {\n\tconst valueX = fractionToPercentage( point.x );\n\tconst valueY = fractionToPercentage( point.y );\n\n\tconst handleChange = (\n\t\tvalue: Parameters< UnitControlOnChangeCallback >[ 0 ],\n\t\taxis: FocalPointAxis\n\t) => {\n\t\tif ( value === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst num = parseInt( value, 10 );\n\n\t\tif ( ! isNaN( num ) ) {\n\t\t\tonChange( { ...point, [ axis ]: num / 100 } );\n\t\t}\n\t};\n\n\treturn (\n\t\t<ControlWrapper\n\t\t\tclassName=\"focal-point-picker__controls\"\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\thasHelpText={ hasHelpText }\n\t\t\tgap={ 4 }\n\t\t>\n\t\t\t<FocalPointUnitControl\n\t\t\t\tlabel={ __( 'Left' ) }\n\t\t\t\taria-label={ __( 'Focal point left position' ) }\n\t\t\t\tvalue={ [ valueX, '%' ].join( '' ) }\n\t\t\t\tonChange={\n\t\t\t\t\t( ( next ) =>\n\t\t\t\t\t\thandleChange(\n\t\t\t\t\t\t\tnext,\n\t\t\t\t\t\t\t'x'\n\t\t\t\t\t\t) ) as UnitControlOnChangeCallback\n\t\t\t\t}\n\t\t\t\tdragDirection=\"e\"\n\t\t\t/>\n\t\t\t<FocalPointUnitControl\n\t\t\t\tlabel={ __( 'Top' ) }\n\t\t\t\taria-label={ __( 'Focal point top position' ) }\n\t\t\t\tvalue={ [ valueY, '%' ].join( '' ) }\n\t\t\t\tonChange={\n\t\t\t\t\t( ( next ) =>\n\t\t\t\t\t\thandleChange(\n\t\t\t\t\t\t\tnext,\n\t\t\t\t\t\t\t'y'\n\t\t\t\t\t\t) ) as UnitControlOnChangeCallback\n\t\t\t\t}\n\t\t\t\tdragDirection=\"s\"\n\t\t\t/>\n\t\t</ControlWrapper>\n\t);\n}\n\nfunction FocalPointUnitControl( props: UnitControlProps ) {\n\treturn (\n\t\t<StyledUnitControl\n\t\t\t__next40pxDefaultSize\n\t\t\tclassName=\"focal-point-picker__controls-position-unit-control\"\n\t\t\tlabelPosition=\"top\"\n\t\t\tmax={ TEXTCONTROL_MAX }\n\t\t\tmin={ TEXTCONTROL_MIN }\n\t\t\tunits={ [ { value: '%', label: '%' } ] }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport { CONFIG } from '../../utils';\n\nexport const PointerCircle = styled.div`\n\tbackground-color: transparent;\n\tcursor: grab;\n\theight: 40px;\n\tmargin: -20px 0 0 -20px;\n\tposition: absolute;\n\tuser-select: none;\n\twidth: 40px;\n\twill-change: transform;\n\tz-index: 10000;\n\tbackground: rgba( 255, 255, 255, 0.4 );\n\tborder: 1px solid rgba( 255, 255, 255, 0.4 );\n\tborder-radius: ${ CONFIG.radiusRound };\n\tbackdrop-filter: blur( 16px ) saturate( 180% );\n\tbox-shadow: rgb( 0 0 0 / 10% ) 0px 0px 8px;\n\n\t@media not ( prefers-reduced-motion ) {\n\t\ttransition: transform 100ms linear;\n\t}\n\n\t${ ( { isDragging }: { isDragging: boolean } ) =>\n\t\tisDragging &&\n\t\t`\n\t\t\tbox-shadow: rgb( 0 0 0 / 12% ) 0px 0px 10px;\n\t\t\ttransform: scale( 1.1 );\n\t\t\tcursor: grabbing;\n\t\t\t` }\n`;\n","/**\n * Internal dependencies\n */\nimport { PointerCircle } from './styles/focal-point-style';\n\n/**\n * External dependencies\n */\nimport type { FocalPointProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nexport default function FocalPoint( {\n\tleft = '50%',\n\ttop = '50%',\n\t...props\n}: WordPressComponentProps< FocalPointProps, 'div' > ) {\n\tconst style = { left, top };\n\n\treturn (\n\t\t<PointerCircle\n\t\t\t{ ...props }\n\t\t\tclassName=\"components-focal-point-picker__icon_container\"\n\t\t\tstyle={ style }\n\t\t/>\n\t);\n}\n","/**\n * Internal dependencies\n */\nimport {\n\tGridView,\n\tGridLineX,\n\tGridLineY,\n} from './styles/focal-point-picker-style';\nimport type { FocalPointPickerGridProps } from './types';\nimport type { WordPressComponentProps } from '../context/wordpress-component';\n\nexport default function FocalPointPickerGrid( {\n\tbounds,\n\t...props\n}: WordPressComponentProps< FocalPointPickerGridProps, 'div' > ) {\n\treturn (\n\t\t<GridView\n\t\t\t{ ...props }\n\t\t\tclassName=\"components-focal-point-picker__grid\"\n\t\t\tstyle={ {\n\t\t\t\twidth: bounds.width,\n\t\t\t\theight: bounds.height,\n\t\t\t} }\n\t\t>\n\t\t\t<GridLineX style={ { top: '33%' } } />\n\t\t\t<GridLineX style={ { top: '66%' } } />\n\t\t\t<GridLineY style={ { left: '33%' } } />\n\t\t\t<GridLineY style={ { left: '66%' } } />\n\t\t</GridView>\n\t);\n}\n","/**\n * External dependencies\n */\nimport type { Ref } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { MediaPlaceholder } from './styles/focal-point-picker-style';\nimport { isVideoType } from './utils';\nimport type { FocalPointPickerMediaProps } from './types';\n\nexport default function Media( {\n\talt,\n\tautoPlay,\n\tsrc,\n\tonLoad,\n\tmediaRef,\n\t// Exposing muted prop for test rendering purposes\n\t// https://github.com/testing-library/react-testing-library/issues/470\n\tmuted = true,\n\t...props\n}: FocalPointPickerMediaProps ) {\n\tif ( ! src ) {\n\t\treturn (\n\t\t\t<MediaPlaceholder\n\t\t\t\tclassName=\"components-focal-point-picker__media components-focal-point-picker__media--placeholder\"\n\t\t\t\tref={ mediaRef as Ref< HTMLDivElement > }\n\t\t\t\t{ ...props }\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst isVideo = isVideoType( src );\n\n\treturn isVideo ? (\n\t\t<video\n\t\t\t{ ...props }\n\t\t\tautoPlay={ autoPlay }\n\t\t\tclassName=\"components-focal-point-picker__media components-focal-point-picker__media--video\"\n\t\t\tloop\n\t\t\tmuted={ muted }\n\t\t\tonLoadedData={ onLoad }\n\t\t\tref={ mediaRef as Ref< HTMLVideoElement > }\n\t\t\tsrc={ src }\n\t\t/>\n\t) : (\n\t\t<img\n\t\t\t{ ...props }\n\t\t\talt={ alt }\n\t\t\tclassName=\"components-focal-point-picker__media components-focal-point-picker__media--image\"\n\t\t\tonLoad={ onLoad }\n\t\t\tref={ mediaRef as Ref< HTMLImageElement > }\n\t\t\tsrc={ src }\n\t\t/>\n\t);\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useEffect, useRef, useState } from '@wordpress/element';\nimport {\n\t__experimentalUseDragging as useDragging,\n\tuseInstanceId,\n\tuseIsomorphicLayoutEffect,\n} from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport Controls from './controls';\nimport FocalPoint from './focal-point';\nimport Grid from './grid';\nimport Media from './media';\nimport {\n\tMediaWrapper,\n\tMediaContainer,\n} from './styles/focal-point-picker-style';\nimport { INITIAL_BOUNDS } from './utils';\nimport { useUpdateEffect } from '../utils/hooks';\nimport type { WordPressComponentProps } from '../context/wordpress-component';\nimport type {\n\tFocalPoint as FocalPointType,\n\tFocalPointPickerProps,\n} from './types';\nimport type { KeyboardEventHandler } from 'react';\n\nconst GRID_OVERLAY_TIMEOUT = 600;\n\n/**\n * Focal Point Picker is a component which creates a UI for identifying the most important visual point of an image.\n *\n * This component addresses a specific problem: with large background images it is common to see undesirable crops,\n * especially when viewing on smaller viewports such as mobile phones. This component allows the selection of\n * the point with the most important visual information and returns it as a pair of numbers between 0 and 1.\n * This value can be easily converted into the CSS `background-position` attribute, and will ensure that the\n * focal point is never cropped out, regardless of viewport.\n *\n * - Example focal point picker value: `{ x: 0.5, y: 0.1 }`\n * - Corresponding CSS: `background-position: 50% 10%;`\n *\n * ```jsx\n * import { FocalPointPicker } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const Example = () => {\n * \tconst [ focalPoint, setFocalPoint ] = useState( {\n * \t\tx: 0.5,\n * \t\ty: 0.5,\n * \t} );\n *\n * \tconst url = '/path/to/image';\n *\n * \t// Example function to render the CSS styles based on Focal Point Picker value\n * \tconst style = {\n * \t\tbackgroundImage: `url(${ url })`,\n * \t\tbackgroundPosition: `${ focalPoint.x * 100 }% ${ focalPoint.y * 100 }%`,\n * \t};\n *\n * \treturn (\n * \t\t<>\n * \t\t\t<FocalPointPicker\n * __nextHasNoMarginBottom\n * \t\t\t\turl={ url }\n * \t\t\t\tvalue={ focalPoint }\n * \t\t\t\tonDragStart={ setFocalPoint }\n * \t\t\t\tonDrag={ setFocalPoint }\n * \t\t\t\tonChange={ setFocalPoint }\n * \t\t\t/>\n * \t\t\t<div style={ style } />\n * \t\t</>\n * \t);\n * };\n * ```\n */\nexport function FocalPointPicker( {\n\t__nextHasNoMarginBottom,\n\tautoPlay = true,\n\tclassName,\n\thelp,\n\tlabel,\n\tonChange,\n\tonDrag,\n\tonDragEnd,\n\tonDragStart,\n\tresolvePoint,\n\turl,\n\tvalue: valueProp = {\n\t\tx: 0.5,\n\t\ty: 0.5,\n\t},\n\t...restProps\n}: WordPressComponentProps< FocalPointPickerProps, 'div', false > ) {\n\tconst [ point, setPoint ] = useState( valueProp );\n\tconst [ showGridOverlay, setShowGridOverlay ] = useState( false );\n\n\tconst { startDrag, endDrag, isDragging } = useDragging( {\n\t\tonDragStart: ( event ) => {\n\t\t\tdragAreaRef.current?.focus();\n\t\t\tconst value = getValueWithinDragArea( event );\n\n\t\t\t// `value` can technically be undefined if getValueWithinDragArea() is\n\t\t\t// called before dragAreaRef is set, but this shouldn't happen in reality.\n\t\t\tif ( ! value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tonDragStart?.( value, event );\n\t\t\tsetPoint( value );\n\t\t},\n\t\tonDragMove: ( event ) => {\n\t\t\t// Prevents text-selection when dragging.\n\t\t\tevent.preventDefault();\n\t\t\tconst value = getValueWithinDragArea( event );\n\t\t\tif ( ! value ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tonDrag?.( value, event );\n\t\t\tsetPoint( value );\n\t\t},\n\t\tonDragEnd: () => {\n\t\t\tonDragEnd?.();\n\t\t\tonChange?.( point );\n\t\t},\n\t} );\n\n\t// Uses the internal point while dragging or else the value from props.\n\tconst { x, y } = isDragging ? point : valueProp;\n\n\tconst dragAreaRef = useRef< HTMLDivElement >( null );\n\tconst [ bounds, setBounds ] = useState( INITIAL_BOUNDS );\n\tconst refUpdateBounds = useRef( () => {\n\t\tif ( ! dragAreaRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { clientWidth: width, clientHeight: height } =\n\t\t\tdragAreaRef.current;\n\t\t// Falls back to initial bounds if the ref has no size. Since styles\n\t\t// give the drag area dimensions even when the media has not loaded\n\t\t// this should only happen in unit tests (jsdom).\n\t\tsetBounds(\n\t\t\twidth > 0 && height > 0 ? { width, height } : { ...INITIAL_BOUNDS }\n\t\t);\n\t} );\n\n\tuseEffect( () => {\n\t\tconst updateBounds = refUpdateBounds.current;\n\t\tif ( ! dragAreaRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { defaultView } = dragAreaRef.current.ownerDocument;\n\t\tdefaultView?.addEventListener( 'resize', updateBounds );\n\t\treturn () => defaultView?.removeEventListener( 'resize', updateBounds );\n\t}, [] );\n\n\t// Updates the bounds to cover cases of unspecified media or load failures.\n\tuseIsomorphicLayoutEffect( () => void refUpdateBounds.current(), [] );\n\n\t// TODO: Consider refactoring getValueWithinDragArea() into a pure function.\n\t// https://github.com/WordPress/gutenberg/pull/43872#discussion_r963455173\n\tconst getValueWithinDragArea = ( {\n\t\tclientX,\n\t\tclientY,\n\t\tshiftKey,\n\t}: {\n\t\tclientX: number;\n\t\tclientY: number;\n\t\tshiftKey: boolean;\n\t} ) => {\n\t\tif ( ! dragAreaRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { top, left } = dragAreaRef.current.getBoundingClientRect();\n\t\tlet nextX = ( clientX - left ) / bounds.width;\n\t\tlet nextY = ( clientY - top ) / bounds.height;\n\t\t// Enables holding shift to jump values by 10%.\n\t\tif ( shiftKey ) {\n\t\t\tnextX = Math.round( nextX / 0.1 ) * 0.1;\n\t\t\tnextY = Math.round( nextY / 0.1 ) * 0.1;\n\t\t}\n\t\treturn getFinalValue( { x: nextX, y: nextY } );\n\t};\n\n\tconst getFinalValue = ( value: FocalPointType ): FocalPointType => {\n\t\tconst resolvedValue = resolvePoint?.( value ) ?? value;\n\t\tresolvedValue.x = Math.max( 0, Math.min( resolvedValue.x, 1 ) );\n\t\tresolvedValue.y = Math.max( 0, Math.min( resolvedValue.y, 1 ) );\n\t\tconst roundToTwoDecimalPlaces = ( n: number ) =>\n\t\t\tMath.round( n * 1e2 ) / 1e2;\n\n\t\treturn {\n\t\t\tx: roundToTwoDecimalPlaces( resolvedValue.x ),\n\t\t\ty: roundToTwoDecimalPlaces( resolvedValue.y ),\n\t\t};\n\t};\n\n\tconst arrowKeyStep: KeyboardEventHandler< HTMLDivElement > = ( event ) => {\n\t\tconst { code, shiftKey } = event;\n\t\tif (\n\t\t\t! [ 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight' ].includes(\n\t\t\t\tcode\n\t\t\t)\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tevent.preventDefault();\n\t\tconst value = { x, y };\n\t\tconst step = shiftKey ? 0.1 : 0.01;\n\t\tconst delta =\n\t\t\tcode === 'ArrowUp' || code === 'ArrowLeft' ? -1 * step : step;\n\t\tconst axis = code === 'ArrowUp' || code === 'ArrowDown' ? 'y' : 'x';\n\t\tvalue[ axis ] = value[ axis ] + delta;\n\t\tonChange?.( getFinalValue( value ) );\n\t};\n\n\tconst focalPointPosition = {\n\t\tleft: x !== undefined ? x * bounds.width : 0.5 * bounds.width,\n\t\ttop: y !== undefined ? y * bounds.height : 0.5 * bounds.height,\n\t};\n\n\tconst classes = clsx( 'components-focal-point-picker-control', className );\n\n\tconst instanceId = useInstanceId( FocalPointPicker );\n\tconst id = `inspector-focal-point-picker-control-${ instanceId }`;\n\n\tuseUpdateEffect( () => {\n\t\tsetShowGridOverlay( true );\n\t\tconst timeout = window.setTimeout( () => {\n\t\t\tsetShowGridOverlay( false );\n\t\t}, GRID_OVERLAY_TIMEOUT );\n\n\t\treturn () => window.clearTimeout( timeout );\n\t}, [ x, y ] );\n\n\treturn (\n\t\t<BaseControl\n\t\t\t{ ...restProps }\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t__associatedWPComponentName=\"FocalPointPicker\"\n\t\t\tlabel={ label }\n\t\t\tid={ id }\n\t\t\thelp={ help }\n\t\t\tclassName={ classes }\n\t\t>\n\t\t\t<MediaWrapper className=\"components-focal-point-picker-wrapper\">\n\t\t\t\t<MediaContainer\n\t\t\t\t\tclassName=\"components-focal-point-picker\"\n\t\t\t\t\tonKeyDown={ arrowKeyStep }\n\t\t\t\t\tonMouseDown={ startDrag }\n\t\t\t\t\tonBlur={ () => {\n\t\t\t\t\t\tif ( isDragging ) {\n\t\t\t\t\t\t\tendDrag();\n\t\t\t\t\t\t}\n\t\t\t\t\t} }\n\t\t\t\t\tref={ dragAreaRef }\n\t\t\t\t\trole=\"button\"\n\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t>\n\t\t\t\t\t<Grid bounds={ bounds } showOverlay={ showGridOverlay } />\n\t\t\t\t\t<Media\n\t\t\t\t\t\talt={ __( 'Media preview' ) }\n\t\t\t\t\t\tautoPlay={ autoPlay }\n\t\t\t\t\t\tonLoad={ refUpdateBounds.current }\n\t\t\t\t\t\tsrc={ url }\n\t\t\t\t\t/>\n\t\t\t\t\t<FocalPoint\n\t\t\t\t\t\t{ ...focalPointPosition }\n\t\t\t\t\t\tisDragging={ isDragging }\n\t\t\t\t\t/>\n\t\t\t\t</MediaContainer>\n\t\t\t</MediaWrapper>\n\t\t\t<Controls\n\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t\thasHelpText={ !! help }\n\t\t\t\tpoint={ { x, y } }\n\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\tonChange?.( getFinalValue( value ) );\n\t\t\t\t} }\n\t\t\t/>\n\t\t</BaseControl>\n\t);\n}\n\nexport default FocalPointPicker;\n","/**\n * WordPress dependencies\n */\nimport { useMergeRefs, useFocusableIframe } from '@wordpress/compose';\nimport deprecated from '@wordpress/deprecated';\n/**\n * Internal dependencies\n */\nimport type { FocusableIframeProps } from './types';\n\nexport default function FocusableIframe( {\n\tiframeRef,\n\t...props\n}: FocusableIframeProps ) {\n\tconst ref = useMergeRefs( [ iframeRef, useFocusableIframe() ] );\n\tdeprecated( 'wp.components.FocusableIframe', {\n\t\tsince: '5.9',\n\t\talternative: 'wp.compose.useFocusableIframe',\n\t} );\n\t// Disable reason: The rendered iframe is a pass-through component,\n\t// assigning props inherited from the rendering parent. It's the\n\t// responsibility of the parent to assign a title.\n\t// eslint-disable-next-line jsx-a11y/iframe-has-title\n\treturn <iframe ref={ ref } { ...props } />;\n}\n","/**\n * Internal dependencies\n */\nimport type { FontSizePickerProps, FontSize } from './types';\nimport { parseQuantityAndUnitFromRawValue } from '../unit-control';\n\n/**\n * Some themes use css vars for their font sizes, so until we\n * have the way of calculating them don't display them.\n *\n * @param value The value that is checked.\n * @return Whether the value is a simple css value.\n */\nexport function isSimpleCssValue(\n\tvalue: NonNullable< FontSizePickerProps[ 'value' ] >\n) {\n\tconst sizeRegex =\n\t\t/^[\\d\\.]+(px|em|rem|vw|vh|%|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)?$/i;\n\treturn sizeRegex.test( String( value ) );\n}\n\n/**\n * If all of the given font sizes have the same unit (e.g. 'px'), return that\n * unit. Otherwise return null.\n *\n * @param fontSizes List of font sizes.\n * @return The common unit, or null.\n */\nexport function getCommonSizeUnit( fontSizes: FontSize[] ) {\n\tconst [ firstFontSize, ...otherFontSizes ] = fontSizes;\n\tif ( ! firstFontSize ) {\n\t\treturn null;\n\t}\n\tconst [ , firstUnit ] = parseQuantityAndUnitFromRawValue(\n\t\tfirstFontSize.size\n\t);\n\tconst areAllSizesSameUnit = otherFontSizes.every( ( fontSize ) => {\n\t\tconst [ , unit ] = parseQuantityAndUnitFromRawValue( fontSize.size );\n\t\treturn unit === firstUnit;\n\t} );\n\treturn areAllSizesSameUnit ? firstUnit : null;\n}\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport Button from '../button';\nimport { HStack } from '../h-stack';\nimport { space } from '../utils/space';\nimport { COLORS } from '../utils';\n\nexport const Container = styled.fieldset`\n\tborder: 0;\n\tmargin: 0;\n\tpadding: 0;\n\tdisplay: contents;\n`;\n\nexport const Header = styled( HStack )`\n\theight: ${ space( 4 ) };\n`;\n\nexport const HeaderToggle = styled( Button )`\n\tmargin-top: ${ space( -1 ) };\n`;\n\nexport const HeaderLabel = styled( BaseControl.VisualLabel )`\n\tdisplay: flex;\n\tgap: ${ space( 1 ) };\n\tjustify-content: flex-start;\n\tmargin-bottom: 0;\n`;\n\nexport const HeaderHint = styled.span`\n\tcolor: ${ COLORS.gray[ 700 ] };\n`;\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport CustomSelectControl from '../custom-select-control';\nimport { parseQuantityAndUnitFromRawValue } from '../unit-control';\nimport type {\n\tFontSizePickerSelectProps,\n\tFontSizePickerSelectOption,\n} from './types';\nimport { getCommonSizeUnit, isSimpleCssValue } from './utils';\n\nconst DEFAULT_OPTION: FontSizePickerSelectOption = {\n\tkey: 'default',\n\tname: __( 'Default' ),\n\tvalue: undefined,\n};\n\nconst CUSTOM_OPTION: FontSizePickerSelectOption = {\n\tkey: 'custom',\n\tname: __( 'Custom' ),\n};\n\nconst FontSizePickerSelect = ( props: FontSizePickerSelectProps ) => {\n\tconst {\n\t\t__next40pxDefaultSize,\n\t\tfontSizes,\n\t\tvalue,\n\t\tdisableCustomFontSizes,\n\t\tsize,\n\t\tonChange,\n\t\tonSelectCustom,\n\t} = props;\n\n\tconst areAllSizesSameUnit = !! getCommonSizeUnit( fontSizes );\n\n\tconst options: FontSizePickerSelectOption[] = [\n\t\tDEFAULT_OPTION,\n\t\t...fontSizes.map( ( fontSize ) => {\n\t\t\tlet hint;\n\t\t\tif ( areAllSizesSameUnit ) {\n\t\t\t\tconst [ quantity ] = parseQuantityAndUnitFromRawValue(\n\t\t\t\t\tfontSize.size\n\t\t\t\t);\n\t\t\t\tif ( quantity !== undefined ) {\n\t\t\t\t\thint = String( quantity );\n\t\t\t\t}\n\t\t\t} else if ( isSimpleCssValue( fontSize.size ) ) {\n\t\t\t\thint = String( fontSize.size );\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tkey: fontSize.slug,\n\t\t\t\tname: fontSize.name || fontSize.slug,\n\t\t\t\tvalue: fontSize.size,\n\t\t\t\thint,\n\t\t\t};\n\t\t} ),\n\t\t...( disableCustomFontSizes ? [] : [ CUSTOM_OPTION ] ),\n\t];\n\n\tconst selectedOption = value\n\t\t? options.find( ( option ) => option.value === value ) ?? CUSTOM_OPTION\n\t\t: DEFAULT_OPTION;\n\n\treturn (\n\t\t<CustomSelectControl\n\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t__shouldNotWarnDeprecated36pxSize\n\t\t\tclassName=\"components-font-size-picker__select\"\n\t\t\tlabel={ __( 'Font size' ) }\n\t\t\thideLabelFromVision\n\t\t\tdescribedBy={ sprintf(\n\t\t\t\t// translators: %s: Currently selected font size.\n\t\t\t\t__( 'Currently selected font size: %s' ),\n\t\t\t\tselectedOption.name\n\t\t\t) }\n\t\t\toptions={ options }\n\t\t\tvalue={ selectedOption }\n\t\t\tshowSelectedHint\n\t\t\tonChange={ ( {\n\t\t\t\tselectedItem,\n\t\t\t}: {\n\t\t\t\tselectedItem: FontSizePickerSelectOption;\n\t\t\t} ) => {\n\t\t\t\tif ( selectedItem === CUSTOM_OPTION ) {\n\t\t\t\t\tonSelectCustom();\n\t\t\t\t} else {\n\t\t\t\t\tonChange( selectedItem.value );\n\t\t\t\t}\n\t\t\t} }\n\t\t\tsize={ size }\n\t\t/>\n\t);\n};\n\nexport default FontSizePickerSelect;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * List of T-shirt abbreviations.\n *\n * When there are 5 font sizes or fewer, we assume that the font sizes are\n * ordered by size and show T-shirt labels.\n */\nexport const T_SHIRT_ABBREVIATIONS = [\n\t/* translators: S stands for 'small' and is a size label. */\n\t__( 'S' ),\n\t/* translators: M stands for 'medium' and is a size label. */\n\t__( 'M' ),\n\t/* translators: L stands for 'large' and is a size label. */\n\t__( 'L' ),\n\t/* translators: XL stands for 'extra large' and is a size label. */\n\t__( 'XL' ),\n\t/* translators: XXL stands for 'extra extra large' and is a size label. */\n\t__( 'XXL' ),\n];\n\n/**\n * List of T-shirt names.\n *\n * When there are 5 font sizes or fewer, we assume that the font sizes are\n * ordered by size and show T-shirt labels.\n */\nexport const T_SHIRT_NAMES = [\n\t__( 'Small' ),\n\t__( 'Medium' ),\n\t__( 'Large' ),\n\t__( 'Extra Large' ),\n\t__( 'Extra Extra Large' ),\n];\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport {\n\tToggleGroupControl,\n\tToggleGroupControlOption,\n} from '../toggle-group-control';\nimport { T_SHIRT_ABBREVIATIONS, T_SHIRT_NAMES } from './constants';\nimport type { FontSizePickerToggleGroupProps } from './types';\n\nconst FontSizePickerToggleGroup = ( props: FontSizePickerToggleGroupProps ) => {\n\tconst { fontSizes, value, __next40pxDefaultSize, size, onChange } = props;\n\treturn (\n\t\t<ToggleGroupControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t__shouldNotWarnDeprecated36pxSize\n\t\t\tlabel={ __( 'Font size' ) }\n\t\t\thideLabelFromVision\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t\tisBlock\n\t\t\tsize={ size }\n\t\t>\n\t\t\t{ fontSizes.map( ( fontSize, index ) => (\n\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\tkey={ fontSize.slug }\n\t\t\t\t\tvalue={ fontSize.size }\n\t\t\t\t\tlabel={ T_SHIRT_ABBREVIATIONS[ index ] }\n\t\t\t\t\taria-label={ fontSize.name || T_SHIRT_NAMES[ index ] }\n\t\t\t\t\tshowTooltip\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</ToggleGroupControl>\n\t);\n};\n\nexport default FontSizePickerToggleGroup;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { settings } from '@wordpress/icons';\nimport { useState, useMemo, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { Button } from '../button';\nimport RangeControl from '../range-control';\nimport { Flex, FlexItem } from '../flex';\nimport {\n\tdefault as UnitControl,\n\tparseQuantityAndUnitFromRawValue,\n\tuseCustomUnits,\n} from '../unit-control';\nimport { VisuallyHidden } from '../visually-hidden';\nimport { getCommonSizeUnit } from './utils';\nimport type { FontSizePickerProps } from './types';\nimport {\n\tContainer,\n\tHeader,\n\tHeaderHint,\n\tHeaderLabel,\n\tHeaderToggle,\n} from './styles';\nimport { Spacer } from '../spacer';\nimport FontSizePickerSelect from './font-size-picker-select';\nimport FontSizePickerToggleGroup from './font-size-picker-toggle-group';\nimport { T_SHIRT_NAMES } from './constants';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\n\nconst DEFAULT_UNITS = [ 'px', 'em', 'rem', 'vw', 'vh' ];\n\nconst MAX_TOGGLE_GROUP_SIZES = 5;\n\nconst UnforwardedFontSizePicker = (\n\tprops: FontSizePickerProps,\n\tref: ForwardedRef< any >\n) => {\n\tconst {\n\t\t__next40pxDefaultSize = false,\n\t\tfallbackFontSize,\n\t\tfontSizes = [],\n\t\tdisableCustomFontSizes = false,\n\t\tonChange,\n\t\tsize = 'default',\n\t\tunits: unitsProp = DEFAULT_UNITS,\n\t\tvalue,\n\t\twithSlider = false,\n\t\twithReset = true,\n\t} = props;\n\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: unitsProp,\n\t} );\n\n\tconst selectedFontSize = fontSizes.find(\n\t\t( fontSize ) => fontSize.size === value\n\t);\n\tconst isCustomValue = !! value && ! selectedFontSize;\n\n\t// Initially request a custom picker if the value is not from the predef list.\n\tconst [ userRequestedCustom, setUserRequestedCustom ] =\n\t\tuseState( isCustomValue );\n\n\tlet currentPickerType;\n\tif ( ! disableCustomFontSizes && userRequestedCustom ) {\n\t\t// While showing the custom value picker, switch back to predef only if\n\t\t// `disableCustomFontSizes` is set to `true`.\n\t\tcurrentPickerType = 'custom' as const;\n\t} else {\n\t\tcurrentPickerType =\n\t\t\tfontSizes.length > MAX_TOGGLE_GROUP_SIZES\n\t\t\t\t? ( 'select' as const )\n\t\t\t\t: ( 'togglegroup' as const );\n\t}\n\n\tconst headerHint = useMemo( () => {\n\t\tswitch ( currentPickerType ) {\n\t\t\tcase 'custom':\n\t\t\t\treturn __( 'Custom' );\n\t\t\tcase 'togglegroup':\n\t\t\t\tif ( selectedFontSize ) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\tselectedFontSize.name ||\n\t\t\t\t\t\tT_SHIRT_NAMES[ fontSizes.indexOf( selectedFontSize ) ]\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'select':\n\t\t\t\tconst commonUnit = getCommonSizeUnit( fontSizes );\n\t\t\t\tif ( commonUnit ) {\n\t\t\t\t\treturn `(${ commonUnit })`;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn '';\n\t}, [ currentPickerType, selectedFontSize, fontSizes ] );\n\n\tif ( fontSizes.length === 0 && disableCustomFontSizes ) {\n\t\treturn null;\n\t}\n\n\t// If neither the value or first font size is a string, then FontSizePicker\n\t// operates in a legacy \"unitless\" mode where UnitControl can only be used\n\t// to select px values and onChange() is always called with number values.\n\tconst hasUnits =\n\t\ttypeof value === 'string' || typeof fontSizes[ 0 ]?.size === 'string';\n\n\tconst [ valueQuantity, valueUnit ] = parseQuantityAndUnitFromRawValue(\n\t\tvalue,\n\t\tunits\n\t);\n\tconst isValueUnitRelative =\n\t\t!! valueUnit && [ 'em', 'rem', 'vw', 'vh' ].includes( valueUnit );\n\tconst isDisabled = value === undefined;\n\n\tmaybeWarnDeprecated36pxSize( {\n\t\tcomponentName: 'FontSizePicker',\n\t\t__next40pxDefaultSize,\n\t\tsize,\n\t} );\n\n\treturn (\n\t\t<Container ref={ ref } className=\"components-font-size-picker\">\n\t\t\t<VisuallyHidden as=\"legend\">{ __( 'Font size' ) }</VisuallyHidden>\n\t\t\t<Spacer>\n\t\t\t\t<Header className=\"components-font-size-picker__header\">\n\t\t\t\t\t<HeaderLabel\n\t\t\t\t\t\taria-label={ `${ __( 'Size' ) } ${ headerHint || '' }` }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Size' ) }\n\t\t\t\t\t\t{ headerHint && (\n\t\t\t\t\t\t\t<HeaderHint className=\"components-font-size-picker__header__hint\">\n\t\t\t\t\t\t\t\t{ headerHint }\n\t\t\t\t\t\t\t</HeaderHint>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</HeaderLabel>\n\t\t\t\t\t{ ! disableCustomFontSizes && (\n\t\t\t\t\t\t<HeaderToggle\n\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\tcurrentPickerType === 'custom'\n\t\t\t\t\t\t\t\t\t? __( 'Use size preset' )\n\t\t\t\t\t\t\t\t\t: __( 'Set custom size' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ticon={ settings }\n\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\tsetUserRequestedCustom( ! userRequestedCustom )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tisPressed={ currentPickerType === 'custom' }\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Header>\n\t\t\t</Spacer>\n\t\t\t<div>\n\t\t\t\t{ currentPickerType === 'select' && (\n\t\t\t\t\t<FontSizePickerSelect\n\t\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\t\tfontSizes={ fontSizes }\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\tdisableCustomFontSizes={ disableCustomFontSizes }\n\t\t\t\t\t\tsize={ size }\n\t\t\t\t\t\tonChange={ ( newValue ) => {\n\t\t\t\t\t\t\tif ( newValue === undefined ) {\n\t\t\t\t\t\t\t\tonChange?.( undefined );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tonChange?.(\n\t\t\t\t\t\t\t\t\thasUnits ? newValue : Number( newValue ),\n\t\t\t\t\t\t\t\t\tfontSizes.find(\n\t\t\t\t\t\t\t\t\t\t( fontSize ) =>\n\t\t\t\t\t\t\t\t\t\t\tfontSize.size === newValue\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonSelectCustom={ () => setUserRequestedCustom( true ) }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ currentPickerType === 'togglegroup' && (\n\t\t\t\t\t<FontSizePickerToggleGroup\n\t\t\t\t\t\tfontSizes={ fontSizes }\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\t\tsize={ size }\n\t\t\t\t\t\tonChange={ ( newValue ) => {\n\t\t\t\t\t\t\tif ( newValue === undefined ) {\n\t\t\t\t\t\t\t\tonChange?.( undefined );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tonChange?.(\n\t\t\t\t\t\t\t\t\thasUnits ? newValue : Number( newValue ),\n\t\t\t\t\t\t\t\t\tfontSizes.find(\n\t\t\t\t\t\t\t\t\t\t( fontSize ) =>\n\t\t\t\t\t\t\t\t\t\t\tfontSize.size === newValue\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ currentPickerType === 'custom' && (\n\t\t\t\t\t<Flex className=\"components-font-size-picker__custom-size-control\">\n\t\t\t\t\t\t<FlexItem isBlock>\n\t\t\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\t\t\t\t__shouldNotWarnDeprecated36pxSize\n\t\t\t\t\t\t\t\tlabel={ __( 'Custom' ) }\n\t\t\t\t\t\t\t\tlabelPosition=\"top\"\n\t\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\t\tonChange={ ( newValue ) => {\n\t\t\t\t\t\t\t\t\tsetUserRequestedCustom( true );\n\n\t\t\t\t\t\t\t\t\tif ( newValue === undefined ) {\n\t\t\t\t\t\t\t\t\t\tonChange?.( undefined );\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tonChange?.(\n\t\t\t\t\t\t\t\t\t\t\thasUnits\n\t\t\t\t\t\t\t\t\t\t\t\t? newValue\n\t\t\t\t\t\t\t\t\t\t\t\t: parseInt( newValue, 10 )\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tsize={ size }\n\t\t\t\t\t\t\t\tunits={ hasUnits ? units : [] }\n\t\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t{ withSlider && (\n\t\t\t\t\t\t\t<FlexItem isBlock>\n\t\t\t\t\t\t\t\t<Spacer marginX={ 2 } marginBottom={ 0 }>\n\t\t\t\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\t\t__next40pxDefaultSize={\n\t\t\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t__shouldNotWarnDeprecated36pxSize\n\t\t\t\t\t\t\t\t\t\tclassName=\"components-font-size-picker__custom-input\"\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Custom Size' ) }\n\t\t\t\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\t\t\t\tvalue={ valueQuantity }\n\t\t\t\t\t\t\t\t\t\tinitialPosition={ fallbackFontSize }\n\t\t\t\t\t\t\t\t\t\twithInputField={ false }\n\t\t\t\t\t\t\t\t\t\tonChange={ ( newValue ) => {\n\t\t\t\t\t\t\t\t\t\t\tsetUserRequestedCustom( true );\n\n\t\t\t\t\t\t\t\t\t\t\tif ( newValue === undefined ) {\n\t\t\t\t\t\t\t\t\t\t\t\tonChange?.( undefined );\n\t\t\t\t\t\t\t\t\t\t\t} else if ( hasUnits ) {\n\t\t\t\t\t\t\t\t\t\t\t\tonChange?.(\n\t\t\t\t\t\t\t\t\t\t\t\t\tnewValue +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t( valueUnit ?? 'px' )\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tonChange?.( newValue );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\t\t\t\tmax={ isValueUnitRelative ? 10 : 100 }\n\t\t\t\t\t\t\t\t\t\tstep={ isValueUnitRelative ? 0.1 : 1 }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</Spacer>\n\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ withReset && (\n\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tdisabled={ isDisabled }\n\t\t\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\tonChange?.( undefined );\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\tsize={\n\t\t\t\t\t\t\t\t\t\tsize === '__unstable-large' ||\n\t\t\t\t\t\t\t\t\t\tprops.__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\t\t\t? 'default'\n\t\t\t\t\t\t\t\t\t\t\t: 'small'\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Reset' ) }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Flex>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</Container>\n\t);\n};\n\nexport const FontSizePicker = forwardRef( UnforwardedFontSizePicker );\n\nexport default FontSizePicker;\n","/**\n * WordPress dependencies\n */\nimport { useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport type { WordPressComponentProps } from '../context';\nimport type { FormFileUploadProps } from './types';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\n\n/**\n * FormFileUpload allows users to select files from their local device.\n *\n * ```jsx\n * import { FormFileUpload } from '@wordpress/components';\n *\n * const MyFormFileUpload = () => (\n * <FormFileUpload\n * __next40pxDefaultSize\n * accept=\"image/*\"\n * onChange={ ( event ) => console.log( event.currentTarget.files ) }\n * >\n * Upload\n * </FormFileUpload>\n * );\n * ```\n */\nexport function FormFileUpload( {\n\taccept,\n\tchildren,\n\tmultiple = false,\n\tonChange,\n\tonClick,\n\trender,\n\t...props\n}: WordPressComponentProps< FormFileUploadProps, 'button', false > ) {\n\tconst ref = useRef< HTMLInputElement >( null );\n\tconst openFileDialog = () => {\n\t\tref.current?.click();\n\t};\n\n\tif ( ! render ) {\n\t\tmaybeWarnDeprecated36pxSize( {\n\t\t\tcomponentName: 'FormFileUpload',\n\t\t\t__next40pxDefaultSize: props.__next40pxDefaultSize,\n\t\t\t// @ts-expect-error - We don't \"officially\" support all Button props but this likely happens.\n\t\t\tsize: props.size,\n\t\t} );\n\t}\n\n\tconst ui = render ? (\n\t\trender( { openFileDialog } )\n\t) : (\n\t\t<Button onClick={ openFileDialog } { ...props }>\n\t\t\t{ children }\n\t\t</Button>\n\t);\n\t// @todo: Temporary fix a bug that prevents Chromium browsers from selecting \".heic\" files\n\t// from the file upload. See https://core.trac.wordpress.org/ticket/62268#comment:4.\n\t// This can be removed once the Chromium fix is in the stable channel.\n\t// Prevent Safari from adding \"image/heic\" and \"image/heif\" to the accept attribute.\n\tconst isSafari =\n\t\tglobalThis.window?.navigator.userAgent.includes( 'Safari' ) &&\n\t\t! globalThis.window?.navigator.userAgent.includes( 'Chrome' ) &&\n\t\t! globalThis.window?.navigator.userAgent.includes( 'Chromium' );\n\tconst compatAccept =\n\t\t! isSafari && !! accept?.includes( 'image/*' )\n\t\t\t? `${ accept }, image/heic, image/heif`\n\t\t\t: accept;\n\n\treturn (\n\t\t<div className=\"components-form-file-upload\">\n\t\t\t{ ui }\n\t\t\t<input\n\t\t\t\ttype=\"file\"\n\t\t\t\tref={ ref }\n\t\t\t\tmultiple={ multiple }\n\t\t\t\tstyle={ { display: 'none' } }\n\t\t\t\taccept={ compatAccept }\n\t\t\t\tonChange={ onChange }\n\t\t\t\tonClick={ onClick }\n\t\t\t\tdata-testid=\"form-file-upload-input\"\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\nexport default FormFileUpload;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { FormToggleProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nexport const noop = () => {};\n\nfunction UnforwardedFormToggle(\n\tprops: WordPressComponentProps< FormToggleProps, 'input', false >,\n\tref: ForwardedRef< HTMLInputElement >\n) {\n\tconst {\n\t\tclassName,\n\t\tchecked,\n\t\tid,\n\t\tdisabled,\n\t\tonChange = noop,\n\t\t...additionalProps\n\t} = props;\n\tconst wrapperClasses = clsx( 'components-form-toggle', className, {\n\t\t'is-checked': checked,\n\t\t'is-disabled': disabled,\n\t} );\n\n\treturn (\n\t\t<span className={ wrapperClasses }>\n\t\t\t<input\n\t\t\t\tclassName=\"components-form-toggle__input\"\n\t\t\t\tid={ id }\n\t\t\t\ttype=\"checkbox\"\n\t\t\t\tchecked={ checked }\n\t\t\t\tonChange={ onChange }\n\t\t\t\tdisabled={ disabled }\n\t\t\t\t{ ...additionalProps }\n\t\t\t\tref={ ref }\n\t\t\t/>\n\t\t\t<span className=\"components-form-toggle__track\"></span>\n\t\t\t<span className=\"components-form-toggle__thumb\"></span>\n\t\t</span>\n\t);\n}\n\n/**\n * FormToggle switches a single setting on or off.\n *\n * ```jsx\n * import { FormToggle } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyFormToggle = () => {\n * const [ isChecked, setChecked ] = useState( true );\n *\n * return (\n * <FormToggle\n * checked={ isChecked }\n * onChange={ () => setChecked( ( state ) => ! state ) }\n * />\n * );\n * };\n * ```\n */\nexport const FormToggle = forwardRef( UnforwardedFormToggle );\n\nexport default FormToggle;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { closeSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { VisuallyHidden } from '../visually-hidden';\nimport type { TokenProps } from './types';\n\nconst noop = () => {};\n\nexport default function Token( {\n\tvalue,\n\tstatus,\n\ttitle,\n\tdisplayTransform,\n\tisBorderless = false,\n\tdisabled = false,\n\tonClickRemove = noop,\n\tonMouseEnter,\n\tonMouseLeave,\n\tmessages,\n\ttermPosition,\n\ttermsCount,\n}: TokenProps ) {\n\tconst instanceId = useInstanceId( Token );\n\tconst tokenClasses = clsx( 'components-form-token-field__token', {\n\t\t'is-error': 'error' === status,\n\t\t'is-success': 'success' === status,\n\t\t'is-validating': 'validating' === status,\n\t\t'is-borderless': isBorderless,\n\t\t'is-disabled': disabled,\n\t} );\n\n\tconst onClick = () => onClickRemove( { value } );\n\n\tconst transformedValue = displayTransform( value );\n\tconst termPositionAndCount = sprintf(\n\t\t/* translators: 1: term name, 2: term position in a set of terms, 3: total term set count. */\n\t\t__( '%1$s (%2$s of %3$s)' ),\n\t\ttransformedValue,\n\t\ttermPosition,\n\t\ttermsCount\n\t);\n\n\treturn (\n\t\t<span\n\t\t\tclassName={ tokenClasses }\n\t\t\tonMouseEnter={ onMouseEnter }\n\t\t\tonMouseLeave={ onMouseLeave }\n\t\t\ttitle={ title }\n\t\t>\n\t\t\t<span\n\t\t\t\tclassName=\"components-form-token-field__token-text\"\n\t\t\t\tid={ `components-form-token-field__token-text-${ instanceId }` }\n\t\t\t>\n\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t{ termPositionAndCount }\n\t\t\t\t</VisuallyHidden>\n\t\t\t\t<span aria-hidden=\"true\">{ transformedValue }</span>\n\t\t\t</span>\n\n\t\t\t<Button\n\t\t\t\tclassName=\"components-form-token-field__remove-token\"\n\t\t\t\tsize=\"small\"\n\t\t\t\ticon={ closeSmall }\n\t\t\t\tonClick={ ! disabled ? onClick : undefined }\n\t\t\t\t// Disable reason: Even when FormTokenField itself is accessibly disabled, token reset buttons shouldn't be in the tab sequence.\n\t\t\t\t// eslint-disable-next-line no-restricted-syntax\n\t\t\t\tdisabled={ disabled }\n\t\t\t\tlabel={ messages.remove }\n\t\t\t\taria-describedby={ `components-form-token-field__token-text-${ instanceId }` }\n\t\t\t/>\n\t\t</span>\n\t);\n}\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { Flex } from '../flex';\nimport { space } from '../utils/space';\nimport { boxSizingReset } from '../utils';\n\ntype TokensAndInputWrapperProps = {\n\t__next40pxDefaultSize: boolean;\n\thasTokens: boolean;\n};\n\nconst deprecatedPaddings = ( {\n\t__next40pxDefaultSize,\n\thasTokens,\n}: TokensAndInputWrapperProps ) =>\n\t! __next40pxDefaultSize &&\n\tcss`\n\t\tpadding-top: ${ space( hasTokens ? 1 : 0.5 ) };\n\t\tpadding-bottom: ${ space( hasTokens ? 1 : 0.5 ) };\n\t`;\n\nexport const TokensAndInputWrapperFlex = styled( Flex )`\n\tpadding: 7px;\n\t${ boxSizingReset }\n\n\t${ deprecatedPaddings }\n`;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { KeyboardEvent, MouseEvent, TouchEvent, FocusEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useEffect, useRef, useState } from '@wordpress/element';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { useDebounce, useInstanceId, usePrevious } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\nimport isShallowEqual from '@wordpress/is-shallow-equal';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport Token from './token';\nimport TokenInput from './token-input';\nimport { TokensAndInputWrapperFlex } from './styles';\nimport SuggestionsList from './suggestions-list';\nimport type { FormTokenFieldProps, TokenItem } from './types';\nimport { FlexItem } from '../flex';\nimport {\n\tStyledHelp,\n\tStyledLabel,\n} from '../base-control/styles/base-control-styles';\nimport { Spacer } from '../spacer';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\n\nconst identity = ( value: string ) => value;\n\n/**\n * A `FormTokenField` is a field similar to the tags and categories fields in the interim editor chrome,\n * or the \"to\" field in Mail on OS X. Tokens can be entered by typing them or selecting them from a list of suggested tokens.\n *\n * Up to one hundred suggestions that match what the user has typed so far will be shown from which the user can pick from (auto-complete).\n * Tokens are separated by the \",\" character. Suggestions can be selected with the up or down arrows and added with the tab or enter key.\n *\n * The `value` property is handled in a manner similar to controlled form components.\n * See [Forms](https://react.dev/reference/react-dom/components#form-components) in the React Documentation for more information.\n */\nexport function FormTokenField( props: FormTokenFieldProps ) {\n\tconst {\n\t\tautoCapitalize,\n\t\tautoComplete,\n\t\tmaxLength,\n\t\tplaceholder,\n\t\tlabel = __( 'Add item' ),\n\t\tclassName,\n\t\tsuggestions = [],\n\t\tmaxSuggestions = 100,\n\t\tvalue = [],\n\t\tdisplayTransform = identity,\n\t\tsaveTransform = ( token ) => token.trim(),\n\t\tonChange = () => {},\n\t\tonInputChange = () => {},\n\t\tonFocus = undefined,\n\t\tisBorderless = false,\n\t\tdisabled = false,\n\t\ttokenizeOnSpace = false,\n\t\tmessages = {\n\t\t\tadded: __( 'Item added.' ),\n\t\t\tremoved: __( 'Item removed.' ),\n\t\t\tremove: __( 'Remove item' ),\n\t\t\t__experimentalInvalid: __( 'Invalid item' ),\n\t\t},\n\t\t__experimentalRenderItem,\n\t\t__experimentalExpandOnFocus = false,\n\t\t__experimentalValidateInput = () => true,\n\t\t__experimentalShowHowTo = true,\n\t\t__next40pxDefaultSize = false,\n\t\t__experimentalAutoSelectFirstMatch = false,\n\t\t__nextHasNoMarginBottom = false,\n\t\ttokenizeOnBlur = false,\n\t} = useDeprecated36pxDefaultSizeProp< FormTokenFieldProps >( props );\n\n\tif ( ! __nextHasNoMarginBottom ) {\n\t\tdeprecated( 'Bottom margin styles for wp.components.FormTokenField', {\n\t\t\tsince: '6.7',\n\t\t\tversion: '7.0',\n\t\t\thint: 'Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version.',\n\t\t} );\n\t}\n\n\tmaybeWarnDeprecated36pxSize( {\n\t\tcomponentName: 'FormTokenField',\n\t\tsize: undefined,\n\t\t__next40pxDefaultSize,\n\t} );\n\n\tconst instanceId = useInstanceId( FormTokenField );\n\n\t// We reset to these initial values again in the onBlur\n\tconst [ incompleteTokenValue, setIncompleteTokenValue ] = useState( '' );\n\tconst [ inputOffsetFromEnd, setInputOffsetFromEnd ] = useState( 0 );\n\tconst [ isActive, setIsActive ] = useState( false );\n\tconst [ isExpanded, setIsExpanded ] = useState( false );\n\tconst [ selectedSuggestionIndex, setSelectedSuggestionIndex ] =\n\t\tuseState( -1 );\n\tconst [ selectedSuggestionScroll, setSelectedSuggestionScroll ] =\n\t\tuseState( false );\n\n\tconst prevSuggestions = usePrevious< string[] >( suggestions );\n\tconst prevValue = usePrevious< ( string | TokenItem )[] >( value );\n\n\tconst input = useRef< HTMLInputElement >( null );\n\tconst tokensAndInput = useRef< HTMLInputElement >( null );\n\n\tconst debouncedSpeak = useDebounce( speak, 500 );\n\n\tuseEffect( () => {\n\t\t// Make sure to focus the input when the isActive state is true.\n\t\tif ( isActive && ! hasFocus() ) {\n\t\t\tfocus();\n\t\t}\n\t}, [ isActive ] );\n\n\tuseEffect( () => {\n\t\tconst suggestionsDidUpdate = ! isShallowEqual(\n\t\t\tsuggestions,\n\t\t\tprevSuggestions || []\n\t\t);\n\n\t\tif ( suggestionsDidUpdate || value !== prevValue ) {\n\t\t\tupdateSuggestions( suggestionsDidUpdate );\n\t\t}\n\n\t\t// TODO: updateSuggestions() should first be refactored so its actual deps are clearer.\n\t}, [ suggestions, prevSuggestions, value, prevValue ] );\n\n\tuseEffect( () => {\n\t\tupdateSuggestions();\n\t}, [ incompleteTokenValue ] );\n\n\tuseEffect( () => {\n\t\tupdateSuggestions();\n\t}, [ __experimentalAutoSelectFirstMatch ] );\n\n\tif ( disabled && isActive ) {\n\t\tsetIsActive( false );\n\t\tsetIncompleteTokenValue( '' );\n\t}\n\n\tfunction focus() {\n\t\tinput.current?.focus();\n\t}\n\n\tfunction hasFocus() {\n\t\treturn input.current === input.current?.ownerDocument.activeElement;\n\t}\n\n\tfunction onFocusHandler( event: FocusEvent ) {\n\t\t// If focus is on the input or on the container, set the isActive state to true.\n\t\tif ( hasFocus() || event.target === tokensAndInput.current ) {\n\t\t\tsetIsActive( true );\n\t\t\tsetIsExpanded( __experimentalExpandOnFocus || isExpanded );\n\t\t} else {\n\t\t\t/*\n\t\t\t * Otherwise, focus is on one of the token \"remove\" buttons and we\n\t\t\t * set the isActive state to false to prevent the input to be\n\t\t\t * re-focused, see componentDidUpdate().\n\t\t\t */\n\t\t\tsetIsActive( false );\n\t\t}\n\n\t\tif ( 'function' === typeof onFocus ) {\n\t\t\tonFocus( event );\n\t\t}\n\t}\n\n\tfunction onBlur( event: FocusEvent ) {\n\t\tif (\n\t\t\tinputHasValidValue() &&\n\t\t\t__experimentalValidateInput( incompleteTokenValue )\n\t\t) {\n\t\t\tsetIsActive( false );\n\t\t\tif ( tokenizeOnBlur && inputHasValidValue() ) {\n\t\t\t\taddNewToken( incompleteTokenValue );\n\t\t\t}\n\t\t} else {\n\t\t\t// Reset to initial state\n\t\t\tsetIncompleteTokenValue( '' );\n\t\t\tsetInputOffsetFromEnd( 0 );\n\t\t\tsetIsActive( false );\n\n\t\t\tif ( __experimentalExpandOnFocus ) {\n\t\t\t\t// If `__experimentalExpandOnFocus` is true, don't close the suggestions list when\n\t\t\t\t// the user clicks on it (`tokensAndInput` will be the element that caused the blur).\n\t\t\t\tconst hasFocusWithin =\n\t\t\t\t\tevent.relatedTarget === tokensAndInput.current;\n\t\t\t\tsetIsExpanded( hasFocusWithin );\n\t\t\t} else {\n\t\t\t\t// Else collapse the suggestion list. This will result in the suggestion list closing\n\t\t\t\t// after a suggestion has been submitted since that causes a blur.\n\t\t\t\tsetIsExpanded( false );\n\t\t\t}\n\n\t\t\tsetSelectedSuggestionIndex( -1 );\n\t\t\tsetSelectedSuggestionScroll( false );\n\t\t}\n\t}\n\n\tfunction onKeyDown( event: KeyboardEvent ) {\n\t\tlet preventDefault = false;\n\n\t\tif ( event.defaultPrevented ) {\n\t\t\treturn;\n\t\t}\n\t\tswitch ( event.key ) {\n\t\t\tcase 'Backspace':\n\t\t\t\tpreventDefault = handleDeleteKey( deleteTokenBeforeInput );\n\t\t\t\tbreak;\n\t\t\tcase 'Enter':\n\t\t\t\tpreventDefault = addCurrentToken();\n\t\t\t\tbreak;\n\t\t\tcase 'ArrowLeft':\n\t\t\t\tpreventDefault = handleLeftArrowKey();\n\t\t\t\tbreak;\n\t\t\tcase 'ArrowUp':\n\t\t\t\tpreventDefault = handleUpArrowKey();\n\t\t\t\tbreak;\n\t\t\tcase 'ArrowRight':\n\t\t\t\tpreventDefault = handleRightArrowKey();\n\t\t\t\tbreak;\n\t\t\tcase 'ArrowDown':\n\t\t\t\tpreventDefault = handleDownArrowKey();\n\t\t\t\tbreak;\n\t\t\tcase 'Delete':\n\t\t\t\tpreventDefault = handleDeleteKey( deleteTokenAfterInput );\n\t\t\t\tbreak;\n\t\t\tcase 'Space':\n\t\t\t\tif ( tokenizeOnSpace ) {\n\t\t\t\t\tpreventDefault = addCurrentToken();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'Escape':\n\t\t\t\tpreventDefault = handleEscapeKey( event );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif ( preventDefault ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n\n\tfunction onKeyPress( event: KeyboardEvent ) {\n\t\tlet preventDefault = false;\n\n\t\tswitch ( event.key ) {\n\t\t\tcase ',':\n\t\t\t\tpreventDefault = handleCommaKey();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif ( preventDefault ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n\n\tfunction onContainerTouched( event: MouseEvent | TouchEvent ) {\n\t\t// Prevent clicking/touching the tokensAndInput container from blurring\n\t\t// the input and adding the current token.\n\t\tif ( event.target === tokensAndInput.current && isActive ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n\n\tfunction onTokenClickRemove( event: { value: string } ) {\n\t\tdeleteToken( event.value );\n\t\tfocus();\n\t}\n\n\tfunction onSuggestionHovered( suggestion: string ) {\n\t\tconst index = getMatchingSuggestions().indexOf( suggestion );\n\n\t\tif ( index >= 0 ) {\n\t\t\tsetSelectedSuggestionIndex( index );\n\t\t\tsetSelectedSuggestionScroll( false );\n\t\t}\n\t}\n\n\tfunction onSuggestionSelected( suggestion: string ) {\n\t\taddNewToken( suggestion );\n\t}\n\n\tfunction onInputChangeHandler( event: { value: string } ) {\n\t\tconst text = event.value;\n\t\tconst separator = tokenizeOnSpace ? /[ ,\\t]+/ : /[,\\t]+/;\n\t\tconst items = text.split( separator );\n\t\tconst tokenValue = items[ items.length - 1 ] || '';\n\n\t\tif ( items.length > 1 ) {\n\t\t\taddNewTokens( items.slice( 0, -1 ) );\n\t\t}\n\t\tsetIncompleteTokenValue( tokenValue );\n\t\tonInputChange( tokenValue );\n\t}\n\n\tfunction handleDeleteKey( _deleteToken: () => void ) {\n\t\tlet preventDefault = false;\n\t\tif ( hasFocus() && isInputEmpty() ) {\n\t\t\t_deleteToken();\n\t\t\tpreventDefault = true;\n\t\t}\n\n\t\treturn preventDefault;\n\t}\n\n\tfunction handleLeftArrowKey() {\n\t\tlet preventDefault = false;\n\t\tif ( isInputEmpty() ) {\n\t\t\tmoveInputBeforePreviousToken();\n\t\t\tpreventDefault = true;\n\t\t}\n\n\t\treturn preventDefault;\n\t}\n\n\tfunction handleRightArrowKey() {\n\t\tlet preventDefault = false;\n\t\tif ( isInputEmpty() ) {\n\t\t\tmoveInputAfterNextToken();\n\t\t\tpreventDefault = true;\n\t\t}\n\n\t\treturn preventDefault;\n\t}\n\n\tfunction handleUpArrowKey() {\n\t\tsetSelectedSuggestionIndex( ( index ) => {\n\t\t\treturn (\n\t\t\t\t( index === 0\n\t\t\t\t\t? getMatchingSuggestions(\n\t\t\t\t\t\t\tincompleteTokenValue,\n\t\t\t\t\t\t\tsuggestions,\n\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\tmaxSuggestions,\n\t\t\t\t\t\t\tsaveTransform\n\t\t\t\t\t ).length\n\t\t\t\t\t: index ) - 1\n\t\t\t);\n\t\t} );\n\t\tsetSelectedSuggestionScroll( true );\n\n\t\treturn true; // PreventDefault.\n\t}\n\n\tfunction handleDownArrowKey() {\n\t\tsetSelectedSuggestionIndex( ( index ) => {\n\t\t\treturn (\n\t\t\t\t( index + 1 ) %\n\t\t\t\tgetMatchingSuggestions(\n\t\t\t\t\tincompleteTokenValue,\n\t\t\t\t\tsuggestions,\n\t\t\t\t\tvalue,\n\t\t\t\t\tmaxSuggestions,\n\t\t\t\t\tsaveTransform\n\t\t\t\t).length\n\t\t\t);\n\t\t} );\n\n\t\tsetSelectedSuggestionScroll( true );\n\t\treturn true; // PreventDefault.\n\t}\n\n\tfunction handleEscapeKey( event: KeyboardEvent ) {\n\t\tif ( event.target instanceof HTMLInputElement ) {\n\t\t\tsetIncompleteTokenValue( event.target.value );\n\t\t\tsetIsExpanded( false );\n\t\t\tsetSelectedSuggestionIndex( -1 );\n\t\t\tsetSelectedSuggestionScroll( false );\n\t\t}\n\n\t\treturn true; // PreventDefault.\n\t}\n\n\tfunction handleCommaKey() {\n\t\tif ( inputHasValidValue() ) {\n\t\t\taddNewToken( incompleteTokenValue );\n\t\t}\n\n\t\treturn true; // PreventDefault.\n\t}\n\n\tfunction moveInputToIndex( index: number ) {\n\t\tsetInputOffsetFromEnd( value.length - Math.max( index, -1 ) - 1 );\n\t}\n\n\tfunction moveInputBeforePreviousToken() {\n\t\tsetInputOffsetFromEnd( ( prevInputOffsetFromEnd ) => {\n\t\t\treturn Math.min( prevInputOffsetFromEnd + 1, value.length );\n\t\t} );\n\t}\n\n\tfunction moveInputAfterNextToken() {\n\t\tsetInputOffsetFromEnd( ( prevInputOffsetFromEnd ) => {\n\t\t\treturn Math.max( prevInputOffsetFromEnd - 1, 0 );\n\t\t} );\n\t}\n\n\tfunction deleteTokenBeforeInput() {\n\t\tconst index = getIndexOfInput() - 1;\n\n\t\tif ( index > -1 ) {\n\t\t\tdeleteToken( value[ index ] );\n\t\t}\n\t}\n\n\tfunction deleteTokenAfterInput() {\n\t\tconst index = getIndexOfInput();\n\n\t\tif ( index < value.length ) {\n\t\t\tdeleteToken( value[ index ] );\n\t\t\t// Update input offset since it's the offset from the last token.\n\t\t\tmoveInputToIndex( index );\n\t\t}\n\t}\n\n\tfunction addCurrentToken() {\n\t\tlet preventDefault = false;\n\t\tconst selectedSuggestion = getSelectedSuggestion();\n\n\t\tif ( selectedSuggestion ) {\n\t\t\taddNewToken( selectedSuggestion );\n\t\t\tpreventDefault = true;\n\t\t} else if ( inputHasValidValue() ) {\n\t\t\taddNewToken( incompleteTokenValue );\n\t\t\tpreventDefault = true;\n\t\t}\n\n\t\treturn preventDefault;\n\t}\n\n\tfunction addNewTokens( tokens: string[] ) {\n\t\tconst tokensToAdd = [\n\t\t\t...new Set(\n\t\t\t\ttokens\n\t\t\t\t\t.map( saveTransform )\n\t\t\t\t\t.filter( Boolean )\n\t\t\t\t\t.filter( ( token ) => ! valueContainsToken( token ) )\n\t\t\t),\n\t\t];\n\n\t\tif ( tokensToAdd.length > 0 ) {\n\t\t\tconst newValue = [ ...value ];\n\t\t\tnewValue.splice( getIndexOfInput(), 0, ...tokensToAdd );\n\t\t\tonChange( newValue );\n\t\t}\n\t}\n\n\tfunction addNewToken( token: string ) {\n\t\tif ( ! __experimentalValidateInput( token ) ) {\n\t\t\tspeak( messages.__experimentalInvalid, 'assertive' );\n\t\t\treturn;\n\t\t}\n\t\taddNewTokens( [ token ] );\n\t\tspeak( messages.added, 'assertive' );\n\n\t\tsetIncompleteTokenValue( '' );\n\t\tsetSelectedSuggestionIndex( -1 );\n\t\tsetSelectedSuggestionScroll( false );\n\t\tsetIsExpanded( ! __experimentalExpandOnFocus );\n\n\t\tif ( isActive && ! tokenizeOnBlur ) {\n\t\t\tfocus();\n\t\t}\n\t}\n\n\tfunction deleteToken( token: string | TokenItem ) {\n\t\tconst newTokens = value.filter( ( item ) => {\n\t\t\treturn getTokenValue( item ) !== getTokenValue( token );\n\t\t} );\n\t\tonChange( newTokens );\n\t\tspeak( messages.removed, 'assertive' );\n\t}\n\n\tfunction getTokenValue( token: { value: string } | string ) {\n\t\tif ( 'object' === typeof token ) {\n\t\t\treturn token.value;\n\t\t}\n\n\t\treturn token;\n\t}\n\n\tfunction getMatchingSuggestions(\n\t\tsearchValue = incompleteTokenValue,\n\t\t_suggestions = suggestions,\n\t\t_value = value,\n\t\t_maxSuggestions = maxSuggestions,\n\t\t_saveTransform = saveTransform\n\t) {\n\t\tlet match = _saveTransform( searchValue );\n\t\tconst startsWithMatch: string[] = [];\n\t\tconst containsMatch: string[] = [];\n\t\tconst normalizedValue = _value.map( ( item ) => {\n\t\t\tif ( typeof item === 'string' ) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t\treturn item.value;\n\t\t} );\n\n\t\tif ( match.length === 0 ) {\n\t\t\t_suggestions = _suggestions.filter(\n\t\t\t\t( suggestion ) => ! normalizedValue.includes( suggestion )\n\t\t\t);\n\t\t} else {\n\t\t\tmatch = match.toLocaleLowerCase();\n\n\t\t\t_suggestions.forEach( ( suggestion ) => {\n\t\t\t\tconst index = suggestion.toLocaleLowerCase().indexOf( match );\n\t\t\t\tif ( normalizedValue.indexOf( suggestion ) === -1 ) {\n\t\t\t\t\tif ( index === 0 ) {\n\t\t\t\t\t\tstartsWithMatch.push( suggestion );\n\t\t\t\t\t} else if ( index > 0 ) {\n\t\t\t\t\t\tcontainsMatch.push( suggestion );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t_suggestions = startsWithMatch.concat( containsMatch );\n\t\t}\n\n\t\treturn _suggestions.slice( 0, _maxSuggestions );\n\t}\n\n\tfunction getSelectedSuggestion() {\n\t\tif ( selectedSuggestionIndex !== -1 ) {\n\t\t\treturn getMatchingSuggestions()[ selectedSuggestionIndex ];\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tfunction valueContainsToken( token: string ) {\n\t\treturn value.some( ( item ) => {\n\t\t\treturn getTokenValue( token ) === getTokenValue( item );\n\t\t} );\n\t}\n\n\tfunction getIndexOfInput() {\n\t\treturn value.length - inputOffsetFromEnd;\n\t}\n\n\tfunction isInputEmpty() {\n\t\treturn incompleteTokenValue.length === 0;\n\t}\n\n\tfunction inputHasValidValue() {\n\t\treturn saveTransform( incompleteTokenValue ).length > 0;\n\t}\n\n\tfunction updateSuggestions( resetSelectedSuggestion = true ) {\n\t\tconst inputHasMinimumChars = incompleteTokenValue.trim().length > 1;\n\t\tconst matchingSuggestions =\n\t\t\tgetMatchingSuggestions( incompleteTokenValue );\n\t\tconst hasMatchingSuggestions = matchingSuggestions.length > 0;\n\n\t\tconst shouldExpandIfFocuses = hasFocus() && __experimentalExpandOnFocus;\n\t\tsetIsExpanded(\n\t\t\tshouldExpandIfFocuses ||\n\t\t\t\t( inputHasMinimumChars && hasMatchingSuggestions )\n\t\t);\n\n\t\tif ( resetSelectedSuggestion ) {\n\t\t\tif (\n\t\t\t\t__experimentalAutoSelectFirstMatch &&\n\t\t\t\tinputHasMinimumChars &&\n\t\t\t\thasMatchingSuggestions\n\t\t\t) {\n\t\t\t\tsetSelectedSuggestionIndex( 0 );\n\t\t\t\tsetSelectedSuggestionScroll( true );\n\t\t\t} else {\n\t\t\t\tsetSelectedSuggestionIndex( -1 );\n\t\t\t\tsetSelectedSuggestionScroll( false );\n\t\t\t}\n\t\t}\n\n\t\tif ( inputHasMinimumChars ) {\n\t\t\tconst message = hasMatchingSuggestions\n\t\t\t\t? sprintf(\n\t\t\t\t\t\t/* translators: %d: number of results. */\n\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t'%d result found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t'%d results found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\tmatchingSuggestions.length\n\t\t\t\t\t\t),\n\t\t\t\t\t\tmatchingSuggestions.length\n\t\t\t\t )\n\t\t\t\t: __( 'No results.' );\n\n\t\t\tdebouncedSpeak( message, 'assertive' );\n\t\t}\n\t}\n\n\tfunction renderTokensAndInput() {\n\t\tconst components = value.map( renderToken );\n\t\tcomponents.splice( getIndexOfInput(), 0, renderInput() );\n\n\t\treturn components;\n\t}\n\n\tfunction renderToken(\n\t\ttoken: string | TokenItem,\n\t\tindex: number,\n\t\ttokens: ( string | TokenItem )[]\n\t) {\n\t\tconst _value = getTokenValue( token );\n\t\tconst status = typeof token !== 'string' ? token.status : undefined;\n\t\tconst termPosition = index + 1;\n\t\tconst termsCount = tokens.length;\n\n\t\treturn (\n\t\t\t<FlexItem key={ 'token-' + _value }>\n\t\t\t\t<Token\n\t\t\t\t\tvalue={ _value }\n\t\t\t\t\tstatus={ status }\n\t\t\t\t\ttitle={\n\t\t\t\t\t\ttypeof token !== 'string' ? token.title : undefined\n\t\t\t\t\t}\n\t\t\t\t\tdisplayTransform={ displayTransform }\n\t\t\t\t\tonClickRemove={ onTokenClickRemove }\n\t\t\t\t\tisBorderless={\n\t\t\t\t\t\t( typeof token !== 'string' && token.isBorderless ) ||\n\t\t\t\t\t\tisBorderless\n\t\t\t\t\t}\n\t\t\t\t\tonMouseEnter={\n\t\t\t\t\t\ttypeof token !== 'string'\n\t\t\t\t\t\t\t? token.onMouseEnter\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t\tonMouseLeave={\n\t\t\t\t\t\ttypeof token !== 'string'\n\t\t\t\t\t\t\t? token.onMouseLeave\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t\tdisabled={ 'error' !== status && disabled }\n\t\t\t\t\tmessages={ messages }\n\t\t\t\t\ttermsCount={ termsCount }\n\t\t\t\t\ttermPosition={ termPosition }\n\t\t\t\t/>\n\t\t\t</FlexItem>\n\t\t);\n\t}\n\n\tfunction renderInput() {\n\t\tconst inputProps = {\n\t\t\tinstanceId,\n\t\t\tautoCapitalize,\n\t\t\tautoComplete,\n\t\t\tplaceholder: value.length === 0 ? placeholder : '',\n\t\t\tdisabled,\n\t\t\tvalue: incompleteTokenValue,\n\t\t\tonBlur,\n\t\t\tisExpanded,\n\t\t\tselectedSuggestionIndex,\n\t\t};\n\n\t\treturn (\n\t\t\t<TokenInput\n\t\t\t\tkey=\"input\"\n\t\t\t\t{ ...inputProps }\n\t\t\t\tonChange={\n\t\t\t\t\t! ( maxLength && value.length >= maxLength )\n\t\t\t\t\t\t? onInputChangeHandler\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t\tref={ input }\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst classes = clsx(\n\t\tclassName,\n\t\t'components-form-token-field__input-container',\n\t\t{\n\t\t\t'is-active': isActive,\n\t\t\t'is-disabled': disabled,\n\t\t}\n\t);\n\n\tlet tokenFieldProps = {\n\t\tclassName: 'components-form-token-field',\n\t\ttabIndex: -1,\n\t};\n\tconst matchingSuggestions = getMatchingSuggestions();\n\n\tif ( ! disabled ) {\n\t\ttokenFieldProps = Object.assign( {}, tokenFieldProps, {\n\t\t\tonKeyDown: withIgnoreIMEEvents( onKeyDown ),\n\t\t\tonKeyPress,\n\t\t\tonFocus: onFocusHandler,\n\t\t} );\n\t}\n\n\t// Disable reason: There is no appropriate role which describes the\n\t// input container intended accessible usability.\n\t// TODO: Refactor click detection to use blur to stop propagation.\n\t/* eslint-disable jsx-a11y/no-static-element-interactions */\n\treturn (\n\t\t<div { ...tokenFieldProps }>\n\t\t\t{ label && (\n\t\t\t\t<StyledLabel\n\t\t\t\t\thtmlFor={ `components-form-token-input-${ instanceId }` }\n\t\t\t\t\tclassName=\"components-form-token-field__label\"\n\t\t\t\t>\n\t\t\t\t\t{ label }\n\t\t\t\t</StyledLabel>\n\t\t\t) }\n\t\t\t<div\n\t\t\t\tref={ tokensAndInput }\n\t\t\t\tclassName={ classes }\n\t\t\t\ttabIndex={ -1 }\n\t\t\t\tonMouseDown={ onContainerTouched }\n\t\t\t\tonTouchStart={ onContainerTouched }\n\t\t\t>\n\t\t\t\t<TokensAndInputWrapperFlex\n\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\talign=\"center\"\n\t\t\t\t\tgap={ 1 }\n\t\t\t\t\twrap\n\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\thasTokens={ !! value.length }\n\t\t\t\t>\n\t\t\t\t\t{ renderTokensAndInput() }\n\t\t\t\t</TokensAndInputWrapperFlex>\n\t\t\t\t{ isExpanded && (\n\t\t\t\t\t<SuggestionsList\n\t\t\t\t\t\tinstanceId={ instanceId }\n\t\t\t\t\t\tmatch={ saveTransform( incompleteTokenValue ) }\n\t\t\t\t\t\tdisplayTransform={ displayTransform }\n\t\t\t\t\t\tsuggestions={ matchingSuggestions }\n\t\t\t\t\t\tselectedIndex={ selectedSuggestionIndex }\n\t\t\t\t\t\tscrollIntoView={ selectedSuggestionScroll }\n\t\t\t\t\t\tonHover={ onSuggestionHovered }\n\t\t\t\t\t\tonSelect={ onSuggestionSelected }\n\t\t\t\t\t\t__experimentalRenderItem={ __experimentalRenderItem }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t\t{ ! __nextHasNoMarginBottom && <Spacer marginBottom={ 2 } /> }\n\t\t\t{ __experimentalShowHowTo && (\n\t\t\t\t<StyledHelp\n\t\t\t\t\tid={ `components-form-token-suggestions-howto-${ instanceId }` }\n\t\t\t\t\tclassName=\"components-form-token-field__help\"\n\t\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t\t>\n\t\t\t\t\t{ tokenizeOnSpace\n\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t'Separate with commas, spaces, or the Enter key.'\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: __( 'Separate with commas or the Enter key.' ) }\n\t\t\t\t</StyledHelp>\n\t\t\t) }\n\t\t</div>\n\t);\n\t/* eslint-enable jsx-a11y/no-static-element-interactions */\n}\n\nexport default FormTokenField;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Circle } from '@wordpress/primitives';\n\nexport const PageControlIcon = () => (\n\t<SVG width=\"8\" height=\"8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Circle cx=\"4\" cy=\"4\" r=\"4\" />\n\t</SVG>\n);\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { PageControlIcon } from './icons';\nimport type { PageControlProps } from './types';\n\nexport default function PageControl( {\n\tcurrentPage,\n\tnumberOfPages,\n\tsetCurrentPage,\n}: PageControlProps ) {\n\treturn (\n\t\t<ul\n\t\t\tclassName=\"components-guide__page-control\"\n\t\t\taria-label={ __( 'Guide controls' ) }\n\t\t>\n\t\t\t{ Array.from( { length: numberOfPages } ).map( ( _, page ) => (\n\t\t\t\t<li\n\t\t\t\t\tkey={ page }\n\t\t\t\t\t// Set aria-current=\"step\" on the active page, see https://www.w3.org/TR/wai-aria-1.1/#aria-current\n\t\t\t\t\taria-current={ page === currentPage ? 'step' : undefined }\n\t\t\t\t>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tkey={ page }\n\t\t\t\t\t\ticon={ <PageControlIcon /> }\n\t\t\t\t\t\taria-label={ sprintf(\n\t\t\t\t\t\t\t/* translators: 1: current page number 2: total number of pages */\n\t\t\t\t\t\t\t__( 'Page %1$d of %2$d' ),\n\t\t\t\t\t\t\tpage + 1,\n\t\t\t\t\t\t\tnumberOfPages\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tonClick={ () => setCurrentPage( page ) }\n\t\t\t\t\t/>\n\t\t\t\t</li>\n\t\t\t) ) }\n\t\t</ul>\n\t);\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useEffect, Children, useRef } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Modal from '../modal';\nimport Button from '../button';\nimport PageControl from './page-control';\nimport type { GuideProps } from './types';\n\n/**\n * `Guide` is a React component that renders a _user guide_ in a modal. The guide consists of several pages which the user can step through one by one. The guide is finished when the modal is closed or when the user clicks _Finish_ on the last page of the guide.\n *\n * ```jsx\n * function MyTutorial() {\n * \tconst [ isOpen, setIsOpen ] = useState( true );\n *\n * \tif ( ! isOpen ) {\n * \t\treturn null;\n * \t}\n *\n * \treturn (\n * \t\t<Guide\n * \t\t\tonFinish={ () => setIsOpen( false ) }\n * \t\t\tpages={ [\n * \t\t\t\t{\n * \t\t\t\t\tcontent: <p>Welcome to the ACME Store!</p>,\n * \t\t\t\t},\n * \t\t\t\t{\n * \t\t\t\t\timage: <img src=\"https://acmestore.com/add-to-cart.png\" />,\n * \t\t\t\t\tcontent: (\n * \t\t\t\t\t\t<p>\n * \t\t\t\t\t\t\tClick <i>Add to Cart</i> to buy a product.\n * \t\t\t\t\t\t</p>\n * \t\t\t\t\t),\n * \t\t\t\t},\n * \t\t\t] }\n * \t\t/>\n * \t);\n * }\n * ```\n */\nfunction Guide( {\n\tchildren,\n\tclassName,\n\tcontentLabel,\n\tfinishButtonText = __( 'Finish' ),\n\tonFinish,\n\tpages = [],\n}: GuideProps ) {\n\tconst ref = useRef< HTMLDivElement >( null );\n\tconst [ currentPage, setCurrentPage ] = useState( 0 );\n\n\tuseEffect( () => {\n\t\t// Place focus at the top of the guide on mount and when the page changes.\n\t\tconst frame = ref.current?.querySelector( '.components-guide' );\n\t\tif ( frame instanceof HTMLElement ) {\n\t\t\tframe.focus();\n\t\t}\n\t}, [ currentPage ] );\n\n\tuseEffect( () => {\n\t\tif ( Children.count( children ) ) {\n\t\t\tdeprecated( 'Passing children to <Guide>', {\n\t\t\t\tsince: '5.5',\n\t\t\t\talternative: 'the `pages` prop',\n\t\t\t} );\n\t\t}\n\t}, [ children ] );\n\n\tif ( Children.count( children ) ) {\n\t\tpages =\n\t\t\tChildren.map( children, ( child ) => ( {\n\t\t\t\tcontent: child,\n\t\t\t} ) ) ?? [];\n\t}\n\n\tconst canGoBack = currentPage > 0;\n\tconst canGoForward = currentPage < pages.length - 1;\n\n\tconst goBack = () => {\n\t\tif ( canGoBack ) {\n\t\t\tsetCurrentPage( currentPage - 1 );\n\t\t}\n\t};\n\n\tconst goForward = () => {\n\t\tif ( canGoForward ) {\n\t\t\tsetCurrentPage( currentPage + 1 );\n\t\t}\n\t};\n\n\tif ( pages.length === 0 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Modal\n\t\t\tclassName={ clsx( 'components-guide', className ) }\n\t\t\tcontentLabel={ contentLabel }\n\t\t\tisDismissible={ pages.length > 1 }\n\t\t\tonRequestClose={ onFinish }\n\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\tif ( event.code === 'ArrowLeft' ) {\n\t\t\t\t\tgoBack();\n\t\t\t\t\t// Do not scroll the modal's contents.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t} else if ( event.code === 'ArrowRight' ) {\n\t\t\t\t\tgoForward();\n\t\t\t\t\t// Do not scroll the modal's contents.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t} }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t<div className=\"components-guide__container\">\n\t\t\t\t<div className=\"components-guide__page\">\n\t\t\t\t\t{ pages[ currentPage ].image }\n\n\t\t\t\t\t{ pages.length > 1 && (\n\t\t\t\t\t\t<PageControl\n\t\t\t\t\t\t\tcurrentPage={ currentPage }\n\t\t\t\t\t\t\tnumberOfPages={ pages.length }\n\t\t\t\t\t\t\tsetCurrentPage={ setCurrentPage }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ pages[ currentPage ].content }\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"components-guide__footer\">\n\t\t\t\t\t{ canGoBack && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"components-guide__back-button\"\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ goBack }\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Previous' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t\t{ canGoForward && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"components-guide__forward-button\"\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\tonClick={ goForward }\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Next' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! canGoForward && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"components-guide__finish-button\"\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\tonClick={ onFinish }\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ finishButtonText }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</Modal>\n\t);\n}\n\nexport default Guide;\n","/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\n\nexport default function GuidePage(\n\tprops: WordPressComponentProps< {}, 'div', false >\n) {\n\tuseEffect( () => {\n\t\tdeprecated( '<GuidePage>', {\n\t\t\tsince: '5.5',\n\t\t\talternative: 'the `pages` prop in <Guide>',\n\t\t} );\n\t}, [] );\n\n\treturn <div { ...props } />;\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Button from '.';\nimport type { DeprecatedIconButtonProps } from './types';\n\nfunction UnforwardedIconButton(\n\t{\n\t\tlabel,\n\t\tlabelPosition,\n\t\tsize,\n\t\ttooltip,\n\t\t...props\n\t}: React.ComponentPropsWithoutRef< typeof Button > &\n\t\tDeprecatedIconButtonProps,\n\tref: ForwardedRef< any >\n) {\n\tdeprecated( 'wp.components.IconButton', {\n\t\tsince: '5.4',\n\t\talternative: 'wp.components.Button',\n\t\tversion: '6.2',\n\t} );\n\n\treturn (\n\t\t<Button\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t\ttooltipPosition={ labelPosition }\n\t\t\ticonSize={ size }\n\t\t\tshowTooltip={ tooltip !== undefined ? !! tooltip : undefined }\n\t\t\tlabel={ tooltip || label }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( UnforwardedIconButton );\n","/**\n * WordPress dependencies\n */\nimport { useRef, Children } from '@wordpress/element';\nimport { useKeyboardShortcut } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport type { KeyboardShortcutProps, KeyboardShortcutsProps } from './types';\n\nfunction KeyboardShortcut( {\n\ttarget,\n\tcallback,\n\tshortcut,\n\tbindGlobal,\n\teventName,\n}: KeyboardShortcutProps ) {\n\tuseKeyboardShortcut( shortcut, callback, {\n\t\tbindGlobal,\n\t\ttarget,\n\t\teventName,\n\t} );\n\n\treturn null;\n}\n\n/**\n * `KeyboardShortcuts` is a component which handles keyboard sequences during the lifetime of the rendering element.\n *\n * When passed children, it will capture key events which occur on or within the children. If no children are passed, events are captured on the document.\n *\n * It uses the [Mousetrap](https://craig.is/killing/mice) library to implement keyboard sequence bindings.\n *\n * ```jsx\n * import { KeyboardShortcuts } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyKeyboardShortcuts = () => {\n * \tconst [ isAllSelected, setIsAllSelected ] = useState( false );\n * \tconst selectAll = () => {\n * \t\tsetIsAllSelected( true );\n * \t};\n *\n * \treturn (\n * \t\t<div>\n * \t\t\t<KeyboardShortcuts\n * \t\t\t\tshortcuts={ {\n * \t\t\t\t\t'mod+a': selectAll,\n * \t\t\t\t} }\n * \t\t\t/>\n * \t\t\t[cmd/ctrl + A] Combination pressed? { isAllSelected ? 'Yes' : 'No' }\n * \t\t</div>\n * \t);\n * };\n * ```\n */\nfunction KeyboardShortcuts( {\n\tchildren,\n\tshortcuts,\n\tbindGlobal,\n\teventName,\n}: KeyboardShortcutsProps ) {\n\tconst target = useRef( null );\n\n\tconst element = Object.entries( shortcuts ?? {} ).map(\n\t\t( [ shortcut, callback ] ) => (\n\t\t\t<KeyboardShortcut\n\t\t\t\tkey={ shortcut }\n\t\t\t\tshortcut={ shortcut }\n\t\t\t\tcallback={ callback }\n\t\t\t\tbindGlobal={ bindGlobal }\n\t\t\t\teventName={ eventName }\n\t\t\t\ttarget={ target }\n\t\t\t/>\n\t\t)\n\t);\n\n\t// Render as non-visual if there are no children pressed. Keyboard\n\t// events will be bound to the document instead.\n\tif ( ! Children.count( children ) ) {\n\t\treturn <>{ element }</>;\n\t}\n\n\treturn (\n\t\t<div ref={ target }>\n\t\t\t{ element }\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\nexport default KeyboardShortcuts;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Children } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport type { MenuGroupProps } from './types';\n\n/**\n * `MenuGroup` wraps a series of related `MenuItem` components into a common\n * section.\n *\n * ```jsx\n * import { MenuGroup, MenuItem } from '@wordpress/components';\n *\n * const MyMenuGroup = () => (\n * <MenuGroup label=\"Settings\">\n * <MenuItem>Setting 1</MenuItem>\n * <MenuItem>Setting 2</MenuItem>\n * </MenuGroup>\n * );\n * ```\n */\nexport function MenuGroup( props: MenuGroupProps ) {\n\tconst { children, className = '', label, hideSeparator } = props;\n\tconst instanceId = useInstanceId( MenuGroup );\n\n\tif ( ! Children.count( children ) ) {\n\t\treturn null;\n\t}\n\n\tconst labelId = `components-menu-group-label-${ instanceId }`;\n\tconst classNames = clsx( className, 'components-menu-group', {\n\t\t'has-hidden-separator': hideSeparator,\n\t} );\n\n\treturn (\n\t\t<div className={ classNames }>\n\t\t\t{ label && (\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"components-menu-group__label\"\n\t\t\t\t\tid={ labelId }\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t>\n\t\t\t\t\t{ label }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div role=\"group\" aria-labelledby={ label ? labelId : undefined }>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nexport default MenuGroup;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { cloneElement, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Shortcut from '../shortcut';\nimport Button from '../button';\nimport Icon from '../icon';\nimport type { WordPressComponentProps } from '../context';\nimport type { MenuItemProps } from './types';\n\nfunction UnforwardedMenuItem(\n\tprops: WordPressComponentProps< MenuItemProps, 'button', false >,\n\tref: ForwardedRef< HTMLButtonElement >\n) {\n\tlet {\n\t\tchildren,\n\t\tinfo,\n\t\tclassName,\n\t\ticon,\n\t\ticonPosition = 'right',\n\t\tshortcut,\n\t\tisSelected,\n\t\trole = 'menuitem',\n\t\tsuffix,\n\t\t...buttonProps\n\t} = props;\n\n\tclassName = clsx( 'components-menu-item__button', className );\n\n\tif ( info ) {\n\t\tchildren = (\n\t\t\t<span className=\"components-menu-item__info-wrapper\">\n\t\t\t\t<span className=\"components-menu-item__item\">{ children }</span>\n\t\t\t\t<span className=\"components-menu-item__info\">{ info }</span>\n\t\t\t</span>\n\t\t);\n\t}\n\n\tif ( icon && typeof icon !== 'string' ) {\n\t\ticon = cloneElement( icon, {\n\t\t\tclassName: clsx( 'components-menu-items__item-icon', {\n\t\t\t\t'has-icon-right': iconPosition === 'right',\n\t\t\t} ),\n\t\t} );\n\t}\n\n\treturn (\n\t\t<Button\n\t\t\t__next40pxDefaultSize\n\t\t\tref={ ref }\n\t\t\t// Make sure aria-checked matches spec https://www.w3.org/TR/wai-aria-1.1/#aria-checked\n\t\t\taria-checked={\n\t\t\t\trole === 'menuitemcheckbox' || role === 'menuitemradio'\n\t\t\t\t\t? isSelected\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\trole={ role }\n\t\t\ticon={ iconPosition === 'left' ? icon : undefined }\n\t\t\tclassName={ className }\n\t\t\t{ ...buttonProps }\n\t\t>\n\t\t\t<span className=\"components-menu-item__item\">{ children }</span>\n\t\t\t{ ! suffix && (\n\t\t\t\t<Shortcut\n\t\t\t\t\tclassName=\"components-menu-item__shortcut\"\n\t\t\t\t\tshortcut={ shortcut }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ ! suffix && icon && iconPosition === 'right' && (\n\t\t\t\t<Icon icon={ icon } />\n\t\t\t) }\n\t\t\t{ suffix }\n\t\t</Button>\n\t);\n}\n\n/**\n * MenuItem is a component which renders a button intended to be used in combination with the `DropdownMenu` component.\n *\n * ```jsx\n * import { MenuItem } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyMenuItem = () => {\n * \tconst [ isActive, setIsActive ] = useState( true );\n *\n * \treturn (\n * \t\t<MenuItem\n * \t\t\ticon={ isActive ? 'yes' : 'no' }\n * \t\t\tisSelected={ isActive }\n * \t\t\trole=\"menuitemcheckbox\"\n * \t\t\tonClick={ () => setIsActive( ( state ) => ! state ) }\n * \t\t>\n * \t\t\tToggle\n * \t\t</MenuItem>\n * \t);\n * };\n * ```\n */\nexport const MenuItem = forwardRef( UnforwardedMenuItem );\n\nexport default MenuItem;\n","/**\n * WordPress dependencies\n */\nimport { check } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport MenuItem from '../menu-item';\nimport type { MenuItemsChoiceProps } from './types';\n\nconst noop = () => {};\n\n/**\n * `MenuItemsChoice` functions similarly to a set of `MenuItem`s, but allows the user to select one option from a set of multiple choices.\n *\n *\n * ```jsx\n * import { MenuGroup, MenuItemsChoice } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyMenuItemsChoice = () => {\n * \tconst [ mode, setMode ] = useState( 'visual' );\n * \tconst choices = [\n * \t\t{\n * \t\t\tvalue: 'visual',\n * \t\t\tlabel: 'Visual editor',\n * \t\t},\n * \t\t{\n * \t\t\tvalue: 'text',\n * \t\t\tlabel: 'Code editor',\n * \t\t},\n * \t];\n *\n * \treturn (\n * \t\t<MenuGroup label=\"Editor\">\n * \t\t\t<MenuItemsChoice\n * \t\t\t\tchoices={ choices }\n * \t\t\t\tvalue={ mode }\n * \t\t\t\tonSelect={ ( newMode ) => setMode( newMode ) }\n * \t\t\t/>\n * \t\t</MenuGroup>\n * \t);\n * };\n * ```\n */\nfunction MenuItemsChoice( {\n\tchoices = [],\n\tonHover = noop,\n\tonSelect,\n\tvalue,\n}: MenuItemsChoiceProps ) {\n\treturn (\n\t\t<>\n\t\t\t{ choices.map( ( item ) => {\n\t\t\t\tconst isSelected = value === item.value;\n\t\t\t\treturn (\n\t\t\t\t\t<MenuItem\n\t\t\t\t\t\tkey={ item.value }\n\t\t\t\t\t\trole=\"menuitemradio\"\n\t\t\t\t\t\tdisabled={ item.disabled }\n\t\t\t\t\t\ticon={ isSelected ? check : null }\n\t\t\t\t\t\tinfo={ item.info }\n\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\tshortcut={ item.shortcut }\n\t\t\t\t\t\tclassName=\"components-menu-items-choice\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tif ( ! isSelected ) {\n\t\t\t\t\t\t\t\tonSelect( item.value );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonMouseEnter={ () => onHover( item.value ) }\n\t\t\t\t\t\tonMouseLeave={ () => onHover( null ) }\n\t\t\t\t\t\taria-label={ item[ 'aria-label' ] }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ item.label }\n\t\t\t\t\t</MenuItem>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</>\n\t);\n}\n\nexport default MenuItemsChoice;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport NavigableContainer from './container';\nimport type { TabbableContainerProps } from './types';\n\nexport function UnforwardedTabbableContainer(\n\t{ eventToOffset, ...props }: TabbableContainerProps,\n\tref: ForwardedRef< any >\n) {\n\tconst innerEventToOffset = ( evt: KeyboardEvent ) => {\n\t\tconst { code, shiftKey } = evt;\n\t\tif ( 'Tab' === code ) {\n\t\t\treturn shiftKey ? -1 : 1;\n\t\t}\n\n\t\t// Allow custom handling of keys besides Tab.\n\t\t//\n\t\t// By default, TabbableContainer will move focus forward on Tab and\n\t\t// backward on Shift+Tab. The handler below will be used for all other\n\t\t// events. The semantics for `eventToOffset`'s return\n\t\t// values are the following:\n\t\t//\n\t\t// - +1: move focus forward\n\t\t// - -1: move focus backward\n\t\t// - 0: don't move focus, but acknowledge event and thus stop it\n\t\t// - undefined: do nothing, let the event propagate.\n\t\tif ( eventToOffset ) {\n\t\t\treturn eventToOffset( evt );\n\t\t}\n\n\t\treturn undefined;\n\t};\n\n\treturn (\n\t\t<NavigableContainer\n\t\t\tref={ ref }\n\t\t\tstopNavigationEvents\n\t\t\tonlyBrowserTabstops\n\t\t\teventToOffset={ innerEventToOffset }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\n/**\n * A container for tabbable elements.\n *\n * ```jsx\n * import {\n * TabbableContainer,\n * Button,\n * } from '@wordpress/components';\n *\n * function onNavigate( index, target ) {\n * console.log( `Navigates to ${ index }`, target );\n * }\n *\n * const MyTabbableContainer = () => (\n * <div>\n * <span>Tabbable Container:</span>\n * <TabbableContainer onNavigate={ onNavigate }>\n * <Button variant=\"secondary\" tabIndex=\"0\">\n * Section 1\n * </Button>\n * <Button variant=\"secondary\" tabIndex=\"0\">\n * Section 2\n * </Button>\n * <Button variant=\"secondary\" tabIndex=\"0\">\n * Section 3\n * </Button>\n * <Button variant=\"secondary\" tabIndex=\"0\">\n * Section 4\n * </Button>\n * </TabbableContainer>\n * </div>\n * );\n * ```\n */\nexport const TabbableContainer = forwardRef( UnforwardedTabbableContainer );\n\nexport default TabbableContainer;\n","export const ROOT_MENU = 'root';\nexport const SEARCH_FOCUS_DELAY = 100;\n","/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { ROOT_MENU } from './constants';\n\nimport type { NavigationContext as NavigationContextType } from './types';\n\nconst noop = () => {};\nconst defaultIsEmpty = () => false;\nconst defaultGetter = () => undefined;\n\nexport const NavigationContext = createContext< NavigationContextType >( {\n\tactiveItem: undefined,\n\tactiveMenu: ROOT_MENU,\n\tsetActiveMenu: noop,\n\n\tnavigationTree: {\n\t\titems: {},\n\t\tgetItem: defaultGetter,\n\t\taddItem: noop,\n\t\tremoveItem: noop,\n\n\t\tmenus: {},\n\t\tgetMenu: defaultGetter,\n\t\taddMenu: noop,\n\t\tremoveMenu: noop,\n\t\tchildMenu: {},\n\t\ttraverseMenu: noop,\n\t\tisMenuEmpty: defaultIsEmpty,\n\t},\n} );\nexport const useNavigationContext = () => useContext( NavigationContext );\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n\n/**\n * WordPress dependencies\n */\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { COLORS } from '../../utils/colors-values';\nimport Button from '../../button';\nimport { Text } from '../../text';\nimport { Heading } from '../../heading';\nimport { rtl, CONFIG } from '../../utils';\nimport { space } from '../../utils/space';\n\nexport const NavigationUI = styled.div`\n\twidth: 100%;\n\tbox-sizing: border-box;\n\tpadding: 0 ${ space( 4 ) };\n\toverflow: hidden;\n`;\n\nexport const MenuUI = styled.div`\n\tmargin-top: ${ space( 6 ) };\n\tmargin-bottom: ${ space( 6 ) };\n\tdisplay: flex;\n\tflex-direction: column;\n\tul {\n\t\tpadding: 0;\n\t\tmargin: 0;\n\t\tlist-style: none;\n\t}\n\t.components-navigation__back-button {\n\t\tmargin-bottom: ${ space( 6 ) };\n\t}\n\n\t.components-navigation__group + .components-navigation__group {\n\t\tmargin-top: ${ space( 6 ) };\n\t}\n`;\n\nexport const MenuBackButtonUI = styled( Button )`\n\t&.is-tertiary {\n\t\tcolor: inherit;\n\t\topacity: 0.7;\n\n\t\t&:hover:not( :disabled ) {\n\t\t\topacity: 1;\n\t\t\tbox-shadow: none;\n\t\t\tcolor: inherit;\n\t\t}\n\n\t\t&:active:not( :disabled ) {\n\t\t\tbackground: transparent;\n\t\t\topacity: 1;\n\t\t\tcolor: inherit;\n\t\t}\n\t}\n`;\n\nexport const MenuTitleUI = styled.div`\n\toverflow: hidden;\n\twidth: 100%;\n`;\n\nexport const MenuTitleSearchControlWrapper = styled.div`\n\tmargin: 11px 0; // non-ideal hardcoding to maintain same height as Heading, could be improved\n\tpadding: 1px; // so the focus border doesn't get cut off by the overflow hidden on MenuTitleUI\n`;\n\nexport const MenuTitleActionsUI = styled.span`\n\theight: ${ space( 6 ) }; // 24px, same height as the buttons inside\n\n\t.components-button.is-small {\n\t\tcolor: inherit;\n\t\topacity: 0.7;\n\t\tmargin-right: ${ space( 1 ) }; // Avoid hiding the focus outline\n\t\tpadding: 0;\n\n\t\t&:active:not( :disabled ) {\n\t\t\tbackground: none;\n\t\t\topacity: 1;\n\t\t\tcolor: inherit;\n\t\t}\n\t\t&:hover:not( :disabled ) {\n\t\t\tbox-shadow: none;\n\t\t\topacity: 1;\n\t\t\tcolor: inherit;\n\t\t}\n\t}\n`;\n\nexport const GroupTitleUI = styled( Heading )`\n\tmin-height: ${ space( 12 ) };\n\talign-items: center;\n\tcolor: inherit;\n\tdisplay: flex;\n\tjustify-content: space-between;\n\tmargin-bottom: ${ space( 2 ) };\n\tpadding: ${ () =>\n\t\tisRTL()\n\t\t\t? `${ space( 1 ) } ${ space( 4 ) } ${ space( 1 ) } ${ space( 2 ) }`\n\t\t\t: `${ space( 1 ) } ${ space( 2 ) } ${ space( 1 ) } ${ space(\n\t\t\t\t\t4\n\t\t\t ) }` };\n`;\n\nexport const ItemBaseUI = styled.li`\n\tborder-radius: ${ CONFIG.radiusSmall };\n\tcolor: inherit;\n\tmargin-bottom: 0;\n\n\t> button,\n\t> a.components-button,\n\t> a {\n\t\twidth: 100%;\n\t\tcolor: inherit;\n\t\topacity: 0.7;\n\t\tpadding: ${ space( 2 ) } ${ space( 4 ) }; /* 8px 16px */\n\t\t${ rtl( { textAlign: 'left' }, { textAlign: 'right' } ) }\n\n\t\t&:hover,\n\t\t&:focus:not( [aria-disabled='true'] ):active,\n\t\t&:active:not( [aria-disabled='true'] ):active {\n\t\t\tcolor: inherit;\n\t\t\topacity: 1;\n\t\t}\n\t}\n\n\t&.is-active {\n\t\tbackground-color: ${ COLORS.theme.accent };\n\t\tcolor: ${ COLORS.theme.accentInverted };\n\n\t\t> button,\n\t\t.components-button:hover,\n\t\t> a {\n\t\t\tcolor: ${ COLORS.theme.accentInverted };\n\t\t\topacity: 1;\n\t\t}\n\t}\n\n\t> svg path {\n\t\tcolor: ${ COLORS.gray[ 600 ] };\n\t}\n`;\n\nexport const ItemUI = styled.div`\n\tdisplay: flex;\n\talign-items: center;\n\theight: auto;\n\tmin-height: 40px;\n\tmargin: 0;\n\tpadding: ${ space( 1.5 ) } ${ space( 4 ) };\n\tfont-weight: 400;\n\tline-height: 20px;\n\twidth: 100%;\n\tcolor: inherit;\n\topacity: 0.7;\n`;\n\nexport const ItemIconUI = styled.span`\n\tdisplay: flex;\n\tmargin-right: ${ space( 2 ) };\n`;\n\nexport const ItemBadgeUI = styled.span`\n\tmargin-left: ${ () => ( isRTL() ? '0' : space( 2 ) ) };\n\tmargin-right: ${ () => ( isRTL() ? space( 2 ) : '0' ) };\n\tdisplay: inline-flex;\n\tpadding: ${ space( 1 ) } ${ space( 3 ) };\n\tborder-radius: ${ CONFIG.radiusSmall };\n\n\t@keyframes fade-in {\n\t\tfrom {\n\t\t\topacity: 0;\n\t\t}\n\t\tto {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\n\t@media not ( prefers-reduced-motion ) {\n\t\tanimation: fade-in 250ms ease-out;\n\t}\n`;\n\nexport const ItemTitleUI = styled( Text )`\n\t${ () => ( isRTL() ? 'margin-left: auto;' : 'margin-right: auto;' ) }\n\tfont-size: 14px;\n\tline-height: 20px;\n\tcolor: inherit;\n`;\n","/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\n\nexport function useNavigationTreeNodes<\n\tTNode extends { children?: React.ReactNode; [ key: string ]: unknown },\n>() {\n\tconst [ nodes, setNodes ] = useState<\n\t\tRecord< string, Omit< TNode, 'children' > >\n\t>( {} );\n\n\tconst getNode = ( key: string ) => nodes[ key ];\n\n\tconst addNode = ( key: string, value: TNode ) => {\n\t\tconst { children, ...newNode } = value;\n\t\treturn setNodes( ( original ) => ( {\n\t\t\t...original,\n\t\t\t[ key ]: newNode,\n\t\t} ) );\n\t};\n\n\tconst removeNode = ( key: keyof typeof nodes ) => {\n\t\treturn setNodes( ( original ) => {\n\t\t\tconst { [ key ]: removedNode, ...remainingNodes } = original;\n\t\t\treturn remainingNodes;\n\t\t} );\n\t};\n\n\treturn { nodes, getNode, addNode, removeNode };\n}\n","/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useNavigationTreeNodes } from './use-navigation-tree-nodes';\n\nimport type { NavigationContext, Item, Menu } from './types';\n\nexport const useCreateNavigationTree = () => {\n\tconst {\n\t\tnodes: items,\n\t\tgetNode: getItem,\n\t\taddNode: addItem,\n\t\tremoveNode: removeItem,\n\t} = useNavigationTreeNodes< Item >();\n\n\tconst {\n\t\tnodes: menus,\n\t\tgetNode: getMenu,\n\t\taddNode: addMenu,\n\t\tremoveNode: removeMenu,\n\t} = useNavigationTreeNodes< Menu >();\n\n\t/**\n\t * Stores direct nested menus of menus\n\t * This makes it easy to traverse menu tree\n\t *\n\t * Key is the menu prop of the menu\n\t * Value is an array of menu keys\n\t */\n\tconst [ childMenu, setChildMenu ] = useState< Record< string, string[] > >(\n\t\t{}\n\t);\n\tconst getChildMenu = ( menu: string ) => childMenu[ menu ] || [];\n\n\tconst traverseMenu: NavigationContext[ 'navigationTree' ][ 'traverseMenu' ] =\n\t\t( startMenu, callback ) => {\n\t\t\tconst visited: string[] = [];\n\t\t\tlet queue = [ startMenu ];\n\t\t\tlet current: Menu;\n\n\t\t\twhile ( queue.length > 0 ) {\n\t\t\t\t// Type cast to string is safe because of the `length > 0` check above.\n\t\t\t\tcurrent = getMenu( queue.shift() as string );\n\n\t\t\t\tif ( ! current || visited.includes( current.menu ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tvisited.push( current.menu );\n\t\t\t\tqueue = [ ...queue, ...getChildMenu( current.menu ) ];\n\n\t\t\t\tif ( callback( current ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\tconst isMenuEmpty = ( menuToCheck: string ) => {\n\t\tlet isEmpty = true;\n\n\t\ttraverseMenu( menuToCheck, ( current: Menu ) => {\n\t\t\tif ( ! current.isEmpty ) {\n\t\t\t\tisEmpty = false;\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn undefined;\n\t\t} );\n\n\t\treturn isEmpty;\n\t};\n\n\treturn {\n\t\titems,\n\t\tgetItem,\n\t\taddItem,\n\t\tremoveItem,\n\n\t\tmenus,\n\t\tgetMenu,\n\t\taddMenu: ( key: string, value: Menu ) => {\n\t\t\tsetChildMenu( ( state ) => {\n\t\t\t\tconst newState = { ...state };\n\n\t\t\t\tif ( ! value.parentMenu ) {\n\t\t\t\t\treturn newState;\n\t\t\t\t}\n\n\t\t\t\tif ( ! newState[ value.parentMenu ] ) {\n\t\t\t\t\tnewState[ value.parentMenu ] = [];\n\t\t\t\t}\n\n\t\t\t\tnewState[ value.parentMenu ].push( key );\n\n\t\t\t\treturn newState;\n\t\t\t} );\n\n\t\t\taddMenu( key, value );\n\t\t},\n\t\tremoveMenu,\n\t\tchildMenu,\n\t\ttraverseMenu,\n\t\tisMenuEmpty,\n\t};\n};\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { useEffect, useRef, useState } from '@wordpress/element';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { getAnimateClassName } from '../animate';\nimport { ROOT_MENU } from './constants';\nimport { NavigationContext } from './context';\nimport { NavigationUI } from './styles/navigation-styles';\nimport { useCreateNavigationTree } from './use-create-navigation-tree';\n\nimport type {\n\tNavigationProps,\n\tNavigationContext as NavigationContextType,\n} from './types';\n\nconst noop = () => {};\n\n/**\n * Render a navigation list with optional groupings and hierarchy.\n *\n * @deprecated Use `Navigator` instead.\n *\n * ```jsx\n * import {\n * __experimentalNavigation as Navigation,\n * __experimentalNavigationGroup as NavigationGroup,\n * __experimentalNavigationItem as NavigationItem,\n * __experimentalNavigationMenu as NavigationMenu,\n * } from '@wordpress/components';\n *\n * const MyNavigation = () => (\n * <Navigation>\n * <NavigationMenu title=\"Home\">\n * <NavigationGroup title=\"Group 1\">\n * <NavigationItem item=\"item-1\" title=\"Item 1\" />\n * <NavigationItem item=\"item-2\" title=\"Item 2\" />\n * </NavigationGroup>\n * <NavigationGroup title=\"Group 2\">\n * <NavigationItem\n * item=\"item-3\"\n * navigateToMenu=\"category\"\n * title=\"Category\"\n * />\n * </NavigationGroup>\n * </NavigationMenu>\n *\n * <NavigationMenu\n * backButtonLabel=\"Home\"\n * menu=\"category\"\n * parentMenu=\"root\"\n * title=\"Category\"\n * >\n * <NavigationItem badge=\"1\" item=\"child-1\" title=\"Child 1\" />\n * <NavigationItem item=\"child-2\" title=\"Child 2\" />\n * </NavigationMenu>\n * </Navigation>\n * );\n * ```\n */\nexport function Navigation( {\n\tactiveItem,\n\tactiveMenu = ROOT_MENU,\n\tchildren,\n\tclassName,\n\tonActivateMenu = noop,\n}: NavigationProps ) {\n\tconst [ menu, setMenu ] = useState( activeMenu );\n\tconst [ slideOrigin, setSlideOrigin ] = useState< 'left' | 'right' >();\n\tconst navigationTree = useCreateNavigationTree();\n\tconst defaultSlideOrigin = isRTL() ? 'right' : 'left';\n\n\tdeprecated( 'wp.components.Navigation (and all subcomponents)', {\n\t\tsince: '6.8',\n\t\tversion: '7.1',\n\t\talternative: 'wp.components.Navigator',\n\t} );\n\n\tconst setActiveMenu: NavigationContextType[ 'setActiveMenu' ] = (\n\t\tmenuId,\n\t\tslideInOrigin = defaultSlideOrigin\n\t) => {\n\t\tif ( ! navigationTree.getMenu( menuId ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetSlideOrigin( slideInOrigin );\n\t\tsetMenu( menuId );\n\t\tonActivateMenu( menuId );\n\t};\n\n\t// Used to prevent the sliding animation on mount\n\tconst isMountedRef = useRef( false );\n\tuseEffect( () => {\n\t\tif ( ! isMountedRef.current ) {\n\t\t\tisMountedRef.current = true;\n\t\t}\n\t}, [] );\n\n\tuseEffect( () => {\n\t\tif ( activeMenu !== menu ) {\n\t\t\tsetActiveMenu( activeMenu );\n\t\t}\n\t\t// Not adding deps for now, as it would require either a larger refactor or some questionable workarounds.\n\t\t// See https://github.com/WordPress/gutenberg/pull/41612 for context.\n\t}, [ activeMenu ] );\n\n\tconst context = {\n\t\tactiveItem,\n\t\tactiveMenu: menu,\n\t\tsetActiveMenu,\n\t\tnavigationTree,\n\t};\n\n\tconst classes = clsx( 'components-navigation', className );\n\tconst animateClassName = getAnimateClassName( {\n\t\ttype: 'slide-in',\n\t\torigin: slideOrigin,\n\t} );\n\n\treturn (\n\t\t<NavigationUI className={ classes }>\n\t\t\t<div\n\t\t\t\tkey={ menu }\n\t\t\t\tclassName={\n\t\t\t\t\tanimateClassName\n\t\t\t\t\t\t? clsx( {\n\t\t\t\t\t\t\t\t[ animateClassName ]:\n\t\t\t\t\t\t\t\t\tisMountedRef.current && slideOrigin,\n\t\t\t\t\t\t } )\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t<NavigationContext.Provider value={ context }>\n\t\t\t\t\t{ children }\n\t\t\t\t</NavigationContext.Provider>\n\t\t\t</div>\n\t\t</NavigationUI>\n\t);\n}\n\nexport default Navigation;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst chevronRight = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z\" />\n\t</SVG>\n);\n\nexport default chevronRight;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst chevronLeft = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z\" />\n\t</SVG>\n);\n\nexport default chevronLeft;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { __, isRTL } from '@wordpress/i18n';\nimport { Icon, chevronLeft, chevronRight } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { useNavigationContext } from '../context';\nimport { MenuBackButtonUI } from '../styles/navigation-styles';\n\nimport type { NavigationBackButtonProps } from '../types';\n\nfunction UnforwardedNavigationBackButton(\n\t{\n\t\tbackButtonLabel,\n\t\tclassName,\n\t\thref,\n\t\tonClick,\n\t\tparentMenu,\n\t}: NavigationBackButtonProps,\n\tref: React.ForwardedRef< HTMLAnchorElement | HTMLButtonElement >\n) {\n\tconst { setActiveMenu, navigationTree } = useNavigationContext();\n\n\tconst classes = clsx( 'components-navigation__back-button', className );\n\n\tconst parentMenuTitle =\n\t\tparentMenu !== undefined\n\t\t\t? navigationTree.getMenu( parentMenu )?.title\n\t\t\t: undefined;\n\n\tconst handleOnClick: React.MouseEventHandler< HTMLElement > = ( event ) => {\n\t\tif ( typeof onClick === 'function' ) {\n\t\t\tonClick( event );\n\t\t}\n\n\t\tconst animationDirection = isRTL() ? 'left' : 'right';\n\t\tif ( parentMenu && ! event.defaultPrevented ) {\n\t\t\tsetActiveMenu( parentMenu, animationDirection );\n\t\t}\n\t};\n\tconst icon = isRTL() ? chevronRight : chevronLeft;\n\treturn (\n\t\t<MenuBackButtonUI\n\t\t\t__next40pxDefaultSize\n\t\t\tclassName={ classes }\n\t\t\thref={ href }\n\t\t\tvariant=\"tertiary\"\n\t\t\tref={ ref }\n\t\t\tonClick={ handleOnClick }\n\t\t>\n\t\t\t<Icon icon={ icon } />\n\t\t\t{ backButtonLabel || parentMenuTitle || __( 'Back' ) }\n\t\t</MenuBackButtonUI>\n\t);\n}\n\n/**\n * @deprecated Use `Navigator` instead.\n */\nexport const NavigationBackButton = forwardRef(\n\tUnforwardedNavigationBackButton\n);\n\nexport default NavigationBackButton;\n","/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { NavigationGroupContext as NavigationGroupContextType } from '../types';\n\nexport const NavigationGroupContext =\n\tcreateContext< NavigationGroupContextType >( { group: undefined } );\n\nexport const useNavigationGroupContext = () =>\n\tuseContext( NavigationGroupContext );\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { NavigationGroupContext } from './context';\nimport { GroupTitleUI } from '../styles/navigation-styles';\nimport { useNavigationContext } from '../context';\n\nimport type { NavigationGroupProps } from '../types';\n\nlet uniqueId = 0;\n\n/**\n * @deprecated Use `Navigator` instead.\n */\nexport function NavigationGroup( {\n\tchildren,\n\tclassName,\n\ttitle,\n}: NavigationGroupProps ) {\n\tconst [ groupId ] = useState( `group-${ ++uniqueId }` );\n\tconst {\n\t\tnavigationTree: { items },\n\t} = useNavigationContext();\n\n\tconst context = { group: groupId };\n\n\t// Keep the children rendered to make sure invisible items are included in the navigation tree.\n\tif (\n\t\t! Object.values( items ).some(\n\t\t\t( item ) => item.group === groupId && item._isVisible\n\t\t)\n\t) {\n\t\treturn (\n\t\t\t<NavigationGroupContext.Provider value={ context }>\n\t\t\t\t{ children }\n\t\t\t</NavigationGroupContext.Provider>\n\t\t);\n\t}\n\n\tconst groupTitleId = `components-navigation__group-title-${ groupId }`;\n\tconst classes = clsx( 'components-navigation__group', className );\n\n\treturn (\n\t\t<NavigationGroupContext.Provider value={ context }>\n\t\t\t<li className={ classes }>\n\t\t\t\t{ title && (\n\t\t\t\t\t<GroupTitleUI\n\t\t\t\t\t\tclassName=\"components-navigation__group-title\"\n\t\t\t\t\t\tid={ groupTitleId }\n\t\t\t\t\t\tlevel={ 3 }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ title }\n\t\t\t\t\t</GroupTitleUI>\n\t\t\t\t) }\n\t\t\t\t<ul aria-labelledby={ groupTitleId } role=\"group\">\n\t\t\t\t\t{ children }\n\t\t\t\t</ul>\n\t\t\t</li>\n\t\t</NavigationGroupContext.Provider>\n\t);\n}\n\nexport default NavigationGroup;\n","/**\n * Internal dependencies\n */\nimport { ItemBadgeUI, ItemTitleUI } from '../styles/navigation-styles';\n\nimport type { NavigationItemBaseContentProps } from '../types';\n\nexport default function NavigationItemBaseContent(\n\tprops: NavigationItemBaseContentProps\n) {\n\tconst { badge, title } = props;\n\n\treturn (\n\t\t<>\n\t\t\t{ title && (\n\t\t\t\t<ItemTitleUI\n\t\t\t\t\tclassName=\"components-navigation__item-title\"\n\t\t\t\t\tas=\"span\"\n\t\t\t\t>\n\t\t\t\t\t{ title }\n\t\t\t\t</ItemTitleUI>\n\t\t\t) }\n\n\t\t\t{ badge && (\n\t\t\t\t<ItemBadgeUI className=\"components-navigation__item-badge\">\n\t\t\t\t\t{ badge }\n\t\t\t\t</ItemBadgeUI>\n\t\t\t) }\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { NavigationMenuContext as NavigationMenuContextType } from '../types';\n\nexport const NavigationMenuContext = createContext< NavigationMenuContextType >(\n\t{\n\t\tmenu: undefined,\n\t\tsearch: '',\n\t}\n);\nexport const useNavigationMenuContext = () =>\n\tuseContext( NavigationMenuContext );\n","/**\n * External dependencies\n */\nimport removeAccents from 'remove-accents';\n\n// @see packages/block-editor/src/components/inserter/search-items.js\nexport const normalizeInput = ( input: string ) =>\n\tremoveAccents( input ).replace( /^\\//, '' ).toLowerCase();\n\nexport const normalizedSearch = ( title: string, search: string ) =>\n\t-1 !== normalizeInput( title ).indexOf( normalizeInput( search ) );\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useNavigationContext } from '../context';\nimport { useNavigationTreeItem } from './use-navigation-tree-item';\nimport { ItemBaseUI } from '../styles/navigation-styles';\n\nimport type { NavigationItemBaseProps } from '../types';\n\nlet uniqueId = 0;\n\nexport default function NavigationItemBase( props: NavigationItemBaseProps ) {\n\t// Also avoid to pass the `title` and `href` props to the ItemBaseUI styled component.\n\tconst { children, className, title, href, ...restProps } = props;\n\n\tconst [ itemId ] = useState( `item-${ ++uniqueId }` );\n\n\tuseNavigationTreeItem( itemId, props );\n\tconst { navigationTree } = useNavigationContext();\n\n\tif ( ! navigationTree.getItem( itemId )?._isVisible ) {\n\t\treturn null;\n\t}\n\n\tconst classes = clsx( 'components-navigation__item', className );\n\n\treturn (\n\t\t<ItemBaseUI className={ classes } { ...restProps }>\n\t\t\t{ children }\n\t\t</ItemBaseUI>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useNavigationContext } from '../context';\nimport { useNavigationGroupContext } from '../group/context';\nimport { useNavigationMenuContext } from '../menu/context';\nimport { normalizedSearch } from '../utils';\n\nimport type { NavigationItemProps } from '../types';\n\nexport const useNavigationTreeItem = (\n\titemId: string,\n\tprops: NavigationItemProps\n) => {\n\tconst {\n\t\tactiveMenu,\n\t\tnavigationTree: { addItem, removeItem },\n\t} = useNavigationContext();\n\tconst { group } = useNavigationGroupContext();\n\tconst { menu, search } = useNavigationMenuContext();\n\n\tuseEffect( () => {\n\t\tconst isMenuActive = activeMenu === menu;\n\t\tconst isItemVisible =\n\t\t\t! search ||\n\t\t\t( props.title !== undefined &&\n\t\t\t\tnormalizedSearch( props.title, search ) );\n\n\t\taddItem( itemId, {\n\t\t\t...props,\n\t\t\tgroup,\n\t\t\tmenu,\n\t\t\t_isVisible: isMenuActive && isItemVisible,\n\t\t} );\n\n\t\treturn () => {\n\t\t\tremoveItem( itemId );\n\t\t};\n\t\t// Not adding deps for now, as it would require either a larger refactor.\n\t\t// See https://github.com/WordPress/gutenberg/pull/41639\n\t}, [ activeMenu, search ] );\n};\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Icon, chevronLeft, chevronRight } from '@wordpress/icons';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport { useNavigationContext } from '../context';\nimport { ItemUI, ItemIconUI } from '../styles/navigation-styles';\nimport NavigationItemBaseContent from './base-content';\nimport NavigationItemBase from './base';\n\nimport type { NavigationItemProps } from '../types';\n\nconst noop = () => {};\n\n/**\n * @deprecated Use `Navigator` instead.\n */\nexport function NavigationItem( props: NavigationItemProps ) {\n\tconst {\n\t\tbadge,\n\t\tchildren,\n\t\tclassName,\n\t\thref,\n\t\titem,\n\t\tnavigateToMenu,\n\t\tonClick = noop,\n\t\ttitle,\n\t\ticon,\n\t\thideIfTargetMenuEmpty,\n\t\tisText,\n\t\t...restProps\n\t} = props;\n\n\tconst {\n\t\tactiveItem,\n\t\tsetActiveMenu,\n\t\tnavigationTree: { isMenuEmpty },\n\t} = useNavigationContext();\n\n\t// If hideIfTargetMenuEmpty prop is true\n\t// And the menu we are supposed to navigate to\n\t// Is marked as empty, then we skip rendering the item.\n\tif (\n\t\thideIfTargetMenuEmpty &&\n\t\tnavigateToMenu &&\n\t\tisMenuEmpty( navigateToMenu )\n\t) {\n\t\treturn null;\n\t}\n\n\tconst isActive = item && activeItem === item;\n\n\tconst classes = clsx( className, {\n\t\t'is-active': isActive,\n\t} );\n\n\tconst onItemClick: React.MouseEventHandler<\n\t\tHTMLButtonElement | HTMLAnchorElement\n\t> = ( event ) => {\n\t\tif ( navigateToMenu ) {\n\t\t\tsetActiveMenu( navigateToMenu );\n\t\t}\n\n\t\tonClick( event );\n\t};\n\tconst navigationIcon = isRTL() ? chevronLeft : chevronRight;\n\tconst baseProps = children ? props : { ...props, onClick: undefined };\n\tconst itemProps = isText\n\t\t? restProps\n\t\t: {\n\t\t\t\tas: Button,\n\t\t\t\t__next40pxDefaultSize:\n\t\t\t\t\t'as' in restProps ? restProps.as === undefined : true,\n\t\t\t\thref,\n\t\t\t\tonClick: onItemClick,\n\t\t\t\t'aria-current': isActive ? 'page' : undefined,\n\t\t\t\t...restProps,\n\t\t };\n\n\treturn (\n\t\t<NavigationItemBase { ...baseProps } className={ classes }>\n\t\t\t{ children || (\n\t\t\t\t<ItemUI { ...itemProps }>\n\t\t\t\t\t{ icon && (\n\t\t\t\t\t\t<ItemIconUI>\n\t\t\t\t\t\t\t<Icon icon={ icon } />\n\t\t\t\t\t\t</ItemIconUI>\n\t\t\t\t\t) }\n\n\t\t\t\t\t<NavigationItemBaseContent\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\tbadge={ badge }\n\t\t\t\t\t/>\n\n\t\t\t\t\t{ navigateToMenu && <Icon icon={ navigationIcon } /> }\n\t\t\t\t</ItemUI>\n\t\t\t) }\n\t\t</NavigationItemBase>\n\t);\n}\n\nexport default NavigationItem;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst search = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z\" />\n\t</SVG>\n);\n\nexport default search;\n","/**\n * WordPress dependencies\n */\nimport { createHigherOrderComponent, useDebounce } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\n\n/** @typedef {import('react').ComponentType} ComponentType */\n\n/**\n * A Higher Order Component used to provide speak and debounced speak functions.\n *\n * @see https://developer.wordpress.org/block-editor/packages/packages-a11y/#speak\n *\n * @param {ComponentType} Component The component to be wrapped.\n *\n * @return {ComponentType} The wrapped component.\n */\nexport default createHigherOrderComponent(\n\t( Component ) => ( props ) => (\n\t\t<Component\n\t\t\t{ ...props }\n\t\t\tspeak={ speak }\n\t\t\tdebouncedSpeak={ useDebounce( speak, 500 ) }\n\t\t/>\n\t),\n\t'withSpokenMessages'\n);\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport { space } from '../utils/space';\nimport InputControl from '../input-control';\nimport { COLORS } from '../utils';\nimport type { SearchControlProps } from './types';\n\nconst inlinePadding = ( {\n\tsize,\n}: Required< Pick< SearchControlProps, 'size' > > ) => {\n\treturn space( size === 'compact' ? 1 : 2 );\n};\n\nexport const SuffixItemWrapper = styled.div`\n\tdisplay: flex;\n\tpadding-inline-end: ${ inlinePadding };\n\n\tsvg {\n\t\tfill: currentColor;\n\t}\n`;\n\nexport const StyledInputControl = styled( InputControl )`\n\tinput[type='search'] {\n\t\t&::-webkit-search-decoration,\n\t\t&::-webkit-search-cancel-button,\n\t\t&::-webkit-search-results-button,\n\t\t&::-webkit-search-results-decoration {\n\t\t\t-webkit-appearance: none;\n\t\t}\n\t}\n\n\t&:not( :focus-within ) {\n\t\t--wp-components-color-background: ${ COLORS.theme.gray[ 100 ] };\n\t}\n`;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { Icon, search, closeSmall } from '@wordpress/icons';\nimport { forwardRef, useMemo, useRef } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport type { WordPressComponentProps } from '../context/wordpress-component';\nimport type { SearchControlProps, SuffixItemProps } from './types';\nimport type { ForwardedRef } from 'react';\nimport { ContextSystemProvider } from '../context';\nimport { StyledInputControl, SuffixItemWrapper } from './styles';\n\nfunction SuffixItem( {\n\tsearchRef,\n\tvalue,\n\tonChange,\n\tonClose,\n}: SuffixItemProps ) {\n\tif ( ! onClose && ! value ) {\n\t\treturn <Icon icon={ search } />;\n\t}\n\n\tif ( onClose ) {\n\t\tdeprecated( '`onClose` prop in wp.components.SearchControl', {\n\t\t\tsince: '6.8',\n\t\t} );\n\t}\n\n\tconst onReset = () => {\n\t\tonChange( '' );\n\t\tsearchRef.current?.focus();\n\t};\n\n\treturn (\n\t\t<Button\n\t\t\tsize=\"small\"\n\t\t\ticon={ closeSmall }\n\t\t\tlabel={ onClose ? __( 'Close search' ) : __( 'Reset search' ) }\n\t\t\tonClick={ onClose ?? onReset }\n\t\t/>\n\t);\n}\n\nfunction UnforwardedSearchControl(\n\t{\n\t\t__nextHasNoMarginBottom = false,\n\t\tclassName,\n\t\tonChange,\n\t\tvalue,\n\t\tlabel = __( 'Search' ),\n\t\tplaceholder = __( 'Search' ),\n\t\thideLabelFromVision = true,\n\t\tonClose,\n\t\tsize = 'default',\n\t\t...restProps\n\t}: Omit<\n\t\tWordPressComponentProps< SearchControlProps, 'input', false >,\n\t\t// TODO: Background styling currently doesn't support a disabled state. Needs design work.\n\t\t'disabled'\n\t>,\n\tforwardedRef: ForwardedRef< HTMLInputElement >\n) {\n\t// @ts-expect-error The `disabled` prop is not yet supported in the SearchControl component.\n\t// Work with the design team (@WordPress/gutenberg-design) if you need this feature.\n\tconst { disabled, ...filteredRestProps } = restProps;\n\n\tconst searchRef = useRef< HTMLInputElement >( null );\n\tconst instanceId = useInstanceId(\n\t\tSearchControl,\n\t\t'components-search-control'\n\t);\n\n\tconst contextValue = useMemo(\n\t\t() => ( {\n\t\t\tBaseControl: {\n\t\t\t\t// Overrides the underlying BaseControl `__nextHasNoMarginBottom` via the context system\n\t\t\t\t// to provide backwards compatible margin for SearchControl.\n\t\t\t\t// (In a standard InputControl, the BaseControl `__nextHasNoMarginBottom` is always set to true.)\n\t\t\t\t_overrides: { __nextHasNoMarginBottom },\n\t\t\t\t__associatedWPComponentName: 'SearchControl',\n\t\t\t},\n\t\t\t// `isBorderless` is still experimental and not a public prop for InputControl yet.\n\t\t\tInputBase: { isBorderless: true },\n\t\t} ),\n\t\t[ __nextHasNoMarginBottom ]\n\t);\n\n\treturn (\n\t\t<ContextSystemProvider value={ contextValue }>\n\t\t\t<StyledInputControl\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tid={ instanceId }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\tlabel={ label }\n\t\t\t\tref={ useMergeRefs( [ searchRef, forwardedRef ] ) }\n\t\t\t\ttype=\"search\"\n\t\t\t\tsize={ size }\n\t\t\t\tclassName={ clsx( 'components-search-control', className ) }\n\t\t\t\tonChange={ ( nextValue?: string ) =>\n\t\t\t\t\tonChange( nextValue ?? '' )\n\t\t\t\t}\n\t\t\t\tautoComplete=\"off\"\n\t\t\t\tplaceholder={ placeholder }\n\t\t\t\tvalue={ value ?? '' }\n\t\t\t\tsuffix={\n\t\t\t\t\t<SuffixItemWrapper size={ size }>\n\t\t\t\t\t\t<SuffixItem\n\t\t\t\t\t\t\tsearchRef={ searchRef }\n\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</SuffixItemWrapper>\n\t\t\t\t}\n\t\t\t\t{ ...filteredRestProps }\n\t\t\t/>\n\t\t</ContextSystemProvider>\n\t);\n}\n\n/**\n * SearchControl components let users display a search control.\n *\n * ```jsx\n * import { SearchControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * function MySearchControl( { className, setState } ) {\n * const [ searchInput, setSearchInput ] = useState( '' );\n *\n * return (\n * <SearchControl\n * __nextHasNoMarginBottom\n * value={ searchInput }\n * onChange={ setSearchInput }\n * />\n * );\n * }\n * ```\n */\nexport const SearchControl = forwardRef( UnforwardedSearchControl );\n\nexport default SearchControl;\n","/**\n * WordPress dependencies\n */\nimport { useEffect, useRef } from '@wordpress/element';\nimport { __, _n, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport withSpokenMessages from '../../higher-order/with-spoken-messages';\nimport { useNavigationMenuContext } from './context';\nimport { useNavigationContext } from '../context';\nimport { SEARCH_FOCUS_DELAY } from '../constants';\n\nimport type { NavigationMenuTitleSearchProps } from '../types';\nimport SearchControl from '../../search-control';\nimport { MenuTitleSearchControlWrapper } from '../styles/navigation-styles';\n\nfunction MenuTitleSearch( {\n\tdebouncedSpeak,\n\tonCloseSearch,\n\tonSearch,\n\tsearch,\n\ttitle,\n}: NavigationMenuTitleSearchProps ) {\n\tconst {\n\t\tnavigationTree: { items },\n\t} = useNavigationContext();\n\tconst { menu } = useNavigationMenuContext();\n\tconst inputRef = useRef< HTMLInputElement >( null );\n\n\t// Wait for the slide-in animation to complete before autofocusing the input.\n\t// This prevents scrolling to the input during the animation.\n\tuseEffect( () => {\n\t\tconst delayedFocus = setTimeout( () => {\n\t\t\tinputRef.current?.focus();\n\t\t}, SEARCH_FOCUS_DELAY );\n\n\t\treturn () => {\n\t\t\tclearTimeout( delayedFocus );\n\t\t};\n\t}, [] );\n\n\tuseEffect( () => {\n\t\tif ( ! search ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst count = Object.values( items ).filter(\n\t\t\t( item ) => item._isVisible\n\t\t).length;\n\t\tconst resultsFoundMessage = sprintf(\n\t\t\t/* translators: %d: number of results. */\n\t\t\t_n( '%d result found.', '%d results found.', count ),\n\t\t\tcount\n\t\t);\n\t\tdebouncedSpeak( resultsFoundMessage );\n\t\t// Not adding deps for now, as it would require either a larger refactor.\n\t\t// See https://github.com/WordPress/gutenberg/pull/44090\n\t}, [ items, search ] );\n\n\tconst onClose = () => {\n\t\tonSearch?.( '' );\n\t\tonCloseSearch();\n\t};\n\n\tconst onKeyDown: React.KeyboardEventHandler< HTMLInputElement > = (\n\t\tevent\n\t) => {\n\t\tif ( event.code === 'Escape' && ! event.defaultPrevented ) {\n\t\t\tevent.preventDefault();\n\t\t\tonClose();\n\t\t}\n\t};\n\n\tconst inputId = `components-navigation__menu-title-search-${ menu }`;\n\tconst placeholder = sprintf(\n\t\t/* translators: placeholder for menu search box. %s: menu title */\n\t\t__( 'Search %s' ),\n\t\ttitle?.toLowerCase()\n\t).trim();\n\n\treturn (\n\t\t<MenuTitleSearchControlWrapper>\n\t\t\t<SearchControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tclassName=\"components-navigation__menu-search-input\"\n\t\t\t\tid={ inputId }\n\t\t\t\tonChange={ ( value ) => onSearch?.( value ) }\n\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\tplaceholder={ placeholder }\n\t\t\t\tonClose={ onClose }\n\t\t\t\tref={ inputRef }\n\t\t\t\tvalue={ search }\n\t\t\t/>\n\t\t</MenuTitleSearchControlWrapper>\n\t);\n}\n\nexport default withSpokenMessages( MenuTitleSearch );\n","/**\n * WordPress dependencies\n */\nimport { useRef, useState } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Icon, search as searchIcon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { getAnimateClassName } from '../../animate';\nimport Button from '../../button';\nimport MenuTitleSearch from './menu-title-search';\nimport {\n\tGroupTitleUI,\n\tMenuTitleActionsUI,\n\tMenuTitleUI,\n} from '../styles/navigation-styles';\nimport { useNavigationMenuContext } from './context';\nimport { SEARCH_FOCUS_DELAY } from '../constants';\n\nimport type { NavigationMenuTitleProps } from '../types';\n\nexport default function NavigationMenuTitle( {\n\thasSearch,\n\tonSearch,\n\tsearch,\n\ttitle,\n\ttitleAction,\n}: NavigationMenuTitleProps ) {\n\tconst [ isSearching, setIsSearching ] = useState( false );\n\tconst { menu } = useNavigationMenuContext();\n\tconst searchButtonRef = useRef< HTMLElement >( null );\n\n\tif ( ! title ) {\n\t\treturn null;\n\t}\n\n\tconst onCloseSearch = () => {\n\t\tsetIsSearching( false );\n\n\t\t// Wait for the slide-in animation to complete before focusing the search button.\n\t\t// eslint-disable-next-line @wordpress/react-no-unsafe-timeout\n\t\tsetTimeout( () => {\n\t\t\tsearchButtonRef.current?.focus();\n\t\t}, SEARCH_FOCUS_DELAY );\n\t};\n\n\tconst menuTitleId = `components-navigation__menu-title-${ menu }`;\n\t/* translators: search button label for menu search box. %s: menu title */\n\tconst searchButtonLabel = sprintf( __( 'Search in %s' ), title );\n\n\treturn (\n\t\t<MenuTitleUI className=\"components-navigation__menu-title\">\n\t\t\t{ ! isSearching && (\n\t\t\t\t<GroupTitleUI\n\t\t\t\t\tas=\"h2\"\n\t\t\t\t\tclassName=\"components-navigation__menu-title-heading\"\n\t\t\t\t\tlevel={ 3 }\n\t\t\t\t>\n\t\t\t\t\t<span id={ menuTitleId }>{ title }</span>\n\n\t\t\t\t\t{ ( hasSearch || titleAction ) && (\n\t\t\t\t\t\t<MenuTitleActionsUI>\n\t\t\t\t\t\t\t{ titleAction }\n\n\t\t\t\t\t\t\t{ hasSearch && (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\t\t\tlabel={ searchButtonLabel }\n\t\t\t\t\t\t\t\t\tonClick={ () => setIsSearching( true ) }\n\t\t\t\t\t\t\t\t\tref={ searchButtonRef }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Icon icon={ searchIcon } />\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</MenuTitleActionsUI>\n\t\t\t\t\t) }\n\t\t\t\t</GroupTitleUI>\n\t\t\t) }\n\n\t\t\t{ isSearching && (\n\t\t\t\t<div\n\t\t\t\t\tclassName={ getAnimateClassName( {\n\t\t\t\t\t\ttype: 'slide-in',\n\t\t\t\t\t\torigin: 'left',\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t<MenuTitleSearch\n\t\t\t\t\t\tonCloseSearch={ onCloseSearch }\n\t\t\t\t\t\tonSearch={ onSearch }\n\t\t\t\t\t\tsearch={ search }\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</MenuTitleUI>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { useNavigationContext } from '../context';\nimport { ItemBaseUI, ItemUI } from '../styles/navigation-styles';\n\nimport type { NavigationSearchNoResultsFoundProps } from '../types';\n\nexport default function NavigationSearchNoResultsFound( {\n\tsearch,\n}: NavigationSearchNoResultsFoundProps ) {\n\tconst {\n\t\tnavigationTree: { items },\n\t} = useNavigationContext();\n\n\tconst resultsCount = Object.values( items ).filter(\n\t\t( item ) => item._isVisible\n\t).length;\n\n\tif ( ! search || !! resultsCount ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<ItemBaseUI>\n\t\t\t<ItemUI>{ __( 'No results found.' ) } </ItemUI>\n\t\t</ItemBaseUI>\n\t);\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { ROOT_MENU } from '../constants';\nimport { NavigationMenuContext } from './context';\nimport { useNavigationContext } from '../context';\nimport { useNavigationTreeMenu } from './use-navigation-tree-menu';\nimport NavigationBackButton from '../back-button';\nimport NavigationMenuTitle from './menu-title';\nimport NavigationSearchNoResultsFound from './search-no-results-found';\nimport { NavigableMenu } from '../../navigable-container';\nimport { MenuUI } from '../styles/navigation-styles';\n\nimport type { NavigationMenuProps } from '../types';\n\n/**\n * @deprecated Use `Navigator` instead.\n */\nexport function NavigationMenu( props: NavigationMenuProps ) {\n\tconst {\n\t\tbackButtonLabel,\n\t\tchildren,\n\t\tclassName,\n\t\thasSearch,\n\t\tmenu = ROOT_MENU,\n\t\tonBackButtonClick,\n\t\tonSearch: setControlledSearch,\n\t\tparentMenu,\n\t\tsearch: controlledSearch,\n\t\tisSearchDebouncing,\n\t\ttitle,\n\t\ttitleAction,\n\t} = props;\n\tconst [ uncontrolledSearch, setUncontrolledSearch ] = useState( '' );\n\tuseNavigationTreeMenu( props );\n\tconst { activeMenu } = useNavigationContext();\n\n\tconst context = {\n\t\tmenu,\n\t\tsearch: uncontrolledSearch,\n\t};\n\n\t// Keep the children rendered to make sure invisible items are included in the navigation tree.\n\tif ( activeMenu !== menu ) {\n\t\treturn (\n\t\t\t<NavigationMenuContext.Provider value={ context }>\n\t\t\t\t{ children }\n\t\t\t</NavigationMenuContext.Provider>\n\t\t);\n\t}\n\n\tconst isControlledSearch = !! setControlledSearch;\n\tconst search = isControlledSearch ? controlledSearch : uncontrolledSearch;\n\tconst onSearch = isControlledSearch\n\t\t? setControlledSearch\n\t\t: setUncontrolledSearch;\n\n\tconst menuTitleId = `components-navigation__menu-title-${ menu }`;\n\tconst classes = clsx( 'components-navigation__menu', className );\n\n\treturn (\n\t\t<NavigationMenuContext.Provider value={ context }>\n\t\t\t<MenuUI className={ classes }>\n\t\t\t\t{ ( parentMenu || onBackButtonClick ) && (\n\t\t\t\t\t<NavigationBackButton\n\t\t\t\t\t\tbackButtonLabel={ backButtonLabel }\n\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\tonClick={ onBackButtonClick }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ title && (\n\t\t\t\t\t<NavigationMenuTitle\n\t\t\t\t\t\thasSearch={ hasSearch }\n\t\t\t\t\t\tonSearch={ onSearch }\n\t\t\t\t\t\tsearch={ search }\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\ttitleAction={ titleAction }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t<NavigableMenu>\n\t\t\t\t\t<ul aria-labelledby={ menuTitleId }>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t{ search && ! isSearchDebouncing && (\n\t\t\t\t\t\t\t<NavigationSearchNoResultsFound search={ search } />\n\t\t\t\t\t\t) }\n\t\t\t\t\t</ul>\n\t\t\t\t</NavigableMenu>\n\t\t\t</MenuUI>\n\t\t</NavigationMenuContext.Provider>\n\t);\n}\n\nexport default NavigationMenu;\n","/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useNavigationContext } from '../context';\nimport { ROOT_MENU } from '../constants';\n\nimport type { NavigationMenuProps } from '../types';\n\nexport const useNavigationTreeMenu = ( props: NavigationMenuProps ) => {\n\tconst {\n\t\tnavigationTree: { addMenu, removeMenu },\n\t} = useNavigationContext();\n\n\tconst key = props.menu || ROOT_MENU;\n\tuseEffect( () => {\n\t\taddMenu( key, { ...props, menu: key } );\n\n\t\treturn () => {\n\t\t\tremoveMenu( key );\n\t\t};\n\t\t// Not adding deps for now, as it would require either a larger refactor\n\t\t// See https://github.com/WordPress/gutenberg/pull/44090\n\t}, [] );\n};\n","/**\n * Tokenizer results.\n */\ninterface LexToken {\n type:\n | \"OPEN\"\n | \"CLOSE\"\n | \"PATTERN\"\n | \"NAME\"\n | \"CHAR\"\n | \"ESCAPED_CHAR\"\n | \"MODIFIER\"\n | \"END\";\n index: number;\n value: string;\n}\n\n/**\n * Tokenize input string.\n */\nfunction lexer(str: string): LexToken[] {\n const tokens: LexToken[] = [];\n let i = 0;\n\n while (i < str.length) {\n const char = str[i];\n\n if (char === \"*\" || char === \"+\" || char === \"?\") {\n tokens.push({ type: \"MODIFIER\", index: i, value: str[i++] });\n continue;\n }\n\n if (char === \"\\\\\") {\n tokens.push({ type: \"ESCAPED_CHAR\", index: i++, value: str[i++] });\n continue;\n }\n\n if (char === \"{\") {\n tokens.push({ type: \"OPEN\", index: i, value: str[i++] });\n continue;\n }\n\n if (char === \"}\") {\n tokens.push({ type: \"CLOSE\", index: i, value: str[i++] });\n continue;\n }\n\n if (char === \":\") {\n let name = \"\";\n let j = i + 1;\n\n while (j < str.length) {\n const code = str.charCodeAt(j);\n\n if (\n // `0-9`\n (code >= 48 && code <= 57) ||\n // `A-Z`\n (code >= 65 && code <= 90) ||\n // `a-z`\n (code >= 97 && code <= 122) ||\n // `_`\n code === 95\n ) {\n name += str[j++];\n continue;\n }\n\n break;\n }\n\n if (!name) throw new TypeError(`Missing parameter name at ${i}`);\n\n tokens.push({ type: \"NAME\", index: i, value: name });\n i = j;\n continue;\n }\n\n if (char === \"(\") {\n let count = 1;\n let pattern = \"\";\n let j = i + 1;\n\n if (str[j] === \"?\") {\n throw new TypeError(`Pattern cannot start with \"?\" at ${j}`);\n }\n\n while (j < str.length) {\n if (str[j] === \"\\\\\") {\n pattern += str[j++] + str[j++];\n continue;\n }\n\n if (str[j] === \")\") {\n count--;\n if (count === 0) {\n j++;\n break;\n }\n } else if (str[j] === \"(\") {\n count++;\n if (str[j + 1] !== \"?\") {\n throw new TypeError(`Capturing groups are not allowed at ${j}`);\n }\n }\n\n pattern += str[j++];\n }\n\n if (count) throw new TypeError(`Unbalanced pattern at ${i}`);\n if (!pattern) throw new TypeError(`Missing pattern at ${i}`);\n\n tokens.push({ type: \"PATTERN\", index: i, value: pattern });\n i = j;\n continue;\n }\n\n tokens.push({ type: \"CHAR\", index: i, value: str[i++] });\n }\n\n tokens.push({ type: \"END\", index: i, value: \"\" });\n\n return tokens;\n}\n\nexport interface ParseOptions {\n /**\n * Set the default delimiter for repeat parameters. (default: `'/'`)\n */\n delimiter?: string;\n /**\n * List of characters to automatically consider prefixes when parsing.\n */\n prefixes?: string;\n}\n\n/**\n * Parse a string for the raw tokens.\n */\nexport function parse(str: string, options: ParseOptions = {}): Token[] {\n const tokens = lexer(str);\n const { prefixes = \"./\", delimiter = \"/#?\" } = options;\n const result: Token[] = [];\n let key = 0;\n let i = 0;\n let path = \"\";\n\n const tryConsume = (type: LexToken[\"type\"]): string | undefined => {\n if (i < tokens.length && tokens[i].type === type) return tokens[i++].value;\n };\n\n const mustConsume = (type: LexToken[\"type\"]): string => {\n const value = tryConsume(type);\n if (value !== undefined) return value;\n const { type: nextType, index } = tokens[i];\n throw new TypeError(`Unexpected ${nextType} at ${index}, expected ${type}`);\n };\n\n const consumeText = (): string => {\n let result = \"\";\n let value: string | undefined;\n while ((value = tryConsume(\"CHAR\") || tryConsume(\"ESCAPED_CHAR\"))) {\n result += value;\n }\n return result;\n };\n\n const isSafe = (value: string): boolean => {\n for (const char of delimiter) if (value.indexOf(char) > -1) return true;\n return false;\n };\n\n const safePattern = (prefix: string) => {\n const prev = result[result.length - 1];\n const prevText = prefix || (prev && typeof prev === \"string\" ? prev : \"\");\n\n if (prev && !prevText) {\n throw new TypeError(\n `Must have text between two parameters, missing text after \"${(prev as Key).name}\"`,\n );\n }\n\n if (!prevText || isSafe(prevText)) return `[^${escapeString(delimiter)}]+?`;\n return `(?:(?!${escapeString(prevText)})[^${escapeString(delimiter)}])+?`;\n };\n\n while (i < tokens.length) {\n const char = tryConsume(\"CHAR\");\n const name = tryConsume(\"NAME\");\n const pattern = tryConsume(\"PATTERN\");\n\n if (name || pattern) {\n let prefix = char || \"\";\n\n if (prefixes.indexOf(prefix) === -1) {\n path += prefix;\n prefix = \"\";\n }\n\n if (path) {\n result.push(path);\n path = \"\";\n }\n\n result.push({\n name: name || key++,\n prefix,\n suffix: \"\",\n pattern: pattern || safePattern(prefix),\n modifier: tryConsume(\"MODIFIER\") || \"\",\n });\n continue;\n }\n\n const value = char || tryConsume(\"ESCAPED_CHAR\");\n if (value) {\n path += value;\n continue;\n }\n\n if (path) {\n result.push(path);\n path = \"\";\n }\n\n const open = tryConsume(\"OPEN\");\n if (open) {\n const prefix = consumeText();\n const name = tryConsume(\"NAME\") || \"\";\n const pattern = tryConsume(\"PATTERN\") || \"\";\n const suffix = consumeText();\n\n mustConsume(\"CLOSE\");\n\n result.push({\n name: name || (pattern ? key++ : \"\"),\n pattern: name && !pattern ? safePattern(prefix) : pattern,\n prefix,\n suffix,\n modifier: tryConsume(\"MODIFIER\") || \"\",\n });\n continue;\n }\n\n mustConsume(\"END\");\n }\n\n return result;\n}\n\nexport interface TokensToFunctionOptions {\n /**\n * When `true` the regexp will be case sensitive. (default: `false`)\n */\n sensitive?: boolean;\n /**\n * Function for encoding input strings for output.\n */\n encode?: (value: string, token: Key) => string;\n /**\n * When `false` the function can produce an invalid (unmatched) path. (default: `true`)\n */\n validate?: boolean;\n}\n\n/**\n * Compile a string to a template function for the path.\n */\nexport function compile<P extends object = object>(\n str: string,\n options?: ParseOptions & TokensToFunctionOptions,\n) {\n return tokensToFunction<P>(parse(str, options), options);\n}\n\nexport type PathFunction<P extends object = object> = (data?: P) => string;\n\n/**\n * Expose a method for transforming tokens into the path function.\n */\nexport function tokensToFunction<P extends object = object>(\n tokens: Token[],\n options: TokensToFunctionOptions = {},\n): PathFunction<P> {\n const reFlags = flags(options);\n const { encode = (x: string) => x, validate = true } = options;\n\n // Compile all the tokens into regexps.\n const matches = tokens.map((token) => {\n if (typeof token === \"object\") {\n return new RegExp(`^(?:${token.pattern})$`, reFlags);\n }\n });\n\n return (data: Record<string, any> | null | undefined) => {\n let path = \"\";\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n if (typeof token === \"string\") {\n path += token;\n continue;\n }\n\n const value = data ? data[token.name] : undefined;\n const optional = token.modifier === \"?\" || token.modifier === \"*\";\n const repeat = token.modifier === \"*\" || token.modifier === \"+\";\n\n if (Array.isArray(value)) {\n if (!repeat) {\n throw new TypeError(\n `Expected \"${token.name}\" to not repeat, but got an array`,\n );\n }\n\n if (value.length === 0) {\n if (optional) continue;\n\n throw new TypeError(`Expected \"${token.name}\" to not be empty`);\n }\n\n for (let j = 0; j < value.length; j++) {\n const segment = encode(value[j], token);\n\n if (validate && !(matches[i] as RegExp).test(segment)) {\n throw new TypeError(\n `Expected all \"${token.name}\" to match \"${token.pattern}\", but got \"${segment}\"`,\n );\n }\n\n path += token.prefix + segment + token.suffix;\n }\n\n continue;\n }\n\n if (typeof value === \"string\" || typeof value === \"number\") {\n const segment = encode(String(value), token);\n\n if (validate && !(matches[i] as RegExp).test(segment)) {\n throw new TypeError(\n `Expected \"${token.name}\" to match \"${token.pattern}\", but got \"${segment}\"`,\n );\n }\n\n path += token.prefix + segment + token.suffix;\n continue;\n }\n\n if (optional) continue;\n\n const typeOfMessage = repeat ? \"an array\" : \"a string\";\n throw new TypeError(`Expected \"${token.name}\" to be ${typeOfMessage}`);\n }\n\n return path;\n };\n}\n\nexport interface RegexpToFunctionOptions {\n /**\n * Function for decoding strings for params.\n */\n decode?: (value: string, token: Key) => string;\n}\n\n/**\n * A match result contains data about the path match.\n */\nexport interface MatchResult<P extends object = object> {\n path: string;\n index: number;\n params: P;\n}\n\n/**\n * A match is either `false` (no match) or a match result.\n */\nexport type Match<P extends object = object> = false | MatchResult<P>;\n\n/**\n * The match function takes a string and returns whether it matched the path.\n */\nexport type MatchFunction<P extends object = object> = (\n path: string,\n) => Match<P>;\n\n/**\n * Create path match function from `path-to-regexp` spec.\n */\nexport function match<P extends object = object>(\n str: Path,\n options?: ParseOptions & TokensToRegexpOptions & RegexpToFunctionOptions,\n) {\n const keys: Key[] = [];\n const re = pathToRegexp(str, keys, options);\n return regexpToFunction<P>(re, keys, options);\n}\n\n/**\n * Create a path match function from `path-to-regexp` output.\n */\nexport function regexpToFunction<P extends object = object>(\n re: RegExp,\n keys: Key[],\n options: RegexpToFunctionOptions = {},\n): MatchFunction<P> {\n const { decode = (x: string) => x } = options;\n\n return function (pathname: string) {\n const m = re.exec(pathname);\n if (!m) return false;\n\n const { 0: path, index } = m;\n const params = Object.create(null);\n\n for (let i = 1; i < m.length; i++) {\n if (m[i] === undefined) continue;\n\n const key = keys[i - 1];\n\n if (key.modifier === \"*\" || key.modifier === \"+\") {\n params[key.name] = m[i].split(key.prefix + key.suffix).map((value) => {\n return decode(value, key);\n });\n } else {\n params[key.name] = decode(m[i], key);\n }\n }\n\n return { path, index, params };\n };\n}\n\n/**\n * Escape a regular expression string.\n */\nfunction escapeString(str: string) {\n return str.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g, \"\\\\$1\");\n}\n\n/**\n * Get the flags for a regexp from the options.\n */\nfunction flags(options?: { sensitive?: boolean }) {\n return options && options.sensitive ? \"\" : \"i\";\n}\n\n/**\n * Metadata about a key.\n */\nexport interface Key {\n name: string | number;\n prefix: string;\n suffix: string;\n pattern: string;\n modifier: string;\n}\n\n/**\n * A token is a string (nothing special) or key metadata (capture group).\n */\nexport type Token = string | Key;\n\n/**\n * Pull out keys from a regexp.\n */\nfunction regexpToRegexp(path: RegExp, keys?: Key[]): RegExp {\n if (!keys) return path;\n\n const groupsRegex = /\\((?:\\?<(.*?)>)?(?!\\?)/g;\n\n let index = 0;\n let execResult = groupsRegex.exec(path.source);\n while (execResult) {\n keys.push({\n // Use parenthesized substring match if available, index otherwise\n name: execResult[1] || index++,\n prefix: \"\",\n suffix: \"\",\n modifier: \"\",\n pattern: \"\",\n });\n execResult = groupsRegex.exec(path.source);\n }\n\n return path;\n}\n\n/**\n * Transform an array into a regexp.\n */\nfunction arrayToRegexp(\n paths: Array<string | RegExp>,\n keys?: Key[],\n options?: TokensToRegexpOptions & ParseOptions,\n): RegExp {\n const parts = paths.map((path) => pathToRegexp(path, keys, options).source);\n return new RegExp(`(?:${parts.join(\"|\")})`, flags(options));\n}\n\n/**\n * Create a path regexp from string input.\n */\nfunction stringToRegexp(\n path: string,\n keys?: Key[],\n options?: TokensToRegexpOptions & ParseOptions,\n) {\n return tokensToRegexp(parse(path, options), keys, options);\n}\n\nexport interface TokensToRegexpOptions {\n /**\n * When `true` the regexp will be case sensitive. (default: `false`)\n */\n sensitive?: boolean;\n /**\n * When `true` the regexp won't allow an optional trailing delimiter to match. (default: `false`)\n */\n strict?: boolean;\n /**\n * When `true` the regexp will match to the end of the string. (default: `true`)\n */\n end?: boolean;\n /**\n * When `true` the regexp will match from the beginning of the string. (default: `true`)\n */\n start?: boolean;\n /**\n * Sets the final character for non-ending optimistic matches. (default: `/`)\n */\n delimiter?: string;\n /**\n * List of characters that can also be \"end\" characters.\n */\n endsWith?: string;\n /**\n * Encode path tokens for use in the `RegExp`.\n */\n encode?: (value: string) => string;\n}\n\n/**\n * Expose a function for taking tokens and returning a RegExp.\n */\nexport function tokensToRegexp(\n tokens: Token[],\n keys?: Key[],\n options: TokensToRegexpOptions = {},\n) {\n const {\n strict = false,\n start = true,\n end = true,\n encode = (x: string) => x,\n delimiter = \"/#?\",\n endsWith = \"\",\n } = options;\n const endsWithRe = `[${escapeString(endsWith)}]|$`;\n const delimiterRe = `[${escapeString(delimiter)}]`;\n let route = start ? \"^\" : \"\";\n\n // Iterate over the tokens and create our regexp string.\n for (const token of tokens) {\n if (typeof token === \"string\") {\n route += escapeString(encode(token));\n } else {\n const prefix = escapeString(encode(token.prefix));\n const suffix = escapeString(encode(token.suffix));\n\n if (token.pattern) {\n if (keys) keys.push(token);\n\n if (prefix || suffix) {\n if (token.modifier === \"+\" || token.modifier === \"*\") {\n const mod = token.modifier === \"*\" ? \"?\" : \"\";\n route += `(?:${prefix}((?:${token.pattern})(?:${suffix}${prefix}(?:${token.pattern}))*)${suffix})${mod}`;\n } else {\n route += `(?:${prefix}(${token.pattern})${suffix})${token.modifier}`;\n }\n } else {\n if (token.modifier === \"+\" || token.modifier === \"*\") {\n throw new TypeError(\n `Can not repeat \"${token.name}\" without a prefix and suffix`,\n );\n }\n\n route += `(${token.pattern})${token.modifier}`;\n }\n } else {\n route += `(?:${prefix}${suffix})${token.modifier}`;\n }\n }\n }\n\n if (end) {\n if (!strict) route += `${delimiterRe}?`;\n\n route += !options.endsWith ? \"$\" : `(?=${endsWithRe})`;\n } else {\n const endToken = tokens[tokens.length - 1];\n const isEndDelimited =\n typeof endToken === \"string\"\n ? delimiterRe.indexOf(endToken[endToken.length - 1]) > -1\n : endToken === undefined;\n\n if (!strict) {\n route += `(?:${delimiterRe}(?=${endsWithRe}))?`;\n }\n\n if (!isEndDelimited) {\n route += `(?=${delimiterRe}|${endsWithRe})`;\n }\n }\n\n return new RegExp(route, flags(options));\n}\n\n/**\n * Supported `path-to-regexp` input types.\n */\nexport type Path = string | RegExp | Array<string | RegExp>;\n\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n */\nexport function pathToRegexp(\n path: Path,\n keys?: Key[],\n options?: TokensToRegexpOptions & ParseOptions,\n) {\n if (path instanceof RegExp) return regexpToRegexp(path, keys);\n if (Array.isArray(path)) return arrayToRegexp(path, keys, options);\n return stringToRegexp(path, keys, options);\n}\n","/**\n * External dependencies\n */\nimport { match } from 'path-to-regexp';\n\n/**\n * Internal dependencies\n */\nimport type { Screen, MatchParams } from '../types';\n\nfunction matchPath( path: string, pattern: string ) {\n\tconst matchingFunction = match< MatchParams >( pattern, {\n\t\tdecode: decodeURIComponent,\n\t} );\n\treturn matchingFunction( path );\n}\n\nexport function patternMatch( path: string, screens: Screen[] ) {\n\tfor ( const screen of screens ) {\n\t\tconst matched = matchPath( path, screen.path );\n\t\tif ( matched ) {\n\t\t\treturn { params: matched.params, id: screen.id };\n\t\t}\n\t}\n\n\treturn undefined;\n}\n\nexport function findParent( path: string, screens: Screen[] ) {\n\tif ( ! path.startsWith( '/' ) ) {\n\t\treturn undefined;\n\t}\n\tconst pathParts = path.split( '/' );\n\tlet parentPath;\n\twhile ( pathParts.length > 1 && parentPath === undefined ) {\n\t\tpathParts.pop();\n\t\tconst potentialParentPath =\n\t\t\tpathParts.join( '/' ) === '' ? '/' : pathParts.join( '/' );\n\t\tif (\n\t\t\tscreens.find( ( screen ) => {\n\t\t\t\treturn matchPath( potentialParentPath, screen.path ) !== false;\n\t\t\t} )\n\t\t) {\n\t\t\tparentPath = potentialParentPath;\n\t\t}\n\t}\n\n\treturn parentPath;\n}\n","/**\n * WordPress dependencies\n */\nimport { createContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { NavigatorContext as NavigatorContextType } from './types';\n\nconst initialContextValue: NavigatorContextType = {\n\tlocation: {},\n\tgoTo: () => {},\n\tgoBack: () => {},\n\tgoToParent: () => {},\n\taddScreen: () => {},\n\tremoveScreen: () => {},\n\tparams: {},\n};\nexport const NavigatorContext = createContext( initialContextValue );\n","/**\n * External dependencies\n */\nimport { css, keyframes } from '@emotion/react';\n\nexport const navigatorWrapper = css`\n\tposition: relative;\n\t/* Prevents horizontal overflow while animating screen transitions */\n\toverflow-x: clip;\n\t/*\n\t * Mark this DOM subtree as isolated when it comes to layout calculations,\n\t * providing performance benefits.\n\t */\n\tcontain: layout;\n\n\tdisplay: grid;\n\tgrid-template-columns: 1fr;\n\tgrid-template-rows: 1fr;\n\talign-items: start;\n`;\n\nconst fadeIn = keyframes( {\n\tfrom: {\n\t\topacity: 0,\n\t},\n} );\n\nconst fadeOut = keyframes( {\n\tto: {\n\t\topacity: 0,\n\t},\n} );\n\nexport const slideFromRight = keyframes( {\n\tfrom: {\n\t\ttransform: 'translateX(100px)',\n\t},\n} );\n\nexport const slideToLeft = keyframes( {\n\tto: {\n\t\ttransform: 'translateX(-80px)',\n\t},\n} );\n\nexport const slideFromLeft = keyframes( {\n\tfrom: {\n\t\ttransform: 'translateX(-100px)',\n\t},\n} );\n\nexport const slideToRight = keyframes( {\n\tto: {\n\t\ttransform: 'translateX(80px)',\n\t},\n} );\n\nconst FADE = {\n\tDURATION: 70,\n\tEASING: 'linear',\n\tDELAY: {\n\t\tIN: 70,\n\t\tOUT: 40,\n\t},\n};\nconst SLIDE = {\n\tDURATION: 300,\n\tEASING: 'cubic-bezier(0.33, 0, 0, 1)',\n};\n\nexport const TOTAL_ANIMATION_DURATION = {\n\tIN: Math.max( FADE.DURATION + FADE.DELAY.IN, SLIDE.DURATION ),\n\tOUT: Math.max( FADE.DURATION + FADE.DELAY.OUT, SLIDE.DURATION ),\n};\n\nexport const ANIMATION_END_NAMES = {\n\tend: {\n\t\tin: slideFromRight.name,\n\t\tout: slideToLeft.name,\n\t},\n\tstart: {\n\t\tin: slideFromLeft.name,\n\t\tout: slideToRight.name,\n\t},\n};\n\nconst ANIMATION = {\n\tend: {\n\t\tin: css`\n\t\t\t${ FADE.DURATION }ms ${ FADE.EASING } ${ FADE.DELAY\n\t\t\t\t.IN }ms both ${ fadeIn }, ${ SLIDE.DURATION }ms ${ SLIDE.EASING } both ${ slideFromRight }\n\t\t`,\n\t\tout: css`\n\t\t\t${ FADE.DURATION }ms ${ FADE.EASING } ${ FADE.DELAY\n\t\t\t\t.OUT }ms both ${ fadeOut }, ${ SLIDE.DURATION }ms ${ SLIDE.EASING } both ${ slideToLeft }\n\t\t`,\n\t},\n\tstart: {\n\t\tin: css`\n\t\t\t${ FADE.DURATION }ms ${ FADE.EASING } ${ FADE.DELAY\n\t\t\t\t.IN }ms both ${ fadeIn }, ${ SLIDE.DURATION }ms ${ SLIDE.EASING } both ${ slideFromLeft }\n\t\t`,\n\t\tout: css`\n\t\t\t${ FADE.DURATION }ms ${ FADE.EASING } ${ FADE.DELAY\n\t\t\t\t.OUT }ms both ${ fadeOut }, ${ SLIDE.DURATION }ms ${ SLIDE.EASING } both ${ slideToRight }\n\t\t`,\n\t},\n} as const;\nexport const navigatorScreenAnimation = css`\n\tz-index: 1;\n\n\t&[data-animation-type='out'] {\n\t\tz-index: 0;\n\t}\n\n\t@media not ( prefers-reduced-motion ) {\n\t\t&:not( [data-skip-animation] ) {\n\t\t\t${ ( [ 'start', 'end' ] as const ).map( ( direction ) =>\n\t\t\t\t( [ 'in', 'out' ] as const ).map(\n\t\t\t\t\t( type ) => css`\n\t\t\t\t\t\t&[data-animation-direction='${ direction }'][data-animation-type='${ type }'] {\n\t\t\t\t\t\t\tanimation: ${ ANIMATION[ direction ][ type ] };\n\t\t\t\t\t\t}\n\t\t\t\t\t`\n\t\t\t\t)\n\t\t\t) }\n\t\t}\n\t}\n`;\n\nexport const navigatorScreen = css`\n\t/* Ensures horizontal overflow is visually accessible */\n\toverflow-x: auto;\n\t/* In case the root has a height, it should not be exceeded */\n\tmax-height: 100%;\n\tbox-sizing: border-box;\n\n\tposition: relative;\n\n\tgrid-column: 1 / -1;\n\tgrid-row: 1 / -1;\n`;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo, useReducer } from '@wordpress/element';\nimport isShallowEqual from '@wordpress/is-shallow-equal';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect, useContextSystem } from '../../context';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport { patternMatch, findParent } from '../utils/router';\nimport { View } from '../../view';\nimport { NavigatorContext } from '../context';\nimport * as styles from '../styles';\nimport type {\n\tNavigatorProps,\n\tNavigatorLocation,\n\tNavigatorContext as NavigatorContextType,\n\tNavigateOptions,\n\tScreen,\n\tNavigateToParentOptions,\n} from '../types';\nimport deprecated from '@wordpress/deprecated';\n\ntype MatchedPath = ReturnType< typeof patternMatch >;\n\ntype RouterAction =\n\t| { type: 'add' | 'remove'; screen: Screen }\n\t| { type: 'goto'; path: string; options?: NavigateOptions }\n\t| { type: 'gotoparent'; options?: NavigateToParentOptions };\n\ntype RouterState = {\n\tinitialPath: string;\n\tscreens: Screen[];\n\tcurrentLocation: NavigatorLocation;\n\tmatchedPath: MatchedPath;\n\tfocusSelectors: Map< string, string >;\n};\n\nfunction addScreen( { screens }: RouterState, screen: Screen ) {\n\tif ( screens.some( ( s ) => s.path === screen.path ) ) {\n\t\twarning(\n\t\t\t`Navigator: a screen with path ${ screen.path } already exists.\nThe screen with id ${ screen.id } will not be added.`\n\t\t);\n\t\treturn screens;\n\t}\n\treturn [ ...screens, screen ];\n}\n\nfunction removeScreen( { screens }: RouterState, screen: Screen ) {\n\treturn screens.filter( ( s ) => s.id !== screen.id );\n}\n\nfunction goTo(\n\tstate: RouterState,\n\tpath: string,\n\toptions: NavigateOptions = {}\n) {\n\tconst { focusSelectors } = state;\n\tconst currentLocation = { ...state.currentLocation };\n\n\tconst {\n\t\t// Default assignments\n\t\tisBack = false,\n\t\tskipFocus = false,\n\t\t// Extract to avoid forwarding\n\t\treplace,\n\t\tfocusTargetSelector,\n\t\t// Rest\n\t\t...restOptions\n\t} = options;\n\n\tif ( currentLocation.path === path ) {\n\t\treturn { currentLocation, focusSelectors };\n\t}\n\n\tlet focusSelectorsCopy: typeof focusSelectors | undefined;\n\tfunction getFocusSelectorsCopy() {\n\t\tfocusSelectorsCopy =\n\t\t\tfocusSelectorsCopy ?? new Map( state.focusSelectors );\n\t\treturn focusSelectorsCopy;\n\t}\n\n\t// Set a focus selector that will be used when navigating\n\t// back to the current location.\n\tif ( focusTargetSelector && currentLocation.path ) {\n\t\tgetFocusSelectorsCopy().set(\n\t\t\tcurrentLocation.path,\n\t\t\tfocusTargetSelector\n\t\t);\n\t}\n\n\t// Get the focus selector for the new location.\n\tlet currentFocusSelector;\n\tif ( focusSelectors.get( path ) ) {\n\t\tif ( isBack ) {\n\t\t\t// Use the found focus selector only when navigating back.\n\t\t\tcurrentFocusSelector = focusSelectors.get( path );\n\t\t}\n\t\t// Make a copy of the focusSelectors map to remove the focus selector\n\t\t// only if necessary (ie. a focus selector was found).\n\t\tgetFocusSelectorsCopy().delete( path );\n\t}\n\n\treturn {\n\t\tcurrentLocation: {\n\t\t\t...restOptions,\n\t\t\tisInitial: false,\n\t\t\tpath,\n\t\t\tisBack,\n\t\t\thasRestoredFocus: false,\n\t\t\tfocusTargetSelector: currentFocusSelector,\n\t\t\tskipFocus,\n\t\t},\n\t\tfocusSelectors: focusSelectorsCopy ?? focusSelectors,\n\t};\n}\n\nfunction goToParent(\n\tstate: RouterState,\n\toptions: NavigateToParentOptions = {}\n) {\n\tconst { screens, focusSelectors } = state;\n\tconst currentLocation = { ...state.currentLocation };\n\tconst currentPath = currentLocation.path;\n\tif ( currentPath === undefined ) {\n\t\treturn { currentLocation, focusSelectors };\n\t}\n\tconst parentPath = findParent( currentPath, screens );\n\tif ( parentPath === undefined ) {\n\t\treturn { currentLocation, focusSelectors };\n\t}\n\treturn goTo( state, parentPath, {\n\t\t...options,\n\t\tisBack: true,\n\t} );\n}\n\nfunction routerReducer(\n\tstate: RouterState,\n\taction: RouterAction\n): RouterState {\n\tlet {\n\t\tscreens,\n\t\tcurrentLocation,\n\t\tmatchedPath,\n\t\tfocusSelectors,\n\t\t...restState\n\t} = state;\n\tswitch ( action.type ) {\n\t\tcase 'add':\n\t\t\tscreens = addScreen( state, action.screen );\n\t\t\tbreak;\n\t\tcase 'remove':\n\t\t\tscreens = removeScreen( state, action.screen );\n\t\t\tbreak;\n\t\tcase 'goto':\n\t\t\t( { currentLocation, focusSelectors } = goTo(\n\t\t\t\tstate,\n\t\t\t\taction.path,\n\t\t\t\taction.options\n\t\t\t) );\n\t\t\tbreak;\n\t\tcase 'gotoparent':\n\t\t\t( { currentLocation, focusSelectors } = goToParent(\n\t\t\t\tstate,\n\t\t\t\taction.options\n\t\t\t) );\n\t\t\tbreak;\n\t}\n\n\t// Return early in case there is no change\n\tif (\n\t\tscreens === state.screens &&\n\t\tcurrentLocation === state.currentLocation\n\t) {\n\t\treturn state;\n\t}\n\n\t// Compute the matchedPath\n\tconst currentPath = currentLocation.path;\n\tmatchedPath =\n\t\tcurrentPath !== undefined\n\t\t\t? patternMatch( currentPath, screens )\n\t\t\t: undefined;\n\n\t// If the new match is the same as the previous match,\n\t// return the previous one to keep immutability.\n\tif (\n\t\tmatchedPath &&\n\t\tstate.matchedPath &&\n\t\tmatchedPath.id === state.matchedPath.id &&\n\t\tisShallowEqual( matchedPath.params, state.matchedPath.params )\n\t) {\n\t\tmatchedPath = state.matchedPath;\n\t}\n\n\treturn {\n\t\t...restState,\n\t\tscreens,\n\t\tcurrentLocation,\n\t\tmatchedPath,\n\t\tfocusSelectors,\n\t};\n}\n\nfunction UnconnectedNavigator(\n\tprops: WordPressComponentProps< NavigatorProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst {\n\t\tinitialPath: initialPathProp,\n\t\tchildren,\n\t\tclassName,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Navigator' );\n\n\tconst [ routerState, dispatch ] = useReducer(\n\t\trouterReducer,\n\t\tinitialPathProp,\n\t\t( path ) => ( {\n\t\t\tscreens: [],\n\t\t\tcurrentLocation: { path, isInitial: true },\n\t\t\tmatchedPath: undefined,\n\t\t\tfocusSelectors: new Map(),\n\t\t\tinitialPath: initialPathProp,\n\t\t} )\n\t);\n\n\t// The methods are constant forever, create stable references to them.\n\tconst methods = useMemo(\n\t\t() => ( {\n\t\t\t// Note: calling goBack calls `goToParent` internally, as it was established\n\t\t\t// that `goBack` should behave like `goToParent`, and `goToParent` should\n\t\t\t// be marked as deprecated.\n\t\t\tgoBack: ( options: NavigateToParentOptions | undefined ) =>\n\t\t\t\tdispatch( { type: 'gotoparent', options } ),\n\t\t\tgoTo: ( path: string, options?: NavigateOptions ) =>\n\t\t\t\tdispatch( { type: 'goto', path, options } ),\n\t\t\tgoToParent: ( options: NavigateToParentOptions | undefined ) => {\n\t\t\t\tdeprecated( `wp.components.useNavigator().goToParent`, {\n\t\t\t\t\tsince: '6.7',\n\t\t\t\t\talternative: 'wp.components.useNavigator().goBack',\n\t\t\t\t} );\n\t\t\t\tdispatch( { type: 'gotoparent', options } );\n\t\t\t},\n\t\t\taddScreen: ( screen: Screen ) =>\n\t\t\t\tdispatch( { type: 'add', screen } ),\n\t\t\tremoveScreen: ( screen: Screen ) =>\n\t\t\t\tdispatch( { type: 'remove', screen } ),\n\t\t} ),\n\t\t[]\n\t);\n\n\tconst { currentLocation, matchedPath } = routerState;\n\n\tconst navigatorContextValue: NavigatorContextType = useMemo(\n\t\t() => ( {\n\t\t\tlocation: currentLocation,\n\t\t\tparams: matchedPath?.params ?? {},\n\t\t\tmatch: matchedPath?.id,\n\t\t\t...methods,\n\t\t} ),\n\t\t[ currentLocation, matchedPath, methods ]\n\t);\n\n\tconst cx = useCx();\n\tconst classes = useMemo(\n\t\t() => cx( styles.navigatorWrapper, className ),\n\t\t[ className, cx ]\n\t);\n\n\treturn (\n\t\t<View ref={ forwardedRef } className={ classes } { ...otherProps }>\n\t\t\t<NavigatorContext.Provider value={ navigatorContextValue }>\n\t\t\t\t{ children }\n\t\t\t</NavigatorContext.Provider>\n\t\t</View>\n\t);\n}\n\nexport const Navigator = contextConnect( UnconnectedNavigator, 'Navigator' );\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"escapeHtml\"];","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { focus } from '@wordpress/dom';\nimport {\n\tuseContext,\n\tuseEffect,\n\tuseMemo,\n\tuseRef,\n\tuseId,\n} from '@wordpress/element';\nimport { useMergeRefs } from '@wordpress/compose';\nimport { escapeAttribute } from '@wordpress/escape-html';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect, useContextSystem } from '../../context';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport { View } from '../../view';\nimport { NavigatorContext } from '../context';\nimport * as styles from '../styles';\nimport type { NavigatorScreenProps } from '../types';\nimport { useScreenAnimatePresence } from './use-screen-animate-presence';\n\nfunction UnconnectedNavigatorScreen(\n\tprops: WordPressComponentProps< NavigatorScreenProps, 'div', false >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tif ( ! /^\\//.test( props.path ) ) {\n\t\twarning(\n\t\t\t'wp.components.Navigator.Screen: the `path` should follow a URL-like scheme; it should start with and be separated by the `/` character.'\n\t\t);\n\t}\n\n\tconst screenId = useId();\n\n\tconst {\n\t\tchildren,\n\t\tclassName,\n\t\tpath,\n\t\tonAnimationEnd: onAnimationEndProp,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Navigator.Screen' );\n\n\tconst { location, match, addScreen, removeScreen } =\n\t\tuseContext( NavigatorContext );\n\tconst { isInitial, isBack, focusTargetSelector, skipFocus } = location;\n\n\tconst isMatch = match === screenId;\n\tconst wrapperRef = useRef< HTMLDivElement >( null );\n\tconst skipAnimationAndFocusRestoration = !! isInitial && ! isBack;\n\n\t// Register / unregister screen with the navigator context.\n\tuseEffect( () => {\n\t\tconst screen = {\n\t\t\tid: screenId,\n\t\t\tpath: escapeAttribute( path ),\n\t\t};\n\t\taddScreen( screen );\n\t\treturn () => removeScreen( screen );\n\t}, [ screenId, path, addScreen, removeScreen ] );\n\n\t// Animation.\n\tconst { animationStyles, shouldRenderScreen, screenProps } =\n\t\tuseScreenAnimatePresence( {\n\t\t\tisMatch,\n\t\t\tisBack,\n\t\t\tonAnimationEnd: onAnimationEndProp,\n\t\t\tskipAnimation: skipAnimationAndFocusRestoration,\n\t\t} );\n\n\tconst cx = useCx();\n\tconst classes = useMemo(\n\t\t() => cx( styles.navigatorScreen, animationStyles, className ),\n\t\t[ className, cx, animationStyles ]\n\t);\n\n\t// Focus restoration\n\tconst locationRef = useRef( location );\n\tuseEffect( () => {\n\t\tlocationRef.current = location;\n\t}, [ location ] );\n\tuseEffect( () => {\n\t\tconst wrapperEl = wrapperRef.current;\n\t\t// Only attempt to restore focus:\n\t\t// - if the current location is not the initial one (to avoid moving focus on page load)\n\t\t// - when the screen becomes visible\n\t\t// - if the wrapper ref has been assigned\n\t\t// - if focus hasn't already been restored for the current location\n\t\t// - if the `skipFocus` option is not set to `true`. This is useful when we trigger the navigation outside of NavigatorScreen.\n\t\tif (\n\t\t\tskipAnimationAndFocusRestoration ||\n\t\t\t! isMatch ||\n\t\t\t! wrapperEl ||\n\t\t\tlocationRef.current.hasRestoredFocus ||\n\t\t\tskipFocus\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst activeElement = wrapperEl.ownerDocument.activeElement;\n\n\t\t// If an element is already focused within the wrapper do not focus the\n\t\t// element. This prevents inputs or buttons from losing focus unnecessarily.\n\t\tif ( wrapperEl.contains( activeElement ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet elementToFocus: HTMLElement | null = null;\n\n\t\t// When navigating back, if a selector is provided, use it to look for the\n\t\t// target element (assumed to be a node inside the current NavigatorScreen)\n\t\tif ( isBack && focusTargetSelector ) {\n\t\t\telementToFocus = wrapperEl.querySelector( focusTargetSelector );\n\t\t}\n\n\t\t// If the previous query didn't run or find any element to focus, fallback\n\t\t// to the first tabbable element in the screen (or the screen itself).\n\t\tif ( ! elementToFocus ) {\n\t\t\tconst [ firstTabbable ] = focus.tabbable.find( wrapperEl );\n\t\t\telementToFocus = firstTabbable ?? wrapperEl;\n\t\t}\n\n\t\tlocationRef.current.hasRestoredFocus = true;\n\t\telementToFocus.focus();\n\t}, [\n\t\tskipAnimationAndFocusRestoration,\n\t\tisMatch,\n\t\tisBack,\n\t\tfocusTargetSelector,\n\t\tskipFocus,\n\t] );\n\n\tconst mergedWrapperRef = useMergeRefs( [ forwardedRef, wrapperRef ] );\n\n\treturn shouldRenderScreen ? (\n\t\t<View\n\t\t\tref={ mergedWrapperRef }\n\t\t\tclassName={ classes }\n\t\t\t{ ...screenProps }\n\t\t\t{ ...otherProps }\n\t\t>\n\t\t\t{ children }\n\t\t</View>\n\t) : null;\n}\n\nexport const NavigatorScreen = contextConnect(\n\tUnconnectedNavigatorScreen,\n\t'Navigator.Screen'\n);\n","/**\n * WordPress dependencies\n */\nimport {\n\tuseState,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseCallback,\n} from '@wordpress/element';\nimport { useReducedMotion } from '@wordpress/compose';\nimport { isRTL as isRTLFn } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport * as styles from '../styles';\n\n// Possible values:\n// - 'INITIAL': the initial state\n// - 'ANIMATING_IN': start enter animation\n// - 'IN': enter animation has ended\n// - 'ANIMATING_OUT': start exit animation\n// - 'OUT': the exit animation has ended\ntype AnimationStatus =\n\t| 'INITIAL'\n\t| 'ANIMATING_IN'\n\t| 'IN'\n\t| 'ANIMATING_OUT'\n\t| 'OUT';\n\n// Allow an extra 20% of the total animation duration to account for potential\n// event loop delays.\nconst ANIMATION_TIMEOUT_MARGIN = 1.2;\n\nconst isEnterAnimation = (\n\tanimationDirection: 'end' | 'start',\n\tanimationStatus: AnimationStatus,\n\tanimationName: string\n) =>\n\tanimationStatus === 'ANIMATING_IN' &&\n\tanimationName === styles.ANIMATION_END_NAMES[ animationDirection ].in;\n\nconst isExitAnimation = (\n\tanimationDirection: 'end' | 'start',\n\tanimationStatus: AnimationStatus,\n\tanimationName: string\n) =>\n\tanimationStatus === 'ANIMATING_OUT' &&\n\tanimationName === styles.ANIMATION_END_NAMES[ animationDirection ].out;\n\nexport function useScreenAnimatePresence( {\n\tisMatch,\n\tskipAnimation,\n\tisBack,\n\tonAnimationEnd,\n}: {\n\tisMatch: boolean;\n\tskipAnimation: boolean;\n\tisBack?: boolean;\n\tonAnimationEnd?: React.AnimationEventHandler< Element >;\n} ) {\n\tconst isRTL = isRTLFn();\n\tconst prefersReducedMotion = useReducedMotion();\n\n\tconst [ animationStatus, setAnimationStatus ] =\n\t\tuseState< AnimationStatus >( 'INITIAL' );\n\n\t// Start enter and exit animations when the screen is selected or deselected.\n\t// The animation status is set to `IN` or `OUT` immediately if the animation\n\t// should be skipped.\n\tconst becameSelected =\n\t\tanimationStatus !== 'ANIMATING_IN' &&\n\t\tanimationStatus !== 'IN' &&\n\t\tisMatch;\n\tconst becameUnselected =\n\t\tanimationStatus !== 'ANIMATING_OUT' &&\n\t\tanimationStatus !== 'OUT' &&\n\t\t! isMatch;\n\tuseLayoutEffect( () => {\n\t\tif ( becameSelected ) {\n\t\t\tsetAnimationStatus(\n\t\t\t\tskipAnimation || prefersReducedMotion ? 'IN' : 'ANIMATING_IN'\n\t\t\t);\n\t\t} else if ( becameUnselected ) {\n\t\t\tsetAnimationStatus(\n\t\t\t\tskipAnimation || prefersReducedMotion ? 'OUT' : 'ANIMATING_OUT'\n\t\t\t);\n\t\t}\n\t}, [\n\t\tbecameSelected,\n\t\tbecameUnselected,\n\t\tskipAnimation,\n\t\tprefersReducedMotion,\n\t] );\n\n\t// Animation attributes (derived state).\n\tconst animationDirection =\n\t\t( isRTL && isBack ) || ( ! isRTL && ! isBack ) ? 'end' : 'start';\n\tconst isAnimatingIn = animationStatus === 'ANIMATING_IN';\n\tconst isAnimatingOut = animationStatus === 'ANIMATING_OUT';\n\tlet animationType: 'in' | 'out' | undefined;\n\tif ( isAnimatingIn ) {\n\t\tanimationType = 'in';\n\t} else if ( isAnimatingOut ) {\n\t\tanimationType = 'out';\n\t}\n\n\tconst onScreenAnimationEnd = useCallback(\n\t\t( e: React.AnimationEvent< HTMLElement > ) => {\n\t\t\tonAnimationEnd?.( e );\n\n\t\t\tif (\n\t\t\t\tisExitAnimation(\n\t\t\t\t\tanimationDirection,\n\t\t\t\t\tanimationStatus,\n\t\t\t\t\te.animationName\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// When the exit animation ends on an unselected screen, set the\n\t\t\t\t// status to 'OUT' to remove the screen contents from the DOM.\n\t\t\t\tsetAnimationStatus( 'OUT' );\n\t\t\t} else if (\n\t\t\t\tisEnterAnimation(\n\t\t\t\t\tanimationDirection,\n\t\t\t\t\tanimationStatus,\n\t\t\t\t\te.animationName\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// When the enter animation ends on a selected screen, set the\n\t\t\t\t// status to 'IN' to ensure the screen is rendered in the DOM.\n\t\t\t\tsetAnimationStatus( 'IN' );\n\t\t\t}\n\t\t},\n\t\t[ onAnimationEnd, animationStatus, animationDirection ]\n\t);\n\n\t// Fallback timeout to ensure that the logic is applied even if the\n\t// `animationend` event is not triggered.\n\tuseEffect( () => {\n\t\tlet animationTimeout: number | undefined;\n\n\t\tif ( isAnimatingOut ) {\n\t\t\tanimationTimeout = window.setTimeout( () => {\n\t\t\t\tsetAnimationStatus( 'OUT' );\n\t\t\t\tanimationTimeout = undefined;\n\t\t\t}, styles.TOTAL_ANIMATION_DURATION.OUT * ANIMATION_TIMEOUT_MARGIN );\n\t\t} else if ( isAnimatingIn ) {\n\t\t\tanimationTimeout = window.setTimeout( () => {\n\t\t\t\tsetAnimationStatus( 'IN' );\n\t\t\t\tanimationTimeout = undefined;\n\t\t\t}, styles.TOTAL_ANIMATION_DURATION.IN * ANIMATION_TIMEOUT_MARGIN );\n\t\t}\n\n\t\treturn () => {\n\t\t\tif ( animationTimeout ) {\n\t\t\t\twindow.clearTimeout( animationTimeout );\n\t\t\t\tanimationTimeout = undefined;\n\t\t\t}\n\t\t};\n\t}, [ isAnimatingOut, isAnimatingIn ] );\n\n\treturn {\n\t\tanimationStyles: styles.navigatorScreenAnimation,\n\t\t// Render the screen's contents in the DOM not only when the screen is\n\t\t// selected, but also while it is animating out.\n\t\tshouldRenderScreen:\n\t\t\tisMatch ||\n\t\t\tanimationStatus === 'IN' ||\n\t\t\tanimationStatus === 'ANIMATING_OUT',\n\t\tscreenProps: {\n\t\t\tonAnimationEnd: onScreenAnimationEnd,\n\t\t\t'data-animation-direction': animationDirection,\n\t\t\t'data-animation-type': animationType,\n\t\t\t'data-skip-animation': skipAnimation || undefined,\n\t\t},\n\t} as const;\n}\n","/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { NavigatorContext } from './context';\nimport type { Navigator } from './types';\n\n/**\n * Retrieves a `navigator` instance. This hook provides advanced functionality,\n * such as imperatively navigating to a new location (with options like\n * navigating back or skipping focus restoration) and accessing the current\n * location and path parameters.\n */\nexport function useNavigator(): Navigator {\n\tconst { location, params, goTo, goBack, goToParent } =\n\t\tuseContext( NavigatorContext );\n\n\treturn {\n\t\tlocation,\n\t\tgoTo,\n\t\tgoBack,\n\t\tgoToParent,\n\t\tparams,\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport { useCallback } from '@wordpress/element';\nimport { escapeAttribute } from '@wordpress/escape-html';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { useContextSystem } from '../../context';\nimport Button from '../../button';\nimport { useNavigator } from '../use-navigator';\nimport type { NavigatorButtonProps } from '../types';\n\nconst cssSelectorForAttribute = ( attrName: string, attrValue: string ) =>\n\t`[${ attrName }=\"${ attrValue }\"]`;\n\nexport function useNavigatorButton(\n\tprops: WordPressComponentProps< NavigatorButtonProps, 'button' >\n) {\n\tconst {\n\t\tpath,\n\t\tonClick,\n\t\tas = Button,\n\t\tattributeName = 'id',\n\t\t...otherProps\n\t} = useContextSystem( props, 'Navigator.Button' );\n\n\tconst escapedPath = escapeAttribute( path );\n\n\tconst { goTo } = useNavigator();\n\tconst handleClick: React.MouseEventHandler< HTMLButtonElement > =\n\t\tuseCallback(\n\t\t\t( e ) => {\n\t\t\t\te.preventDefault();\n\t\t\t\tgoTo( escapedPath, {\n\t\t\t\t\tfocusTargetSelector: cssSelectorForAttribute(\n\t\t\t\t\t\tattributeName,\n\t\t\t\t\t\tescapedPath\n\t\t\t\t\t),\n\t\t\t\t} );\n\t\t\t\tonClick?.( e );\n\t\t\t},\n\t\t\t[ goTo, onClick, attributeName, escapedPath ]\n\t\t);\n\n\treturn {\n\t\tas,\n\t\tonClick: handleClick,\n\t\t...otherProps,\n\t\t[ attributeName ]: escapedPath,\n\t};\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect } from '../../context';\nimport { View } from '../../view';\nimport { useNavigatorButton } from './hook';\nimport type { NavigatorButtonProps } from '../types';\n\nfunction UnconnectedNavigatorButton(\n\tprops: WordPressComponentProps< NavigatorButtonProps, 'button' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst navigatorButtonProps = useNavigatorButton( props );\n\n\treturn <View ref={ forwardedRef } { ...navigatorButtonProps } />;\n}\n\nexport const NavigatorButton = contextConnect(\n\tUnconnectedNavigatorButton,\n\t'Navigator.Button'\n);\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect } from '../../context';\nimport { View } from '../../view';\nimport { useNavigatorBackButton } from './hook';\nimport type { NavigatorBackButtonProps } from '../types';\n\nfunction UnconnectedNavigatorBackButton(\n\tprops: WordPressComponentProps< NavigatorBackButtonProps, 'button' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst navigatorBackButtonProps = useNavigatorBackButton( props );\n\n\treturn <View ref={ forwardedRef } { ...navigatorBackButtonProps } />;\n}\n\nexport const NavigatorBackButton = contextConnect(\n\tUnconnectedNavigatorBackButton,\n\t'Navigator.BackButton'\n);\n","/**\n * WordPress dependencies\n */\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { useContextSystem } from '../../context';\nimport Button from '../../button';\nimport { useNavigator } from '../use-navigator';\nimport type { NavigatorBackButtonProps } from '../types';\n\nexport function useNavigatorBackButton(\n\tprops: WordPressComponentProps< NavigatorBackButtonProps, 'button' >\n) {\n\tconst {\n\t\tonClick,\n\t\tas = Button,\n\n\t\t...otherProps\n\t} = useContextSystem( props, 'Navigator.BackButton' );\n\n\tconst { goBack } = useNavigator();\n\tconst handleClick: React.MouseEventHandler< HTMLButtonElement > =\n\t\tuseCallback(\n\t\t\t( e ) => {\n\t\t\t\te.preventDefault();\n\t\t\t\tgoBack();\n\t\t\t\tonClick?.( e );\n\t\t\t},\n\t\t\t[ goBack, onClick ]\n\t\t);\n\n\treturn {\n\t\tas,\n\t\tonClick: handleClick,\n\t\t...otherProps,\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { NavigatorBackButton } from '../navigator-back-button/component';\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect } from '../../context';\nimport type { NavigatorBackButtonProps } from '../types';\n\nfunction UnconnectedNavigatorToParentButton(\n\tprops: WordPressComponentProps< NavigatorBackButtonProps, 'button' >,\n\tforwardedRef: React.ForwardedRef< any >\n) {\n\tdeprecated( 'wp.components.NavigatorToParentButton', {\n\t\tsince: '6.7',\n\t\talternative: 'wp.components.Navigator.BackButton',\n\t} );\n\n\treturn <NavigatorBackButton ref={ forwardedRef } { ...props } />;\n}\n\n/**\n * @deprecated\n */\nexport const NavigatorToParentButton = contextConnect(\n\tUnconnectedNavigatorToParentButton,\n\t'Navigator.ToParentButton'\n);\n","/**\n * Internal dependencies\n */\nimport { Navigator as InternalNavigator } from './navigator/component';\nimport { NavigatorScreen as InternalNavigatorScreen } from './navigator-screen/component';\nimport { NavigatorButton as InternalNavigatorButton } from './navigator-button/component';\nimport { NavigatorBackButton as InternalNavigatorBackButton } from './navigator-back-button/component';\nimport { NavigatorToParentButton as InternalNavigatorToParentButton } from './navigator-to-parent-button/component';\nexport { useNavigator } from './use-navigator';\n\n/**\n * The `NavigatorProvider` component allows rendering nested views/panels/menus\n * (via the `NavigatorScreen` component and navigate between them\n * (via the `NavigatorButton` and `NavigatorBackButton` components).\n *\n * ```jsx\n * import {\n * __experimentalNavigatorProvider as NavigatorProvider,\n * __experimentalNavigatorScreen as NavigatorScreen,\n * __experimentalNavigatorButton as NavigatorButton,\n * __experimentalNavigatorBackButton as NavigatorBackButton,\n * } from '@wordpress/components';\n *\n * const MyNavigation = () => (\n * <NavigatorProvider initialPath=\"/\">\n * <NavigatorScreen path=\"/\">\n * <p>This is the home screen.</p>\n * <NavigatorButton path=\"/child\">\n * Navigate to child screen.\n * </NavigatorButton>\n * </NavigatorScreen>\n *\n * <NavigatorScreen path=\"/child\">\n * <p>This is the child screen.</p>\n * <NavigatorBackButton>\n * Go back\n * </NavigatorBackButton>\n * </NavigatorScreen>\n * </NavigatorProvider>\n * );\n * ```\n */\nexport const NavigatorProvider = Object.assign( InternalNavigator, {\n\tdisplayName: 'NavigatorProvider',\n} );\n\n/**\n * The `NavigatorScreen` component represents a single view/screen/panel and\n * should be used in combination with the `NavigatorProvider`, the\n * `NavigatorButton` and the `NavigatorBackButton` components.\n *\n * @example\n * ```jsx\n * import {\n * __experimentalNavigatorProvider as NavigatorProvider,\n * __experimentalNavigatorScreen as NavigatorScreen,\n * __experimentalNavigatorButton as NavigatorButton,\n * __experimentalNavigatorBackButton as NavigatorBackButton,\n * } from '@wordpress/components';\n *\n * const MyNavigation = () => (\n * <NavigatorProvider initialPath=\"/\">\n * <NavigatorScreen path=\"/\">\n * <p>This is the home screen.</p>\n * <NavigatorButton path=\"/child\">\n * Navigate to child screen.\n * </NavigatorButton>\n * </NavigatorScreen>\n *\n * <NavigatorScreen path=\"/child\">\n * <p>This is the child screen.</p>\n * <NavigatorBackButton>\n * Go back\n * </NavigatorBackButton>\n * </NavigatorScreen>\n * </NavigatorProvider>\n * );\n * ```\n */\nexport const NavigatorScreen = Object.assign( InternalNavigatorScreen, {\n\tdisplayName: 'NavigatorScreen',\n} );\n\n/**\n * The `NavigatorButton` component can be used to navigate to a screen and should\n * be used in combination with the `NavigatorProvider`, the `NavigatorScreen`\n * and the `NavigatorBackButton` components.\n *\n * @example\n * ```jsx\n * import {\n * __experimentalNavigatorProvider as NavigatorProvider,\n * __experimentalNavigatorScreen as NavigatorScreen,\n * __experimentalNavigatorButton as NavigatorButton,\n * __experimentalNavigatorBackButton as NavigatorBackButton,\n * } from '@wordpress/components';\n *\n * const MyNavigation = () => (\n * <NavigatorProvider initialPath=\"/\">\n * <NavigatorScreen path=\"/\">\n * <p>This is the home screen.</p>\n * <NavigatorButton path=\"/child\">\n * Navigate to child screen.\n * </NavigatorButton>\n * </NavigatorScreen>\n *\n * <NavigatorScreen path=\"/child\">\n * <p>This is the child screen.</p>\n * <NavigatorBackButton>\n * Go back\n * </NavigatorBackButton>\n * </NavigatorScreen>\n * </NavigatorProvider>\n * );\n * ```\n */\nexport const NavigatorButton = Object.assign( InternalNavigatorButton, {\n\tdisplayName: 'NavigatorButton',\n} );\n\n/**\n * The `NavigatorBackButton` component can be used to navigate to a screen and\n * should be used in combination with the `NavigatorProvider`, the\n * `NavigatorScreen` and the `NavigatorButton` components.\n *\n * @example\n * ```jsx\n * import {\n * __experimentalNavigatorProvider as NavigatorProvider,\n * __experimentalNavigatorScreen as NavigatorScreen,\n * __experimentalNavigatorButton as NavigatorButton,\n * __experimentalNavigatorBackButton as NavigatorBackButton,\n * } from '@wordpress/components';\n *\n * const MyNavigation = () => (\n * <NavigatorProvider initialPath=\"/\">\n * <NavigatorScreen path=\"/\">\n * <p>This is the home screen.</p>\n * <NavigatorButton path=\"/child\">\n * Navigate to child screen.\n * </NavigatorButton>\n * </NavigatorScreen>\n *\n * <NavigatorScreen path=\"/child\">\n * <p>This is the child screen.</p>\n * <NavigatorBackButton>\n * Go back (to parent)\n * </NavigatorBackButton>\n * </NavigatorScreen>\n * </NavigatorProvider>\n * );\n * ```\n */\nexport const NavigatorBackButton = Object.assign( InternalNavigatorBackButton, {\n\tdisplayName: 'NavigatorBackButton',\n} );\n\n/**\n * _Note: this component is deprecated. Please use the `NavigatorBackButton`\n * component instead._\n *\n * @deprecated\n */\nexport const NavigatorToParentButton = Object.assign(\n\tInternalNavigatorToParentButton,\n\t{\n\t\tdisplayName: 'NavigatorToParentButton',\n\t}\n);\n","/**\n * Internal dependencies\n */\nimport { Navigator as TopLevelNavigator } from './navigator/component';\nimport { NavigatorScreen } from './navigator-screen/component';\nimport { NavigatorButton } from './navigator-button/component';\nimport { NavigatorBackButton } from './navigator-back-button/component';\nexport { useNavigator } from './use-navigator';\n\n/**\n * The `Navigator` component allows rendering nested views/panels/menus\n * (via the `Navigator.Screen` component) and navigate between them\n * (via the `Navigator.Button` and `Navigator.BackButton` components).\n *\n * ```jsx\n * import { Navigator } from '@wordpress/components';\n *\n * const MyNavigation = () => (\n * <Navigator initialPath=\"/\">\n * <Navigator.Screen path=\"/\">\n * <p>This is the home screen.</p>\n * <Navigator.Button path=\"/child\">\n * Navigate to child screen.\n * </Navigator.Button>\n * </Navigator.Screen>\n *\n * <Navigator.Screen path=\"/child\">\n * <p>This is the child screen.</p>\n * <Navigator.BackButton>\n * Go back\n * </Navigator.BackButton>\n * </Navigator.Screen>\n * </Navigator>\n * );\n * ```\n */\nexport const Navigator = Object.assign( TopLevelNavigator, {\n\t/**\n\t * The `Navigator.Screen` component represents a single view/screen/panel and\n\t * should be used in combination with the `Navigator`, the `Navigator.Button`\n\t * and the `Navigator.BackButton` components.\n\t *\n\t * @example\n\t * ```jsx\n\t * import { Navigator } from '@wordpress/components';\n\t *\n\t * const MyNavigation = () => (\n\t * <Navigator initialPath=\"/\">\n\t * <Navigator.Screen path=\"/\">\n\t * <p>This is the home screen.</p>\n\t * <Navigator.Button path=\"/child\">\n\t * Navigate to child screen.\n\t * </Navigator.Button>\n\t * </Navigator.Screen>\n\t *\n\t * <Navigator.Screen path=\"/child\">\n\t * <p>This is the child screen.</p>\n\t * <Navigator.BackButton>\n\t * Go back\n\t * </Navigator.BackButton>\n\t * </Navigator.Screen>\n\t * </Navigator>\n\t * );\n\t * ```\n\t */\n\tScreen: Object.assign( NavigatorScreen, {\n\t\tdisplayName: 'Navigator.Screen',\n\t} ),\n\t/**\n\t * The `Navigator.Button` component can be used to navigate to a screen and\n\t * should be used in combination with the `Navigator`, the `Navigator.Screen`\n\t * and the `Navigator.BackButton` components.\n\t *\n\t * @example\n\t * ```jsx\n\t * import { Navigator } from '@wordpress/components';\n\t *\n\t * const MyNavigation = () => (\n\t * <Navigator initialPath=\"/\">\n\t * <Navigator.Screen path=\"/\">\n\t * <p>This is the home screen.</p>\n\t * <Navigator.Button path=\"/child\">\n\t * Navigate to child screen.\n\t * </Navigator.Button>\n\t * </Navigator.Screen>\n\t *\n\t * <Navigator.Screen path=\"/child\">\n\t * <p>This is the child screen.</p>\n\t * <Navigator.BackButton>\n\t * Go back\n\t * </Navigator.BackButton>\n\t * </Navigator.Screen>\n\t * </Navigator>\n\t * );\n\t * ```\n\t */\n\tButton: Object.assign( NavigatorButton, {\n\t\tdisplayName: 'Navigator.Button',\n\t} ),\n\t/**\n\t * The `Navigator.BackButton` component can be used to navigate to a screen and\n\t * should be used in combination with the `Navigator`, the `Navigator.Screen`\n\t * and the `Navigator.Button` components.\n\t *\n\t * @example\n\t * ```jsx\n\t * import { Navigator } from '@wordpress/components';\n\t *\n\t * const MyNavigation = () => (\n\t * <Navigator initialPath=\"/\">\n\t * <Navigator.Screen path=\"/\">\n\t * <p>This is the home screen.</p>\n\t * <Navigator.Button path=\"/child\">\n\t * Navigate to child screen.\n\t * </Navigator.Button>\n\t * </Navigator.Screen>\n\t *\n\t * <Navigator.Screen path=\"/child\">\n\t * <p>This is the child screen.</p>\n\t * <Navigator.BackButton>\n\t * Go back\n\t * </Navigator.BackButton>\n\t * </Navigator.Screen>\n\t * </Navigator>\n\t * );\n\t * ```\n\t */\n\tBackButton: Object.assign( NavigatorBackButton, {\n\t\tdisplayName: 'Navigator.BackButton',\n\t} ),\n} );\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { RawHTML, useEffect, renderToString } from '@wordpress/element';\nimport { speak } from '@wordpress/a11y';\nimport { close } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport type { NoticeAction, NoticeProps } from './types';\nimport type { DeprecatedButtonProps } from '../button/types';\nimport { VisuallyHidden } from '../visually-hidden';\n\nconst noop = () => {};\n\n/**\n * Custom hook which announces the message with the given politeness, if a\n * valid message is provided.\n */\nfunction useSpokenMessage(\n\tmessage: NoticeProps[ 'spokenMessage' ],\n\tpoliteness: NoticeProps[ 'politeness' ]\n) {\n\tconst spokenMessage =\n\t\ttypeof message === 'string' ? message : renderToString( message );\n\n\tuseEffect( () => {\n\t\tif ( spokenMessage ) {\n\t\t\tspeak( spokenMessage, politeness );\n\t\t}\n\t}, [ spokenMessage, politeness ] );\n}\n\nfunction getDefaultPoliteness( status: NoticeProps[ 'status' ] ) {\n\tswitch ( status ) {\n\t\tcase 'success':\n\t\tcase 'warning':\n\t\tcase 'info':\n\t\t\treturn 'polite';\n\t\t// The default will also catch the 'error' status.\n\t\tdefault:\n\t\t\treturn 'assertive';\n\t}\n}\n\nfunction getStatusLabel( status: NoticeProps[ 'status' ] ) {\n\tswitch ( status ) {\n\t\tcase 'warning':\n\t\t\treturn __( 'Warning notice' );\n\t\tcase 'info':\n\t\t\treturn __( 'Information notice' );\n\t\tcase 'error':\n\t\t\treturn __( 'Error notice' );\n\t\t// The default will also catch the 'success' status.\n\t\tdefault:\n\t\t\treturn __( 'Notice' );\n\t}\n}\n\n/**\n * `Notice` is a component used to communicate feedback to the user.\n *\n *```jsx\n * import { Notice } from `@wordpress/components`;\n *\n * const MyNotice = () => (\n * <Notice status=\"error\">An unknown error occurred.</Notice>\n * );\n * ```\n */\nfunction Notice( {\n\tclassName,\n\tstatus = 'info',\n\tchildren,\n\tspokenMessage = children,\n\tonRemove = noop,\n\tisDismissible = true,\n\tactions = [],\n\tpoliteness = getDefaultPoliteness( status ),\n\t__unstableHTML,\n\t// onDismiss is a callback executed when the notice is dismissed.\n\t// It is distinct from onRemove, which _looks_ like a callback but is\n\t// actually the function to call to remove the notice from the UI.\n\tonDismiss = noop,\n}: NoticeProps ) {\n\tuseSpokenMessage( spokenMessage, politeness );\n\n\tconst classes = clsx( className, 'components-notice', 'is-' + status, {\n\t\t'is-dismissible': isDismissible,\n\t} );\n\n\tif ( __unstableHTML && typeof children === 'string' ) {\n\t\tchildren = <RawHTML>{ children }</RawHTML>;\n\t}\n\n\tconst onDismissNotice = () => {\n\t\tonDismiss();\n\t\tonRemove();\n\t};\n\n\treturn (\n\t\t<div className={ classes }>\n\t\t\t<VisuallyHidden>{ getStatusLabel( status ) }</VisuallyHidden>\n\t\t\t<div className=\"components-notice__content\">\n\t\t\t\t{ children }\n\t\t\t\t<div className=\"components-notice__actions\">\n\t\t\t\t\t{ actions.map(\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tclassName: buttonCustomClasses,\n\t\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t\t\tisPrimary,\n\t\t\t\t\t\t\t\tvariant,\n\t\t\t\t\t\t\t\tnoDefaultClasses = false,\n\t\t\t\t\t\t\t\tonClick,\n\t\t\t\t\t\t\t\turl,\n\t\t\t\t\t\t\t}: NoticeAction &\n\t\t\t\t\t\t\t\t// `isPrimary` is a legacy prop included for\n\t\t\t\t\t\t\t\t// backcompat, but `variant` should be used\n\t\t\t\t\t\t\t\t// instead.\n\t\t\t\t\t\t\t\tPick< DeprecatedButtonProps, 'isPrimary' >,\n\t\t\t\t\t\t\tindex\n\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\tlet computedVariant = variant;\n\t\t\t\t\t\t\tif ( variant !== 'primary' && ! noDefaultClasses ) {\n\t\t\t\t\t\t\t\tcomputedVariant = ! url ? 'secondary' : 'link';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\ttypeof computedVariant === 'undefined' &&\n\t\t\t\t\t\t\t\tisPrimary\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tcomputedVariant = 'primary';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\t\t\thref={ url }\n\t\t\t\t\t\t\t\t\tvariant={ computedVariant }\n\t\t\t\t\t\t\t\t\tonClick={ url ? undefined : onClick }\n\t\t\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t\t\t'components-notice__action',\n\t\t\t\t\t\t\t\t\t\tbuttonCustomClasses\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t{ isDismissible && (\n\t\t\t\t<Button\n\t\t\t\t\tsize=\"small\"\n\t\t\t\t\tclassName=\"components-notice__dismiss\"\n\t\t\t\t\ticon={ close }\n\t\t\t\t\tlabel={ __( 'Close' ) }\n\t\t\t\t\tonClick={ onDismissNotice }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nexport default Notice;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * Internal dependencies\n */\nimport Notice from '.';\nimport type { WordPressComponentProps } from '../context';\nimport type { NoticeListProps } from './types';\n\nconst noop = () => {};\n\n/**\n * `NoticeList` is a component used to render a collection of notices.\n *\n *```jsx\n * import { Notice, NoticeList } from `@wordpress/components`;\n *\n * const MyNoticeList = () => {\n *\tconst [ notices, setNotices ] = useState( [\n *\t\t{\n *\t\t\tid: 'second-notice',\n *\t\t\tcontent: 'second notice content',\n *\t\t},\n *\t\t{\n *\t\t\tid: 'fist-notice',\n *\t\t\tcontent: 'first notice content',\n *\t\t},\n *\t] );\n *\n *\tconst removeNotice = ( id ) => {\n *\t\tsetNotices( notices.filter( ( notice ) => notice.id !== id ) );\n *\t};\n *\n *\treturn <NoticeList notices={ notices } onRemove={ removeNotice } />;\n *};\n *```\n */\nfunction NoticeList( {\n\tnotices,\n\tonRemove = noop,\n\tclassName,\n\tchildren,\n}: WordPressComponentProps< NoticeListProps, 'div', false > ) {\n\tconst removeNotice =\n\t\t( id: NoticeListProps[ 'notices' ][ number ][ 'id' ] ) => () =>\n\t\t\tonRemove( id );\n\n\tclassName = clsx( 'components-notice-list', className );\n\n\treturn (\n\t\t<div className={ className }>\n\t\t\t{ children }\n\t\t\t{ [ ...notices ].reverse().map( ( notice ) => {\n\t\t\t\tconst { content, ...restNotice } = notice;\n\t\t\t\treturn (\n\t\t\t\t\t<Notice\n\t\t\t\t\t\t{ ...restNotice }\n\t\t\t\t\t\tkey={ notice.id }\n\t\t\t\t\t\tonRemove={ removeNotice( notice.id ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ notice.content }\n\t\t\t\t\t</Notice>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</div>\n\t);\n}\n\nexport default NoticeList;\n","/**\n * Internal dependencies\n */\nimport type { PanelHeaderProps } from './types';\n\n/**\n * `PanelHeader` renders the header for the `Panel`.\n * This is used by the `Panel` component under the hood,\n * so it does not typically need to be used.\n */\nfunction PanelHeader( { label, children }: PanelHeaderProps ) {\n\treturn (\n\t\t<div className=\"components-panel__header\">\n\t\t\t{ label && <h2>{ label }</h2> }\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\nexport default PanelHeader;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport PanelHeader from './header';\nimport type { PanelProps } from './types';\n\nfunction UnforwardedPanel(\n\t{ header, className, children }: PanelProps,\n\tref: React.ForwardedRef< HTMLDivElement >\n) {\n\tconst classNames = clsx( className, 'components-panel' );\n\treturn (\n\t\t<div className={ classNames } ref={ ref }>\n\t\t\t{ header && <PanelHeader label={ header } /> }\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\n/**\n * `Panel` expands and collapses multiple sections of content.\n *\n * ```jsx\n * import { Panel, PanelBody, PanelRow } from '@wordpress/components';\n * import { more } from '@wordpress/icons';\n *\n * const MyPanel = () => (\n * \t<Panel header=\"My Panel\">\n * \t\t<PanelBody title=\"My Block Settings\" icon={ more } initialOpen={ true }>\n * \t\t\t<PanelRow>My Panel Inputs and Labels</PanelRow>\n * \t\t</PanelBody>\n * \t</Panel>\n * );\n * ```\n */\nexport const Panel = forwardRef( UnforwardedPanel );\n\nexport default Panel;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst chevronUp = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z\" />\n\t</SVG>\n);\n\nexport default chevronUp;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useReducedMotion, useMergeRefs } from '@wordpress/compose';\nimport { forwardRef, useRef } from '@wordpress/element';\nimport { chevronUp, chevronDown } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport type { PanelBodyProps, PanelBodyTitleProps } from './types';\nimport type { WordPressComponentProps } from '../context';\nimport Button from '../button';\nimport Icon from '../icon';\nimport { useControlledState, useUpdateEffect } from '../utils';\n\nconst noop = () => {};\n\nexport function UnforwardedPanelBody(\n\tprops: PanelBodyProps,\n\tref: React.ForwardedRef< HTMLDivElement >\n) {\n\tconst {\n\t\tbuttonProps = {},\n\t\tchildren,\n\t\tclassName,\n\t\ticon,\n\t\tinitialOpen,\n\t\tonToggle = noop,\n\t\topened,\n\t\ttitle,\n\t\tscrollAfterOpen = true,\n\t} = props;\n\tconst [ isOpened, setIsOpened ] = useControlledState< boolean | undefined >(\n\t\topened,\n\t\t{\n\t\t\tinitial: initialOpen === undefined ? true : initialOpen,\n\t\t\tfallback: false,\n\t\t}\n\t);\n\tconst nodeRef = useRef< HTMLElement >( null );\n\n\t// Defaults to 'smooth' scrolling\n\t// https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView\n\tconst scrollBehavior = useReducedMotion() ? 'auto' : 'smooth';\n\n\tconst handleOnToggle = ( event: React.MouseEvent ) => {\n\t\tevent.preventDefault();\n\t\tconst next = ! isOpened;\n\t\tsetIsOpened( next );\n\t\tonToggle( next );\n\t};\n\n\t// Ref is used so that the effect does not re-run upon scrollAfterOpen changing value.\n\tconst scrollAfterOpenRef = useRef< boolean | undefined >();\n\tscrollAfterOpenRef.current = scrollAfterOpen;\n\t// Runs after initial render.\n\tuseUpdateEffect( () => {\n\t\tif (\n\t\t\tisOpened &&\n\t\t\tscrollAfterOpenRef.current &&\n\t\t\tnodeRef.current?.scrollIntoView\n\t\t) {\n\t\t\t/*\n\t\t\t * Scrolls the content into view when visible.\n\t\t\t * This improves the UX when there are multiple stacking <PanelBody />\n\t\t\t * components in a scrollable container.\n\t\t\t */\n\t\t\tnodeRef.current.scrollIntoView( {\n\t\t\t\tinline: 'nearest',\n\t\t\t\tblock: 'nearest',\n\t\t\t\tbehavior: scrollBehavior,\n\t\t\t} );\n\t\t}\n\t}, [ isOpened, scrollBehavior ] );\n\n\tconst classes = clsx( 'components-panel__body', className, {\n\t\t'is-opened': isOpened,\n\t} );\n\n\treturn (\n\t\t<div className={ classes } ref={ useMergeRefs( [ nodeRef, ref ] ) }>\n\t\t\t<PanelBodyTitle\n\t\t\t\ticon={ icon }\n\t\t\t\tisOpened={ Boolean( isOpened ) }\n\t\t\t\tonClick={ handleOnToggle }\n\t\t\t\ttitle={ title }\n\t\t\t\t{ ...buttonProps }\n\t\t\t/>\n\t\t\t{ typeof children === 'function'\n\t\t\t\t? children( { opened: Boolean( isOpened ) } )\n\t\t\t\t: isOpened && children }\n\t\t</div>\n\t);\n}\n\nconst PanelBodyTitle = forwardRef(\n\t(\n\t\t{\n\t\t\tisOpened,\n\t\t\ticon,\n\t\t\ttitle,\n\t\t\t...props\n\t\t}: WordPressComponentProps< PanelBodyTitleProps, 'button' >,\n\t\tref: React.ForwardedRef< any >\n\t) => {\n\t\tif ( ! title ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<h2 className=\"components-panel__body-title\">\n\t\t\t\t<Button\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tclassName=\"components-panel__body-toggle\"\n\t\t\t\t\taria-expanded={ isOpened }\n\t\t\t\t\tref={ ref }\n\t\t\t\t\t{ ...props }\n\t\t\t\t>\n\t\t\t\t\t{ /*\n\t\t\t\t\tFirefox + NVDA don't announce aria-expanded because the browser\n\t\t\t\t\trepaints the whole element, so this wrapping span hides that.\n\t\t\t\t*/ }\n\t\t\t\t\t<span aria-hidden=\"true\">\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\tclassName=\"components-panel__arrow\"\n\t\t\t\t\t\t\ticon={ isOpened ? chevronUp : chevronDown }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</span>\n\t\t\t\t\t{ title }\n\t\t\t\t\t{ icon && (\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tclassName=\"components-panel__icon\"\n\t\t\t\t\t\t\tsize={ 20 }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Button>\n\t\t\t</h2>\n\t\t);\n\t}\n);\n\nexport const PanelBody = forwardRef( UnforwardedPanelBody );\n\nexport default PanelBody;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { PanelRowProps } from './types';\n\nfunction UnforwardedPanelRow(\n\t{ className, children }: PanelRowProps,\n\tref: ForwardedRef< HTMLDivElement >\n) {\n\treturn (\n\t\t<div\n\t\t\tclassName={ clsx( 'components-panel__row', className ) }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\n/**\n * `PanelRow` is a generic container for rows within a `PanelBody`.\n * It is a flex container with a top margin for spacing.\n */\nexport const PanelRow = forwardRef( UnforwardedPanelRow );\n\nexport default PanelRow;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useResizeObserver } from '@wordpress/compose';\nimport { SVG, Path } from '@wordpress/primitives';\nimport { useEffect } from '@wordpress/element';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport Icon from '../icon';\nimport type { PlaceholderProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nconst PlaceholderIllustration = (\n\t<SVG\n\t\tclassName=\"components-placeholder__illustration\"\n\t\tfill=\"none\"\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\tviewBox=\"0 0 60 60\"\n\t\tpreserveAspectRatio=\"none\"\n\t>\n\t\t<Path vectorEffect=\"non-scaling-stroke\" d=\"M60 60 0 0\" />\n\t</SVG>\n);\n\n/**\n * Renders a placeholder. Normally used by blocks to render their empty state.\n *\n * ```jsx\n * import { Placeholder } from '@wordpress/components';\n * import { more } from '@wordpress/icons';\n *\n * const MyPlaceholder = () => <Placeholder icon={ more } label=\"Placeholder\" />;\n * ```\n */\nexport function Placeholder(\n\tprops: WordPressComponentProps< PlaceholderProps, 'div', false >\n) {\n\tconst {\n\t\ticon,\n\t\tchildren,\n\t\tlabel,\n\t\tinstructions,\n\t\tclassName,\n\t\tnotices,\n\t\tpreview,\n\t\tisColumnLayout,\n\t\twithIllustration,\n\t\t...additionalProps\n\t} = props;\n\tconst [ resizeListener, { width } ] = useResizeObserver();\n\n\t// Since `useResizeObserver` will report a width of `null` until after the\n\t// first render, avoid applying any modifier classes until width is known.\n\tlet modifierClassNames;\n\tif ( typeof width === 'number' ) {\n\t\tmodifierClassNames = {\n\t\t\t'is-large': width >= 480,\n\t\t\t'is-medium': width >= 160 && width < 480,\n\t\t\t'is-small': width < 160,\n\t\t};\n\t}\n\n\tconst classes = clsx(\n\t\t'components-placeholder',\n\t\tclassName,\n\t\tmodifierClassNames,\n\t\twithIllustration ? 'has-illustration' : null\n\t);\n\n\tconst fieldsetClasses = clsx( 'components-placeholder__fieldset', {\n\t\t'is-column-layout': isColumnLayout,\n\t} );\n\n\tuseEffect( () => {\n\t\tif ( instructions ) {\n\t\t\tspeak( instructions );\n\t\t}\n\t}, [ instructions ] );\n\n\treturn (\n\t\t<div { ...additionalProps } className={ classes }>\n\t\t\t{ withIllustration ? PlaceholderIllustration : null }\n\t\t\t{ resizeListener }\n\t\t\t{ notices }\n\t\t\t{ preview && (\n\t\t\t\t<div className=\"components-placeholder__preview\">\n\t\t\t\t\t{ preview }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className=\"components-placeholder__label\">\n\t\t\t\t<Icon icon={ icon } />\n\t\t\t\t{ label }\n\t\t\t</div>\n\t\t\t{ !! instructions && (\n\t\t\t\t<div className=\"components-placeholder__instructions\">\n\t\t\t\t\t{ instructions }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className={ fieldsetClasses }>{ children }</div>\n\t\t</div>\n\t);\n}\n\nexport default Placeholder;\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\nimport { css, keyframes } from '@emotion/react';\n\n/**\n * WordPress dependencies\n */\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { COLORS, CONFIG } from '../utils';\n\nfunction animateProgressBar( isRtl = false ) {\n\tconst animationDirection = isRtl ? 'right' : 'left';\n\n\treturn keyframes( {\n\t\t'0%': {\n\t\t\t[ animationDirection ]: '-50%',\n\t\t},\n\t\t'100%': {\n\t\t\t[ animationDirection ]: '100%',\n\t\t},\n\t} );\n}\n\n// Width of the indicator for the indeterminate progress bar\nexport const INDETERMINATE_TRACK_WIDTH = 50;\n\nexport const Track = styled.div`\n\tposition: relative;\n\toverflow: hidden;\n\theight: ${ CONFIG.borderWidthFocus };\n\t/* Text color at 10% opacity */\n\tbackground-color: color-mix(\n\t\tin srgb,\n\t\t${ COLORS.theme.foreground },\n\t\ttransparent 90%\n\t);\n\tborder-radius: ${ CONFIG.radiusFull };\n\n\t// Windows high contrast mode.\n\toutline: 2px solid transparent;\n\toutline-offset: 2px;\n\n\t:where( & ) {\n\t\twidth: 160px;\n\t}\n`;\n\nexport const Indicator = styled.div< {\n\tisIndeterminate: boolean;\n} >`\n\tdisplay: inline-block;\n\tposition: absolute;\n\ttop: 0;\n\theight: 100%;\n\tborder-radius: ${ CONFIG.radiusFull };\n\t/* Text color at 90% opacity */\n\tbackground-color: color-mix(\n\t\tin srgb,\n\t\t${ COLORS.theme.foreground },\n\t\ttransparent 10%\n\t);\n\n\t// Windows high contrast mode.\n\toutline: 2px solid transparent;\n\toutline-offset: -2px;\n\n\t${ ( { isIndeterminate } ) =>\n\t\tisIndeterminate\n\t\t\t? css( {\n\t\t\t\t\tanimationDuration: '1.5s',\n\t\t\t\t\tanimationTimingFunction: 'ease-in-out',\n\t\t\t\t\tanimationIterationCount: 'infinite',\n\t\t\t\t\tanimationName: animateProgressBar( isRTL() ),\n\t\t\t\t\twidth: `${ INDETERMINATE_TRACK_WIDTH }%`,\n\t\t\t } )\n\t\t\t: css( {\n\t\t\t\t\twidth: 'var(--indicator-width)',\n\t\t\t\t\ttransition: 'width 0.4s ease-in-out',\n\t\t\t } ) };\n`;\n\nexport const ProgressElement = styled.progress`\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\topacity: 0;\n\twidth: 100%;\n\theight: 100%;\n`;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport * as ProgressBarStyled from './styles';\nimport type { ProgressBarProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nfunction UnforwardedProgressBar(\n\tprops: WordPressComponentProps< ProgressBarProps, 'progress', false >,\n\tref: ForwardedRef< HTMLProgressElement >\n) {\n\tconst { className, value, ...progressProps } = props;\n\tconst isIndeterminate = ! Number.isFinite( value );\n\n\treturn (\n\t\t<ProgressBarStyled.Track className={ className }>\n\t\t\t<ProgressBarStyled.Indicator\n\t\t\t\tstyle={ {\n\t\t\t\t\t'--indicator-width': ! isIndeterminate\n\t\t\t\t\t\t? `${ value }%`\n\t\t\t\t\t\t: undefined,\n\t\t\t\t} }\n\t\t\t\tisIndeterminate={ isIndeterminate }\n\t\t\t/>\n\t\t\t<ProgressBarStyled.ProgressElement\n\t\t\t\tmax={ 100 }\n\t\t\t\tvalue={ value }\n\t\t\t\taria-label={ __( 'Loading …' ) }\n\t\t\t\tref={ ref }\n\t\t\t\t{ ...progressProps }\n\t\t\t/>\n\t\t</ProgressBarStyled.Track>\n\t);\n}\n\n/**\n * A simple horizontal progress bar component.\n *\n * Supports two modes: determinate and indeterminate. A progress bar is determinate\n * when a specific progress value has been specified (from 0 to 100), and indeterminate\n * when a value hasn't been specified.\n *\n * ```jsx\n * import { ProgressBar } from '@wordpress/components';\n *\n * const MyLoadingComponent = () => {\n * \treturn <ProgressBar />;\n * };\n * ```\n */\nexport const ProgressBar = forwardRef( UnforwardedProgressBar );\n\nexport default ProgressBar;\n","/**\n * Internal dependencies\n */\nimport type {\n\tAuthor,\n\tCategory,\n\tTermWithParentAndChildren,\n\tTermsByParent,\n} from './types';\n\nconst ensureParentsAreDefined = (\n\tterms: TermWithParentAndChildren[]\n): terms is ( TermWithParentAndChildren & { parent: number } )[] => {\n\treturn terms.every( ( term ) => term.parent !== null );\n};\n/**\n * Returns terms in a tree form.\n *\n * @param flatTerms Array of terms in flat format.\n *\n * @return Terms in tree format.\n */\nexport function buildTermsTree( flatTerms: readonly ( Author | Category )[] ) {\n\tconst flatTermsWithParentAndChildren: TermWithParentAndChildren[] =\n\t\tflatTerms.map( ( term ) => ( {\n\t\t\tchildren: [],\n\t\t\tparent: null,\n\t\t\t...term,\n\t\t\tid: String( term.id ),\n\t\t} ) );\n\n\t// We use a custom type guard here to ensure that the parent property is\n\t// defined on all terms. The type of the `parent` property is `number | null`\n\t// and we need to ensure that it is `number`. This is because we use the\n\t// `parent` property as a key in the `termsByParent` object.\n\tif ( ! ensureParentsAreDefined( flatTermsWithParentAndChildren ) ) {\n\t\treturn flatTermsWithParentAndChildren;\n\t}\n\n\tconst termsByParent = flatTermsWithParentAndChildren.reduce(\n\t\t( acc: TermsByParent, term ) => {\n\t\t\tconst { parent } = term;\n\t\t\tif ( ! acc[ parent ] ) {\n\t\t\t\tacc[ parent ] = [];\n\t\t\t}\n\t\t\tacc[ parent ].push( term );\n\t\t\treturn acc;\n\t\t},\n\t\t{}\n\t);\n\n\tconst fillWithChildren = (\n\t\tterms: TermWithParentAndChildren[]\n\t): TermWithParentAndChildren[] => {\n\t\treturn terms.map( ( term ) => {\n\t\t\tconst children = termsByParent[ term.id ];\n\t\t\treturn {\n\t\t\t\t...term,\n\t\t\t\tchildren:\n\t\t\t\t\tchildren && children.length\n\t\t\t\t\t\t? fillWithChildren( children )\n\t\t\t\t\t\t: [],\n\t\t\t};\n\t\t} );\n\t};\n\n\treturn fillWithChildren( termsByParent[ '0' ] || [] );\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"htmlEntities\"];","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { SelectControl } from '../select-control';\nimport type { TreeSelectProps, Tree, Truthy } from './types';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport { ContextSystemProvider } from '../context';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\n\nconst CONTEXT_VALUE = {\n\tBaseControl: {\n\t\t// Temporary during deprecation grace period: Overrides the underlying `__associatedWPComponentName`\n\t\t// via the context system to override the value set by SelectControl.\n\t\t_overrides: { __associatedWPComponentName: 'TreeSelect' },\n\t},\n};\n\nfunction getSelectOptions(\n\ttree: Tree[],\n\tlevel = 0\n): NonNullable< TreeSelectProps[ 'options' ] > {\n\treturn tree.flatMap( ( treeNode ) => [\n\t\t{\n\t\t\tvalue: treeNode.id,\n\t\t\tlabel:\n\t\t\t\t'\\u00A0'.repeat( level * 3 ) + decodeEntities( treeNode.name ),\n\t\t},\n\t\t...getSelectOptions( treeNode.children || [], level + 1 ),\n\t] );\n}\n\n/**\n * Generates a hierarchical select input.\n *\n * ```jsx\n * import { useState } from 'react';\n * import { TreeSelect } from '@wordpress/components';\n *\n * const MyTreeSelect = () => {\n * \tconst [ page, setPage ] = useState( 'p21' );\n *\n * \treturn (\n * \t\t<TreeSelect\n * \t\t\t__nextHasNoMarginBottom\n * \t\t\t__next40pxDefaultSize\n * \t\t\tlabel=\"Parent page\"\n * \t\t\tnoOptionLabel=\"No parent page\"\n * \t\t\tonChange={ ( newPage ) => setPage( newPage ) }\n * \t\t\tselectedId={ page }\n * \t\t\ttree={ [\n * \t\t\t\t{\n * \t\t\t\t\tname: 'Page 1',\n * \t\t\t\t\tid: 'p1',\n * \t\t\t\t\tchildren: [\n * \t\t\t\t\t\t{ name: 'Descend 1 of page 1', id: 'p11' },\n * \t\t\t\t\t\t{ name: 'Descend 2 of page 1', id: 'p12' },\n * \t\t\t\t\t],\n * \t\t\t\t},\n * \t\t\t\t{\n * \t\t\t\t\tname: 'Page 2',\n * \t\t\t\t\tid: 'p2',\n * \t\t\t\t\tchildren: [\n * \t\t\t\t\t\t{\n * \t\t\t\t\t\t\tname: 'Descend 1 of page 2',\n * \t\t\t\t\t\t\tid: 'p21',\n * \t\t\t\t\t\t\tchildren: [\n * \t\t\t\t\t\t\t\t{\n * \t\t\t\t\t\t\t\t\tname: 'Descend 1 of Descend 1 of page 2',\n * \t\t\t\t\t\t\t\t\tid: 'p211',\n * \t\t\t\t\t\t\t\t},\n * \t\t\t\t\t\t\t],\n * \t\t\t\t\t\t},\n * \t\t\t\t\t],\n * \t\t\t\t},\n * \t\t\t] }\n * \t\t/>\n * \t);\n * }\n * ```\n */\nexport function TreeSelect( props: TreeSelectProps ) {\n\tconst {\n\t\tlabel,\n\t\tnoOptionLabel,\n\t\tonChange,\n\t\tselectedId,\n\t\ttree = [],\n\t\t...restProps\n\t} = useDeprecated36pxDefaultSizeProp( props );\n\n\tconst options = useMemo( () => {\n\t\treturn [\n\t\t\tnoOptionLabel && { value: '', label: noOptionLabel },\n\t\t\t...getSelectOptions( tree ),\n\t\t].filter( < T, >( option: T ): option is Truthy< T > => !! option );\n\t}, [ noOptionLabel, tree ] );\n\n\tmaybeWarnDeprecated36pxSize( {\n\t\tcomponentName: 'TreeSelect',\n\t\tsize: restProps.size,\n\t\t__next40pxDefaultSize: restProps.__next40pxDefaultSize,\n\t} );\n\n\treturn (\n\t\t<ContextSystemProvider value={ CONTEXT_VALUE }>\n\t\t\t<SelectControl\n\t\t\t\t__shouldNotWarnDeprecated36pxSize\n\t\t\t\t{ ...{ label, options, onChange } }\n\t\t\t\tvalue={ selectedId }\n\t\t\t\t{ ...restProps }\n\t\t\t/>\n\t\t</ContextSystemProvider>\n\t);\n}\n\nexport default TreeSelect;\n","/**\n * Internal dependencies\n */\nimport { buildTermsTree } from './terms';\nimport TreeSelect from '../tree-select';\nimport type { AuthorSelectProps } from './types';\n\nexport default function AuthorSelect( {\n\t__next40pxDefaultSize,\n\tlabel,\n\tnoOptionLabel,\n\tauthorList,\n\tselectedAuthorId,\n\tonChange: onChangeProp,\n}: AuthorSelectProps ) {\n\tif ( ! authorList ) {\n\t\treturn null;\n\t}\n\tconst termsTree = buildTermsTree( authorList );\n\treturn (\n\t\t<TreeSelect\n\t\t\t{ ...{\n\t\t\t\tlabel,\n\t\t\t\tnoOptionLabel,\n\t\t\t\tonChange: onChangeProp,\n\t\t\t} }\n\t\t\ttree={ termsTree }\n\t\t\tselectedId={\n\t\t\t\tselectedAuthorId !== undefined\n\t\t\t\t\t? String( selectedAuthorId )\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\t__nextHasNoMarginBottom\n\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t/>\n\t);\n}\n","/**\n * Internal dependencies\n */\nimport { buildTermsTree } from './terms';\nimport TreeSelect from '../tree-select';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport type { CategorySelectProps } from './types';\n\nexport default function CategorySelect( {\n\t__next40pxDefaultSize,\n\tlabel,\n\tnoOptionLabel,\n\tcategoriesList,\n\tselectedCategoryId,\n\tonChange: onChangeProp,\n\t...props\n}: CategorySelectProps ) {\n\tconst termsTree = useMemo( () => {\n\t\treturn buildTermsTree( categoriesList );\n\t}, [ categoriesList ] );\n\n\treturn (\n\t\t<TreeSelect\n\t\t\t{ ...{\n\t\t\t\tlabel,\n\t\t\t\tnoOptionLabel,\n\t\t\t\tonChange: onChangeProp,\n\t\t\t} }\n\t\t\ttree={ termsTree }\n\t\t\tselectedId={\n\t\t\t\tselectedCategoryId !== undefined\n\t\t\t\t\t? String( selectedCategoryId )\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\t{ ...props }\n\t\t\t__nextHasNoMarginBottom\n\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport AuthorSelect from './author-select';\nimport CategorySelect from './category-select';\nimport FormTokenField from '../form-token-field';\nimport RangeControl from '../range-control';\nimport SelectControl from '../select-control';\nimport { VStack } from '../v-stack';\nimport type {\n\tQueryControlsProps,\n\tQueryControlsWithMultipleCategorySelectionProps,\n\tQueryControlsWithSingleCategorySelectionProps,\n} from './types';\n\nconst DEFAULT_MIN_ITEMS = 1;\nconst DEFAULT_MAX_ITEMS = 100;\nconst MAX_CATEGORIES_SUGGESTIONS = 20;\n\nfunction isSingleCategorySelection(\n\tprops: QueryControlsProps\n): props is QueryControlsWithSingleCategorySelectionProps {\n\treturn 'categoriesList' in props;\n}\n\nfunction isMultipleCategorySelection(\n\tprops: QueryControlsProps\n): props is QueryControlsWithMultipleCategorySelectionProps {\n\treturn 'categorySuggestions' in props;\n}\n\n/**\n * Controls to query for posts.\n *\n * ```jsx\n * const MyQueryControls = () => (\n * <QueryControls\n * { ...{ maxItems, minItems, numberOfItems, order, orderBy } }\n * onOrderByChange={ ( newOrderBy ) => {\n * updateQuery( { orderBy: newOrderBy } )\n * }\n * onOrderChange={ ( newOrder ) => {\n * updateQuery( { order: newOrder } )\n * }\n * categoriesList={ categories }\n * selectedCategoryId={ category }\n * onCategoryChange={ ( newCategory ) => {\n * updateQuery( { category: newCategory } )\n * }\n * onNumberOfItemsChange={ ( newNumberOfItems ) => {\n * updateQuery( { numberOfItems: newNumberOfItems } )\n * } }\n * />\n * );\n * ```\n */\nexport function QueryControls( {\n\tauthorList,\n\tselectedAuthorId,\n\tnumberOfItems,\n\torder,\n\torderBy,\n\tmaxItems = DEFAULT_MAX_ITEMS,\n\tminItems = DEFAULT_MIN_ITEMS,\n\tonAuthorChange,\n\tonNumberOfItemsChange,\n\tonOrderChange,\n\tonOrderByChange,\n\t// Props for single OR multiple category selection are not destructured here,\n\t// but instead are destructured inline where necessary.\n\t...props\n}: QueryControlsProps ) {\n\treturn (\n\t\t<VStack spacing=\"4\" className=\"components-query-controls\">\n\t\t\t{ [\n\t\t\t\tonOrderChange && onOrderByChange && (\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tkey=\"query-controls-order-select\"\n\t\t\t\t\t\tlabel={ __( 'Order by' ) }\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\torderBy === undefined || order === undefined\n\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t: `${ orderBy }/${ order }`\n\t\t\t\t\t\t}\n\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( 'Newest to oldest' ),\n\t\t\t\t\t\t\t\tvalue: 'date/desc',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( 'Oldest to newest' ),\n\t\t\t\t\t\t\t\tvalue: 'date/asc',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* translators: Label for ordering posts by title in ascending order. */\n\t\t\t\t\t\t\t\tlabel: __( 'A → Z' ),\n\t\t\t\t\t\t\t\tvalue: 'title/asc',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* translators: Label for ordering posts by title in descending order. */\n\t\t\t\t\t\t\t\tlabel: __( 'Z → A' ),\n\t\t\t\t\t\t\t\tvalue: 'title/desc',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\tif ( typeof value !== 'string' ) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconst [ newOrderBy, newOrder ] = value.split( '/' );\n\t\t\t\t\t\t\tif ( newOrder !== order ) {\n\t\t\t\t\t\t\t\tonOrderChange(\n\t\t\t\t\t\t\t\t\tnewOrder as NonNullable<\n\t\t\t\t\t\t\t\t\t\tQueryControlsProps[ 'order' ]\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( newOrderBy !== orderBy ) {\n\t\t\t\t\t\t\t\tonOrderByChange(\n\t\t\t\t\t\t\t\t\tnewOrderBy as NonNullable<\n\t\t\t\t\t\t\t\t\t\tQueryControlsProps[ 'orderBy' ]\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tisSingleCategorySelection( props ) &&\n\t\t\t\t\tprops.categoriesList &&\n\t\t\t\t\tprops.onCategoryChange && (\n\t\t\t\t\t\t<CategorySelect\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tkey=\"query-controls-category-select\"\n\t\t\t\t\t\t\tcategoriesList={ props.categoriesList }\n\t\t\t\t\t\t\tlabel={ __( 'Category' ) }\n\t\t\t\t\t\t\tnoOptionLabel={ _x( 'All', 'categories' ) }\n\t\t\t\t\t\t\tselectedCategoryId={ props.selectedCategoryId }\n\t\t\t\t\t\t\tonChange={ props.onCategoryChange }\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\tisMultipleCategorySelection( props ) &&\n\t\t\t\t\tprops.categorySuggestions &&\n\t\t\t\t\tprops.onCategoryChange && (\n\t\t\t\t\t\t<FormTokenField\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tkey=\"query-controls-categories-select\"\n\t\t\t\t\t\t\tlabel={ __( 'Categories' ) }\n\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\tprops.selectedCategories &&\n\t\t\t\t\t\t\t\tprops.selectedCategories.map( ( item ) => ( {\n\t\t\t\t\t\t\t\t\tid: item.id,\n\t\t\t\t\t\t\t\t\t// Keeping the fallback to `item.value` for legacy reasons,\n\t\t\t\t\t\t\t\t\t// even if items of `selectedCategories` should not have a\n\t\t\t\t\t\t\t\t\t// `value` property.\n\t\t\t\t\t\t\t\t\t// @ts-expect-error\n\t\t\t\t\t\t\t\t\tvalue: item.name || item.value,\n\t\t\t\t\t\t\t\t} ) )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsuggestions={ Object.keys(\n\t\t\t\t\t\t\t\tprops.categorySuggestions\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonChange={ props.onCategoryChange }\n\t\t\t\t\t\t\tmaxSuggestions={ MAX_CATEGORIES_SUGGESTIONS }\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\tonAuthorChange && (\n\t\t\t\t\t<AuthorSelect\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tkey=\"query-controls-author-select\"\n\t\t\t\t\t\tauthorList={ authorList }\n\t\t\t\t\t\tlabel={ __( 'Author' ) }\n\t\t\t\t\t\tnoOptionLabel={ _x( 'All', 'authors' ) }\n\t\t\t\t\t\tselectedAuthorId={ selectedAuthorId }\n\t\t\t\t\t\tonChange={ onAuthorChange }\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tonNumberOfItemsChange && (\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tkey=\"query-controls-range-control\"\n\t\t\t\t\t\tlabel={ __( 'Number of items' ) }\n\t\t\t\t\t\tvalue={ numberOfItems }\n\t\t\t\t\t\tonChange={ onNumberOfItemsChange }\n\t\t\t\t\t\tmin={ minItems }\n\t\t\t\t\t\tmax={ maxItems }\n\t\t\t\t\t\trequired\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t] }\n\t\t</VStack>\n\t);\n}\n\nexport default QueryControls;\n","/**\n * External dependencies\n */\nimport type * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { createContext } from '@wordpress/element';\n\nexport const RadioGroupContext = createContext< {\n\tstore?: Ariakit.RadioStore;\n\tdisabled?: boolean;\n} >( {\n\tstore: undefined,\n\tdisabled: undefined,\n} );\n","/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\n\n/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { RadioGroupContext } from './context';\nimport type { WordPressComponentProps } from '../context';\nimport type { RadioProps } from './types';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\n\nfunction UnforwardedRadio(\n\t{\n\t\tvalue,\n\t\tchildren,\n\t\t...props\n\t}: WordPressComponentProps< RadioProps, 'button', false >,\n\tref: React.ForwardedRef< any >\n) {\n\tconst { store, disabled } = useContext( RadioGroupContext );\n\n\tconst selectedValue = Ariakit.useStoreState( store, 'value' );\n\tconst isChecked = selectedValue !== undefined && selectedValue === value;\n\n\tmaybeWarnDeprecated36pxSize( {\n\t\tcomponentName: 'Radio',\n\t\tsize: undefined,\n\t\t__next40pxDefaultSize: props.__next40pxDefaultSize,\n\t} );\n\n\treturn (\n\t\t<Ariakit.Radio\n\t\t\tdisabled={ disabled }\n\t\t\tstore={ store }\n\t\t\tref={ ref }\n\t\t\tvalue={ value }\n\t\t\trender={\n\t\t\t\t<Button\n\t\t\t\t\tvariant={ isChecked ? 'primary' : 'secondary' }\n\t\t\t\t\t{ ...props }\n\t\t\t\t/>\n\t\t\t}\n\t\t>\n\t\t\t{ children || value }\n\t\t</Ariakit.Radio>\n\t);\n}\n\n/**\n * @deprecated Use `RadioControl` or `ToggleGroupControl` instead.\n */\nexport const Radio = forwardRef( UnforwardedRadio );\nexport default Radio;\n","/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { useMemo, forwardRef } from '@wordpress/element';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ButtonGroup from '../button-group';\nimport type { WordPressComponentProps } from '../context';\nimport { RadioGroupContext } from './context';\nimport type { RadioGroupProps } from './types';\n\nfunction UnforwardedRadioGroup(\n\t{\n\t\tlabel,\n\t\tchecked,\n\t\tdefaultChecked,\n\t\tdisabled,\n\t\tonChange,\n\t\tchildren,\n\t\t...props\n\t}: WordPressComponentProps< RadioGroupProps, 'div', false >,\n\tref: React.ForwardedRef< any >\n) {\n\tconst radioStore = Ariakit.useRadioStore( {\n\t\tvalue: checked,\n\t\tdefaultValue: defaultChecked,\n\t\tsetValue: ( newValue ) => {\n\t\t\tonChange?.( newValue ?? undefined );\n\t\t},\n\t\trtl: isRTL(),\n\t} );\n\n\tconst contextValue = useMemo(\n\t\t() => ( {\n\t\t\tstore: radioStore,\n\t\t\tdisabled,\n\t\t} ),\n\t\t[ radioStore, disabled ]\n\t);\n\n\tdeprecated( 'wp.components.__experimentalRadioGroup', {\n\t\talternative:\n\t\t\t'wp.components.RadioControl or wp.components.__experimentalToggleGroupControl',\n\t\tsince: '6.8',\n\t} );\n\n\treturn (\n\t\t<RadioGroupContext.Provider value={ contextValue }>\n\t\t\t<Ariakit.RadioGroup\n\t\t\t\tstore={ radioStore }\n\t\t\t\trender={\n\t\t\t\t\t<ButtonGroup __shouldNotWarnDeprecated>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</ButtonGroup>\n\t\t\t\t}\n\t\t\t\taria-label={ label }\n\t\t\t\tref={ ref }\n\t\t\t\t{ ...props }\n\t\t\t/>\n\t\t</RadioGroupContext.Provider>\n\t);\n}\n\n/**\n * @deprecated Use `RadioControl` or `ToggleGroupControl` instead.\n */\nexport const RadioGroup = forwardRef( UnforwardedRadioGroup );\nexport default RadioGroup;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ChangeEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport type { WordPressComponentProps } from '../context';\nimport type { RadioControlProps } from './types';\nimport { VStack } from '../v-stack';\nimport { StyledHelp } from '../base-control/styles/base-control-styles';\nimport { VisuallyHidden } from '../visually-hidden';\n\nfunction generateOptionDescriptionId( radioGroupId: string, index: number ) {\n\treturn `${ radioGroupId }-${ index }-option-description`;\n}\n\nfunction generateOptionId( radioGroupId: string, index: number ) {\n\treturn `${ radioGroupId }-${ index }`;\n}\n\nfunction generateHelpId( radioGroupId: string ) {\n\treturn `${ radioGroupId }__help`;\n}\n\n/**\n * Render a user interface to select the user type using radio inputs.\n *\n * ```jsx\n * import { RadioControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyRadioControl = () => {\n * const [ option, setOption ] = useState( 'a' );\n *\n * return (\n * <RadioControl\n * label=\"User type\"\n * help=\"The type of the current user\"\n * selected={ option }\n * options={ [\n * { label: 'Author', value: 'a' },\n * { label: 'Editor', value: 'e' },\n * ] }\n * onChange={ ( value ) => setOption( value ) }\n * />\n * );\n * };\n * ```\n */\nexport function RadioControl(\n\tprops: WordPressComponentProps< RadioControlProps, 'input', false >\n) {\n\tconst {\n\t\tlabel,\n\t\tclassName,\n\t\tselected,\n\t\thelp,\n\t\tonChange,\n\t\thideLabelFromVision,\n\t\toptions = [],\n\t\tid: preferredId,\n\t\t...additionalProps\n\t} = props;\n\tconst id = useInstanceId(\n\t\tRadioControl,\n\t\t'inspector-radio-control',\n\t\tpreferredId\n\t);\n\n\tconst onChangeValue = ( event: ChangeEvent< HTMLInputElement > ) =>\n\t\tonChange( event.target.value );\n\n\tif ( ! options?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<fieldset\n\t\t\tid={ id }\n\t\t\tclassName={ clsx( className, 'components-radio-control' ) }\n\t\t\taria-describedby={ !! help ? generateHelpId( id ) : undefined }\n\t\t>\n\t\t\t{ hideLabelFromVision ? (\n\t\t\t\t<VisuallyHidden as=\"legend\">{ label }</VisuallyHidden>\n\t\t\t) : (\n\t\t\t\t<BaseControl.VisualLabel as=\"legend\">\n\t\t\t\t\t{ label }\n\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t) }\n\n\t\t\t<VStack\n\t\t\t\tspacing={ 3 }\n\t\t\t\tclassName={ clsx( 'components-radio-control__group-wrapper', {\n\t\t\t\t\t'has-help': !! help,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t{ options.map( ( option, index ) => (\n\t\t\t\t\t<div\n\t\t\t\t\t\tkey={ generateOptionId( id, index ) }\n\t\t\t\t\t\tclassName=\"components-radio-control__option\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tid={ generateOptionId( id, index ) }\n\t\t\t\t\t\t\tclassName=\"components-radio-control__input\"\n\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\tname={ id }\n\t\t\t\t\t\t\tvalue={ option.value }\n\t\t\t\t\t\t\tonChange={ onChangeValue }\n\t\t\t\t\t\t\tchecked={ option.value === selected }\n\t\t\t\t\t\t\taria-describedby={\n\t\t\t\t\t\t\t\t!! option.description\n\t\t\t\t\t\t\t\t\t? generateOptionDescriptionId( id, index )\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{ ...additionalProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<label\n\t\t\t\t\t\t\tclassName=\"components-radio-control__label\"\n\t\t\t\t\t\t\thtmlFor={ generateOptionId( id, index ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ option.label }\n\t\t\t\t\t\t</label>\n\t\t\t\t\t\t{ !! option.description ? (\n\t\t\t\t\t\t\t<StyledHelp\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tid={ generateOptionDescriptionId( id, index ) }\n\t\t\t\t\t\t\t\tclassName=\"components-radio-control__option-description\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ option.description }\n\t\t\t\t\t\t\t</StyledHelp>\n\t\t\t\t\t\t) : null }\n\t\t\t\t\t</div>\n\t\t\t\t) ) }\n\t\t\t</VStack>\n\t\t\t{ !! help && (\n\t\t\t\t<StyledHelp\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tid={ generateHelpId( id ) }\n\t\t\t\t\tclassName=\"components-base-control__help\"\n\t\t\t\t>\n\t\t\t\t\t{ help }\n\t\t\t\t</StyledHelp>\n\t\t\t) }\n\t\t</fieldset>\n\t);\n}\n\nexport default RadioControl;\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport * as React from 'react';\nvar styles = {\n top: {\n width: '100%',\n height: '10px',\n top: '-5px',\n left: '0px',\n cursor: 'row-resize',\n },\n right: {\n width: '10px',\n height: '100%',\n top: '0px',\n right: '-5px',\n cursor: 'col-resize',\n },\n bottom: {\n width: '100%',\n height: '10px',\n bottom: '-5px',\n left: '0px',\n cursor: 'row-resize',\n },\n left: {\n width: '10px',\n height: '100%',\n top: '0px',\n left: '-5px',\n cursor: 'col-resize',\n },\n topRight: {\n width: '20px',\n height: '20px',\n position: 'absolute',\n right: '-10px',\n top: '-10px',\n cursor: 'ne-resize',\n },\n bottomRight: {\n width: '20px',\n height: '20px',\n position: 'absolute',\n right: '-10px',\n bottom: '-10px',\n cursor: 'se-resize',\n },\n bottomLeft: {\n width: '20px',\n height: '20px',\n position: 'absolute',\n left: '-10px',\n bottom: '-10px',\n cursor: 'sw-resize',\n },\n topLeft: {\n width: '20px',\n height: '20px',\n position: 'absolute',\n left: '-10px',\n top: '-10px',\n cursor: 'nw-resize',\n },\n};\nvar Resizer = /** @class */ (function (_super) {\n __extends(Resizer, _super);\n function Resizer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.onMouseDown = function (e) {\n _this.props.onResizeStart(e, _this.props.direction);\n };\n _this.onTouchStart = function (e) {\n _this.props.onResizeStart(e, _this.props.direction);\n };\n return _this;\n }\n Resizer.prototype.render = function () {\n return (React.createElement(\"div\", { className: this.props.className || '', style: __assign(__assign({ position: 'absolute', userSelect: 'none' }, styles[this.props.direction]), (this.props.replaceStyles || {})), onMouseDown: this.onMouseDown, onTouchStart: this.onTouchStart }, this.props.children));\n };\n return Resizer;\n}(React.PureComponent));\nexport { Resizer };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport * as React from 'react';\nimport { Resizer } from './resizer';\nimport memoize from 'fast-memoize';\nvar DEFAULT_SIZE = {\n width: 'auto',\n height: 'auto',\n};\nvar clamp = memoize(function (n, min, max) { return Math.max(Math.min(n, max), min); });\nvar snap = memoize(function (n, size) { return Math.round(n / size) * size; });\nvar hasDirection = memoize(function (dir, target) {\n return new RegExp(dir, 'i').test(target);\n});\n// INFO: In case of window is a Proxy and does not porxy Events correctly, use isTouchEvent & isMouseEvent to distinguish event type instead of `instanceof`.\nvar isTouchEvent = function (event) {\n return Boolean(event.touches && event.touches.length);\n};\nvar isMouseEvent = function (event) {\n return Boolean((event.clientX || event.clientX === 0) &&\n (event.clientY || event.clientY === 0));\n};\nvar findClosestSnap = memoize(function (n, snapArray, snapGap) {\n if (snapGap === void 0) { snapGap = 0; }\n var closestGapIndex = snapArray.reduce(function (prev, curr, index) { return (Math.abs(curr - n) < Math.abs(snapArray[prev] - n) ? index : prev); }, 0);\n var gap = Math.abs(snapArray[closestGapIndex] - n);\n return snapGap === 0 || gap < snapGap ? snapArray[closestGapIndex] : n;\n});\nvar endsWith = memoize(function (str, searchStr) {\n return str.substr(str.length - searchStr.length, searchStr.length) === searchStr;\n});\nvar getStringSize = memoize(function (n) {\n n = n.toString();\n if (n === 'auto') {\n return n;\n }\n if (endsWith(n, 'px')) {\n return n;\n }\n if (endsWith(n, '%')) {\n return n;\n }\n if (endsWith(n, 'vh')) {\n return n;\n }\n if (endsWith(n, 'vw')) {\n return n;\n }\n if (endsWith(n, 'vmax')) {\n return n;\n }\n if (endsWith(n, 'vmin')) {\n return n;\n }\n return n + \"px\";\n});\nvar getPixelSize = function (size, parentSize, innerWidth, innerHeight) {\n if (size && typeof size === 'string') {\n if (endsWith(size, 'px')) {\n return Number(size.replace('px', ''));\n }\n if (endsWith(size, '%')) {\n var ratio = Number(size.replace('%', '')) / 100;\n return parentSize * ratio;\n }\n if (endsWith(size, 'vw')) {\n var ratio = Number(size.replace('vw', '')) / 100;\n return innerWidth * ratio;\n }\n if (endsWith(size, 'vh')) {\n var ratio = Number(size.replace('vh', '')) / 100;\n return innerHeight * ratio;\n }\n }\n return size;\n};\nvar calculateNewMax = memoize(function (parentSize, innerWidth, innerHeight, maxWidth, maxHeight, minWidth, minHeight) {\n maxWidth = getPixelSize(maxWidth, parentSize.width, innerWidth, innerHeight);\n maxHeight = getPixelSize(maxHeight, parentSize.height, innerWidth, innerHeight);\n minWidth = getPixelSize(minWidth, parentSize.width, innerWidth, innerHeight);\n minHeight = getPixelSize(minHeight, parentSize.height, innerWidth, innerHeight);\n return {\n maxWidth: typeof maxWidth === 'undefined' ? undefined : Number(maxWidth),\n maxHeight: typeof maxHeight === 'undefined' ? undefined : Number(maxHeight),\n minWidth: typeof minWidth === 'undefined' ? undefined : Number(minWidth),\n minHeight: typeof minHeight === 'undefined' ? undefined : Number(minHeight),\n };\n});\nvar definedProps = [\n 'as',\n 'style',\n 'className',\n 'grid',\n 'snap',\n 'bounds',\n 'boundsByDirection',\n 'size',\n 'defaultSize',\n 'minWidth',\n 'minHeight',\n 'maxWidth',\n 'maxHeight',\n 'lockAspectRatio',\n 'lockAspectRatioExtraWidth',\n 'lockAspectRatioExtraHeight',\n 'enable',\n 'handleStyles',\n 'handleClasses',\n 'handleWrapperStyle',\n 'handleWrapperClass',\n 'children',\n 'onResizeStart',\n 'onResize',\n 'onResizeStop',\n 'handleComponent',\n 'scale',\n 'resizeRatio',\n 'snapGap',\n];\n// HACK: This class is used to calculate % size.\nvar baseClassName = '__resizable_base__';\nvar Resizable = /** @class */ (function (_super) {\n __extends(Resizable, _super);\n function Resizable(props) {\n var _this = _super.call(this, props) || this;\n _this.ratio = 1;\n _this.resizable = null;\n // For parent boundary\n _this.parentLeft = 0;\n _this.parentTop = 0;\n // For boundary\n _this.resizableLeft = 0;\n _this.resizableRight = 0;\n _this.resizableTop = 0;\n _this.resizableBottom = 0;\n // For target boundary\n _this.targetLeft = 0;\n _this.targetTop = 0;\n _this.appendBase = function () {\n if (!_this.resizable || !_this.window) {\n return null;\n }\n var parent = _this.parentNode;\n if (!parent) {\n return null;\n }\n var element = _this.window.document.createElement('div');\n element.style.width = '100%';\n element.style.height = '100%';\n element.style.position = 'absolute';\n element.style.transform = 'scale(0, 0)';\n element.style.left = '0';\n element.style.flex = '0';\n if (element.classList) {\n element.classList.add(baseClassName);\n }\n else {\n element.className += baseClassName;\n }\n parent.appendChild(element);\n return element;\n };\n _this.removeBase = function (base) {\n var parent = _this.parentNode;\n if (!parent) {\n return;\n }\n parent.removeChild(base);\n };\n _this.ref = function (c) {\n if (c) {\n _this.resizable = c;\n }\n };\n _this.state = {\n isResizing: false,\n width: typeof (_this.propsSize && _this.propsSize.width) === 'undefined'\n ? 'auto'\n : _this.propsSize && _this.propsSize.width,\n height: typeof (_this.propsSize && _this.propsSize.height) === 'undefined'\n ? 'auto'\n : _this.propsSize && _this.propsSize.height,\n direction: 'right',\n original: {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n },\n backgroundStyle: {\n height: '100%',\n width: '100%',\n backgroundColor: 'rgba(0,0,0,0)',\n cursor: 'auto',\n opacity: 0,\n position: 'fixed',\n zIndex: 9999,\n top: '0',\n left: '0',\n bottom: '0',\n right: '0',\n },\n flexBasis: undefined,\n };\n _this.onResizeStart = _this.onResizeStart.bind(_this);\n _this.onMouseMove = _this.onMouseMove.bind(_this);\n _this.onMouseUp = _this.onMouseUp.bind(_this);\n return _this;\n }\n Object.defineProperty(Resizable.prototype, \"parentNode\", {\n get: function () {\n if (!this.resizable) {\n return null;\n }\n return this.resizable.parentNode;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Resizable.prototype, \"window\", {\n get: function () {\n if (!this.resizable) {\n return null;\n }\n if (!this.resizable.ownerDocument) {\n return null;\n }\n return this.resizable.ownerDocument.defaultView;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Resizable.prototype, \"propsSize\", {\n get: function () {\n return this.props.size || this.props.defaultSize || DEFAULT_SIZE;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Resizable.prototype, \"size\", {\n get: function () {\n var width = 0;\n var height = 0;\n if (this.resizable && this.window) {\n var orgWidth = this.resizable.offsetWidth;\n var orgHeight = this.resizable.offsetHeight;\n // HACK: Set position `relative` to get parent size.\n // This is because when re-resizable set `absolute`, I can not get base width correctly.\n var orgPosition = this.resizable.style.position;\n if (orgPosition !== 'relative') {\n this.resizable.style.position = 'relative';\n }\n // INFO: Use original width or height if set auto.\n width = this.resizable.style.width !== 'auto' ? this.resizable.offsetWidth : orgWidth;\n height = this.resizable.style.height !== 'auto' ? this.resizable.offsetHeight : orgHeight;\n // Restore original position\n this.resizable.style.position = orgPosition;\n }\n return { width: width, height: height };\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Resizable.prototype, \"sizeStyle\", {\n get: function () {\n var _this = this;\n var size = this.props.size;\n var getSize = function (key) {\n if (typeof _this.state[key] === 'undefined' || _this.state[key] === 'auto') {\n return 'auto';\n }\n if (_this.propsSize && _this.propsSize[key] && endsWith(_this.propsSize[key].toString(), '%')) {\n if (endsWith(_this.state[key].toString(), '%')) {\n return _this.state[key].toString();\n }\n var parentSize = _this.getParentSize();\n var value = Number(_this.state[key].toString().replace('px', ''));\n var percent = (value / parentSize[key]) * 100;\n return percent + \"%\";\n }\n return getStringSize(_this.state[key]);\n };\n var width = size && typeof size.width !== 'undefined' && !this.state.isResizing\n ? getStringSize(size.width)\n : getSize('width');\n var height = size && typeof size.height !== 'undefined' && !this.state.isResizing\n ? getStringSize(size.height)\n : getSize('height');\n return { width: width, height: height };\n },\n enumerable: false,\n configurable: true\n });\n Resizable.prototype.getParentSize = function () {\n if (!this.parentNode) {\n if (!this.window) {\n return { width: 0, height: 0 };\n }\n return { width: this.window.innerWidth, height: this.window.innerHeight };\n }\n var base = this.appendBase();\n if (!base) {\n return { width: 0, height: 0 };\n }\n // INFO: To calculate parent width with flex layout\n var wrapChanged = false;\n var wrap = this.parentNode.style.flexWrap;\n if (wrap !== 'wrap') {\n wrapChanged = true;\n this.parentNode.style.flexWrap = 'wrap';\n // HACK: Use relative to get parent padding size\n }\n base.style.position = 'relative';\n base.style.minWidth = '100%';\n var size = {\n width: base.offsetWidth,\n height: base.offsetHeight,\n };\n if (wrapChanged) {\n this.parentNode.style.flexWrap = wrap;\n }\n this.removeBase(base);\n return size;\n };\n Resizable.prototype.bindEvents = function () {\n if (this.window) {\n this.window.addEventListener('mouseup', this.onMouseUp);\n this.window.addEventListener('mousemove', this.onMouseMove);\n this.window.addEventListener('mouseleave', this.onMouseUp);\n this.window.addEventListener('touchmove', this.onMouseMove, {\n capture: true,\n passive: false,\n });\n this.window.addEventListener('touchend', this.onMouseUp);\n }\n };\n Resizable.prototype.unbindEvents = function () {\n if (this.window) {\n this.window.removeEventListener('mouseup', this.onMouseUp);\n this.window.removeEventListener('mousemove', this.onMouseMove);\n this.window.removeEventListener('mouseleave', this.onMouseUp);\n this.window.removeEventListener('touchmove', this.onMouseMove, true);\n this.window.removeEventListener('touchend', this.onMouseUp);\n }\n };\n Resizable.prototype.componentDidMount = function () {\n if (!this.resizable || !this.window) {\n return;\n }\n var computedStyle = this.window.getComputedStyle(this.resizable);\n this.setState({\n width: this.state.width || this.size.width,\n height: this.state.height || this.size.height,\n flexBasis: computedStyle.flexBasis !== 'auto' ? computedStyle.flexBasis : undefined,\n });\n };\n Resizable.prototype.componentWillUnmount = function () {\n if (this.window) {\n this.unbindEvents();\n }\n };\n Resizable.prototype.createSizeForCssProperty = function (newSize, kind) {\n var propsSize = this.propsSize && this.propsSize[kind];\n return this.state[kind] === 'auto' &&\n this.state.original[kind] === newSize &&\n (typeof propsSize === 'undefined' || propsSize === 'auto')\n ? 'auto'\n : newSize;\n };\n Resizable.prototype.calculateNewMaxFromBoundary = function (maxWidth, maxHeight) {\n var boundsByDirection = this.props.boundsByDirection;\n var direction = this.state.direction;\n var widthByDirection = boundsByDirection && hasDirection('left', direction);\n var heightByDirection = boundsByDirection && hasDirection('top', direction);\n var boundWidth;\n var boundHeight;\n if (this.props.bounds === 'parent') {\n var parent_1 = this.parentNode;\n if (parent_1) {\n boundWidth = widthByDirection\n ? this.resizableRight - this.parentLeft\n : parent_1.offsetWidth + (this.parentLeft - this.resizableLeft);\n boundHeight = heightByDirection\n ? this.resizableBottom - this.parentTop\n : parent_1.offsetHeight + (this.parentTop - this.resizableTop);\n }\n }\n else if (this.props.bounds === 'window') {\n if (this.window) {\n boundWidth = widthByDirection ? this.resizableRight : this.window.innerWidth - this.resizableLeft;\n boundHeight = heightByDirection ? this.resizableBottom : this.window.innerHeight - this.resizableTop;\n }\n }\n else if (this.props.bounds) {\n boundWidth = widthByDirection\n ? this.resizableRight - this.targetLeft\n : this.props.bounds.offsetWidth + (this.targetLeft - this.resizableLeft);\n boundHeight = heightByDirection\n ? this.resizableBottom - this.targetTop\n : this.props.bounds.offsetHeight + (this.targetTop - this.resizableTop);\n }\n if (boundWidth && Number.isFinite(boundWidth)) {\n maxWidth = maxWidth && maxWidth < boundWidth ? maxWidth : boundWidth;\n }\n if (boundHeight && Number.isFinite(boundHeight)) {\n maxHeight = maxHeight && maxHeight < boundHeight ? maxHeight : boundHeight;\n }\n return { maxWidth: maxWidth, maxHeight: maxHeight };\n };\n Resizable.prototype.calculateNewSizeFromDirection = function (clientX, clientY) {\n var scale = this.props.scale || 1;\n var resizeRatio = this.props.resizeRatio || 1;\n var _a = this.state, direction = _a.direction, original = _a.original;\n var _b = this.props, lockAspectRatio = _b.lockAspectRatio, lockAspectRatioExtraHeight = _b.lockAspectRatioExtraHeight, lockAspectRatioExtraWidth = _b.lockAspectRatioExtraWidth;\n var newWidth = original.width;\n var newHeight = original.height;\n var extraHeight = lockAspectRatioExtraHeight || 0;\n var extraWidth = lockAspectRatioExtraWidth || 0;\n if (hasDirection('right', direction)) {\n newWidth = original.width + ((clientX - original.x) * resizeRatio) / scale;\n if (lockAspectRatio) {\n newHeight = (newWidth - extraWidth) / this.ratio + extraHeight;\n }\n }\n if (hasDirection('left', direction)) {\n newWidth = original.width - ((clientX - original.x) * resizeRatio) / scale;\n if (lockAspectRatio) {\n newHeight = (newWidth - extraWidth) / this.ratio + extraHeight;\n }\n }\n if (hasDirection('bottom', direction)) {\n newHeight = original.height + ((clientY - original.y) * resizeRatio) / scale;\n if (lockAspectRatio) {\n newWidth = (newHeight - extraHeight) * this.ratio + extraWidth;\n }\n }\n if (hasDirection('top', direction)) {\n newHeight = original.height - ((clientY - original.y) * resizeRatio) / scale;\n if (lockAspectRatio) {\n newWidth = (newHeight - extraHeight) * this.ratio + extraWidth;\n }\n }\n return { newWidth: newWidth, newHeight: newHeight };\n };\n Resizable.prototype.calculateNewSizeFromAspectRatio = function (newWidth, newHeight, max, min) {\n var _a = this.props, lockAspectRatio = _a.lockAspectRatio, lockAspectRatioExtraHeight = _a.lockAspectRatioExtraHeight, lockAspectRatioExtraWidth = _a.lockAspectRatioExtraWidth;\n var computedMinWidth = typeof min.width === 'undefined' ? 10 : min.width;\n var computedMaxWidth = typeof max.width === 'undefined' || max.width < 0 ? newWidth : max.width;\n var computedMinHeight = typeof min.height === 'undefined' ? 10 : min.height;\n var computedMaxHeight = typeof max.height === 'undefined' || max.height < 0 ? newHeight : max.height;\n var extraHeight = lockAspectRatioExtraHeight || 0;\n var extraWidth = lockAspectRatioExtraWidth || 0;\n if (lockAspectRatio) {\n var extraMinWidth = (computedMinHeight - extraHeight) * this.ratio + extraWidth;\n var extraMaxWidth = (computedMaxHeight - extraHeight) * this.ratio + extraWidth;\n var extraMinHeight = (computedMinWidth - extraWidth) / this.ratio + extraHeight;\n var extraMaxHeight = (computedMaxWidth - extraWidth) / this.ratio + extraHeight;\n var lockedMinWidth = Math.max(computedMinWidth, extraMinWidth);\n var lockedMaxWidth = Math.min(computedMaxWidth, extraMaxWidth);\n var lockedMinHeight = Math.max(computedMinHeight, extraMinHeight);\n var lockedMaxHeight = Math.min(computedMaxHeight, extraMaxHeight);\n newWidth = clamp(newWidth, lockedMinWidth, lockedMaxWidth);\n newHeight = clamp(newHeight, lockedMinHeight, lockedMaxHeight);\n }\n else {\n newWidth = clamp(newWidth, computedMinWidth, computedMaxWidth);\n newHeight = clamp(newHeight, computedMinHeight, computedMaxHeight);\n }\n return { newWidth: newWidth, newHeight: newHeight };\n };\n Resizable.prototype.setBoundingClientRect = function () {\n // For parent boundary\n if (this.props.bounds === 'parent') {\n var parent_2 = this.parentNode;\n if (parent_2) {\n var parentRect = parent_2.getBoundingClientRect();\n this.parentLeft = parentRect.left;\n this.parentTop = parentRect.top;\n }\n }\n // For target(html element) boundary\n if (this.props.bounds && typeof this.props.bounds !== 'string') {\n var targetRect = this.props.bounds.getBoundingClientRect();\n this.targetLeft = targetRect.left;\n this.targetTop = targetRect.top;\n }\n // For boundary\n if (this.resizable) {\n var _a = this.resizable.getBoundingClientRect(), left = _a.left, top_1 = _a.top, right = _a.right, bottom = _a.bottom;\n this.resizableLeft = left;\n this.resizableRight = right;\n this.resizableTop = top_1;\n this.resizableBottom = bottom;\n }\n };\n Resizable.prototype.onResizeStart = function (event, direction) {\n if (!this.resizable || !this.window) {\n return;\n }\n var clientX = 0;\n var clientY = 0;\n if (event.nativeEvent && isMouseEvent(event.nativeEvent)) {\n clientX = event.nativeEvent.clientX;\n clientY = event.nativeEvent.clientY;\n // When user click with right button the resize is stuck in resizing mode\n // until users clicks again, dont continue if right click is used.\n // HACK: MouseEvent does not have `which` from flow-bin v0.68.\n if (event.nativeEvent.which === 3) {\n return;\n }\n }\n else if (event.nativeEvent && isTouchEvent(event.nativeEvent)) {\n clientX = event.nativeEvent.touches[0].clientX;\n clientY = event.nativeEvent.touches[0].clientY;\n }\n if (this.props.onResizeStart) {\n if (this.resizable) {\n var startResize = this.props.onResizeStart(event, direction, this.resizable);\n if (startResize === false) {\n return;\n }\n }\n }\n // Fix #168\n if (this.props.size) {\n if (typeof this.props.size.height !== 'undefined' && this.props.size.height !== this.state.height) {\n this.setState({ height: this.props.size.height });\n }\n if (typeof this.props.size.width !== 'undefined' && this.props.size.width !== this.state.width) {\n this.setState({ width: this.props.size.width });\n }\n }\n // For lockAspectRatio case\n this.ratio =\n typeof this.props.lockAspectRatio === 'number' ? this.props.lockAspectRatio : this.size.width / this.size.height;\n var flexBasis;\n var computedStyle = this.window.getComputedStyle(this.resizable);\n if (computedStyle.flexBasis !== 'auto') {\n var parent_3 = this.parentNode;\n if (parent_3) {\n var dir = this.window.getComputedStyle(parent_3).flexDirection;\n this.flexDir = dir.startsWith('row') ? 'row' : 'column';\n flexBasis = computedStyle.flexBasis;\n }\n }\n // For boundary\n this.setBoundingClientRect();\n this.bindEvents();\n var state = {\n original: {\n x: clientX,\n y: clientY,\n width: this.size.width,\n height: this.size.height,\n },\n isResizing: true,\n backgroundStyle: __assign(__assign({}, this.state.backgroundStyle), { cursor: this.window.getComputedStyle(event.target).cursor || 'auto' }),\n direction: direction,\n flexBasis: flexBasis,\n };\n this.setState(state);\n };\n Resizable.prototype.onMouseMove = function (event) {\n if (!this.state.isResizing || !this.resizable || !this.window) {\n return;\n }\n if (this.window.TouchEvent && isTouchEvent(event)) {\n try {\n event.preventDefault();\n event.stopPropagation();\n }\n catch (e) {\n // Ignore on fail\n }\n }\n var _a = this.props, maxWidth = _a.maxWidth, maxHeight = _a.maxHeight, minWidth = _a.minWidth, minHeight = _a.minHeight;\n var clientX = isTouchEvent(event) ? event.touches[0].clientX : event.clientX;\n var clientY = isTouchEvent(event) ? event.touches[0].clientY : event.clientY;\n var _b = this.state, direction = _b.direction, original = _b.original, width = _b.width, height = _b.height;\n var parentSize = this.getParentSize();\n var max = calculateNewMax(parentSize, this.window.innerWidth, this.window.innerHeight, maxWidth, maxHeight, minWidth, minHeight);\n maxWidth = max.maxWidth;\n maxHeight = max.maxHeight;\n minWidth = max.minWidth;\n minHeight = max.minHeight;\n // Calculate new size\n var _c = this.calculateNewSizeFromDirection(clientX, clientY), newHeight = _c.newHeight, newWidth = _c.newWidth;\n // Calculate max size from boundary settings\n var boundaryMax = this.calculateNewMaxFromBoundary(maxWidth, maxHeight);\n // Calculate new size from aspect ratio\n var newSize = this.calculateNewSizeFromAspectRatio(newWidth, newHeight, { width: boundaryMax.maxWidth, height: boundaryMax.maxHeight }, { width: minWidth, height: minHeight });\n newWidth = newSize.newWidth;\n newHeight = newSize.newHeight;\n if (this.props.grid) {\n var newGridWidth = snap(newWidth, this.props.grid[0]);\n var newGridHeight = snap(newHeight, this.props.grid[1]);\n var gap = this.props.snapGap || 0;\n newWidth = gap === 0 || Math.abs(newGridWidth - newWidth) <= gap ? newGridWidth : newWidth;\n newHeight = gap === 0 || Math.abs(newGridHeight - newHeight) <= gap ? newGridHeight : newHeight;\n }\n if (this.props.snap && this.props.snap.x) {\n newWidth = findClosestSnap(newWidth, this.props.snap.x, this.props.snapGap);\n }\n if (this.props.snap && this.props.snap.y) {\n newHeight = findClosestSnap(newHeight, this.props.snap.y, this.props.snapGap);\n }\n var delta = {\n width: newWidth - original.width,\n height: newHeight - original.height,\n };\n if (width && typeof width === 'string') {\n if (endsWith(width, '%')) {\n var percent = (newWidth / parentSize.width) * 100;\n newWidth = percent + \"%\";\n }\n else if (endsWith(width, 'vw')) {\n var vw = (newWidth / this.window.innerWidth) * 100;\n newWidth = vw + \"vw\";\n }\n else if (endsWith(width, 'vh')) {\n var vh = (newWidth / this.window.innerHeight) * 100;\n newWidth = vh + \"vh\";\n }\n }\n if (height && typeof height === 'string') {\n if (endsWith(height, '%')) {\n var percent = (newHeight / parentSize.height) * 100;\n newHeight = percent + \"%\";\n }\n else if (endsWith(height, 'vw')) {\n var vw = (newHeight / this.window.innerWidth) * 100;\n newHeight = vw + \"vw\";\n }\n else if (endsWith(height, 'vh')) {\n var vh = (newHeight / this.window.innerHeight) * 100;\n newHeight = vh + \"vh\";\n }\n }\n var newState = {\n width: this.createSizeForCssProperty(newWidth, 'width'),\n height: this.createSizeForCssProperty(newHeight, 'height'),\n };\n if (this.flexDir === 'row') {\n newState.flexBasis = newState.width;\n }\n else if (this.flexDir === 'column') {\n newState.flexBasis = newState.height;\n }\n this.setState(newState);\n if (this.props.onResize) {\n this.props.onResize(event, direction, this.resizable, delta);\n }\n };\n Resizable.prototype.onMouseUp = function (event) {\n var _a = this.state, isResizing = _a.isResizing, direction = _a.direction, original = _a.original;\n if (!isResizing || !this.resizable) {\n return;\n }\n var delta = {\n width: this.size.width - original.width,\n height: this.size.height - original.height,\n };\n if (this.props.onResizeStop) {\n this.props.onResizeStop(event, direction, this.resizable, delta);\n }\n if (this.props.size) {\n this.setState(this.props.size);\n }\n this.unbindEvents();\n this.setState({\n isResizing: false,\n backgroundStyle: __assign(__assign({}, this.state.backgroundStyle), { cursor: 'auto' }),\n });\n };\n Resizable.prototype.updateSize = function (size) {\n this.setState({ width: size.width, height: size.height });\n };\n Resizable.prototype.renderResizer = function () {\n var _this = this;\n var _a = this.props, enable = _a.enable, handleStyles = _a.handleStyles, handleClasses = _a.handleClasses, handleWrapperStyle = _a.handleWrapperStyle, handleWrapperClass = _a.handleWrapperClass, handleComponent = _a.handleComponent;\n if (!enable) {\n return null;\n }\n var resizers = Object.keys(enable).map(function (dir) {\n if (enable[dir] !== false) {\n return (React.createElement(Resizer, { key: dir, direction: dir, onResizeStart: _this.onResizeStart, replaceStyles: handleStyles && handleStyles[dir], className: handleClasses && handleClasses[dir] }, handleComponent && handleComponent[dir] ? handleComponent[dir] : null));\n }\n return null;\n });\n // #93 Wrap the resize box in span (will not break 100% width/height)\n return (React.createElement(\"div\", { className: handleWrapperClass, style: handleWrapperStyle }, resizers));\n };\n Resizable.prototype.render = function () {\n var _this = this;\n var extendsProps = Object.keys(this.props).reduce(function (acc, key) {\n if (definedProps.indexOf(key) !== -1) {\n return acc;\n }\n acc[key] = _this.props[key];\n return acc;\n }, {});\n var style = __assign(__assign(__assign({ position: 'relative', userSelect: this.state.isResizing ? 'none' : 'auto' }, this.props.style), this.sizeStyle), { maxWidth: this.props.maxWidth, maxHeight: this.props.maxHeight, minWidth: this.props.minWidth, minHeight: this.props.minHeight, boxSizing: 'border-box', flexShrink: 0 });\n if (this.state.flexBasis) {\n style.flexBasis = this.state.flexBasis;\n }\n var Wrapper = this.props.as || 'div';\n return (React.createElement(Wrapper, __assign({ ref: this.ref, style: style, className: this.props.className }, extendsProps),\n this.state.isResizing && React.createElement(\"div\", { style: this.state.backgroundStyle }),\n this.props.children,\n this.renderResizer()));\n };\n Resizable.defaultProps = {\n as: 'div',\n onResizeStart: function () { },\n onResize: function () { },\n onResizeStop: function () { },\n enable: {\n top: true,\n right: true,\n bottom: true,\n left: true,\n topRight: true,\n bottomRight: true,\n bottomLeft: true,\n topLeft: true,\n },\n style: {},\n grid: [1, 1],\n lockAspectRatio: false,\n lockAspectRatioExtraWidth: 0,\n lockAspectRatioExtraHeight: 0,\n scale: 1,\n resizeRatio: 1,\n snapGap: 0,\n };\n return Resizable;\n}(React.PureComponent));\nexport { Resizable };\n","/**\n * WordPress dependencies\n */\nimport { useCallback, useEffect, useRef, useState } from '@wordpress/element';\nimport { useResizeObserver } from '@wordpress/compose';\n\nconst noop = () => {};\n\nexport type Axis = 'x' | 'y';\n\nexport const POSITIONS = {\n\tbottom: 'bottom',\n\tcorner: 'corner',\n} as const;\n\nexport type Position = ( typeof POSITIONS )[ keyof typeof POSITIONS ];\n\ninterface UseResizeLabelProps {\n\t/** The label value. */\n\tlabel?: string;\n\t/** Element to be rendered for resize listening events. */\n\tresizeListener: JSX.Element;\n}\n\ninterface UseResizeLabelArgs {\n\taxis?: Axis;\n\tfadeTimeout: number;\n\tonResize: ( data: { width: number | null; height: number | null } ) => void;\n\tposition: Position;\n\tshowPx: boolean;\n}\n\n/**\n * Custom hook that manages resize listener events. It also provides a label\n * based on current resize width x height values.\n *\n * @param props\n * @param props.axis Only shows the label corresponding to the axis.\n * @param props.fadeTimeout Duration (ms) before deactivating the resize label.\n * @param props.onResize Callback when a resize occurs. Provides { width, height } callback.\n * @param props.position Adjusts label value.\n * @param props.showPx Whether to add `PX` to the label.\n *\n * @return Properties for hook.\n */\nexport function useResizeLabel( {\n\taxis,\n\tfadeTimeout = 180,\n\tonResize = noop,\n\tposition = POSITIONS.bottom,\n\tshowPx = false,\n}: UseResizeLabelArgs ): UseResizeLabelProps {\n\t/*\n\t * The width/height values derive from this special useResizeObserver hook.\n\t * This custom hook uses the ResizeObserver API to listen for resize events.\n\t */\n\tconst [ resizeListener, sizes ] = useResizeObserver();\n\n\t/*\n\t * Indicates if the x/y axis is preferred.\n\t * If set, we will avoid resetting the moveX and moveY values.\n\t * This will allow for the preferred axis values to persist in the label.\n\t */\n\tconst isAxisControlled = !! axis;\n\n\t/*\n\t * The moveX and moveY values are used to track whether the label should\n\t * display width, height, or width x height.\n\t */\n\tconst [ moveX, setMoveX ] = useState( false );\n\tconst [ moveY, setMoveY ] = useState( false );\n\n\t/*\n\t * Cached dimension values to check for width/height updates from the\n\t * sizes property from useResizeAware()\n\t */\n\tconst { width, height } = sizes;\n\tconst heightRef = useRef( height );\n\tconst widthRef = useRef( width );\n\n\t/*\n\t * This timeout is used with setMoveX and setMoveY to determine of\n\t * both width and height values have changed at (roughly) the same time.\n\t */\n\tconst moveTimeoutRef = useRef< number >();\n\n\tconst debounceUnsetMoveXY = useCallback( () => {\n\t\tconst unsetMoveXY = () => {\n\t\t\t/*\n\t\t\t * If axis is controlled, we will avoid resetting the moveX and moveY values.\n\t\t\t * This will allow for the preferred axis values to persist in the label.\n\t\t\t */\n\t\t\tif ( isAxisControlled ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsetMoveX( false );\n\t\t\tsetMoveY( false );\n\t\t};\n\n\t\tif ( moveTimeoutRef.current ) {\n\t\t\twindow.clearTimeout( moveTimeoutRef.current );\n\t\t}\n\n\t\tmoveTimeoutRef.current = window.setTimeout( unsetMoveXY, fadeTimeout );\n\t}, [ fadeTimeout, isAxisControlled ] );\n\n\tuseEffect( () => {\n\t\t/*\n\t\t * On the initial render of useResizeAware, the height and width values are\n\t\t * null. They are calculated then set using via an internal useEffect hook.\n\t\t */\n\t\tconst isRendered = width !== null || height !== null;\n\n\t\tif ( ! isRendered ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst didWidthChange = width !== widthRef.current;\n\t\tconst didHeightChange = height !== heightRef.current;\n\n\t\tif ( ! didWidthChange && ! didHeightChange ) {\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * After the initial render, the useResizeAware will set the first\n\t\t * width and height values. We'll sync those values with our\n\t\t * width and height refs. However, we shouldn't render our Tooltip\n\t\t * label on this first cycle.\n\t\t */\n\t\tif ( width && ! widthRef.current && height && ! heightRef.current ) {\n\t\t\twidthRef.current = width;\n\t\t\theightRef.current = height;\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * After the first cycle, we can track width and height changes.\n\t\t */\n\t\tif ( didWidthChange ) {\n\t\t\tsetMoveX( true );\n\t\t\twidthRef.current = width;\n\t\t}\n\n\t\tif ( didHeightChange ) {\n\t\t\tsetMoveY( true );\n\t\t\theightRef.current = height;\n\t\t}\n\n\t\tonResize( { width, height } );\n\t\tdebounceUnsetMoveXY();\n\t}, [ width, height, onResize, debounceUnsetMoveXY ] );\n\n\tconst label = getSizeLabel( {\n\t\taxis,\n\t\theight,\n\t\tmoveX,\n\t\tmoveY,\n\t\tposition,\n\t\tshowPx,\n\t\twidth,\n\t} );\n\n\treturn {\n\t\tlabel,\n\t\tresizeListener,\n\t};\n}\n\ninterface GetSizeLabelArgs {\n\taxis?: Axis;\n\theight: number | null;\n\tmoveX: boolean;\n\tmoveY: boolean;\n\tposition: Position;\n\tshowPx: boolean;\n\twidth: number | null;\n}\n\n/**\n * Gets the resize label based on width and height values (as well as recent changes).\n *\n * @param props\n * @param props.axis Only shows the label corresponding to the axis.\n * @param props.height Height value.\n * @param props.moveX Recent width (x axis) changes.\n * @param props.moveY Recent width (y axis) changes.\n * @param props.position Adjusts label value.\n * @param props.showPx Whether to add `PX` to the label.\n * @param props.width Width value.\n *\n * @return The rendered label.\n */\nfunction getSizeLabel( {\n\taxis,\n\theight,\n\tmoveX = false,\n\tmoveY = false,\n\tposition = POSITIONS.bottom,\n\tshowPx = false,\n\twidth,\n}: GetSizeLabelArgs ): string | undefined {\n\tif ( ! moveX && ! moveY ) {\n\t\treturn undefined;\n\t}\n\n\t/*\n\t * Corner position...\n\t * We want the label to appear like width x height.\n\t */\n\tif ( position === POSITIONS.corner ) {\n\t\treturn `${ width } x ${ height }`;\n\t}\n\n\t/*\n\t * Other POSITIONS...\n\t * The label will combine both width x height values if both\n\t * values have recently been changed.\n\t *\n\t * Otherwise, only width or height will be displayed.\n\t * The `PX` unit will be added, if specified by the `showPx` prop.\n\t */\n\tconst labelUnit = showPx ? ' px' : '';\n\n\tif ( axis ) {\n\t\tif ( axis === 'x' && moveX ) {\n\t\t\treturn `${ width }${ labelUnit }`;\n\t\t}\n\t\tif ( axis === 'y' && moveY ) {\n\t\t\treturn `${ height }${ labelUnit }`;\n\t\t}\n\t}\n\n\tif ( moveX && moveY ) {\n\t\treturn `${ width } x ${ height }`;\n\t}\n\tif ( moveX ) {\n\t\treturn `${ width }${ labelUnit }`;\n\t}\n\tif ( moveY ) {\n\t\treturn `${ height }${ labelUnit }`;\n\t}\n\n\treturn undefined;\n}\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport { Text } from '../../../text';\nimport { font, COLORS, CONFIG } from '../../../utils';\n\nexport const Root = styled.div`\n\tbottom: 0;\n\tbox-sizing: border-box;\n\tleft: 0;\n\tpointer-events: none;\n\tposition: absolute;\n\tright: 0;\n\ttop: 0;\n`;\n\nexport const TooltipWrapper = styled.div`\n\talign-items: center;\n\tbox-sizing: border-box;\n\tdisplay: inline-flex;\n\tjustify-content: center;\n\topacity: 0;\n\tpointer-events: none;\n\ttransition: opacity 120ms linear;\n`;\n\nexport const Tooltip = styled.div`\n\tbackground: ${ COLORS.theme.foreground };\n\tborder-radius: ${ CONFIG.radiusSmall };\n\tbox-sizing: border-box;\n\tfont-family: ${ font( 'default.fontFamily' ) };\n\tfont-size: 12px;\n\tcolor: ${ COLORS.theme.foregroundInverted };\n\tpadding: 4px 8px;\n\tposition: relative;\n`;\n\n// TODO: Resolve need to use &&& to increase specificity\n// https://github.com/WordPress/gutenberg/issues/18483\n\nexport const LabelText = styled( Text )`\n\t&&& {\n\t\tcolor: ${ COLORS.theme.foregroundInverted };\n\t\tdisplay: block;\n\t\tfont-size: 13px;\n\t\tline-height: 1.4;\n\t\twhite-space: nowrap;\n\t}\n`;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { Position } from './utils';\nimport { POSITIONS } from './utils';\nimport {\n\tTooltipWrapper,\n\tTooltip,\n\tLabelText,\n} from './styles/resize-tooltip.styles';\n\nconst CORNER_OFFSET = 4;\nconst CURSOR_OFFSET_TOP = CORNER_OFFSET * 2.5;\n\ntype LabelProps = React.DetailedHTMLProps<\n\tReact.HTMLAttributes< HTMLDivElement >,\n\tHTMLDivElement\n> & {\n\tlabel?: string;\n\tposition: Position;\n\tzIndex: number;\n};\n\nfunction Label(\n\t{ label, position = POSITIONS.corner, zIndex = 1000, ...props }: LabelProps,\n\tref: ForwardedRef< HTMLDivElement >\n): JSX.Element | null {\n\tconst showLabel = !! label;\n\n\tconst isBottom = position === POSITIONS.bottom;\n\tconst isCorner = position === POSITIONS.corner;\n\n\tif ( ! showLabel ) {\n\t\treturn null;\n\t}\n\n\tlet style: React.CSSProperties = {\n\t\topacity: showLabel ? 1 : undefined,\n\t\tzIndex,\n\t};\n\n\tlet labelStyle = {};\n\n\tif ( isBottom ) {\n\t\tstyle = {\n\t\t\t...style,\n\t\t\tposition: 'absolute',\n\t\t\tbottom: CURSOR_OFFSET_TOP * -1,\n\t\t\tleft: '50%',\n\t\t\ttransform: 'translate(-50%, 0)',\n\t\t};\n\n\t\tlabelStyle = {\n\t\t\ttransform: `translate(0, 100%)`,\n\t\t};\n\t}\n\n\tif ( isCorner ) {\n\t\tstyle = {\n\t\t\t...style,\n\t\t\tposition: 'absolute',\n\t\t\ttop: CORNER_OFFSET,\n\t\t\tright: isRTL() ? undefined : CORNER_OFFSET,\n\t\t\tleft: isRTL() ? CORNER_OFFSET : undefined,\n\t\t};\n\t}\n\n\treturn (\n\t\t<TooltipWrapper\n\t\t\taria-hidden=\"true\"\n\t\t\tclassName=\"components-resizable-tooltip__tooltip-wrapper\"\n\t\t\tref={ ref }\n\t\t\tstyle={ style }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t<Tooltip\n\t\t\t\tclassName=\"components-resizable-tooltip__tooltip\"\n\t\t\t\tstyle={ labelStyle }\n\t\t\t>\n\t\t\t\t<LabelText as=\"span\">{ label }</LabelText>\n\t\t\t</Tooltip>\n\t\t</TooltipWrapper>\n\t);\n}\n\nconst ForwardedComponent = forwardRef( Label );\n\nexport default ForwardedComponent;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { Ref, ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Label from './label';\nimport type { Axis, Position } from './utils';\nimport { useResizeLabel, POSITIONS } from './utils';\nimport { Root } from './styles/resize-tooltip.styles';\n\ntype ResizeTooltipProps = React.ComponentProps< typeof Root > & {\n\t'aria-hidden'?: boolean;\n\taxis?: Axis;\n\tclassName?: string;\n\tfadeTimeout?: number;\n\tisVisible?: boolean;\n\tlabelRef?: Ref< HTMLDivElement >;\n\tonResize?: Parameters< typeof useResizeLabel >[ 0 ][ 'onResize' ];\n\tposition?: Position;\n\tshowPx?: boolean;\n\tzIndex?: number;\n};\n\nconst noop = () => {};\n\nfunction ResizeTooltip(\n\t{\n\t\taxis,\n\t\tclassName,\n\t\tfadeTimeout = 180,\n\t\tisVisible = true,\n\t\tlabelRef,\n\t\tonResize = noop,\n\t\tposition = POSITIONS.bottom,\n\t\tshowPx = true,\n\t\tzIndex = 1000,\n\t\t...props\n\t}: ResizeTooltipProps,\n\tref: ForwardedRef< HTMLDivElement >\n): JSX.Element | null {\n\tconst { label, resizeListener } = useResizeLabel( {\n\t\taxis,\n\t\tfadeTimeout,\n\t\tonResize,\n\t\tshowPx,\n\t\tposition,\n\t} );\n\n\tif ( ! isVisible ) {\n\t\treturn null;\n\t}\n\n\tconst classes = clsx( 'components-resize-tooltip', className );\n\n\treturn (\n\t\t<Root aria-hidden=\"true\" className={ classes } ref={ ref } { ...props }>\n\t\t\t{ resizeListener }\n\t\t\t<Label\n\t\t\t\taria-hidden={ props[ 'aria-hidden' ] }\n\t\t\t\tlabel={ label }\n\t\t\t\tposition={ position }\n\t\t\t\tref={ labelRef }\n\t\t\t\tzIndex={ zIndex }\n\t\t\t/>\n\t\t</Root>\n\t);\n}\n\nconst ForwardedComponent = forwardRef( ResizeTooltip );\n\nexport default ForwardedComponent;\n","/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport { Resizable } from 're-resizable';\nimport type { ResizableProps } from 're-resizable';\nimport type { ReactNode, ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport ResizeTooltip from './resize-tooltip';\n\nconst HANDLE_CLASS_NAME = 'components-resizable-box__handle';\nconst SIDE_HANDLE_CLASS_NAME = 'components-resizable-box__side-handle';\nconst CORNER_HANDLE_CLASS_NAME = 'components-resizable-box__corner-handle';\n\nconst HANDLE_CLASSES = {\n\ttop: clsx(\n\t\tHANDLE_CLASS_NAME,\n\t\tSIDE_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-top'\n\t),\n\tright: clsx(\n\t\tHANDLE_CLASS_NAME,\n\t\tSIDE_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-right'\n\t),\n\tbottom: clsx(\n\t\tHANDLE_CLASS_NAME,\n\t\tSIDE_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-bottom'\n\t),\n\tleft: clsx(\n\t\tHANDLE_CLASS_NAME,\n\t\tSIDE_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-left'\n\t),\n\ttopLeft: clsx(\n\t\tHANDLE_CLASS_NAME,\n\t\tCORNER_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-top',\n\t\t'components-resizable-box__handle-left'\n\t),\n\ttopRight: clsx(\n\t\tHANDLE_CLASS_NAME,\n\t\tCORNER_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-top',\n\t\t'components-resizable-box__handle-right'\n\t),\n\tbottomRight: clsx(\n\t\tHANDLE_CLASS_NAME,\n\t\tCORNER_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-bottom',\n\t\t'components-resizable-box__handle-right'\n\t),\n\tbottomLeft: clsx(\n\t\tHANDLE_CLASS_NAME,\n\t\tCORNER_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-bottom',\n\t\t'components-resizable-box__handle-left'\n\t),\n};\n\n// Removes the inline styles in the drag handles.\nconst HANDLE_STYLES_OVERRIDES = {\n\twidth: undefined,\n\theight: undefined,\n\ttop: undefined,\n\tright: undefined,\n\tbottom: undefined,\n\tleft: undefined,\n};\nconst HANDLE_STYLES = {\n\ttop: HANDLE_STYLES_OVERRIDES,\n\tright: HANDLE_STYLES_OVERRIDES,\n\tbottom: HANDLE_STYLES_OVERRIDES,\n\tleft: HANDLE_STYLES_OVERRIDES,\n\ttopLeft: HANDLE_STYLES_OVERRIDES,\n\ttopRight: HANDLE_STYLES_OVERRIDES,\n\tbottomRight: HANDLE_STYLES_OVERRIDES,\n\tbottomLeft: HANDLE_STYLES_OVERRIDES,\n};\n\ntype ResizableBoxProps = ResizableProps & {\n\tchildren: ReactNode;\n\tshowHandle?: boolean;\n\t__experimentalShowTooltip?: boolean;\n\t__experimentalTooltipProps?: Parameters< typeof ResizeTooltip >[ 0 ];\n};\n\nfunction UnforwardedResizableBox(\n\t{\n\t\tclassName,\n\t\tchildren,\n\t\tshowHandle = true,\n\t\t__experimentalShowTooltip: showTooltip = false,\n\t\t__experimentalTooltipProps: tooltipProps = {},\n\t\t...props\n\t}: ResizableBoxProps,\n\tref: ForwardedRef< Resizable >\n): JSX.Element {\n\treturn (\n\t\t<Resizable\n\t\t\tclassName={ clsx(\n\t\t\t\t'components-resizable-box__container',\n\t\t\t\tshowHandle && 'has-show-handle',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\t// Add a focusable element within the drag handle. Unfortunately,\n\t\t\t// `re-resizable` does not make them properly focusable by default,\n\t\t\t// causing focus to move the the block wrapper which triggers block\n\t\t\t// drag.\n\t\t\thandleComponent={ Object.fromEntries(\n\t\t\t\tObject.keys( HANDLE_CLASSES ).map( ( key ) => [\n\t\t\t\t\tkey,\n\t\t\t\t\t<div key={ key } tabIndex={ -1 } />,\n\t\t\t\t] )\n\t\t\t) }\n\t\t\thandleClasses={ HANDLE_CLASSES }\n\t\t\thandleStyles={ HANDLE_STYLES }\n\t\t\tref={ ref }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ children }\n\t\t\t{ showTooltip && <ResizeTooltip { ...tooltipProps } /> }\n\t\t</Resizable>\n\t);\n}\n\nexport const ResizableBox = forwardRef( UnforwardedResizableBox );\n\nexport default ResizableBox;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { cloneElement, Children } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { ResponsiveWrapperProps } from './types';\n\n/**\n * A wrapper component that maintains its aspect ratio when resized.\n *\n * ```jsx\n * import { ResponsiveWrapper } from '@wordpress/components';\n *\n * const MyResponsiveWrapper = () => (\n * \t<ResponsiveWrapper naturalWidth={ 2000 } naturalHeight={ 680 }>\n * \t\t<img\n * \t\t\tsrc=\"https://s.w.org/style/images/about/WordPress-logotype-standard.png\"\n * \t\t\talt=\"WordPress\"\n * \t\t/>\n * \t</ResponsiveWrapper>\n * );\n * ```\n */\nfunction ResponsiveWrapper( {\n\tnaturalWidth,\n\tnaturalHeight,\n\tchildren,\n\tisInline = false,\n}: ResponsiveWrapperProps ) {\n\tif ( Children.count( children ) !== 1 ) {\n\t\treturn null;\n\t}\n\n\tconst TagName = isInline ? 'span' : 'div';\n\tlet aspectRatio;\n\tif ( naturalWidth && naturalHeight ) {\n\t\taspectRatio = `${ naturalWidth } / ${ naturalHeight }`;\n\t}\n\n\treturn (\n\t\t<TagName className=\"components-responsive-wrapper\">\n\t\t\t<div>\n\t\t\t\t{ cloneElement( children, {\n\t\t\t\t\tclassName: clsx(\n\t\t\t\t\t\t'components-responsive-wrapper__content',\n\t\t\t\t\t\tchildren.props.className\n\t\t\t\t\t),\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...children.props.style,\n\t\t\t\t\t\taspectRatio,\n\t\t\t\t\t},\n\t\t\t\t} ) }\n\t\t\t</div>\n\t\t</TagName>\n\t);\n}\n\nexport default ResponsiveWrapper;\n","/**\n * WordPress dependencies\n */\nimport {\n\trenderToString,\n\tuseRef,\n\tuseState,\n\tuseEffect,\n} from '@wordpress/element';\nimport { useFocusableIframe, useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport type { SandBoxProps } from './types';\n\nconst observeAndResizeJS = function () {\n\tconst { MutationObserver } = window;\n\n\tif ( ! MutationObserver || ! document.body || ! window.parent ) {\n\t\treturn;\n\t}\n\n\tfunction sendResize() {\n\t\tconst clientBoundingRect = document.body.getBoundingClientRect();\n\n\t\twindow.parent.postMessage(\n\t\t\t{\n\t\t\t\taction: 'resize',\n\t\t\t\twidth: clientBoundingRect.width,\n\t\t\t\theight: clientBoundingRect.height,\n\t\t\t},\n\t\t\t'*'\n\t\t);\n\t}\n\n\tconst observer = new MutationObserver( sendResize );\n\tobserver.observe( document.body, {\n\t\tattributes: true,\n\t\tattributeOldValue: false,\n\t\tcharacterData: true,\n\t\tcharacterDataOldValue: false,\n\t\tchildList: true,\n\t\tsubtree: true,\n\t} );\n\n\twindow.addEventListener( 'load', sendResize, true );\n\n\t// Hack: Remove viewport unit styles, as these are relative\n\t// the iframe root and interfere with our mechanism for\n\t// determining the unconstrained page bounds.\n\tfunction removeViewportStyles( ruleOrNode: ElementCSSInlineStyle ) {\n\t\tif ( ruleOrNode.style ) {\n\t\t\t(\n\t\t\t\t[ 'width', 'height', 'minHeight', 'maxHeight' ] as const\n\t\t\t ).forEach( function ( style ) {\n\t\t\t\tif (\n\t\t\t\t\t/^\\\\d+(vw|vh|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)$/.test(\n\t\t\t\t\t\truleOrNode.style[ style ]\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\truleOrNode.style[ style ] = '';\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\tArray.prototype.forEach.call(\n\t\tdocument.querySelectorAll( '[style]' ),\n\t\tremoveViewportStyles\n\t);\n\tArray.prototype.forEach.call(\n\t\tdocument.styleSheets,\n\t\tfunction ( stylesheet ) {\n\t\t\tArray.prototype.forEach.call(\n\t\t\t\tstylesheet.cssRules || stylesheet.rules,\n\t\t\t\tremoveViewportStyles\n\t\t\t);\n\t\t}\n\t);\n\n\tdocument.body.style.position = 'absolute';\n\tdocument.body.style.width = '100%';\n\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\n\n\tsendResize();\n\n\t// Resize events can change the width of elements with 100% width, but we don't\n\t// get an DOM mutations for that, so do the resize when the window is resized, too.\n\twindow.addEventListener( 'resize', sendResize, true );\n};\n\n// TODO: These styles shouldn't be coupled with WordPress.\nconst style = `\n\tbody {\n\t\tmargin: 0;\n\t}\n\thtml,\n\tbody,\n\tbody > div {\n\t\twidth: 100%;\n\t}\n\thtml.wp-has-aspect-ratio,\n\tbody.wp-has-aspect-ratio,\n\tbody.wp-has-aspect-ratio > div,\n\tbody.wp-has-aspect-ratio > div iframe {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\toverflow: hidden; /* If it has an aspect ratio, it shouldn't scroll. */\n\t}\n\tbody > div > * {\n\t\tmargin-top: 0 !important; /* Has to have !important to override inline styles. */\n\t\tmargin-bottom: 0 !important;\n\t}\n`;\n\n/**\n * This component provides an isolated environment for arbitrary HTML via iframes.\n *\n * ```jsx\n * import { SandBox } from '@wordpress/components';\n *\n * const MySandBox = () => (\n * \t<SandBox html=\"<p>Content</p>\" title=\"SandBox\" type=\"embed\" />\n * );\n * ```\n */\nfunction SandBox( {\n\thtml = '',\n\ttitle = '',\n\ttype,\n\tstyles = [],\n\tscripts = [],\n\tonFocus,\n\ttabIndex,\n}: SandBoxProps ) {\n\tconst ref = useRef< HTMLIFrameElement >();\n\tconst [ width, setWidth ] = useState( 0 );\n\tconst [ height, setHeight ] = useState( 0 );\n\n\tfunction isFrameAccessible() {\n\t\ttry {\n\t\t\treturn !! ref.current?.contentDocument?.body;\n\t\t} catch ( e ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tfunction trySandBox( forceRerender = false ) {\n\t\tif ( ! isFrameAccessible() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { contentDocument, ownerDocument } =\n\t\t\tref.current as HTMLIFrameElement & {\n\t\t\t\tcontentDocument: Document;\n\t\t\t};\n\n\t\tif (\n\t\t\t! forceRerender &&\n\t\t\tnull !==\n\t\t\t\tcontentDocument?.body.getAttribute(\n\t\t\t\t\t'data-resizable-iframe-connected'\n\t\t\t\t)\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Put the html snippet into a html document, and then write it to the iframe's document\n\t\t// we can use this in the future to inject custom styles or scripts.\n\t\t// Scripts go into the body rather than the head, to support embedded content such as Instagram\n\t\t// that expect the scripts to be part of the body.\n\t\tconst htmlDoc = (\n\t\t\t<html\n\t\t\t\tlang={ ownerDocument.documentElement.lang }\n\t\t\t\tclassName={ type }\n\t\t\t>\n\t\t\t\t<head>\n\t\t\t\t\t<title>{ title }</title>\n\t\t\t\t\t<style dangerouslySetInnerHTML={ { __html: style } } />\n\t\t\t\t\t{ styles.map( ( rules, i ) => (\n\t\t\t\t\t\t<style\n\t\t\t\t\t\t\tkey={ i }\n\t\t\t\t\t\t\tdangerouslySetInnerHTML={ { __html: rules } }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t</head>\n\t\t\t\t<body\n\t\t\t\t\tdata-resizable-iframe-connected=\"data-resizable-iframe-connected\"\n\t\t\t\t\tclassName={ type }\n\t\t\t\t>\n\t\t\t\t\t<div dangerouslySetInnerHTML={ { __html: html } } />\n\t\t\t\t\t<script\n\t\t\t\t\t\ttype=\"text/javascript\"\n\t\t\t\t\t\tdangerouslySetInnerHTML={ {\n\t\t\t\t\t\t\t__html: `(${ observeAndResizeJS.toString() })();`,\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t{ scripts.map( ( src ) => (\n\t\t\t\t\t\t<script key={ src } src={ src } />\n\t\t\t\t\t) ) }\n\t\t\t\t</body>\n\t\t\t</html>\n\t\t);\n\n\t\t// Writing the document like this makes it act in the same way as if it was\n\t\t// loaded over the network, so DOM creation and mutation, script execution, etc.\n\t\t// all work as expected.\n\t\tcontentDocument.open();\n\t\tcontentDocument.write( '<!DOCTYPE html>' + renderToString( htmlDoc ) );\n\t\tcontentDocument.close();\n\t}\n\n\tuseEffect( () => {\n\t\ttrySandBox();\n\n\t\tfunction tryNoForceSandBox() {\n\t\t\ttrySandBox( false );\n\t\t}\n\n\t\tfunction checkMessageForResize( event: MessageEvent ) {\n\t\t\tconst iframe = ref.current;\n\n\t\t\t// Verify that the mounted element is the source of the message.\n\t\t\tif ( ! iframe || iframe.contentWindow !== event.source ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Attempt to parse the message data as JSON if passed as string.\n\t\t\tlet data = event.data || {};\n\n\t\t\tif ( 'string' === typeof data ) {\n\t\t\t\ttry {\n\t\t\t\t\tdata = JSON.parse( data );\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\t// Update the state only if the message is formatted as we expect,\n\t\t\t// i.e. as an object with a 'resize' action.\n\t\t\tif ( 'resize' !== data.action ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsetWidth( data.width );\n\t\t\tsetHeight( data.height );\n\t\t}\n\n\t\tconst iframe = ref.current;\n\t\tconst defaultView = iframe?.ownerDocument?.defaultView;\n\n\t\t// This used to be registered using <iframe onLoad={} />, but it made the iframe blank\n\t\t// after reordering the containing block. See these two issues for more details:\n\t\t// https://github.com/WordPress/gutenberg/issues/6146\n\t\t// https://github.com/facebook/react/issues/18752\n\t\tiframe?.addEventListener( 'load', tryNoForceSandBox, false );\n\t\tdefaultView?.addEventListener( 'message', checkMessageForResize );\n\n\t\treturn () => {\n\t\t\tiframe?.removeEventListener( 'load', tryNoForceSandBox, false );\n\t\t\tdefaultView?.removeEventListener(\n\t\t\t\t'message',\n\t\t\t\tcheckMessageForResize\n\t\t\t);\n\t\t};\n\t\t// Passing `exhaustive-deps` will likely involve a more detailed refactor.\n\t\t// See https://github.com/WordPress/gutenberg/pull/44378\n\t}, [] );\n\n\tuseEffect( () => {\n\t\ttrySandBox();\n\t\t// Passing `exhaustive-deps` will likely involve a more detailed refactor.\n\t\t// See https://github.com/WordPress/gutenberg/pull/44378\n\t}, [ title, styles, scripts ] );\n\n\tuseEffect( () => {\n\t\ttrySandBox( true );\n\t\t// Passing `exhaustive-deps` will likely involve a more detailed refactor.\n\t\t// See https://github.com/WordPress/gutenberg/pull/44378\n\t}, [ html, type ] );\n\n\treturn (\n\t\t<iframe\n\t\t\tref={ useMergeRefs( [ ref, useFocusableIframe() ] ) }\n\t\t\ttitle={ title }\n\t\t\ttabIndex={ tabIndex }\n\t\t\tclassName=\"components-sandbox\"\n\t\t\tsandbox=\"allow-scripts allow-same-origin allow-presentation\"\n\t\t\tonFocus={ onFocus }\n\t\t\twidth={ Math.ceil( width ) }\n\t\t\theight={ Math.ceil( height ) }\n\t\t/>\n\t);\n}\n\nexport default SandBox;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef, KeyboardEvent, MouseEvent } from 'react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { speak } from '@wordpress/a11y';\nimport {\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseRef,\n\tforwardRef,\n\trenderToString,\n} from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport type { SnackbarProps } from './types';\nimport type { NoticeAction } from '../notice/types';\nimport type { WordPressComponentProps } from '../context';\n\nconst NOTICE_TIMEOUT = 10000;\n\n/**\n * Custom hook which announces the message with the given politeness, if a\n * valid message is provided.\n *\n * @param message Message to announce.\n * @param politeness Politeness to announce.\n */\nfunction useSpokenMessage(\n\tmessage: SnackbarProps[ 'spokenMessage' ],\n\tpoliteness: NonNullable< SnackbarProps[ 'politeness' ] >\n) {\n\tconst spokenMessage =\n\t\ttypeof message === 'string' ? message : renderToString( message );\n\n\tuseEffect( () => {\n\t\tif ( spokenMessage ) {\n\t\t\tspeak( spokenMessage, politeness );\n\t\t}\n\t}, [ spokenMessage, politeness ] );\n}\n\nfunction UnforwardedSnackbar(\n\t{\n\t\tclassName,\n\t\tchildren,\n\t\tspokenMessage = children,\n\t\tpoliteness = 'polite',\n\t\tactions = [],\n\t\tonRemove,\n\t\ticon = null,\n\t\texplicitDismiss = false,\n\t\t// onDismiss is a callback executed when the snackbar is dismissed.\n\t\t// It is distinct from onRemove, which _looks_ like a callback but is\n\t\t// actually the function to call to remove the snackbar from the UI.\n\t\tonDismiss,\n\t\tlistRef,\n\t}: WordPressComponentProps< SnackbarProps, 'div' >,\n\tref: ForwardedRef< any >\n) {\n\tfunction dismissMe( event: KeyboardEvent | MouseEvent ) {\n\t\tif ( event && event.preventDefault ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\n\t\t// Prevent focus loss by moving it to the list element.\n\t\tlistRef?.current?.focus();\n\n\t\tonDismiss?.();\n\t\tonRemove?.();\n\t}\n\n\tfunction onActionClick(\n\t\tevent: MouseEvent< HTMLButtonElement >,\n\t\tonClick: NoticeAction[ 'onClick' ]\n\t) {\n\t\tevent.stopPropagation();\n\n\t\tonRemove?.();\n\n\t\tif ( onClick ) {\n\t\t\tonClick( event );\n\t\t}\n\t}\n\n\tuseSpokenMessage( spokenMessage, politeness );\n\n\t// The `onDismiss/onRemove` can have unstable references,\n\t// trigger side-effect cleanup, and reset timers.\n\tconst callbacksRef = useRef( { onDismiss, onRemove } );\n\tuseLayoutEffect( () => {\n\t\tcallbacksRef.current = { onDismiss, onRemove };\n\t} );\n\n\tuseEffect( () => {\n\t\t// Only set up the timeout dismiss if we're not explicitly dismissing.\n\t\tconst timeoutHandle = setTimeout( () => {\n\t\t\tif ( ! explicitDismiss ) {\n\t\t\t\tcallbacksRef.current.onDismiss?.();\n\t\t\t\tcallbacksRef.current.onRemove?.();\n\t\t\t}\n\t\t}, NOTICE_TIMEOUT );\n\n\t\treturn () => clearTimeout( timeoutHandle );\n\t}, [ explicitDismiss ] );\n\n\tconst classes = clsx( className, 'components-snackbar', {\n\t\t'components-snackbar-explicit-dismiss': !! explicitDismiss,\n\t} );\n\tif ( actions && actions.length > 1 ) {\n\t\t// We need to inform developers that snackbar only accepts 1 action.\n\t\twarning(\n\t\t\t'Snackbar can only have one action. Use Notice if your message requires many actions.'\n\t\t);\n\t\t// return first element only while keeping it inside an array\n\t\tactions = [ actions[ 0 ] ];\n\t}\n\n\tconst snackbarContentClassnames = clsx( 'components-snackbar__content', {\n\t\t'components-snackbar__content-with-icon': !! icon,\n\t} );\n\n\treturn (\n\t\t<div\n\t\t\tref={ ref }\n\t\t\tclassName={ classes }\n\t\t\tonClick={ ! explicitDismiss ? dismissMe : undefined }\n\t\t\ttabIndex={ 0 }\n\t\t\trole={ ! explicitDismiss ? 'button' : undefined }\n\t\t\tonKeyPress={ ! explicitDismiss ? dismissMe : undefined }\n\t\t\taria-label={\n\t\t\t\t! explicitDismiss ? __( 'Dismiss this notice' ) : undefined\n\t\t\t}\n\t\t\tdata-testid=\"snackbar\"\n\t\t>\n\t\t\t<div className={ snackbarContentClassnames }>\n\t\t\t\t{ icon && (\n\t\t\t\t\t<div className=\"components-snackbar__icon\">{ icon }</div>\n\t\t\t\t) }\n\t\t\t\t{ children }\n\t\t\t\t{ actions.map( ( { label, onClick, url }, index ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\thref={ url }\n\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\tonClick={ (\n\t\t\t\t\t\t\t\tevent: MouseEvent< HTMLButtonElement >\n\t\t\t\t\t\t\t) => onActionClick( event, onClick ) }\n\t\t\t\t\t\t\tclassName=\"components-snackbar__action\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t\t{ explicitDismiss && (\n\t\t\t\t\t<span\n\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\taria-label={ __( 'Dismiss this notice' ) }\n\t\t\t\t\t\ttabIndex={ 0 }\n\t\t\t\t\t\tclassName=\"components-snackbar__dismiss-button\"\n\t\t\t\t\t\tonClick={ dismissMe }\n\t\t\t\t\t\tonKeyPress={ dismissMe }\n\t\t\t\t\t>\n\t\t\t\t\t\t✕\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\n/**\n * A Snackbar displays a succinct message that is cleared out after a small delay.\n *\n * It can also offer the user options, like viewing a published post.\n * But these options should also be available elsewhere in the UI.\n *\n * ```jsx\n * const MySnackbarNotice = () => (\n * <Snackbar>Post published successfully.</Snackbar>\n * );\n * ```\n */\nexport const Snackbar = forwardRef( UnforwardedSnackbar );\n\nexport default Snackbar;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useReducedMotion } from '@wordpress/compose';\nimport { useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Snackbar from '.';\nimport {\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '../animation';\nimport type { SnackbarListProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nconst SNACKBAR_VARIANTS = {\n\tinit: {\n\t\theight: 0,\n\t\topacity: 0,\n\t},\n\topen: {\n\t\theight: 'auto',\n\t\topacity: 1,\n\t\ttransition: {\n\t\t\theight: { type: 'tween', duration: 0.3, ease: [ 0, 0, 0.2, 1 ] },\n\t\t\topacity: {\n\t\t\t\ttype: 'tween',\n\t\t\t\tduration: 0.25,\n\t\t\t\tdelay: 0.05,\n\t\t\t\tease: [ 0, 0, 0.2, 1 ],\n\t\t\t},\n\t\t},\n\t},\n\texit: {\n\t\topacity: 0,\n\t\ttransition: {\n\t\t\ttype: 'tween',\n\t\t\tduration: 0.1,\n\t\t\tease: [ 0, 0, 0.2, 1 ],\n\t\t},\n\t},\n};\n\n/**\n * Renders a list of notices.\n *\n * ```jsx\n * const MySnackbarListNotice = () => (\n * <SnackbarList\n * notices={ notices }\n * onRemove={ removeNotice }\n * />\n * );\n * ```\n */\nexport function SnackbarList( {\n\tnotices,\n\tclassName,\n\tchildren,\n\tonRemove,\n}: WordPressComponentProps< SnackbarListProps, 'div' > ) {\n\tconst listRef = useRef< HTMLDivElement | null >( null );\n\tconst isReducedMotion = useReducedMotion();\n\tclassName = clsx( 'components-snackbar-list', className );\n\tconst removeNotice =\n\t\t( notice: SnackbarListProps[ 'notices' ][ number ] ) => () =>\n\t\t\tonRemove?.( notice.id );\n\treturn (\n\t\t<div\n\t\t\tclassName={ className }\n\t\t\ttabIndex={ -1 }\n\t\t\tref={ listRef }\n\t\t\tdata-testid=\"snackbar-list\"\n\t\t>\n\t\t\t{ children }\n\t\t\t<AnimatePresence>\n\t\t\t\t{ notices.map( ( notice ) => {\n\t\t\t\t\tconst { content, ...restNotice } = notice;\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\tlayout={ ! isReducedMotion } // See https://www.framer.com/docs/animation/#layout-animations\n\t\t\t\t\t\t\tinitial=\"init\"\n\t\t\t\t\t\t\tanimate=\"open\"\n\t\t\t\t\t\t\texit=\"exit\"\n\t\t\t\t\t\t\tkey={ notice.id }\n\t\t\t\t\t\t\tvariants={\n\t\t\t\t\t\t\t\tisReducedMotion ? undefined : SNACKBAR_VARIANTS\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div className=\"components-snackbar-list__notice-container\">\n\t\t\t\t\t\t\t\t<Snackbar\n\t\t\t\t\t\t\t\t\t{ ...restNotice }\n\t\t\t\t\t\t\t\t\tonRemove={ removeNotice( notice ) }\n\t\t\t\t\t\t\t\t\tlistRef={ listRef }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ notice.content }\n\t\t\t\t\t\t\t\t</Snackbar>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</AnimatePresence>\n\t\t</div>\n\t);\n}\n\nexport default SnackbarList;\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\nimport { css, keyframes } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { COLORS, CONFIG } from '../utils';\n\nconst spinAnimation = keyframes`\n\tfrom {\n\t\ttransform: rotate(0deg);\n\t}\n\tto {\n\t\ttransform: rotate(360deg);\n\t}\n `;\n\nexport const StyledSpinner = styled.svg`\n\twidth: ${ CONFIG.spinnerSize }px;\n\theight: ${ CONFIG.spinnerSize }px;\n\tdisplay: inline-block;\n\tmargin: 5px 11px 0;\n\tposition: relative;\n\tcolor: ${ COLORS.theme.accent };\n\toverflow: visible;\n\topacity: 1;\n\tbackground-color: transparent;\n`;\n\nconst commonPathProps = css`\n\tfill: transparent;\n\tstroke-width: 1.5px;\n`;\n\nexport const SpinnerTrack = styled.circle`\n\t${ commonPathProps };\n\tstroke: ${ COLORS.gray[ 300 ] };\n`;\n\nexport const SpinnerIndicator = styled.path`\n\t${ commonPathProps };\n\tstroke: currentColor;\n\tstroke-linecap: round;\n\ttransform-origin: 50% 50%;\n\tanimation: 1.4s linear infinite both ${ spinAnimation };\n`;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { StyledSpinner, SpinnerTrack, SpinnerIndicator } from './styles';\nimport type { WordPressComponentProps } from '../context';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\nexport function UnforwardedSpinner(\n\t{ className, ...props }: WordPressComponentProps< {}, 'svg', false >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\treturn (\n\t\t<StyledSpinner\n\t\t\tclassName={ clsx( 'components-spinner', className ) }\n\t\t\tviewBox=\"0 0 100 100\"\n\t\t\twidth=\"16\"\n\t\t\theight=\"16\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\trole=\"presentation\"\n\t\t\tfocusable=\"false\"\n\t\t\t{ ...props }\n\t\t\tref={ forwardedRef }\n\t\t>\n\t\t\t{ /* Gray circular background */ }\n\t\t\t<SpinnerTrack\n\t\t\t\tcx=\"50\"\n\t\t\t\tcy=\"50\"\n\t\t\t\tr=\"50\"\n\t\t\t\tvectorEffect=\"non-scaling-stroke\"\n\t\t\t/>\n\n\t\t\t{ /* Theme-colored arc */ }\n\t\t\t<SpinnerIndicator\n\t\t\t\td=\"m 50 0 a 50 50 0 0 1 50 50\"\n\t\t\t\tvectorEffect=\"non-scaling-stroke\"\n\t\t\t/>\n\t\t</StyledSpinner>\n\t);\n}\n/**\n * `Spinner` is a component used to notify users that their action is being processed.\n *\n * ```js\n * import { Spinner } from '@wordpress/components';\n *\n * function Example() {\n * return <Spinner />;\n * }\n * ```\n */\nexport const Spinner = forwardRef( UnforwardedSpinner );\nexport default Spinner;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect } from '../context';\nimport { View } from '../view';\nimport { useSurface } from './hook';\nimport type { SurfaceProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nfunction UnconnectedSurface(\n\tprops: WordPressComponentProps< SurfaceProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst surfaceProps = useSurface( props );\n\n\treturn <View { ...surfaceProps } ref={ forwardedRef } />;\n}\n\n/**\n * `Surface` is a core component that renders a primary background color.\n *\n * In the example below, notice how the `Surface` renders in white (or dark gray if in dark mode).\n *\n * ```jsx\n * import {\n *\t__experimentalSurface as Surface,\n *\t__experimentalText as Text,\n * } from '@wordpress/components';\n *\n * function Example() {\n * \treturn (\n * \t\t<Surface>\n * \t\t\t<Text>Code is Poetry</Text>\n * \t\t</Surface>\n * \t);\n * }\n * ```\n */\nexport const Surface = contextConnect( UnconnectedSurface, 'Surface' );\n\nexport default Surface;\n","\"use client\";\nimport {\n createCompositeStore\n} from \"../__chunks/AJZ4BYF3.js\";\nimport {\n createCollectionStore\n} from \"../__chunks/CYQWQL4J.js\";\nimport \"../__chunks/7PRQYBBV.js\";\nimport {\n batch,\n createStore,\n mergeStore,\n omit,\n setup,\n sync\n} from \"../__chunks/BCALMBPZ.js\";\nimport {\n chain,\n defaultValue\n} from \"../__chunks/PBFD2E7P.js\";\nimport \"../__chunks/DTR5TSDJ.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"../__chunks/3YLGPPWQ.js\";\n\n// src/tab/tab-store.ts\nfunction createTabStore(_a = {}) {\n var _b = _a, {\n composite: parentComposite,\n combobox\n } = _b, props = __objRest(_b, [\n \"composite\",\n \"combobox\"\n ]);\n const independentKeys = [\n \"items\",\n \"renderedItems\",\n \"moves\",\n \"orientation\",\n \"virtualFocus\",\n \"includesBaseElement\",\n \"baseElement\",\n \"focusLoop\",\n \"focusShift\",\n \"focusWrap\"\n ];\n const store = mergeStore(\n props.store,\n omit(parentComposite, independentKeys),\n omit(combobox, independentKeys)\n );\n const syncState = store == null ? void 0 : store.getState();\n const composite = createCompositeStore(__spreadProps(__spreadValues({}, props), {\n store,\n // We need to explicitly set the default value of `includesBaseElement` to\n // `false` since we don't want the composite store to default it to `true`\n // when the activeId state is null, which could be the case when rendering\n // combobox with tab.\n includesBaseElement: defaultValue(\n props.includesBaseElement,\n syncState == null ? void 0 : syncState.includesBaseElement,\n false\n ),\n orientation: defaultValue(\n props.orientation,\n syncState == null ? void 0 : syncState.orientation,\n \"horizontal\"\n ),\n focusLoop: defaultValue(props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true)\n }));\n const panels = createCollectionStore();\n const initialState = __spreadProps(__spreadValues({}, composite.getState()), {\n selectedId: defaultValue(\n props.selectedId,\n syncState == null ? void 0 : syncState.selectedId,\n props.defaultSelectedId\n ),\n selectOnMove: defaultValue(\n props.selectOnMove,\n syncState == null ? void 0 : syncState.selectOnMove,\n true\n )\n });\n const tab = createStore(initialState, composite, store);\n setup(\n tab,\n () => sync(tab, [\"moves\"], () => {\n const { activeId, selectOnMove } = tab.getState();\n if (!selectOnMove) return;\n if (!activeId) return;\n const tabItem = composite.item(activeId);\n if (!tabItem) return;\n if (tabItem.dimmed) return;\n if (tabItem.disabled) return;\n tab.setState(\"selectedId\", tabItem.id);\n })\n );\n let syncActiveId = true;\n setup(\n tab,\n () => batch(tab, [\"selectedId\"], (state, prev) => {\n if (!syncActiveId) {\n syncActiveId = true;\n return;\n }\n if (parentComposite && state.selectedId === prev.selectedId) return;\n tab.setState(\"activeId\", state.selectedId);\n })\n );\n setup(\n tab,\n () => sync(tab, [\"selectedId\", \"renderedItems\"], (state) => {\n if (state.selectedId !== void 0) return;\n const { activeId, renderedItems } = tab.getState();\n const tabItem = composite.item(activeId);\n if (tabItem && !tabItem.disabled && !tabItem.dimmed) {\n tab.setState(\"selectedId\", tabItem.id);\n } else {\n const tabItem2 = renderedItems.find(\n (item) => !item.disabled && !item.dimmed\n );\n tab.setState(\"selectedId\", tabItem2 == null ? void 0 : tabItem2.id);\n }\n })\n );\n setup(\n tab,\n () => sync(tab, [\"renderedItems\"], (state) => {\n const tabs = state.renderedItems;\n if (!tabs.length) return;\n return sync(panels, [\"renderedItems\"], (state2) => {\n const items = state2.renderedItems;\n const hasOrphanPanels = items.some((panel) => !panel.tabId);\n if (!hasOrphanPanels) return;\n items.forEach((panel, i) => {\n if (panel.tabId) return;\n const tabItem = tabs[i];\n if (!tabItem) return;\n panels.renderItem(__spreadProps(__spreadValues({}, panel), { tabId: tabItem.id }));\n });\n });\n })\n );\n let selectedIdFromSelectedValue = null;\n setup(tab, () => {\n const backupSelectedId = () => {\n selectedIdFromSelectedValue = tab.getState().selectedId;\n };\n const restoreSelectedId = () => {\n syncActiveId = false;\n tab.setState(\"selectedId\", selectedIdFromSelectedValue);\n };\n if (parentComposite && \"setSelectElement\" in parentComposite) {\n return chain(\n sync(parentComposite, [\"value\"], backupSelectedId),\n sync(parentComposite, [\"mounted\"], restoreSelectedId)\n );\n }\n if (!combobox) return;\n return chain(\n sync(combobox, [\"selectedValue\"], backupSelectedId),\n sync(combobox, [\"mounted\"], restoreSelectedId)\n );\n });\n return __spreadProps(__spreadValues(__spreadValues({}, composite), tab), {\n panels,\n setSelectedId: (id) => tab.setState(\"selectedId\", id),\n select: (id) => {\n tab.setState(\"selectedId\", id);\n composite.move(id);\n }\n });\n}\nexport {\n createTabStore\n};\n","\"use client\";\nimport {\n useComboboxContext\n} from \"./VEVQD5MH.js\";\nimport {\n useSelectContext\n} from \"./KPEX55MY.js\";\nimport {\n useCompositeStoreProps\n} from \"./4CMBR7SL.js\";\nimport {\n useStore,\n useStoreProps\n} from \"./YV4JVR4I.js\";\nimport {\n useUpdateEffect\n} from \"./ABQUS43J.js\";\nimport {\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/tab/tab-store.ts\nimport * as Core from \"@ariakit/core/tab/tab-store\";\nimport { useMemo } from \"react\";\nfunction useTabStoreProps(store, update, props) {\n useUpdateEffect(update, [props.composite, props.combobox]);\n store = useCompositeStoreProps(store, update, props);\n useStoreProps(store, props, \"selectedId\", \"setSelectedId\");\n useStoreProps(store, props, \"selectOnMove\");\n const [panels, updatePanels] = useStore(() => store.panels, {});\n useUpdateEffect(updatePanels, [store, updatePanels]);\n return Object.assign(\n useMemo(() => __spreadProps(__spreadValues({}, store), { panels }), [store, panels]),\n { composite: props.composite, combobox: props.combobox }\n );\n}\nfunction useTabStore(props = {}) {\n const combobox = useComboboxContext();\n const composite = useSelectContext() || combobox;\n props = __spreadProps(__spreadValues({}, props), {\n composite: props.composite !== void 0 ? props.composite : composite,\n combobox: props.combobox !== void 0 ? props.combobox : combobox\n });\n const [store, update] = useStore(Core.createTabStore, props);\n return useTabStoreProps(store, update, props);\n}\n\nexport {\n useTabStoreProps,\n useTabStore\n};\n","\"use client\";\nimport {\n CompositeContextProvider,\n CompositeScopedContextProvider\n} from \"./P7GR5CS5.js\";\nimport {\n createStoreContext\n} from \"./LMDWO4NN.js\";\n\n// src/tab/tab-context.tsx\nvar ctx = createStoreContext(\n [CompositeContextProvider],\n [CompositeScopedContextProvider]\n);\nvar useTabContext = ctx.useContext;\nvar useTabScopedContext = ctx.useScopedContext;\nvar useTabProviderContext = ctx.useProviderContext;\nvar TabContextProvider = ctx.ContextProvider;\nvar TabScopedContextProvider = ctx.ScopedContextProvider;\n\nexport {\n useTabContext,\n useTabScopedContext,\n useTabProviderContext,\n TabContextProvider,\n TabScopedContextProvider\n};\n","\"use client\";\nimport {\n TabScopedContextProvider,\n useTabProviderContext\n} from \"../__chunks/UYGDZTLQ.js\";\nimport {\n useComposite\n} from \"../__chunks/ITI7HKP4.js\";\nimport \"../__chunks/5VQZOHHZ.js\";\nimport \"../__chunks/P7GR5CS5.js\";\nimport \"../__chunks/VDHZ5F7K.js\";\nimport \"../__chunks/LVA2YJMS.js\";\nimport \"../__chunks/SWN3JYXT.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"../__chunks/LMDWO4NN.js\";\nimport {\n useWrapElement\n} from \"../__chunks/ABQUS43J.js\";\nimport \"../__chunks/SK3NAZA3.js\";\nimport {\n __objRest,\n __spreadValues\n} from \"../__chunks/3YLGPPWQ.js\";\n\n// src/tab/tab-list.tsx\nimport { invariant } from \"@ariakit/core/utils/misc\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"div\";\nvar useTabList = createHook(\n function useTabList2(_a) {\n var _b = _a, { store } = _b, props = __objRest(_b, [\"store\"]);\n const context = useTabProviderContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"TabList must receive a `store` prop or be wrapped in a TabProvider component.\"\n );\n const orientation = store.useState(\n (state) => state.orientation === \"both\" ? void 0 : state.orientation\n );\n props = useWrapElement(\n props,\n (element) => /* @__PURE__ */ jsx(TabScopedContextProvider, { value: store, children: element }),\n [store]\n );\n if (store.composite) {\n props = __spreadValues({\n focusable: false\n }, props);\n }\n props = __spreadValues({\n role: \"tablist\",\n \"aria-orientation\": orientation\n }, props);\n props = useComposite(__spreadValues({ store }, props));\n return props;\n }\n);\nvar TabList = forwardRef(function TabList2(props) {\n const htmlProps = useTabList(props);\n return createElement(TagName, htmlProps);\n});\nexport {\n TabList,\n useTabList\n};\n","\"use client\";\nimport {\n useTabScopedContext\n} from \"../__chunks/UYGDZTLQ.js\";\nimport {\n CompositeItem,\n useCompositeItem\n} from \"../__chunks/P2CTZE2T.js\";\nimport \"../__chunks/RZ4GPYOB.js\";\nimport \"../__chunks/KUU7WJ55.js\";\nimport \"../__chunks/5VQZOHHZ.js\";\nimport \"../__chunks/P7GR5CS5.js\";\nimport \"../__chunks/VDHZ5F7K.js\";\nimport \"../__chunks/LVA2YJMS.js\";\nimport \"../__chunks/SWN3JYXT.js\";\nimport {\n createElement,\n createHook,\n forwardRef,\n memo\n} from \"../__chunks/LMDWO4NN.js\";\nimport {\n useStoreState\n} from \"../__chunks/YV4JVR4I.js\";\nimport {\n useEvent,\n useId\n} from \"../__chunks/ABQUS43J.js\";\nimport \"../__chunks/SK3NAZA3.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"../__chunks/3YLGPPWQ.js\";\n\n// src/tab/tab.tsx\nimport { disabledFromProps, invariant } from \"@ariakit/core/utils/misc\";\nimport { useCallback } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"button\";\nvar useTab = createHook(function useTab2(_a) {\n var _b = _a, {\n store,\n getItem: getItemProp\n } = _b, props = __objRest(_b, [\n \"store\",\n \"getItem\"\n ]);\n var _a2;\n const context = useTabScopedContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"Tab must be wrapped in a TabList component.\"\n );\n const defaultId = useId();\n const id = props.id || defaultId;\n const dimmed = disabledFromProps(props);\n const getItem = useCallback(\n (item) => {\n const nextItem = __spreadProps(__spreadValues({}, item), { dimmed });\n if (getItemProp) {\n return getItemProp(nextItem);\n }\n return nextItem;\n },\n [dimmed, getItemProp]\n );\n const onClickProp = props.onClick;\n const onClick = useEvent((event) => {\n onClickProp == null ? void 0 : onClickProp(event);\n if (event.defaultPrevented) return;\n store == null ? void 0 : store.setSelectedId(id);\n });\n const panelId = store.panels.useState(\n (state) => {\n var _a3;\n return (_a3 = state.items.find((item) => item.tabId === id)) == null ? void 0 : _a3.id;\n }\n );\n const shouldRegisterItem = defaultId ? props.shouldRegisterItem : false;\n const isActive = store.useState((state) => !!id && state.activeId === id);\n const selected = store.useState((state) => !!id && state.selectedId === id);\n const hasActiveItem = store.useState((state) => !!store.item(state.activeId));\n const canRegisterComposedItem = isActive || selected && !hasActiveItem;\n const accessibleWhenDisabled = selected || ((_a2 = props.accessibleWhenDisabled) != null ? _a2 : true);\n const isWithinVirtualFocusComposite = useStoreState(\n store.combobox || store.composite,\n \"virtualFocus\"\n );\n if (isWithinVirtualFocusComposite) {\n props = __spreadProps(__spreadValues({}, props), {\n tabIndex: -1\n });\n }\n props = __spreadProps(__spreadValues({\n id,\n role: \"tab\",\n \"aria-selected\": selected,\n \"aria-controls\": panelId || void 0\n }, props), {\n onClick\n });\n if (store.composite) {\n const defaultProps = {\n id,\n accessibleWhenDisabled,\n store: store.composite,\n shouldRegisterItem: canRegisterComposedItem && shouldRegisterItem,\n rowId: props.rowId,\n render: props.render\n };\n props = __spreadProps(__spreadValues({}, props), {\n render: /* @__PURE__ */ jsx(\n CompositeItem,\n __spreadProps(__spreadValues({}, defaultProps), {\n render: store.combobox && store.composite !== store.combobox ? /* @__PURE__ */ jsx(CompositeItem, __spreadProps(__spreadValues({}, defaultProps), { store: store.combobox })) : defaultProps.render\n })\n )\n });\n }\n props = useCompositeItem(__spreadProps(__spreadValues({\n store\n }, props), {\n accessibleWhenDisabled,\n getItem,\n shouldRegisterItem\n }));\n return props;\n});\nvar Tab = memo(\n forwardRef(function Tab2(props) {\n const htmlProps = useTab(props);\n return createElement(TagName, htmlProps);\n })\n);\nexport {\n Tab,\n useTab\n};\n","\"use client\";\nimport {\n TabScopedContextProvider,\n useTabProviderContext\n} from \"../__chunks/UYGDZTLQ.js\";\nimport {\n useCollectionItem\n} from \"../__chunks/RZ4GPYOB.js\";\nimport \"../__chunks/P7GR5CS5.js\";\nimport \"../__chunks/VDHZ5F7K.js\";\nimport {\n useDisclosureContent\n} from \"../__chunks/VGCJ63VH.js\";\nimport \"../__chunks/RS7LB2H4.js\";\nimport \"../__chunks/S6EF7IVO.js\";\nimport {\n useFocusable\n} from \"../__chunks/LVA2YJMS.js\";\nimport \"../__chunks/SWN3JYXT.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"../__chunks/LMDWO4NN.js\";\nimport {\n useDisclosureStore\n} from \"../__chunks/WYCIER3C.js\";\nimport {\n useStoreState\n} from \"../__chunks/YV4JVR4I.js\";\nimport {\n useEvent,\n useId,\n useMergeRefs,\n useWrapElement\n} from \"../__chunks/ABQUS43J.js\";\nimport \"../__chunks/SK3NAZA3.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"../__chunks/3YLGPPWQ.js\";\n\n// src/tab/tab-panel.tsx\nimport { getAllTabbableIn } from \"@ariakit/core/utils/focus\";\nimport { invariant } from \"@ariakit/core/utils/misc\";\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"div\";\nvar useTabPanel = createHook(\n function useTabPanel2(_a) {\n var _b = _a, {\n store,\n unmountOnHide,\n tabId: tabIdProp,\n getItem: getItemProp,\n scrollRestoration,\n scrollElement\n } = _b, props = __objRest(_b, [\n \"store\",\n \"unmountOnHide\",\n \"tabId\",\n \"getItem\",\n \"scrollRestoration\",\n \"scrollElement\"\n ]);\n const context = useTabProviderContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"TabPanel must receive a `store` prop or be wrapped in a TabProvider component.\"\n );\n const ref = useRef(null);\n const id = useId(props.id);\n const tabId = useStoreState(\n store.panels,\n () => {\n var _a2;\n return tabIdProp || ((_a2 = store == null ? void 0 : store.panels.item(id)) == null ? void 0 : _a2.tabId);\n }\n );\n const open = useStoreState(\n store,\n (state) => !!tabId && state.selectedId === tabId\n );\n const disclosure = useDisclosureStore({ open });\n const mounted = useStoreState(disclosure, \"mounted\");\n const scrollPositionRef = useRef(\n /* @__PURE__ */ new Map()\n );\n const getScrollElement = useEvent(() => {\n const panelElement = ref.current;\n if (!panelElement) return null;\n if (!scrollElement) return panelElement;\n if (typeof scrollElement === \"function\") {\n return scrollElement(panelElement);\n }\n if (\"current\" in scrollElement) {\n return scrollElement.current;\n }\n return scrollElement;\n });\n useEffect(() => {\n var _a2, _b2;\n if (!scrollRestoration) return;\n if (!mounted) return;\n const element = getScrollElement();\n if (!element) return;\n if (scrollRestoration === \"reset\") {\n element.scroll(0, 0);\n return;\n }\n if (!tabId) return;\n const position = scrollPositionRef.current.get(tabId);\n element.scroll((_a2 = position == null ? void 0 : position.x) != null ? _a2 : 0, (_b2 = position == null ? void 0 : position.y) != null ? _b2 : 0);\n const onScroll = () => {\n scrollPositionRef.current.set(tabId, {\n x: element.scrollLeft,\n y: element.scrollTop\n });\n };\n element.addEventListener(\"scroll\", onScroll);\n return () => {\n element.removeEventListener(\"scroll\", onScroll);\n };\n }, [scrollRestoration, mounted, tabId, getScrollElement, store]);\n const [hasTabbableChildren, setHasTabbableChildren] = useState(false);\n useEffect(() => {\n const element = ref.current;\n if (!element) return;\n const tabbable = getAllTabbableIn(element);\n setHasTabbableChildren(!!tabbable.length);\n }, []);\n const getItem = useCallback(\n (item) => {\n const nextItem = __spreadProps(__spreadValues({}, item), { id: id || item.id, tabId: tabIdProp });\n if (getItemProp) {\n return getItemProp(nextItem);\n }\n return nextItem;\n },\n [id, tabIdProp, getItemProp]\n );\n const onKeyDownProp = props.onKeyDown;\n const onKeyDown = useEvent((event) => {\n onKeyDownProp == null ? void 0 : onKeyDownProp(event);\n if (event.defaultPrevented) return;\n if (!(store == null ? void 0 : store.composite)) return;\n const keyMap = {\n ArrowLeft: store.previous,\n ArrowRight: store.next,\n Home: store.first,\n End: store.last\n };\n const action = keyMap[event.key];\n if (!action) return;\n const { selectedId } = store.getState();\n const nextId = action({ activeId: selectedId });\n if (!nextId) return;\n event.preventDefault();\n store.move(nextId);\n });\n props = useWrapElement(\n props,\n (element) => /* @__PURE__ */ jsx(TabScopedContextProvider, { value: store, children: element }),\n [store]\n );\n props = __spreadProps(__spreadValues({\n id,\n role: \"tabpanel\",\n \"aria-labelledby\": tabId || void 0\n }, props), {\n children: unmountOnHide && !mounted ? null : props.children,\n ref: useMergeRefs(ref, props.ref),\n onKeyDown\n });\n props = useFocusable(__spreadValues({\n // If the tab panel is rendered as part of another composite widget such\n // as combobox, it should not be focusable.\n focusable: !store.composite && !hasTabbableChildren\n }, props));\n props = useDisclosureContent(__spreadValues({ store: disclosure }, props));\n props = useCollectionItem(__spreadProps(__spreadValues({ store: store.panels }, props), { getItem }));\n return props;\n }\n);\nvar TabPanel = forwardRef(function TabPanel2(props) {\n const htmlProps = useTabPanel(props);\n return createElement(TagName, htmlProps);\n});\nexport {\n TabPanel,\n useTabPanel\n};\n","/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\nimport clsx from 'clsx';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tforwardRef,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseCallback,\n} from '@wordpress/element';\nimport { useInstanceId, usePrevious } from '@wordpress/compose';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\n\nimport Button from '../button';\nimport type { TabPanelProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\n// Separate the actual tab name from the instance ID. This is\n// necessary because Ariakit internally uses the element ID when\n// a new tab is selected, but our implementation looks specifically\n// for the tab name to be passed to the `onSelect` callback.\nconst extractTabName = ( id: string | undefined | null ) => {\n\tif ( typeof id === 'undefined' || id === null ) {\n\t\treturn;\n\t}\n\treturn id.match( /^tab-panel-[0-9]*-(.*)/ )?.[ 1 ];\n};\n\n/**\n * TabPanel is an ARIA-compliant tabpanel.\n *\n * TabPanels organize content across different screens, data sets, and interactions.\n * It has two sections: a list of tabs, and the view to show when tabs are chosen.\n *\n * ```jsx\n * import { TabPanel } from '@wordpress/components';\n *\n * const onSelect = ( tabName ) => {\n * console.log( 'Selecting tab', tabName );\n * };\n *\n * const MyTabPanel = () => (\n * <TabPanel\n * className=\"my-tab-panel\"\n * activeClass=\"active-tab\"\n * onSelect={ onSelect }\n * tabs={ [\n * {\n * name: 'tab1',\n * title: 'Tab 1',\n * className: 'tab-one',\n * },\n * {\n * name: 'tab2',\n * title: 'Tab 2',\n * className: 'tab-two',\n * },\n * ] }\n * >\n * { ( tab ) => <p>{ tab.title }</p> }\n * </TabPanel>\n * );\n * ```\n */\nconst UnforwardedTabPanel = (\n\t{\n\t\tclassName,\n\t\tchildren,\n\t\ttabs,\n\t\tselectOnMove = true,\n\t\tinitialTabName,\n\t\torientation = 'horizontal',\n\t\tactiveClass = 'is-active',\n\t\tonSelect,\n\t}: WordPressComponentProps< TabPanelProps, 'div', false >,\n\tref: ForwardedRef< any >\n) => {\n\tconst instanceId = useInstanceId( TabPanel, 'tab-panel' );\n\n\tconst prependInstanceId = useCallback(\n\t\t( tabName: string | undefined ) => {\n\t\t\tif ( typeof tabName === 'undefined' ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn `${ instanceId }-${ tabName }`;\n\t\t},\n\t\t[ instanceId ]\n\t);\n\n\tconst tabStore = Ariakit.useTabStore( {\n\t\tsetSelectedId: ( newTabValue ) => {\n\t\t\tif ( typeof newTabValue === 'undefined' || newTabValue === null ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst newTab = tabs.find(\n\t\t\t\t( t ) => prependInstanceId( t.name ) === newTabValue\n\t\t\t);\n\t\t\tif ( newTab?.disabled || newTab === selectedTab ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst simplifiedTabName = extractTabName( newTabValue );\n\t\t\tif ( typeof simplifiedTabName === 'undefined' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tonSelect?.( simplifiedTabName );\n\t\t},\n\t\torientation,\n\t\tselectOnMove,\n\t\tdefaultSelectedId: prependInstanceId( initialTabName ),\n\t\trtl: isRTL(),\n\t} );\n\n\tconst selectedTabName = extractTabName(\n\t\tAriakit.useStoreState( tabStore, 'selectedId' )\n\t);\n\n\tconst setTabStoreSelectedId = useCallback(\n\t\t( tabName: string ) => {\n\t\t\ttabStore.setState( 'selectedId', prependInstanceId( tabName ) );\n\t\t},\n\t\t[ prependInstanceId, tabStore ]\n\t);\n\n\tconst selectedTab = tabs.find( ( { name } ) => name === selectedTabName );\n\n\tconst previousSelectedTabName = usePrevious( selectedTabName );\n\n\t// Ensure `onSelect` is called when the initial tab is selected.\n\tuseEffect( () => {\n\t\tif (\n\t\t\tpreviousSelectedTabName !== selectedTabName &&\n\t\t\tselectedTabName === initialTabName &&\n\t\t\t!! selectedTabName\n\t\t) {\n\t\t\tonSelect?.( selectedTabName );\n\t\t}\n\t}, [ selectedTabName, initialTabName, onSelect, previousSelectedTabName ] );\n\n\t// Handle selecting the initial tab.\n\tuseLayoutEffect( () => {\n\t\t// If there's a selected tab, don't override it.\n\t\tif ( selectedTab ) {\n\t\t\treturn;\n\t\t}\n\t\tconst initialTab = tabs.find( ( tab ) => tab.name === initialTabName );\n\t\t// Wait for the denoted initial tab to be declared before making a\n\t\t// selection. This ensures that if a tab is declared lazily it can\n\t\t// still receive initial selection.\n\t\tif ( initialTabName && ! initialTab ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( initialTab && ! initialTab.disabled ) {\n\t\t\t// Select the initial tab if it's not disabled.\n\t\t\tsetTabStoreSelectedId( initialTab.name );\n\t\t} else {\n\t\t\t// Fallback to the first enabled tab when the initial tab is\n\t\t\t// disabled or it can't be found.\n\t\t\tconst firstEnabledTab = tabs.find( ( tab ) => ! tab.disabled );\n\t\t\tif ( firstEnabledTab ) {\n\t\t\t\tsetTabStoreSelectedId( firstEnabledTab.name );\n\t\t\t}\n\t\t}\n\t}, [\n\t\ttabs,\n\t\tselectedTab,\n\t\tinitialTabName,\n\t\tinstanceId,\n\t\tsetTabStoreSelectedId,\n\t] );\n\n\t// Handle the currently selected tab becoming disabled.\n\tuseEffect( () => {\n\t\t// This effect only runs when the selected tab is defined and becomes disabled.\n\t\tif ( ! selectedTab?.disabled ) {\n\t\t\treturn;\n\t\t}\n\t\tconst firstEnabledTab = tabs.find( ( tab ) => ! tab.disabled );\n\t\t// If the currently selected tab becomes disabled, select the first enabled tab.\n\t\t// (if there is one).\n\t\tif ( firstEnabledTab ) {\n\t\t\tsetTabStoreSelectedId( firstEnabledTab.name );\n\t\t}\n\t}, [ tabs, selectedTab?.disabled, setTabStoreSelectedId, instanceId ] );\n\treturn (\n\t\t<div className={ className } ref={ ref }>\n\t\t\t<Ariakit.TabList\n\t\t\t\tstore={ tabStore }\n\t\t\t\tclassName=\"components-tab-panel__tabs\"\n\t\t\t>\n\t\t\t\t{ tabs.map( ( tab ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Ariakit.Tab\n\t\t\t\t\t\t\tkey={ tab.name }\n\t\t\t\t\t\t\tid={ prependInstanceId( tab.name ) }\n\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t'components-tab-panel__tabs-item',\n\t\t\t\t\t\t\t\ttab.className,\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t[ activeClass ]:\n\t\t\t\t\t\t\t\t\t\ttab.name === selectedTabName,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tdisabled={ tab.disabled }\n\t\t\t\t\t\t\taria-controls={ `${ prependInstanceId(\n\t\t\t\t\t\t\t\ttab.name\n\t\t\t\t\t\t\t) }-view` }\n\t\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\ticon={ tab.icon }\n\t\t\t\t\t\t\t\t\tlabel={ tab.icon && tab.title }\n\t\t\t\t\t\t\t\t\tshowTooltip={ !! tab.icon }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ ! tab.icon && tab.title }\n\t\t\t\t\t\t</Ariakit.Tab>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</Ariakit.TabList>\n\t\t\t{ selectedTab && (\n\t\t\t\t<Ariakit.TabPanel\n\t\t\t\t\tid={ `${ prependInstanceId( selectedTab.name ) }-view` }\n\t\t\t\t\tstore={ tabStore }\n\t\t\t\t\ttabId={ prependInstanceId( selectedTab.name ) }\n\t\t\t\t\tclassName=\"components-tab-panel__tab-content\"\n\t\t\t\t>\n\t\t\t\t\t{ children( selectedTab ) }\n\t\t\t\t</Ariakit.TabPanel>\n\t\t\t) }\n\t\t</div>\n\t);\n};\n\nexport const TabPanel = forwardRef( UnforwardedTabPanel );\nexport default TabPanel;\n","/**\n * External dependencies\n */\nimport type { ChangeEvent, ForwardedRef } from 'react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport type { WordPressComponentProps } from '../context';\nimport type { TextControlProps } from './types';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\n\nfunction UnforwardedTextControl(\n\tprops: WordPressComponentProps< TextControlProps, 'input', false >,\n\tref: ForwardedRef< HTMLInputElement >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom,\n\t\t__next40pxDefaultSize = false,\n\t\tlabel,\n\t\thideLabelFromVision,\n\t\tvalue,\n\t\thelp,\n\t\tid: idProp,\n\t\tclassName,\n\t\tonChange,\n\t\ttype = 'text',\n\t\t...additionalProps\n\t} = props;\n\tconst id = useInstanceId( TextControl, 'inspector-text-control', idProp );\n\tconst onChangeValue = ( event: ChangeEvent< HTMLInputElement > ) =>\n\t\tonChange( event.target.value );\n\n\tmaybeWarnDeprecated36pxSize( {\n\t\tcomponentName: 'TextControl',\n\t\tsize: undefined,\n\t\t__next40pxDefaultSize,\n\t} );\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t__associatedWPComponentName=\"TextControl\"\n\t\t\tlabel={ label }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\tid={ id }\n\t\t\thelp={ help }\n\t\t\tclassName={ className }\n\t\t>\n\t\t\t<input\n\t\t\t\tclassName={ clsx( 'components-text-control__input', {\n\t\t\t\t\t'is-next-40px-default-size': __next40pxDefaultSize,\n\t\t\t\t} ) }\n\t\t\t\ttype={ type }\n\t\t\t\tid={ id }\n\t\t\t\tvalue={ value }\n\t\t\t\tonChange={ onChangeValue }\n\t\t\t\taria-describedby={ !! help ? id + '__help' : undefined }\n\t\t\t\tref={ ref }\n\t\t\t\t{ ...additionalProps }\n\t\t\t/>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * TextControl components let users enter and edit text.\n *\n * ```jsx\n * import { TextControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyTextControl = () => {\n * const [ className, setClassName ] = useState( '' );\n *\n * return (\n * <TextControl\n * __nextHasNoMarginBottom\n * __next40pxDefaultSize\n * label=\"Additional CSS Class\"\n * value={ className }\n * onChange={ ( value ) => setClassName( value ) }\n * />\n * );\n * };\n * ```\n */\nexport const TextControl = forwardRef( UnforwardedTextControl );\n\nexport default TextControl;\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { font } from '../../utils/font';\nimport { COLORS } from '../../utils/colors-values';\nimport { CONFIG } from '../../utils';\nimport { breakpoint } from '../../utils/breakpoint';\n\nconst inputStyleNeutral = css`\n\tbox-shadow: 0 0 0 transparent;\n\tborder-radius: ${ CONFIG.radiusSmall };\n\tborder: ${ CONFIG.borderWidth } solid ${ COLORS.ui.border };\n\n\t@media not ( prefers-reduced-motion ) {\n\t\ttransition: box-shadow 0.1s linear;\n\t}\n`;\n\nconst inputStyleFocus = css`\n\tborder-color: ${ COLORS.theme.accent };\n\tbox-shadow: 0 0 0\n\t\tcalc( ${ CONFIG.borderWidthFocus } - ${ CONFIG.borderWidth } )\n\t\t${ COLORS.theme.accent };\n\n\t// Windows High Contrast mode will show this outline, but not the box-shadow.\n\toutline: 2px solid transparent;\n`;\n\nexport const StyledTextarea = styled.textarea`\n\twidth: 100%;\n\tdisplay: block;\n\tfont-family: ${ font( 'default.fontFamily' ) };\n\tline-height: 20px;\n\n\t// Vertical padding is to match the standard 40px control height when rows=1,\n\t// in conjunction with the 20px line-height.\n\t// \"Standard\" metrics are 10px 12px, but subtracts 1px each to account for the border width.\n\tpadding: 9px 11px;\n\n\t${ inputStyleNeutral };\n\n\t/* Fonts smaller than 16px causes mobile safari to zoom. */\n\tfont-size: ${ font( 'mobileTextMinFontSize' ) };\n\n\t${ breakpoint( 'small' ) } {\n\t\tfont-size: ${ font( 'default.fontSize' ) };\n\t}\n\n\t&:focus {\n\t\t${ inputStyleFocus }\n\t}\n\n\t// Use opacity to work in various editor styles.\n\t&::-webkit-input-placeholder {\n\t\tcolor: ${ COLORS.ui.darkGrayPlaceholder };\n\t}\n\n\t&::-moz-placeholder {\n\t\topacity: 1; // Necessary because Firefox reduces this from 1.\n\t\tcolor: ${ COLORS.ui.darkGrayPlaceholder };\n\t}\n\n\t&:-ms-input-placeholder {\n\t\tcolor: ${ COLORS.ui.darkGrayPlaceholder };\n\t}\n\n\t.is-dark-theme & {\n\t\t&::-webkit-input-placeholder {\n\t\t\tcolor: ${ COLORS.ui.lightGrayPlaceholder };\n\t\t}\n\n\t\t&::-moz-placeholder {\n\t\t\topacity: 1; // Necessary because Firefox reduces this from 1.\n\t\t\tcolor: ${ COLORS.ui.lightGrayPlaceholder };\n\t\t}\n\n\t\t&:-ms-input-placeholder {\n\t\t\tcolor: ${ COLORS.ui.lightGrayPlaceholder };\n\t\t}\n\t}\n`;\n","/**\n * Internal dependencies\n */\nimport breakpoints from './breakpoint-values';\n\n/**\n * @param {keyof breakpoints} point\n * @return {string} Media query declaration.\n */\nexport const breakpoint = ( point ) =>\n\t`@media (min-width: ${ breakpoints[ point ] })`;\n","/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport { StyledTextarea } from './styles/textarea-control-styles';\nimport type { TextareaControlProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nfunction UnforwardedTextareaControl(\n\tprops: WordPressComponentProps< TextareaControlProps, 'textarea', false >,\n\tref: React.ForwardedRef< HTMLTextAreaElement >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom,\n\t\tlabel,\n\t\thideLabelFromVision,\n\t\tvalue,\n\t\thelp,\n\t\tonChange,\n\t\trows = 4,\n\t\tclassName,\n\t\t...additionalProps\n\t} = props;\n\tconst instanceId = useInstanceId( TextareaControl );\n\tconst id = `inspector-textarea-control-${ instanceId }`;\n\tconst onChangeValue = ( event: React.ChangeEvent< HTMLTextAreaElement > ) =>\n\t\tonChange( event.target.value );\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t__associatedWPComponentName=\"TextareaControl\"\n\t\t\tlabel={ label }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\tid={ id }\n\t\t\thelp={ help }\n\t\t\tclassName={ className }\n\t\t>\n\t\t\t<StyledTextarea\n\t\t\t\tclassName=\"components-textarea-control__input\"\n\t\t\t\tid={ id }\n\t\t\t\trows={ rows }\n\t\t\t\tonChange={ onChangeValue }\n\t\t\t\taria-describedby={ !! help ? id + '__help' : undefined }\n\t\t\t\tvalue={ value }\n\t\t\t\tref={ ref }\n\t\t\t\t{ ...additionalProps }\n\t\t\t/>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * TextareaControls are TextControls that allow for multiple lines of text, and\n * wrap overflow text onto a new line. They are a fixed height and scroll\n * vertically when the cursor reaches the bottom of the field.\n *\n * ```jsx\n * import { TextareaControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyTextareaControl = () => {\n * const [ text, setText ] = useState( '' );\n *\n * return (\n * <TextareaControl\n * __nextHasNoMarginBottom\n * label=\"Text\"\n * help=\"Enter some text\"\n * value={ text }\n * onChange={ ( value ) => setText( value ) }\n * />\n * );\n * };\n * ```\n */\nexport const TextareaControl = forwardRef( UnforwardedTextareaControl );\n\nexport default TextareaControl;\n","/**\n * WordPress dependencies\n */\nimport { createInterpolateElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { escapeRegExp } from '../utils/strings';\nimport type { TextHighlightProps } from './types';\n\n/**\n * Highlights occurrences of a given string within another string of text. Wraps\n * each match with a `<mark>` tag which provides browser default styling.\n *\n * ```jsx\n * import { TextHighlight } from '@wordpress/components';\n *\n * const MyTextHighlight = () => (\n * <TextHighlight\n * text=\"Why do we like Gutenberg? Because Gutenberg is the best!\"\n * highlight=\"Gutenberg\"\n * />\n * );\n * ```\n */\nexport const TextHighlight = ( props: TextHighlightProps ) => {\n\tconst { text = '', highlight = '' } = props;\n\tconst trimmedHighlightText = highlight.trim();\n\n\tif ( ! trimmedHighlightText ) {\n\t\treturn <>{ text }</>;\n\t}\n\n\tconst regex = new RegExp(\n\t\t`(${ escapeRegExp( trimmedHighlightText ) })`,\n\t\t'gi'\n\t);\n\n\treturn createInterpolateElement( text.replace( regex, '<mark>$&</mark>' ), {\n\t\tmark: <mark />,\n\t} );\n};\n\nexport default TextHighlight;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst tip = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M12 15.8c-3.7 0-6.8-3-6.8-6.8s3-6.8 6.8-6.8c3.7 0 6.8 3 6.8 6.8s-3.1 6.8-6.8 6.8zm0-12C9.1 3.8 6.8 6.1 6.8 9s2.4 5.2 5.2 5.2c2.9 0 5.2-2.4 5.2-5.2S14.9 3.8 12 3.8zM8 17.5h8V19H8zM10 20.5h4V22h-4z\" />\n\t</SVG>\n);\n\nexport default tip;\n","/**\n * WordPress dependencies\n */\nimport { Icon, tip } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport type { TipProps } from './types';\n\nexport function Tip( props: TipProps ) {\n\tconst { children } = props;\n\n\treturn (\n\t\t<div className=\"components-tip\">\n\t\t\t<Icon icon={ tip } />\n\t\t\t<p>{ children }</p>\n\t\t</div>\n\t);\n}\n\nexport default Tip;\n","/**\n * External dependencies\n */\nimport type { ChangeEvent, ForwardedRef } from 'react';\nimport { css } from '@emotion/react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { FlexBlock } from '../flex';\nimport FormToggle from '../form-toggle';\nimport BaseControl from '../base-control';\nimport type { WordPressComponentProps } from '../context/wordpress-component';\nimport type { ToggleControlProps } from './types';\nimport { HStack } from '../h-stack';\nimport { useCx } from '../utils';\nimport { space } from '../utils/space';\n\nfunction UnforwardedToggleControl(\n\t{\n\t\t__nextHasNoMarginBottom,\n\t\tlabel,\n\t\tchecked,\n\t\thelp,\n\t\tclassName,\n\t\tonChange,\n\t\tdisabled,\n\t}: WordPressComponentProps< ToggleControlProps, 'input', false >,\n\tref: ForwardedRef< HTMLInputElement >\n) {\n\tfunction onChangeToggle( event: ChangeEvent< HTMLInputElement > ) {\n\t\tonChange( event.target.checked );\n\t}\n\tconst instanceId = useInstanceId( ToggleControl );\n\tconst id = `inspector-toggle-control-${ instanceId }`;\n\n\tconst cx = useCx();\n\tconst classes = cx(\n\t\t'components-toggle-control',\n\t\tclassName,\n\t\t! __nextHasNoMarginBottom && css( { marginBottom: space( 3 ) } )\n\t);\n\n\tif ( ! __nextHasNoMarginBottom ) {\n\t\tdeprecated( 'Bottom margin styles for wp.components.ToggleControl', {\n\t\t\tsince: '6.7',\n\t\t\tversion: '7.0',\n\t\t\thint: 'Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version.',\n\t\t} );\n\t}\n\n\tlet describedBy, helpLabel;\n\tif ( help ) {\n\t\tif ( typeof help === 'function' ) {\n\t\t\t// `help` as a function works only for controlled components where\n\t\t\t// `checked` is passed down from parent component. Uncontrolled\n\t\t\t// component can show only a static help label.\n\t\t\tif ( checked !== undefined ) {\n\t\t\t\thelpLabel = help( checked );\n\t\t\t}\n\t\t} else {\n\t\t\thelpLabel = help;\n\t\t}\n\t\tif ( helpLabel ) {\n\t\t\tdescribedBy = id + '__help';\n\t\t}\n\t}\n\n\treturn (\n\t\t<BaseControl\n\t\t\tid={ id }\n\t\t\thelp={\n\t\t\t\thelpLabel && (\n\t\t\t\t\t<span className=\"components-toggle-control__help\">\n\t\t\t\t\t\t{ helpLabel }\n\t\t\t\t\t</span>\n\t\t\t\t)\n\t\t\t}\n\t\t\tclassName={ classes }\n\t\t\t__nextHasNoMarginBottom\n\t\t>\n\t\t\t<HStack justify=\"flex-start\" spacing={ 2 }>\n\t\t\t\t<FormToggle\n\t\t\t\t\tid={ id }\n\t\t\t\t\tchecked={ checked }\n\t\t\t\t\tonChange={ onChangeToggle }\n\t\t\t\t\taria-describedby={ describedBy }\n\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\tref={ ref }\n\t\t\t\t/>\n\t\t\t\t<FlexBlock\n\t\t\t\t\tas=\"label\"\n\t\t\t\t\thtmlFor={ id }\n\t\t\t\t\tclassName={ clsx( 'components-toggle-control__label', {\n\t\t\t\t\t\t'is-disabled': disabled,\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t{ label }\n\t\t\t\t</FlexBlock>\n\t\t\t</HStack>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * ToggleControl is used to generate a toggle user interface.\n *\n * ```jsx\n * import { ToggleControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyToggleControl = () => {\n * const [ value, setValue ] = useState( false );\n *\n * return (\n * <ToggleControl\n * __nextHasNoMarginBottom\n * label=\"Fixed Background\"\n * checked={ value }\n * onChange={ () => setValue( ( state ) => ! state ) }\n * />\n * );\n * };\n * ```\n */\nexport const ToggleControl = forwardRef( UnforwardedToggleControl );\n\nexport default ToggleControl;\n","\"use client\";\nimport {\n CompositeContextProvider,\n CompositeScopedContextProvider\n} from \"./P7GR5CS5.js\";\nimport {\n createStoreContext\n} from \"./LMDWO4NN.js\";\n\n// src/toolbar/toolbar-context.tsx\nvar ctx = createStoreContext(\n [CompositeContextProvider],\n [CompositeScopedContextProvider]\n);\nvar useToolbarContext = ctx.useContext;\nvar useToolbarScopedContext = ctx.useScopedContext;\nvar useToolbarProviderContext = ctx.useProviderContext;\nvar ToolbarContextProvider = ctx.ContextProvider;\nvar ToolbarScopedContextProvider = ctx.ScopedContextProvider;\n\nexport {\n useToolbarContext,\n useToolbarScopedContext,\n useToolbarProviderContext,\n ToolbarContextProvider,\n ToolbarScopedContextProvider\n};\n","\"use client\";\nimport {\n useCompositeItem\n} from \"./P2CTZE2T.js\";\nimport {\n useToolbarContext\n} from \"./A3WPL2ZJ.js\";\nimport {\n createElement,\n createHook,\n forwardRef,\n memo\n} from \"./LMDWO4NN.js\";\nimport {\n __objRest,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/toolbar/toolbar-item.tsx\nvar TagName = \"button\";\nvar useToolbarItem = createHook(\n function useToolbarItem2(_a) {\n var _b = _a, { store } = _b, props = __objRest(_b, [\"store\"]);\n const context = useToolbarContext();\n store = store || context;\n props = useCompositeItem(__spreadValues({ store }, props));\n return props;\n }\n);\nvar ToolbarItem = memo(\n forwardRef(function ToolbarItem2(props) {\n const htmlProps = useToolbarItem(props);\n return createElement(TagName, htmlProps);\n })\n);\n\nexport {\n useToolbarItem,\n ToolbarItem\n};\n","/**\n * External dependencies\n */\nimport type * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { createContext } from '@wordpress/element';\n\nconst ToolbarContext = createContext< Ariakit.ToolbarStore | undefined >(\n\tundefined\n);\n\nexport default ToolbarContext;\n","/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport ToolbarContext from '../toolbar-context';\nimport type { ToolbarItemProps } from './types';\n\nfunction ToolbarItem(\n\t{ children, as: Component, ...props }: ToolbarItemProps,\n\tref: ForwardedRef< any >\n) {\n\tconst accessibleToolbarStore = useContext( ToolbarContext );\n\tconst isRenderProp = typeof children === 'function';\n\n\tif ( ! isRenderProp && ! Component ) {\n\t\twarning(\n\t\t\t'`ToolbarItem` is a generic headless component. You must pass either a `children` prop as a function or an `as` prop as a component. ' +\n\t\t\t\t'See https://developer.wordpress.org/block-editor/components/toolbar-item/'\n\t\t);\n\t\treturn null;\n\t}\n\n\tconst allProps = { ...props, ref, 'data-toolbar-item': true };\n\n\tif ( ! accessibleToolbarStore ) {\n\t\tif ( Component ) {\n\t\t\treturn <Component { ...allProps }>{ children }</Component>;\n\t\t}\n\t\tif ( ! isRenderProp ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn children( allProps );\n\t}\n\n\tconst render = isRenderProp\n\t\t? children\n\t\t: Component && <Component>{ children }</Component>;\n\n\treturn (\n\t\t<Ariakit.ToolbarItem\n\t\t\taccessibleWhenDisabled\n\t\t\t{ ...allProps }\n\t\t\tstore={ accessibleToolbarStore }\n\t\t\trender={ render }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( ToolbarItem );\n","/**\n * Internal dependencies\n */\nimport type { ToolbarButtonContainerProps } from './types';\n\nconst ToolbarButtonContainer = ( {\n\tchildren,\n\tclassName,\n}: ToolbarButtonContainerProps ) => (\n\t<div className={ className }>{ children }</div>\n);\n\nexport default ToolbarButtonContainer;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ForwardedRef, MouseEvent as ReactMouseEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useContext, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport ToolbarItem from '../toolbar-item';\nimport ToolbarContext from '../toolbar-context';\nimport ToolbarButtonContainer from './toolbar-button-container';\nimport type { ToolbarButtonOverriddenProps, ToolbarButtonProps } from './types';\nimport type { WordPressComponentProps } from '../../context';\n\nfunction useDeprecatedProps( {\n\tisDisabled,\n\t...otherProps\n}: React.ComponentProps< typeof ToolbarButton > ) {\n\treturn {\n\t\tdisabled: isDisabled,\n\t\t...otherProps,\n\t};\n}\n\nfunction UnforwardedToolbarButton(\n\tprops: Omit<\n\t\tWordPressComponentProps< ToolbarButtonProps, typeof Button, false >,\n\t\t'accessibleWhenDisabled' // By default, ToolbarButton will be focusable when disabled.\n\t> &\n\t\tToolbarButtonOverriddenProps,\n\tref: ForwardedRef< any >\n) {\n\tconst {\n\t\tchildren,\n\t\tclassName,\n\t\tcontainerClassName,\n\t\textraProps,\n\t\tisActive,\n\t\ttitle,\n\t\t...restProps\n\t} = useDeprecatedProps( props );\n\tconst accessibleToolbarState = useContext( ToolbarContext );\n\n\tif ( ! accessibleToolbarState ) {\n\t\treturn (\n\t\t\t<ToolbarButtonContainer className={ containerClassName }>\n\t\t\t\t<Button\n\t\t\t\t\tref={ ref }\n\t\t\t\t\ticon={ restProps.icon }\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\tlabel={ title }\n\t\t\t\t\tshortcut={ restProps.shortcut }\n\t\t\t\t\tdata-subscript={ restProps.subscript }\n\t\t\t\t\tonClick={ (\n\t\t\t\t\t\tevent: ReactMouseEvent<\n\t\t\t\t\t\t\tHTMLButtonElement & HTMLAnchorElement,\n\t\t\t\t\t\t\tMouseEvent\n\t\t\t\t\t\t>\n\t\t\t\t\t) => {\n\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t// TODO: Possible bug; maybe use onClick instead of restProps.onClick.\n\t\t\t\t\t\tif ( restProps.onClick ) {\n\t\t\t\t\t\t\trestProps.onClick( event );\n\t\t\t\t\t\t}\n\t\t\t\t\t} }\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'components-toolbar__control',\n\t\t\t\t\t\tclassName\n\t\t\t\t\t) }\n\t\t\t\t\tisPressed={ isActive }\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\tdata-toolbar-item\n\t\t\t\t\t{ ...extraProps }\n\t\t\t\t\t{ ...restProps }\n\t\t\t\t>\n\t\t\t\t\t{ children }\n\t\t\t\t</Button>\n\t\t\t</ToolbarButtonContainer>\n\t\t);\n\t}\n\n\t// ToobarItem will pass all props to the render prop child, which will pass\n\t// all props to Button. This means that ToolbarButton has the same API as\n\t// Button.\n\treturn (\n\t\t<ToolbarItem\n\t\t\tclassName={ clsx( 'components-toolbar-button', className ) }\n\t\t\t{ ...extraProps }\n\t\t\t{ ...restProps }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t{ ( toolbarItemProps ) => (\n\t\t\t\t<Button\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\tlabel={ title }\n\t\t\t\t\tisPressed={ isActive }\n\t\t\t\t\t{ ...toolbarItemProps }\n\t\t\t\t>\n\t\t\t\t\t{ children }\n\t\t\t\t</Button>\n\t\t\t) }\n\t\t</ToolbarItem>\n\t);\n}\n\n/**\n * ToolbarButton can be used to add actions to a toolbar, usually inside a Toolbar\n * or ToolbarGroup when used to create general interfaces.\n *\n * ```jsx\n * import { Toolbar, ToolbarButton } from '@wordpress/components';\n * import { edit } from '@wordpress/icons';\n *\n * function MyToolbar() {\n * return (\n *\t\t<Toolbar label=\"Options\">\n *\t\t\t<ToolbarButton\n *\t\t\t\ticon={ edit }\n *\t\t\t\tlabel=\"Edit\"\n *\t\t\t\tonClick={ () => alert( 'Editing' ) }\n *\t\t\t/>\n *\t\t</Toolbar>\n * );\n * }\n * ```\n */\nexport const ToolbarButton = forwardRef( UnforwardedToolbarButton );\nexport default ToolbarButton;\n","/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport type { ToolbarGroupContainerProps } from './types';\n\nconst ToolbarGroupContainer = ( {\n\tclassName,\n\tchildren,\n\t...props\n}: WordPressComponentProps< ToolbarGroupContainerProps, 'div', false > ) => (\n\t<div className={ className } { ...props }>\n\t\t{ children }\n\t</div>\n);\nexport default ToolbarGroupContainer;\n","/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport DropdownMenu from '../../dropdown-menu';\nimport ToolbarContext from '../toolbar-context';\nimport ToolbarItem from '../toolbar-item';\nimport type { ToolbarGroupCollapsedProps } from './types';\nimport type { DropdownMenuProps } from '../../dropdown-menu/types';\n\nfunction ToolbarGroupCollapsed( {\n\tcontrols = [],\n\ttoggleProps,\n\t...props\n}: ToolbarGroupCollapsedProps ) {\n\t// It'll contain state if `ToolbarGroup` is being used within\n\t// `<Toolbar label=\"label\" />`\n\tconst accessibleToolbarState = useContext( ToolbarContext );\n\n\tconst renderDropdownMenu = (\n\t\tinternalToggleProps?: DropdownMenuProps[ 'toggleProps' ]\n\t) => (\n\t\t<DropdownMenu\n\t\t\tcontrols={ controls }\n\t\t\ttoggleProps={ {\n\t\t\t\t...internalToggleProps,\n\t\t\t\t'data-toolbar-item': true,\n\t\t\t} }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n\n\tif ( accessibleToolbarState ) {\n\t\treturn (\n\t\t\t<ToolbarItem { ...toggleProps }>{ renderDropdownMenu }</ToolbarItem>\n\t\t);\n\t}\n\n\treturn renderDropdownMenu( toggleProps );\n}\n\nexport default ToolbarGroupCollapsed;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ToolbarButton from '../toolbar-button';\nimport ToolbarGroupContainer from './toolbar-group-container';\nimport ToolbarGroupCollapsed from './toolbar-group-collapsed';\nimport ToolbarContext from '../toolbar-context';\nimport type { ToolbarGroupProps, ToolbarGroupControls } from './types';\n\nfunction isNestedArray< T = any >( arr: T[] | T[][] ): arr is T[][] {\n\treturn Array.isArray( arr ) && Array.isArray( arr[ 0 ] );\n}\n\n/**\n * Renders a collapsible group of controls\n *\n * The `controls` prop accepts an array of sets. A set is an array of controls.\n * Controls have the following shape:\n *\n * ```\n * {\n * icon: string,\n * title: string,\n * subscript: string,\n * onClick: Function,\n * isActive: boolean,\n * isDisabled: boolean\n * }\n * ```\n *\n * For convenience it is also possible to pass only an array of controls. It is\n * then assumed this is the only set.\n *\n * Either `controls` or `children` is required, otherwise this components\n * renders nothing.\n *\n * @param props Component props.\n * @param [props.controls] The controls to render in this toolbar.\n * @param [props.children] Any other things to render inside the toolbar besides the controls.\n * @param [props.className] Class to set on the container div.\n * @param [props.isCollapsed] Turns ToolbarGroup into a dropdown menu.\n * @param [props.title] ARIA label for dropdown menu if is collapsed.\n */\nfunction ToolbarGroup( {\n\tcontrols = [],\n\tchildren,\n\tclassName,\n\tisCollapsed,\n\ttitle,\n\t...props\n}: ToolbarGroupProps ) {\n\t// It'll contain state if `ToolbarGroup` is being used within\n\t// `<Toolbar label=\"label\" />`\n\tconst accessibleToolbarState = useContext( ToolbarContext );\n\n\tif ( ( ! controls || ! controls.length ) && ! children ) {\n\t\treturn null;\n\t}\n\n\tconst finalClassName = clsx(\n\t\t// Unfortunately, there's legacy code referencing to `.components-toolbar`\n\t\t// So we can't get rid of it\n\t\taccessibleToolbarState\n\t\t\t? 'components-toolbar-group'\n\t\t\t: 'components-toolbar',\n\t\tclassName\n\t);\n\n\t// Normalize controls to nested array of objects (sets of controls)\n\tlet controlSets: ToolbarGroupControls[][];\n\tif ( isNestedArray( controls ) ) {\n\t\tcontrolSets = controls;\n\t} else {\n\t\tcontrolSets = [ controls ];\n\t}\n\n\tif ( isCollapsed ) {\n\t\treturn (\n\t\t\t<ToolbarGroupCollapsed\n\t\t\t\tlabel={ title }\n\t\t\t\tcontrols={ controlSets }\n\t\t\t\tclassName={ finalClassName }\n\t\t\t\tchildren={ children }\n\t\t\t\t{ ...props }\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<ToolbarGroupContainer className={ finalClassName } { ...props }>\n\t\t\t{ controlSets?.flatMap( ( controlSet, indexOfSet ) =>\n\t\t\t\tcontrolSet.map( ( control, indexOfControl: number ) => (\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\tkey={ [ indexOfSet, indexOfControl ].join() }\n\t\t\t\t\t\tcontainerClassName={\n\t\t\t\t\t\t\tindexOfSet > 0 && indexOfControl === 0\n\t\t\t\t\t\t\t\t? 'has-left-divider'\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{ ...control }\n\t\t\t\t\t/>\n\t\t\t\t) )\n\t\t\t) }\n\t\t\t{ children }\n\t\t</ToolbarGroupContainer>\n\t);\n}\n\nexport default ToolbarGroup;\n","\"use client\";\nimport {\n createCompositeStore\n} from \"../__chunks/AJZ4BYF3.js\";\nimport \"../__chunks/CYQWQL4J.js\";\nimport \"../__chunks/7PRQYBBV.js\";\nimport \"../__chunks/BCALMBPZ.js\";\nimport {\n defaultValue\n} from \"../__chunks/PBFD2E7P.js\";\nimport \"../__chunks/DTR5TSDJ.js\";\nimport {\n __spreadProps,\n __spreadValues\n} from \"../__chunks/3YLGPPWQ.js\";\n\n// src/toolbar/toolbar-store.ts\nfunction createToolbarStore(props = {}) {\n var _a;\n const syncState = (_a = props.store) == null ? void 0 : _a.getState();\n return createCompositeStore(__spreadProps(__spreadValues({}, props), {\n orientation: defaultValue(\n props.orientation,\n syncState == null ? void 0 : syncState.orientation,\n \"horizontal\"\n ),\n focusLoop: defaultValue(props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true)\n }));\n}\nexport {\n createToolbarStore\n};\n","\"use client\";\nimport {\n useCompositeStoreProps\n} from \"./4CMBR7SL.js\";\nimport {\n useStore\n} from \"./YV4JVR4I.js\";\n\n// src/toolbar/toolbar-store.ts\nimport * as Core from \"@ariakit/core/toolbar/toolbar-store\";\nfunction useToolbarStoreProps(store, update, props) {\n return useCompositeStoreProps(store, update, props);\n}\nfunction useToolbarStore(props = {}) {\n const [store, update] = useStore(Core.createToolbarStore, props);\n return useToolbarStoreProps(store, update, props);\n}\n\nexport {\n useToolbarStoreProps,\n useToolbarStore\n};\n","\"use client\";\nimport {\n useComposite\n} from \"../__chunks/ITI7HKP4.js\";\nimport \"../__chunks/5VQZOHHZ.js\";\nimport {\n useToolbarStore\n} from \"../__chunks/7M5THDKH.js\";\nimport \"../__chunks/4CMBR7SL.js\";\nimport \"../__chunks/C3IKGW5T.js\";\nimport {\n ToolbarScopedContextProvider,\n useToolbarProviderContext\n} from \"../__chunks/A3WPL2ZJ.js\";\nimport \"../__chunks/P7GR5CS5.js\";\nimport \"../__chunks/VDHZ5F7K.js\";\nimport \"../__chunks/LVA2YJMS.js\";\nimport \"../__chunks/SWN3JYXT.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"../__chunks/LMDWO4NN.js\";\nimport \"../__chunks/YV4JVR4I.js\";\nimport {\n useWrapElement\n} from \"../__chunks/ABQUS43J.js\";\nimport \"../__chunks/SK3NAZA3.js\";\nimport {\n __objRest,\n __spreadValues\n} from \"../__chunks/3YLGPPWQ.js\";\n\n// src/toolbar/toolbar.tsx\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"div\";\nvar useToolbar = createHook(\n function useToolbar2(_a) {\n var _b = _a, {\n store: storeProp,\n orientation: orientationProp,\n virtualFocus,\n focusLoop,\n rtl\n } = _b, props = __objRest(_b, [\n \"store\",\n \"orientation\",\n \"virtualFocus\",\n \"focusLoop\",\n \"rtl\"\n ]);\n const context = useToolbarProviderContext();\n storeProp = storeProp || context;\n const store = useToolbarStore({\n store: storeProp,\n orientation: orientationProp,\n virtualFocus,\n focusLoop,\n rtl\n });\n const orientation = store.useState(\n (state) => state.orientation === \"both\" ? void 0 : state.orientation\n );\n props = useWrapElement(\n props,\n (element) => /* @__PURE__ */ jsx(ToolbarScopedContextProvider, { value: store, children: element }),\n [store]\n );\n props = __spreadValues({\n role: \"toolbar\",\n \"aria-orientation\": orientation\n }, props);\n props = useComposite(__spreadValues({ store }, props));\n return props;\n }\n);\nvar Toolbar = forwardRef(function Toolbar2(props) {\n const htmlProps = useToolbar(props);\n return createElement(TagName, htmlProps);\n});\nexport {\n Toolbar,\n useToolbar\n};\n","/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ToolbarContext from '../toolbar-context';\nimport type { ToolbarProps } from './types';\nimport type { WordPressComponentProps } from '../../context';\n\nfunction UnforwardedToolbarContainer(\n\t{ label, ...props }: WordPressComponentProps< ToolbarProps, 'div', false >,\n\tref: ForwardedRef< any >\n) {\n\tconst toolbarStore = Ariakit.useToolbarStore( {\n\t\tfocusLoop: true,\n\t\trtl: isRTL(),\n\t} );\n\n\treturn (\n\t\t// This will provide state for `ToolbarButton`'s\n\t\t<ToolbarContext.Provider value={ toolbarStore }>\n\t\t\t<Ariakit.Toolbar\n\t\t\t\tref={ ref }\n\t\t\t\taria-label={ label }\n\t\t\t\tstore={ toolbarStore }\n\t\t\t\t{ ...props }\n\t\t\t/>\n\t\t</ToolbarContext.Provider>\n\t);\n}\n\nexport const ToolbarContainer = forwardRef( UnforwardedToolbarContainer );\nexport default ToolbarContainer;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useMemo } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport ToolbarGroup from '../toolbar-group';\nimport ToolbarContainer from './toolbar-container';\nimport type { ToolbarProps } from './types';\nimport type { WordPressComponentProps } from '../../context';\nimport { ContextSystemProvider } from '../../context';\n\nfunction UnforwardedToolbar(\n\t{\n\t\tclassName,\n\t\tlabel,\n\t\tvariant,\n\t\t...props\n\t}: WordPressComponentProps< ToolbarProps, 'div', false >,\n\tref: ForwardedRef< any >\n) {\n\tconst isVariantDefined = variant !== undefined;\n\tconst contextSystemValue = useMemo( () => {\n\t\tif ( isVariantDefined ) {\n\t\t\treturn {};\n\t\t}\n\t\treturn {\n\t\t\tDropdownMenu: {\n\t\t\t\tvariant: 'toolbar',\n\t\t\t},\n\t\t\tDropdown: {\n\t\t\t\tvariant: 'toolbar',\n\t\t\t},\n\t\t\tMenu: {\n\t\t\t\tvariant: 'toolbar',\n\t\t\t},\n\t\t};\n\t}, [ isVariantDefined ] );\n\n\tif ( ! label ) {\n\t\tdeprecated( 'Using Toolbar without label prop', {\n\t\t\tsince: '5.6',\n\t\t\talternative: 'ToolbarGroup component',\n\t\t\tlink: 'https://developer.wordpress.org/block-editor/components/toolbar/',\n\t\t} );\n\t\t// Extracting title from `props` because `ToolbarGroup` doesn't accept it.\n\t\tconst { title: _title, ...restProps } = props;\n\t\treturn (\n\t\t\t<ToolbarGroup\n\t\t\t\tisCollapsed={ false }\n\t\t\t\t{ ...restProps }\n\t\t\t\tclassName={ className }\n\t\t\t/>\n\t\t);\n\t}\n\t// `ToolbarGroup` already uses components-toolbar for compatibility reasons.\n\tconst finalClassName = clsx(\n\t\t'components-accessible-toolbar',\n\t\tclassName,\n\t\tvariant && `is-${ variant }`\n\t);\n\n\treturn (\n\t\t<ContextSystemProvider value={ contextSystemValue }>\n\t\t\t<ToolbarContainer\n\t\t\t\tclassName={ finalClassName }\n\t\t\t\tlabel={ label }\n\t\t\t\tref={ ref }\n\t\t\t\t{ ...props }\n\t\t\t/>\n\t\t</ContextSystemProvider>\n\t);\n}\n\n/**\n * Renders a toolbar.\n *\n * To add controls, simply pass `ToolbarButton` components as children.\n *\n * ```jsx\n * import { Toolbar, ToolbarButton } from '@wordpress/components';\n * import { formatBold, formatItalic, link } from '@wordpress/icons';\n *\n * function MyToolbar() {\n * return (\n * <Toolbar label=\"Options\">\n * <ToolbarButton icon={ formatBold } label=\"Bold\" />\n * <ToolbarButton icon={ formatItalic } label=\"Italic\" />\n * <ToolbarButton icon={ link } label=\"Link\" />\n * </Toolbar>\n * );\n * }\n * ```\n */\nexport const Toolbar = forwardRef( UnforwardedToolbar );\nexport default Toolbar;\n","/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\n\n/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport ToolbarItem from '../toolbar-item';\nimport ToolbarContext from '../toolbar-context';\nimport DropdownMenu from '../../dropdown-menu';\nimport type { DropdownMenuProps } from '../../dropdown-menu/types';\n\nfunction ToolbarDropdownMenu(\n\tprops: DropdownMenuProps,\n\tref: ForwardedRef< any >\n) {\n\tconst accessibleToolbarState = useContext( ToolbarContext );\n\n\tif ( ! accessibleToolbarState ) {\n\t\treturn <DropdownMenu { ...props } />;\n\t}\n\n\t// ToolbarItem will pass all props to the render prop child, which will pass\n\t// all props to the toggle of DropdownMenu. This means that ToolbarDropdownMenu\n\t// has the same API as DropdownMenu.\n\treturn (\n\t\t<ToolbarItem ref={ ref } { ...props.toggleProps }>\n\t\t\t{ ( toolbarItemProps ) => (\n\t\t\t\t<DropdownMenu\n\t\t\t\t\t{ ...props }\n\t\t\t\t\tpopoverProps={ {\n\t\t\t\t\t\t...props.popoverProps,\n\t\t\t\t\t} }\n\t\t\t\t\ttoggleProps={ toolbarItemProps }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</ToolbarItem>\n\t);\n}\n\nexport default forwardRef( ToolbarDropdownMenu );\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport {\n\tStyledField as BaseControlField,\n\tStyledHelp as BaseControlHelp,\n\tWrapper as BaseControlWrapper,\n} from '../base-control/styles/base-control-styles';\nimport { LabelWrapper } from '../input-control/styles/input-control-styles';\nimport { COLORS, CONFIG, rtl } from '../utils';\nimport { space } from '../utils/space';\n\nconst toolsPanelGrid = {\n\tcolumns: ( columns: number ) => css`\n\t\tgrid-template-columns: ${ `repeat( ${ columns }, minmax(0, 1fr) )` };\n\t`,\n\tspacing: css`\n\t\tcolumn-gap: ${ space( 4 ) };\n\t\trow-gap: ${ space( 4 ) };\n\t`,\n\titem: {\n\t\tfullWidth: css`\n\t\t\tgrid-column: 1 / -1;\n\t\t`,\n\t},\n};\n\nexport const ToolsPanel = ( columns: number ) => css`\n\t${ toolsPanelGrid.columns( columns ) }\n\t${ toolsPanelGrid.spacing }\n\n\tborder-top: ${ CONFIG.borderWidth } solid ${ COLORS.gray[ 300 ] };\n\tmargin-top: -1px;\n\tpadding: ${ space( 4 ) };\n`;\n\n/**\n * Items injected into a ToolsPanel via a virtual bubbling slot will require\n * an inner dom element to be injected. The following rule allows for the\n * CSS grid display to be re-established.\n */\n\nexport const ToolsPanelWithInnerWrapper = ( columns: number ) => {\n\treturn css`\n\t\t> div:not( :first-of-type ) {\n\t\t\tdisplay: grid;\n\t\t\t${ toolsPanelGrid.columns( columns ) }\n\t\t\t${ toolsPanelGrid.spacing }\n\t\t\t${ toolsPanelGrid.item.fullWidth }\n\t\t}\n\t`;\n};\n\nexport const ToolsPanelHiddenInnerWrapper = css`\n\t> div:not( :first-of-type ) {\n\t\tdisplay: none;\n\t}\n`;\n\nexport const ToolsPanelHeader = css`\n\t${ toolsPanelGrid.item.fullWidth }\n\tgap: ${ space( 2 ) };\n\n\t/**\n\t * The targeting of dropdown menu component classes here is a temporary\n\t * measure only.\n\t *\n\t * The following styles should be replaced once the DropdownMenu has been\n\t * refactored and can be targeted via component interpolation.\n\t */\n\t.components-dropdown-menu {\n\t\tmargin: ${ space( -1 ) } 0;\n\t\tline-height: 0;\n\t}\n\t&&&& .components-dropdown-menu__toggle {\n\t\tpadding: 0;\n\t\tmin-width: ${ space( 6 ) };\n\t}\n`;\n\nexport const ToolsPanelHeading = css`\n\tfont-size: inherit;\n\tfont-weight: 500;\n\tline-height: normal;\n\n\t/* Required to meet specificity requirements to ensure zero margin */\n\t&& {\n\t\tmargin: 0;\n\t}\n`;\n\nexport const ToolsPanelItem = css`\n\t${ toolsPanelGrid.item.fullWidth }\n\n\t/* Clear spacing in and around controls added as panel items. */\n\t/* Remove when they can be addressed via context system. */\n\t& > div,\n\t& > fieldset {\n\t\tpadding-bottom: 0;\n\t\tmargin-bottom: 0;\n\t\tmax-width: 100%;\n\t}\n\n\t/* Remove BaseControl components margins and leave spacing to grid layout */\n\t&& ${ BaseControlWrapper } {\n\t\tmargin-bottom: 0;\n\n\t\t/**\n\t\t * To maintain proper spacing within a base control, the field's bottom\n\t\t * margin should only be removed when there is no help text included and\n\t\t * it is therefore the last-child.\n\t\t */\n\t\t${ BaseControlField }:last-child {\n\t\t\tmargin-bottom: 0;\n\t\t}\n\t}\n\n\t${ BaseControlHelp } {\n\t\tmargin-bottom: 0;\n\t}\n\n\t/**\n\t * Standardize InputControl and BaseControl labels with other labels when\n\t * inside ToolsPanel.\n\t *\n\t * This is a temporary fix until the different control components have their\n\t * labels normalized.\n\t */\n\t&& ${ LabelWrapper } {\n\t\tlabel {\n\t\t\tline-height: 1.4em;\n\t\t}\n\t}\n`;\n\nexport const ToolsPanelItemPlaceholder = css`\n\tdisplay: none;\n`;\n\nexport const DropdownMenu = css`\n\tmin-width: 200px;\n`;\n\nexport const ResetLabel = styled.span`\n\tcolor: ${ COLORS.theme.accentDarker10 };\n\tfont-size: 11px;\n\tfont-weight: 500;\n\tline-height: 1.4;\n\t${ rtl( { marginLeft: space( 3 ) } ) }\n\ttext-transform: uppercase;\n`;\n\nexport const DefaultControlsItem = css`\n\tcolor: ${ COLORS.gray[ 900 ] };\n\n\t&&[aria-disabled='true'] {\n\t\tcolor: ${ COLORS.gray[ 700 ] };\n\t\topacity: 1;\n\n\t\t&:hover {\n\t\t\tcolor: ${ COLORS.gray[ 700 ] };\n\t\t}\n\n\t\t${ ResetLabel } {\n\t\t\topacity: 0.3;\n\t\t}\n\t}\n`;\n","/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { ToolsPanelContext as ToolsPanelContextType } from './types';\n\nconst noop = () => undefined;\n\nexport const ToolsPanelContext = createContext< ToolsPanelContextType >( {\n\tmenuItems: { default: {}, optional: {} },\n\thasMenuItems: false,\n\tisResetting: false,\n\tshouldRenderPlaceholderItems: false,\n\tregisterPanelItem: noop,\n\tderegisterPanelItem: noop,\n\tflagItemCustomization: noop,\n\tregisterResetAllFilter: noop,\n\tderegisterResetAllFilter: noop,\n\tareAllOptionalControlsHidden: true,\n} );\n\nexport const useToolsPanelContext = () =>\n\tuseContext< ToolsPanelContextType >( ToolsPanelContext );\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { speak } from '@wordpress/a11y';\nimport { check, moreVertical, plus } from '@wordpress/icons';\nimport { __, _x, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport DropdownMenu from '../../dropdown-menu';\nimport MenuGroup from '../../menu-group';\nimport MenuItem from '../../menu-item';\nimport { HStack } from '../../h-stack';\nimport { Heading } from '../../heading';\nimport { useToolsPanelHeader } from './hook';\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect } from '../../context';\nimport { ResetLabel } from '../styles';\nimport type {\n\tToolsPanelControlsGroupProps,\n\tToolsPanelHeaderProps,\n} from '../types';\n\nconst DefaultControlsGroup = ( {\n\titemClassName,\n\titems,\n\ttoggleItem,\n}: ToolsPanelControlsGroupProps ) => {\n\tif ( ! items.length ) {\n\t\treturn null;\n\t}\n\n\tconst resetSuffix = <ResetLabel aria-hidden>{ __( 'Reset' ) }</ResetLabel>;\n\n\treturn (\n\t\t<>\n\t\t\t{ items.map( ( [ label, hasValue ] ) => {\n\t\t\t\tif ( hasValue ) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tkey={ label }\n\t\t\t\t\t\t\tclassName={ itemClassName }\n\t\t\t\t\t\t\trole=\"menuitem\"\n\t\t\t\t\t\t\tlabel={ sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: The name of the control being reset e.g. \"Padding\".\n\t\t\t\t\t\t\t\t__( 'Reset %s' ),\n\t\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\ttoggleItem( label );\n\t\t\t\t\t\t\t\tspeak(\n\t\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t\t// translators: %s: The name of the control being reset e.g. \"Padding\".\n\t\t\t\t\t\t\t\t\t\t__( '%s reset to default' ),\n\t\t\t\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t'assertive'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tsuffix={ resetSuffix }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t<MenuItem\n\t\t\t\t\t\tkey={ label }\n\t\t\t\t\t\ticon={ check }\n\t\t\t\t\t\tclassName={ itemClassName }\n\t\t\t\t\t\trole=\"menuitemcheckbox\"\n\t\t\t\t\t\tisSelected\n\t\t\t\t\t\taria-disabled\n\t\t\t\t\t>\n\t\t\t\t\t\t{ label }\n\t\t\t\t\t</MenuItem>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</>\n\t);\n};\n\nconst OptionalControlsGroup = ( {\n\titems,\n\ttoggleItem,\n}: ToolsPanelControlsGroupProps ) => {\n\tif ( ! items.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ items.map( ( [ label, isSelected ] ) => {\n\t\t\t\tconst itemLabel = isSelected\n\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t// translators: %s: The name of the control being hidden and reset e.g. \"Padding\".\n\t\t\t\t\t\t\t__( 'Hide and reset %s' ),\n\t\t\t\t\t\t\tlabel\n\t\t\t\t\t )\n\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t// translators: %s: The name of the control to display e.g. \"Padding\".\n\t\t\t\t\t\t\t_x( 'Show %s', 'input control' ),\n\t\t\t\t\t\t\tlabel\n\t\t\t\t\t );\n\n\t\t\t\treturn (\n\t\t\t\t\t<MenuItem\n\t\t\t\t\t\tkey={ label }\n\t\t\t\t\t\ticon={ isSelected ? check : null }\n\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\tlabel={ itemLabel }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tif ( isSelected ) {\n\t\t\t\t\t\t\t\tspeak(\n\t\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t\t// translators: %s: The name of the control being reset e.g. \"Padding\".\n\t\t\t\t\t\t\t\t\t\t__( '%s hidden and reset to default' ),\n\t\t\t\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t'assertive'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tspeak(\n\t\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t\t// translators: %s: The name of the control being reset e.g. \"Padding\".\n\t\t\t\t\t\t\t\t\t\t__( '%s is now visible' ),\n\t\t\t\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t'assertive'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttoggleItem( label );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\trole=\"menuitemcheckbox\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ label }\n\t\t\t\t\t</MenuItem>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</>\n\t);\n};\n\nconst ToolsPanelHeader = (\n\tprops: WordPressComponentProps< ToolsPanelHeaderProps, 'h2' >,\n\tforwardedRef: ForwardedRef< any >\n) => {\n\tconst {\n\t\tareAllOptionalControlsHidden,\n\t\tdefaultControlsItemClassName,\n\t\tdropdownMenuClassName,\n\t\thasMenuItems,\n\t\theadingClassName,\n\t\theadingLevel = 2,\n\t\tlabel: labelText,\n\t\tmenuItems,\n\t\tresetAll,\n\t\ttoggleItem,\n\t\tdropdownMenuProps,\n\t\t...headerProps\n\t} = useToolsPanelHeader( props );\n\n\tif ( ! labelText ) {\n\t\treturn null;\n\t}\n\n\tconst defaultItems = Object.entries( menuItems?.default || {} );\n\tconst optionalItems = Object.entries( menuItems?.optional || {} );\n\tconst dropDownMenuIcon = areAllOptionalControlsHidden ? plus : moreVertical;\n\tconst dropDownMenuLabelText = sprintf(\n\t\t// translators: %s: The name of the tool e.g. \"Color\" or \"Typography\".\n\t\t_x( '%s options', 'Button label to reveal tool panel options' ),\n\t\tlabelText\n\t);\n\tconst dropdownMenuDescriptionText = areAllOptionalControlsHidden\n\t\t? __( 'All options are currently hidden' )\n\t\t: undefined;\n\n\tconst canResetAll = [ ...defaultItems, ...optionalItems ].some(\n\t\t( [ , isSelected ] ) => isSelected\n\t);\n\n\treturn (\n\t\t<HStack { ...headerProps } ref={ forwardedRef }>\n\t\t\t<Heading level={ headingLevel } className={ headingClassName }>\n\t\t\t\t{ labelText }\n\t\t\t</Heading>\n\t\t\t{ hasMenuItems && (\n\t\t\t\t<DropdownMenu\n\t\t\t\t\t{ ...dropdownMenuProps }\n\t\t\t\t\ticon={ dropDownMenuIcon }\n\t\t\t\t\tlabel={ dropDownMenuLabelText }\n\t\t\t\t\tmenuProps={ { className: dropdownMenuClassName } }\n\t\t\t\t\ttoggleProps={ {\n\t\t\t\t\t\tsize: 'small',\n\t\t\t\t\t\tdescription: dropdownMenuDescriptionText,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ () => (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<MenuGroup label={ labelText }>\n\t\t\t\t\t\t\t\t<DefaultControlsGroup\n\t\t\t\t\t\t\t\t\titems={ defaultItems }\n\t\t\t\t\t\t\t\t\ttoggleItem={ toggleItem }\n\t\t\t\t\t\t\t\t\titemClassName={\n\t\t\t\t\t\t\t\t\t\tdefaultControlsItemClassName\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<OptionalControlsGroup\n\t\t\t\t\t\t\t\t\titems={ optionalItems }\n\t\t\t\t\t\t\t\t\ttoggleItem={ toggleItem }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\taria-disabled={ ! canResetAll }\n\t\t\t\t\t\t\t\t\t// @ts-expect-error - TODO: If this \"tertiary\" style is something we really want to allow on MenuItem,\n\t\t\t\t\t\t\t\t\t// we should rename it and explicitly allow it as an official API. All the other Button variants\n\t\t\t\t\t\t\t\t\t// don't make sense in a MenuItem context, and should be disallowed.\n\t\t\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\tif ( canResetAll ) {\n\t\t\t\t\t\t\t\t\t\t\tresetAll();\n\t\t\t\t\t\t\t\t\t\t\tspeak(\n\t\t\t\t\t\t\t\t\t\t\t\t__( 'All options reset' ),\n\t\t\t\t\t\t\t\t\t\t\t\t'assertive'\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Reset all' ) }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t</DropdownMenu>\n\t\t\t) }\n\t\t</HStack>\n\t);\n};\n\nconst ConnectedToolsPanelHeader = contextConnect(\n\tToolsPanelHeader,\n\t'ToolsPanelHeader'\n);\n\nexport default ConnectedToolsPanelHeader;\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport * as styles from '../styles';\nimport { useToolsPanelContext } from '../context';\nimport type { WordPressComponentProps } from '../../context';\nimport { useContextSystem } from '../../context';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { ToolsPanelHeaderProps } from '../types';\n\nexport function useToolsPanelHeader(\n\tprops: WordPressComponentProps< ToolsPanelHeaderProps, 'h2' >\n) {\n\tconst {\n\t\tclassName,\n\t\theadingLevel = 2,\n\t\t...otherProps\n\t} = useContextSystem( props, 'ToolsPanelHeader' );\n\n\tconst cx = useCx();\n\tconst classes = useMemo( () => {\n\t\treturn cx( styles.ToolsPanelHeader, className );\n\t}, [ className, cx ] );\n\n\tconst dropdownMenuClassName = useMemo( () => {\n\t\treturn cx( styles.DropdownMenu );\n\t}, [ cx ] );\n\n\tconst headingClassName = useMemo( () => {\n\t\treturn cx( styles.ToolsPanelHeading );\n\t}, [ cx ] );\n\n\tconst defaultControlsItemClassName = useMemo( () => {\n\t\treturn cx( styles.DefaultControlsItem );\n\t}, [ cx ] );\n\n\tconst { menuItems, hasMenuItems, areAllOptionalControlsHidden } =\n\t\tuseToolsPanelContext();\n\n\treturn {\n\t\t...otherProps,\n\t\tareAllOptionalControlsHidden,\n\t\tdefaultControlsItemClassName,\n\t\tdropdownMenuClassName,\n\t\thasMenuItems,\n\t\theadingClassName,\n\t\theadingLevel,\n\t\tmenuItems,\n\t\tclassName: classes,\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tuseCallback,\n\tuseEffect,\n\tuseMemo,\n\tuseReducer,\n\tuseRef,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport * as styles from '../styles';\nimport type { WordPressComponentProps } from '../../context';\nimport { useContextSystem } from '../../context';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type {\n\tToolsPanelItem,\n\tToolsPanelMenuItemKey,\n\tToolsPanelMenuItems,\n\tToolsPanelMenuItemsConfig,\n\tToolsPanelProps,\n\tResetAllFilter,\n} from '../types';\n\nconst DEFAULT_COLUMNS = 2;\n\ntype PanelItemsState = {\n\tpanelItems: ToolsPanelItem[];\n\tmenuItemOrder: string[];\n\tmenuItems: ToolsPanelMenuItems;\n};\n\ntype PanelItemsAction =\n\t| { type: 'REGISTER_PANEL'; item: ToolsPanelItem }\n\t| { type: 'UNREGISTER_PANEL'; label: string }\n\t| {\n\t\t\ttype: 'UPDATE_VALUE';\n\t\t\tgroup: ToolsPanelMenuItemKey;\n\t\t\tlabel: string;\n\t\t\tvalue: boolean;\n\t }\n\t| { type: 'TOGGLE_VALUE'; label: string }\n\t| { type: 'RESET_ALL' };\n\nfunction emptyMenuItems(): ToolsPanelMenuItems {\n\treturn { default: {}, optional: {} };\n}\n\nfunction emptyState(): PanelItemsState {\n\treturn { panelItems: [], menuItemOrder: [], menuItems: emptyMenuItems() };\n}\n\nconst generateMenuItems = ( {\n\tpanelItems,\n\tshouldReset,\n\tcurrentMenuItems,\n\tmenuItemOrder,\n}: ToolsPanelMenuItemsConfig ) => {\n\tconst newMenuItems: ToolsPanelMenuItems = emptyMenuItems();\n\tconst menuItems: ToolsPanelMenuItems = emptyMenuItems();\n\n\tpanelItems.forEach( ( { hasValue, isShownByDefault, label } ) => {\n\t\tconst group = isShownByDefault ? 'default' : 'optional';\n\n\t\t// If a menu item for this label has already been flagged as customized\n\t\t// (for default controls), or toggled on (for optional controls), do not\n\t\t// overwrite its value as those controls would lose that state.\n\t\tconst existingItemValue = currentMenuItems?.[ group ]?.[ label ];\n\t\tconst value = existingItemValue ? existingItemValue : hasValue();\n\n\t\tnewMenuItems[ group ][ label ] = shouldReset ? false : value;\n\t} );\n\n\t// Loop the known, previously registered items first to maintain menu order.\n\tmenuItemOrder.forEach( ( key ) => {\n\t\tif ( newMenuItems.default.hasOwnProperty( key ) ) {\n\t\t\tmenuItems.default[ key ] = newMenuItems.default[ key ];\n\t\t}\n\n\t\tif ( newMenuItems.optional.hasOwnProperty( key ) ) {\n\t\t\tmenuItems.optional[ key ] = newMenuItems.optional[ key ];\n\t\t}\n\t} );\n\n\t// Loop newMenuItems object adding any that aren't in the known items order.\n\tObject.keys( newMenuItems.default ).forEach( ( key ) => {\n\t\tif ( ! menuItems.default.hasOwnProperty( key ) ) {\n\t\t\tmenuItems.default[ key ] = newMenuItems.default[ key ];\n\t\t}\n\t} );\n\n\tObject.keys( newMenuItems.optional ).forEach( ( key ) => {\n\t\tif ( ! menuItems.optional.hasOwnProperty( key ) ) {\n\t\t\tmenuItems.optional[ key ] = newMenuItems.optional[ key ];\n\t\t}\n\t} );\n\n\treturn menuItems;\n};\n\nfunction panelItemsReducer(\n\tpanelItems: ToolsPanelItem[],\n\taction: PanelItemsAction\n) {\n\tswitch ( action.type ) {\n\t\tcase 'REGISTER_PANEL': {\n\t\t\tconst newItems = [ ...panelItems ];\n\t\t\t// If an item with this label has already been registered, remove it\n\t\t\t// first. This can happen when an item is moved between the default\n\t\t\t// and optional groups.\n\t\t\tconst existingIndex = newItems.findIndex(\n\t\t\t\t( oldItem ) => oldItem.label === action.item.label\n\t\t\t);\n\t\t\tif ( existingIndex !== -1 ) {\n\t\t\t\tnewItems.splice( existingIndex, 1 );\n\t\t\t}\n\t\t\tnewItems.push( action.item );\n\t\t\treturn newItems;\n\t\t}\n\t\tcase 'UNREGISTER_PANEL': {\n\t\t\tconst index = panelItems.findIndex(\n\t\t\t\t( item ) => item.label === action.label\n\t\t\t);\n\t\t\tif ( index !== -1 ) {\n\t\t\t\tconst newItems = [ ...panelItems ];\n\t\t\t\tnewItems.splice( index, 1 );\n\t\t\t\treturn newItems;\n\t\t\t}\n\t\t\treturn panelItems;\n\t\t}\n\t\tdefault:\n\t\t\treturn panelItems;\n\t}\n}\n\nfunction menuItemOrderReducer(\n\tmenuItemOrder: string[],\n\taction: PanelItemsAction\n) {\n\tswitch ( action.type ) {\n\t\tcase 'REGISTER_PANEL': {\n\t\t\t// Track the initial order of item registration. This is used for\n\t\t\t// maintaining menu item order later.\n\t\t\tif ( menuItemOrder.includes( action.item.label ) ) {\n\t\t\t\treturn menuItemOrder;\n\t\t\t}\n\n\t\t\treturn [ ...menuItemOrder, action.item.label ];\n\t\t}\n\t\tdefault:\n\t\t\treturn menuItemOrder;\n\t}\n}\n\nfunction menuItemsReducer( state: PanelItemsState, action: PanelItemsAction ) {\n\tswitch ( action.type ) {\n\t\tcase 'REGISTER_PANEL':\n\t\tcase 'UNREGISTER_PANEL':\n\t\t\t// generate new menu items from original `menuItems` and updated `panelItems` and `menuItemOrder`\n\t\t\treturn generateMenuItems( {\n\t\t\t\tcurrentMenuItems: state.menuItems,\n\t\t\t\tpanelItems: state.panelItems,\n\t\t\t\tmenuItemOrder: state.menuItemOrder,\n\t\t\t\tshouldReset: false,\n\t\t\t} );\n\t\tcase 'RESET_ALL':\n\t\t\treturn generateMenuItems( {\n\t\t\t\tpanelItems: state.panelItems,\n\t\t\t\tmenuItemOrder: state.menuItemOrder,\n\t\t\t\tshouldReset: true,\n\t\t\t} );\n\t\tcase 'UPDATE_VALUE': {\n\t\t\tconst oldValue = state.menuItems[ action.group ][ action.label ];\n\t\t\tif ( action.value === oldValue ) {\n\t\t\t\treturn state.menuItems;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\t...state.menuItems,\n\t\t\t\t[ action.group ]: {\n\t\t\t\t\t...state.menuItems[ action.group ],\n\t\t\t\t\t[ action.label ]: action.value,\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\tcase 'TOGGLE_VALUE': {\n\t\t\tconst currentItem = state.panelItems.find(\n\t\t\t\t( item ) => item.label === action.label\n\t\t\t);\n\n\t\t\tif ( ! currentItem ) {\n\t\t\t\treturn state.menuItems;\n\t\t\t}\n\n\t\t\tconst menuGroup = currentItem.isShownByDefault\n\t\t\t\t? 'default'\n\t\t\t\t: 'optional';\n\n\t\t\tconst newMenuItems = {\n\t\t\t\t...state.menuItems,\n\t\t\t\t[ menuGroup ]: {\n\t\t\t\t\t...state.menuItems[ menuGroup ],\n\t\t\t\t\t[ action.label ]:\n\t\t\t\t\t\t! state.menuItems[ menuGroup ][ action.label ],\n\t\t\t\t},\n\t\t\t};\n\t\t\treturn newMenuItems;\n\t\t}\n\n\t\tdefault:\n\t\t\treturn state.menuItems;\n\t}\n}\n\nfunction panelReducer( state: PanelItemsState, action: PanelItemsAction ) {\n\tconst panelItems = panelItemsReducer( state.panelItems, action );\n\tconst menuItemOrder = menuItemOrderReducer( state.menuItemOrder, action );\n\t// `menuItemsReducer` is a bit unusual because it generates new state from original `menuItems`\n\t// and the updated `panelItems` and `menuItemOrder`.\n\tconst menuItems = menuItemsReducer(\n\t\t{ panelItems, menuItemOrder, menuItems: state.menuItems },\n\t\taction\n\t);\n\n\treturn { panelItems, menuItemOrder, menuItems };\n}\n\nfunction resetAllFiltersReducer(\n\tfilters: ResetAllFilter[],\n\taction: { type: 'REGISTER' | 'UNREGISTER'; filter: ResetAllFilter }\n) {\n\tswitch ( action.type ) {\n\t\tcase 'REGISTER':\n\t\t\treturn [ ...filters, action.filter ];\n\t\tcase 'UNREGISTER':\n\t\t\treturn filters.filter( ( f ) => f !== action.filter );\n\t\tdefault:\n\t\t\treturn filters;\n\t}\n}\n\nconst isMenuItemTypeEmpty = (\n\tobj: ToolsPanelMenuItems[ ToolsPanelMenuItemKey ]\n) => Object.keys( obj ).length === 0;\n\nexport function useToolsPanel(\n\tprops: WordPressComponentProps< ToolsPanelProps, 'div' >\n) {\n\tconst {\n\t\tclassName,\n\t\theadingLevel = 2,\n\t\tresetAll,\n\t\tpanelId,\n\t\thasInnerWrapper = false,\n\t\tshouldRenderPlaceholderItems = false,\n\t\t__experimentalFirstVisibleItemClass,\n\t\t__experimentalLastVisibleItemClass,\n\t\t...otherProps\n\t} = useContextSystem( props, 'ToolsPanel' );\n\n\tconst isResettingRef = useRef( false );\n\tconst wasResetting = isResettingRef.current;\n\n\t// `isResettingRef` is cleared via this hook to effectively batch together\n\t// the resetAll task. Without this, the flag is cleared after the first\n\t// control updates and forces a rerender with subsequent controls then\n\t// believing they need to reset, unfortunately using stale data.\n\tuseEffect( () => {\n\t\tif ( wasResetting ) {\n\t\t\tisResettingRef.current = false;\n\t\t}\n\t}, [ wasResetting ] );\n\n\t// Allow panel items to register themselves.\n\tconst [ { panelItems, menuItems }, panelDispatch ] = useReducer(\n\t\tpanelReducer,\n\t\tundefined,\n\t\temptyState\n\t);\n\n\tconst [ resetAllFilters, dispatchResetAllFilters ] = useReducer(\n\t\tresetAllFiltersReducer,\n\t\t[]\n\t);\n\n\tconst registerPanelItem = useCallback( ( item: ToolsPanelItem ) => {\n\t\t// Add item to panel items.\n\t\tpanelDispatch( { type: 'REGISTER_PANEL', item } );\n\t}, [] );\n\n\t// Panels need to deregister on unmount to avoid orphans in menu state.\n\t// This is an issue when panel items are being injected via SlotFills.\n\tconst deregisterPanelItem = useCallback( ( label: string ) => {\n\t\t// When switching selections between components injecting matching\n\t\t// controls, e.g. both panels have a \"padding\" control, the\n\t\t// deregistration of the first panel doesn't occur until after the\n\t\t// registration of the next.\n\t\tpanelDispatch( { type: 'UNREGISTER_PANEL', label } );\n\t}, [] );\n\n\tconst registerResetAllFilter = useCallback( ( filter: ResetAllFilter ) => {\n\t\tdispatchResetAllFilters( { type: 'REGISTER', filter } );\n\t}, [] );\n\n\tconst deregisterResetAllFilter = useCallback(\n\t\t( filter: ResetAllFilter ) => {\n\t\t\tdispatchResetAllFilters( { type: 'UNREGISTER', filter } );\n\t\t},\n\t\t[]\n\t);\n\n\t// Updates the status of the panel’s menu items. For default items the\n\t// value represents whether it differs from the default and for optional\n\t// items whether the item is shown.\n\tconst flagItemCustomization = useCallback(\n\t\t(\n\t\t\tvalue: boolean,\n\t\t\tlabel: string,\n\t\t\tgroup: ToolsPanelMenuItemKey = 'default'\n\t\t) => {\n\t\t\tpanelDispatch( { type: 'UPDATE_VALUE', group, label, value } );\n\t\t},\n\t\t[]\n\t);\n\n\t// Whether all optional menu items are hidden or not must be tracked\n\t// in order to later determine if the panel display is empty and handle\n\t// conditional display of a plus icon to indicate the presence of further\n\t// menu items.\n\tconst areAllOptionalControlsHidden = useMemo( () => {\n\t\treturn (\n\t\t\tisMenuItemTypeEmpty( menuItems.default ) &&\n\t\t\t! isMenuItemTypeEmpty( menuItems.optional ) &&\n\t\t\tObject.values( menuItems.optional ).every(\n\t\t\t\t( isSelected ) => ! isSelected\n\t\t\t)\n\t\t);\n\t}, [ menuItems ] );\n\n\tconst cx = useCx();\n\tconst classes = useMemo( () => {\n\t\tconst wrapperStyle =\n\t\t\thasInnerWrapper &&\n\t\t\tstyles.ToolsPanelWithInnerWrapper( DEFAULT_COLUMNS );\n\t\tconst emptyStyle =\n\t\t\tareAllOptionalControlsHidden && styles.ToolsPanelHiddenInnerWrapper;\n\n\t\treturn cx(\n\t\t\tstyles.ToolsPanel( DEFAULT_COLUMNS ),\n\t\t\twrapperStyle,\n\t\t\temptyStyle,\n\t\t\tclassName\n\t\t);\n\t}, [ areAllOptionalControlsHidden, className, cx, hasInnerWrapper ] );\n\n\t// Toggle the checked state of a menu item which is then used to determine\n\t// display of the item within the panel.\n\tconst toggleItem = useCallback( ( label: string ) => {\n\t\tpanelDispatch( { type: 'TOGGLE_VALUE', label } );\n\t}, [] );\n\n\t// Resets display of children and executes resetAll callback if available.\n\tconst resetAllItems = useCallback( () => {\n\t\tif ( typeof resetAll === 'function' ) {\n\t\t\tisResettingRef.current = true;\n\t\t\tresetAll( resetAllFilters );\n\t\t}\n\n\t\t// Turn off display of all non-default items.\n\t\tpanelDispatch( { type: 'RESET_ALL' } );\n\t}, [ resetAllFilters, resetAll ] );\n\n\t// Assist ItemGroup styling when there are potentially hidden placeholder\n\t// items by identifying first & last items that are toggled on for display.\n\tconst getFirstVisibleItemLabel = ( items: ToolsPanelItem[] ) => {\n\t\tconst optionalItems = menuItems.optional || {};\n\t\tconst firstItem = items.find(\n\t\t\t( item ) => item.isShownByDefault || optionalItems[ item.label ]\n\t\t);\n\n\t\treturn firstItem?.label;\n\t};\n\n\tconst firstDisplayedItem = getFirstVisibleItemLabel( panelItems );\n\tconst lastDisplayedItem = getFirstVisibleItemLabel(\n\t\t[ ...panelItems ].reverse()\n\t);\n\n\tconst hasMenuItems = panelItems.length > 0;\n\n\tconst panelContext = useMemo(\n\t\t() => ( {\n\t\t\tareAllOptionalControlsHidden,\n\t\t\tderegisterPanelItem,\n\t\t\tderegisterResetAllFilter,\n\t\t\tfirstDisplayedItem,\n\t\t\tflagItemCustomization,\n\t\t\thasMenuItems,\n\t\t\tisResetting: isResettingRef.current,\n\t\t\tlastDisplayedItem,\n\t\t\tmenuItems,\n\t\t\tpanelId,\n\t\t\tregisterPanelItem,\n\t\t\tregisterResetAllFilter,\n\t\t\tshouldRenderPlaceholderItems,\n\t\t\t__experimentalFirstVisibleItemClass,\n\t\t\t__experimentalLastVisibleItemClass,\n\t\t} ),\n\t\t[\n\t\t\tareAllOptionalControlsHidden,\n\t\t\tderegisterPanelItem,\n\t\t\tderegisterResetAllFilter,\n\t\t\tfirstDisplayedItem,\n\t\t\tflagItemCustomization,\n\t\t\tlastDisplayedItem,\n\t\t\tmenuItems,\n\t\t\tpanelId,\n\t\t\thasMenuItems,\n\t\t\tregisterResetAllFilter,\n\t\t\tregisterPanelItem,\n\t\t\tshouldRenderPlaceholderItems,\n\t\t\t__experimentalFirstVisibleItemClass,\n\t\t\t__experimentalLastVisibleItemClass,\n\t\t]\n\t);\n\n\treturn {\n\t\t...otherProps,\n\t\theadingLevel,\n\t\tpanelContext,\n\t\tresetAllItems,\n\t\ttoggleItem,\n\t\tclassName: classes,\n\t};\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport ToolsPanelHeader from '../tools-panel-header';\nimport { ToolsPanelContext } from '../context';\nimport { useToolsPanel } from './hook';\nimport { Grid } from '../../grid';\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect } from '../../context';\nimport type { ToolsPanelProps } from '../types';\n\nconst UnconnectedToolsPanel = (\n\tprops: WordPressComponentProps< ToolsPanelProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) => {\n\tconst {\n\t\tchildren,\n\t\tlabel,\n\t\tpanelContext,\n\t\tresetAllItems,\n\t\ttoggleItem,\n\t\theadingLevel,\n\t\tdropdownMenuProps,\n\t\t...toolsPanelProps\n\t} = useToolsPanel( props );\n\n\treturn (\n\t\t<Grid { ...toolsPanelProps } columns={ 2 } ref={ forwardedRef }>\n\t\t\t<ToolsPanelContext.Provider value={ panelContext }>\n\t\t\t\t<ToolsPanelHeader\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tresetAll={ resetAllItems }\n\t\t\t\t\ttoggleItem={ toggleItem }\n\t\t\t\t\theadingLevel={ headingLevel }\n\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t/>\n\t\t\t\t{ children }\n\t\t\t</ToolsPanelContext.Provider>\n\t\t</Grid>\n\t);\n};\n\n/**\n * The `ToolsPanel` is a container component that displays its children preceded\n * by a header. The header includes a dropdown menu which is automatically\n * generated from the panel's inner `ToolsPanelItems`.\n *\n * ```jsx\n * import { __ } from '@wordpress/i18n';\n * import {\n * __experimentalToolsPanel as ToolsPanel,\n * __experimentalToolsPanelItem as ToolsPanelItem,\n * __experimentalUnitControl as UnitControl\n * } from '@wordpress/components';\n *\n * function Example() {\n * const [ height, setHeight ] = useState();\n * const [ width, setWidth ] = useState();\n *\n * const resetAll = () => {\n * setHeight();\n * setWidth();\n * }\n *\n * return (\n * <ToolsPanel label={ __( 'Dimensions' ) } resetAll={ resetAll }>\n * <ToolsPanelItem\n * hasValue={ () => !! height }\n * label={ __( 'Height' ) }\n * onDeselect={ () => setHeight() }\n * >\n * <UnitControl\n * __next40pxDefaultSize\n * label={ __( 'Height' ) }\n * onChange={ setHeight }\n * value={ height }\n * />\n * </ToolsPanelItem>\n * <ToolsPanelItem\n * hasValue={ () => !! width }\n * label={ __( 'Width' ) }\n * onDeselect={ () => setWidth() }\n * >\n * <UnitControl\n * __next40pxDefaultSize\n * label={ __( 'Width' ) }\n * onChange={ setWidth }\n * value={ width }\n * />\n * </ToolsPanelItem>\n * </ToolsPanel>\n * );\n * }\n * ```\n */\nexport const ToolsPanel = contextConnect( UnconnectedToolsPanel, 'ToolsPanel' );\n\nexport default ToolsPanel;\n","/**\n * WordPress dependencies\n */\nimport { usePrevious } from '@wordpress/compose';\nimport {\n\tuseCallback,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseMemo,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport * as styles from '../styles';\nimport { useToolsPanelContext } from '../context';\nimport type { WordPressComponentProps } from '../../context';\nimport { useContextSystem } from '../../context';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { ToolsPanelItemProps } from '../types';\n\nconst noop = () => {};\n\nexport function useToolsPanelItem(\n\tprops: WordPressComponentProps< ToolsPanelItemProps, 'div' >\n) {\n\tconst {\n\t\tclassName,\n\t\thasValue,\n\t\tisShownByDefault = false,\n\t\tlabel,\n\t\tpanelId,\n\t\tresetAllFilter = noop,\n\t\tonDeselect,\n\t\tonSelect,\n\t\t...otherProps\n\t} = useContextSystem( props, 'ToolsPanelItem' );\n\n\tconst {\n\t\tpanelId: currentPanelId,\n\t\tmenuItems,\n\t\tregisterResetAllFilter,\n\t\tderegisterResetAllFilter,\n\t\tregisterPanelItem,\n\t\tderegisterPanelItem,\n\t\tflagItemCustomization,\n\t\tisResetting,\n\t\tshouldRenderPlaceholderItems: shouldRenderPlaceholder,\n\t\tfirstDisplayedItem,\n\t\tlastDisplayedItem,\n\t\t__experimentalFirstVisibleItemClass,\n\t\t__experimentalLastVisibleItemClass,\n\t} = useToolsPanelContext();\n\n\t// hasValue is a new function on every render, so do not add it as a\n\t// dependency to the useCallback hook! If needed, we should use a ref.\n\tconst hasValueCallback = useCallback( hasValue, [ panelId ] );\n\t// resetAllFilter is a new function on every render, so do not add it as a\n\t// dependency to the useCallback hook! If needed, we should use a ref.\n\tconst resetAllFilterCallback = useCallback( resetAllFilter, [ panelId ] );\n\tconst previousPanelId = usePrevious( currentPanelId );\n\n\tconst hasMatchingPanel =\n\t\tcurrentPanelId === panelId || currentPanelId === null;\n\n\t// Registering the panel item allows the panel to include it in its\n\t// automatically generated menu and determine its initial checked status.\n\t//\n\t// This is performed in a layout effect to ensure that the panel item\n\t// is registered before it is rendered preventing a rendering glitch.\n\t// See: https://github.com/WordPress/gutenberg/issues/56470\n\tuseLayoutEffect( () => {\n\t\tif ( hasMatchingPanel && previousPanelId !== null ) {\n\t\t\tregisterPanelItem( {\n\t\t\t\thasValue: hasValueCallback,\n\t\t\t\tisShownByDefault,\n\t\t\t\tlabel,\n\t\t\t\tpanelId,\n\t\t\t} );\n\t\t}\n\n\t\treturn () => {\n\t\t\tif (\n\t\t\t\t( previousPanelId === null && !! currentPanelId ) ||\n\t\t\t\tcurrentPanelId === panelId\n\t\t\t) {\n\t\t\t\tderegisterPanelItem( label );\n\t\t\t}\n\t\t};\n\t}, [\n\t\tcurrentPanelId,\n\t\thasMatchingPanel,\n\t\tisShownByDefault,\n\t\tlabel,\n\t\thasValueCallback,\n\t\tpanelId,\n\t\tpreviousPanelId,\n\t\tregisterPanelItem,\n\t\tderegisterPanelItem,\n\t] );\n\n\tuseEffect( () => {\n\t\tif ( hasMatchingPanel ) {\n\t\t\tregisterResetAllFilter( resetAllFilterCallback );\n\t\t}\n\t\treturn () => {\n\t\t\tif ( hasMatchingPanel ) {\n\t\t\t\tderegisterResetAllFilter( resetAllFilterCallback );\n\t\t\t}\n\t\t};\n\t}, [\n\t\tregisterResetAllFilter,\n\t\tderegisterResetAllFilter,\n\t\tresetAllFilterCallback,\n\t\thasMatchingPanel,\n\t] );\n\n\t// Note: `label` is used as a key when building menu item state in\n\t// `ToolsPanel`.\n\tconst menuGroup = isShownByDefault ? 'default' : 'optional';\n\tconst isMenuItemChecked = menuItems?.[ menuGroup ]?.[ label ];\n\tconst wasMenuItemChecked = usePrevious( isMenuItemChecked );\n\tconst isRegistered = menuItems?.[ menuGroup ]?.[ label ] !== undefined;\n\n\tconst isValueSet = hasValue();\n\t// Notify the panel when an item's value has changed except for optional\n\t// items without value because the item should not cause itself to hide.\n\tuseEffect( () => {\n\t\tif ( ! isShownByDefault && ! isValueSet ) {\n\t\t\treturn;\n\t\t}\n\n\t\tflagItemCustomization( isValueSet, label, menuGroup );\n\t}, [\n\t\tisValueSet,\n\t\tmenuGroup,\n\t\tlabel,\n\t\tflagItemCustomization,\n\t\tisShownByDefault,\n\t] );\n\n\t// Determine if the panel item's corresponding menu is being toggled and\n\t// trigger appropriate callback if it is.\n\tuseEffect( () => {\n\t\t// We check whether this item is currently registered as items rendered\n\t\t// via fills can persist through the parent panel being remounted.\n\t\t// See: https://github.com/WordPress/gutenberg/pull/45673\n\t\tif ( ! isRegistered || isResetting || ! hasMatchingPanel ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isMenuItemChecked && ! isValueSet && ! wasMenuItemChecked ) {\n\t\t\tonSelect?.();\n\t\t}\n\n\t\tif ( ! isMenuItemChecked && isValueSet && wasMenuItemChecked ) {\n\t\t\tonDeselect?.();\n\t\t}\n\t}, [\n\t\thasMatchingPanel,\n\t\tisMenuItemChecked,\n\t\tisRegistered,\n\t\tisResetting,\n\t\tisValueSet,\n\t\twasMenuItemChecked,\n\t\tonSelect,\n\t\tonDeselect,\n\t] );\n\n\t// The item is shown if it is a default control regardless of whether it\n\t// has a value. Optional items are shown when they are checked or have\n\t// a value.\n\tconst isShown = isShownByDefault\n\t\t? menuItems?.[ menuGroup ]?.[ label ] !== undefined\n\t\t: isMenuItemChecked;\n\n\tconst cx = useCx();\n\tconst classes = useMemo( () => {\n\t\tconst shouldApplyPlaceholderStyles =\n\t\t\tshouldRenderPlaceholder && ! isShown;\n\t\tconst firstItemStyle =\n\t\t\tfirstDisplayedItem === label && __experimentalFirstVisibleItemClass;\n\t\tconst lastItemStyle =\n\t\t\tlastDisplayedItem === label && __experimentalLastVisibleItemClass;\n\t\treturn cx(\n\t\t\tstyles.ToolsPanelItem,\n\t\t\tshouldApplyPlaceholderStyles && styles.ToolsPanelItemPlaceholder,\n\t\t\t! shouldApplyPlaceholderStyles && className,\n\t\t\tfirstItemStyle,\n\t\t\tlastItemStyle\n\t\t);\n\t}, [\n\t\tisShown,\n\t\tshouldRenderPlaceholder,\n\t\tclassName,\n\t\tcx,\n\t\tfirstDisplayedItem,\n\t\tlastDisplayedItem,\n\t\t__experimentalFirstVisibleItemClass,\n\t\t__experimentalLastVisibleItemClass,\n\t\tlabel,\n\t] );\n\n\treturn {\n\t\t...otherProps,\n\t\tisShown,\n\t\tshouldRenderPlaceholder,\n\t\tclassName: classes,\n\t};\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { useToolsPanelItem } from './hook';\nimport { View } from '../../view';\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect } from '../../context';\nimport type { ToolsPanelItemProps } from '../types';\n\n// This wraps controls to be conditionally displayed within a tools panel. It\n// prevents props being applied to HTML elements that would make them invalid.\nconst UnconnectedToolsPanelItem = (\n\tprops: WordPressComponentProps< ToolsPanelItemProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) => {\n\tconst {\n\t\tchildren,\n\t\tisShown,\n\t\tshouldRenderPlaceholder,\n\t\t...toolsPanelItemProps\n\t} = useToolsPanelItem( props );\n\n\tif ( ! isShown ) {\n\t\treturn shouldRenderPlaceholder ? (\n\t\t\t<View { ...toolsPanelItemProps } ref={ forwardedRef } />\n\t\t) : null;\n\t}\n\n\treturn (\n\t\t<View { ...toolsPanelItemProps } ref={ forwardedRef }>\n\t\t\t{ children }\n\t\t</View>\n\t);\n};\n\nexport const ToolsPanelItem = contextConnect(\n\tUnconnectedToolsPanelItem,\n\t'ToolsPanelItem'\n);\n\nexport default ToolsPanelItem;\n","/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\nconst RovingTabIndexContext = createContext<\n\t| {\n\t\t\tlastFocusedElement: HTMLElement | undefined;\n\t\t\tsetLastFocusedElement: React.Dispatch<\n\t\t\t\tReact.SetStateAction< HTMLElement | undefined >\n\t\t\t>;\n\t }\n\t| undefined\n>( undefined );\nexport const useRovingTabIndexContext = () =>\n\tuseContext( RovingTabIndexContext );\nexport const RovingTabIndexProvider = RovingTabIndexContext.Provider;\n","/**\n * WordPress dependencies\n */\nimport { useState, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { RovingTabIndexProvider } from './roving-tab-index-context';\n\n/**\n * Provider for adding roving tab index behaviors to tree grid structures.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/components/src/tree-grid/README.md\n */\nexport default function RovingTabIndex( {\n\tchildren,\n}: {\n\tchildren: React.ReactNode;\n} ) {\n\tconst [ lastFocusedElement, setLastFocusedElement ] =\n\t\tuseState< HTMLElement >();\n\n\t// Use `useMemo` to avoid creation of a new object for the providerValue\n\t// on every render. Only create a new object when the `lastFocusedElement`\n\t// value changes.\n\tconst providerValue = useMemo(\n\t\t() => ( { lastFocusedElement, setLastFocusedElement } ),\n\t\t[ lastFocusedElement ]\n\t);\n\n\treturn (\n\t\t<RovingTabIndexProvider value={ providerValue }>\n\t\t\t{ children }\n\t\t</RovingTabIndexProvider>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { focus } from '@wordpress/dom';\nimport { forwardRef, useCallback } from '@wordpress/element';\nimport { UP, DOWN, LEFT, RIGHT, HOME, END } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport RovingTabIndexContainer from './roving-tab-index';\nimport type { TreeGridProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\n/**\n * Return focusables in a row element, excluding those from other branches\n * nested within the row.\n *\n * @param rowElement The DOM element representing the row.\n *\n * @return The array of focusables in the row.\n */\nfunction getRowFocusables( rowElement: HTMLElement ) {\n\tconst focusablesInRow = focus.focusable.find( rowElement, {\n\t\tsequential: true,\n\t} );\n\n\treturn focusablesInRow.filter( ( focusable ) => {\n\t\treturn focusable.closest( '[role=\"row\"]' ) === rowElement;\n\t} );\n}\n\n/**\n * Renders both a table and tbody element, used to create a tree hierarchy.\n *\n */\nfunction UnforwardedTreeGrid(\n\t{\n\t\tchildren,\n\t\tonExpandRow = () => {},\n\t\tonCollapseRow = () => {},\n\t\tonFocusRow = () => {},\n\t\tapplicationAriaLabel,\n\t\t...props\n\t}: WordPressComponentProps< TreeGridProps, 'table', false >,\n\t/** A ref to the underlying DOM table element. */\n\tref: React.ForwardedRef< HTMLTableElement >\n) {\n\tconst onKeyDown = useCallback(\n\t\t( event: React.KeyboardEvent< HTMLTableElement > ) => {\n\t\t\tconst { keyCode, metaKey, ctrlKey, altKey } = event;\n\n\t\t\t// The shift key is intentionally absent from the following list,\n\t\t\t// to enable shift + up/down to select items from the list.\n\t\t\tconst hasModifierKeyPressed = metaKey || ctrlKey || altKey;\n\n\t\t\tif (\n\t\t\t\thasModifierKeyPressed ||\n\t\t\t\t! ( [ UP, DOWN, LEFT, RIGHT, HOME, END ] as number[] ).includes(\n\t\t\t\t\tkeyCode\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// The event will be handled, stop propagation.\n\t\t\tevent.stopPropagation();\n\n\t\t\tconst { activeElement } = document;\n\t\t\tconst { currentTarget: treeGridElement } = event;\n\n\t\t\tif (\n\t\t\t\t! activeElement ||\n\t\t\t\t! treeGridElement.contains( activeElement )\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Calculate the columnIndex of the active element.\n\t\t\tconst activeRow =\n\t\t\t\tactiveElement.closest< HTMLElement >( '[role=\"row\"]' );\n\n\t\t\tif ( ! activeRow ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst focusablesInRow = getRowFocusables( activeRow );\n\t\t\tconst currentColumnIndex = focusablesInRow.indexOf(\n\t\t\t\tactiveElement as HTMLElement\n\t\t\t);\n\t\t\tconst canExpandCollapse = 0 === currentColumnIndex;\n\t\t\tconst cannotFocusNextColumn =\n\t\t\t\tcanExpandCollapse &&\n\t\t\t\t( activeRow.getAttribute( 'data-expanded' ) === 'false' ||\n\t\t\t\t\tactiveRow.getAttribute( 'aria-expanded' ) === 'false' ) &&\n\t\t\t\tkeyCode === RIGHT;\n\n\t\t\tif ( ( [ LEFT, RIGHT ] as number[] ).includes( keyCode ) ) {\n\t\t\t\t// Calculate to the next element.\n\t\t\t\tlet nextIndex;\n\t\t\t\tif ( keyCode === LEFT ) {\n\t\t\t\t\tnextIndex = Math.max( 0, currentColumnIndex - 1 );\n\t\t\t\t} else {\n\t\t\t\t\tnextIndex = Math.min(\n\t\t\t\t\t\tcurrentColumnIndex + 1,\n\t\t\t\t\t\tfocusablesInRow.length - 1\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Focus is at the left most column.\n\t\t\t\tif ( canExpandCollapse ) {\n\t\t\t\t\tif ( keyCode === LEFT ) {\n\t\t\t\t\t\t// Left:\n\t\t\t\t\t\t// If a row is focused, and it is expanded, collapses the current row.\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tactiveRow.getAttribute( 'data-expanded' ) ===\n\t\t\t\t\t\t\t\t'true' ||\n\t\t\t\t\t\t\tactiveRow.getAttribute( 'aria-expanded' ) === 'true'\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tonCollapseRow( activeRow );\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// If a row is focused, and it is collapsed, moves to the parent row (if there is one).\n\t\t\t\t\t\tconst level = Math.max(\n\t\t\t\t\t\t\tparseInt(\n\t\t\t\t\t\t\t\tactiveRow?.getAttribute( 'aria-level' ) ?? '1',\n\t\t\t\t\t\t\t\t10\n\t\t\t\t\t\t\t) - 1,\n\t\t\t\t\t\t\t1\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst rows = Array.from(\n\t\t\t\t\t\t\ttreeGridElement.querySelectorAll< HTMLElement >(\n\t\t\t\t\t\t\t\t'[role=\"row\"]'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t\tlet parentRow = activeRow;\n\t\t\t\t\t\tconst currentRowIndex = rows.indexOf( activeRow );\n\t\t\t\t\t\tfor ( let i = currentRowIndex; i >= 0; i-- ) {\n\t\t\t\t\t\t\tconst ariaLevel =\n\t\t\t\t\t\t\t\trows[ i ].getAttribute( 'aria-level' );\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tariaLevel !== null &&\n\t\t\t\t\t\t\t\tparseInt( ariaLevel, 10 ) === level\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tparentRow = rows[ i ];\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tgetRowFocusables( parentRow )?.[ 0 ]?.focus();\n\t\t\t\t\t}\n\t\t\t\t\tif ( keyCode === RIGHT ) {\n\t\t\t\t\t\t// Right:\n\t\t\t\t\t\t// If a row is focused, and it is collapsed, expands the current row.\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tactiveRow.getAttribute( 'data-expanded' ) ===\n\t\t\t\t\t\t\t\t'false' ||\n\t\t\t\t\t\t\tactiveRow.getAttribute( 'aria-expanded' ) ===\n\t\t\t\t\t\t\t\t'false'\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tonExpandRow( activeRow );\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// If a row is focused, and it is expanded, focuses the next cell in the row.\n\t\t\t\t\t\tconst focusableItems = getRowFocusables( activeRow );\n\t\t\t\t\t\tif ( focusableItems.length > 0 ) {\n\t\t\t\t\t\t\tfocusableItems[ nextIndex ]?.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Prevent key use for anything else. For example, Voiceover\n\t\t\t\t\t// will start reading text on continued use of left/right arrow\n\t\t\t\t\t// keys.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Focus the next element. If at most left column and row is collapsed, moving right is not allowed as this will expand. However, if row is collapsed, moving left is allowed.\n\t\t\t\tif ( cannotFocusNextColumn ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tfocusablesInRow[ nextIndex ].focus();\n\n\t\t\t\t// Prevent key use for anything else. This ensures Voiceover\n\t\t\t\t// doesn't try to handle key navigation.\n\t\t\t\tevent.preventDefault();\n\t\t\t} else if ( ( [ UP, DOWN ] as number[] ).includes( keyCode ) ) {\n\t\t\t\t// Calculate the rowIndex of the next row.\n\t\t\t\tconst rows = Array.from(\n\t\t\t\t\ttreeGridElement.querySelectorAll< HTMLElement >(\n\t\t\t\t\t\t'[role=\"row\"]'\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\tconst currentRowIndex = rows.indexOf( activeRow );\n\t\t\t\tlet nextRowIndex;\n\n\t\t\t\tif ( keyCode === UP ) {\n\t\t\t\t\tnextRowIndex = Math.max( 0, currentRowIndex - 1 );\n\t\t\t\t} else {\n\t\t\t\t\tnextRowIndex = Math.min(\n\t\t\t\t\t\tcurrentRowIndex + 1,\n\t\t\t\t\t\trows.length - 1\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Focus is either at the top or bottom edge of the grid. Do nothing.\n\t\t\t\tif ( nextRowIndex === currentRowIndex ) {\n\t\t\t\t\t// Prevent key use for anything else. For example, Voiceover\n\t\t\t\t\t// will start navigating horizontally when reaching the vertical\n\t\t\t\t\t// bounds of a table.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Get the focusables in the next row.\n\t\t\t\tconst focusablesInNextRow = getRowFocusables(\n\t\t\t\t\trows[ nextRowIndex ]\n\t\t\t\t);\n\n\t\t\t\t// If for some reason there are no focusables in the next row, do nothing.\n\t\t\t\tif ( ! focusablesInNextRow || ! focusablesInNextRow.length ) {\n\t\t\t\t\t// Prevent key use for anything else. For example, Voiceover\n\t\t\t\t\t// will still focus text when using arrow keys, while this\n\t\t\t\t\t// component should limit navigation to focusables.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Try to focus the element in the next row that's at a similar column to the activeElement.\n\t\t\t\tconst nextIndex = Math.min(\n\t\t\t\t\tcurrentColumnIndex,\n\t\t\t\t\tfocusablesInNextRow.length - 1\n\t\t\t\t);\n\t\t\t\tfocusablesInNextRow[ nextIndex ].focus();\n\n\t\t\t\t// Let consumers know the row that was originally focused,\n\t\t\t\t// and the row that is now in focus.\n\t\t\t\tonFocusRow( event, activeRow, rows[ nextRowIndex ] );\n\n\t\t\t\t// Prevent key use for anything else. This ensures Voiceover\n\t\t\t\t// doesn't try to handle key navigation.\n\t\t\t\tevent.preventDefault();\n\t\t\t} else if ( ( [ HOME, END ] as number[] ).includes( keyCode ) ) {\n\t\t\t\t// Calculate the rowIndex of the next row.\n\t\t\t\tconst rows = Array.from(\n\t\t\t\t\ttreeGridElement.querySelectorAll< HTMLElement >(\n\t\t\t\t\t\t'[role=\"row\"]'\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\tconst currentRowIndex = rows.indexOf( activeRow );\n\t\t\t\tlet nextRowIndex;\n\n\t\t\t\tif ( keyCode === HOME ) {\n\t\t\t\t\tnextRowIndex = 0;\n\t\t\t\t} else {\n\t\t\t\t\tnextRowIndex = rows.length - 1;\n\t\t\t\t}\n\n\t\t\t\t// Focus is either at the top or bottom edge of the grid. Do nothing.\n\t\t\t\tif ( nextRowIndex === currentRowIndex ) {\n\t\t\t\t\t// Prevent key use for anything else. For example, Voiceover\n\t\t\t\t\t// will start navigating horizontally when reaching the vertical\n\t\t\t\t\t// bounds of a table.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Get the focusables in the next row.\n\t\t\t\tconst focusablesInNextRow = getRowFocusables(\n\t\t\t\t\trows[ nextRowIndex ]\n\t\t\t\t);\n\n\t\t\t\t// If for some reason there are no focusables in the next row, do nothing.\n\t\t\t\tif ( ! focusablesInNextRow || ! focusablesInNextRow.length ) {\n\t\t\t\t\t// Prevent key use for anything else. For example, Voiceover\n\t\t\t\t\t// will still focus text when using arrow keys, while this\n\t\t\t\t\t// component should limit navigation to focusables.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Try to focus the element in the next row that's at a similar column to the activeElement.\n\t\t\t\tconst nextIndex = Math.min(\n\t\t\t\t\tcurrentColumnIndex,\n\t\t\t\t\tfocusablesInNextRow.length - 1\n\t\t\t\t);\n\t\t\t\tfocusablesInNextRow[ nextIndex ].focus();\n\n\t\t\t\t// Let consumers know the row that was originally focused,\n\t\t\t\t// and the row that is now in focus.\n\t\t\t\tonFocusRow( event, activeRow, rows[ nextRowIndex ] );\n\n\t\t\t\t// Prevent key use for anything else. This ensures Voiceover\n\t\t\t\t// doesn't try to handle key navigation.\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\t[ onExpandRow, onCollapseRow, onFocusRow ]\n\t);\n\n\t/* Disable reason: A treegrid is implemented using a table element. */\n\t/* eslint-disable jsx-a11y/no-noninteractive-element-to-interactive-role */\n\treturn (\n\t\t<RovingTabIndexContainer>\n\t\t\t{\n\t\t\t\t// Prevent browser mode from triggering in NVDA by wrapping List View\n\t\t\t\t// in a role=application wrapper.\n\t\t\t\t// see: https://github.com/WordPress/gutenberg/issues/43729\n\t\t\t }\n\t\t\t<div role=\"application\" aria-label={ applicationAriaLabel }>\n\t\t\t\t<table\n\t\t\t\t\t{ ...props }\n\t\t\t\t\trole=\"treegrid\"\n\t\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\t\tref={ ref }\n\t\t\t\t>\n\t\t\t\t\t<tbody>{ children }</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t</RovingTabIndexContainer>\n\t);\n\t/* eslint-enable jsx-a11y/no-noninteractive-element-to-interactive-role */\n}\n\n/**\n * `TreeGrid` is used to create a tree hierarchy.\n * It is not a visually styled component, but instead helps with adding\n * keyboard navigation and roving tab index behaviors to tree grid structures.\n *\n * A tree grid is a hierarchical 2 dimensional UI component, for example it could be\n * used to implement a file system browser.\n *\n * A tree grid allows the user to navigate using arrow keys.\n * Up/down to navigate vertically across rows, and left/right to navigate horizontally\n * between focusables in a row.\n *\n * The `TreeGrid` renders both a `table` and `tbody` element, and is intended to be used\n * with `TreeGridRow` (`tr`) and `TreeGridCell` (`td`) to build out a grid.\n *\n * ```jsx\n * function TreeMenu() {\n * \treturn (\n * \t\t<TreeGrid>\n * \t\t\t<TreeGridRow level={ 1 } positionInSet={ 1 } setSize={ 2 }>\n * \t\t\t\t<TreeGridCell>\n * \t\t\t\t\t{ ( props ) => (\n * \t\t\t\t\t\t<Button onClick={ onSelect } { ...props }>Select</Button>\n * \t\t\t\t\t) }\n * \t\t\t\t</TreeGridCell>\n * \t\t\t\t<TreeGridCell>\n * \t\t\t\t\t{ ( props ) => (\n * \t\t\t\t\t\t<Button onClick={ onMove } { ...props }>Move</Button>\n * \t\t\t\t\t) }\n * \t\t\t\t</TreeGridCell>\n * \t\t\t</TreeGridRow>\n * \t\t\t<TreeGridRow level={ 1 } positionInSet={ 2 } setSize={ 2 }>\n * \t\t\t\t<TreeGridCell>\n * \t\t\t\t\t{ ( props ) => (\n * \t\t\t\t\t\t<Button onClick={ onSelect } { ...props }>Select</Button>\n * \t\t\t\t\t) }\n * \t\t\t\t</TreeGridCell>\n * \t\t\t\t<TreeGridCell>\n * \t\t\t\t\t{ ( props ) => (\n * \t\t\t\t\t\t<Button onClick={ onMove } { ...props }>Move</Button>\n * \t\t\t\t\t) }\n * \t\t\t\t</TreeGridCell>\n * \t\t\t</TreeGridRow>\n * \t\t\t<TreeGridRow level={ 2 } positionInSet={ 1 } setSize={ 1 }>\n * \t\t\t\t<TreeGridCell>\n * \t\t\t\t\t{ ( props ) => (\n * \t\t\t\t\t\t<Button onClick={ onSelect } { ...props }>Select</Button>\n * \t\t\t\t\t) }\n * \t\t\t\t</TreeGridCell>\n * \t\t\t\t<TreeGridCell>\n * \t\t\t\t\t{ ( props ) => (\n * \t\t\t\t\t\t<Button onClick={ onMove } { ...props }>Move</Button>\n * \t\t\t\t\t) }\n * \t\t\t\t</TreeGridCell>\n * \t\t\t</TreeGridRow>\n * \t\t</TreeGrid>\n * \t);\n * }\n * ```\n *\n * @see {@link https://www.w3.org/TR/wai-aria-practices/examples/treegrid/treegrid-1.html}\n */\nexport const TreeGrid = forwardRef( UnforwardedTreeGrid );\n\nexport default TreeGrid;\nexport { default as TreeGridRow } from './row';\nexport { default as TreeGridCell } from './cell';\nexport { default as TreeGridItem } from './item';\n","/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport type { TreeGridRowProps } from './types';\n\nfunction UnforwardedTreeGridRow(\n\t{\n\t\tchildren,\n\t\tlevel,\n\t\tpositionInSet,\n\t\tsetSize,\n\t\tisExpanded,\n\t\t...props\n\t}: WordPressComponentProps< TreeGridRowProps, 'tr', false >,\n\tref: React.ForwardedRef< HTMLTableRowElement >\n) {\n\treturn (\n\t\t<tr\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t\trole=\"row\"\n\t\t\taria-level={ level }\n\t\t\taria-posinset={ positionInSet }\n\t\t\taria-setsize={ setSize }\n\t\t\taria-expanded={ isExpanded }\n\t\t>\n\t\t\t{ children }\n\t\t</tr>\n\t);\n}\n\n/**\n * `TreeGridRow` is used to create a tree hierarchy.\n * It is not a visually styled component, but instead helps with adding\n * keyboard navigation and roving tab index behaviors to tree grid structures.\n *\n * @see {@link https://www.w3.org/TR/wai-aria-practices/examples/treegrid/treegrid-1.html}\n */\nexport const TreeGridRow = forwardRef( UnforwardedTreeGridRow );\n\nexport default TreeGridRow;\n","/**\n * WordPress dependencies\n */\nimport { useRef, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useRovingTabIndexContext } from './roving-tab-index-context';\nimport type { RovingTabIndexItemProps } from './types';\n\nexport const RovingTabIndexItem = forwardRef(\n\tfunction UnforwardedRovingTabIndexItem(\n\t\t{ children, as: Component, ...props }: RovingTabIndexItemProps,\n\t\tforwardedRef: React.ForwardedRef< any >\n\t) {\n\t\tconst localRef = useRef< any >();\n\t\tconst ref = forwardedRef || localRef;\n\t\t// @ts-expect-error - We actually want to throw an error if this is undefined.\n\t\tconst { lastFocusedElement, setLastFocusedElement } =\n\t\t\tuseRovingTabIndexContext();\n\t\tlet tabIndex;\n\n\t\tif ( lastFocusedElement ) {\n\t\t\ttabIndex =\n\t\t\t\tlastFocusedElement ===\n\t\t\t\t// TODO: The original implementation simply used `ref.current` here, assuming\n\t\t\t\t// that a forwarded ref would always be an object, which is not necessarily true.\n\t\t\t\t// This workaround maintains the original runtime behavior in a type-safe way,\n\t\t\t\t// but should be revisited.\n\t\t\t\t( 'current' in ref ? ref.current : undefined )\n\t\t\t\t\t? 0\n\t\t\t\t\t: -1;\n\t\t}\n\n\t\tconst onFocus: React.FocusEventHandler< HTMLElement > = ( event ) =>\n\t\t\tsetLastFocusedElement?.( event.target );\n\t\tconst allProps = { ref, tabIndex, onFocus, ...props };\n\n\t\tif ( typeof children === 'function' ) {\n\t\t\treturn children( allProps );\n\t\t}\n\n\t\tif ( ! Component ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn <Component { ...allProps }>{ children }</Component>;\n\t}\n);\n\nexport default RovingTabIndexItem;\n","/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport RovingTabIndexItem from './roving-tab-index-item';\nimport type { RovingTabIndexItemProps } from './types';\n\nfunction UnforwardedTreeGridItem(\n\t{ children, ...props }: RovingTabIndexItemProps,\n\tref: React.ForwardedRef< any >\n) {\n\treturn (\n\t\t<RovingTabIndexItem ref={ ref } { ...props }>\n\t\t\t{ children }\n\t\t</RovingTabIndexItem>\n\t);\n}\n\n/**\n * `TreeGridItem` is used to create a tree hierarchy.\n * It is not a visually styled component, but instead helps with adding\n * keyboard navigation and roving tab index behaviors to tree grid structures.\n *\n * @see {@link https://www.w3.org/TR/wai-aria-practices/examples/treegrid/treegrid-1.html}\n */\nexport const TreeGridItem = forwardRef( UnforwardedTreeGridItem );\n\nexport default TreeGridItem;\n","/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport TreeGridItem from './item';\nimport type { WordPressComponentProps } from '../context';\nimport type { TreeGridCellProps } from './types';\n\nfunction UnforwardedTreeGridCell(\n\t{\n\t\tchildren,\n\t\twithoutGridItem = false,\n\t\t...props\n\t}: WordPressComponentProps< TreeGridCellProps, 'td', false >,\n\tref: React.ForwardedRef< any >\n) {\n\treturn (\n\t\t<td { ...props } role=\"gridcell\">\n\t\t\t{ withoutGridItem ? (\n\t\t\t\t<>\n\t\t\t\t\t{ typeof children === 'function'\n\t\t\t\t\t\t? children( { ...props, ref } )\n\t\t\t\t\t\t: children }\n\t\t\t\t</>\n\t\t\t) : (\n\t\t\t\t<TreeGridItem ref={ ref }>{ children }</TreeGridItem>\n\t\t\t) }\n\t\t</td>\n\t);\n}\n\n/**\n * `TreeGridCell` is used to create a tree hierarchy.\n * It is not a visually styled component, but instead helps with adding\n * keyboard navigation and roving tab index behaviors to tree grid structures.\n *\n * @see {@link https://www.w3.org/TR/wai-aria-practices/examples/treegrid/treegrid-1.html}\n */\nexport const TreeGridCell = forwardRef( UnforwardedTreeGridCell );\n\nexport default TreeGridCell;\n","/**\n * External dependencies\n */\nimport type { ComponentPropsWithoutRef, MouseEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\nfunction stopPropagation( event: MouseEvent ) {\n\tevent.stopPropagation();\n}\n\ntype DivProps = ComponentPropsWithoutRef< 'div' >;\n\nconst IsolatedEventContainer = forwardRef< HTMLDivElement, DivProps >(\n\t( props, ref ) => {\n\t\tdeprecated( 'wp.components.IsolatedEventContainer', {\n\t\t\tsince: '5.7',\n\t\t} );\n\n\t\t// Disable reason: this stops certain events from propagating outside of the component.\n\t\t// - onMouseDown is disabled as this can cause interactions with other DOM elements.\n\t\t/* eslint-disable jsx-a11y/no-static-element-interactions */\n\t\treturn <div { ...props } ref={ ref } onMouseDown={ stopPropagation } />;\n\t\t/* eslint-enable jsx-a11y/no-static-element-interactions */\n\t}\n);\n\nexport default IsolatedEventContainer;\n","/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\nimport { useObservableValue } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from './slot-fill-context';\nimport type { SlotKey } from '../types';\n\nexport default function useSlotFills( name: SlotKey ) {\n\tconst registry = useContext( SlotFillContext );\n\treturn useObservableValue( registry.fills, name );\n}\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\n\nexport const ZStackChildView = styled.div< {\n\toffsetAmount: number;\n\tzIndex: number;\n} >`\n\t&:not( :first-of-type ) {\n\t\t${ ( { offsetAmount } ) =>\n\t\t\tcss( {\n\t\t\t\tmarginInlineStart: offsetAmount,\n\t\t\t} ) };\n\t}\n\n\t${ ( { zIndex } ) => css( { zIndex } ) };\n`;\n\nexport const ZStackView = styled.div< {\n\tisLayered: boolean;\n} >`\n\tdisplay: inline-grid;\n\tgrid-auto-flow: column;\n\tposition: relative;\n\n\t& > ${ ZStackChildView } {\n\t\tposition: relative;\n\t\tjustify-self: start;\n\n\t\t${ ( { isLayered } ) =>\n\t\t\tisLayered\n\t\t\t\t? // When `isLayered` is true, all items overlap in the same grid cell\n\t\t\t\t css( { gridRowStart: 1, gridColumnStart: 1 } )\n\t\t\t\t: undefined };\n\t}\n`;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { isValidElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { getValidChildren } from '../utils/get-valid-children';\nimport { contextConnect, useContextSystem } from '../context';\nimport { ZStackView, ZStackChildView } from './styles';\nimport type { ZStackProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nfunction UnconnectedZStack(\n\tprops: WordPressComponentProps< ZStackProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst {\n\t\tchildren,\n\t\tclassName,\n\t\tisLayered = true,\n\t\tisReversed = false,\n\t\toffset = 0,\n\t\t...otherProps\n\t} = useContextSystem( props, 'ZStack' );\n\n\tconst validChildren = getValidChildren( children );\n\tconst childrenLastIndex = validChildren.length - 1;\n\n\tconst clonedChildren = validChildren.map( ( child, index ) => {\n\t\tconst zIndex = isReversed ? childrenLastIndex - index : index;\n\t\t// Only when the component is layered, the offset needs to be multiplied by\n\t\t// the item's index, so that items can correctly stack at the right distance\n\t\tconst offsetAmount = isLayered ? offset * index : offset;\n\n\t\tconst key = isValidElement( child ) ? child.key : index;\n\n\t\treturn (\n\t\t\t<ZStackChildView\n\t\t\t\toffsetAmount={ offsetAmount }\n\t\t\t\tzIndex={ zIndex }\n\t\t\t\tkey={ key }\n\t\t\t>\n\t\t\t\t{ child }\n\t\t\t</ZStackChildView>\n\t\t);\n\t} );\n\n\treturn (\n\t\t<ZStackView\n\t\t\t{ ...otherProps }\n\t\t\tclassName={ className }\n\t\t\tisLayered={ isLayered }\n\t\t\tref={ forwardedRef }\n\t\t>\n\t\t\t{ clonedChildren }\n\t\t</ZStackView>\n\t);\n}\n\n/**\n * `ZStack` allows you to stack things along the Z-axis.\n *\n * ```jsx\n * import { __experimentalZStack as ZStack } from '@wordpress/components';\n *\n * function Example() {\n * return (\n * <ZStack offset={ 20 } isLayered>\n * <ExampleImage />\n * <ExampleImage />\n * <ExampleImage />\n * </ZStack>\n * );\n * }\n * ```\n */\nexport const ZStack = contextConnect( UnconnectedZStack, 'ZStack' );\n\nexport default ZStack;\n","/**\n * WordPress dependencies\n */\nimport { useState, useRef } from '@wordpress/element';\nimport {\n\tcreateHigherOrderComponent,\n\tuseRefEffect,\n\tuseMergeRefs,\n} from '@wordpress/compose';\nimport { isKeyboardEvent } from '@wordpress/keycodes';\nimport type { WPKeycodeModifier } from '@wordpress/keycodes';\n\nconst defaultShortcuts = {\n\tprevious: [\n\t\t{\n\t\t\tmodifier: 'ctrlShift',\n\t\t\tcharacter: '`',\n\t\t},\n\t\t{\n\t\t\tmodifier: 'ctrlShift',\n\t\t\tcharacter: '~',\n\t\t},\n\t\t{\n\t\t\tmodifier: 'access',\n\t\t\tcharacter: 'p',\n\t\t},\n\t] as const,\n\tnext: [\n\t\t{\n\t\t\tmodifier: 'ctrl',\n\t\t\tcharacter: '`',\n\t\t},\n\t\t{\n\t\t\tmodifier: 'access',\n\t\t\tcharacter: 'n',\n\t\t},\n\t] as const,\n};\n\ntype Shortcuts = {\n\tprevious: readonly { modifier: WPKeycodeModifier; character: string }[];\n\tnext: readonly { modifier: WPKeycodeModifier; character: string }[];\n};\n\nexport function useNavigateRegions( shortcuts: Shortcuts = defaultShortcuts ) {\n\tconst ref = useRef< HTMLDivElement >( null );\n\tconst [ isFocusingRegions, setIsFocusingRegions ] = useState( false );\n\n\tfunction focusRegion( offset: number ) {\n\t\tconst regions = Array.from(\n\t\t\tref.current?.querySelectorAll< HTMLElement >(\n\t\t\t\t'[role=\"region\"][tabindex=\"-1\"]'\n\t\t\t) ?? []\n\t\t);\n\t\tif ( ! regions.length ) {\n\t\t\treturn;\n\t\t}\n\t\tlet nextRegion = regions[ 0 ];\n\t\t// Based off the current element, use closest to determine the wrapping region since this operates up the DOM. Also, match tabindex to avoid edge cases with regions we do not want.\n\t\tconst wrappingRegion =\n\t\t\tref.current?.ownerDocument?.activeElement?.closest< HTMLElement >(\n\t\t\t\t'[role=\"region\"][tabindex=\"-1\"]'\n\t\t\t);\n\t\tconst selectedIndex = wrappingRegion\n\t\t\t? regions.indexOf( wrappingRegion )\n\t\t\t: -1;\n\t\tif ( selectedIndex !== -1 ) {\n\t\t\tlet nextIndex = selectedIndex + offset;\n\t\t\tnextIndex = nextIndex === -1 ? regions.length - 1 : nextIndex;\n\t\t\tnextIndex = nextIndex === regions.length ? 0 : nextIndex;\n\t\t\tnextRegion = regions[ nextIndex ];\n\t\t}\n\n\t\tnextRegion.focus();\n\t\tsetIsFocusingRegions( true );\n\t}\n\n\tconst clickRef = useRefEffect(\n\t\t( element ) => {\n\t\t\tfunction onClick() {\n\t\t\t\tsetIsFocusingRegions( false );\n\t\t\t}\n\n\t\t\telement.addEventListener( 'click', onClick );\n\n\t\t\treturn () => {\n\t\t\t\telement.removeEventListener( 'click', onClick );\n\t\t\t};\n\t\t},\n\t\t[ setIsFocusingRegions ]\n\t);\n\n\treturn {\n\t\tref: useMergeRefs( [ ref, clickRef ] ),\n\t\tclassName: isFocusingRegions ? 'is-focusing-regions' : '',\n\t\tonKeyDown( event: React.KeyboardEvent< HTMLDivElement > ) {\n\t\t\tif (\n\t\t\t\tshortcuts.previous.some( ( { modifier, character } ) => {\n\t\t\t\t\treturn isKeyboardEvent[ modifier ]( event, character );\n\t\t\t\t} )\n\t\t\t) {\n\t\t\t\tfocusRegion( -1 );\n\t\t\t} else if (\n\t\t\t\tshortcuts.next.some( ( { modifier, character } ) => {\n\t\t\t\t\treturn isKeyboardEvent[ modifier ]( event, character );\n\t\t\t\t} )\n\t\t\t) {\n\t\t\t\tfocusRegion( 1 );\n\t\t\t}\n\t\t},\n\t};\n}\n\n/**\n * `navigateRegions` is a React [higher-order component](https://facebook.github.io/react/docs/higher-order-components.html)\n * adding keyboard navigation to switch between the different DOM elements marked as \"regions\" (role=\"region\").\n * These regions should be focusable (By adding a tabIndex attribute for example). For better accessibility,\n * these elements must be properly labelled to briefly describe the purpose of the content in the region.\n * For more details, see \"Landmark Roles\" in the [WAI-ARIA specification](https://www.w3.org/TR/wai-aria/)\n * and \"Landmark Regions\" in the [ARIA Authoring Practices Guide](https://www.w3.org/WAI/ARIA/apg/practices/landmark-regions/).\n *\n * ```jsx\n * import { navigateRegions } from '@wordpress/components';\n *\n * const MyComponentWithNavigateRegions = navigateRegions( () => (\n * \t<div>\n * \t\t<div role=\"region\" tabIndex=\"-1\" aria-label=\"Header\">\n * \t\t\tHeader\n * \t\t</div>\n * \t\t<div role=\"region\" tabIndex=\"-1\" aria-label=\"Content\">\n * \t\t\tContent\n * \t\t</div>\n * \t\t<div role=\"region\" tabIndex=\"-1\" aria-label=\"Sidebar\">\n * \t\t\tSidebar\n * \t\t</div>\n * \t</div>\n * ) );\n * ```\n */\nexport default createHigherOrderComponent(\n\t( Component ) =>\n\t\t( { shortcuts, ...props } ) => (\n\t\t\t<div { ...useNavigateRegions( shortcuts ) }>\n\t\t\t\t<Component { ...props } />\n\t\t\t</div>\n\t\t),\n\t'navigateRegions'\n);\n","/**\n * WordPress dependencies\n */\nimport {\n\tcreateHigherOrderComponent,\n\tuseConstrainedTabbing,\n} from '@wordpress/compose';\n\n/**\n * `withConstrainedTabbing` is a React [higher-order component](https://facebook.github.io/react/docs/higher-order-components.html)\n * adding the ability to constrain keyboard navigation with the Tab key within a component.\n * For accessibility reasons, some UI components need to constrain Tab navigation, for example\n * modal dialogs or similar UI. Use of this component is recommended only in cases where a way to\n * navigate away from the wrapped component is implemented by other means, usually by pressing\n * the Escape key or using a specific UI control, e.g. a \"Close\" button.\n */\nconst withConstrainedTabbing = createHigherOrderComponent(\n\t( WrappedComponent ) =>\n\t\tfunction ComponentWithConstrainedTabbing( props ) {\n\t\t\tconst ref = useConstrainedTabbing();\n\t\t\treturn (\n\t\t\t\t<div ref={ ref } tabIndex={ -1 }>\n\t\t\t\t\t<WrappedComponent { ...props } />\n\t\t\t\t</div>\n\t\t\t);\n\t\t},\n\t'withConstrainedTabbing'\n);\n\nexport default withConstrainedTabbing;\n","/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal/es6';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { createHigherOrderComponent } from '@wordpress/compose';\n\ntype Props = {\n\tnode?: HTMLElement;\n\t[ key: string ]: any;\n};\n\ntype State = {\n\tfallbackStyles?: { [ key: string ]: any };\n\tgrabStylesCompleted: boolean;\n};\n\nexport default (\n\tmapNodeToProps: (\n\t\tnode: HTMLElement,\n\t\tprops: Props\n\t) => { [ key: string ]: any }\n) =>\n\tcreateHigherOrderComponent( ( WrappedComponent ) => {\n\t\treturn class extends Component< Props, State > {\n\t\t\tnodeRef?: HTMLElement;\n\n\t\t\tconstructor( props: Props ) {\n\t\t\t\tsuper( props );\n\t\t\t\tthis.nodeRef = this.props.node;\n\t\t\t\tthis.state = {\n\t\t\t\t\tfallbackStyles: undefined,\n\t\t\t\t\tgrabStylesCompleted: false,\n\t\t\t\t};\n\n\t\t\t\tthis.bindRef = this.bindRef.bind( this );\n\t\t\t}\n\n\t\t\tbindRef( node: HTMLDivElement ) {\n\t\t\t\tif ( ! node ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.nodeRef = node;\n\t\t\t}\n\n\t\t\tcomponentDidMount() {\n\t\t\t\tthis.grabFallbackStyles();\n\t\t\t}\n\n\t\t\tcomponentDidUpdate() {\n\t\t\t\tthis.grabFallbackStyles();\n\t\t\t}\n\n\t\t\tgrabFallbackStyles() {\n\t\t\t\tconst { grabStylesCompleted, fallbackStyles } = this.state;\n\t\t\t\tif ( this.nodeRef && ! grabStylesCompleted ) {\n\t\t\t\t\tconst newFallbackStyles = mapNodeToProps(\n\t\t\t\t\t\tthis.nodeRef,\n\t\t\t\t\t\tthis.props\n\t\t\t\t\t);\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t! fastDeepEqual( newFallbackStyles, fallbackStyles )\n\t\t\t\t\t) {\n\t\t\t\t\t\tthis.setState( {\n\t\t\t\t\t\t\tfallbackStyles: newFallbackStyles,\n\t\t\t\t\t\t\tgrabStylesCompleted:\n\t\t\t\t\t\t\t\tObject.values( newFallbackStyles ).every(\n\t\t\t\t\t\t\t\t\tBoolean\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\trender() {\n\t\t\t\tconst wrappedComponent = (\n\t\t\t\t\t<WrappedComponent\n\t\t\t\t\t\t{ ...this.props }\n\t\t\t\t\t\t{ ...this.state.fallbackStyles }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t\treturn this.props.node ? (\n\t\t\t\t\twrappedComponent\n\t\t\t\t) : (\n\t\t\t\t\t<div ref={ this.bindRef }> { wrappedComponent } </div>\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\t}, 'withFallbackStyles' );\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"hooks\"];","/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { addAction, applyFilters, removeAction } from '@wordpress/hooks';\nimport { createHigherOrderComponent, debounce } from '@wordpress/compose';\n\nconst ANIMATION_FRAME_PERIOD = 16;\n\n/**\n * Creates a higher-order component which adds filtering capability to the\n * wrapped component. Filters get applied when the original component is about\n * to be mounted. When a filter is added or removed that matches the hook name,\n * the wrapped component re-renders.\n *\n * @param hookName Hook name exposed to be used by filters.\n *\n * @return Higher-order component factory.\n *\n * ```jsx\n * import { withFilters } from '@wordpress/components';\n * import { addFilter } from '@wordpress/hooks';\n *\n * const MyComponent = ( { title } ) => <h1>{ title }</h1>;\n *\n * const ComponentToAppend = () => <div>Appended component</div>;\n *\n * function withComponentAppended( FilteredComponent ) {\n * \treturn ( props ) => (\n * \t\t<>\n * \t\t\t<FilteredComponent { ...props } />\n * \t\t\t<ComponentToAppend />\n * \t\t</>\n * \t);\n * }\n *\n * addFilter(\n * \t'MyHookName',\n * \t'my-plugin/with-component-appended',\n * \twithComponentAppended\n * );\n *\n * const MyComponentWithFilters = withFilters( 'MyHookName' )( MyComponent );\n * ```\n */\nexport default function withFilters( hookName: string ) {\n\treturn createHigherOrderComponent( ( OriginalComponent ) => {\n\t\tconst namespace = 'core/with-filters/' + hookName;\n\n\t\t/**\n\t\t * The component definition with current filters applied. Each instance\n\t\t * reuse this shared reference as an optimization to avoid excessive\n\t\t * calls to `applyFilters` when many instances exist.\n\t\t */\n\t\tlet FilteredComponent: React.ComponentType;\n\n\t\t/**\n\t\t * Initializes the FilteredComponent variable once, if not already\n\t\t * assigned. Subsequent calls are effectively a noop.\n\t\t */\n\t\tfunction ensureFilteredComponent() {\n\t\t\tif ( FilteredComponent === undefined ) {\n\t\t\t\tFilteredComponent = applyFilters(\n\t\t\t\t\thookName,\n\t\t\t\t\tOriginalComponent\n\t\t\t\t) as React.ComponentType;\n\t\t\t}\n\t\t}\n\n\t\tclass FilteredComponentRenderer extends Component {\n\t\t\tstatic instances: FilteredComponentRenderer[];\n\n\t\t\tconstructor( props: { [ key: string ]: any } ) {\n\t\t\t\tsuper( props );\n\n\t\t\t\tensureFilteredComponent();\n\t\t\t}\n\n\t\t\tcomponentDidMount() {\n\t\t\t\tFilteredComponentRenderer.instances.push( this );\n\n\t\t\t\t// If there were previously no mounted instances for components\n\t\t\t\t// filtered on this hook, add the hook handler.\n\t\t\t\tif ( FilteredComponentRenderer.instances.length === 1 ) {\n\t\t\t\t\taddAction( 'hookRemoved', namespace, onHooksUpdated );\n\t\t\t\t\taddAction( 'hookAdded', namespace, onHooksUpdated );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcomponentWillUnmount() {\n\t\t\t\tFilteredComponentRenderer.instances =\n\t\t\t\t\tFilteredComponentRenderer.instances.filter(\n\t\t\t\t\t\t( instance ) => instance !== this\n\t\t\t\t\t);\n\n\t\t\t\t// If this was the last of the mounted components filtered on\n\t\t\t\t// this hook, remove the hook handler.\n\t\t\t\tif ( FilteredComponentRenderer.instances.length === 0 ) {\n\t\t\t\t\tremoveAction( 'hookRemoved', namespace );\n\t\t\t\t\tremoveAction( 'hookAdded', namespace );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\trender() {\n\t\t\t\treturn <FilteredComponent { ...this.props } />;\n\t\t\t}\n\t\t}\n\n\t\tFilteredComponentRenderer.instances = [];\n\n\t\t/**\n\t\t * Updates the FilteredComponent definition, forcing a render for each\n\t\t * mounted instance. This occurs a maximum of once per animation frame.\n\t\t */\n\t\tconst throttledForceUpdate = debounce( () => {\n\t\t\t// Recreate the filtered component, only after delay so that it's\n\t\t\t// computed once, even if many filters added.\n\t\t\tFilteredComponent = applyFilters(\n\t\t\t\thookName,\n\t\t\t\tOriginalComponent\n\t\t\t) as React.ComponentType;\n\n\t\t\t// Force each instance to render.\n\t\t\tFilteredComponentRenderer.instances.forEach( ( instance ) => {\n\t\t\t\tinstance.forceUpdate();\n\t\t\t} );\n\t\t}, ANIMATION_FRAME_PERIOD );\n\n\t\t/**\n\t\t * When a filter is added or removed for the matching hook name, each\n\t\t * mounted instance should re-render with the new filters having been\n\t\t * applied to the original component.\n\t\t *\n\t\t * @param updatedHookName Name of the hook that was updated.\n\t\t */\n\t\tfunction onHooksUpdated( updatedHookName: string ) {\n\t\t\tif ( updatedHookName === hookName ) {\n\t\t\t\tthrottledForceUpdate();\n\t\t\t}\n\t\t}\n\n\t\treturn FilteredComponentRenderer;\n\t}, 'withFilters' );\n}\n","/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { createHigherOrderComponent, useFocusReturn } from '@wordpress/compose';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Returns true if the given object is component-like. An object is component-\n * like if it is an instance of wp.element.Component, or is a function.\n *\n * @param object Object to test.\n *\n * @return Whether object is component-like.\n */\nfunction isComponentLike( object: any ): object is React.ComponentType {\n\treturn object instanceof Component || typeof object === 'function';\n}\n\ntype Props = {\n\tonFocusReturn?: () => void;\n};\n\n/**\n * Higher Order Component used to be used to wrap disposable elements like\n * sidebars, modals, dropdowns. When mounting the wrapped component, we track a\n * reference to the current active element so we know where to restore focus\n * when the component is unmounted.\n *\n * @param options The component to be enhanced with\n * focus return behavior, or an object\n * describing the component and the\n * focus return characteristics.\n *\n * @return Higher Order Component with the focus restoration behaviour.\n */\nexport default createHigherOrderComponent(\n\t// @ts-expect-error TODO: Reconcile with intended `createHigherOrderComponent` types\n\t( options: React.ComponentType | Record< string, unknown > ) => {\n\t\tconst HoC =\n\t\t\t( { onFocusReturn }: Props = {} ) =>\n\t\t\t( WrappedComponent: React.ComponentType ) => {\n\t\t\t\tconst WithFocusReturn = (\n\t\t\t\t\tprops: Record< string, unknown >\n\t\t\t\t) => {\n\t\t\t\t\tconst ref = useFocusReturn( onFocusReturn );\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<div ref={ ref }>\n\t\t\t\t\t\t\t<WrappedComponent { ...props } />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t);\n\t\t\t\t};\n\n\t\t\t\treturn WithFocusReturn;\n\t\t\t};\n\n\t\tif ( isComponentLike( options ) ) {\n\t\t\tconst WrappedComponent = options;\n\t\t\treturn HoC()( WrappedComponent );\n\t\t}\n\n\t\treturn HoC( options );\n\t},\n\t'withFocusReturn'\n);\n\nexport const Provider = ( { children }: { children: React.ReactNode } ) => {\n\tdeprecated( 'wp.components.FocusReturnProvider component', {\n\t\tsince: '5.7',\n\t\thint: 'This provider is not used anymore. You can just remove it from your codebase',\n\t} );\n\n\treturn children;\n};\n","/**\n * External dependencies\n */\nimport { v4 as uuid } from 'uuid';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useState, useMemo } from '@wordpress/element';\nimport { createHigherOrderComponent } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport NoticeList from '../../notice/list';\nimport type { WithNoticeProps } from './types';\n\n/**\n * Override the default edit UI to include notices if supported.\n *\n * Wrapping the original component with `withNotices` encapsulates the component\n * with the additional props `noticeOperations` and `noticeUI`.\n *\n * ```jsx\n * import { withNotices, Button } from '@wordpress/components';\n *\n * const MyComponentWithNotices = withNotices(\n * \t( { noticeOperations, noticeUI } ) => {\n * \t\tconst addError = () =>\n * \t\t\tnoticeOperations.createErrorNotice( 'Error message' );\n * \t\treturn (\n * \t\t\t<div>\n * \t\t\t\t{ noticeUI }\n * \t\t\t\t<Button variant=\"secondary\" onClick={ addError }>\n * \t\t\t\t\tAdd error\n * \t\t\t\t</Button>\n * \t\t\t</div>\n * \t\t);\n * \t}\n * );\n * ```\n *\n * @param OriginalComponent Original component.\n *\n * @return Wrapped component.\n */\nexport default createHigherOrderComponent( ( OriginalComponent ) => {\n\tfunction Component(\n\t\tprops: { [ key: string ]: any },\n\t\tref: React.ForwardedRef< any >\n\t) {\n\t\tconst [ noticeList, setNoticeList ] = useState<\n\t\t\tWithNoticeProps[ 'noticeList' ]\n\t\t>( [] );\n\n\t\tconst noticeOperations = useMemo<\n\t\t\tWithNoticeProps[ 'noticeOperations' ]\n\t\t>( () => {\n\t\t\tconst createNotice: WithNoticeProps[ 'noticeOperations' ][ 'createNotice' ] =\n\t\t\t\t( notice ) => {\n\t\t\t\t\tconst noticeToAdd = notice.id\n\t\t\t\t\t\t? notice\n\t\t\t\t\t\t: { ...notice, id: uuid() };\n\t\t\t\t\tsetNoticeList( ( current ) => [ ...current, noticeToAdd ] );\n\t\t\t\t};\n\n\t\t\treturn {\n\t\t\t\tcreateNotice,\n\t\t\t\tcreateErrorNotice: ( msg ) => {\n\t\t\t\t\t// @ts-expect-error TODO: Missing `id`, potentially a bug\n\t\t\t\t\tcreateNotice( {\n\t\t\t\t\t\tstatus: 'error',\n\t\t\t\t\t\tcontent: msg,\n\t\t\t\t\t} );\n\t\t\t\t},\n\t\t\t\tremoveNotice: ( id ) => {\n\t\t\t\t\tsetNoticeList( ( current ) =>\n\t\t\t\t\t\tcurrent.filter( ( notice ) => notice.id !== id )\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\tremoveAllNotices: () => {\n\t\t\t\t\tsetNoticeList( [] );\n\t\t\t\t},\n\t\t\t};\n\t\t}, [] );\n\n\t\tconst propsOut = {\n\t\t\t...props,\n\t\t\tnoticeList,\n\t\t\tnoticeOperations,\n\t\t\tnoticeUI: noticeList.length > 0 && (\n\t\t\t\t<NoticeList\n\t\t\t\t\tclassName=\"components-with-notices-ui\"\n\t\t\t\t\tnotices={ noticeList }\n\t\t\t\t\tonRemove={ noticeOperations.removeNotice }\n\t\t\t\t/>\n\t\t\t),\n\t\t};\n\n\t\treturn isForwardRef ? (\n\t\t\t<OriginalComponent { ...propsOut } ref={ ref } />\n\t\t) : (\n\t\t\t<OriginalComponent { ...propsOut } />\n\t\t);\n\t}\n\n\tlet isForwardRef: boolean;\n\t// @ts-expect-error - `render` will only be present when OriginalComponent was wrapped with forwardRef().\n\tconst { render } = OriginalComponent;\n\t// Returns a forwardRef if OriginalComponent appears to be a forwardRef.\n\tif ( typeof render === 'function' ) {\n\t\tisForwardRef = true;\n\t\treturn forwardRef( Component );\n\t}\n\treturn Component;\n}, 'withNotices' );\n","\"use client\";\nimport {\n MenubarContextProvider,\n MenubarScopedContextProvider,\n useMenubarContext,\n useMenubarProviderContext,\n useMenubarScopedContext\n} from \"./62UHHO2X.js\";\nimport {\n CompositeContextProvider,\n CompositeScopedContextProvider\n} from \"./P7GR5CS5.js\";\nimport {\n HovercardContextProvider,\n HovercardScopedContextProvider\n} from \"./EM5CXX6A.js\";\nimport {\n createStoreContext\n} from \"./LMDWO4NN.js\";\n\n// src/menu/menu-context.tsx\nimport { createContext } from \"react\";\nvar menu = createStoreContext(\n [CompositeContextProvider, HovercardContextProvider],\n [CompositeScopedContextProvider, HovercardScopedContextProvider]\n);\nvar useMenuContext = menu.useContext;\nvar useMenuScopedContext = menu.useScopedContext;\nvar useMenuProviderContext = menu.useProviderContext;\nvar MenuContextProvider = menu.ContextProvider;\nvar MenuScopedContextProvider = menu.ScopedContextProvider;\nvar useMenuBarContext = useMenubarContext;\nvar useMenuBarScopedContext = useMenubarScopedContext;\nvar useMenuBarProviderContext = useMenubarProviderContext;\nvar MenuBarContextProvider = MenubarContextProvider;\nvar MenuBarScopedContextProvider = MenubarScopedContextProvider;\nvar MenuItemCheckedContext = createContext(\n void 0\n);\n\nexport {\n useMenuContext,\n useMenuScopedContext,\n useMenuProviderContext,\n MenuContextProvider,\n MenuScopedContextProvider,\n useMenuBarContext,\n useMenuBarScopedContext,\n useMenuBarProviderContext,\n MenuBarContextProvider,\n MenuBarScopedContextProvider,\n MenuItemCheckedContext\n};\n","\"use client\";\nimport {\n CompositeContextProvider,\n CompositeScopedContextProvider\n} from \"./P7GR5CS5.js\";\nimport {\n createStoreContext\n} from \"./LMDWO4NN.js\";\n\n// src/menubar/menubar-context.tsx\nimport { createContext } from \"react\";\nvar menubar = createStoreContext(\n [CompositeContextProvider],\n [CompositeScopedContextProvider]\n);\nvar useMenubarContext = menubar.useContext;\nvar useMenubarScopedContext = menubar.useScopedContext;\nvar useMenubarProviderContext = menubar.useProviderContext;\nvar MenubarContextProvider = menubar.ContextProvider;\nvar MenubarScopedContextProvider = menubar.ScopedContextProvider;\nvar MenuItemCheckedContext = createContext(\n void 0\n);\n\nexport {\n useMenubarContext,\n useMenubarScopedContext,\n useMenubarProviderContext,\n MenubarContextProvider,\n MenubarScopedContextProvider,\n MenuItemCheckedContext\n};\n","\"use client\";\nimport {\n createHovercardStore\n} from \"../__chunks/JTLIIJ4U.js\";\nimport {\n createCompositeStore\n} from \"../__chunks/AJZ4BYF3.js\";\nimport \"../__chunks/CYQWQL4J.js\";\nimport \"../__chunks/7PRQYBBV.js\";\nimport \"../__chunks/ME2CUF3F.js\";\nimport \"../__chunks/FZZ2AVHF.js\";\nimport \"../__chunks/RCQ5P4YE.js\";\nimport {\n createStore,\n mergeStore,\n omit,\n pick,\n setup,\n sync,\n throwOnConflictingProps\n} from \"../__chunks/BCALMBPZ.js\";\nimport {\n applyState,\n defaultValue\n} from \"../__chunks/PBFD2E7P.js\";\nimport \"../__chunks/DTR5TSDJ.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"../__chunks/3YLGPPWQ.js\";\n\n// src/menu/menu-store.ts\nfunction createMenuStore(_a = {}) {\n var _b = _a, {\n combobox,\n parent,\n menubar\n } = _b, props = __objRest(_b, [\n \"combobox\",\n \"parent\",\n \"menubar\"\n ]);\n const parentIsMenubar = !!menubar && !parent;\n const store = mergeStore(\n props.store,\n pick(parent, [\"values\"]),\n omit(combobox, [\n \"arrowElement\",\n \"anchorElement\",\n \"contentElement\",\n \"popoverElement\",\n \"disclosureElement\"\n ])\n );\n throwOnConflictingProps(props, store);\n const syncState = store.getState();\n const composite = createCompositeStore(__spreadProps(__spreadValues({}, props), {\n store,\n orientation: defaultValue(\n props.orientation,\n syncState.orientation,\n \"vertical\"\n )\n }));\n const hovercard = createHovercardStore(__spreadProps(__spreadValues({}, props), {\n store,\n placement: defaultValue(\n props.placement,\n syncState.placement,\n \"bottom-start\"\n ),\n timeout: defaultValue(\n props.timeout,\n syncState.timeout,\n parentIsMenubar ? 0 : 150\n ),\n hideTimeout: defaultValue(props.hideTimeout, syncState.hideTimeout, 0)\n }));\n const initialState = __spreadProps(__spreadValues(__spreadValues({}, composite.getState()), hovercard.getState()), {\n initialFocus: defaultValue(syncState.initialFocus, \"container\"),\n values: defaultValue(\n props.values,\n syncState.values,\n props.defaultValues,\n {}\n )\n });\n const menu = createStore(initialState, composite, hovercard, store);\n setup(\n menu,\n () => sync(menu, [\"mounted\"], (state) => {\n if (state.mounted) return;\n menu.setState(\"activeId\", null);\n })\n );\n setup(\n menu,\n () => sync(parent, [\"orientation\"], (state) => {\n menu.setState(\n \"placement\",\n state.orientation === \"vertical\" ? \"right-start\" : \"bottom-start\"\n );\n })\n );\n return __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, composite), hovercard), menu), {\n combobox,\n parent,\n menubar,\n hideAll: () => {\n hovercard.hide();\n parent == null ? void 0 : parent.hideAll();\n },\n setInitialFocus: (value) => menu.setState(\"initialFocus\", value),\n setValues: (values) => menu.setState(\"values\", values),\n setValue: (name, value) => {\n if (name === \"__proto__\") return;\n if (name === \"constructor\") return;\n if (Array.isArray(name)) return;\n menu.setState(\"values\", (values) => {\n const prevValue = values[name];\n const nextValue = applyState(value, prevValue);\n if (nextValue === prevValue) return values;\n return __spreadProps(__spreadValues({}, values), {\n [name]: nextValue !== void 0 && nextValue\n });\n });\n }\n });\n}\nexport {\n createMenuStore\n};\n","/**\n * WordPress dependencies\n */\nimport { createContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { ContextProps } from './types';\n\nexport const Context = createContext< ContextProps | undefined >( undefined );\n","\"use client\";\nimport {\n useMenuScopedContext\n} from \"./B2J376ND.js\";\nimport {\n useMenubarScopedContext\n} from \"./62UHHO2X.js\";\nimport {\n useCompositeHover\n} from \"./UQQRIHDV.js\";\nimport {\n useCompositeItem\n} from \"./P2CTZE2T.js\";\nimport {\n createElement,\n createHook,\n forwardRef,\n memo\n} from \"./LMDWO4NN.js\";\nimport {\n useStoreState\n} from \"./YV4JVR4I.js\";\nimport {\n useBooleanEvent,\n useEvent\n} from \"./ABQUS43J.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/menu/menu-item.tsx\nimport { getDocument, getPopupItemRole } from \"@ariakit/core/utils/dom\";\nimport { isDownloading, isOpeningInNewTab } from \"@ariakit/core/utils/events\";\nimport { hasFocusWithin } from \"@ariakit/core/utils/focus\";\nimport { invariant } from \"@ariakit/core/utils/misc\";\nvar TagName = \"div\";\nfunction menuHasFocus(baseElement, items, currentTarget) {\n var _a;\n if (!baseElement) return false;\n if (hasFocusWithin(baseElement)) return true;\n const expandedItem = items == null ? void 0 : items.find((item) => {\n var _a2;\n if (item.element === currentTarget) return false;\n return ((_a2 = item.element) == null ? void 0 : _a2.getAttribute(\"aria-expanded\")) === \"true\";\n });\n const expandedMenuId = (_a = expandedItem == null ? void 0 : expandedItem.element) == null ? void 0 : _a.getAttribute(\"aria-controls\");\n if (!expandedMenuId) return false;\n const doc = getDocument(baseElement);\n const expandedMenu = doc.getElementById(expandedMenuId);\n if (!expandedMenu) return false;\n if (hasFocusWithin(expandedMenu)) return true;\n return !!expandedMenu.querySelector(\"[role=menuitem][aria-expanded=true]\");\n}\nvar useMenuItem = createHook(\n function useMenuItem2(_a) {\n var _b = _a, {\n store,\n hideOnClick = true,\n preventScrollOnKeyDown = true,\n focusOnHover,\n blurOnHoverEnd\n } = _b, props = __objRest(_b, [\n \"store\",\n \"hideOnClick\",\n \"preventScrollOnKeyDown\",\n \"focusOnHover\",\n \"blurOnHoverEnd\"\n ]);\n const menuContext = useMenuScopedContext(true);\n const menubarContext = useMenubarScopedContext();\n store = store || menuContext || menubarContext;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"MenuItem must be wrapped in a MenuList, Menu or Menubar component\"\n );\n const onClickProp = props.onClick;\n const hideOnClickProp = useBooleanEvent(hideOnClick);\n const hideMenu = \"hideAll\" in store ? store.hideAll : void 0;\n const isWithinMenu = !!hideMenu;\n const onClick = useEvent((event) => {\n onClickProp == null ? void 0 : onClickProp(event);\n if (event.defaultPrevented) return;\n if (isDownloading(event)) return;\n if (isOpeningInNewTab(event)) return;\n if (!hideMenu) return;\n const popupType = event.currentTarget.getAttribute(\"aria-haspopup\");\n if (popupType === \"menu\") return;\n if (!hideOnClickProp(event)) return;\n hideMenu();\n });\n const contentElement = useStoreState(\n store,\n (state) => \"contentElement\" in state ? state.contentElement : null\n );\n const role = getPopupItemRole(contentElement, \"menuitem\");\n props = __spreadProps(__spreadValues({\n role\n }, props), {\n onClick\n });\n props = useCompositeItem(__spreadValues({\n store,\n preventScrollOnKeyDown\n }, props));\n props = useCompositeHover(__spreadProps(__spreadValues({\n store\n }, props), {\n focusOnHover(event) {\n const getFocusOnHover = () => {\n if (typeof focusOnHover === \"function\") return focusOnHover(event);\n if (focusOnHover != null) return focusOnHover;\n return true;\n };\n if (!store) return false;\n if (!getFocusOnHover()) return false;\n const { baseElement, items } = store.getState();\n if (isWithinMenu) {\n if (event.currentTarget.hasAttribute(\"aria-expanded\")) {\n event.currentTarget.focus();\n }\n return true;\n }\n if (menuHasFocus(baseElement, items, event.currentTarget)) {\n event.currentTarget.focus();\n return true;\n }\n return false;\n },\n blurOnHoverEnd(event) {\n if (typeof blurOnHoverEnd === \"function\") return blurOnHoverEnd(event);\n if (blurOnHoverEnd != null) return blurOnHoverEnd;\n return isWithinMenu;\n }\n }));\n return props;\n }\n);\nvar MenuItem = memo(\n forwardRef(function MenuItem2(props) {\n const htmlProps = useMenuItem(props);\n return createElement(TagName, htmlProps);\n })\n);\n\nexport {\n useMenuItem,\n MenuItem\n};\n","\"use client\";\nimport {\n createStoreContext\n} from \"./LMDWO4NN.js\";\n\n// src/checkbox/checkbox-context.tsx\nvar ctx = createStoreContext();\nvar useCheckboxContext = ctx.useContext;\nvar useCheckboxScopedContext = ctx.useScopedContext;\nvar useCheckboxProviderContext = ctx.useProviderContext;\nvar CheckboxContextProvider = ctx.ContextProvider;\nvar CheckboxScopedContextProvider = ctx.ScopedContextProvider;\n\nexport {\n useCheckboxContext,\n useCheckboxScopedContext,\n useCheckboxProviderContext,\n CheckboxContextProvider,\n CheckboxScopedContextProvider\n};\n","\"use client\";\nimport {\n useCheckboxContext\n} from \"./RNCDFVMF.js\";\nimport {\n CheckboxCheckedContext\n} from \"./EYKMH5G5.js\";\nimport {\n useCommand\n} from \"./KUU7WJ55.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n useStoreState\n} from \"./YV4JVR4I.js\";\nimport {\n useEvent,\n useForceUpdate,\n useMergeRefs,\n useTagName,\n useWrapElement\n} from \"./ABQUS43J.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/checkbox/checkbox.tsx\nimport {\n disabledFromProps,\n removeUndefinedValues\n} from \"@ariakit/core/utils/misc\";\nimport { useEffect, useRef, useState } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"input\";\nfunction setMixed(element, mixed) {\n if (mixed) {\n element.indeterminate = true;\n } else if (element.indeterminate) {\n element.indeterminate = false;\n }\n}\nfunction isNativeCheckbox(tagName, type) {\n return tagName === \"input\" && (!type || type === \"checkbox\");\n}\nfunction getPrimitiveValue(value) {\n if (Array.isArray(value)) {\n return value.toString();\n }\n return value;\n}\nvar useCheckbox = createHook(\n function useCheckbox2(_a) {\n var _b = _a, {\n store,\n name,\n value: valueProp,\n checked: checkedProp,\n defaultChecked\n } = _b, props = __objRest(_b, [\n \"store\",\n \"name\",\n \"value\",\n \"checked\",\n \"defaultChecked\"\n ]);\n const context = useCheckboxContext();\n store = store || context;\n const [_checked, setChecked] = useState(defaultChecked != null ? defaultChecked : false);\n const checked = useStoreState(store, (state) => {\n if (checkedProp !== void 0) return checkedProp;\n if ((state == null ? void 0 : state.value) === void 0) return _checked;\n if (valueProp != null) {\n if (Array.isArray(state.value)) {\n const primitiveValue = getPrimitiveValue(valueProp);\n return state.value.includes(primitiveValue);\n }\n return state.value === valueProp;\n }\n if (Array.isArray(state.value)) return false;\n if (typeof state.value === \"boolean\") return state.value;\n return false;\n });\n const ref = useRef(null);\n const tagName = useTagName(ref, TagName);\n const nativeCheckbox = isNativeCheckbox(tagName, props.type);\n const mixed = checked ? checked === \"mixed\" : void 0;\n const isChecked = checked === \"mixed\" ? false : checked;\n const disabled = disabledFromProps(props);\n const [propertyUpdated, schedulePropertyUpdate] = useForceUpdate();\n useEffect(() => {\n const element = ref.current;\n if (!element) return;\n setMixed(element, mixed);\n if (nativeCheckbox) return;\n element.checked = isChecked;\n if (name !== void 0) {\n element.name = name;\n }\n if (valueProp !== void 0) {\n element.value = `${valueProp}`;\n }\n }, [propertyUpdated, mixed, nativeCheckbox, isChecked, name, valueProp]);\n const onChangeProp = props.onChange;\n const onChange = useEvent((event) => {\n if (disabled) {\n event.stopPropagation();\n event.preventDefault();\n return;\n }\n setMixed(event.currentTarget, mixed);\n if (!nativeCheckbox) {\n event.currentTarget.checked = !event.currentTarget.checked;\n schedulePropertyUpdate();\n }\n onChangeProp == null ? void 0 : onChangeProp(event);\n if (event.defaultPrevented) return;\n const elementChecked = event.currentTarget.checked;\n setChecked(elementChecked);\n store == null ? void 0 : store.setValue((prevValue) => {\n if (valueProp == null) return elementChecked;\n const primitiveValue = getPrimitiveValue(valueProp);\n if (!Array.isArray(prevValue)) {\n return prevValue === primitiveValue ? false : primitiveValue;\n }\n if (elementChecked) {\n if (prevValue.includes(primitiveValue)) {\n return prevValue;\n }\n return [...prevValue, primitiveValue];\n }\n return prevValue.filter((v) => v !== primitiveValue);\n });\n });\n const onClickProp = props.onClick;\n const onClick = useEvent((event) => {\n onClickProp == null ? void 0 : onClickProp(event);\n if (event.defaultPrevented) return;\n if (nativeCheckbox) return;\n onChange(event);\n });\n props = useWrapElement(\n props,\n (element) => /* @__PURE__ */ jsx(CheckboxCheckedContext.Provider, { value: isChecked, children: element }),\n [isChecked]\n );\n props = __spreadProps(__spreadValues({\n role: !nativeCheckbox ? \"checkbox\" : void 0,\n type: nativeCheckbox ? \"checkbox\" : void 0,\n \"aria-checked\": checked\n }, props), {\n ref: useMergeRefs(ref, props.ref),\n onChange,\n onClick\n });\n props = useCommand(__spreadValues({ clickOnEnter: !nativeCheckbox }, props));\n return removeUndefinedValues(__spreadValues({\n name: nativeCheckbox ? name : void 0,\n value: nativeCheckbox ? valueProp : void 0,\n checked: isChecked\n }, props));\n }\n);\nvar Checkbox = forwardRef(function Checkbox2(props) {\n const htmlProps = useCheckbox(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n useCheckbox,\n Checkbox\n};\n","\"use client\";\nimport {\n createStore,\n throwOnConflictingProps\n} from \"../__chunks/BCALMBPZ.js\";\nimport {\n defaultValue\n} from \"../__chunks/PBFD2E7P.js\";\nimport {\n __spreadProps,\n __spreadValues\n} from \"../__chunks/3YLGPPWQ.js\";\n\n// src/checkbox/checkbox-store.ts\nfunction createCheckboxStore(props = {}) {\n var _a;\n throwOnConflictingProps(props, props.store);\n const syncState = (_a = props.store) == null ? void 0 : _a.getState();\n const initialState = {\n value: defaultValue(\n props.value,\n syncState == null ? void 0 : syncState.value,\n props.defaultValue,\n false\n )\n };\n const checkbox = createStore(initialState, props.store);\n return __spreadProps(__spreadValues({}, checkbox), {\n setValue: (value) => checkbox.setState(\"value\", value)\n });\n}\nexport {\n createCheckboxStore\n};\n","\"use client\";\nimport {\n useCheckbox\n} from \"../__chunks/ASMQKSDT.js\";\nimport {\n useCheckboxStore\n} from \"../__chunks/HAVBGUA3.js\";\nimport \"../__chunks/RNCDFVMF.js\";\nimport {\n useMenuItem\n} from \"../__chunks/MVIULMNR.js\";\nimport {\n useMenuScopedContext\n} from \"../__chunks/B2J376ND.js\";\nimport \"../__chunks/62UHHO2X.js\";\nimport \"../__chunks/UQQRIHDV.js\";\nimport \"../__chunks/EYKMH5G5.js\";\nimport \"../__chunks/P2CTZE2T.js\";\nimport \"../__chunks/RZ4GPYOB.js\";\nimport \"../__chunks/KUU7WJ55.js\";\nimport \"../__chunks/5VQZOHHZ.js\";\nimport \"../__chunks/P7GR5CS5.js\";\nimport \"../__chunks/VDHZ5F7K.js\";\nimport \"../__chunks/EM5CXX6A.js\";\nimport \"../__chunks/MTZPJQMC.js\";\nimport \"../__chunks/RS7LB2H4.js\";\nimport \"../__chunks/S6EF7IVO.js\";\nimport \"../__chunks/LVA2YJMS.js\";\nimport \"../__chunks/SWN3JYXT.js\";\nimport {\n createElement,\n createHook,\n forwardRef,\n memo\n} from \"../__chunks/LMDWO4NN.js\";\nimport \"../__chunks/YV4JVR4I.js\";\nimport {\n useInitialValue\n} from \"../__chunks/ABQUS43J.js\";\nimport \"../__chunks/SK3NAZA3.js\";\nimport {\n __objRest,\n __spreadValues\n} from \"../__chunks/3YLGPPWQ.js\";\n\n// src/menu/menu-item-checkbox.tsx\nimport { invariant, shallowEqual } from \"@ariakit/core/utils/misc\";\nimport { useEffect } from \"react\";\nvar TagName = \"div\";\nfunction getPrimitiveValue(value) {\n if (Array.isArray(value)) {\n return value.toString();\n }\n return value;\n}\nfunction getValue(storeValue, value, checked) {\n if (value === void 0) {\n if (Array.isArray(storeValue)) return storeValue;\n return !!checked;\n }\n const primitiveValue = getPrimitiveValue(value);\n if (!Array.isArray(storeValue)) {\n if (checked) {\n return primitiveValue;\n }\n return storeValue === primitiveValue ? false : storeValue;\n }\n if (checked) {\n if (storeValue.includes(primitiveValue)) {\n return storeValue;\n }\n return [...storeValue, primitiveValue];\n }\n return storeValue.filter((v) => v !== primitiveValue);\n}\nvar useMenuItemCheckbox = createHook(\n function useMenuItemCheckbox2(_a) {\n var _b = _a, {\n store,\n name,\n value,\n checked,\n defaultChecked: defaultCheckedProp,\n hideOnClick = false\n } = _b, props = __objRest(_b, [\n \"store\",\n \"name\",\n \"value\",\n \"checked\",\n \"defaultChecked\",\n \"hideOnClick\"\n ]);\n const context = useMenuScopedContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"MenuItemCheckbox must be wrapped in a MenuList or Menu component\"\n );\n const defaultChecked = useInitialValue(defaultCheckedProp);\n useEffect(() => {\n store == null ? void 0 : store.setValue(name, (prevValue = []) => {\n if (!defaultChecked) return prevValue;\n return getValue(prevValue, value, true);\n });\n }, [store, name, value, defaultChecked]);\n useEffect(() => {\n if (checked === void 0) return;\n store == null ? void 0 : store.setValue(name, (prevValue) => {\n return getValue(prevValue, value, checked);\n });\n }, [store, name, value, checked]);\n const checkboxStore = useCheckboxStore({\n value: store.useState((state) => state.values[name]),\n setValue(internalValue) {\n store == null ? void 0 : store.setValue(name, () => {\n if (checked === void 0) return internalValue;\n const nextValue = getValue(internalValue, value, checked);\n if (!Array.isArray(nextValue)) return nextValue;\n if (!Array.isArray(internalValue)) return nextValue;\n if (shallowEqual(internalValue, nextValue)) return internalValue;\n return nextValue;\n });\n }\n });\n props = __spreadValues({\n role: \"menuitemcheckbox\"\n }, props);\n props = useCheckbox(__spreadValues({\n store: checkboxStore,\n name,\n value,\n checked\n }, props));\n props = useMenuItem(__spreadValues({ store, hideOnClick }, props));\n return props;\n }\n);\nvar MenuItemCheckbox = memo(\n forwardRef(function MenuItemCheckbox2(props) {\n const htmlProps = useMenuItemCheckbox(props);\n return createElement(TagName, htmlProps);\n })\n);\nexport {\n MenuItemCheckbox,\n useMenuItemCheckbox\n};\n","\"use client\";\nimport {\n useStore,\n useStoreProps\n} from \"./YV4JVR4I.js\";\nimport {\n useUpdateEffect\n} from \"./ABQUS43J.js\";\n\n// src/checkbox/checkbox-store.ts\nimport * as Core from \"@ariakit/core/checkbox/checkbox-store\";\nfunction useCheckboxStoreProps(store, update, props) {\n useUpdateEffect(update, [props.store]);\n useStoreProps(store, props, \"value\", \"setValue\");\n return store;\n}\nfunction useCheckboxStore(props = {}) {\n const [store, update] = useStore(Core.createCheckboxStore, props);\n return useCheckboxStoreProps(store, update, props);\n}\n\nexport {\n useCheckboxStoreProps,\n useCheckboxStore\n};\n","\"use client\";\nimport {\n useMenuItem\n} from \"../__chunks/MVIULMNR.js\";\nimport {\n MenuItemCheckedContext,\n useMenuScopedContext\n} from \"../__chunks/B2J376ND.js\";\nimport \"../__chunks/62UHHO2X.js\";\nimport {\n useRadio\n} from \"../__chunks/NLEBE274.js\";\nimport \"../__chunks/UVUMR3WP.js\";\nimport \"../__chunks/UQQRIHDV.js\";\nimport \"../__chunks/P2CTZE2T.js\";\nimport \"../__chunks/RZ4GPYOB.js\";\nimport \"../__chunks/KUU7WJ55.js\";\nimport \"../__chunks/5VQZOHHZ.js\";\nimport \"../__chunks/P7GR5CS5.js\";\nimport \"../__chunks/VDHZ5F7K.js\";\nimport \"../__chunks/EM5CXX6A.js\";\nimport \"../__chunks/MTZPJQMC.js\";\nimport \"../__chunks/RS7LB2H4.js\";\nimport \"../__chunks/S6EF7IVO.js\";\nimport \"../__chunks/LVA2YJMS.js\";\nimport \"../__chunks/SWN3JYXT.js\";\nimport {\n createElement,\n createHook,\n forwardRef,\n memo\n} from \"../__chunks/LMDWO4NN.js\";\nimport \"../__chunks/YV4JVR4I.js\";\nimport {\n useInitialValue,\n useWrapElement\n} from \"../__chunks/ABQUS43J.js\";\nimport \"../__chunks/SK3NAZA3.js\";\nimport {\n __objRest,\n __spreadValues\n} from \"../__chunks/3YLGPPWQ.js\";\n\n// src/menu/menu-item-radio.tsx\nimport { invariant } from \"@ariakit/core/utils/misc\";\nimport { useEffect } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"div\";\nfunction getValue(prevValue, value, checked) {\n if (checked === void 0) return prevValue;\n if (checked) return value;\n return prevValue;\n}\nvar useMenuItemRadio = createHook(\n function useMenuItemRadio2(_a) {\n var _b = _a, {\n store,\n name,\n value,\n checked,\n onChange: onChangeProp,\n hideOnClick = false\n } = _b, props = __objRest(_b, [\n \"store\",\n \"name\",\n \"value\",\n \"checked\",\n \"onChange\",\n \"hideOnClick\"\n ]);\n const context = useMenuScopedContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"MenuItemRadio must be wrapped in a MenuList or Menu component\"\n );\n const defaultChecked = useInitialValue(props.defaultChecked);\n useEffect(() => {\n store == null ? void 0 : store.setValue(name, (prevValue = false) => {\n return getValue(prevValue, value, defaultChecked);\n });\n }, [store, name, value, defaultChecked]);\n useEffect(() => {\n if (checked === void 0) return;\n store == null ? void 0 : store.setValue(name, (prevValue) => {\n return getValue(prevValue, value, checked);\n });\n }, [store, name, value, checked]);\n const isChecked = store.useState((state) => state.values[name] === value);\n props = useWrapElement(\n props,\n (element) => /* @__PURE__ */ jsx(MenuItemCheckedContext.Provider, { value: !!isChecked, children: element }),\n [isChecked]\n );\n props = __spreadValues({\n role: \"menuitemradio\"\n }, props);\n props = useRadio(__spreadValues({\n name,\n value,\n checked: isChecked,\n onChange(event) {\n onChangeProp == null ? void 0 : onChangeProp(event);\n if (event.defaultPrevented) return;\n const element = event.currentTarget;\n store == null ? void 0 : store.setValue(name, (prevValue) => {\n return getValue(prevValue, value, checked != null ? checked : element.checked);\n });\n }\n }, props));\n props = useMenuItem(__spreadValues({ store, hideOnClick }, props));\n return props;\n }\n);\nvar MenuItemRadio = memo(\n forwardRef(function MenuItemRadio2(props) {\n const htmlProps = useMenuItemRadio(props);\n return createElement(TagName, htmlProps);\n })\n);\nexport {\n MenuItemRadio,\n useMenuItemRadio\n};\n","\"use client\";\nimport {\n useCompositeGroup\n} from \"../__chunks/YORGHBM4.js\";\nimport \"../__chunks/36LIF33V.js\";\nimport \"../__chunks/7HVFURXT.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"../__chunks/LMDWO4NN.js\";\nimport \"../__chunks/ABQUS43J.js\";\nimport \"../__chunks/SK3NAZA3.js\";\nimport \"../__chunks/3YLGPPWQ.js\";\n\n// src/menu/menu-group.tsx\nvar TagName = \"div\";\nvar useMenuGroup = createHook(\n function useMenuGroup2(props) {\n props = useCompositeGroup(props);\n return props;\n }\n);\nvar MenuGroup = forwardRef(function MenuGroup2(props) {\n const htmlProps = useMenuGroup(props);\n return createElement(TagName, htmlProps);\n});\nexport {\n MenuGroup,\n useMenuGroup\n};\n","\"use client\";\nimport {\n useCompositeGroupLabel\n} from \"../__chunks/SWSPTQMT.js\";\nimport \"../__chunks/YUOJWFSO.js\";\nimport \"../__chunks/7HVFURXT.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"../__chunks/LMDWO4NN.js\";\nimport \"../__chunks/ABQUS43J.js\";\nimport \"../__chunks/SK3NAZA3.js\";\nimport \"../__chunks/3YLGPPWQ.js\";\n\n// src/menu/menu-group-label.tsx\nvar TagName = \"div\";\nvar useMenuGroupLabel = createHook(\n function useMenuGroupLabel2(props) {\n props = useCompositeGroupLabel(props);\n return props;\n }\n);\nvar MenuGroupLabel = forwardRef(function MenuGroupLabel2(props) {\n const htmlProps = useMenuGroupLabel(props);\n return createElement(TagName, htmlProps);\n});\nexport {\n MenuGroupLabel,\n useMenuGroupLabel\n};\n","\"use client\";\nimport {\n useSeparator\n} from \"./A3CZKICO.js\";\nimport {\n useCompositeContext\n} from \"./P7GR5CS5.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/composite/composite-separator.tsx\nimport { invariant } from \"@ariakit/core/utils/misc\";\nvar TagName = \"hr\";\nvar useCompositeSeparator = createHook(function useCompositeSeparator2(_a) {\n var _b = _a, { store } = _b, props = __objRest(_b, [\"store\"]);\n const context = useCompositeContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"CompositeSeparator must be wrapped in a Composite component.\"\n );\n const orientation = store.useState(\n (state) => state.orientation === \"horizontal\" ? \"vertical\" : \"horizontal\"\n );\n props = useSeparator(__spreadProps(__spreadValues({}, props), { orientation }));\n return props;\n});\nvar CompositeSeparator = forwardRef(function CompositeSeparator2(props) {\n const htmlProps = useCompositeSeparator(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n useCompositeSeparator,\n CompositeSeparator\n};\n","\"use client\";\nimport {\n useMenuContext\n} from \"../__chunks/B2J376ND.js\";\nimport \"../__chunks/62UHHO2X.js\";\nimport {\n useCompositeSeparator\n} from \"../__chunks/TP7N7UIH.js\";\nimport \"../__chunks/A3CZKICO.js\";\nimport \"../__chunks/P7GR5CS5.js\";\nimport \"../__chunks/VDHZ5F7K.js\";\nimport \"../__chunks/EM5CXX6A.js\";\nimport \"../__chunks/MTZPJQMC.js\";\nimport \"../__chunks/RS7LB2H4.js\";\nimport \"../__chunks/S6EF7IVO.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"../__chunks/LMDWO4NN.js\";\nimport \"../__chunks/ABQUS43J.js\";\nimport \"../__chunks/SK3NAZA3.js\";\nimport {\n __objRest,\n __spreadValues\n} from \"../__chunks/3YLGPPWQ.js\";\n\n// src/menu/menu-separator.tsx\nvar TagName = \"hr\";\nvar useMenuSeparator = createHook(\n function useMenuSeparator2(_a) {\n var _b = _a, { store } = _b, props = __objRest(_b, [\"store\"]);\n const context = useMenuContext();\n store = store || context;\n props = useCompositeSeparator(__spreadValues({ store }, props));\n return props;\n }\n);\nvar MenuSeparator = forwardRef(function MenuSeparator2(props) {\n const htmlProps = useMenuSeparator(props);\n return createElement(TagName, htmlProps);\n});\nexport {\n MenuSeparator,\n useMenuSeparator\n};\n","/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport { COLORS, font, rtl, CONFIG } from '../utils';\nimport { space } from '../utils/space';\nimport Icon from '../icon';\nimport { Truncate } from '../truncate';\nimport type { ContextProps } from './types';\n\nconst ANIMATION_PARAMS = {\n\tSCALE_AMOUNT_OUTER: 0.82,\n\tSCALE_AMOUNT_CONTENT: 0.9,\n\tDURATION: {\n\t\tIN: '400ms',\n\t\tOUT: '200ms',\n\t},\n\tEASING: 'cubic-bezier(0.33, 0, 0, 1)',\n};\n\nconst CONTENT_WRAPPER_PADDING = space( 1 );\nconst ITEM_PADDING_BLOCK = space( 2 );\nconst ITEM_PADDING_INLINE = space( 3 );\n\n// TODO:\n// - border color and divider color are different from COLORS.theme variables\n// - lighter text color is not defined in COLORS.theme, should it be?\n// - lighter background color is not defined in COLORS.theme, should it be?\nconst DEFAULT_BORDER_COLOR = COLORS.theme.gray[ 300 ];\nconst DIVIDER_COLOR = COLORS.theme.gray[ 200 ];\nconst LIGHTER_TEXT_COLOR = COLORS.theme.gray[ 700 ];\nconst LIGHT_BACKGROUND_COLOR = COLORS.theme.gray[ 100 ];\nconst TOOLBAR_VARIANT_BORDER_COLOR = COLORS.theme.foreground;\nconst DEFAULT_BOX_SHADOW = `0 0 0 ${ CONFIG.borderWidth } ${ DEFAULT_BORDER_COLOR }, ${ CONFIG.elevationMedium }`;\nconst TOOLBAR_VARIANT_BOX_SHADOW = `0 0 0 ${ CONFIG.borderWidth } ${ TOOLBAR_VARIANT_BORDER_COLOR }`;\n\nconst GRID_TEMPLATE_COLS = 'minmax( 0, max-content ) 1fr';\n\nexport const PopoverOuterWrapper = styled.div<\n\tPick< ContextProps, 'variant' >\n>`\n\tposition: relative;\n\n\tbackground-color: ${ COLORS.ui.background };\n\tborder-radius: ${ CONFIG.radiusMedium };\n\t${ ( props ) => css`\n\t\tbox-shadow: ${ props.variant === 'toolbar'\n\t\t\t? TOOLBAR_VARIANT_BOX_SHADOW\n\t\t\t: DEFAULT_BOX_SHADOW };\n\t` }\n\n\toverflow: hidden;\n\n\t/* Open/close animation (outer wrapper) */\n\t@media not ( prefers-reduced-motion ) {\n\t\ttransition-property: transform, opacity;\n\t\ttransition-timing-function: ${ ANIMATION_PARAMS.EASING };\n\t\ttransition-duration: ${ ANIMATION_PARAMS.DURATION.IN };\n\t\twill-change: transform, opacity;\n\n\t\t/* Regardless of the side, fade in and out. */\n\t\topacity: 0;\n\t\t&:has( [data-enter] ) {\n\t\t\topacity: 1;\n\t\t}\n\n\t\t&:has( [data-leave] ) {\n\t\t\ttransition-duration: ${ ANIMATION_PARAMS.DURATION.OUT };\n\t\t}\n\n\t\t/* For menus opening on top and bottom side, animate the scale Y too. */\n\t\t&:has( [data-side='bottom'] ),\n\t\t&:has( [data-side='top'] ) {\n\t\t\ttransform: scaleY( ${ ANIMATION_PARAMS.SCALE_AMOUNT_OUTER } );\n\t\t}\n\t\t&:has( [data-side='bottom'] ) {\n\t\t\ttransform-origin: top;\n\t\t}\n\t\t&:has( [data-side='top'] ) {\n\t\t\ttransform-origin: bottom;\n\t\t}\n\t\t&:has( [data-enter][data-side='bottom'] ),\n\t\t&:has( [data-enter][data-side='top'] ),\n\t\t/* Do not animate the scaleY when closing the menu */\n\t\t&:has( [data-leave][data-side='bottom'] ),\n\t\t&:has( [data-leave][data-side='top'] ) {\n\t\t\ttransform: scaleY( 1 );\n\t\t}\n\t}\n`;\n\nexport const PopoverInnerWrapper = styled.div`\n\tposition: relative;\n\t/* Same as popover component */\n\t/* TODO: is there a way to read the sass variable? */\n\tz-index: 1000000;\n\n\tdisplay: grid;\n\tgrid-template-columns: ${ GRID_TEMPLATE_COLS };\n\tgrid-template-rows: auto;\n\n\tbox-sizing: border-box;\n\tmin-width: 160px;\n\tmax-width: 320px;\n\tmax-height: var( --popover-available-height );\n\n\tpadding: ${ CONTENT_WRAPPER_PADDING };\n\n\toverscroll-behavior: contain;\n\toverflow: auto;\n\n\t/* Only visible in Windows High Contrast mode */\n\toutline: 2px solid transparent !important;\n\n\t/* Open/close animation (inner content wrapper) */\n\t@media not ( prefers-reduced-motion ) {\n\t\ttransition: inherit;\n\t\ttransform-origin: inherit;\n\n\t\t/*\n\t\t * For menus opening on top and bottom side, animate the scale Y too.\n\t\t * The content scales at a different rate than the outer container:\n\t\t * - first, counter the outer scale factor by doing \"1 / scaleAmountOuter\"\n\t\t * - then, apply the content scale factor.\n\t\t */\n\t\t&[data-side='bottom'],\n\t\t&[data-side='top'] {\n\t\t\ttransform: scaleY(\n\t\t\t\tcalc(\n\t\t\t\t\t1 / ${ ANIMATION_PARAMS.SCALE_AMOUNT_OUTER } *\n\t\t\t\t\t\t${ ANIMATION_PARAMS.SCALE_AMOUNT_CONTENT }\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\t&[data-enter][data-side='bottom'],\n\t\t&[data-enter][data-side='top'],\n\t\t/* Do not animate the scaleY when closing the menu */\n\t\t&[data-leave][data-side='bottom'],\n\t\t&[data-leave][data-side='top'] {\n\t\t\ttransform: scaleY( 1 );\n\t\t}\n\t}\n`;\n\nconst baseItem = css`\n\tall: unset;\n\n\tposition: relative;\n\tmin-height: ${ space( 10 ) };\n\tbox-sizing: border-box;\n\n\t/* Occupy the width of all grid columns (ie. full width) */\n\tgrid-column: 1 / -1;\n\n\tdisplay: grid;\n\tgrid-template-columns: ${ GRID_TEMPLATE_COLS };\n\talign-items: center;\n\n\t@supports ( grid-template-columns: subgrid ) {\n\t\t/*\n\t\t * Define a grid layout which inherits the same columns configuration\n\t\t * from the parent layout (ie. subgrid). This allows the menu\n\t\t * to synchronize the indentation of all its items.\n\t\t */\n\t\tgrid-template-columns: subgrid;\n\t}\n\n\tfont-size: ${ font( 'default.fontSize' ) };\n\tfont-family: inherit;\n\tfont-weight: normal;\n\tline-height: 20px;\n\n\tcolor: ${ COLORS.theme.foreground };\n\tborder-radius: ${ CONFIG.radiusSmall };\n\n\tpadding-block: ${ ITEM_PADDING_BLOCK };\n\tpadding-inline: ${ ITEM_PADDING_INLINE };\n\n\t/*\n\t * Make sure that, when an item is scrolled into view (eg. while using the\n\t * keyboard to move focus), the whole item comes into view\n\t */\n\tscroll-margin: ${ CONTENT_WRAPPER_PADDING };\n\n\tuser-select: none;\n\toutline: none;\n\n\t&[aria-disabled='true'] {\n\t\tcolor: ${ COLORS.ui.textDisabled };\n\t\tcursor: not-allowed;\n\t}\n\n\t/* Active item (including hover) */\n\t&[data-active-item]:not( [data-focus-visible] ):not(\n\t\t\t[aria-disabled='true']\n\t\t) {\n\t\tbackground-color: ${ COLORS.theme.accent };\n\t\tcolor: ${ COLORS.theme.accentInverted };\n\t}\n\n\t/* Keyboard focus (focus-visible) */\n\t&[data-focus-visible] {\n\t\tbox-shadow: 0 0 0 1.5px ${ COLORS.theme.accent };\n\n\t\t/* Only visible in Windows High Contrast mode */\n\t\toutline: 2px solid transparent;\n\t}\n\n\t/* Active (ie. pressed, mouse down) */\n\t&:active,\n\t&[data-active] {\n\t\t/* TODO: should there be a visual active state? */\n\t}\n\n\t/* When the item is the trigger of an open submenu */\n\t${ PopoverInnerWrapper }:not(:focus) &:not(:focus)[aria-expanded=\"true\"] {\n\t\tbackground-color: ${ LIGHT_BACKGROUND_COLOR };\n\t\tcolor: ${ COLORS.theme.foreground };\n\t}\n\n\tsvg {\n\t\tfill: currentColor;\n\t}\n`;\n\nexport const Item = styled( Ariakit.MenuItem )`\n\t${ baseItem };\n`;\n\nexport const CheckboxItem = styled( Ariakit.MenuItemCheckbox )`\n\t${ baseItem };\n`;\n\nexport const RadioItem = styled( Ariakit.MenuItemRadio )`\n\t${ baseItem };\n`;\n\nexport const ItemPrefixWrapper = styled.span`\n\t/* Always occupy the first column, even when auto-collapsing */\n\tgrid-column: 1;\n\n\t/*\n\t * Even when the item is not checked, occupy the same screen space to avoid\n\t * the space collapside when no items are checked.\n\t */\n\t${ CheckboxItem } > &,\n\t${ RadioItem } > & {\n\t\t/* Same width as the check icons */\n\t\tmin-width: ${ space( 6 ) };\n\t}\n\n\t${ CheckboxItem } > &,\n\t${ RadioItem } > &,\n\t&:not( :empty ) {\n\t\tmargin-inline-end: ${ space( 2 ) };\n\t}\n\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\n\tcolor: ${ LIGHTER_TEXT_COLOR };\n\n\t/*\n\t* When the parent menu item is active, except when it's a non-focused/hovered\n\t* submenu trigger (in that case, color should not be inherited)\n\t*/\n\t[data-active-item]:not( [data-focus-visible] ) > &,\n\t/* When the parent menu item is disabled */\n\t[aria-disabled='true'] > & {\n\t\tcolor: inherit;\n\t}\n`;\n\nexport const ItemContentWrapper = styled.div`\n\t/*\n\t * Always occupy the second column, since the first column\n\t * is taken by the prefix wrapper (when displayed).\n\t */\n\tgrid-column: 2;\n\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tgap: ${ space( 3 ) };\n\n\tpointer-events: none;\n`;\n\nexport const ItemChildrenWrapper = styled.div`\n\tflex: 1;\n\n\tdisplay: inline-flex;\n\tflex-direction: column;\n\tgap: ${ space( 1 ) };\n`;\n\nexport const ItemSuffixWrapper = styled.span`\n\tflex: 0 1 fit-content;\n\tmin-width: 0;\n\twidth: fit-content;\n\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tgap: ${ space( 3 ) };\n\n\tcolor: ${ LIGHTER_TEXT_COLOR };\n\n\t/*\n\t * When the parent menu item is active, except when it's a non-focused/hovered\n\t * submenu trigger (in that case, color should not be inherited)\n\t */\n\t[data-active-item]:not( [data-focus-visible] ) *:not(${ PopoverInnerWrapper }) &,\n\t/* When the parent menu item is disabled */\n\t[aria-disabled='true'] *:not(${ PopoverInnerWrapper }) & {\n\t\tcolor: inherit;\n\t}\n`;\n\nexport const Group = styled( Ariakit.MenuGroup )`\n\t/* Ignore this element when calculating the layout. Useful for subgrid */\n\tdisplay: contents;\n`;\n\nexport const GroupLabel = styled( Ariakit.MenuGroupLabel )`\n\t/* Occupy the width of all grid columns (ie. full width) */\n\tgrid-column: 1 / -1;\n\n\tpadding-block-start: ${ space( 3 ) };\n\tpadding-block-end: ${ space( 2 ) };\n\tpadding-inline: ${ ITEM_PADDING_INLINE };\n`;\n\nexport const Separator = styled( Ariakit.MenuSeparator )<\n\tPick< ContextProps, 'variant' >\n>`\n\t/* Occupy the width of all grid columns (ie. full width) */\n\tgrid-column: 1 / -1;\n\n\tborder: none;\n\theight: ${ CONFIG.borderWidth };\n\tbackground-color: ${ ( props ) =>\n\t\tprops.variant === 'toolbar'\n\t\t\t? TOOLBAR_VARIANT_BORDER_COLOR\n\t\t\t: DIVIDER_COLOR };\n\t/* Align with menu items' content */\n\tmargin-block: ${ space( 2 ) };\n\tmargin-inline: ${ ITEM_PADDING_INLINE };\n\n\t/* Only visible in Windows High Contrast mode */\n\toutline: 2px solid transparent;\n`;\n\nexport const SubmenuChevronIcon = styled( Icon )`\n\twidth: ${ space( 1.5 ) };\n\t${ rtl(\n\t\t{\n\t\t\ttransform: `scaleX(1)`,\n\t\t},\n\t\t{\n\t\t\ttransform: `scaleX(-1)`,\n\t\t}\n\t) };\n`;\n\nexport const ItemLabel = styled( Truncate )`\n\tfont-size: ${ font( 'default.fontSize' ) };\n\tline-height: 20px;\n\tcolor: inherit;\n`;\n\nexport const ItemHelpText = styled( Truncate )`\n\tfont-size: ${ font( 'helpText.fontSize' ) };\n\tline-height: 16px;\n\tcolor: ${ LIGHTER_TEXT_COLOR };\n\toverflow-wrap: anywhere;\n\n\t[data-active-item]:not( [data-focus-visible] )\n\t\t*:not( ${ PopoverInnerWrapper } )\n\t\t&,\n\t[aria-disabled='true'] *:not( ${ PopoverInnerWrapper } ) & {\n\t\tcolor: inherit;\n\t}\n`;\n","/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport type { ItemProps } from './types';\nimport * as Styled from './styles';\nimport { Context } from './context';\n\nexport const Item = forwardRef<\n\tHTMLDivElement,\n\tWordPressComponentProps< ItemProps, 'div', false >\n>( function Item(\n\t{\n\t\tprefix,\n\t\tsuffix,\n\t\tchildren,\n\t\tdisabled = false,\n\t\thideOnClick = true,\n\t\tstore,\n\t\t...props\n\t},\n\tref\n) {\n\tconst menuContext = useContext( Context );\n\n\tif ( ! menuContext?.store ) {\n\t\tthrow new Error(\n\t\t\t'Menu.Item can only be rendered inside a Menu component'\n\t\t);\n\t}\n\n\t// In most cases, the menu store will be retrieved from context (ie. the store\n\t// created by the top-level menu component). But in rare cases (ie.\n\t// `Menu.SubmenuTriggerItem`), the context store wouldn't be correct. This is\n\t// why the component accepts a `store` prop to override the context store.\n\tconst computedStore = store ?? menuContext.store;\n\n\treturn (\n\t\t<Styled.Item\n\t\t\tref={ ref }\n\t\t\t{ ...props }\n\t\t\taccessibleWhenDisabled\n\t\t\tdisabled={ disabled }\n\t\t\thideOnClick={ hideOnClick }\n\t\t\tstore={ computedStore }\n\t\t>\n\t\t\t<Styled.ItemPrefixWrapper>{ prefix }</Styled.ItemPrefixWrapper>\n\n\t\t\t<Styled.ItemContentWrapper>\n\t\t\t\t<Styled.ItemChildrenWrapper>\n\t\t\t\t\t{ children }\n\t\t\t\t</Styled.ItemChildrenWrapper>\n\n\t\t\t\t{ suffix && (\n\t\t\t\t\t<Styled.ItemSuffixWrapper>\n\t\t\t\t\t\t{ suffix }\n\t\t\t\t\t</Styled.ItemSuffixWrapper>\n\t\t\t\t) }\n\t\t\t</Styled.ItemContentWrapper>\n\t\t</Styled.Item>\n\t);\n} );\n","\"use client\";\nimport {\n MenuItemCheckedContext\n} from \"../__chunks/B2J376ND.js\";\nimport \"../__chunks/62UHHO2X.js\";\nimport {\n useCheckboxCheck\n} from \"../__chunks/5JCRYSSV.js\";\nimport \"../__chunks/EYKMH5G5.js\";\nimport \"../__chunks/P7GR5CS5.js\";\nimport \"../__chunks/VDHZ5F7K.js\";\nimport \"../__chunks/EM5CXX6A.js\";\nimport \"../__chunks/MTZPJQMC.js\";\nimport \"../__chunks/RS7LB2H4.js\";\nimport \"../__chunks/S6EF7IVO.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"../__chunks/LMDWO4NN.js\";\nimport \"../__chunks/ABQUS43J.js\";\nimport \"../__chunks/SK3NAZA3.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"../__chunks/3YLGPPWQ.js\";\n\n// src/menu/menu-item-check.tsx\nimport { useContext } from \"react\";\nvar TagName = \"span\";\nvar useMenuItemCheck = createHook(\n function useMenuItemCheck2(_a) {\n var _b = _a, { store, checked } = _b, props = __objRest(_b, [\"store\", \"checked\"]);\n const context = useContext(MenuItemCheckedContext);\n checked = checked != null ? checked : context;\n props = useCheckboxCheck(__spreadProps(__spreadValues({}, props), { checked }));\n return props;\n }\n);\nvar MenuItemCheck = forwardRef(function MenuItemCheck2(props) {\n const htmlProps = useMenuItemCheck(props);\n return createElement(TagName, htmlProps);\n});\nexport {\n MenuItemCheck,\n useMenuItemCheck\n};\n","/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\nimport { Icon, check } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { Context } from './context';\nimport type { CheckboxItemProps } from './types';\nimport * as Styled from './styles';\n\nexport const CheckboxItem = forwardRef<\n\tHTMLDivElement,\n\tWordPressComponentProps< CheckboxItemProps, 'div', false >\n>( function CheckboxItem(\n\t{ suffix, children, disabled = false, hideOnClick = false, ...props },\n\tref\n) {\n\tconst menuContext = useContext( Context );\n\n\tif ( ! menuContext?.store ) {\n\t\tthrow new Error(\n\t\t\t'Menu.CheckboxItem can only be rendered inside a Menu component'\n\t\t);\n\t}\n\n\treturn (\n\t\t<Styled.CheckboxItem\n\t\t\tref={ ref }\n\t\t\t{ ...props }\n\t\t\taccessibleWhenDisabled\n\t\t\tdisabled={ disabled }\n\t\t\thideOnClick={ hideOnClick }\n\t\t\tstore={ menuContext.store }\n\t\t>\n\t\t\t<Ariakit.MenuItemCheck\n\t\t\t\tstore={ menuContext.store }\n\t\t\t\trender={ <Styled.ItemPrefixWrapper /> }\n\t\t\t\t// Override some ariakit inline styles\n\t\t\t\tstyle={ { width: 'auto', height: 'auto' } }\n\t\t\t>\n\t\t\t\t<Icon icon={ check } size={ 24 } />\n\t\t\t</Ariakit.MenuItemCheck>\n\n\t\t\t<Styled.ItemContentWrapper>\n\t\t\t\t<Styled.ItemChildrenWrapper>\n\t\t\t\t\t{ children }\n\t\t\t\t</Styled.ItemChildrenWrapper>\n\n\t\t\t\t{ suffix && (\n\t\t\t\t\t<Styled.ItemSuffixWrapper>\n\t\t\t\t\t\t{ suffix }\n\t\t\t\t\t</Styled.ItemSuffixWrapper>\n\t\t\t\t) }\n\t\t\t</Styled.ItemContentWrapper>\n\t\t</Styled.CheckboxItem>\n\t);\n} );\n","/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\nimport { Icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { Context } from './context';\nimport type { RadioItemProps } from './types';\nimport * as Styled from './styles';\nimport { SVG, Circle } from '@wordpress/primitives';\n\nconst radioCheck = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Circle cx={ 12 } cy={ 12 } r={ 3 }></Circle>\n\t</SVG>\n);\n\nexport const RadioItem = forwardRef<\n\tHTMLDivElement,\n\tWordPressComponentProps< RadioItemProps, 'div', false >\n>( function RadioItem(\n\t{ suffix, children, disabled = false, hideOnClick = false, ...props },\n\tref\n) {\n\tconst menuContext = useContext( Context );\n\n\tif ( ! menuContext?.store ) {\n\t\tthrow new Error(\n\t\t\t'Menu.RadioItem can only be rendered inside a Menu component'\n\t\t);\n\t}\n\n\treturn (\n\t\t<Styled.RadioItem\n\t\t\tref={ ref }\n\t\t\t{ ...props }\n\t\t\taccessibleWhenDisabled\n\t\t\tdisabled={ disabled }\n\t\t\thideOnClick={ hideOnClick }\n\t\t\tstore={ menuContext.store }\n\t\t>\n\t\t\t<Ariakit.MenuItemCheck\n\t\t\t\tstore={ menuContext.store }\n\t\t\t\trender={ <Styled.ItemPrefixWrapper /> }\n\t\t\t\t// Override some ariakit inline styles\n\t\t\t\tstyle={ { width: 'auto', height: 'auto' } }\n\t\t\t>\n\t\t\t\t<Icon icon={ radioCheck } size={ 24 } />\n\t\t\t</Ariakit.MenuItemCheck>\n\n\t\t\t<Styled.ItemContentWrapper>\n\t\t\t\t<Styled.ItemChildrenWrapper>\n\t\t\t\t\t{ children }\n\t\t\t\t</Styled.ItemChildrenWrapper>\n\n\t\t\t\t{ suffix && (\n\t\t\t\t\t<Styled.ItemSuffixWrapper>\n\t\t\t\t\t\t{ suffix }\n\t\t\t\t\t</Styled.ItemSuffixWrapper>\n\t\t\t\t) }\n\t\t\t</Styled.ItemContentWrapper>\n\t\t</Styled.RadioItem>\n\t);\n} );\n","/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { Context } from './context';\nimport type { GroupProps } from './types';\nimport * as Styled from './styles';\n\nexport const Group = forwardRef<\n\tHTMLDivElement,\n\tWordPressComponentProps< GroupProps, 'div', false >\n>( function Group( props, ref ) {\n\tconst menuContext = useContext( Context );\n\n\tif ( ! menuContext?.store ) {\n\t\tthrow new Error(\n\t\t\t'Menu.Group can only be rendered inside a Menu component'\n\t\t);\n\t}\n\n\treturn (\n\t\t<Styled.Group ref={ ref } { ...props } store={ menuContext.store } />\n\t);\n} );\n","/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { Context } from './context';\nimport { Text } from '../text';\nimport type { GroupLabelProps } from './types';\nimport * as Styled from './styles';\n\nexport const GroupLabel = forwardRef<\n\tHTMLDivElement,\n\tWordPressComponentProps< GroupLabelProps, 'div', false >\n>( function Group( props, ref ) {\n\tconst menuContext = useContext( Context );\n\n\tif ( ! menuContext?.store ) {\n\t\tthrow new Error(\n\t\t\t'Menu.GroupLabel can only be rendered inside a Menu component'\n\t\t);\n\t}\n\n\treturn (\n\t\t<Styled.GroupLabel\n\t\t\tref={ ref }\n\t\t\trender={\n\t\t\t\t// @ts-expect-error The `children` prop is passed\n\t\t\t\t<Text\n\t\t\t\t\tupperCase\n\t\t\t\t\tvariant=\"muted\"\n\t\t\t\t\tsize=\"11px\"\n\t\t\t\t\tweight={ 500 }\n\t\t\t\t\tlineHeight=\"16px\"\n\t\t\t\t/>\n\t\t\t}\n\t\t\t{ ...props }\n\t\t\tstore={ menuContext.store }\n\t\t/>\n\t);\n} );\n","/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { Context } from './context';\nimport type { SeparatorProps } from './types';\nimport * as Styled from './styles';\n\nexport const Separator = forwardRef<\n\tHTMLHRElement,\n\tWordPressComponentProps< SeparatorProps, 'hr', false >\n>( function Separator( props, ref ) {\n\tconst menuContext = useContext( Context );\n\n\tif ( ! menuContext?.store ) {\n\t\tthrow new Error(\n\t\t\t'Menu.Separator can only be rendered inside a Menu component'\n\t\t);\n\t}\n\n\treturn (\n\t\t<Styled.Separator\n\t\t\tref={ ref }\n\t\t\t{ ...props }\n\t\t\tstore={ menuContext.store }\n\t\t\tvariant={ menuContext.variant }\n\t\t/>\n\t);\n} );\n","/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { Context } from './context';\nimport * as Styled from './styles';\n\nexport const ItemLabel = forwardRef<\n\tHTMLSpanElement,\n\tWordPressComponentProps< { children: React.ReactNode }, 'span', true >\n>( function ItemLabel( props, ref ) {\n\tconst menuContext = useContext( Context );\n\n\tif ( ! menuContext?.store ) {\n\t\tthrow new Error(\n\t\t\t'Menu.ItemLabel can only be rendered inside a Menu component'\n\t\t);\n\t}\n\n\treturn <Styled.ItemLabel numberOfLines={ 1 } ref={ ref } { ...props } />;\n} );\n","/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { Context } from './context';\nimport * as Styled from './styles';\n\nexport const ItemHelpText = forwardRef<\n\tHTMLSpanElement,\n\tWordPressComponentProps< { children: React.ReactNode }, 'span', true >\n>( function ItemHelpText( props, ref ) {\n\tconst menuContext = useContext( Context );\n\n\tif ( ! menuContext?.store ) {\n\t\tthrow new Error(\n\t\t\t'Menu.ItemHelpText can only be rendered inside a Menu component'\n\t\t);\n\t}\n\n\treturn <Styled.ItemHelpText numberOfLines={ 2 } ref={ ref } { ...props } />;\n} );\n","\"use client\";\nimport {\n MenuContextProvider,\n useMenuProviderContext\n} from \"../__chunks/B2J376ND.js\";\nimport \"../__chunks/62UHHO2X.js\";\nimport {\n usePopoverDisclosure\n} from \"../__chunks/QYJ6MIDR.js\";\nimport \"../__chunks/AXB53BZF.js\";\nimport \"../__chunks/P4IRICAX.js\";\nimport \"../__chunks/OMU7RWRV.js\";\nimport \"../__chunks/X5NMLKT6.js\";\nimport {\n useCompositeTypeahead\n} from \"../__chunks/T7VMP3TM.js\";\nimport \"../__chunks/KUU7WJ55.js\";\nimport {\n useHovercardAnchor\n} from \"../__chunks/BYC7LY2E.js\";\nimport \"../__chunks/5VQZOHHZ.js\";\nimport \"../__chunks/P7GR5CS5.js\";\nimport \"../__chunks/VDHZ5F7K.js\";\nimport {\n Role\n} from \"../__chunks/XL7CSKGW.js\";\nimport \"../__chunks/EM5CXX6A.js\";\nimport \"../__chunks/MTZPJQMC.js\";\nimport \"../__chunks/RS7LB2H4.js\";\nimport \"../__chunks/S6EF7IVO.js\";\nimport \"../__chunks/LVA2YJMS.js\";\nimport \"../__chunks/SWN3JYXT.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"../__chunks/LMDWO4NN.js\";\nimport {\n useStoreState\n} from \"../__chunks/YV4JVR4I.js\";\nimport {\n useEvent,\n useId,\n useMergeRefs,\n useWrapElement\n} from \"../__chunks/ABQUS43J.js\";\nimport \"../__chunks/SK3NAZA3.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"../__chunks/3YLGPPWQ.js\";\n\n// src/menu/menu-button.tsx\nimport { getPopupItemRole, getPopupRole } from \"@ariakit/core/utils/dom\";\nimport { disabledFromProps, invariant } from \"@ariakit/core/utils/misc\";\nimport { useRef } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"button\";\nfunction getInitialFocus(event, dir) {\n const keyMap = {\n ArrowDown: dir === \"bottom\" || dir === \"top\" ? \"first\" : false,\n ArrowUp: dir === \"bottom\" || dir === \"top\" ? \"last\" : false,\n ArrowRight: dir === \"right\" ? \"first\" : false,\n ArrowLeft: dir === \"left\" ? \"first\" : false\n };\n return keyMap[event.key];\n}\nfunction hasActiveItem(items, excludeElement) {\n return !!(items == null ? void 0 : items.some((item) => {\n if (!item.element) return false;\n if (item.element === excludeElement) return false;\n return item.element.getAttribute(\"aria-expanded\") === \"true\";\n }));\n}\nvar useMenuButton = createHook(\n function useMenuButton2(_a) {\n var _b = _a, {\n store,\n focusable,\n accessibleWhenDisabled,\n showOnHover\n } = _b, props = __objRest(_b, [\n \"store\",\n \"focusable\",\n \"accessibleWhenDisabled\",\n \"showOnHover\"\n ]);\n const context = useMenuProviderContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"MenuButton must receive a `store` prop or be wrapped in a MenuProvider component.\"\n );\n const ref = useRef(null);\n const parentMenu = store.parent;\n const parentMenubar = store.menubar;\n const hasParentMenu = !!parentMenu;\n const parentIsMenubar = !!parentMenubar && !hasParentMenu;\n const disabled = disabledFromProps(props);\n const showMenu = () => {\n const trigger = ref.current;\n if (!trigger) return;\n store == null ? void 0 : store.setDisclosureElement(trigger);\n store == null ? void 0 : store.setAnchorElement(trigger);\n store == null ? void 0 : store.show();\n };\n const onFocusProp = props.onFocus;\n const onFocus = useEvent((event) => {\n onFocusProp == null ? void 0 : onFocusProp(event);\n if (disabled) return;\n if (event.defaultPrevented) return;\n store == null ? void 0 : store.setAutoFocusOnShow(false);\n store == null ? void 0 : store.setActiveId(null);\n if (!parentMenubar) return;\n if (!parentIsMenubar) return;\n const { items } = parentMenubar.getState();\n if (hasActiveItem(items, event.currentTarget)) {\n showMenu();\n }\n });\n const dir = useStoreState(\n store,\n (state) => state.placement.split(\"-\")[0]\n );\n const onKeyDownProp = props.onKeyDown;\n const onKeyDown = useEvent((event) => {\n onKeyDownProp == null ? void 0 : onKeyDownProp(event);\n if (disabled) return;\n if (event.defaultPrevented) return;\n const initialFocus = getInitialFocus(event, dir);\n if (initialFocus) {\n event.preventDefault();\n showMenu();\n store == null ? void 0 : store.setAutoFocusOnShow(true);\n store == null ? void 0 : store.setInitialFocus(initialFocus);\n }\n });\n const onClickProp = props.onClick;\n const onClick = useEvent((event) => {\n onClickProp == null ? void 0 : onClickProp(event);\n if (event.defaultPrevented) return;\n if (!store) return;\n const isKeyboardClick = !event.detail;\n const { open } = store.getState();\n if (!open || isKeyboardClick) {\n if (!hasParentMenu || isKeyboardClick) {\n store.setAutoFocusOnShow(true);\n }\n store.setInitialFocus(isKeyboardClick ? \"first\" : \"container\");\n }\n if (hasParentMenu) {\n showMenu();\n }\n });\n props = useWrapElement(\n props,\n (element) => /* @__PURE__ */ jsx(MenuContextProvider, { value: store, children: element }),\n [store]\n );\n if (hasParentMenu) {\n props = __spreadProps(__spreadValues({}, props), {\n render: /* @__PURE__ */ jsx(Role.div, { render: props.render })\n });\n }\n const id = useId(props.id);\n const parentContentElement = useStoreState(\n (parentMenu == null ? void 0 : parentMenu.combobox) || parentMenu,\n \"contentElement\"\n );\n const role = hasParentMenu || parentIsMenubar ? getPopupItemRole(parentContentElement, \"menuitem\") : void 0;\n const contentElement = store.useState(\"contentElement\");\n props = __spreadProps(__spreadValues({\n id,\n role,\n \"aria-haspopup\": getPopupRole(contentElement, \"menu\")\n }, props), {\n ref: useMergeRefs(ref, props.ref),\n onFocus,\n onKeyDown,\n onClick\n });\n props = useHovercardAnchor(__spreadProps(__spreadValues({\n store,\n focusable,\n accessibleWhenDisabled\n }, props), {\n showOnHover: (event) => {\n const getShowOnHover = () => {\n if (typeof showOnHover === \"function\") return showOnHover(event);\n if (showOnHover != null) return showOnHover;\n if (hasParentMenu) return true;\n if (!parentMenubar) return false;\n const { items } = parentMenubar.getState();\n return parentIsMenubar && hasActiveItem(items);\n };\n const canShowOnHover = getShowOnHover();\n if (!canShowOnHover) return false;\n const parent = parentIsMenubar ? parentMenubar : parentMenu;\n if (!parent) return true;\n parent.setActiveId(event.currentTarget.id);\n return true;\n }\n }));\n props = usePopoverDisclosure(__spreadValues({\n store,\n toggleOnClick: !hasParentMenu,\n focusable,\n accessibleWhenDisabled\n }, props));\n props = useCompositeTypeahead(__spreadValues({\n store,\n typeahead: parentIsMenubar\n }, props));\n return props;\n }\n);\nvar MenuButton = forwardRef(function MenuButton2(props) {\n const htmlProps = useMenuButton(props);\n return createElement(TagName, htmlProps);\n});\nexport {\n MenuButton,\n useMenuButton\n};\n","/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport type { TriggerButtonProps } from './types';\nimport { Context } from './context';\n\nexport const TriggerButton = forwardRef<\n\tHTMLDivElement,\n\tWordPressComponentProps< TriggerButtonProps, 'button', false >\n>( function TriggerButton( { children, disabled = false, ...props }, ref ) {\n\tconst menuContext = useContext( Context );\n\n\tif ( ! menuContext?.store ) {\n\t\tthrow new Error(\n\t\t\t'Menu.TriggerButton can only be rendered inside a Menu component'\n\t\t);\n\t}\n\n\tif ( menuContext.store.parent ) {\n\t\tthrow new Error(\n\t\t\t'Menu.TriggerButton should not be rendered inside a nested Menu component. Use Menu.SubmenuTriggerItem instead.'\n\t\t);\n\t}\n\n\treturn (\n\t\t<Ariakit.MenuButton\n\t\t\tref={ ref }\n\t\t\t{ ...props }\n\t\t\tdisabled={ disabled }\n\t\t\tstore={ menuContext.store }\n\t\t>\n\t\t\t{ children }\n\t\t</Ariakit.MenuButton>\n\t);\n} );\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst chevronRightSmall = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z\" />\n\t</SVG>\n);\n\nexport default chevronRightSmall;\n","/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\nimport { chevronRightSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport type { ItemProps } from './types';\nimport { Context } from './context';\nimport { Item } from './item';\nimport * as Styled from './styles';\n\nexport const SubmenuTriggerItem = forwardRef<\n\tHTMLDivElement,\n\tWordPressComponentProps< ItemProps, 'div', false >\n>( function SubmenuTriggerItem( { suffix, ...otherProps }, ref ) {\n\tconst menuContext = useContext( Context );\n\n\tif ( ! menuContext?.store.parent ) {\n\t\tthrow new Error(\n\t\t\t'Menu.SubmenuTriggerItem can only be rendered inside a nested Menu component'\n\t\t);\n\t}\n\n\treturn (\n\t\t<Ariakit.MenuButton\n\t\t\tref={ ref }\n\t\t\taccessibleWhenDisabled\n\t\t\tstore={ menuContext.store }\n\t\t\trender={\n\t\t\t\t<Item\n\t\t\t\t\t{ ...otherProps }\n\t\t\t\t\t// The menu item needs to register and be part of the parent menu.\n\t\t\t\t\t// Without specifying the store explicitly, the `Item` component\n\t\t\t\t\t// would otherwise read the store via context and pick up the one from\n\t\t\t\t\t// the sub-menu `Menu` component.\n\t\t\t\t\tstore={ menuContext.store.parent }\n\t\t\t\t\tsuffix={\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{ suffix }\n\t\t\t\t\t\t\t<Styled.SubmenuChevronIcon\n\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\ticon={ chevronRightSmall }\n\t\t\t\t\t\t\t\tsize={ 24 }\n\t\t\t\t\t\t\t\tpreserveAspectRatio=\"xMidYMid slice\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t}\n\t\t/>\n\t);\n} );\n","\"use client\";\nimport {\n MenuScopedContextProvider,\n useMenuProviderContext\n} from \"./B2J376ND.js\";\nimport {\n useCompositeTypeahead\n} from \"./T7VMP3TM.js\";\nimport {\n useComposite\n} from \"./ITI7HKP4.js\";\nimport {\n isHidden\n} from \"./VGCJ63VH.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./LMDWO4NN.js\";\nimport {\n useStoreState\n} from \"./YV4JVR4I.js\";\nimport {\n useEvent,\n useId,\n useMergeRefs,\n useWrapElement\n} from \"./ABQUS43J.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/menu/menu-list.tsx\nimport { invariant } from \"@ariakit/core/utils/misc\";\nimport { useEffect, useState } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"div\";\nfunction useAriaLabelledBy(_a) {\n var _b = _a, { store } = _b, props = __objRest(_b, [\"store\"]);\n const [id, setId] = useState(void 0);\n const label = props[\"aria-label\"];\n const disclosureElement = useStoreState(store, \"disclosureElement\");\n const contentElement = useStoreState(store, \"contentElement\");\n useEffect(() => {\n const disclosure = disclosureElement;\n if (!disclosure) return;\n const menu = contentElement;\n if (!menu) return;\n const menuLabel = label || menu.hasAttribute(\"aria-label\");\n if (menuLabel) {\n setId(void 0);\n } else if (disclosure.id) {\n setId(disclosure.id);\n }\n }, [label, disclosureElement, contentElement]);\n return id;\n}\nvar useMenuList = createHook(\n function useMenuList2(_a) {\n var _b = _a, { store, alwaysVisible, composite } = _b, props = __objRest(_b, [\"store\", \"alwaysVisible\", \"composite\"]);\n const context = useMenuProviderContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"MenuList must receive a `store` prop or be wrapped in a MenuProvider component.\"\n );\n const parentMenu = store.parent;\n const parentMenubar = store.menubar;\n const hasParentMenu = !!parentMenu;\n const id = useId(props.id);\n const onKeyDownProp = props.onKeyDown;\n const dir = store.useState(\n (state) => state.placement.split(\"-\")[0]\n );\n const orientation = store.useState(\n (state) => state.orientation === \"both\" ? void 0 : state.orientation\n );\n const isHorizontal = orientation !== \"vertical\";\n const isMenubarHorizontal = useStoreState(\n parentMenubar,\n (state) => !!state && state.orientation !== \"vertical\"\n );\n const onKeyDown = useEvent((event) => {\n onKeyDownProp == null ? void 0 : onKeyDownProp(event);\n if (event.defaultPrevented) return;\n if (hasParentMenu || parentMenubar && !isHorizontal) {\n const hideMap = {\n ArrowRight: () => dir === \"left\" && !isHorizontal,\n ArrowLeft: () => dir === \"right\" && !isHorizontal,\n ArrowUp: () => dir === \"bottom\" && isHorizontal,\n ArrowDown: () => dir === \"top\" && isHorizontal\n };\n const action = hideMap[event.key];\n if (action == null ? void 0 : action()) {\n event.stopPropagation();\n event.preventDefault();\n return store == null ? void 0 : store.hide();\n }\n }\n if (parentMenubar) {\n const keyMap = {\n ArrowRight: () => {\n if (!isMenubarHorizontal) return;\n return parentMenubar.next();\n },\n ArrowLeft: () => {\n if (!isMenubarHorizontal) return;\n return parentMenubar.previous();\n },\n ArrowDown: () => {\n if (isMenubarHorizontal) return;\n return parentMenubar.next();\n },\n ArrowUp: () => {\n if (isMenubarHorizontal) return;\n return parentMenubar.previous();\n }\n };\n const action = keyMap[event.key];\n const id2 = action == null ? void 0 : action();\n if (id2 !== void 0) {\n event.stopPropagation();\n event.preventDefault();\n parentMenubar.move(id2);\n }\n }\n });\n props = useWrapElement(\n props,\n (element) => /* @__PURE__ */ jsx(MenuScopedContextProvider, { value: store, children: element }),\n [store]\n );\n const ariaLabelledBy = useAriaLabelledBy(__spreadValues({ store }, props));\n const mounted = store.useState(\"mounted\");\n const hidden = isHidden(mounted, props.hidden, alwaysVisible);\n const style = hidden ? __spreadProps(__spreadValues({}, props.style), { display: \"none\" }) : props.style;\n props = __spreadProps(__spreadValues({\n id,\n \"aria-labelledby\": ariaLabelledBy,\n hidden\n }, props), {\n ref: useMergeRefs(id ? store.setContentElement : null, props.ref),\n style,\n onKeyDown\n });\n const hasCombobox = !!store.combobox;\n composite = composite != null ? composite : !hasCombobox;\n if (composite) {\n props = __spreadValues({\n role: \"menu\",\n \"aria-orientation\": orientation\n }, props);\n }\n props = useComposite(__spreadValues({ store, composite }, props));\n props = useCompositeTypeahead(__spreadValues({ store, typeahead: !hasCombobox }, props));\n return props;\n }\n);\nvar MenuList = forwardRef(function MenuList2(props) {\n const htmlProps = useMenuList(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n useMenuList,\n MenuList\n};\n","\"use client\";\nimport {\n useMenuList\n} from \"../__chunks/ASGALOAX.js\";\nimport {\n useMenuProviderContext\n} from \"../__chunks/B2J376ND.js\";\nimport \"../__chunks/62UHHO2X.js\";\nimport \"../__chunks/T7VMP3TM.js\";\nimport \"../__chunks/ITI7HKP4.js\";\nimport \"../__chunks/5VQZOHHZ.js\";\nimport \"../__chunks/P7GR5CS5.js\";\nimport \"../__chunks/VDHZ5F7K.js\";\nimport {\n useHovercard\n} from \"../__chunks/KQKDTOT4.js\";\nimport \"../__chunks/X7QOZUD3.js\";\nimport \"../__chunks/T6C2RYFI.js\";\nimport {\n createDialogComponent\n} from \"../__chunks/JC64G2H7.js\";\nimport \"../__chunks/63FEHJZV.js\";\nimport \"../__chunks/KZAQFFOU.js\";\nimport \"../__chunks/IGR4SXG2.js\";\nimport \"../__chunks/ESSM74HH.js\";\nimport \"../__chunks/BGQ3KQ5M.js\";\nimport \"../__chunks/YKJECYU7.js\";\nimport \"../__chunks/TOU75OXH.js\";\nimport \"../__chunks/WBDYNH73.js\";\nimport \"../__chunks/2PGBN2Y4.js\";\nimport \"../__chunks/63XF7ACK.js\";\nimport \"../__chunks/HLTQOHKZ.js\";\nimport \"../__chunks/677M2CI3.js\";\nimport \"../__chunks/6GXEOXGT.js\";\nimport \"../__chunks/AOUGVQZ3.js\";\nimport \"../__chunks/K2ZF5NU7.js\";\nimport \"../__chunks/ZWYATQFU.js\";\nimport \"../__chunks/5M6RIVE2.js\";\nimport \"../__chunks/O37CNYMR.js\";\nimport \"../__chunks/W3VI7GFU.js\";\nimport \"../__chunks/AOQQTIBO.js\";\nimport \"../__chunks/CZ4GFWYL.js\";\nimport \"../__chunks/VGCJ63VH.js\";\nimport \"../__chunks/XL7CSKGW.js\";\nimport \"../__chunks/EM5CXX6A.js\";\nimport \"../__chunks/MTZPJQMC.js\";\nimport \"../__chunks/RS7LB2H4.js\";\nimport \"../__chunks/S6EF7IVO.js\";\nimport \"../__chunks/LVA2YJMS.js\";\nimport \"../__chunks/SWN3JYXT.js\";\nimport \"../__chunks/XX67R432.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"../__chunks/LMDWO4NN.js\";\nimport \"../__chunks/BM6PGYQY.js\";\nimport \"../__chunks/WYCIER3C.js\";\nimport {\n useStoreState\n} from \"../__chunks/YV4JVR4I.js\";\nimport {\n useMergeRefs\n} from \"../__chunks/ABQUS43J.js\";\nimport \"../__chunks/SK3NAZA3.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"../__chunks/3YLGPPWQ.js\";\n\n// src/menu/menu.tsx\nimport { fireEvent } from \"@ariakit/core/utils/events\";\nimport { hasFocusWithin } from \"@ariakit/core/utils/focus\";\nimport { invariant, isFalsyBooleanCallback } from \"@ariakit/core/utils/misc\";\nimport { createRef, useEffect, useMemo, useRef, useState } from \"react\";\nvar TagName = \"div\";\nvar useMenu = createHook(function useMenu2(_a) {\n var _b = _a, {\n store,\n modal: modalProp = false,\n portal = !!modalProp,\n hideOnEscape = true,\n autoFocusOnShow = true,\n hideOnHoverOutside,\n alwaysVisible\n } = _b, props = __objRest(_b, [\n \"store\",\n \"modal\",\n \"portal\",\n \"hideOnEscape\",\n \"autoFocusOnShow\",\n \"hideOnHoverOutside\",\n \"alwaysVisible\"\n ]);\n const context = useMenuProviderContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"Menu must receive a `store` prop or be wrapped in a MenuProvider component.\"\n );\n const ref = useRef(null);\n const parentMenu = store.parent;\n const parentMenubar = store.menubar;\n const hasParentMenu = !!parentMenu;\n const parentIsMenubar = !!parentMenubar && !hasParentMenu;\n props = __spreadProps(__spreadValues({}, props), {\n ref: useMergeRefs(ref, props.ref)\n });\n const _a2 = useMenuList(__spreadValues({\n store,\n alwaysVisible\n }, props)), { \"aria-labelledby\": ariaLabelledBy } = _a2, menuListProps = __objRest(_a2, [\"aria-labelledby\"]);\n props = menuListProps;\n const [initialFocusRef, setInitialFocusRef] = useState();\n const autoFocusOnShowState = store.useState(\"autoFocusOnShow\");\n const initialFocus = store.useState(\"initialFocus\");\n const baseElement = store.useState(\"baseElement\");\n const items = store.useState(\"renderedItems\");\n useEffect(() => {\n let cleaning = false;\n setInitialFocusRef((prevInitialFocusRef) => {\n var _a3, _b2, _c;\n if (cleaning) return;\n if (!autoFocusOnShowState) return;\n if ((_a3 = prevInitialFocusRef == null ? void 0 : prevInitialFocusRef.current) == null ? void 0 : _a3.isConnected) return prevInitialFocusRef;\n const ref2 = createRef();\n switch (initialFocus) {\n case \"first\":\n ref2.current = ((_b2 = items.find((item) => !item.disabled && item.element)) == null ? void 0 : _b2.element) || null;\n break;\n case \"last\":\n ref2.current = ((_c = [...items].reverse().find((item) => !item.disabled && item.element)) == null ? void 0 : _c.element) || null;\n break;\n default:\n ref2.current = baseElement;\n }\n return ref2;\n });\n return () => {\n cleaning = true;\n };\n }, [store, autoFocusOnShowState, initialFocus, items, baseElement]);\n const modal = hasParentMenu ? false : modalProp;\n const mayAutoFocusOnShow = !!autoFocusOnShow;\n const canAutoFocusOnShow = !!initialFocusRef || !!props.initialFocus || !!modal;\n const contentElement = useStoreState(\n store.combobox || store,\n \"contentElement\"\n );\n const parentContentElement = useStoreState(\n (parentMenu == null ? void 0 : parentMenu.combobox) || parentMenu,\n \"contentElement\"\n );\n const preserveTabOrderAnchor = useMemo(() => {\n if (!parentContentElement) return;\n if (!contentElement) return;\n const role = contentElement.getAttribute(\"role\");\n const parentRole = parentContentElement.getAttribute(\"role\");\n const parentIsMenuOrMenubar = parentRole === \"menu\" || parentRole === \"menubar\";\n if (parentIsMenuOrMenubar && role === \"menu\") return;\n return parentContentElement;\n }, [contentElement, parentContentElement]);\n if (preserveTabOrderAnchor !== void 0) {\n props = __spreadValues({\n preserveTabOrderAnchor\n }, props);\n }\n props = useHovercard(__spreadProps(__spreadValues({\n store,\n alwaysVisible,\n initialFocus: initialFocusRef,\n autoFocusOnShow: mayAutoFocusOnShow ? canAutoFocusOnShow && autoFocusOnShow : autoFocusOnShowState || !!modal\n }, props), {\n hideOnEscape(event) {\n if (isFalsyBooleanCallback(hideOnEscape, event)) return false;\n store == null ? void 0 : store.hideAll();\n return true;\n },\n hideOnHoverOutside(event) {\n const disclosureElement = store == null ? void 0 : store.getState().disclosureElement;\n const getHideOnHoverOutside = () => {\n if (typeof hideOnHoverOutside === \"function\") {\n return hideOnHoverOutside(event);\n }\n if (hideOnHoverOutside != null) return hideOnHoverOutside;\n if (hasParentMenu) return true;\n if (!parentIsMenubar) return false;\n if (!disclosureElement) return true;\n if (hasFocusWithin(disclosureElement)) return false;\n return true;\n };\n if (!getHideOnHoverOutside()) return false;\n if (event.defaultPrevented) return true;\n if (!hasParentMenu) return true;\n if (!disclosureElement) return true;\n fireEvent(disclosureElement, \"mouseout\", event);\n if (!hasFocusWithin(disclosureElement)) return true;\n requestAnimationFrame(() => {\n if (hasFocusWithin(disclosureElement)) return;\n store == null ? void 0 : store.hide();\n });\n return false;\n },\n modal,\n portal,\n backdrop: hasParentMenu ? false : props.backdrop\n }));\n props = __spreadValues({\n \"aria-labelledby\": ariaLabelledBy\n }, props);\n return props;\n});\nvar Menu = createDialogComponent(\n forwardRef(function Menu2(props) {\n const htmlProps = useMenu(props);\n return createElement(TagName, htmlProps);\n }),\n useMenuProviderContext\n);\nexport {\n Menu,\n useMenu\n};\n","/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseContext,\n\tuseMemo,\n\tforwardRef,\n\tuseCallback,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport type { PopoverProps } from './types';\nimport * as Styled from './styles';\nimport { Context } from './context';\n\nexport const Popover = forwardRef<\n\tHTMLDivElement,\n\tWordPressComponentProps< PopoverProps, 'div', false >\n>( function Popover(\n\t{ gutter, children, shift, modal = true, ...otherProps },\n\tref\n) {\n\tconst menuContext = useContext( Context );\n\n\t// Extract the side from the applied placement — useful for animations.\n\t// Using `currentPlacement` instead of `placement` to make sure that we\n\t// use the final computed placement (including \"flips\" etc).\n\tconst appliedPlacementSide = Ariakit.useStoreState(\n\t\tmenuContext?.store,\n\t\t'currentPlacement'\n\t)?.split( '-' )[ 0 ];\n\n\tconst hideOnEscape = useCallback(\n\t\t( event: React.KeyboardEvent< Element > ) => {\n\t\t\t// Pressing Escape can cause unexpected consequences (ie. exiting\n\t\t\t// full screen mode on MacOs, close parent modals...).\n\t\t\tevent.preventDefault();\n\t\t\t// Returning `true` causes the menu to hide.\n\t\t\treturn true;\n\t\t},\n\t\t[]\n\t);\n\n\tconst computedDirection = Ariakit.useStoreState( menuContext?.store, 'rtl' )\n\t\t? 'rtl'\n\t\t: 'ltr';\n\n\tconst wrapperProps = useMemo(\n\t\t() => ( {\n\t\t\tdir: computedDirection,\n\t\t\tstyle: {\n\t\t\t\tdirection:\n\t\t\t\t\tcomputedDirection as React.CSSProperties[ 'direction' ],\n\t\t\t},\n\t\t} ),\n\t\t[ computedDirection ]\n\t);\n\n\tif ( ! menuContext?.store ) {\n\t\tthrow new Error(\n\t\t\t'Menu.Popover can only be rendered inside a Menu component'\n\t\t);\n\t}\n\n\treturn (\n\t\t<Ariakit.Menu\n\t\t\t{ ...otherProps }\n\t\t\tref={ ref }\n\t\t\tmodal={ modal }\n\t\t\tstore={ menuContext.store }\n\t\t\t// Root menu has an 8px distance from its trigger,\n\t\t\t// otherwise 0 (which causes the submenu to slightly overlap)\n\t\t\tgutter={ gutter ?? ( menuContext.store.parent ? 0 : 8 ) }\n\t\t\t// Align nested menu by the same (but opposite) amount\n\t\t\t// as the menu container's padding.\n\t\t\tshift={ shift ?? ( menuContext.store.parent ? -4 : 0 ) }\n\t\t\thideOnHoverOutside={ false }\n\t\t\tdata-side={ appliedPlacementSide }\n\t\t\twrapperProps={ wrapperProps }\n\t\t\thideOnEscape={ hideOnEscape }\n\t\t\tunmountOnHide\n\t\t\trender={ ( renderProps ) => (\n\t\t\t\t// Two wrappers are needed for the entry animation, where the menu\n\t\t\t\t// container scales with a different factor than its contents.\n\t\t\t\t// The {...renderProps} are passed to the inner wrapper, so that the\n\t\t\t\t// menu element is the direct parent of the menu item elements.\n\t\t\t\t<Styled.PopoverOuterWrapper variant={ menuContext.variant }>\n\t\t\t\t\t<Styled.PopoverInnerWrapper { ...renderProps } />\n\t\t\t\t</Styled.PopoverOuterWrapper>\n\t\t\t) }\n\t\t>\n\t\t\t{ children }\n\t\t</Ariakit.Menu>\n\t);\n} );\n","/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { useContext, useMemo } from '@wordpress/element';\nimport { isRTL as isRTLFn } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem, contextConnectWithoutRef } from '../context';\nimport type { ContextProps, Props } from './types';\nimport { Context } from './context';\nimport { Item } from './item';\nimport { CheckboxItem } from './checkbox-item';\nimport { RadioItem } from './radio-item';\nimport { Group } from './group';\nimport { GroupLabel } from './group-label';\nimport { Separator } from './separator';\nimport { ItemLabel } from './item-label';\nimport { ItemHelpText } from './item-help-text';\nimport { TriggerButton } from './trigger-button';\nimport { SubmenuTriggerItem } from './submenu-trigger-item';\nimport { Popover } from './popover';\n\nconst UnconnectedMenu = ( props: Props ) => {\n\tconst {\n\t\tchildren,\n\t\tdefaultOpen = false,\n\t\topen,\n\t\tonOpenChange,\n\t\tplacement,\n\n\t\t// From internal components context\n\t\tvariant,\n\t} = useContextSystem<\n\t\t// @ts-expect-error TODO: missing 'className' in MenuProps\n\t\ttypeof props & Pick< ContextProps, 'variant' >\n\t>( props, 'Menu' );\n\n\tconst parentContext = useContext( Context );\n\n\tconst rtl = isRTLFn();\n\n\t// If an explicit value for the `placement` prop is not passed,\n\t// apply a default placement of `bottom-start` for the root menu popover,\n\t// and of `right-start` for nested menu popovers.\n\tlet computedPlacement =\n\t\tplacement ?? ( parentContext?.store ? 'right-start' : 'bottom-start' );\n\t// Swap left/right in case of RTL direction\n\tif ( rtl ) {\n\t\tif ( /right/.test( computedPlacement ) ) {\n\t\t\tcomputedPlacement = computedPlacement.replace(\n\t\t\t\t'right',\n\t\t\t\t'left'\n\t\t\t) as typeof computedPlacement;\n\t\t} else if ( /left/.test( computedPlacement ) ) {\n\t\t\tcomputedPlacement = computedPlacement.replace(\n\t\t\t\t'left',\n\t\t\t\t'right'\n\t\t\t) as typeof computedPlacement;\n\t\t}\n\t}\n\n\tconst menuStore = Ariakit.useMenuStore( {\n\t\tparent: parentContext?.store,\n\t\topen,\n\t\tdefaultOpen,\n\t\tplacement: computedPlacement,\n\t\tfocusLoop: true,\n\t\tsetOpen( willBeOpen ) {\n\t\t\tonOpenChange?.( willBeOpen );\n\t\t},\n\t\trtl,\n\t} );\n\n\tconst contextValue = useMemo(\n\t\t() => ( { store: menuStore, variant } ),\n\t\t[ menuStore, variant ]\n\t);\n\n\treturn (\n\t\t<Context.Provider value={ contextValue }>{ children }</Context.Provider>\n\t);\n};\n\n/**\n * Menu is a collection of React components that combine to render\n * ARIA-compliant [menu](https://www.w3.org/WAI/ARIA/apg/patterns/menu/) and\n * [menu button](https://www.w3.org/WAI/ARIA/apg/patterns/menubutton/) patterns.\n *\n * `Menu` itself is a wrapper component and context provider.\n * It is responsible for managing the state of the menu and its items, and for\n * rendering the `Menu.TriggerButton` (or the `Menu.SubmenuTriggerItem`)\n * component, and the `Menu.Popover` component.\n */\nexport const Menu = Object.assign(\n\tcontextConnectWithoutRef( UnconnectedMenu, 'Menu' ),\n\t{\n\t\tContext: Object.assign( Context, {\n\t\t\tdisplayName: 'Menu.Context',\n\t\t} ),\n\t\t/**\n\t\t * Renders a menu item inside the `Menu.Popover` or `Menu.Group` components.\n\t\t *\n\t\t * It can optionally contain one instance of the `Menu.ItemLabel` component\n\t\t * and one instance of the `Menu.ItemHelpText` component.\n\t\t */\n\t\tItem: Object.assign( Item, {\n\t\t\tdisplayName: 'Menu.Item',\n\t\t} ),\n\t\t/**\n\t\t * Renders a radio menu item inside the `Menu.Popover` or `Menu.Group`\n\t\t * components.\n\t\t *\n\t\t * It can optionally contain one instance of the `Menu.ItemLabel` component\n\t\t * and one instance of the `Menu.ItemHelpText` component.\n\t\t */\n\t\tRadioItem: Object.assign( RadioItem, {\n\t\t\tdisplayName: 'Menu.RadioItem',\n\t\t} ),\n\t\t/**\n\t\t * Renders a checkbox menu item inside the `Menu.Popover` or `Menu.Group`\n\t\t * components.\n\t\t *\n\t\t * It can optionally contain one instance of the `Menu.ItemLabel` component\n\t\t * and one instance of the `Menu.ItemHelpText` component.\n\t\t */\n\t\tCheckboxItem: Object.assign( CheckboxItem, {\n\t\t\tdisplayName: 'Menu.CheckboxItem',\n\t\t} ),\n\t\t/**\n\t\t * Renders a group for menu items.\n\t\t *\n\t\t * It should contain one instance of `Menu.GroupLabel` and one or more\n\t\t * instances of `Menu.Item`, `Menu.RadioItem`, or `Menu.CheckboxItem`.\n\t\t */\n\t\tGroup: Object.assign( Group, {\n\t\t\tdisplayName: 'Menu.Group',\n\t\t} ),\n\t\t/**\n\t\t * Renders a label in a menu group.\n\t\t *\n\t\t * This component should be wrapped with `Menu.Group` so the\n\t\t * `aria-labelledby` is correctly set on the group element.\n\t\t */\n\t\tGroupLabel: Object.assign( GroupLabel, {\n\t\t\tdisplayName: 'Menu.GroupLabel',\n\t\t} ),\n\t\t/**\n\t\t * Renders a divider between menu items or menu groups.\n\t\t */\n\t\tSeparator: Object.assign( Separator, {\n\t\t\tdisplayName: 'Menu.Separator',\n\t\t} ),\n\t\t/**\n\t\t * Renders a menu item's label text. It should be wrapped with `Menu.Item`,\n\t\t * `Menu.RadioItem`, or `Menu.CheckboxItem`.\n\t\t */\n\t\tItemLabel: Object.assign( ItemLabel, {\n\t\t\tdisplayName: 'Menu.ItemLabel',\n\t\t} ),\n\t\t/**\n\t\t * Renders a menu item's help text. It should be wrapped with `Menu.Item`,\n\t\t * `Menu.RadioItem`, or `Menu.CheckboxItem`.\n\t\t */\n\t\tItemHelpText: Object.assign( ItemHelpText, {\n\t\t\tdisplayName: 'Menu.ItemHelpText',\n\t\t} ),\n\t\t/**\n\t\t * Renders a dropdown menu element that's controlled by a sibling\n\t\t * `Menu.TriggerButton` component. It renders a popover and automatically\n\t\t * focuses on items when the menu is shown.\n\t\t *\n\t\t * The only valid children of `Menu.Popover` are `Menu.Item`,\n\t\t * `Menu.RadioItem`, `Menu.CheckboxItem`, `Menu.Group`, `Menu.Separator`,\n\t\t * and `Menu` (for nested dropdown menus).\n\t\t */\n\t\tPopover: Object.assign( Popover, {\n\t\t\tdisplayName: 'Menu.Popover',\n\t\t} ),\n\t\t/**\n\t\t * Renders a menu button that toggles the visibility of a sibling\n\t\t * `Menu.Popover` component when clicked or when using arrow keys.\n\t\t */\n\t\tTriggerButton: Object.assign( TriggerButton, {\n\t\t\tdisplayName: 'Menu.TriggerButton',\n\t\t} ),\n\t\t/**\n\t\t * Renders a menu item that toggles the visibility of a sibling\n\t\t * `Menu.Popover` component when clicked or when using arrow keys.\n\t\t *\n\t\t * This component is used to create a nested dropdown menu.\n\t\t */\n\t\tSubmenuTriggerItem: Object.assign( SubmenuTriggerItem, {\n\t\t\tdisplayName: 'Menu.SubmenuTriggerItem',\n\t\t} ),\n\t}\n);\n\nexport default Menu;\n","\"use client\";\nimport {\n useMenuContext\n} from \"./B2J376ND.js\";\nimport {\n useMenubarContext\n} from \"./62UHHO2X.js\";\nimport {\n useComboboxProviderContext\n} from \"./VEVQD5MH.js\";\nimport {\n useCompositeStoreProps\n} from \"./4CMBR7SL.js\";\nimport {\n useHovercardStoreProps\n} from \"./FTXTWCCT.js\";\nimport {\n useStore,\n useStoreProps\n} from \"./YV4JVR4I.js\";\nimport {\n useUpdateEffect\n} from \"./ABQUS43J.js\";\nimport {\n __spreadProps,\n __spreadValues\n} from \"./3YLGPPWQ.js\";\n\n// src/menu/menu-store.ts\nimport * as Core from \"@ariakit/core/menu/menu-store\";\nfunction useMenuStoreProps(store, update, props) {\n useUpdateEffect(update, [props.combobox, props.parent, props.menubar]);\n useStoreProps(store, props, \"values\", \"setValues\");\n return Object.assign(\n useHovercardStoreProps(\n useCompositeStoreProps(store, update, props),\n update,\n props\n ),\n {\n combobox: props.combobox,\n parent: props.parent,\n menubar: props.menubar\n }\n );\n}\nfunction useMenuStore(props = {}) {\n const parent = useMenuContext();\n const menubar = useMenubarContext();\n const combobox = useComboboxProviderContext();\n props = __spreadProps(__spreadValues({}, props), {\n parent: props.parent !== void 0 ? props.parent : parent,\n menubar: props.menubar !== void 0 ? props.menubar : menubar,\n combobox: props.combobox !== void 0 ? props.combobox : combobox\n });\n const [store, update] = useStore(Core.createMenuStore, props);\n return useMenuStoreProps(store, update, props);\n}\n\nexport {\n useMenuStoreProps,\n useMenuStore\n};\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport type { ThemeOutputValues } from './types';\n\nexport const colorVariables = ( { colors }: ThemeOutputValues ) => {\n\tconst shades = Object.entries( colors.gray || {} )\n\t\t.map( ( [ k, v ] ) => `--wp-components-color-gray-${ k }: ${ v };` )\n\t\t.join( '' );\n\n\treturn [\n\t\tcss`\n\t\t\t--wp-components-color-accent: ${ colors.accent };\n\t\t\t--wp-components-color-accent-darker-10: ${ colors.accentDarker10 };\n\t\t\t--wp-components-color-accent-darker-20: ${ colors.accentDarker20 };\n\t\t\t--wp-components-color-accent-inverted: ${ colors.accentInverted };\n\n\t\t\t--wp-components-color-background: ${ colors.background };\n\t\t\t--wp-components-color-foreground: ${ colors.foreground };\n\t\t\t--wp-components-color-foreground-inverted: ${ colors.foregroundInverted };\n\n\t\t\t${ shades }\n\t\t`,\n\t];\n};\n\nexport const Wrapper = styled.div`\n\tcolor: var( --wp-components-color-foreground, currentColor );\n`;\n","/**\n * External dependencies\n */\nimport { colord, extend } from 'colord';\nimport a11yPlugin from 'colord/plugins/a11y';\nimport namesPlugin from 'colord/plugins/names';\n\n/**\n * WordPress dependencies\n */\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport type { ThemeInputValues, ThemeOutputValues } from './types';\nimport { COLORS } from '../utils';\n\nextend( [ namesPlugin, a11yPlugin ] );\n\nexport function generateThemeVariables(\n\tinputs: ThemeInputValues\n): ThemeOutputValues {\n\tvalidateInputs( inputs );\n\n\tconst generatedColors = {\n\t\t...generateAccentDependentColors( inputs.accent ),\n\t\t...generateBackgroundDependentColors( inputs.background ),\n\t};\n\n\twarnContrastIssues( checkContrasts( inputs, generatedColors ) );\n\n\treturn { colors: generatedColors };\n}\n\nfunction validateInputs( inputs: ThemeInputValues ) {\n\tfor ( const [ key, value ] of Object.entries( inputs ) ) {\n\t\tif ( typeof value !== 'undefined' && ! colord( value ).isValid() ) {\n\t\t\twarning(\n\t\t\t\t`wp.components.Theme: \"${ value }\" is not a valid color value for the '${ key }' prop.`\n\t\t\t);\n\t\t}\n\t}\n}\n\nexport function checkContrasts(\n\tinputs: ThemeInputValues,\n\toutputs: ThemeOutputValues[ 'colors' ]\n) {\n\tconst background = inputs.background || COLORS.white;\n\tconst accent = inputs.accent || '#3858e9';\n\tconst foreground = outputs.foreground || COLORS.gray[ 900 ];\n\tconst gray = outputs.gray || COLORS.gray;\n\n\treturn {\n\t\taccent: colord( background ).isReadable( accent )\n\t\t\t? undefined\n\t\t\t: `The background color (\"${ background }\") does not have sufficient contrast against the accent color (\"${ accent }\").`,\n\t\tforeground: colord( background ).isReadable( foreground )\n\t\t\t? undefined\n\t\t\t: `The background color provided (\"${ background }\") does not have sufficient contrast against the standard foreground colors.`,\n\t\tgrays:\n\t\t\tcolord( background ).contrast( gray[ 600 ] ) >= 3 &&\n\t\t\tcolord( background ).contrast( gray[ 700 ] ) >= 4.5\n\t\t\t\t? undefined\n\t\t\t\t: `The background color provided (\"${ background }\") cannot generate a set of grayscale foreground colors with sufficient contrast. Try adjusting the color to be lighter or darker.`,\n\t};\n}\n\nfunction warnContrastIssues( issues: ReturnType< typeof checkContrasts > ) {\n\tfor ( const error of Object.values( issues ) ) {\n\t\tif ( error ) {\n\t\t\twarning( 'wp.components.Theme: ' + error );\n\t\t}\n\t}\n}\n\nfunction generateAccentDependentColors( accent?: string ) {\n\tif ( ! accent ) {\n\t\treturn {};\n\t}\n\n\treturn {\n\t\taccent,\n\t\taccentDarker10: colord( accent ).darken( 0.1 ).toHex(),\n\t\taccentDarker20: colord( accent ).darken( 0.2 ).toHex(),\n\t\taccentInverted: getForegroundForColor( accent ),\n\t};\n}\n\nfunction generateBackgroundDependentColors( background?: string ) {\n\tif ( ! background ) {\n\t\treturn {};\n\t}\n\n\tconst foreground = getForegroundForColor( background );\n\n\treturn {\n\t\tbackground,\n\t\tforeground,\n\t\tforegroundInverted: getForegroundForColor( foreground ),\n\t\tgray: generateShades( background, foreground ),\n\t};\n}\n\nfunction getForegroundForColor( color: string ) {\n\treturn colord( color ).isDark() ? COLORS.white : COLORS.gray[ 900 ];\n}\n\nexport function generateShades( background: string, foreground: string ) {\n\t// How much darkness you need to add to #fff to get the COLORS.gray[n] color\n\tconst SHADES = {\n\t\t100: 0.06,\n\t\t200: 0.121,\n\t\t300: 0.132,\n\t\t400: 0.2,\n\t\t600: 0.42,\n\t\t700: 0.543,\n\t\t800: 0.821,\n\t};\n\n\t// Darkness of COLORS.gray[ 900 ], relative to #fff\n\tconst limit = 0.884;\n\n\tconst direction = colord( background ).isDark() ? 'lighten' : 'darken';\n\n\t// Lightness delta between the background and foreground colors\n\tconst range =\n\t\tMath.abs(\n\t\t\tcolord( background ).toHsl().l - colord( foreground ).toHsl().l\n\t\t) / 100;\n\n\tconst result: Record< number, string > = {};\n\n\tObject.entries( SHADES ).forEach( ( [ key, value ] ) => {\n\t\tresult[ parseInt( key ) ] = colord( background )\n\t\t\t[ direction ]( ( value / limit ) * range )\n\t\t\t.toHex();\n\t} );\n\n\treturn result as NonNullable< ThemeOutputValues[ 'colors' ][ 'gray' ] >;\n}\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { ThemeProps } from './types';\nimport type { WordPressComponentProps } from '../context';\nimport { colorVariables, Wrapper } from './styles';\nimport { generateThemeVariables } from './color-algorithms';\nimport { useCx } from '../utils';\n\n/**\n * `Theme` allows defining theme variables for components in the `@wordpress/components` package.\n *\n * Multiple `Theme` components can be nested in order to override specific theme variables.\n *\n *\n * ```jsx\n * const Example = () => {\n * return (\n * <Theme accent=\"red\">\n * <Button variant=\"primary\">I'm red</Button>\n * <Theme accent=\"blue\">\n * <Button variant=\"primary\">I'm blue</Button>\n * </Theme>\n * </Theme>\n * );\n * };\n * ```\n */\nfunction Theme( {\n\taccent,\n\tbackground,\n\tclassName,\n\t...props\n}: WordPressComponentProps< ThemeProps, 'div', true > ) {\n\tconst cx = useCx();\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\t...colorVariables(\n\t\t\t\t\tgenerateThemeVariables( { accent, background } )\n\t\t\t\t),\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ accent, background, className, cx ]\n\t);\n\n\treturn <Wrapper className={ classes } { ...props } />;\n}\n\nexport default Theme;\n","/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { TabsContextProps } from './types';\n\nexport const TabsContext = createContext< TabsContextProps >( undefined );\n\nexport const useTabsContext = () => useContext( TabsContext );\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * Internal dependencies\n */\nimport { COLORS, CONFIG } from '../utils';\nimport { space } from '../utils/space';\nimport Icon from '../icon';\n\nexport const StyledTabList = styled( Ariakit.TabList )`\n\tdisplay: flex;\n\talign-items: stretch;\n\toverflow-x: auto;\n\n\t&[aria-orientation='vertical'] {\n\t\tflex-direction: column;\n\t}\n\n\t:where( [aria-orientation='horizontal'] ) {\n\t\twidth: fit-content;\n\t}\n\n\t--direction-factor: 1;\n\t--direction-start: left;\n\t--direction-end: right;\n\t--selected-start: var( --selected-left, 0 );\n\t&:dir( rtl ) {\n\t\t--direction-factor: -1;\n\t\t--direction-start: right;\n\t\t--direction-end: left;\n\t\t--selected-start: var( --selected-right, 0 );\n\t}\n\n\t@media not ( prefers-reduced-motion ) {\n\t\t&[data-indicator-animated]::before {\n\t\t\ttransition-property: transform, border-radius, border-block;\n\t\t\ttransition-duration: 0.2s;\n\t\t\ttransition-timing-function: ease-out;\n\t\t}\n\t}\n\tposition: relative;\n\t&::before {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\tpointer-events: none;\n\t\ttransform-origin: var( --direction-start ) top;\n\n\t\t// Windows high contrast mode.\n\t\toutline: 2px solid transparent;\n\t\toutline-offset: -1px;\n\t}\n\n\t/* Using a large value to avoid antialiasing rounding issues\n\t\t\twhen scaling in the transform, see: https://stackoverflow.com/a/52159123 */\n\t--antialiasing-factor: 100;\n\t&[aria-orientation='horizontal'] {\n\t\t--fade-width: 4rem;\n\t\t--fade-gradient-base: transparent 0%, black var( --fade-width );\n\t\t--fade-gradient-composed: var( --fade-gradient-base ), black 60%,\n\t\t\ttransparent 50%;\n\t\t&.is-overflowing-first {\n\t\t\tmask-image: linear-gradient(\n\t\t\t\tto var( --direction-end ),\n\t\t\t\tvar( --fade-gradient-base )\n\t\t\t);\n\t\t}\n\t\t&.is-overflowing-last {\n\t\t\tmask-image: linear-gradient(\n\t\t\t\tto var( --direction-start ),\n\t\t\t\tvar( --fade-gradient-base )\n\t\t\t);\n\t\t}\n\t\t&.is-overflowing-first.is-overflowing-last {\n\t\t\tmask-image: linear-gradient(\n\t\t\t\t\tto right,\n\t\t\t\t\tvar( --fade-gradient-composed )\n\t\t\t\t),\n\t\t\t\tlinear-gradient( to left, var( --fade-gradient-composed ) );\n\t\t}\n\n\t\t&::before {\n\t\t\tbottom: 0;\n\t\t\theight: 0;\n\t\t\twidth: calc( var( --antialiasing-factor ) * 1px );\n\t\t\ttransform: translateX(\n\t\t\t\t\tcalc(\n\t\t\t\t\t\tvar( --selected-start ) * var( --direction-factor ) *\n\t\t\t\t\t\t\t1px\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\tscaleX(\n\t\t\t\t\tcalc(\n\t\t\t\t\t\tvar( --selected-width, 0 ) /\n\t\t\t\t\t\t\tvar( --antialiasing-factor )\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\tborder-bottom: var( --wp-admin-border-width-focus ) solid\n\t\t\t\t${ COLORS.theme.accent };\n\t\t}\n\t}\n\t&[aria-orientation='vertical'] {\n\t\t&::before {\n\t\t\t/* Adjusting the border radius to match the scaling in the y axis. */\n\t\t\tborder-radius: ${ CONFIG.radiusSmall } /\n\t\t\t\tcalc(\n\t\t\t\t\t${ CONFIG.radiusSmall } /\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\tvar( --selected-height, 0 ) /\n\t\t\t\t\t\t\t\tvar( --antialiasing-factor )\n\t\t\t\t\t\t)\n\t\t\t\t);\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: calc( var( --antialiasing-factor ) * 1px );\n\t\t\ttransform: translateY( calc( var( --selected-top, 0 ) * 1px ) )\n\t\t\t\tscaleY(\n\t\t\t\t\tcalc(\n\t\t\t\t\t\tvar( --selected-height, 0 ) /\n\t\t\t\t\t\t\tvar( --antialiasing-factor )\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\tbackground-color: color-mix(\n\t\t\t\tin srgb,\n\t\t\t\t${ COLORS.theme.accent },\n\t\t\t\ttransparent 96%\n\t\t\t);\n\t\t}\n\t\t&[data-select-on-move='true']:has(\n\t\t\t\t:is( :focus-visible, [data-focus-visible] )\n\t\t\t)::before {\n\t\t\tbox-sizing: border-box;\n\t\t\tborder: var( --wp-admin-border-width-focus ) solid\n\t\t\t\t${ COLORS.theme.accent };\n\t\t\t/* Adjusting the border width to match the scaling in the y axis. */\n\t\t\tborder-block-width: calc(\n\t\t\t\tvar( --wp-admin-border-width-focus, 1px ) /\n\t\t\t\t\t(\n\t\t\t\t\t\tvar( --selected-height, 0 ) /\n\t\t\t\t\t\t\tvar( --antialiasing-factor )\n\t\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}\n`;\n\nexport const Tab = styled( Ariakit.Tab )`\n\t& {\n\t\t/* Resets */\n\t\tborder-radius: 0;\n\t\tbackground: transparent;\n\t\tborder: none;\n\t\tbox-shadow: none;\n\n\t\tflex: 1 0 auto;\n\t\twhite-space: nowrap;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tcursor: pointer;\n\t\tline-height: 1.2; // Characters in some languages (e.g. Japanese) may have a native higher line-height.\n\t\tfont-weight: 400;\n\t\tcolor: ${ COLORS.theme.foreground };\n\n\t\t&[aria-disabled='true'] {\n\t\t\tcursor: default;\n\t\t\tcolor: ${ COLORS.ui.textDisabled };\n\t\t}\n\n\t\t&:not( [aria-disabled='true'] ):is( :hover, [data-focus-visible] ) {\n\t\t\tcolor: ${ COLORS.theme.accent };\n\t\t}\n\n\t\t&:focus:not( :disabled ) {\n\t\t\tbox-shadow: none;\n\t\t\toutline: none;\n\t\t}\n\n\t\t// Focus indicator.\n\t\tposition: relative;\n\t\t&::after {\n\t\t\tposition: absolute;\n\t\t\tpointer-events: none;\n\n\t\t\t// Draw the indicator.\n\t\t\t// Outline works for Windows high contrast mode as well.\n\t\t\toutline: var( --wp-admin-border-width-focus ) solid\n\t\t\t\t${ COLORS.theme.accent };\n\t\t\tborder-radius: ${ CONFIG.radiusSmall };\n\n\t\t\t// Animation\n\t\t\topacity: 0;\n\n\t\t\t@media not ( prefers-reduced-motion ) {\n\t\t\t\ttransition: opacity 0.1s linear;\n\t\t\t}\n\t\t}\n\n\t\t&[data-focus-visible]::after {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\n\t[aria-orientation='horizontal'] & {\n\t\tpadding-inline: ${ space( 4 ) };\n\t\theight: ${ space( 12 ) };\n\t\tscroll-margin: 24px;\n\n\t\t&::after {\n\t\t\tcontent: '';\n\t\t\tinset: ${ space( 3 ) };\n\t\t}\n\t}\n\n\t[aria-orientation='vertical'] & {\n\t\tpadding: ${ space( 2 ) } ${ space( 3 ) };\n\t\tmin-height: ${ space( 10 ) };\n\n\t\t&[aria-selected='true'] {\n\t\t\tcolor: ${ COLORS.theme.accent };\n\t\t\tfill: currentColor;\n\t\t}\n\t}\n\t[aria-orientation='vertical'][data-select-on-move='false'] &::after {\n\t\tcontent: '';\n\t\tinset: var( --wp-admin-border-width-focus );\n\t}\n`;\n\nexport const TabChildren = styled.span`\n\tflex-grow: 1;\n\n\tdisplay: flex;\n\talign-items: center;\n\n\t[aria-orientation='horizontal'] & {\n\t\tjustify-content: center;\n\t}\n\t[aria-orientation='vertical'] & {\n\t\tjustify-content: start;\n\t}\n`;\n\nexport const TabChevron = styled( Icon )`\n\tflex-shrink: 0;\n\tmargin-inline-end: ${ space( -1 ) };\n\t[aria-orientation='horizontal'] & {\n\t\tdisplay: none;\n\t}\n\topacity: 0;\n\t[role='tab']:is( [aria-selected='true'], [data-focus-visible], :hover ) & {\n\t\topacity: 1;\n\t}\n\t// The chevron is transitioned into existence when selectOnMove is enabled,\n\t// because otherwise it looks jarring, as it shows up outside of the focus\n\t// indicator that's being animated at the same time.\n\t@media not ( prefers-reduced-motion ) {\n\t\t[data-select-on-move='true']\n\t\t\t[role='tab']:is( [aria-selected='true'], )\n\t\t\t& {\n\t\t\ttransition: opacity 0.15s 0.15s linear;\n\t\t}\n\t}\n\t&:dir( rtl ) {\n\t\trotate: 180deg;\n\t}\n`;\n\nexport const TabPanel = styled( Ariakit.TabPanel )`\n\t&:focus {\n\t\tbox-shadow: none;\n\t\toutline: none;\n\t}\n\n\t&[data-focus-visible] {\n\t\tbox-shadow: 0 0 0 var( --wp-admin-border-width-focus )\n\t\t\t${ COLORS.theme.accent };\n\t\t// Windows high contrast mode.\n\t\toutline: 2px solid transparent;\n\t\toutline-offset: 0;\n\t}\n`;\n","/**\n * WordPress dependencies\n */\n\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { TabProps } from './types';\nimport warning from '@wordpress/warning';\nimport { useTabsContext } from './context';\nimport {\n\tTab as StyledTab,\n\tTabChildren as StyledTabChildren,\n\tTabChevron as StyledTabChevron,\n} from './styles';\nimport type { WordPressComponentProps } from '../context';\nimport { chevronRight } from '@wordpress/icons';\n\nexport const Tab = forwardRef<\n\tHTMLButtonElement,\n\tOmit< WordPressComponentProps< TabProps, 'button', false >, 'id' >\n>( function Tab( { children, tabId, disabled, render, ...otherProps }, ref ) {\n\tconst { store, instanceId } = useTabsContext() ?? {};\n\n\tif ( ! store ) {\n\t\twarning( '`Tabs.Tab` must be wrapped in a `Tabs` component.' );\n\t\treturn null;\n\t}\n\n\tconst instancedTabId = `${ instanceId }-${ tabId }`;\n\n\treturn (\n\t\t<StyledTab\n\t\t\tref={ ref }\n\t\t\tstore={ store }\n\t\t\tid={ instancedTabId }\n\t\t\tdisabled={ disabled }\n\t\t\trender={ render }\n\t\t\t{ ...otherProps }\n\t\t>\n\t\t\t<StyledTabChildren>{ children }</StyledTabChildren>\n\t\t\t<StyledTabChevron icon={ chevronRight } />\n\t\t</StyledTab>\n\t);\n} );\n","/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport warning from '@wordpress/warning';\nimport { forwardRef, useLayoutEffect, useState } from '@wordpress/element';\nimport { useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport type { TabListProps } from './types';\nimport type { WordPressComponentProps } from '../context';\nimport type { ElementOffsetRect } from '../utils/element-rect';\nimport { useTabsContext } from './context';\nimport { StyledTabList } from './styles';\nimport { useTrackElementOffsetRect } from '../utils/element-rect';\nimport { useTrackOverflow } from './use-track-overflow';\nimport { useAnimatedOffsetRect } from '../utils/hooks/use-animated-offset-rect';\n\nconst DEFAULT_SCROLL_MARGIN = 24;\n\n/**\n * Scrolls a given parent element so that a given rect is visible.\n *\n * The scroll is updated initially and whenever the rect changes.\n */\nfunction useScrollRectIntoView(\n\tparent: HTMLElement | undefined,\n\trect: ElementOffsetRect,\n\t{ margin = DEFAULT_SCROLL_MARGIN } = {}\n) {\n\tuseLayoutEffect( () => {\n\t\tif ( ! parent || ! rect ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { scrollLeft: parentScroll } = parent;\n\t\tconst parentWidth = parent.getBoundingClientRect().width;\n\t\tconst { left: childLeft, width: childWidth } = rect;\n\n\t\tconst parentRightEdge = parentScroll + parentWidth;\n\t\tconst childRightEdge = childLeft + childWidth;\n\t\tconst rightOverflow = childRightEdge + margin - parentRightEdge;\n\t\tconst leftOverflow = parentScroll - ( childLeft - margin );\n\n\t\tlet scrollLeft = null;\n\t\tif ( leftOverflow > 0 ) {\n\t\t\tscrollLeft = parentScroll - leftOverflow;\n\t\t} else if ( rightOverflow > 0 ) {\n\t\t\tscrollLeft = parentScroll + rightOverflow;\n\t\t}\n\n\t\tif ( scrollLeft !== null ) {\n\t\t\t/**\n\t\t\t * The optional chaining is used here to avoid unit test failures.\n\t\t\t * It can be removed when JSDOM supports `Element` scroll methods.\n\t\t\t * See: https://github.com/WordPress/gutenberg/pull/66498#issuecomment-2441146096\n\t\t\t */\n\t\t\tparent.scroll?.( { left: scrollLeft } );\n\t\t}\n\t}, [ margin, parent, rect ] );\n}\n\nexport const TabList = forwardRef<\n\tHTMLDivElement,\n\tWordPressComponentProps< TabListProps, 'div', false >\n>( function TabList( { children, ...otherProps }, ref ) {\n\tconst { store } = useTabsContext() ?? {};\n\n\tconst selectedId = Ariakit.useStoreState( store, 'selectedId' );\n\tconst activeId = Ariakit.useStoreState( store, 'activeId' );\n\tconst selectOnMove = Ariakit.useStoreState( store, 'selectOnMove' );\n\tconst items = Ariakit.useStoreState( store, 'items' );\n\tconst [ parent, setParent ] = useState< HTMLElement >();\n\tconst refs = useMergeRefs( [ ref, setParent ] );\n\n\tconst selectedItem = store?.item( selectedId );\n\tconst renderedItems = Ariakit.useStoreState( store, 'renderedItems' );\n\n\tconst selectedItemIndex =\n\t\trenderedItems && selectedItem\n\t\t\t? renderedItems.indexOf( selectedItem )\n\t\t\t: -1;\n\t// Use selectedItemIndex as a dependency to force recalculation when the\n\t// selected item index changes (elements are swapped / added / removed).\n\tconst selectedRect = useTrackElementOffsetRect( selectedItem?.element, [\n\t\tselectedItemIndex,\n\t] );\n\n\t// Track overflow to show scroll hints.\n\tconst overflow = useTrackOverflow( parent, {\n\t\tfirst: items?.at( 0 )?.element,\n\t\tlast: items?.at( -1 )?.element,\n\t} );\n\n\t// Size, position, and animate the indicator.\n\tuseAnimatedOffsetRect( parent, selectedRect, {\n\t\tprefix: 'selected',\n\t\tdataAttribute: 'indicator-animated',\n\t\ttransitionEndFilter: ( event ) => event.pseudoElement === '::before',\n\t\troundRect: true,\n\t} );\n\n\t// Make sure selected tab is scrolled into view.\n\tuseScrollRectIntoView( parent, selectedRect );\n\n\tconst onBlur = () => {\n\t\tif ( ! selectOnMove ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// When automatic tab selection is on, make sure that the active tab is up\n\t\t// to date with the selected tab when leaving the tablist. This makes sure\n\t\t// that the selected tab will receive keyboard focus when tabbing back into\n\t\t// the tablist.\n\t\tif ( selectedId !== activeId ) {\n\t\t\tstore?.setActiveId( selectedId );\n\t\t}\n\t};\n\n\tif ( ! store ) {\n\t\twarning( '`Tabs.TabList` must be wrapped in a `Tabs` component.' );\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<StyledTabList\n\t\t\tref={ refs }\n\t\t\tstore={ store }\n\t\t\trender={ ( props ) => (\n\t\t\t\t<div\n\t\t\t\t\t{ ...props }\n\t\t\t\t\t// Fallback to -1 to prevent browsers from making the tablist\n\t\t\t\t\t// tabbable when it is a scrolling container.\n\t\t\t\t\ttabIndex={ props.tabIndex ?? -1 }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\tonBlur={ onBlur }\n\t\t\tdata-select-on-move={ selectOnMove ? 'true' : 'false' }\n\t\t\t{ ...otherProps }\n\t\t\tclassName={ clsx(\n\t\t\t\toverflow.first && 'is-overflowing-first',\n\t\t\t\toverflow.last && 'is-overflowing-last',\n\t\t\t\totherProps.className\n\t\t\t) }\n\t\t>\n\t\t\t{ children }\n\t\t</StyledTabList>\n\t);\n} );\n","/* eslint-disable jsdoc/require-param */\n/**\n * WordPress dependencies\n */\nimport { useState, useEffect } from '@wordpress/element';\nimport { useEvent } from '@wordpress/compose';\n\n/**\n * Tracks if an element contains overflow and on which end by tracking the\n * first and last child elements with an `IntersectionObserver` in relation\n * to the parent element.\n *\n * Note that the returned value will only indicate whether the first or last\n * element is currently \"going out of bounds\" but not whether it happens on\n * the X or Y axis.\n */\nexport function useTrackOverflow(\n\tparent: HTMLElement | undefined | null,\n\tchildren: {\n\t\tfirst: HTMLElement | undefined | null;\n\t\tlast: HTMLElement | undefined | null;\n\t}\n) {\n\tconst [ first, setFirst ] = useState( false );\n\tconst [ last, setLast ] = useState( false );\n\tconst [ observer, setObserver ] = useState< IntersectionObserver >();\n\n\tconst callback: IntersectionObserverCallback = useEvent( ( entries ) => {\n\t\tfor ( const entry of entries ) {\n\t\t\tif ( entry.target === children.first ) {\n\t\t\t\tsetFirst( ! entry.isIntersecting );\n\t\t\t}\n\t\t\tif ( entry.target === children.last ) {\n\t\t\t\tsetLast( ! entry.isIntersecting );\n\t\t\t}\n\t\t}\n\t} );\n\n\tuseEffect( () => {\n\t\tif ( ! parent || ! window.IntersectionObserver ) {\n\t\t\treturn;\n\t\t}\n\t\tconst newObserver = new IntersectionObserver( callback, {\n\t\t\troot: parent,\n\t\t\tthreshold: 0.9,\n\t\t} );\n\t\tsetObserver( newObserver );\n\n\t\treturn () => newObserver.disconnect();\n\t}, [ callback, parent ] );\n\n\tuseEffect( () => {\n\t\tif ( ! observer ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( children.first ) {\n\t\t\tobserver.observe( children.first );\n\t\t}\n\t\tif ( children.last ) {\n\t\t\tobserver.observe( children.last );\n\t\t}\n\n\t\treturn () => {\n\t\t\tif ( children.first ) {\n\t\t\t\tobserver.unobserve( children.first );\n\t\t\t}\n\t\t\tif ( children.last ) {\n\t\t\t\tobserver.unobserve( children.last );\n\t\t\t}\n\t\t};\n\t}, [ children.first, children.last, observer ] );\n\n\treturn { first, last };\n}\n/* eslint-enable jsdoc/require-param */\n","/**\n * External dependencies\n */\nimport { useStoreState } from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { TabPanelProps } from './types';\nimport { TabPanel as StyledTabPanel } from './styles';\n\nimport warning from '@wordpress/warning';\nimport { useTabsContext } from './context';\nimport type { WordPressComponentProps } from '../context';\n\nexport const TabPanel = forwardRef<\n\tHTMLDivElement,\n\tOmit< WordPressComponentProps< TabPanelProps, 'div', false >, 'id' >\n>( function TabPanel(\n\t{ children, tabId, focusable = true, ...otherProps },\n\tref\n) {\n\tconst context = useTabsContext();\n\tconst selectedId = useStoreState( context?.store, 'selectedId' );\n\tif ( ! context ) {\n\t\twarning( '`Tabs.TabPanel` must be wrapped in a `Tabs` component.' );\n\t\treturn null;\n\t}\n\tconst { store, instanceId } = context;\n\tconst instancedTabId = `${ instanceId }-${ tabId }`;\n\n\treturn (\n\t\t<StyledTabPanel\n\t\t\tref={ ref }\n\t\t\tstore={ store }\n\t\t\t// For TabPanel, the id passed here is the id attribute of the DOM\n\t\t\t// element.\n\t\t\t// `tabId` is the id of the tab that controls this panel.\n\t\t\tid={ `${ instancedTabId }-view` }\n\t\t\ttabId={ instancedTabId }\n\t\t\tfocusable={ focusable }\n\t\t\t{ ...otherProps }\n\t\t>\n\t\t\t{ selectedId === instancedTabId && children }\n\t\t</StyledTabPanel>\n\t);\n} );\n","/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { useEffect, useMemo } from '@wordpress/element';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { TabsProps } from './types';\nimport { TabsContext } from './context';\nimport { Tab } from './tab';\nimport { TabList } from './tablist';\nimport { TabPanel } from './tabpanel';\n\nfunction externalToInternalTabId(\n\texternalId: string | undefined | null,\n\tinstanceId: string\n) {\n\treturn externalId && `${ instanceId }-${ externalId }`;\n}\n\nfunction internalToExternalTabId(\n\tinternalId: string | undefined | null,\n\tinstanceId: string\n) {\n\treturn typeof internalId === 'string'\n\t\t? internalId.replace( `${ instanceId }-`, '' )\n\t\t: internalId;\n}\n\n/**\n * Tabs is a collection of React components that combine to render\n * an [ARIA-compliant tabs pattern](https://www.w3.org/WAI/ARIA/apg/patterns/tabs/).\n *\n * Tabs organizes content across different screens, data sets, and interactions.\n * It has two sections: a list of tabs, and the view to show when a tab is chosen.\n *\n * `Tabs` itself is a wrapper component and context provider.\n * It is responsible for managing the state of the tabs, and rendering one instance of the `Tabs.TabList` component and one or more instances of the `Tab.TabPanel` component.\n */\nexport const Tabs = Object.assign(\n\tfunction Tabs( {\n\t\tselectOnMove = true,\n\t\tdefaultTabId,\n\t\torientation = 'horizontal',\n\t\tonSelect,\n\t\tchildren,\n\t\tselectedTabId,\n\t\tactiveTabId,\n\t\tdefaultActiveTabId,\n\t\tonActiveTabIdChange,\n\t}: TabsProps ) {\n\t\tconst instanceId = useInstanceId( Tabs, 'tabs' );\n\t\tconst store = Ariakit.useTabStore( {\n\t\t\tselectOnMove,\n\t\t\torientation,\n\t\t\tdefaultSelectedId: externalToInternalTabId(\n\t\t\t\tdefaultTabId,\n\t\t\t\tinstanceId\n\t\t\t),\n\t\t\tsetSelectedId: ( newSelectedId ) => {\n\t\t\t\tonSelect?.(\n\t\t\t\t\tinternalToExternalTabId( newSelectedId, instanceId )\n\t\t\t\t);\n\t\t\t},\n\t\t\tselectedId: externalToInternalTabId( selectedTabId, instanceId ),\n\t\t\tdefaultActiveId: externalToInternalTabId(\n\t\t\t\tdefaultActiveTabId,\n\t\t\t\tinstanceId\n\t\t\t),\n\t\t\tsetActiveId: ( newActiveId ) => {\n\t\t\t\tonActiveTabIdChange?.(\n\t\t\t\t\tinternalToExternalTabId( newActiveId, instanceId )\n\t\t\t\t);\n\t\t\t},\n\t\t\tactiveId: externalToInternalTabId( activeTabId, instanceId ),\n\t\t\trtl: isRTL(),\n\t\t} );\n\n\t\tconst { items, activeId } = Ariakit.useStoreState( store );\n\t\tconst { setActiveId } = store;\n\n\t\tuseEffect( () => {\n\t\t\trequestAnimationFrame( () => {\n\t\t\t\tconst focusedElement =\n\t\t\t\t\titems?.[ 0 ]?.element?.ownerDocument.activeElement;\n\n\t\t\t\tif (\n\t\t\t\t\t! focusedElement ||\n\t\t\t\t\t! items.some( ( item ) => focusedElement === item.element )\n\t\t\t\t) {\n\t\t\t\t\treturn; // Return early if no tabs are focused.\n\t\t\t\t}\n\n\t\t\t\t// If, after ariakit re-computes the active tab, that tab doesn't match\n\t\t\t\t// the currently focused tab, then we force an update to ariakit to avoid\n\t\t\t\t// any mismatches, especially when navigating to previous/next tab with\n\t\t\t\t// arrow keys.\n\t\t\t\tif ( activeId !== focusedElement.id ) {\n\t\t\t\t\tsetActiveId( focusedElement.id );\n\t\t\t\t}\n\t\t\t} );\n\t\t}, [ activeId, items, setActiveId ] );\n\n\t\tconst contextValue = useMemo(\n\t\t\t() => ( {\n\t\t\t\tstore,\n\t\t\t\tinstanceId,\n\t\t\t} ),\n\t\t\t[ store, instanceId ]\n\t\t);\n\n\t\treturn (\n\t\t\t<TabsContext.Provider value={ contextValue }>\n\t\t\t\t{ children }\n\t\t\t</TabsContext.Provider>\n\t\t);\n\t},\n\t{\n\t\t/**\n\t\t * Renders a single tab.\n\t\t *\n\t\t * The currently active tab receives default styling that can be\n\t\t * overridden with CSS targeting `[aria-selected=\"true\"]`.\n\t\t */\n\t\tTab: Object.assign( Tab, {\n\t\t\tdisplayName: 'Tabs.Tab',\n\t\t} ),\n\t\t/**\n\t\t * A wrapper component for the `Tab` components.\n\t\t *\n\t\t * It is responsible for rendering the list of tabs.\n\t\t */\n\t\tTabList: Object.assign( TabList, {\n\t\t\tdisplayName: 'Tabs.TabList',\n\t\t} ),\n\t\t/**\n\t\t * Renders the content to display for a single tab once that tab is selected.\n\t\t */\n\t\tTabPanel: Object.assign( TabPanel, {\n\t\t\tdisplayName: 'Tabs.TabPanel',\n\t\t} ),\n\t\tContext: Object.assign( TabsContext, {\n\t\t\tdisplayName: 'Tabs.Context',\n\t\t} ),\n\t}\n);\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"privateApis\"];","/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\n\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.',\n\t\t'@wordpress/components'\n\t);\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst info = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default info;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst published = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm11.53-1.47-1.06-1.06L11 12.94l-1.47-1.47-1.06 1.06L11 15.06l4.53-4.53Z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default published;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst caution = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-.75 12v-1.5h1.5V16h-1.5Zm0-8v5h1.5V8h-1.5Z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default caution;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst error = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M12.218 5.377a.25.25 0 0 0-.436 0l-7.29 12.96a.25.25 0 0 0 .218.373h14.58a.25.25 0 0 0 .218-.372l-7.29-12.96Zm-1.743-.735c.669-1.19 2.381-1.19 3.05 0l7.29 12.96a1.75 1.75 0 0 1-1.525 2.608H4.71a1.75 1.75 0 0 1-1.525-2.608l7.29-12.96ZM12.75 17.46h-1.5v-1.5h1.5v1.5Zm-1.5-3h1.5v-5h-1.5v5Z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default error;\n","/**\n * Internal dependencies\n */\nimport { positionToPlacement as __experimentalPopoverLegacyPositionToPlacement } from './popover/utils';\nimport { Menu } from './menu';\nimport { ComponentsContext } from './context/context-system-provider';\nimport Theme from './theme';\nimport { Tabs } from './tabs';\nimport { kebabCase } from './utils/strings';\nimport { lock } from './lock-unlock';\nimport Badge from './badge';\n\nexport const privateApis = {};\nlock( privateApis, {\n\t__experimentalPopoverLegacyPositionToPlacement,\n\tComponentsContext,\n\tTabs,\n\tTheme,\n\tMenu,\n\tkebabCase,\n\tBadge,\n} );\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { info, caution, error, published } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport type { BadgeProps } from './types';\nimport type { WordPressComponentProps } from '../context';\nimport Icon from '../icon';\n\n/**\n * Returns an icon based on the badge context.\n *\n * @return The corresponding icon for the provided context.\n */\nfunction contextBasedIcon( intent: BadgeProps[ 'intent' ] = 'default' ) {\n\tswitch ( intent ) {\n\t\tcase 'info':\n\t\t\treturn info;\n\t\tcase 'success':\n\t\t\treturn published;\n\t\tcase 'warning':\n\t\t\treturn caution;\n\t\tcase 'error':\n\t\t\treturn error;\n\t\tdefault:\n\t\t\treturn null;\n\t}\n}\n\nfunction Badge( {\n\tclassName,\n\tintent = 'default',\n\tchildren,\n\t...props\n}: WordPressComponentProps< BadgeProps, 'span', false > ) {\n\tconst icon = contextBasedIcon( intent );\n\tconst hasIcon = !! icon;\n\n\treturn (\n\t\t<span\n\t\t\tclassName={ clsx( 'components-badge', className, {\n\t\t\t\t[ `is-${ intent }` ]: intent,\n\t\t\t\t'has-icon': hasIcon,\n\t\t\t} ) }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ hasIcon && (\n\t\t\t\t<Icon\n\t\t\t\t\ticon={ icon }\n\t\t\t\t\tsize={ 16 }\n\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\tclassName=\"components-badge__icon\"\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<span className=\"components-badge__content\">{ children }</span>\n\t\t</span>\n\t);\n}\n\nexport default Badge;\n"],"names":["leafPrototypes","getProto","isMergeableObject","value","isNonNullObject","stringValue","Object","prototype","toString","call","$$typeof","REACT_ELEMENT_TYPE","isReactElement","isSpecial","Symbol","for","cloneUnlessOtherwiseSpecified","options","clone","deepmerge","val","Array","isArray","defaultArrayMerge","target","source","concat","map","element","getKeys","keys","getOwnPropertySymbols","filter","symbol","propertyIsEnumerable","getEnumerableOwnPropertySymbols","propertyIsOnObject","object","property","_","arrayMerge","sourceIsArray","destination","forEach","key","hasOwnProperty","propertyIsUnsafe","customMerge","getMergeFunction","mergeObject","all","array","Error","reduce","prev","next","deepmerge_1","module","exports","equal","a","b","constructor","length","i","Map","size","entries","has","get","Set","ArrayBuffer","isView","RegExp","flags","valueOf","monadic","fn","cache","serializer","arg","cacheKey","computedValue","this","set","variadic","args","slice","arguments","apply","assemble","context","strategy","serialize","bind","strategyDefault","create","serializerDefault","JSON","stringify","ObjectWithoutPrototypeCache","cacheDefault","strategies","GradientParser","parse","tokens","linearGradient","repeatingLinearGradient","radialGradient","repeatingRadialGradient","sideOrCorner","extentKeywords","positionKeywords","pixelValue","percentageValue","emValue","angleValue","startCall","endCall","comma","hexColor","literalColor","rgbColor","rgbaColor","number","input","error","msg","err","matchDefinition","matchGradient","matchLinearOrientation","matchListRadialOrientations","gradientType","pattern","orientationMatcher","matchCall","captures","orientation","scan","type","colorStops","matchListing","matchColorStop","callback","result","match","radialOrientations","lookaheadCache","radialOrientation","matchRadialOrientation","push","ellipse","circle","radialType","style","matchLength","matchExtentKeyword","matchDistance","at","positioning","matchPositioning","matchAtPosition","defaultPosition","location","x","y","matcher","color","matchNumber","captureIndex","regexp","blankCaptures","exec","consume","substr","code","ast","combineChunks","fillInChunks","findAll","findChunks","autoEscape","caseSensitive","defaultFindChunks","sanitize","searchWords","textToHighlight","chunksToHighlight","chunks","totalLength","sort","first","second","start","processedChunks","nextChunk","prevChunk","pop","end","endIndex","Math","max","highlight","defaultSanitize","searchWord","replace","regex","index","lastIndex","allChunks","append","chunk","string","reactIs","REACT_STATICS","childContextTypes","contextType","contextTypes","defaultProps","displayName","getDefaultProps","getDerivedStateFromError","getDerivedStateFromProps","mixins","propTypes","KNOWN_STATICS","name","caller","callee","arity","MEMO_STATICS","compare","TYPE_STATICS","getStatics","component","isMemo","ForwardRef","render","Memo","defineProperty","getOwnPropertyNames","getOwnPropertyDescriptor","getPrototypeOf","objectPrototype","hoistNonReactStatics","targetComponent","sourceComponent","blacklist","inheritedComponent","targetStatics","sourceStatics","descriptor","e","c","d","f","g","h","k","l","m","n","p","q","r","t","v","w","z","u","A","AsyncMode","ConcurrentMode","ContextConsumer","ContextProvider","Element","Fragment","Lazy","Portal","Profiler","StrictMode","Suspense","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isPortal","isProfiler","isStrictMode","isSuspense","isValidElementType","typeOf","characterMap","chars","join","allAccents","firstAccent","removeAccents","remove","is","useState","useEffect","useLayoutEffect","useDebugValue","getSnapshot","window","document","createElement","inst","useSyncExternalStore","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","getter","__esModule","obj","mode","then","ns","def","current","indexOf","definition","o","enumerable","prop","toStringTag","nc","__defProp","__defProps","defineProperties","__getOwnPropDescs","getOwnPropertyDescriptors","__getOwnPropSymbols","__hasOwnProp","__propIsEnum","__defNormalProp","configurable","writable","__objRest","exclude","noop","applyState","argument","currentValue","isUpdater","hasOwn","chain","fns","identity","invariant","condition","message","isFalsyBooleanCallback","booleanOrCallback","disabledFromProps","props","disabled","removeUndefinedValues","defaultValue","values","setRef","ref","_a","canUseDOM","getDocument","node","ownerDocument","getWindow","self","defaultView","getActiveElement","activeDescendant","activeElement","nodeName","isFrame","contentDocument","body","id","getAttribute","getElementById","contains","parent","child","tagName","isButton","toLowerCase","buttonInputTypes","isVisible","checkVisibility","htmlElement","offsetWidth","offsetHeight","getClientRects","isTextField","isTextInput","HTMLInputElement","selectionStart","isTextArea","isTextbox","isContentEditable","getPopupRole","fallback","role","getPopupItemRole","popupRole","menu","listbox","tree","getScrollingElement","isScrollableOverflow","overflow","clientHeight","scrollHeight","overflowY","getComputedStyle","clientWidth","scrollWidth","overflowX","parentElement","scrollingElement","sortBasedOnDOMPosition","items","getElement","pairs","item","isOrderDifferent","indexA","indexB","elementA","elementB","Boolean","compareDocumentPosition","Node","DOCUMENT_POSITION_PRECEDING","isElementPreceding","isApple","test","navigator","platform","isSafari","vendor","isPortalEvent","event","currentTarget","isSelfTarget","isOpeningInNewTab","isAppleDevice","metaKey","ctrlKey","isDownloading","altKey","fireBlurEvent","eventInit","FocusEvent","defaultAllowed","dispatchEvent","bubbleInit","bubbles","fireClickEvent","MouseEvent","isFocusEventOutside","container","containerElement","relatedTarget","queueBeforeEvent","timeout","cancelTimer","callback2","timerId2","setTimeout","clearTimeout","timerId","requestAnimationFrame","cancelAnimationFrame","createTimer","removeEventListener","callSync","addEventListener","once","capture","addGlobalEventListener","listener","scope","children","frame","from","frames","_React","useReactId","useId","useReactInsertionEffect","useDeferredValue","useInsertionEffect","useSafeLayoutEffect","useInitialValue","initialValue","useLiveRef","useRef","useEvent","useCallback","useTransactionState","state","setState","prevState","useMergeRefs","refs","useMemo","some","defaultId","reactId","setId","random","useTagName","refOrElement","stringOrUndefined","type2","setTagName","useUpdateEffect","effect","deps","mounted","useForceUpdate","useReducer","useBooleanEvent","useWrapElement","wrapElement","usePortalRef","portalProp","portalRefProp","portalNode","setPortalNode","portalRef","domReady","useMetadataProps","onLoadedMetadataCapture","assign","useIsMouseMoving","setMouseMoving","resetMouseMoving","mouseMoving","previousScreenX","previousScreenY","movementX","screenX","movementY","screenY","hasMouseMovement","getInternal","store","internals","__unstableInternals","createStore","initialState","stores","prevStateBatch","lastUpdate","destroy","instances","updatedKeys","setups","listeners","batchListeners","disposables","WeakMap","listenerKeys","sub","add","delete","fromStores","nextValue","thisUpdate","run","uKeys","_a2","queueMicrotask","snapshot","clear","finalStore","getState","setup","init","initialized","instance","maybeDestroy","desyncs","storeState","sync","state2","teardowns","setup2","cleanups","subscribe","batch","pick","paths","omit","omit2","mergeStore","store2","nextState","noopSubscribe","useStoreState","keyOrSelector","storeSubscribe","selector","useStoreStateObject","objRef","updated","useStoreProps","setKey","setValue","propsRef","value2","setValue2","setStore","useState2","createCollectionStore","syncState","defaultItems","itemsMap","renderedItems","syncPrivateStore","__unstablePrivateStore","privateStore","collection","sortItems","sortedItems","firstRun","raf","IntersectionObserver","root","firstItem","find","lastItem","reverse","getCommonParent","observer","observe","disconnect","mergeItem","setItems","canDeleteFromMap","prevItem","items2","findIndex","nextItems","nextItem","registerItem","getItems","renderItem","item2","toArray","flatten2DArray","flattened","row","reverseArray","NULL_ITEM","findFirstEnabledItem","excludeId","getItemsInRow","rowId","groupItemsByRows","rows","currentRow","getMaxRowLength","maxLength","createCompositeStore","activeId","defaultActiveId","composite","baseElement","includesBaseElement","moves","rtl","virtualFocus","focusLoop","focusWrap","focusShift","activeId2","getNextId","direction","_b","defaultState","skip","isVerticalDirection","isNextDirection","canReverse","canShift","previousItem","normalizeRows","verticalized","verticalizeItems","activeItem","isGrid","activeIndex","nextItemsInRow","nextEnabledItemsInRow","getEnabledItems","nextItem2","canLoop","canWrap","hasNullItem","shouldInsertNullItem","flipItems","setBaseElement","setActiveId","move","last","previous","down","up","useCompositeStoreOptions","useCompositeStoreProps","update","useCollectionStoreProps","useCompositeStore","getEnabledItem","FOCUS_SILENTLY","isItem","forwardRef2","Role","memo2","Component","propsAreEqual","Type","rest","mergedRef","isValidElement","isValidElementWithRef","getRefProperty","renderProps","base","overrides","overrideValue","startsWith","baseValue","mergeProps","jsx","createHook","useProps","useRole","createStoreContext","providers","scopedProviders","scopedContext","useContext2","reduceRight","Provider","useContext","useScopedContext","onlyScoped","scoped","useProviderContext","ScopedContextProvider","ctx","useCollectionContext","useCompositeContext","useCompositeProviderContext","CompositeContextProvider","CompositeScopedContextProvider","CompositeItemContext","createContext","CompositeRowContext","FocusableContext","isFocusable","matches","closest","isTabbable","Number","parseInt","hasNegativeTabIndex","form","checked","radioGroup","elements","namedItem","getAllFocusableIn","includeContainer","querySelectorAll","unshift","focusableElements","frameBody","splice","getAllTabbableIn","fallbackToFocusable","tabbableElements","allFrameTabbable","getNextTabbable","fallbackToFirst","allFocusable","nextFocusableElements","getNextTabbableIn","getPreviousTabbable","fallbackToLast","previousFocusableElements","getPreviousTabbableIn","hasFocus","hasFocusWithin","querySelector","CSS","escape","focusIfNeeded","focus","disableFocus","currentTabindex","setAttribute","isSafariBrowser","alwaysFocusVisibleInputTypes","safariFocusAncestorSymbol","markSafariFocusAncestor","isNativeCheckboxOrRadio","getTabIndex","focusable","trulyDisabled","nativeTabbable","supportsDisabled","tabIndexProp","useDisableEvent","onEvent","defaultPrevented","stopPropagation","preventDefault","isKeyboardModality","onGlobalMouseDown","hasAttribute","onGlobalKeyDown","useFocusable","accessibleWhenDisabled","autoFocus","onFocusVisible","labels","getLabels","onMouseUp","label","focusVisible","setFocusVisible","onKeyPressCapture","onMouseDownCapture","onClickCapture","onMouseDownProp","onMouseDown","receivedFocus","onFocus","focusableContainer","getClosestFocusable","handleFocusVisible","dataset","onKeyDownCaptureProp","onKeyDownCapture","onFocusCaptureProp","onFocusCapture","readOnly","includes","isAlwaysFocusVisible","onBlurProp","onBlur","autoFocusOnShow","autoFocusRef","isNativeTabbable","supportsDisabledAttribute","styleProp","pointerEvents","tabIndex","contentEditable","useKeyboardEventProxy","onKeyboardEvent","previousElementRef","isPropagationStopped","isModifierKey","isPrintableKey","view","KeyboardEvent","fireKeyboardEvent","useComposite","focusOnMove","moveOnKeyPress","scheduleFocus","scheduled","setScheduled","schedule","preventScroll","useScheduleFocus","itemElement","scrollIntoView","block","inline","focusIntoView","previousElement","onKeyUpCapture","virtualFocus2","previousActiveElement","isSilentlyFocused","silentlyFocused","onFocusProp","onBlurCaptureProp","onBlurCapture","nextActiveElement","nextActiveElementIsItem","onKeyDownProp","onKeyDown","moveOnKeyPressProp","isConnected","isVertical","isHorizontal","grid","keyMap","ArrowUp","ArrowRight","ArrowDown","ArrowLeft","Home","End","PageUp","PageDown","action","CompositeContext","GroupLabelContext","useGroup","labelId","setLabelId","useCompositeGroup","CompositeGroup","forwardRef","_props$store","_jsx","Ariakit","useGroupLabel","useCompositeGroupLabel","CompositeGroupLabel","getMouseDestination","nodeType","ELEMENT_NODE","useCompositeHover","focusOnHover","blurOnHoverEnd","isMouseMoving","onMouseMoveProp","onMouseMove","focusOnHoverProp","onMouseLeaveProp","onMouseLeave","blurOnHoverEndProp","nextElement","hoveringInside","dest","movingToAnotherItem","CompositeHover","useCollectionItem","shouldRegisterItem","getItem","element2","isNativeClick","isTrusted","useCommand","clickOnEnter","clickOnSpace","isNativeButton","setIsNativeButton","active","setActive","activeRef","isDuplicate","metadataProps","isEnter","isSpace","shouldPreventEnter","shouldPreventSpace","nativeClick","click","userAgent","onKeyUpProp","onKeyUp","getItemOffset","pageUp","top","getBoundingClientRect","findNextPageItemId","nextPageOffset","height","pageSize","pageOffset","scrollTop","getNextPageOffset","prevDifference","previousId","difference","absDifference","abs","useCompositeItem","rowIdProp","preventScrollOnKeyDown","tabbable","getItemProp","ariaSetSizeProp","ariaPosInSetProp","isActiveItem","ariaSetSize","ariaPosInSet","itemsInRow","textContent","hasFocusedComposite","targetIsAnotherItem","baseElement2","collapseToEnd","setSelectionRange","selection","getSelection","selectAllChildren","selectTextField","focusSilently","preventScrollOnKeyDownProp","canHomeEnd","selectionEnd","rangeCount","anchorNode","focusNode","range","getRangeAt","nextRange","cloneRange","selectNodeContents","setEnd","startContainer","startOffset","endContainer","endOffset","getTextboxSelection","isLeft","isRight","isUp","isDown","valueLength","createRange","getTextboxValue","nextId","providerValue","CompositeItem","useCompositeRow","CompositeRow","clearChars","itemTextStartsWith","text","itemText","str","normalize","trim","useCompositeTypeahead","typeahead","cleanupTimeoutRef","isValidTypeaheadEvent","enabledItems","offscreenItems","ariaDisabled","isSelfTargetOrItem","char","getSameInitialItems","CompositeTypeahead","Composite","isRTL","storeProp","internalStore","contextValue","Group","GroupLabel","Item","Row","Hover","Typeahead","Context","createDisclosureStore","disclosure","open","defaultOpen","animated","animating","contentElement","disclosureElement","setOpen","show","hide","toggle","open2","stopAnimation","setContentElement","setDisclosureElement","useDisclosureStoreProps","useDisclosureStore","createDialogStore","useDialogStoreProps","usePopoverStoreProps","popover","useHovercardStoreProps","createPopoverStore","otherPopover","dialog","placement","currentPlacement","anchorElement","popoverElement","arrowElement","rendered","setAnchorElement","setPopoverElement","setArrowElement","createHovercardStore","hovercard","showTimeout","hideTimeout","setAutoFocusOnShow","createTooltipStore","tooltip","skipTimeout","acc","useDisclosureProviderContext","useDialogProviderContext","DialogContextProvider","DialogScopedContextProvider","DialogHeadingContext","DialogDescriptionContext","usePopoverContext","usePopoverProviderContext","PopoverContextProvider","PopoverScopedContextProvider","useHovercardProviderContext","HovercardContextProvider","HovercardScopedContextProvider","useHovercardAnchor","showOnHover","showTimeoutRef","showOnHoverProp","showHovercard","timeoutMs","onClickProp","onClick","useTooltipProviderContext","TooltipScopedContextProvider","globalStore","activeStore","createRemoveStoreCallback","useTooltipAnchor","canShowOnHoverRef","onMouseEnterProp","onMouseEnter","onFocusVisibleProp","contentId","TooltipAnchor","getEventPoint","clientX","clientY","isPointInPolygon","point","polygon","inside","j","xi","yi","xj","yj","vy","where","getElementPolygon","enterPoint","rect","right","bottom","left","getEnterPointPlacement","ids","backdrop","orchestrate","elementCleanups","prevCleanup","cleanup","nextCleanup","attr","previousValue","removeAttribute","setProperty","exists","assignStyle","prevStyle","cssText","ignoreTags","getSnapshotPropertyName","ignoredElements","doc","propertyName","inSnapshot","enabledElement","ancestorCallback","hasAncestorAlready","maybeAncestor","originalElement","getPropertyName","ancestor","markAncestor","isElementMarked","elementProperty","markTreeOutside","el","markElement","afterTimeout","cb","timeoutId","parseCSSTime","times","split","longestTime","currentTimeString","multiplier","endsWith","currentTime","parseFloat","isHidden","hidden","alwaysVisible","useDisclosureContent","transition","setTransition","otherElement","previousAnimated","animated2","stopAnimationSync","flushSync","transitionDuration","animationDuration","transitionDelay","animationDelay","transitionDuration2","animationDuration2","transitionDelay2","animationDelay2","display","DisclosureContentImpl","DisclosureContent","unmountOnHide","DialogBackdrop","backdrop2","zIndex","position","supportsInert","HTMLElement","disableTree","enableElements","restoreFocusMethod","hideElementFromAccessibilityTree","userSelect","cursor","usePreventBodyScroll","enabled","isRootDialog","attribute","retry","MutationObserver","attributeFilter","useRootDialog","win","documentElement","cssScrollbarWidth","getPropertyValue","scrollbarWidth","innerWidth","paddingProperty","documentLeft","round","scrollLeft","getPaddingProperty","isIOS","maxTouchPoints","removeProperty","scrollX","scrollY","visualViewport","offsetLeft","offsetTop","restoreStyle","floor","scrollTo","behavior","setIOSStyle","NestedDialogsContext","useEventOutside","callListener","focusedRef","isInDocument","isDisclosure","width","isMouseEventOnDialog","shouldHideOnInteractOutside","hideOnInteractOutside","useFocusableContainer","HeadingContext","HeadingLevel","level","contextLevel","nextLevel","min","useVisuallyHidden","border","clip","margin","padding","whiteSpace","useFocusTrap","FocusTrap","PortalContext","queueFocus","usePortal","preserveTabOrder","preserveTabOrderAnchor","portalElement","portal","refProp","anchorPortalNode","setAnchorPortalNode","outerBeforeRef","innerBeforeRef","innerAfterRef","outerAfterRef","portalEl","getPortalElement","isPortalInDocument","rootElement","getRootElement","appendChild","prefix","getRandomId","insertAdjacentElement","focusing","restoreTabIndex","tabindex","restoreFocusIn","disableFocusIn","jsxs","className","createPortal","preserveTabOrderElement","nextTabbable","getElementFromProp","useDialog","openProp","onClose","modal","hideOnEscape","getPersistentElements","preventBodyScroll","autoFocusOnHide","initialFocus","finalFocus","unstable_treeSnapshotKey","useDialogStore","Event","cancelable","preserveTabOrderProp","previousMouseDownRef","usePreviousMouseDownRef","previousMouseDown","useHideOnInteractOutside","nestedDialogs","dialogs","setDialogs","dialogs2","useNestedDialogs","viewport","setViewportHeight","_b2","innerHeight","button","prepend","prependHiddenDismiss","canTakeTreeSnapshot","createWalkTreeSnapshot","getPersistentElementsProp","allElements","dialog2","isFocusTrap","disableTreeOutside","mayAutoFocusOnShow","autoFocusOnShowProp","autoFocusEnabled","setAutoFocusEnabled","getFirstTabbableIn","isElementFocusable","mayAutoFocusOnHide","autoFocusOnHideProp","hasOpened","setHasOpened","focusOnHide","isAlreadyFocusingAnotherElement","maybeParentDialog","control","focusedOnHideRef","hideOnEscapeProp","hiddenProp","headingId","setHeadingId","descriptionId","setDescriptionId","createDialogComponent","oppositeSideMap","oppositeAlignmentMap","clamp","param","getOppositeAxis","axis","getAxisLength","getAlignmentAxis","alignment","getOppositePlacement","side","expandPaddingObject","computeCoordsFromPlacement","_ref","reference","floating","sideAxis","alignmentAxis","alignLength","commonX","commonY","commonAlign","coords","async","detectOverflow","_await$platform$isEle","rects","boundary","rootBoundary","elementContext","altBoundary","paddingObject","clippingClientRect","getClippingRect","contextElement","getDocumentElement","offsetParent","getOffsetParent","offsetScale","getScale","elementClientRect","convertOffsetParentRelativeRectToViewportRelativeRect","offset","diffCoords","mainAxisMulti","crossAxisMulti","rawValue","mainAxis","crossAxis","convertValueToCoords","data","hasWindow","getNodeName","isNode","_node$ownerDocument","isHTMLElement","isShadowRoot","ShadowRoot","isOverflowElement","isTableElement","isTopLayer","isContainingBlock","elementOrCss","webkit","isWebKit","css","transform","perspective","containerType","backdropFilter","willChange","contain","supports","isLastTraversableNode","getNodeScroll","getParentNode","assignedSlot","parentNode","host","getNearestOverflowAncestor","getOverflowAncestors","list","traverseIframes","_node$ownerDocument2","scrollableAncestor","isBody","frameElement","getFrameElement","getCssDimensions","hasOffset","shouldFallback","$","unwrapElement","domElement","isFinite","noOffsets","getVisualOffsets","includeScale","isFixedStrategy","clientRect","scale","visualOffsets","isFixed","floatingOffsetParent","shouldAddVisualOffsets","offsetWin","currentWin","currentIFrame","iframeScale","iframeRect","clientLeft","paddingLeft","clientTop","paddingTop","topLayerSelectors","getWindowScrollBarX","getClientRectFromClippingAncestor","clippingAncestor","html","visualViewportBased","getViewportRect","scroll","getDocumentRect","getInnerBoundingClientRect","hasFixedPositionAncestor","stopNode","getRectRelativeToOffsetParent","isOffsetParentAnElement","offsets","offsetRect","getTrueOffsetParent","polyfill","currentNode","getContainingBlock","topLayer","elementClippingAncestors","cachedResult","currentContainingBlockComputedStyle","elementIsFixed","computedStyle","currentNodeIsContaining","getClippingElementAncestors","_c","clippingAncestors","firstClippingAncestor","clippingRect","accRect","getElementRects","getOffsetParentFn","getDimensionsFn","getDimensions","autoUpdate","ancestorScroll","ancestorResize","elementResize","ResizeObserver","layoutShift","animationFrame","referenceEl","ancestors","passive","cleanupIo","onMove","io","_io","refresh","threshold","rootMargin","isFirstUpdate","handleObserve","ratio","intersectionRatio","observeMove","frameId","reobserveFrame","resizeObserver","firstEntry","unobserve","_resizeObserver","prevRefRect","frameLoop","nextRefRect","_resizeObserver2","checkMainAxis","checkCrossAxis","limiter","detectOverflowOptions","mainAxisCoord","crossAxisCoord","maxSide","limitedCoords","_middlewareData$flip","middlewareData","initialPlacement","fallbackPlacements","specifiedFallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment","isBasePlacement","oppositePlacement","getExpandedPlacements","isStart","lr","rl","tb","bt","getSideList","getOppositeAxisPlacements","placements","overflows","overflowsData","flip","sides","mainAlignmentSide","every","_middlewareData$flip2","_overflowsData$filter","nextIndex","nextPlacement","reset","resetPlacement","_overflowsData$map$so","isYAxis","heightSide","widthSide","overflowAvailableHeight","overflowAvailableWidth","noShift","shift","availableHeight","availableWidth","maximumClippingWidth","maximumClippingHeight","xMin","xMax","yMin","yMax","nextDimensions","arrowDimensions","minProp","maxProp","clientProp","endDiff","startDiff","arrowOffsetParent","clientSize","centerToReference","largestPossiblePadding","minPadding","maxPadding","min$1","center","alignmentOffset","centerOffset","rawOffset","computedOffset","len","limitMin","limitMax","_middlewareData$offse","_middlewareData$offse2","isOriginSide","mergedOptions","platformWithCache","config","middleware","validMiddleware","statefulPlacement","resetCount","nextX","nextY","computePosition","createDOMRect","DOMRect","toJSON","isValidPlacement","flip2","roundByDPR","dpr","devicePixelRatio","getOffsetMiddleware","arrowOffset","finalGutter","gutter","getFlipMiddleware","overflowPadding","getShiftMiddleware","slide","overlap","getSizeMiddleware","wrapper","referenceWidth","sameWidth","fitViewport","maxWidth","maxHeight","getArrowMiddleware","arrowPadding","usePopover","wrapperProps","fixed","shift2","getAnchorRect","updatePosition","defaultArrowElementRef","positioned","setPositioned","getAnchorRectProp","updatePositionProp","hasCustomUpdatePosition","anchor","anchorRect","getDOMRect","getAnchorElement","updatePosition2","arrow2","pos","arrow","arrowX","arrowY","centerX","centerY","originX","originY","cancelAutoUpdate","applyZIndex","isMovingOnHovercard","card","nested","card2","NestedHovercardContext","useHovercard","hideOnHoverOutside","disablePointerEventsOnApproach","nestedHovercards","setNestedHovercards","hideTimeoutRef","enterPointRef","mayHideOnHoverOutside","hideOnHoverOutsideProp","mayDisablePointerEvents","disablePointerEventsProp","composedPath","currentPoint","disableEvent","openRef","registerOnParent","registerNestedHovercard","prevElements","parentUnregister","setAutoFocusOnHide","finalFocusRef","useAutoFocusOnHide","useTooltip","Tooltip","shortcut","displayText","ariaLabel","POSITION_TO_PLACEMENT","middle","positionToPlacement","_POSITION_TO_PLACEMEN","PLACEMENT_TO_ANIMATION_ORIGIN","overlay","computePopoverPosition","isNaN","TooltipInternalContext","isNestedInTooltip","TOOLTIP_DELAY","CONTEXT_VALUE","delay","hideOnClick","restProps","baseId","useInstanceId","describedById","isOnlyChild","Children","count","computedPlacement","deprecated","since","alternative","tooltipStore","useTooltipStoreProps","_jsxs","cloneElement","clsx","Shortcut","isPlainObject","ctor","prot","mountedRef","ComponentsContext","useComponentsContext","ContextSystemProvider","memo","BaseContextSystemProvider","parentContext","valueRef","fastDeepEqual","useContextSystemBridge","COMPONENT_NAMESPACE","CONNECTED_NAMESPACE","CONNECT_STATIC_NAMESPACE","__assign","s","lowerCase","SuppressedError","DEFAULT_SPLIT_REGEXP","DEFAULT_STRIP_REGEXP","re","paramCase","splitRegexp","stripRegexp","delimiter","charAt","noCase","dotCase","memize","head","tail","memoized","searchCache","maxSize","getStyledClassNameFromKey","memoize","namespace","kebabCase","StyleSheet","_this","_insertTag","tag","before","tags","insertionPoint","nextSibling","firstChild","insertBefore","isSpeedy","speedy","ctr","nonce","_proto","hydrate","nodes","insert","rule","createTextNode","createStyleElement","sheet","styleSheets","ownerNode","sheetForTag","insertRule","cssRules","flush","removeChild","String","fromCharCode","replacement","indexof","search","charCodeAt","begin","line","column","character","characters","return","copy","peek","caret","token","alloc","dealloc","delimit","whitespace","escaping","commenter","identifier","MS","MOZ","WEBKIT","COMMENT","DECLARATION","KEYFRAMES","output","hash","compile","rules","rulesets","pseudo","points","declarations","atrule","variable","scanning","ampersand","comment","declaration","ruleset","post","identifierWithPointTracking","fixedElements","compat","isImplicitRule","parsed","toRules","getRules","parentRules","removeLabel","defaultStylisPlugins","ssrStyles","_insert","stylisPlugins","inserted","nodesToHydrate","attrib","currentSheet","finalizingPlugins","serialized","shouldCache","styles","stylis","registered","unitlessKeys","animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","msGridRow","msGridRowSpan","msGridColumn","msGridColumnSpan","fontWeight","lineHeight","opacity","order","orphans","tabSize","widows","zoom","WebkitLineClamp","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","hyphenateRegex","animationRegex","isCustomProperty","isProcessableValue","processStyleName","styleName","processStyleValue","p1","p2","handleInterpolation","mergedProps","interpolation","__emotion_styles","anim","_key","interpolated","_i","createStringFromObject","previousCursor","cached","labelPattern","stringMode","strings","raw","identifierName","EmotionCacheContext","CacheProvider","registeredStyles","classNames","rawClassName","isStringTag","registerStyles","insertWithoutScoping","merge","classnames","cls","toAdd","_createEmotion","_len","cx","_len4","_key4","injectGlobal","_len3","_key3","keyframes","_len2","_key2","animation","getRegisteredStyles","useCx","innerCx","insertStyles","useContextSystem","contextSystemProps","contextProps","finalComponentProps","componentName","_overrides","overrideProps","otherContextProps","initialMergedProps","classes","renderChildren","contextConnect","_contextConnect","forwardsRef","contextConnectWithoutRef","WrappedComponent","mergedNamespace","getConnectNamespace","namespaces","hasConnectNamespace","visuallyHidden","WebkitClipPath","clipPath","wordWrap","reactPropsRegex","testOmitPropsOnStringTag","testOmitPropsOnComponent","getDefaultShouldForwardProp","composeShouldForwardProps","isReal","shouldForwardProp","optionsShouldForwardProp","__emotion_forwardProp","propName","createStyled","targetClassName","__emotion_real","baseTag","__emotion_base","defaultShouldForwardProp","shouldUseAs","func","Styled","finalTag","as","classInterpolations","theme","finalShouldForwardProp","newProps","ele","possiblyStyleElement","withComponent","nextTag","nextOptions","PolymorphicDiv","_styled","forwardedRef","View","GRID","ALIGNMENT_LABEL","__","ALIGNMENTS","flat","normalized","transformed","getItemId","prefixId","insertable","GRID_BASE","space","asInt","white","GRAY","THEME","accent","accentDarker10","accentDarker20","accentInverted","background","foreground","foregroundInverted","gray","UI","backgroundDisabled","borderHover","borderFocus","borderDisabled","textDisabled","darkGrayPlaceholder","lightGrayPlaceholder","COLORS","freeze","alert","yellow","red","green","ui","CONTROL_HEIGHT","CONTROL_PROPS","controlPaddingX","controlPaddingXSmall","controlPaddingXLarge","controlBoxShadowFocus","controlHeight","controlHeightXSmall","controlHeightSmall","controlHeightLarge","controlHeightXLarge","colorDivider","colorScrollbarThumb","colorScrollbarThumbHover","colorScrollbarTrack","elevationIntensity","radiusXSmall","radiusSmall","radiusMedium","radiusLarge","radiusFull","radiusRound","borderWidth","borderWidthFocus","borderWidthTab","spinnerSize","fontSize","fontSizeH1","fontSizeH2","fontSizeH3","fontSizeH4","fontSizeH5","fontSizeH6","fontSizeInputMobile","fontSizeMobile","fontSizeSmall","fontSizeXSmall","fontLineHeightBase","fontWeightHeading","gridBase","cardPaddingXSmall","cardPaddingSmall","cardPaddingMedium","cardPaddingLarge","elevationXSmall","elevationSmall","elevationMedium","elevationLarge","surfaceBackgroundColor","surfaceBackgroundSubtleColor","surfaceBackgroundTintColor","surfaceBorderColor","surfaceBorderBoldColor","surfaceBorderSubtleColor","surfaceBackgroundTertiaryColor","surfaceColor","transitionDurationFast","transitionDurationFaster","transitionDurationFastest","transitionTimingFunction","transitionTimingFunctionControl","rootBase","CONFIG","GridContainer","disablePointerEvents","GridRow","Cell","Point","POINT_SIZE","CellView","VisuallyHidden","AlignmentMatrixControl","UnforwardedAlignmentMatrixControl","onChange","nextActiveId","getItemValue","cells","cell","Icon","_ref2","SVG","xmlns","viewBox","align","dotSize","getAlignmentIndex","Rect","fill","getDefaultOrigin","getAnimateClassName","origin","yAxis","xAxis","MotionConfigContext","transformPagePoint","isStatic","reducedMotion","MotionContext","useIsomorphicLayoutEffect","LazyContext","strict","camelToDash","optimizedAppearDataAttribute","Queue","process","stepsOrder","createRenderBatcher","scheduleNextBatch","allowKeepAlive","runNextFrame","useDefaultElapsed","delta","timestamp","isProcessing","steps","thisFrame","nextFrame","numToRun","flushNextFrame","toKeepAlive","WeakSet","step","keepAlive","immediate","addToCurrentFrame","queue","cancel","frameData","createRenderStep","processStep","stepId","processBatch","performance","now","microtask","cancelMicrotask","isRefObject","useMotionRef","visualState","visualElement","externalRef","mount","unmount","isVariantLabel","isAnimationControls","variantPriorityOrder","variantProps","isControllingVariants","animate","isVariantNode","variants","variantLabelsAsDependency","featureProps","exit","drag","hover","tap","pan","inView","layout","featureDefinitions","isEnabled","LayoutGroupContext","SwitchLayoutGroupContext","motionComponentSymbol","preloadedFeatures","createVisualElement","useRender","useVisualState","features","loadFeatures","ForwardRefComponent","MeasureLayout","configAndProps","layoutId","useLayoutId","initial","inherit","getCurrentTreeVariants","useCreateMotionContext","lazyContext","presenceContext","reducedMotionConfig","visualElementRef","renderer","blockInitialAnimation","wantsHandoff","HandoffComplete","postRender","animationState","animateChanges","updateFeatures","useVisualElement","initialLayoutGroupConfig","isStrict","layoutGroupId","createMotionProxy","createConfig","custom","customMotionComponentConfig","Proxy","componentCache","_target","lowercaseSVGElements","isSVGComponent","scaleCorrectors","transformPropOrder","transformProps","isForcedMotionValue","isMotionValue","getVelocity","translateAlias","transformPerspective","numTransforms","checkStringStartsWith","isCSSVariableName","startsAsVariableToken","isCSSVariableToken","singleCssVariableRegex","getValueAsType","alpha","default","floatRegex","colorRegex","singleColorRegex","isString","createUnitType","unit","degrees","percent","px","vh","vw","progressPercentage","numberValueTypes","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","radius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","paddingRight","paddingBottom","marginTop","marginRight","marginBottom","marginLeft","rotate","rotateX","rotateY","rotateZ","scaleX","scaleY","scaleZ","skew","skewX","skewY","distance","translateX","translateY","translateZ","originZ","backgroundPositionX","backgroundPositionY","numOctaves","buildHTMLStyles","latestValues","transformTemplate","vars","transformOrigin","hasTransform","hasTransformOrigin","transformIsNone","valueType","valueAsType","enableHardwareAcceleration","allowTransformNone","transformIsDefault","transformString","buildTransform","createHtmlRenderState","copyRawValuesOnly","useHTMLProps","htmlProps","useInitialMotionValues","useStyle","dragListener","draggable","WebkitUserSelect","WebkitTouchCallout","touchAction","onTap","onTapStart","whileTap","validMotionProps","isValidMotionProp","shouldForward","isValidProp","require","calcOrigin","dashKeys","camelKeys","buildSVGAttrs","attrX","attrY","attrScale","pathLength","pathSpacing","pathOffset","latest","isSVGTag","attrs","dimensions","calcSVGTransformOrigin","spacing","useDashCase","buildSVGPath","createSvgRenderState","useSVGProps","_isStatic","visualProps","rawStyles","createUseRender","forwardMotionProps","filteredProps","isDom","filterProps","elementProps","renderedChildren","renderHTML","projection","getProjectionStyles","camelCaseAttributes","renderSVG","renderState","_styleProp","scrapeMotionValuesFromProps","prevProps","newValues","getValue","liveStyle","toUpperCase","substring","resolveVariantFromProps","currentValues","currentVelocity","useConstant","isKeyframesTarget","isCustomValue","mix","toValue","resolveFinalValueInKeyframes","resolveMotionValue","unwrappedValue","makeUseVisualState","make","createRenderState","onMount","makeLatestValues","makeState","scrapeMotionValues","motionValues","isControllingVariants$1","isVariantNode$1","isInitialAnimationBlocked","variantToSet","resolved","transitionEnd","valueTarget","any","cancelFrame","svgMotionConfig","read","getBBox","htmlMotionConfig","addDomEvent","eventName","handler","isPrimaryPointer","pointerType","isPrimary","extractEventInfo","pointType","addPointerInfo","addPointerEvent","combineFunctions","pipe","transformers","createLock","lock","globalHorizontalLock","globalVerticalLock","getGlobalLock","openHorizontal","openVertical","isDragActive","openGestureLock","Feature","isMounted","addHoverEvent","isActive","callbackName","info","getProps","whileHover","isNodeOrChild","fireSyntheticPointerEvent","syntheticPointerEvent","PointerEvent","observerCallbacks","observers","fireObserverCallback","entry","fireAllObserverCallbacks","thresholdNames","gestureAnimations","super","hasEnteredView","isInView","startObserver","amount","rootInteresectionObserver","lookupRoot","rootObservers","initIntersectionObserver","observeIntersection","isIntersecting","onViewportEnter","onViewportLeave","prevViewport","hasViewportOptionChanged","removeStartListeners","removeEndListeners","removeAccessibleListeners","startPointerPress","startEvent","startInfo","isPressing","removePointerUpListener","endEvent","endInfo","checkPressEnd","onTapCancel","globalTapTarget","removePointerCancelListener","cancelEvent","cancelInfo","cancelPress","startPress","startAccessiblePress","removeKeydownListener","keydownEvent","keyupEvent","removeBlurListener","removePointerListener","removeFocusListener","isFocusVisible","shallowCompare","prevLength","resolveVariant","getCurrent","velocity","secondsToMilliseconds","seconds","millisecondsToSeconds","milliseconds","underDampedSpring","stiffness","damping","restSpeed","keyframesTransition","duration","ease","getDefaultTransition","valueKey","sqrt","getValueTransition","isNotNull","getFinalKeyframe","repeat","repeatType","finalKeyframe","resolvedKeyframes","clearTime","time","newTime","isZeroValueString","warning","isNumericalString","splitCSSVariableRegex","getVariableValue","depth","token1","token2","parseCSSVariable","trimmed","positionalKeys","isNumOrPxType","getPosFromMatrix","matrix","getTranslateFromMatrix","pos2","pos3","_bbox","matrix3d","transformKeys","nonTranslationalTransformKeys","positionalValues","testValueType","dimensionValueTypes","findDimensionValueType","toResolve","isScheduled","anyNeedsMeasurement","measureAllKeyframes","resolversToMeasure","resolver","needsMeasurement","elementsToMeasure","transformsToRestore","removedTransforms","removeNonTranslationalTransform","measureInitialState","restore","measureEndState","suspendedScrollY","complete","readAllKeyframes","readKeyframes","KeyframeResolver","unresolvedKeyframes","onComplete","motionValue","isAsync","isComplete","scheduleResolve","resolveKeyframes","valueAsRead","readValue","setFinalKeyframe","renderEndStyles","resume","isColorString","testProp","splitColor","aName","bName","cName","rgbUnit","clampRgbUnit","rgba","blue","alpha$1","hex","hsla","hue","saturation","lightness","NUMBER_TOKEN","COLOR_TOKEN","VAR_TOKEN","VAR_FUNCTION_TOKEN","SPLIT_TOKEN","complexRegex","analyseComplexValue","originalValue","indexes","var","types","parsedValue","parseComplexValue","createTransformer","numSections","convertNumbersToZero","complex","getAnimatableNone","transformer","maxDefaults","applyDefaultFilter","functionRegex","functions","defaultValueTypes","backgroundColor","outlineColor","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","WebkitFilter","getDefaultValueType","defaultValueType","invalidTemplates","DOMKeyframesResolver","owner","keyframe","resolveNoneKeyframes","originType","targetType","noneKeyframeIndexes","animatableTemplate","noneIndex","makeNoneKeyframesAnimatable","pageYOffset","measuredOrigin","measureViewportBox","measureKeyframe","jump","finalKeyframeIndex","unsetTransformName","unsetTransformValue","isAnimatable","BaseAnimation","autoplay","repeatDelay","isStopped","hasAttemptedResolve","updateFinishedPromise","_resolved","onKeyframesResolved","onUpdate","isGenerator","originKeyframe","targetKeyframe","isOriginAnimatable","isTargetAnimatable","hasKeyframesChanged","canAnimate","resolveFinishedPromise","resolvedAnimation","initPlayback","onPostResolved","resolve","reject","currentFinishedPromise","Promise","velocityPerSecond","frameDuration","velocitySampleDuration","calcGeneratorVelocity","resolveValue","prevT","safeMin","minDuration","maxDuration","minDamping","maxDamping","rootIterations","calcAngularFreq","undampedFreq","dampingRatio","durationKeys","physicsKeys","isSpringType","spring","restDelta","done","mass","isResolvedFromDuration","springOptions","derived","bounce","envelope","derivative","exponentialDecay","exp","pow","initialGuess","approximateRoot","findSpring","getSpringOptions","initialVelocity","initialDelta","undampedAngularFreq","isGranularScale","resolveSpring","angularFreq","sin","cos","dampedAngularFreq","freqForT","sinh","cosh","calculatedDuration","isBelowVelocityThreshold","isBelowDisplacementThreshold","inertia","power","timeConstant","bounceDamping","bounceStiffness","modifyTarget","nearestBoundary","amplitude","ideal","calcDelta","calcLatest","applyFriction","timeReachedBoundary","spring$1","checkCatchBoundary","isOutOfBounds","hasUpdatedFrame","calcBezier","a1","a2","cubicBezier","mX1","mY1","mX2","mY2","lowerBound","upperBound","currentX","currentT","binarySubdivide","easeIn","easeOut","easeInOut","mirrorEasing","easing","reverseEasing","circIn","acos","circOut","circInOut","backOut","backIn","backInOut","easingLookup","linear","anticipate","easingDefinitionToFunction","x1","y1","x2","y2","progress","to","toFromDifference","mixNumber","hueToRgb","mixLinearColor","fromExpo","expo","colorTypes","asRGBA","getColorType","model","hslaToRgba","mixColor","fromRGBA","toRGBA","blended","mixImmediate","getMixer","mixComplex","mixArray","mixObject","numValues","blendValue","template","originStats","targetStats","orderedOrigin","pointers","originIndex","originValue","matchOrder","mixer","keyframeValues","easingFunctions","isEasingArray","absoluteTimes","convertOffsetToTimes","arr","remaining","offsetProgress","fillOffset","defaultOffset","mapTimeToKeyframe","isClamp","inputLength","mixers","customMixer","mixerFactory","numMixers","easingFunction","createMixers","interpolator","progressInRange","interpolate","frameloopDriver","passTimestamp","stop","generators","decay","tween","percentToProgress","MainThreadAnimation","KeyframeResolver$1","holdTime","startTime","cancelTime","playbackSpeed","pendingPlayState","teardown","onStop","onResolved","keyframes$1","generatorFactory","mapPercentToKeyframes","mirroredGenerator","generator","Infinity","calcGeneratorDuration","resolvedDuration","totalDuration","play","pause","tick","sample","speed","timeWithoutDelay","isInDelayPhase","elapsed","frameGenerator","currentIteration","iterationProgress","isAnimationFinished","finish","driver","newSpeed","hasChanged","onPlay","stopDriver","isBezierDefinition","isWaapiSupportedEasing","supportedWaapiEasing","cubicBezierAsString","mapEasingToNativeEasingWithDefault","mapEasingToNativeEasing","supportsWaapi","acceleratedValues","AcceleratedAnimation","requiresPregeneratedKeyframes","pregeneratedAnimation","sampleAnimation","pregeneratedKeyframes","pregenerateKeyframes","valueName","keyframeOptions","iterations","animateStyle","pendingTimeline","timeline","onfinish","playbackRate","playState","attachTimeline","sampleTime","setWithVelocity","animateMotionValue","isHandoff","valueTransition","when","_delay","delayChildren","staggerChildren","staggerDirection","isTransitionDefined","shouldSkip","isWillChangeMotionValue","addUniqueItem","removeItem","SubscriptionManager","subscriptions","notify","numSubscriptions","getSize","collectMotionValues","MotionValue","version","canTrackVelocity","events","updateAndNotify","updatedAt","setPrevFrameValue","setCurrent","change","renderRequest","hasAnimated","prevFrameValue","prevUpdatedAt","subscription","on","unsubscribe","clearListeners","eventManagers","attach","passiveEffect","stopPassiveEffect","endAnimation","getPrevious","startAnimation","animationStart","animationComplete","clearAnimation","animationCancel","isAnimating","setMotionValue","hasValue","addValue","shouldBlockAnimation","protectedKeys","needsAnimating","shouldBlock","animateTarget","targetAndTransition","transitionOverride","animations","animationTypeState","HandoffAppearAnimations","appearId","shouldReduceMotion","setTarget","animateVariant","variant","getAnimation","getChildAnimations","variantChildren","forwardDelay","maxStaggerDuration","generateStaggerDuration","sortByTreeOrder","animateChildren","sortNodePosition","reversePriorityOrder","numAnimationTypes","createAnimationState","resolvedDefinition","animateVisualElement","animateList","createTypeState","whileInView","whileDrag","whileFocus","isInitialRender","buildResolvedTypeValues","changedActiveType","getVariantContext","removedKeys","encounteredKeys","removedVariantIndex","typeState","propIsVariant","activeDelta","isInherited","manuallyAnimateOnMount","prevProp","shouldAnimateType","checkVariantsDidChange","handledRemovedValues","definitionList","resolvedValues","prevResolvedValues","allKeys","markToAnimate","valueHasChanged","fallbackAnimation","fallbackTarget","getBaseTarget","shouldAnimate","setAnimateFunction","makeAnimator","updateAnimationControlsSubscription","prevAnimate","isPresent","onExitComplete","prevIsPresent","prevPresenceContext","exitAnimation","register","PanSession","handlers","contextWindow","dragSnapToOrigin","lastMoveEvent","lastMoveEventInfo","updatePoint","getPanInfo","history","isPanStarted","isDistancePastThreshold","xDelta","yDelta","distance2D","onStart","handlePointerMove","transformPoint","handlePointerUp","onEnd","onSessionEnd","resumeAnimation","panInfo","initialInfo","onSessionStart","removeListeners","updateHandlers","subtractPoint","lastDevicePoint","startDevicePoint","timeDelta","timestampedPoint","lastPoint","calcLength","isNear","maxDistance","calcAxisDelta","originPoint","translate","calcBoxDelta","calcRelativeAxis","relative","calcRelativeAxisPosition","calcRelativePosition","calcRelativeAxisConstraints","calcViewportAxisConstraints","layoutAxis","constraintsAxis","defaultElastic","resolveAxisElastic","dragElastic","minLabel","maxLabel","resolvePointElastic","createDelta","createBox","eachAxis","convertBoundingBoxToBox","isIdentityScale","hasScale","has2DTranslate","is2DTranslate","scalePoint","applyPointDelta","boxScale","applyAxisDelta","applyBoxDelta","box","snapToDefault","isInteger","translateAxis","transformAxis","transforms","scaleKey","originKey","axisOrigin","xKeys","yKeys","transformBox","topLeft","bottomRight","transformBoxPoints","getContextWindow","elementDragControls","VisualElementDragControls","openGlobalLock","isDragging","currentDirection","constraints","hasMutatedConstraints","elastic","originEvent","snapToCursor","panSession","pauseAnimation","dragPropagation","onDragStart","resolveConstraints","isAnimationBlocked","getAxisMotionValue","measuredAxis","layoutBox","dragDirectionLock","onDirectionLock","onDrag","lockThreshold","getCurrentDirection","updateAxis","getAnimationState","getTransformPagePoint","onDragEnd","_point","shouldDrag","axisValue","applyConstraints","dragConstraints","measure","prevConstraints","resolveRefConstraints","calcRelativeConstraints","resolveDragElastic","relativeConstraints","rebaseAxisConstraints","onMeasureDragConstraints","constraintsElement","constraintsBox","rootProjectionNode","viewportBox","measurePageBox","measuredConstraints","calcViewportConstraints","userConstraints","convertBoxToBoundingBox","dragMomentum","dragTransition","onDragTransitionEnd","momentumAnimations","startAxisValueAnimation","dragKey","scalePositionWithinConstraints","boxProgress","sourceLength","targetLength","updateScroll","updateLayout","addListeners","stopPointerListener","measureDragConstraints","stopMeasureLayoutListener","stopResizeListener","stopLayoutUpdateListener","hasLayoutChanged","asyncHandler","globalProjectionState","hasAnimatedSinceResize","hasEverUpdated","pixelsToPercent","pixels","correctBorderRadius","correct","correctBoxShadow","treeScale","projectionDelta","original","shadow","xScale","yScale","averageScale","MeasureLayoutWithContext","componentDidMount","layoutGroup","switchLayoutGroup","correctors","defaultScaleCorrectors","group","didUpdate","safeToRemove","setOptions","getSnapshotBeforeUpdate","layoutDependency","willUpdate","promote","relegate","stack","getStack","members","componentDidUpdate","currentAnimation","isLead","componentWillUnmount","promoteContext","scheduleCheckAfterUnmount","deregister","usePresence","applyTo","boxShadow","borders","numBorders","asNumber","isPx","getRadius","radiusName","easeCrossfadeIn","compress","easeCrossfadeOut","copyAxisInto","originAxis","copyBoxInto","originBox","removePointDelta","removeAxisTransforms","sourceAxis","removeAxisDelta","removeBoxTransforms","sourceBox","isAxisDeltaZero","isDeltaZero","boxEqualsRounded","NodeStack","scheduleRender","prevLead","lead","indexOfNode","member","preserveFollowOpacity","resumeFrom","preserveOpacity","animationValues","isUpdating","isLayoutDirty","crossfade","exitAnimationComplete","resumingFrom","removeLeadSnapshot","buildProjectionTransform","latestTransform","xTranslate","yTranslate","zTranslate","elementScaleX","elementScaleY","compareByDepth","FlatTree","isDirty","transformAxes","hiddenVisibility","visibility","projectionFrameData","totalNodes","resolvedTargetDeltas","recalculatedProjection","resetDistortingTransform","sharedAnimationValues","setStaticValue","createProjectionNode","attachResizeListener","defaultParent","measureScroll","checkIsScrollRoot","resetTransform","animationId","isTreeAnimating","isProjectionDirty","isSharedProjectionDirty","isTransformDirty","updateManuallyBlocked","updateBlockedByResize","isSVG","needsReset","shouldResetTransform","eventHandlers","hasTreeAnimated","updateScheduled","projectionUpdateScheduled","checkUpdateFailed","clearAllSnapshots","updateProjection","propagateDirtyNodes","resolveTargetDelta","calcProjection","cleanDirtyNodes","MotionDebug","record","hasProjected","animationProgress","sharedNodes","path","notifyListeners","subscriptionManager","hasListeners","SVGElement","cancelDelay","resizeUnblockUpdate","checkElapsed","finishAnimation","registerSharedNode","hasRelativeTargetChanged","newLayout","isTreeAnimationBlocked","relativeTarget","layoutTransition","defaultLayoutTransition","onLayoutAnimationStart","onLayoutAnimationComplete","targetChanged","targetLayout","hasOnlyRelativeTargetChanged","layoutRoot","setAnimationOrigin","animationOptions","blockUpdate","unblockUpdate","isUpdateBlocked","startUpdate","resetSkewAndRotation","getTransformTemplate","shouldNotifyListeners","prevTransformTemplateValue","updateSnapshot","clearMeasurements","clearIsLayoutDirty","HandoffCancelAllAnimations","resetTransformStyle","notifyLayoutUpdate","preRender","clearSnapshot","removeLeadSnapshots","scheduleUpdateProjection","alwaysMeasureLayout","prevLayout","layoutCorrected","phase","layoutScroll","isRoot","isResetRequested","hasProjection","transformTemplateValue","transformTemplateHasChanged","removeTransform","pageBox","removeElementScroll","roundAxis","measuredBox","boxWithoutScroll","rootScroll","applyTransform","transformOnly","withTransforms","boxWithoutTransform","setTargetDelta","targetDelta","forceRelativeParentToResolveTarget","relativeParent","resolvedRelativeTargetAt","forceRecalculation","getLead","isShared","attemptToResolveRelativeTarget","getClosestProjectingParent","relativeTargetOrigin","targetWithTransforms","isProjecting","canSkip","pendingAnimation","prevTreeScaleX","prevTreeScaleY","treePath","isSharedTransition","treeLength","applyTreeDeltas","projectionTransform","projectionDeltaWithTransform","prevProjectionTransform","notifyAll","snapshotLatestValues","mixedValues","relativeLayout","isSharedLayoutAnimation","isOnlyMember","shouldCrossfadeOpacity","hasOpacityCrossfade","prevRelativeTarget","mixTargetDelta","mixAxisDelta","mixAxis","mixBox","boxEquals","follow","opacityExit","borderLabel","followRadius","leadRadius","mixValues","motionValue$1","animateSingleValue","completeAnimation","applyTransformsToTarget","shouldAnimatePositionOnly","animationType","xLength","yLength","initialPromotionConfig","shouldPreserveFollowOpacity","getPrevLead","hasDistortingTransform","resetValues","emptyStyles","valuesToRender","corrected","num","resetTree","measuredLayout","axisSnapshot","layoutDelta","visualDelta","parentSnapshot","parentLayout","relativeSnapshot","onBeforeLayoutMeasure","userAgentContains","roundPoint","DocumentProjectionNode","HTMLProjectionNode","documentNode","removePointerDownListener","onPointerDown","pointerDownEvent","session","createPanHandlers","onPanSessionStart","onPanStart","onPan","onPanEnd","removeGroupControls","controls","dragControls","ProjectionNode","prefersReducedMotion","hasReducedMotionListener","visualElementStore","valueTypes","featureNames","numFeatures","propEventHandlers","numVariantProps","getClosestProjectingNode","allowProjection","VisualElement","_props","_prevProps","_visualElement","valueSubscriptions","prevMotionValues","propEventSubscriptions","notifyUpdate","triggerBuild","renderInstance","baseTarget","initialValues","initialMotionValues","removeFromVariantTree","addVariantChild","bindToMotionValue","matchMedia","motionMediaQuery","setReducedMotionPreferences","addListener","initPrefersReducedMotion","valueIsTransform","removeOnChange","latestValue","removeOnRenderRequest","other","sortInstanceNodePosition","renderedProps","ProjectionNodeConstructor","FeatureConstructor","MeasureLayoutComponent","feature","build","measureInstanceViewportBox","getStaticValue","prevValue","existingValue","removeValue","updateMotionValuesFromProps","handleChildMotionValue","getVariant","getClosestVariantNode","startAtParent","closestVariantNode","removeValueFromRenderState","getBaseTargetFromProps","readValueFromInstance","findValueType","setBaseTarget","valueFromInitial","DOMVisualElement","HTMLVisualElement","defaultType","childSubscription","SVGVisualElement","motion","useIsMounted","PopChildMeasure","childRef","sizeRef","PopChild","motionPopId","PresenceChild","presenceAffectsLayout","presenceChildren","newChildrenMap","childId","getChildKey","AnimatePresence","exitBeforeEnter","forceRender","forcedRenderCount","setForcedRenderCount","filteredChildren","filtered","onlyElements","childrenToRender","exitingChildren","presentChildren","allChildren","updateChildLookup","presentKeys","targetKeys","numPresent","insertionIndex","exitingComponent","onExit","leftOverKeys","childKey","leftOverKey","presentChild","presentChildKey","breakpoints","useBreakpointIndex","defaultIndex","TypeError","RangeError","onResize","newValue","bp","useResponsiveValue","Flex","ItemsColumn","ItemsRow","useFlex","directionProp","expanded","gap","justify","wrap","otherProps","isReversed","useDeprecatedProps","isColumn","alignItems","flexDirection","flexWrap","justifyContent","FlexContext","flexItemDisplay","useFlexItem","displayProp","isBlock","sx","contextDisplay","Base","flexBlockProps","useFlexBlock","LOWER_LEFT_REGEXP","LOWER_RIGHT_REGEXP","UPPER_LEFT_REGEXP","UPPER_RIGHT_REGEXP","getConvertedKey","convertLTRToRTL","ltrStyles","fromEntries","rtlStyles","isDefined","watch","Spacer","spacerProps","marginX","marginY","paddingX","paddingY","useSpacer","Path","flexItemProps","Truncate","isValueDefined","ensureNumber","stringToNumber","TRUNCATE_ELLIPSIS","TRUNCATE_TYPE","auto","none","TRUNCATE_DEFAULT_PROPS","ellipsis","ellipsizeMode","limit","numberOfLines","useTruncate","childrenAsText","truncatedContent","words","truncateHead","truncateTail","word","headLength","tailLength","wordLength","frontLength","backLength","truncateStr","truncateMiddle","truncateContent","shouldTruncate","grad","turn","rad","PI","N","M","H","isValid","brightness","isDark","isLight","toHex","toRgb","toRgbString","toHsl","toHslString","toHsv","invert","saturate","desaturate","grayscale","lighten","darken","isEqual","S","bisque","cadetblue","chartreuse","chocolate","coral","antiquewhite","aqua","azure","whitesmoke","papayawhip","plum","blanchedalmond","black","gold","goldenrod","gainsboro","cornsilk","cornflowerblue","burlywood","aquamarine","beige","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkkhaki","darkgray","darkgreen","darkgrey","peachpuff","darkmagenta","darkred","darkorchid","darkorange","darkslateblue","darkslategray","darkslategrey","deeppink","deepskyblue","wheat","firebrick","floralwhite","ghostwhite","darkviolet","magenta","dodgerblue","grey","honeydew","hotpink","blueviolet","forestgreen","lawngreen","indianred","indigo","fuchsia","brown","maroon","mediumblue","lightcoral","darkturquoise","lightcyan","ivory","lightyellow","lightsalmon","lightseagreen","linen","mediumaquamarine","lemonchiffon","lime","khaki","mediumseagreen","limegreen","mediumspringgreen","lightskyblue","lightblue","midnightblue","lightpink","mistyrose","moccasin","mintcream","lightslategray","lightslategrey","navajowhite","navy","mediumvioletred","powderblue","palegoldenrod","oldlace","paleturquoise","mediumturquoise","mediumorchid","rebeccapurple","lightsteelblue","mediumslateblue","thistle","tan","orchid","mediumpurple","purple","pink","skyblue","springgreen","palegreen","slateblue","lavenderblush","peru","palevioletred","violet","teal","slategray","slategrey","aliceblue","darkseagreen","darkolivegreen","greenyellow","seagreen","seashell","tomato","silver","sienna","lavender","lightgreen","orange","orangered","steelblue","royalblue","turquoise","yellowgreen","salmon","saddlebrown","sandybrown","rosybrown","darksalmon","lightgoldenrodyellow","snow","lightgrey","lightgray","dimgray","dimgrey","olivedrab","olive","toName","colorComputationNode","extend","namesPlugin","getComputedBackgroundColor","colord","getColorComputationNode","computedColor","Text","positive","destructive","muted","highlighterText","upperCase","memoizedLowercaseProps","mapped","BASE_FONT_SIZE","PRESET_FONT_SIZES","caption","footnote","largeTitle","subheadline","title","HEADING_FONT_SIZES","flatMap","getFontSize","getHeadingFontSize","useText","adjustLineHeightForInnerControls","isDestructive","highlightEscape","highlightCaseSensitive","highlightWords","highlightSanitize","letterSpacing","lineHeightProp","optimizeReadabilityFor","truncate","weight","content","isHighlighter","isCaption","activeClassName","activeStyle","highlightClassName","highlightStyle","highlightTag","unhighlightClassName","unhighlightStyle","HighlightTag","highlightStyles","highlightIndex","highlightClassNames","highlightClass","createHighlighterText","finalEllipsizeMode","truncateProps","getLineHeight","textAlign","optimalTextColor","isOptimalTextColorDark","getOptimalTextColor","textProps","baseLabelTypography","Prefix","Suffix","backdropBorderColor","isBorderless","BackdropUI","Root","containerDisabledStyles","containerWidthStyles","__unstableInputWidth","labelPosition","Container","disabledStyles","fontSizeStyles","inputSize","sizes","small","compact","getSizeConfig","__next40pxDefaultSize","minHeight","sizeStyles","customPaddings","paddingInlineStart","paddingInlineEnd","dragStyles","dragCursor","defaultArrowStyles","activeDragCursorStyles","Input","BaseLabel","Label","LabelWrapper","FlexItem","prefixSuffixWrapperStyles","isPrefix","PrefixSuffixWrapper","MemoizedBackdrop","hideLabelFromVision","htmlFor","useDeprecated36pxDefaultSizeProp","__next36pxDefaultSize","getUIFlexProps","InputBase","idProp","suffix","instanceId","useUniqueId","hideLabel","prefixSuffixContextValue","InputControlPrefixWrapper","InputControlSuffixWrapper","Backdrop","V","toVector","v1","v2","addTo","subTo","rubberband","dimension","constant","rubberbandIfOutOfBounds","_defineProperty","prim","toPrimitive","res","hint","_toPrimitive","_toPropertyKey","ownKeys","_objectSpread2","EVENT_TYPE_MAP","pointer","mouse","touch","gesture","capitalize","actionsWithoutCaptureSupported","pointerCaptureEvents","parseProp","eventKey","captureKey","device","isTouch","getPointerType","getValueEvent","changedTouches","targetTouches","getTouchList","pointerId","valueEvent","pointerValues","assignDefault","Engine","ctrl","computeValues","computeInitial","shared","eventStore","gestureEventStores","timeoutStore","gestureTimeoutStores","sharedConfig","ingKey","_active","_blocked","_force","_step","intentional","_movement","_distance","_direction","_delta","_bounds","elapsedTime","_movementBound","movement","timeStamp","lastOffset","_values","_initial","compute","dt","touches","pointerIds","touchIds","locked","pointerLockElement","payload","buttons","shiftKey","getEventDetails","pressed","_absoluteDelta","axisIntent","_m0","_m1","t0","t1","hasCustomTransform","sign","v0","restrictToAxis","previousOffset","gestureIsActive","bounds","computeOffset","ox","oy","x0","y0","Vx","Vy","Rx","Ry","X0","X1","Y0","Y1","computeRubberband","computeMovement","absoluteDelta","emit","clean","triggerAllEvents","aliasKey","CoordinatesEngine","axisThreshold","dx","dy","absDx","absDy","selectAxis","lockDirection","commonConfigResolver","eventOptions","_k","coordinatesConfigResolver","_v","KEYS_DELTA_MAP","displacement","factor","supportsTouchEvents","SUPPORT","isBrowser","GestureEvent","supportsGestureEvents","touchscreen","pointerLock","DEFAULT_DRAG_AXIS_THRESHOLD","pen","dragConfigResolver","preventScrollAxis","preventScrollDelay","pointerCapture","pointerButtons","filterTaps","tapsThreshold","swipe","keyboardDisplacement","scaleBounds","angleBounds","_scaleBounds","D","_angleBounds","modifierKey","pinchOnWheel","mouseOnly","ConfigResolverMap","engine","_pointerId","_pointerActive","_keyboardActive","_preventScroll","_delayed","canceled","boundRect","targetRect","pointerClean","pointerDown","ctrlIds","setEventIds","setPointerCapture","setupPointer","setupScrollPrevention","setupDelayTrigger","startPointerDrag","pointerMove","pointerUp","hasPointerCapture","releasePointerCapture","_unused","_dx","_dy","_mx","_my","svx","svy","sy","sdt","_vx","_vy","pointerClick","detail","requestPointerLock","exitPointerLock","persist","persistEvent","keyDown","deltaFn","keyUp","bindFunction","sharedConfigResolver","_excluded","resolveWith","resolvers","EventStore","gestureKey","_ctrl","_gestureKey","_listeners","deviceProps","toDomEventType","TimeoutStore","ms","_timeouts","Controller","internalHandlers","setupGesture","wheel","pinch","_event$currentTarget","_event$currentTarget$","getCurrentTargetTouchList","applyHandlers","nativeHandlers","applyConfig","newConfig","_config","excluded","sourceKeys","_objectWithoutPropertiesLoose","sourceSymbolKeys","_objectWithoutProperties","_targetEventStore","gestures","gestureConfig","bindToProps","nativeBindFunction","handlerProp","withPassiveOption","isNative","_options$capture","_options$passive","actionKey","hasCapture","toHandlerProp","useDrag","useRecognizers","initialStateReducer","initialInputControlState","isDragEnabled","isPressEnterToChange","CHANGE","COMMIT","CONTROL","DRAG_END","DRAG_START","DRAG","INVALIDATE","PRESS_DOWN","PRESS_ENTER","PRESS_UP","RESET","withIgnoreIMEEvents","keydownHandler","isComposing","nativeEvent","keyCode","ForwardedComponent","dragDirection","dragThreshold","onValidate","stateReducer","valueProp","commit","dragEnd","dragStart","invalidate","pressDown","pressEnter","pressUp","onChangeHandler","dispatch","composedStateReducers","actions","_event","mergeInitialState","createChangeEvent","createKeyEvent","createDragEvent","currentStateRef","refPropsRef","_state$value","_initialState$value","useInputControlStateReducer","wasDirtyOnBlur","getDragCursor","useDragCursor","handleOnCommit","dragGestureProps","dragProps","dragging","handleOnMouseDown","validity","valid","mobileTextMinFontSize","font","_FONT$value","FONT","boxSizingReset","Wrapper","deprecatedMarginField","__nextHasNoMarginBottom","StyledField","labelStyles","StyledLabel","deprecatedMarginHelp","StyledHelp","StyledVisualLabel","VisualLabel","UnforwardedVisualLabel","BaseControl","__associatedWPComponentName","help","maybeWarnDeprecated36pxSize","__shouldNotWarnDeprecated36pxSize","InputControl","__unstableStateReducer","draftHookProps","previousValueRef","draft","setDraft","isStale","extra","useDraft","helpProp","InputField","icon","extraProps","iconClass","additionalProps","Dashicon","appliedProps","disabledEventsOnDisabledButton","Button","isBusy","iconPosition","iconSize","showTooltip","tooltipPosition","description","buttonOrAnchorProps","__experimentalIsFocusable","isDefault","isSecondary","isTertiary","isLink","isPressed","isSmall","describedBy","computedSize","computedVariant","_computedSize","_computedVariant","_computedVariant2","_computedVariant3","_computedVariant4","_computedVariant5","href","ariaChecked","ariaPressed","ariaSelected","hasChildren","Tag","buttonProps","anchorProps","disableEventProps","disabledEvent","shouldShowTooltip","commonProps","elementChildren","_Fragment","tooltipProps","htmlArrowStyles","hideHTMLArrows","SpinButton","smallSpinButtons","getNumber","sum","roundClamp","stepValue","precision","getPrecision","clampedValue","toFixed","H_ALIGNMENTS","bottomLeft","edge","stretch","topRight","V_ALIGNMENTS","getValidChildren","useHStack","getAlignmentProps","clonedChildren","childElement","propsForFlex","flexProps","hStackProps","NumberControl","stateReducerProp","spinControls","isShiftStepEnabled","required","shiftStep","spinFactor","typeProp","inputRef","isStepAny","baseStep","baseSpin","constrainValue","stepOverride","autoComplete","spinButtonClasses","spinValue","isEmptyString","isValueEmpty","diff","subtract","buildSpinButtonClickHandler","inputMode","_stateReducerProp","baseState","numberControlStateReducer","inputControlActionTypes","enableShift","modifier","directionModifier","ceil","applyEmptyValue","HStack","plusIcon","resetIcon","CircleRoot","CircleIndicatorWrapper","CircleIndicator","UnitText","angleCircleRef","angleCircleCenterRef","previousCursorValueRef","changeAngleToPosition","pointX","pointY","angleInRadians","atan2","angleInDeg","getAngle","startDrag","useDragging","setAngleCircleCenter","onDragMove","unitText","prefixedUnitText","suffixedUnitText","FlexBlock","unprocessedValue","inputValue","AngleCircle","ALL_UNICODE_DASH_CHARACTERS","normalizeTextString","toLocaleLowerCase","_str$toString","escapeRegExp","deepEqual","getDPR","useLatestRef","previousScrollTop","setLocked","methodName","classList","lockCounter","initialContextValue","slots","observableMap","fills","registerSlot","updateSlot","unregisterSlot","registerFill","unregisterFill","useSlot","registry","SlotFillContext","useObservableValue","updateFill","Fill","instanceRef","childrenRef","isFunction","maybeFunc","_useObservableValue","fillProps","renderedFills","childIndex","addKeysToChildren","isEmptyElement","getRandomValues","rnds8","Uint8Array","rng","crypto","msCrypto","byteToHex","uuid","buf","rnds","uuidCache","containerCacheMap","StyleProvider","createCache","memoizedCreateCacheWithContainer","_slot$fillProps","slot","wrappedChildren","fillPropsRef","createSlotRegistry","isShallowEqual","fillsForName","fillRef","SlotFillProvider","fillForInstance","BaseFill","BubblesVirtuallyFill","Slot","bubblesVirtually","BubblesVirtuallySlot","BaseSlot","passthrough","BubblesVirtuallySlotFillProvider","createSlotFill","baseName","FillComponent","SlotComponent","__unstableName","SLOT_NAME","ArrowTriangle","vectorEffect","slotNameContext","fallbackContainerClassname","Popover","UnforwardedPopover","headerTitle","constrainTabbing","noArrow","placementProp","offsetProp","focusOnMount","expandOnMobile","onFocusOutside","__unstableSlotName","resize","contentStyle","__unstableForcePosition","anchorRef","isAlternate","contentProps","computedFlipProp","computedResizeProp","arrowRef","fallbackReferenceElement","setFallbackReferenceElement","anchorRefFallback","isMobileViewport","useViewportMatch","isExpanded","hasArrow","normalizedPlacementFromProps","_elements$floating","firstElementChild","offsetMiddleware","flipMiddleware","sizeProps","_refs$floating$curren","shiftMiddleware","limitShift","slotName","onDialogClose","dialogRef","dialogProps","__unstableOnClose","arrowData","externalReference","externalFloating","whileElementsMounted","setData","isPositioned","latestMiddleware","setLatestMiddleware","_reference","_setReference","_floating","_setFloating","setReference","referenceRef","setFloating","floatingRef","floatingEl","dataRef","whileElementsMountedRef","platformRef","fullData","isMountedRef","floatingStyles","initialStyles","useFloating","referenceParam","floatingParam","updateParam","arrowCallbackRef","anchorRefTop","anchorRefBottom","anchorRefStartContainer","anchorRefCurrent","resultingReferenceElement","getReferenceElement","_referenceElement","referenceElement","isTopBottom","topRect","bottomRect","isRef","_rect$x","_rect$y","_rect$width","_rect$height","mergedFloatingRef","useReducedMotion","animationFinished","setAnimationFinished","motionInlineStyles","otherMotionProps","translateProp","translateDirection","placementToMotionAnimationProps","animationProps","onAnimationComplete","div","ScrollLock","close","shouldRenderWithinSlot","hasAnchor","getPopoverFallbackContainer","__unstableSlotNameProvider","ListBox","onSelect","selectedIndex","listBoxId","option","isDisabled","getAutoCompleterUI","autocompleter","_autocompleter$useIte","useItems","filterValue","isDebounced","loadOptions","debounce","promise","optionsData","keyedOptions","optionData","optionIndex","getOptionLabel","keywords","getOptionKeywords","isOptionDisabled","maxResults","keyword","filterOptions","getDefaultUseItems","onChangeOptions","onReset","contentRef","popoverAnchor","useAnchor","editableContentElement","needsA11yCompat","setNeedsA11yCompat","popoverRef","popoverRefs","useRefEffect","debouncedSpeak","useDebounce","speak","sprintf","_n","announce","getNodeText","EMPTY_FILTERED_OPTIONS","AUTOCOMPLETE_HOOK_REFERENCE","useAutocomplete","onReplace","completers","setSelectedIndex","filteredOptions","setFilteredOptions","setFilterValue","setAutocompleter","AutocompleterUI","setAutocompleterUI","backspacingRef","select","getOptionCompletion","completion","completionObject","triggerPrefix","toInsert","renderToString","insertCompletion","isCollapsed","getTextContent","completer","lastTrigger","currentCompleter","lastIndexOf","allowContext","triggerIndex","textWithoutTrigger","mismatch","wordsFromTrigger","hasOneTriggerWord","matchingWhileBackspacing","textAfterSelection","safeTrigger","query","selectedKey","hasSelection","newIndex","isAppleOS","useAutocompleteProps","onKeyDownRef","previousRecord","useLastDifferentValue","mergedRefs","_onKeyDown","Autocomplete","isSelected","useBaseControlProps","preferredId","uniqueId","baseControlProps","controlProps","borderBoxControl","borderBoxStyleWithFallback","centeredBorderControl","BorderBoxControlLinkedButton","isLinked","useBorderBoxControlLinkedButton","link","linkOff","BorderBoxControlVisualizer","borderBoxControlVisualizer","borderLeft","borderRight","useBorderBoxControlVisualizer","fillRule","clipRule","VisualLabelWrapper","createRadioStore","radio","useRadioStore","useRadioStoreProps","useRadioContext","useRadioProviderContext","RadioScopedContextProvider","useRadioGroup","RadioGroup","ToggleGroupControlContext","useComputeControlledOrUncontrolledValue","isInitialRenderRef","prevValueProp","usePrevious","prevIsControlledRef","isControlled","ToggleGroupControlAsRadioGroup","isAdaptiveWidth","onChangeProp","setSelectedElement","generatedId","wrappedOnChangeProp","selectedValue","groupContextValue","activeItemIsNotFirstItem","useControlledValue","ToggleGroupControlAsButtonGroup","setSelectedValue","isDeselectable","NULL_ELEMENT_OFFSET_RECT","useTrackElementOffsetRect","targetElement","indicatorPosition","setIndicatorPosition","intervalRef","elementOffsetRect","_offsetParent$getBoun","_offsetParent$scrollL","_offsetParent$scrollT","offsetParentRect","offsetParentScrollX","offsetParentScrollY","computedWidth","computedHeight","getElementOffsetRect","clearInterval","setElement","useResizeObserver","setInterval","useAnimatedOffsetRect","dataAttribute","transitionEndFilter","roundRect","setProperties","updateCallbackEvent","useOnValueUpdate","onTransitionEnd","normalizedSize","selectedElement","controlElement","setControlElement","pseudoElement","toggleGroupControl","toggleGroupControlSize","enclosingBorder","enclosingBorders","MainControl","useRadio","isChecked","storeValue","getIsChecked","nativeRadio","propertyUpdated","schedulePropertyUpdate","Radio","LabelView","labelBlock","buttonView","isIcon","deselectable","isIconStyles","ButtonContentView","WithToolTip","ConnectedToggleGroupControlOptionBase","ToggleGroupControlOptionBase","toggleGroupControlContext","otherButtonProps","labelViewClasses","itemClasses","labelRef","buttonOnClick","ToggleGroupControlOptionIcon","BORDER_STYLES","lineSolid","lineDashed","lineDotted","ToggleGroupControl","borderStyle","colorValue","luminance","contrast","isReadable","Dropdown","UnconnectedDropdown","renderContent","renderToggle","contentClassName","popoverProps","onToggle","fallbackPopoverAnchor","setFallbackPopoverAnchor","containerRef","isOpen","setIsOpen","popoverPropsHaveAnchor","derivedProps","inputBaseVariantStyles","StyledInputBase","multiple","selectSize","sizePaddings","selectedPadding","overflowStyles","variantStyles","Select","DownArrowWrapper","InputControlSuffixWrapperWithClickThrough","SelectControlChevronDown","chevronDown","SelectOptions","optionProps","SelectControl","helpId","selected","defaultOptions","currentState","internalState","setInternalState","hasCurrentState","fallbackValue","_values$find","getDefinedValue","floatClamp","rangeHeight","deprecatedHeight","wrapperColor","wrapperMargin","marks","BeforeIconWrapper","AfterIconWrapper","railBackgroundColor","railColor","Rail","trackBackgroundColor","trackColor","Track","MarksWrapper","Mark","markLabelFill","isFilled","MarkLabel","thumbColor","ThumbWrapper","thumbFocus","isFocused","thumbSize","Thumb","InputRange","tooltipShow","InputNumber","ActionRightWrapper","BaseInputRange","RangeMark","labelClasses","RangeRail","Marks","stepProp","marksData","placedMarks","mark","offsetStyle","useMarks","_createElement","SimpleTooltip","renderTooltipContent","setPosition","setTooltipPosition","useTooltipPosition","computeResetValue","resetFallbackValue","initialPosition","RangeControl","UnforwardedRangeControl","afterIcon","allowReset","beforeIcon","colorProp","currentInput","showTooltipProp","withInputField","settings","useControlledState","useControlledRangeValue","isResetPendent","hasTooltip","hasInputField","setShowTooltip","setIsFocused","isCurrentlyFocused","isThumbFocused","isValueReset","inputSliderValue","rangeFillValue","fillValueOffset","wrapperClasses","enableTooltip","handleOnReset","resetValue","handleOnInputNumberBlur","NumberControlWrapper","InnerSelectControl","InnerRangeControl","interactiveHueStyles","AuxiliaryColorArtefactWrapper","AuxiliaryColorArtefactHStackHeader","ColorInputWrapper","ColorfulWrapper","ColorCopyButton","colorType","copiedColor","setCopiedColor","copyTimerRef","copyRef","useCopyToClipboard","InputWithSlider","abbreviation","RgbInput","enableAlpha","nextR","nextG","nextB","trunc","nextA","HslInput","colorPropHSLA","internalHSLA","setInternalHSLA","isInternalColorSameAsReceivedColor","updateHSLAValue","partialNewValue","nextOnChangeValue","prevHSLA","nextH","nextS","nextL","HexInput","hexValue","inputType","ColorInput","useEventCallback","callbackRef","getRelativePosition","pageX","pageXOffset","pageY","preventDefaultMove","Interactive","React","onKey","onMoveCallback","onKeyCallback","hasTouch","handleMove","toggleDocumentEvents","handleMoveEnd","toggleEvent","which","handleMoveStart","handleKeyDown","onTouchStart","formatClassName","names","Pointer","nodeClassName","digits","hsvaToHsla","hh","hsvaToHslString","hsva","hsvaToHslaString","hsvaToRgba","rgbaStringToHsva","rgbaString","rgbaToHsva","rgbStringToHsva","Hue","interaction","aria-label","aria-valuetext","Saturation","containerStyle","equalColorString","useColorManipulation","colorModel","onChangeCallback","toHsva","updateHsva","newHsva","newColor","equalColorObjects","fromHsva","handleChange","params","styleElement","useStyleSheet","innerHTML","__webpack_nonce__","ColorPicker","defaultColor","Alpha","gradientStyle","backgroundImage","AlphaColorPicker","RgbaStringColorPicker","RgbStringColorPicker","Picker","nextColor","onPointerUp","UnconnectedColorPicker","copyFormat","divProps","setColor","safeColordColor","debouncedSetColor","setColorType","nextColorType","getColorFromLegacyProps","transformColorStringToLegacyColor","colordColor","rgb","hsv","hsl","oldHue","onChangeComplete","legacyChangeHandler","disableAlpha","isLegacyProps","LegacyAdapter","CircularOptionPickerContext","OptionAsButton","OptionAsOption","ListboxCircularOptionPicker","loop","ButtonsCircularOptionPicker","CircularOptionPicker","asButtons","actionsProp","optionsProp","OptionPickerImplementation","Option","selectedIconProps","tooltipText","optionControl","check","OptionGroup","ButtonAction","DropdownLinkAction","dropdownProps","linkText","vStackProps","useVStack","Heading","headerProps","asProp","a11yProps","useHeading","ColorHeading","paddingSize","paddingValues","medium","DropdownContentWrapperDiv","a11yPlugin","isSimpleCSSColor","valueIsCssVariable","valueIsColorMix","isMultiplePaletteArray","colorObj","isMultiplePaletteObject","colors","SinglePalette","clearColor","colorOptions","MultiplePalettes","headingLevel","VStack","colorPalette","CustomColorPickerDropdown","isRenderedInSidebar","receivedPopoverProps","ColorPalette","clearable","disableCustomColors","__experimentalIsRenderedInSidebar","ariaLabelledby","normalizedColorValue","setNormalizedColorValue","customColorPaletteCallbackRef","normalizeColorValue","computedBackgroundColor","hasMultipleColorOrigins","buttonLabelName","extractColorNameFromCurrentValue","showMultiplePalettes","currentValueIsSimpleColor","normalizedCurrentValue","colorPalettes","paletteColors","colorName","isHex","displayValue","customColorAccessibleLabel","paletteCommonProps","metaProps","_metaProps","renderCustomColorPicker","DropdownContentWrapper","ValueInput","baseUnitLabelStyles","UnitLabel","unitSelectSizes","UnitSelect","focusBoxShadow","borderControl","wrapperWidth","UnitControlWrapper","borderControlDropdown","borderControlPopoverControls","swatchSize","borderControlPopoverContent","borderColorIndicator","resetButton","isWeb","Platform","OS","allUnits","a11yLabel","em","_x","rem","vmin","vmax","ch","ex","cm","mm","in","pc","pt","svw","svh","svi","svb","svmin","lvw","lvh","lvi","lvb","lvmin","dvw","dvh","dvi","dvb","dvmin","dvmax","svmax","lvmax","ALL_CSS_UNITS","CSS_UNITS","DEFAULT_UNIT","getParsedQuantityAndUnit","fallbackUnit","allowedUnits","parseQuantityAndUnitFromRawValue","hasUnits","units","trimmedValue","quantityToReturn","parsedQuantity","unitMatch","matchedUnit","unitToReturn","useCustomUnits","availableUnits","defaultValues","customUnitsToReturn","allowedUnitValues","filterUnitsWithSettings","parsedDefaultValue","getAriaLabelColorValue","ConnectedBorderControlDropdown","BorderControlDropdown","enableStyle","indicatorClassName","indicatorWrapperClassName","isStyleSettable","onColorChange","onStyleChange","popoverContentClassName","popoverControlsClassName","resetButtonClassName","__unstablePopoverProps","previousStyleSelection","widthValue","hasZeroWidth","colorIndicatorWrapper","fallbackColor","colorIndicatorBorder","useBorderControlDropdown","colorObject","getColorObject","matchedColor","toggleAriaLabel","getToggleAriaLabel","isStyleEnabled","ariaLabelValue","showResetButton","dropdownPosition","ColorIndicator","BorderControlStylePicker","isUnitSelectTabbable","unitValue","UnitControl","unitControlProps","disableUnits","isResetValueOnUnitChange","onUnitChange","unitProp","unitsProp","nonNullValueProp","reFirstCharacterOfUnits","legacyUnit","unitsToReturn","currentUnit","getUnitsWithCurrentUnit","firstUnitValue","firstCharacters","carry","parsedUnit","setUnit","handleOnKeyDown","refInputSuffix","inputSuffix","UnitSelectControl","handleOnUnitChange","nextUnitValue","changeProps","_activeUnit$step","activeUnit","handleOnQuantityChange","nextQuantityValue","onChangeValue","fallbackQuantity","getValidParsedQuantityAndUnit","isValidBorder","BorderLabel","BorderControl","UnconnectedBorderControl","innerWrapperClassName","inputWidth","onBorderChange","onSliderChange","onWidthChange","placeholder","showDropdownHeader","sliderClassName","widthUnit","withSlider","isCompact","shouldSanitizeBorder","originalWidthUnit","hadPreviousZeroWidth","colorSelection","setColorSelection","styleSelection","setStyleSelection","newBorder","newWidth","newWidthValue","updatedBorder","widthStyle","heightStyle","useBorderControl","spaced","gridProps","columnGap","isInline","rowGap","templateColumns","templateRows","gridTemplateColumns","gridTemplateRows","alignmentProps","gridClasses","gridRowGap","gridColumnGap","verticalAlign","useGrid","BorderBoxControlSplitControls","centeredClassName","popoverPlacement","popoverOffset","rightAlignedClassName","useBorderBoxControlSplitControls","setPopoverAnchor","sharedBorderControlProps","Grid","UNITED_VALUE_REGEX","borderProps","isEmptyBorder","isDefinedBorder","hasSplitBorders","hasMixedBorders","shorthandBorders","getShorthandBorderStyle","fallbackBorder","fallbackStyle","fallbackWidth","useBorderBoxControl","mixedBorders","splitBorders","linkedValue","widths","allColorsMatch","allStylesMatch","allWidthsMatch","currentMode","maxCount","toParse","matched","numParsed","parseCSSUnitValue","getCommonBorder","splitValue","getSplitBorders","hasWidthValue","setIsLinked","linkedControlClassName","wrapperClassName","onLinkedChange","changes","getBorderDiff","updatedBorders","filteredResult","onSplitChange","toggleLinked","BorderBoxControl","UnconnectedBorderBoxControl","CUSTOM_VALUE_SETTINGS","rm","vi","vb","LABELS","vertical","horizontal","DEFAULT_VALUES","ALL_SIDES","isValueMixed","availableSides","normalizeSides","isValuesDefined","getInitialSide","splitOnAxis","initialSide","filteredSides","newSides","applyValueToSides","getAllowedSides","allowedSides","allowedSide","isValuePreset","presetKey","Viewbox","strokeFocus","Stroke","VerticalStroke","HorizontalStroke","TopStroke","RightStroke","BottomStroke","LeftStroke","BoxControlIcon","hasSide","isSideDisabled","StyledUnitControl","InputWrapper","ResetButton","LinkedButtonWrapper","FlexedBoxControlIcon","FlexedRangeControl","getSidesToModify","isAlt","modifiedSides","BoxInputControl","selectedUnits","setSelectedUnits","presets","_CUSTOM_VALUE_SETTING","_CUSTOM_VALUE_SETTING2","defaultValuesToModify","handleOnChange","nextValues","handleOnValueChange","modifiedSide","mergedValue","getMergedValue","hasValues","isMixed","computedUnit","inputId","isMixedUnit","usedValue","mixedPlaceholder","hasPresets","hasPresetValue","showCustomValueControl","setShowCustomValueControl","presetIndex","slug","preset","getPresetIndexFromValue","_preset$name","newUnits","getPresetValueFromIndex","handleRawOnValueChange","LinkedButton","defaultInputProps","BoxControl","inputProps","valuesProp","onMouseOver","onMouseOut","setValues","inputValues","hasInitialValue","hasOneSide","setIsDirty","setSide","inputControlProps","handleOnFocus","nextSide","sidesToRender","__shouldNotWarnDeprecated","Elevation","getBoxShadow","elevationProps","isInteractive","hoverValue","activeValue","useElevation","adjustedBorderRadius","Card","Header","Footer","Content","Body","Media","Divider","boxShadowless","borderless","rounded","xSmallCardPadding","cardPaddings","large","xSmall","extraSmall","shady","Surface","getBorders","borderBottom","borderTop","primary","secondary","tertiary","customBackgroundSize","surfaceBackgroundSize","dottedBackground1","surfaceBackgroundSizeDotted","dottedBackground2","gridBackgroundCombined","getDotted","dottedBackgroundCombined","getGrid","useSurface","backgroundSize","elevation","isRounded","isElevated","propsToReturn","computedElevation","_computedElevation","useCard","elevationBorderRadius","elevationClassName","contextProviderValue","CardBody","CardHeader","CardFooter","scrollableScrollbar","Scrollable","smoothScroll","scrollAuto","scrollableProps","scrollDirection","useScrollable","isScrollable","isShady","useCardBody","useSeparator","Separator","MARGIN_DIRECTIONS","renderMargin","marginStart","marginEnd","renderDisplay","renderBorder","renderSize","DividerView","dividerProps","useCardDivider","footerProps","useCardFooter","useCardHeader","cardMediaProps","useCardMedia","CheckboxControl","heading","indeterminate","showCheckedIcon","setShowCheckedIcon","showIndeterminateIcon","setShowIndeterminateIcon","TIMEOUT","ClipboardButton","onCopy","onFinishCopy","timeoutIdRef","itemWrapper","bordered","separated","spacedAround","baseFontHeight","paddingYSmall","paddingYLarge","itemSizes","ItemGroupContext","useItemGroupContext","sizeProp","contextSize","useItem","isBordered","isSeparated","useItemGroup","MINIMUM_DISTANCE_BETWEEN_INSERTER_AND_POINT","MINIMUM_DISTANCE_BETWEEN_POINTS","KEYBOARD_CONTROL_POINT_VARIATION","clampPercent","updateControlPoint","newPoint","updateControlPointPosition","newPosition","initialIndex","minDistance","minPosition","maxPosition","isOverlapping","updateControlPointColor","getHorizontalRelativeGradientPosition","mouseXCoordinate","absolutePositionValue","ControlPointButton","GradientColorPickerDropdown","mergedClassName","ControlPoints","disableRemove","gradientPickerDomRef","ignoreMarkerPosition","controlPoints","onStartControlPointChange","onStopControlPointChange","controlPointMoveStateRef","relativePosition","significantMoveHappened","cleanEventListeners","listenersActivated","cleanEventListenersRef","pointIndex","removeControlPoint","InsertPoint","onOpenInserter","onCloseInserter","insertPosition","alreadyInsertedPoint","setAlreadyInsertedPoint","plus","updateControlPointColorByPosition","newPoints","addControlPoint","customGradientBarReducer","customGradientBarReducerInitialState","CustomGradientBar","hasGradient","disableInserter","gradientMarkersContainerDomRef","gradientBarState","gradientBarStateDispatch","onMouseEnterAndMove","isMovingInserter","isInsertingControlPoint","DEFAULT_GRADIENT","HORIZONTAL_GRADIENT_ORIENTATION","GRADIENT_OPTIONS","DIRECTIONAL_ORIENTATION_ANGLE_MAP","serializeGradientColorStop","serializeGradientColor","serializeGradientPosition","serializeGradient","serializedOrientation","serializeGradientOrientation","colorStop1","colorStop2","getNumericStopValue","colorStop","hasUnsupportedLength","getStopCssColor","SelectWrapper","AccessoryWrapper","GradientAnglePicker","gradientAST","_gradientAST$orientat","angle","AnglePickerControl","newAngle","GradientTypePicker","onSetRadialGradient","restGradientAST","valueToParse","gradientParser","console","warn","getGradientAstWithDefault","getLinearGradientRepresentation","newControlPoints","getGradientAstWithControlPoints","SingleOrigin","clearGradient","gradients","gradientOptions","gradient","MultipleOrigin","gradientSet","gradientObj","isMultipleOriginObject","disableCustomGradients","CustomGradientPicker","MENU_ITEM_ROLES","NavigableContainer","bindContainer","getFocusableContext","getFocusableIndex","onlyBrowserTabstops","focusables","cycle","eventToOffset","onNavigate","stopNavigationEvents","stopImmediatePropagation","targetRole","total","cycleValue","forwardedNavigableContainer","NavigableMenu","evt","DropdownMenu","dropdownMenuProps","toggleProps","menuProps","disableOpenOnArrowDown","noIcons","onToggleProp","controlSets","mergedPopoverProps","_toggleProps$showTool","Toggle","restToggleProps","mergedToggleProps","openOnArrowDown","mergedMenuProps","controlSet","indexOfSet","indexOfControl","IndicatorStyled","NameInputControl","InputControlContainer","InputBackdropUI","NameContainer","PaletteHeading","PaletteActionsContainer","PaletteEditContents","PaletteEditStyles","DoneButton","RemoveButton","NameInput","ColorPickerPopover","isGradient","newGradient","canOnlyChangeValues","onRemove","slugPrefix","isEditingColor","setIsEditingColor","nextName","PaletteEditListView","addColorRef","elementsReferenceRef","debounceOnChange","updatedElements","slugCounts","_newSlug","newSlug","deduplicateElementSlugs","ItemGroup","newElement","currentElement","currentIndex","newElements","_currentElement","EMPTY_ARRAY","paletteLabel","paletteLabelHeadingLevel","emptyMessage","canReset","isEditing","setIsEditing","editingElement","setEditingElement","isAdding","hasElements","onSelectPaletteItem","newEditingElementIndex","nameRegex","getNameAndSlugForPosition","moreVertical","GradientPicker","deprecatedDefaultSize","InputWrapperFlex","TokenInput","selectedSuggestionIndex","setHasFocus","handleMouseDown","onHover","suggestions","displayTransform","__experimentalRenderItem","listRef","listNode","handleHover","suggestion","handleClick","matchText","transformedSuggestion","indexOfMatch","suggestionBeforeMatch","suggestionMatch","suggestionAfterMatch","computeSuggestionMatch","createHigherOrderComponent","handleFocusOutside","setHandleFocusOutside","bindFocusOutsideHandler","useFocusOutside","DetectOutside","withFocusOutside","getIndexOfMatchingSuggestion","selectedSuggestion","matchingSuggestions","ComboboxControl","_currentOption$label","onFilterValueChange","messages","expandOnFocus","currentOption","currentLabel","setSelectedSuggestion","setIsExpanded","inputHasFocus","setInputHasFocus","setInputValue","inputContainer","startsWithMatch","containsMatch","onSuggestionSelected","newSelectedSuggestion","handleArrowNavigation","hasMatchingSuggestions","hasSelectedMatchingSuggestions","closeSmall","SuggestionsList","mapLegacyStatePropsToComponentProps","legacyProps","LEGACY_TO_NEW_DISPLAY_NAME","__unstableComposite","__unstableCompositeGroup","__unstableCompositeItem","__unstableUseCompositeState","proxyComposite","ProxiedComponent","propMap","_ProxiedComponent$dis","UnproxiedCompositeGroup","Current","useCompositeState","legacyStateOptions","currentId","unstable_virtual","LIVE_REGION_ARIA_ROLES","hiddenElementsByDepth","elementShouldBeHidden","FRAME_ANIMATION_DURATION","FRAME_ANIMATION_DURATION_NUMBER","ModalContext","bodyOpenClasses","Modal","bodyOpenClassName","shouldCloseOnEsc","shouldCloseOnClickOutside","isDismissible","aria","labelledby","describedby","onRequestClose","closeButtonLabel","overlayClassName","overlayClassnameProp","contentLabel","isFullScreen","headerActions","__experimentalHideHeader","focusOnMountRef","useFocusOnMount","constrainedTabbingRef","useConstrainedTabbing","focusReturnRef","useFocusReturn","childrenContainerRef","hasScrolledContent","setHasScrolledContent","hasScrollableContent","setHasScrollableContent","sizeClass","isContentScrollable","closestScrollContainer","getScrollContainer","modalElement","hiddenElements","ariaHelper","onRequestCloseRef","dismissers","nestedDismissers","dismisser","_bodyOpenClasses$get","theClass","oneMore","oneLess","closeModal","frameRef","frameStyle","overlayClassname","isAnimatingOut","setIsAnimatingOut","isReducedMotion","closeModalResolve","frameEl","handleAnimationEnd","race","animationResolve","animationName","timeoutResolve","useModalExitAnimation","onContentContainerScroll","_e$currentTarget$scro","pressTarget","overlayPressHandlers","isSameTarget","onScroll","UnconnectedConfirmDialog","isOpenProp","onConfirm","onCancel","confirmButtonText","cancelButtonText","cancelButtonRef","confirmButtonRef","shouldSelfClose","setShouldSelfClose","isIsOpenSet","handleEvent","handleEnter","cancelLabel","confirmLabel","useComboboxContext","useComboboxProviderContext","createSelectStore","combobox","setValueOnMove","labelElement","selectElement","listElement","lastValue","setLabelElement","setSelectElement","setListElement","useSelectContext","useSelectScopedContext","useSelectProviderContext","SelectScopedContextProvider","SelectItemCheckedContext","SelectHeadingContext","useSelectLabel","SelectLabel","useButton","useDisclosure","toggleOnClick","setExpanded","isCurrentDisclosure","toggleOnClickProp","useDialogDisclosure","usePopoverAnchor","usePopoverDisclosure","pointsMap","usePopoverDisclosureArrow","dir","strokeLinecap","strokeLinejoin","useSelectArrow","SelectArrow","nextWithValue","nextId2","useSelect","showOnKeyDown","moveOnKeyDown","toggleOnPress","showOnKeyDownProp","moveOnKeyDownProp","multiSelectable","getId","isTopOrBottom","autofill","setAutofill","nativeSelectChangedRef","nativeSelectChanged","labelledBy","selectedOptions","SelectListContext","useSelectList","resetOnEscape","hideOnEnter","setDefaultValue","resetOnEscapeProp","hideOnEnterProp","headingContext","headingState","headingContextValue","childStore","setChildStore","hasCombobox","attributeName","useAttribute","ariaMultiSelectable","useSelectPopover","SelectPopover","useSelectItem","setValueOnClick","itemValue","setValueOnClickProp","hideOnClickProp","SelectItem","CheckboxCheckedContext","checkmark","useCheckboxCheck","getChildren","useSelectItemCheck","SelectItemCheck","INLINE_PADDING","hasCustomRenderProp","getSelectSize","heightProperty","truncateStyles","slideDownAndFade","getSelectItemSize","SelectedExperimentalHintWrapper","SelectedExperimentalHintItem","WithHintItemWrapper","WithHintItemHint","SelectedItemCheck","CustomSelectContext","defaultRenderSelectedValue","CustomSelectButton","renderSelectedValue","computedRenderSelectedValue","isLegacy","onSelectPopoverKeyDown","CustomSelectItem","_customSelectContext$","customSelectContext","applyOptionDeprecations","__experimentalHint","getDescribedBy","CustomSelectControl","classNameProp","showSelectedHint","__experimentalShowSelectedHint","useSelectStoreOptions","useSelectStoreProps","nextOption","changeObject","highlightedIndex","selectedItem","withHint","translatedSize","_CustomSelect","renderSelectedValueHint","selectedOptionHint","toDate","argStr","Date","NaN","startOfDay","date","_date","setHours","constructFrom","addMonths","dayOfMonth","getDate","endOfDesiredMonth","getTime","setMonth","getMonth","setFullYear","getFullYear","subMonths","formatDistanceLocale","lessThanXSeconds","one","xSeconds","halfAMinute","lessThanXMinutes","xMinutes","aboutXHours","xHours","xDays","aboutXWeeks","xWeeks","aboutXMonths","xMonths","aboutXYears","xYears","overXYears","almostXYears","buildFormatLongFn","defaultWidth","formats","formatLong","full","long","short","dateTime","formatRelativeLocale","lastWeek","yesterday","today","tomorrow","nextWeek","buildLocalizeFn","valuesArray","formattingValues","defaultFormattingWidth","argumentCallback","localize","ordinalNumber","dirtyNumber","_options","rem100","era","narrow","abbreviated","wide","quarter","month","day","dayPeriod","am","pm","midnight","noon","morning","afternoon","evening","night","buildMatchFn","matchPattern","matchPatterns","defaultMatchWidth","matchResult","matchedString","parsePatterns","defaultParseWidth","findKey","valueCallback","parsePattern","parseResult","enUS","formatDistance","tokenValue","addSuffix","comparison","formatRelative","_baseDate","weekStartsOn","firstWeekContainsDate","getDefaultOptions","millisecondsInWeek","millisecondsInDay","getTimezoneOffsetInMilliseconds","utcDate","UTC","getHours","getMinutes","getSeconds","getMilliseconds","setUTCFullYear","getDayOfYear","dateLeft","dateRight","startOfDayLeft","startOfDayRight","timestampLeft","timestampRight","differenceInCalendarDays","cleanDate","startOfYear","startOfWeek","locale","getDay","setDate","startOfISOWeek","getISOWeekYear","year","fourthOfJanuaryOfNextYear","startOfNextYear","fourthOfJanuaryOfThisYear","startOfThisYear","getISOWeek","fourthOfJanuary","startOfISOWeekYear","getWeekYear","firstWeekOfNextYear","firstWeekOfThisYear","getWeek","firstWeek","startOfWeekYear","addLeadingZeros","padStart","lightFormatters","signedYear","dayPeriodEnumValue","numberOfDigits","formatters","G","Y","signedWeekYear","weekYear","R","Q","L","week","I","isoWeek","dayOfYear","E","dayOfWeek","localDayOfWeek","isoDayOfWeek","hours","B","K","X","_localize","timezoneOffset","getTimezoneOffset","formatTimezoneWithOptionalMinutes","formatTimezone","O","formatTimezoneShort","T","absOffset","minutes","dateLongFormatter","timeLongFormatter","longFormatters","P","datePattern","timePattern","dateTimeFormat","dayOfYearTokenRE","weekYearTokenRE","throwTokens","formattingTokensRegExp","longFormattingTokensRegExp","escapedStringRegExp","doubleQuoteRegExp","unescapedLatinCharacterRegExp","format","formatStr","originalDate","parts","firstCharacter","longFormatter","isToken","cleanEscapedString","preprocessor","formatterOptions","part","useAdditionalWeekYearTokens","isProtectedWeekYearToken","useAdditionalDayOfYearTokens","isProtectedDayOfYearToken","_message","subject","warnOrThrowProtectedError","formatter","isSameMonth","_dateLeft","_dateRight","leftDate","rightDate","isSameDay","addDays","addWeeks","endOfWeek","dateWithDesiredMonth","daysInMonth","monthIndex","lastDayOfMonth","getDaysInMonth","setMinutes","setSeconds","setMilliseconds","addYears","eachDayOfInterval","interval","startDate","endDate","reversed","endTime","currentDate","dates","startOfMonth","endOfMonth","Day","inRange","dateToCompare","_dateToCompare","isAfter","isBefore","Navigator","NavigatorHeading","Calendar","DayOfWeek","DayButton","isToday","hasEvents","inputToDate","from12hTo24h","isPm","buildPadInputStateReducer","pad","validateInputElementTarget","_ownerDocument$defaul","HTMLInputElementInstance","TIMEZONELESS_FORMAT","isFocusAllowed","isInvalid","numEvents","getDayLabel","dateI18n","getSettings","localizedDate","isInvalidDate","onMonthPreviewed","calendar","viewing","setSelected","setViewing","viewPreviousMonth","viewNextMonth","useLilius","SUNDAY","initialViewing","initialSelected","numberOfMonths","viewToday","viewMonth","viewYear","setYear","viewPreviousYear","subYears","viewNextYear","replaceExisting","selectedItems","deselect","selectRange","deselectRange","eachMonthOfInterval","startDateWeek","endDateWeek","eachWeekOfInterval","clearSelected","setFocusable","isFocusWithinCalendar","setIsFocusWithinCalendar","prevCurrentDate","setPrevCurrentDate","arrowRight","arrowLeft","nextFocusable","subWeeks","startOfMinute","Fieldset","TimeWrapper","baseInput","HoursInput","TimeSeparator","MinutesInput","MonthSelectWrapper","DayInput","YearInput","TimeZone","timezone","getDateSettings","userTimezoneOffset","offsetSymbol","zoneAbbr","abbr","offsetFormatted","prettyTimezoneString","timezoneDetail","StyledComponent","optionLabel","TimeInput","is12Hour","minutesProps","hours12Format","buildNumberControlChangeCallback","method","_value","numberValue","ToggleGroupControlOption","VALID_DATE_ORDERS","TimePicker","dateOrder","dateOrderProp","monthOptions","newDate","dayField","monthField","yearField","defaultDateOrder","fields","field","onTimeInputChangeCallback","newHours","newMinutes","DateTimePicker","DatePicker","sizesTable","selectLabel","theSize","findSizeBySlug","theSizes","formatSizesAsOptions","Consumer","Disabled","inert","UnforwardedDisclosureContent","visible","bodyClass","onDragOver","appendToOwnerDocument","cloneClassname","elementId","transferData","__experimentalTransferDataType","transferDataType","__experimentalDragComponent","dragComponent","dragComponentRef","cleanupRef","onDraggableStart","dataTransfer","cloneWrapper","dragImage","setDragImage","clonedDragComponent","elementRect","elementWrapper","elementTopOffset","elementLeftOffset","clonePadding","cloneNode","cursorLeft","cursorTop","throttledDragOver","throttle","onDraggableEnd","onFilesDrop","onHTMLDrop","onDrop","isEligible","isDraggingOverDocument","setIsDraggingOverDocument","isDraggingOverElement","setIsDraggingOverElement","setIsActive","useDropZone","files","getFilesFromDataTransfer","getData","onDragEnter","onDragLeave","upload","DropZoneProvider","getGradientFromCSSColors","stops","swatch","ColorOption","idRoot","newColors","PLACEHOLDER_VALUES","CustomDuotoneBar","newColorStops","getColorsFromColorStops","unsetable","duotonePalette","disableCustomDuotone","defaultDark","defaultLight","getDefaultColors","palette","isUnset","unsetOptionLabel","unsetOption","duotoneOptions","ColorListPicker","rel","optimizedRel","isInternalAnchor","INITIAL_BOUNDS","VIDEO_EXTENSIONS","fractionToPercentage","fraction","MediaWrapper","MediaContainer","MediaPlaceholder","deprecatedBottomMargin","extraHelpTextMargin","hasHelpText","ControlWrapper","GridView","showOverlay","GridLine","GridLineX","GridLineY","TEXTCONTROL_MIN","TEXTCONTROL_MAX","FocalPointPickerControls","valueX","valueY","FocalPointUnitControl","PointerCircle","FocalPoint","FocalPointPickerGrid","alt","autoPlay","src","onLoad","mediaRef","filename","getExtension","isVideoType","onLoadedData","FocalPointPicker","resolvePoint","url","setPoint","showGridOverlay","setShowGridOverlay","endDrag","dragAreaRef","getValueWithinDragArea","setBounds","refUpdateBounds","updateBounds","getFinalValue","_resolvePoint","resolvedValue","roundToTwoDecimalPlaces","focalPointPosition","Controls","FocusableIframe","iframeRef","useFocusableIframe","getCommonSizeUnit","fontSizes","firstFontSize","otherFontSizes","firstUnit","HeaderToggle","HeaderLabel","HeaderHint","DEFAULT_OPTION","CUSTOM_OPTION","_options$find","disableCustomFontSizes","onSelectCustom","areAllSizesSameUnit","quantity","isSimpleCssValue","selectedOption","T_SHIRT_ABBREVIATIONS","T_SHIRT_NAMES","DEFAULT_UNITS","FontSizePicker","UnforwardedFontSizePicker","fallbackFontSize","withReset","selectedFontSize","userRequestedCustom","setUserRequestedCustom","currentPickerType","headerHint","commonUnit","valueQuantity","valueUnit","isValueUnitRelative","FontSizePickerSelect","FontSizePickerToggleGroup","accept","openFileDialog","compatAccept","globalThis","FormToggle","Token","status","onClickRemove","termPosition","termsCount","tokenClasses","transformedValue","termPositionAndCount","deprecatedPaddings","hasTokens","TokensAndInputWrapperFlex","FormTokenField","autoCapitalize","maxSuggestions","saveTransform","onInputChange","tokenizeOnSpace","added","removed","__experimentalInvalid","__experimentalExpandOnFocus","__experimentalValidateInput","__experimentalShowHowTo","__experimentalAutoSelectFirstMatch","tokenizeOnBlur","incompleteTokenValue","setIncompleteTokenValue","inputOffsetFromEnd","setInputOffsetFromEnd","setSelectedSuggestionIndex","selectedSuggestionScroll","setSelectedSuggestionScroll","prevSuggestions","tokensAndInput","inputHasValidValue","addNewToken","onContainerTouched","onTokenClickRemove","deleteToken","onInputChangeHandler","separator","addNewTokens","handleDeleteKey","_deleteToken","isInputEmpty","deleteTokenBeforeInput","getIndexOfInput","deleteTokenAfterInput","moveInputToIndex","addCurrentToken","getMatchingSuggestions","getSelectedSuggestion","tokensToAdd","getTokenValue","valueContainsToken","newTokens","searchValue","_suggestions","_maxSuggestions","_saveTransform","normalizedValue","updateSuggestions","resetSelectedSuggestion","inputHasMinimumChars","shouldExpandIfFocuses","renderToken","suggestionsDidUpdate","tokenFieldProps","prevInputOffsetFromEnd","handleLeftArrowKey","handleRightArrowKey","handleEscapeKey","onKeyPress","components","renderInput","renderTokensAndInput","PageControlIcon","Circle","cy","PageControl","currentPage","numberOfPages","setCurrentPage","page","finishButtonText","onFinish","pages","_Children$map","canGoBack","canGoForward","goBack","goForward","image","GuidePage","KeyboardShortcut","bindGlobal","useKeyboardShortcut","shortcuts","MenuGroup","hideSeparator","MenuItem","choices","ROOT_MENU","defaultGetter","NavigationContext","activeMenu","setActiveMenu","navigationTree","addItem","menus","getMenu","addMenu","removeMenu","childMenu","traverseMenu","isMenuEmpty","defaultIsEmpty","useNavigationContext","NavigationUI","MenuUI","MenuBackButtonUI","MenuTitleUI","MenuTitleSearchControlWrapper","MenuTitleActionsUI","GroupTitleUI","ItemBaseUI","ItemUI","ItemIconUI","ItemBadgeUI","ItemTitleUI","useNavigationTreeNodes","setNodes","getNode","addNode","newNode","removeNode","removedNode","remainingNodes","onActivateMenu","setMenu","slideOrigin","setSlideOrigin","useCreateNavigationTree","setChildMenu","getChildMenu","startMenu","visited","newState","parentMenu","menuToCheck","isEmpty","defaultSlideOrigin","menuId","slideInOrigin","animateClassName","NavigationBackButton","backButtonLabel","parentMenuTitle","chevronRight","chevronLeft","animationDirection","NavigationGroupContext","groupId","_isVisible","groupTitleId","NavigationItemBaseContent","badge","NavigationMenuContext","useNavigationMenuContext","normalizeInput","NavigationItemBase","itemId","useNavigationTreeItem","isMenuActive","isItemVisible","normalizedSearch","navigateToMenu","hideIfTargetMenuEmpty","isText","navigationIcon","baseProps","itemProps","inlinePadding","SuffixItemWrapper","StyledInputControl","SuffixItem","searchRef","SearchControl","filteredRestProps","withSpokenMessages","onCloseSearch","onSearch","delayedFocus","resultsFoundMessage","NavigationMenuTitle","hasSearch","titleAction","isSearching","setIsSearching","searchButtonRef","menuTitleId","searchButtonLabel","searchIcon","MenuTitleSearch","NavigationSearchNoResultsFound","resultsCount","onBackButtonClick","setControlledSearch","controlledSearch","isSearchDebouncing","uncontrolledSearch","setUncontrolledSearch","useNavigationTreeMenu","isControlledSearch","decode","pathname","regexpToFunction","pathToRegexp","escapeString","sensitive","stringToRegexp","encode","endsWithRe","delimiterRe","route","mod","endToken","isEndDelimited","tokensToRegexp","lexer","prefixes","tryConsume","mustConsume","nextType","consumeText","safePattern","prevText","isSafe","groupsRegex","execResult","regexpToRegexp","arrayToRegexp","matchPath","decodeURIComponent","matchingFunction","NavigatorContext","goTo","goToParent","addScreen","removeScreen","navigatorWrapper","fadeIn","fadeOut","slideFromRight","slideToLeft","slideFromLeft","slideToRight","FADE","SLIDE","TOTAL_ANIMATION_DURATION","ANIMATION_END_NAMES","out","ANIMATION","navigatorScreenAnimation","navigatorScreen","_focusSelectorsCopy2","focusSelectors","currentLocation","isBack","skipFocus","focusTargetSelector","restOptions","focusSelectorsCopy","currentFocusSelector","getFocusSelectorsCopy","_focusSelectorsCopy","isInitial","hasRestoredFocus","routerReducer","screens","matchedPath","restState","screen","currentPath","parentPath","pathParts","potentialParentPath","findParent","patternMatch","initialPath","initialPathProp","routerState","methods","navigatorContextValue","_matchedPath$params","NavigatorScreen","screenId","onAnimationEnd","onAnimationEndProp","isMatch","wrapperRef","skipAnimationAndFocusRestoration","escapeAttribute","animationStyles","shouldRenderScreen","screenProps","skipAnimation","isRTLFn","animationStatus","setAnimationStatus","becameSelected","becameUnselected","isAnimatingIn","onScreenAnimationEnd","isExitAnimation","isEnterAnimation","animationTimeout","useScreenAnimatePresence","locationRef","wrapperEl","elementToFocus","firstTabbable","mergedWrapperRef","useNavigator","NavigatorButton","navigatorButtonProps","escapedPath","cssSelectorForAttribute","attrName","attrValue","useNavigatorButton","NavigatorBackButton","navigatorBackButtonProps","useNavigatorBackButton","NavigatorToParentButton","NavigatorProvider","InternalNavigator","InternalNavigatorScreen","InternalNavigatorButton","InternalNavigatorBackButton","InternalNavigatorToParentButton","TopLevelNavigator","Screen","BackButton","getDefaultPoliteness","getStatusLabel","spokenMessage","politeness","__unstableHTML","onDismiss","useSpokenMessage","RawHTML","buttonCustomClasses","noDefaultClasses","onDismissNotice","notices","removeNotice","notice","restNotice","Notice","header","PanelHeader","PanelBodyTitle","isOpened","chevronUp","PanelBody","initialOpen","opened","scrollAfterOpen","setIsOpened","nodeRef","scrollBehavior","scrollAfterOpenRef","PlaceholderIllustration","preserveAspectRatio","instructions","preview","isColumnLayout","withIllustration","resizeListener","modifierClassNames","fieldsetClasses","animateProgressBar","isRtl","Indicator","isIndeterminate","animationTimingFunction","ProgressElement","progressProps","ProgressBarStyled","ensureParentsAreDefined","terms","term","buildTermsTree","flatTerms","flatTermsWithParentAndChildren","termsByParent","fillWithChildren","getSelectOptions","treeNode","decodeEntities","noOptionLabel","selectedId","AuthorSelect","authorList","selectedAuthorId","termsTree","TreeSelect","CategorySelect","categoriesList","selectedCategoryId","isSingleCategorySelection","isMultipleCategorySelection","numberOfItems","orderBy","maxItems","minItems","onAuthorChange","onNumberOfItemsChange","onOrderChange","onOrderByChange","newOrderBy","newOrder","onCategoryChange","categorySuggestions","selectedCategories","RadioGroupContext","defaultChecked","radioStore","ButtonGroup","generateOptionDescriptionId","radioGroupId","generateOptionId","generateHelpId","RadioControl","extendStatics","setPrototypeOf","__proto__","Resizer","_super","onResizeStart","replaceStyles","DEFAULT_SIZE","snap","hasDirection","isTouchEvent","findClosestSnap","snapArray","snapGap","closestGapIndex","curr","searchStr","getStringSize","getPixelSize","parentSize","calculateNewMax","minWidth","definedProps","baseClassName","Resizable","resizable","parentLeft","parentTop","resizableLeft","resizableRight","resizableTop","resizableBottom","targetLeft","targetTop","appendBase","removeBase","isResizing","propsSize","backgroundStyle","flexBasis","defaultSize","orgWidth","orgHeight","orgPosition","getParentSize","wrapChanged","bindEvents","unbindEvents","createSizeForCssProperty","newSize","kind","calculateNewMaxFromBoundary","boundWidth","boundHeight","boundsByDirection","widthByDirection","heightByDirection","parent_1","calculateNewSizeFromDirection","resizeRatio","lockAspectRatio","lockAspectRatioExtraHeight","lockAspectRatioExtraWidth","newHeight","extraHeight","extraWidth","calculateNewSizeFromAspectRatio","computedMinWidth","computedMaxWidth","computedMinHeight","computedMaxHeight","extraMinWidth","extraMaxWidth","extraMinHeight","extraMaxHeight","lockedMinWidth","lockedMaxWidth","lockedMinHeight","lockedMaxHeight","setBoundingClientRect","parent_2","parentRect","top_1","isMouseEvent","parent_3","flexDir","TouchEvent","boundaryMax","newGridWidth","newGridHeight","onResizeStop","updateSize","renderResizer","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","handleComponent","resizers","extendsProps","sizeStyle","boxSizing","POSITIONS","TooltipWrapper","LabelText","showLabel","isCorner","labelStyle","CURSOR_OFFSET_TOP","fadeTimeout","showPx","isAxisControlled","moveX","setMoveX","moveY","setMoveY","heightRef","widthRef","moveTimeoutRef","debounceUnsetMoveXY","unsetMoveXY","didWidthChange","didHeightChange","labelUnit","getSizeLabel","useResizeLabel","HANDLE_CLASS_NAME","SIDE_HANDLE_CLASS_NAME","CORNER_HANDLE_CLASS_NAME","HANDLE_CLASSES","HANDLE_STYLES_OVERRIDES","HANDLE_STYLES","showHandle","__experimentalShowTooltip","__experimentalTooltipProps","ResizeTooltip","naturalWidth","naturalHeight","TagName","observeAndResizeJS","sendResize","clientBoundingRect","postMessage","removeViewportStyles","ruleOrNode","attributes","attributeOldValue","characterData","characterDataOldValue","childList","subtree","stylesheet","scripts","setWidth","setHeight","trySandBox","forceRerender","isFrameAccessible","htmlDoc","lang","dangerouslySetInnerHTML","__html","write","tryNoForceSandBox","checkMessageForResize","iframe","contentWindow","sandbox","Snackbar","explicitDismiss","dismissMe","callbacksRef","timeoutHandle","snackbarContentClassnames","onActionClick","SNACKBAR_VARIANTS","spinAnimation","StyledSpinner","commonPathProps","SpinnerTrack","SpinnerIndicator","surfaceProps","createTabStore","parentComposite","independentKeys","panels","tab","defaultSelectedId","selectOnMove","tabItem","dimmed","syncActiveId","tabItem2","tabs","hasOrphanPanels","panel","tabId","selectedIdFromSelectedValue","backupSelectedId","restoreSelectedId","setSelectedId","useTabStore","updatePanels","useTabStoreProps","useTabScopedContext","useTabProviderContext","TabScopedContextProvider","useTabList","TabList","useTab","panelId","_a3","hasActiveItem","canRegisterComposedItem","Tab","useTabPanel","tabIdProp","scrollRestoration","scrollElement","scrollPositionRef","getScrollElement","panelElement","hasTabbableChildren","setHasTabbableChildren","TabPanel","extractTabName","UnforwardedTabPanel","initialTabName","activeClass","prependInstanceId","tabName","tabStore","newTabValue","newTab","selectedTab","simplifiedTabName","selectedTabName","setTabStoreSelectedId","previousSelectedTabName","initialTab","firstEnabledTab","TextControl","inputStyleNeutral","inputStyleFocus","StyledTextarea","TextareaControl","trimmedHighlightText","createInterpolateElement","tip","ToggleControl","helpLabel","useToolbarContext","useToolbarProviderContext","ToolbarScopedContextProvider","useToolbarItem","ToolbarItem","accessibleToolbarStore","ToolbarContext","isRenderProp","allProps","ToolbarButtonContainer","containerClassName","toolbarItemProps","subscript","ToolbarGroupContainer","renderDropdownMenu","internalToggleProps","accessibleToolbarState","finalClassName","ToolbarGroupCollapsed","ToolbarButton","createToolbarStore","useToolbarStore","useToolbarStoreProps","useToolbar","orientationProp","Toolbar","toolbarStore","isVariantDefined","contextSystemValue","Menu","_title","ToolbarGroup","ToolbarContainer","toolsPanelGrid","fullWidth","ToolsPanelHiddenInnerWrapper","ToolsPanelHeader","ToolsPanelHeading","ToolsPanelItem","BaseControlWrapper","BaseControlField","BaseControlHelp","ToolsPanelItemPlaceholder","ResetLabel","DefaultControlsItem","ToolsPanelContext","menuItems","optional","hasMenuItems","isResetting","shouldRenderPlaceholderItems","registerPanelItem","deregisterPanelItem","flagItemCustomization","registerResetAllFilter","deregisterResetAllFilter","areAllOptionalControlsHidden","useToolsPanelContext","DefaultControlsGroup","itemClassName","toggleItem","resetSuffix","OptionalControlsGroup","itemLabel","defaultControlsItemClassName","dropdownMenuClassName","headingClassName","labelText","resetAll","useToolsPanelHeader","optionalItems","dropDownMenuIcon","dropDownMenuLabelText","dropdownMenuDescriptionText","canResetAll","emptyState","panelItems","menuItemOrder","generateMenuItems","shouldReset","currentMenuItems","newMenuItems","isShownByDefault","existingItemValue","panelReducer","newItems","existingIndex","oldItem","panelItemsReducer","menuItemOrderReducer","oldValue","currentItem","menuGroup","menuItemsReducer","resetAllFiltersReducer","filters","isMenuItemTypeEmpty","UnconnectedToolsPanel","panelContext","resetAllItems","toolsPanelProps","hasInnerWrapper","__experimentalFirstVisibleItemClass","__experimentalLastVisibleItemClass","isResettingRef","wasResetting","panelDispatch","resetAllFilters","dispatchResetAllFilters","wrapperStyle","emptyStyle","getFirstVisibleItemLabel","firstDisplayedItem","lastDisplayedItem","useToolsPanel","UnconnectedToolsPanelItem","isShown","shouldRenderPlaceholder","toolsPanelItemProps","resetAllFilter","onDeselect","currentPanelId","hasValueCallback","resetAllFilterCallback","previousPanelId","hasMatchingPanel","isMenuItemChecked","wasMenuItemChecked","isRegistered","isValueSet","shouldApplyPlaceholderStyles","useToolsPanelItem","RovingTabIndexContext","RovingTabIndexProvider","RovingTabIndex","lastFocusedElement","setLastFocusedElement","getRowFocusables","rowElement","sequential","TreeGrid","onExpandRow","onCollapseRow","onFocusRow","applicationAriaLabel","UP","DOWN","LEFT","RIGHT","HOME","END","treeGridElement","activeRow","focusablesInRow","currentColumnIndex","canExpandCollapse","cannotFocusNextColumn","_activeRow$getAttribu","parentRow","ariaLevel","focusableItems","currentRowIndex","nextRowIndex","focusablesInNextRow","RovingTabIndexContainer","positionInSet","setSize","RovingTabIndexItem","localRef","withoutGridItem","TreeGridItem","useSlotFills","ZStackChildView","offsetAmount","marginInlineStart","ZStackView","isLayered","ZStack","validChildren","childrenLastIndex","defaultShortcuts","useNavigateRegions","isFocusingRegions","setIsFocusingRegions","focusRegion","_ref$current$querySel","regions","nextRegion","wrappingRegion","clickRef","isKeyboardEvent","mapNodeToProps","fallbackStyles","grabStylesCompleted","bindRef","grabFallbackStyles","newFallbackStyles","wrappedComponent","ANIMATION_FRAME_PERIOD","withFilters","hookName","OriginalComponent","FilteredComponent","FilteredComponentRenderer","applyFilters","addAction","onHooksUpdated","removeAction","throttledForceUpdate","forceUpdate","updatedHookName","HoC","onFocusReturn","noticeList","setNoticeList","noticeOperations","createNotice","noticeToAdd","createErrorNotice","removeAllNotices","propsOut","noticeUI","NoticeList","useMenuContext","useMenuScopedContext","useMenuProviderContext","MenuContextProvider","MenuScopedContextProvider","MenuItemCheckedContext","menubar","createMenuStore","parentIsMenubar","hideAll","setInitialFocus","useMenuItem","menuContext","menubarContext","hideMenu","isWithinMenu","expandedItem","expandedMenuId","expandedMenu","menuHasFocus","useCheckboxContext","setMixed","mixed","getPrimitiveValue","useCheckbox","checkedProp","_checked","setChecked","primitiveValue","nativeCheckbox","elementChecked","createCheckboxStore","checkbox","useMenuItemCheckbox","defaultCheckedProp","checkboxStore","useCheckboxStoreProps","useCheckboxStore","internalValue","aKeys","bKeys","shallowEqual","MenuItemCheckbox","useMenuItemRadio","MenuItemRadio","useMenuGroup","useMenuGroupLabel","MenuGroupLabel","useCompositeSeparator","useMenuSeparator","MenuSeparator","ANIMATION_PARAMS","CONTENT_WRAPPER_PADDING","ITEM_PADDING_BLOCK","ITEM_PADDING_INLINE","DEFAULT_BORDER_COLOR","DIVIDER_COLOR","LIGHTER_TEXT_COLOR","LIGHT_BACKGROUND_COLOR","TOOLBAR_VARIANT_BORDER_COLOR","DEFAULT_BOX_SHADOW","TOOLBAR_VARIANT_BOX_SHADOW","GRID_TEMPLATE_COLS","PopoverOuterWrapper","PopoverInnerWrapper","baseItem","CheckboxItem","RadioItem","ItemPrefixWrapper","ItemContentWrapper","ItemChildrenWrapper","ItemSuffixWrapper","SubmenuChevronIcon","ItemLabel","ItemHelpText","computedStore","useMenuItemCheck","MenuItemCheck","radioCheck","excludeElement","useMenuButton","parentMenubar","hasParentMenu","showMenu","trigger","getInitialFocus","isKeyboardClick","parentContentElement","getShowOnHover","MenuButton","TriggerButton","SubmenuTriggerItem","chevronRightSmall","useMenuList","isMenubarHorizontal","id2","ariaLabelledBy","useAriaLabelledBy","useMenu","modalProp","initialFocusRef","setInitialFocusRef","autoFocusOnShowState","cleaning","prevInitialFocusRef","ref2","createRef","canAutoFocusOnShow","parentRole","fireEvent","appliedPlacementSide","computedDirection","onOpenChange","menuStore","useMenuStoreProps","willBeOpen","generateBackgroundDependentColors","getForegroundForColor","generateShades","TabsContext","useTabsContext","StyledTabList","TabChildren","TabChevron","_useTabsContext","instancedTabId","StyledTab","StyledTabChildren","StyledTabChevron","setParent","selectedItemIndex","selectedRect","setFirst","setLast","setObserver","newObserver","useTrackOverflow","parentScroll","parentWidth","childLeft","childWidth","rightOverflow","leftOverflow","useScrollRectIntoView","_props$tabIndex","StyledTabPanel","externalToInternalTabId","externalId","internalToExternalTabId","internalId","Tabs","defaultTabId","selectedTabId","activeTabId","defaultActiveTabId","onActiveTabIdChange","newSelectedId","newActiveId","focusedElement","unlock","__dangerousOptInToUnstableAPIsOnlyForCoreModules","privateApis","__experimentalPopoverLegacyPositionToPlacement","Theme","colorVariables","shades","inputs","validateInputs","generatedColors","issues","warnContrastIssues","outputs","grays","checkContrasts","generateThemeVariables","Badge","intent","published","caution","contextBasedIcon","hasIcon"],"sourceRoot":""}