@brightspot/ui 6.8.1 → 6.8.3-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +680 -0
- package/README.md +18 -2
- package/dist/storybook/CHANGELOG.md +680 -0
- package/dist/storybook/README.md +195 -0
- package/dist/storybook/assets/{ActionBar.stories-BOXYJYXy.js → ActionBar.stories-TlhuCumU.js} +1 -1
- package/dist/storybook/assets/{ActionItem-WoDvowFu.js → ActionItem-CjtyGLd5.js} +1 -1
- package/dist/storybook/assets/{ActionItem.stories-CVFoWP54.js → ActionItem.stories-BVlNQvfP.js} +1 -1
- package/dist/storybook/assets/{AiSparkle.stories-Psv9jNpy.js → AiSparkle.stories-DMzc8JUe.js} +2 -2
- package/dist/storybook/assets/{Avatar-CIQcHS8b.js → Avatar-C6Li1sPI.js} +1 -1
- package/dist/storybook/assets/{Avatar.stories-BE2Xn8fx.js → Avatar.stories-COj6XrPn.js} +1 -1
- package/dist/storybook/assets/{AvatarGroup-Chs0VKPg.js → AvatarGroup-DgxRTZBe.js} +1 -1
- package/dist/storybook/assets/{AvatarGroup.stories-2ar6gCeX.js → AvatarGroup.stories-Dh3e7iN2.js} +1 -1
- package/dist/storybook/assets/{Badge-AV20mCMJ.js → Badge-bWrvpEgX.js} +1 -1
- package/dist/storybook/assets/{Badge.stories-w9LqNw0A.js → Badge.stories-KXpmEXpt.js} +1 -1
- package/dist/storybook/assets/{Banner.stories-Clhh1bBs.js → Banner.stories-Cnhm3dXK.js} +1 -1
- package/dist/storybook/assets/{Button-B7fn_wd5.js → Button-DE0s-gat.js} +1 -1
- package/dist/storybook/assets/{Button.stories-5h4M8nd2.js → Button.stories-Cwg1YZEb.js} +1 -1
- package/dist/storybook/assets/{ButtonGroup-BmndBsBy.js → ButtonGroup-CoLI5nGO.js} +1 -1
- package/dist/storybook/assets/{ButtonGroup.stories-CR1H4H7u.js → ButtonGroup.stories-VhnKPP1n.js} +1 -1
- package/dist/storybook/assets/{Card.stories-Bz5vXq5y.js → Card.stories-BgpL90zB.js} +1 -1
- package/dist/storybook/assets/{Celebrate.stories-Bu3CNw0k.js → Celebrate.stories-D3NJgYcX.js} +1 -1
- package/dist/storybook/assets/{Checkbox-BALsanB1.js → Checkbox-BC1T_KxW.js} +1 -1
- package/dist/storybook/assets/{Checkbox.stories-BdvCht5c.js → Checkbox.stories-AFQNz7dQ.js} +1 -1
- package/dist/storybook/assets/{CircularProgress-BeE2fWON.js → CircularProgress-eqVb2jUD.js} +1 -1
- package/dist/storybook/assets/{CircularProgress.stories-CL8Lc6eU.js → CircularProgress.stories-B6t8VhmJ.js} +1 -1
- package/dist/storybook/assets/{ClipboardMixin-C6wcbXIO.js → ClipboardMixin-DcxrOy5B.js} +1 -1
- package/dist/storybook/assets/{ClipboardMixin.stories-BsjzC7wd.js → ClipboardMixin.stories-BqtQMjmS.js} +1 -1
- package/dist/storybook/assets/{Color-6BZIO3FS-Dsd6EVV9.js → Color-6BZIO3FS-CDluohEc.js} +1 -1
- package/dist/storybook/assets/{Colors.stories-CkCdNN9Y.js → Colors.stories-CqTniDIa.js} +1 -1
- package/dist/storybook/assets/{CombinedEffects.stories-QG78pIiG.js → CombinedEffects.stories-FwW0chy5.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin-CG-Dx_Vk.js → ComponentStatesMixin-hUqOL2aW.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin.stories-B1yuAqua.js → ComponentStatesMixin.stories-CwGoq685.js} +1 -1
- package/dist/storybook/assets/{CopyToClipboard.stories-CyKcumJ9.js → CopyToClipboard.stories-DUGjgtQx.js} +1 -1
- package/dist/storybook/assets/{Debounce.stories-BuNskQ33.js → Debounce.stories-CrWfXhKS.js} +1 -1
- package/dist/storybook/assets/{DocsRenderer-LL677BLK-BrPyc8XX.js → DocsRenderer-LL677BLK-9e51z9Xc.js} +3 -3
- package/dist/storybook/assets/{Dropdown.stories-DHXeP07z.js → Dropdown.stories-BsBxV0wp.js} +1 -1
- package/dist/storybook/assets/{DropdownMenu-WoWnJiQk.js → DropdownMenu-B-LvOIGj.js} +1 -1
- package/dist/storybook/assets/{EmptyState.stories-BRoVusey.js → EmptyState.stories-CJ1w8Tp2.js} +1 -1
- package/dist/storybook/assets/{EscaAvatar.stories-CWAE-4Uz.js → EscaAvatar.stories-BoLLSj9q.js} +2 -2
- package/dist/storybook/assets/{Events.stories-D-npDwlx.js → Events.stories-C3sTBwPJ.js} +1 -1
- package/dist/storybook/assets/{Heading.stories-D7hmvFEN.js → Heading.stories-jmXDRBmM.js} +1 -1
- package/dist/storybook/assets/{HueRipple.stories-Dx3ozdHi.js → HueRipple.stories-BPx5aSYd.js} +1 -1
- package/dist/storybook/assets/{Icon-DPQKiWDz.js → Icon-CWyJRQf7.js} +1 -1
- package/dist/storybook/assets/{Icon.stories-CVsQvcwd.js → Icon.stories-iYBxmv2x.js} +1 -1
- package/dist/storybook/assets/{IconButton-Dp4Z06bL.js → IconButton-Di5Rgs7F.js} +1 -1
- package/dist/storybook/assets/{IconButton.stories-DTbfHfcQ.js → IconButton.stories-DENLoxVk.js} +1 -1
- package/dist/storybook/assets/{LinearProgress-DG3tPlGH.js → LinearProgress-D9ngIVlv.js} +1 -1
- package/dist/storybook/assets/{LinearProgress.stories-VIU6OqYd.js → LinearProgress.stories-u90B_VJR.js} +1 -1
- package/dist/storybook/assets/{Message-BzkpGg8z.js → Message-nFAa55c_.js} +1 -1
- package/dist/storybook/assets/{Message.stories-C9bzoQes.js → Message.stories-B4rpz5rI.js} +1 -1
- package/dist/storybook/assets/{OnFindMixin-CeeYfx9k.js → OnFindMixin-oL1bvTFj.js} +1 -1
- package/dist/storybook/assets/{OnFindMixin.stories-Dq06nuVf.js → OnFindMixin.stories-CdeS5sFA.js} +1 -1
- package/dist/storybook/assets/{Pagination-CnWa6AX5.js → Pagination-CSWcjuDU.js} +1 -1
- package/dist/storybook/assets/{Pagination.stories-BsH2eN2W.js → Pagination.stories-Da2WzJkv.js} +1 -1
- package/dist/storybook/assets/{Popover.stories-CLnzpgEE.js → Popover.stories-CVljlVHc.js} +1 -1
- package/dist/storybook/assets/{ProgressMixin-D1atDw3n.js → ProgressMixin-CeSrn0_P.js} +1 -1
- package/dist/storybook/assets/{Radio-B6Aq6K0V.js → Radio-rvfGhZwK.js} +1 -1
- package/dist/storybook/assets/{Radio.stories-BCVbISmb.js → Radio.stories-B0wHdJuc.js} +1 -1
- package/dist/storybook/assets/{RadioGroup.stories-B-TGP_-v.js → RadioGroup.stories-D8krOSlP.js} +1 -1
- package/dist/storybook/assets/{ReadyMixin-C8HW2nGE.js → ReadyMixin-CvX_eidU.js} +1 -1
- package/dist/storybook/assets/{RovingTabindexMixin-DI5rmyR7.js → RovingTabindexMixin-9z8lwaM9.js} +1 -1
- package/dist/storybook/assets/{RovingTabindexMixin.stories-DVKCC_R7.js → RovingTabindexMixin.stories-Y8vBWjJp.js} +1 -1
- package/dist/storybook/assets/{Rtc.stories-bBYHOszW.js → Rtc.stories-D3Y-z8y_.js} +1 -1
- package/dist/storybook/assets/{ScrollShadow.stories-BIK8YINt.js → ScrollShadow.stories-1KD0lWHX.js} +1 -1
- package/dist/storybook/assets/{Switch.stories-COEk74kM.js → Switch.stories-Bsqvm_HE.js} +1 -1
- package/dist/storybook/assets/{Tab.stories-Dbt9JvSx.js → Tab.stories-CzcTisNs.js} +1 -1
- package/dist/storybook/assets/{Tabs-BIScOPS0.js → Tabs-DdpYNZSW.js} +1 -1
- package/dist/storybook/assets/{Tabs.stories-CodKgVf2.js → Tabs.stories-UOS3V0J4.js} +1 -1
- package/dist/storybook/assets/{Throttle.stories-BhIqWWrQ.js → Throttle.stories-C8jgzh6e.js} +1 -1
- package/dist/storybook/assets/{Tooltip.stories-DKD8nBM1.js → Tooltip.stories-B5BoI0cH.js} +1 -1
- package/dist/storybook/assets/{TooltipMixin-CRNNusJ7.js → TooltipMixin-CVKslCDt.js} +1 -1
- package/dist/storybook/assets/{Upload.stories-WTO15ST1.js → Upload.stories-BsQDCDqo.js} +1 -1
- package/dist/storybook/assets/{UploadItem-DejgZ5A0.js → UploadItem-CYQqNwUF.js} +1 -1
- package/dist/storybook/assets/{UploadItem.stories-Pk3ghOcI.js → UploadItem.stories-_le7XBTV.js} +1 -1
- package/dist/storybook/assets/{Welcome.stories-DrNnxvt9.js → Welcome.stories-rramKkhd.js} +33 -3
- package/dist/storybook/assets/{Widget.stories-CYC5Qdac.js → Widget.stories-DtbAaklk.js} +1 -1
- package/dist/storybook/assets/{WithTooltip-65CFNBJE-DK6PZNaa.js → WithTooltip-65CFNBJE-DK6GcBuR.js} +1 -1
- package/dist/storybook/assets/{blocks-Dzcxb014.js → blocks-DHnzPh43.js} +5 -5
- package/dist/storybook/assets/{formatter-EIJCOSYU-PioIuXjk.js → formatter-EIJCOSYU-qig-qWlG.js} +1 -1
- package/dist/storybook/assets/if-defined-DerKRcyC.js +1 -0
- package/dist/storybook/assets/{iframe-Byo_x5o2.js → iframe-DlBK9Drk.js} +3 -3
- package/dist/storybook/assets/{index-gox-Wle0.js → index-CItQyB37.js} +1 -1
- package/dist/storybook/assets/{lottie_svg-3t2UJxjZ.js → lottie_svg-C3v6xdng.js} +1 -1
- package/dist/storybook/assets/{onFind-BWiaccUj.js → onFind-Ci35eu2y.js} +1 -1
- package/dist/storybook/assets/{onFind.stories-CC_XTN2G.js → onFind.stories-BmbwWWo1.js} +1 -1
- package/dist/storybook/assets/{onRemove.stories-CXxpL4ud.js → onRemove.stories-DFWCIgE4.js} +1 -1
- package/dist/storybook/assets/{onVisible.stories-DKA9cexx.js → onVisible.stories-B-onpgE-.js} +1 -1
- package/dist/storybook/assets/{property-_few0Xe5.js → property-Bmq4RTSP.js} +1 -1
- package/dist/storybook/assets/{ref-BaIdO8Sk.js → ref-BhKk4SDh.js} +1 -1
- package/dist/storybook/assets/state-DVIUS0Gf.js +1 -0
- package/dist/storybook/assets/{style-map-DxZm5Cj7.js → style-map-DE4G47KD.js} +1 -1
- package/dist/storybook/assets/{syntaxhighlighter-ED5Y7EFY-B0_bSGZz.js → syntaxhighlighter-ED5Y7EFY-Dfgnal1d.js} +1 -1
- package/dist/storybook/custom-elements.json +11835 -0
- package/dist/storybook/docs/components/ActionBar.md +55 -0
- package/dist/storybook/docs/components/ActionItem.md +50 -0
- package/dist/storybook/docs/components/AiSparkle.md +33 -0
- package/dist/storybook/docs/components/Avatar.md +45 -0
- package/dist/storybook/docs/components/AvatarGroup.md +34 -0
- package/dist/storybook/docs/components/Badge.md +47 -0
- package/dist/storybook/docs/components/Banner.md +35 -0
- package/dist/storybook/docs/components/ButtonGroup.md +65 -0
- package/dist/storybook/docs/components/Card.md +67 -0
- package/dist/storybook/docs/components/Checkbox.md +49 -0
- package/dist/storybook/docs/components/CircularProgress.md +40 -0
- package/dist/storybook/docs/components/CopyToClipboard.md +51 -0
- package/dist/storybook/docs/components/Dropdown.md +74 -0
- package/dist/storybook/docs/components/DropdownItem.md +45 -0
- package/dist/storybook/docs/components/DropdownMenu.md +41 -0
- package/dist/storybook/docs/components/EmptyState.md +62 -0
- package/dist/storybook/docs/components/EscaAvatar.md +40 -0
- package/dist/storybook/docs/components/Icon.md +40 -0
- package/dist/storybook/docs/components/IconButton.md +36 -0
- package/dist/storybook/docs/components/LinearProgress.md +37 -0
- package/dist/storybook/docs/components/Message.md +50 -0
- package/dist/storybook/docs/components/Pagination.md +70 -0
- package/dist/storybook/docs/components/Popover.md +59 -0
- package/dist/storybook/docs/components/README.md +48 -0
- package/dist/storybook/docs/components/Radio.md +55 -0
- package/dist/storybook/docs/components/RadioGroup.md +34 -0
- package/dist/storybook/docs/components/Switch.md +48 -0
- package/dist/storybook/docs/components/Tab.md +40 -0
- package/dist/storybook/docs/components/Tabs.md +49 -0
- package/dist/storybook/docs/components/Upload.md +63 -0
- package/dist/storybook/docs/components/UploadItem.md +30 -0
- package/dist/storybook/docs/components/Widget.md +88 -0
- package/dist/storybook/docs/dari-elements.md +55 -0
- package/dist/storybook/iframe.html +1 -1
- package/dist/storybook/index.html +29 -2
- package/dist/storybook/llms-full.txt +1721 -0
- package/dist/storybook/llms.txt +65 -0
- package/dist/storybook/project.json +1 -1
- package/dist/storybook/robots.txt +7 -0
- package/dist/storybook/sb-addons/storybook-3/manager-bundle.js +1 -1
- package/dist/storybook/sitemap.xml +90 -0
- package/docs/components/ActionBar.md +41 -64
- package/docs/components/ActionItem.md +50 -96
- package/docs/components/AiSparkle.md +23 -60
- package/docs/components/Avatar.md +45 -88
- package/docs/components/AvatarGroup.md +24 -44
- package/docs/components/Badge.md +34 -62
- package/docs/components/Banner.md +25 -39
- package/docs/components/ButtonGroup.md +65 -99
- package/docs/components/Card.md +67 -83
- package/docs/components/Checkbox.md +49 -91
- package/docs/components/CircularProgress.md +40 -84
- package/docs/components/CopyToClipboard.md +35 -40
- package/docs/components/Dropdown.md +74 -120
- package/docs/components/DropdownItem.md +45 -81
- package/docs/components/DropdownMenu.md +30 -70
- package/docs/components/EmptyState.md +45 -62
- package/docs/components/EscaAvatar.md +30 -61
- package/docs/components/Icon.md +29 -62
- package/docs/components/IconButton.md +36 -83
- package/docs/components/LinearProgress.md +28 -70
- package/docs/components/Message.md +38 -63
- package/docs/components/Pagination.md +70 -100
- package/docs/components/Popover.md +46 -79
- package/docs/components/README.md +34 -40
- package/docs/components/Radio.md +55 -105
- package/docs/components/RadioGroup.md +26 -55
- package/docs/components/Switch.md +48 -84
- package/docs/components/Tab.md +30 -70
- package/docs/components/Tabs.md +49 -86
- package/docs/components/Upload.md +63 -112
- package/docs/components/UploadItem.md +22 -53
- package/docs/components/Widget.md +66 -67
- package/llms.txt +63 -0
- package/package.json +8 -6
- package/src/legacy/tool-ui/src/Avatar.css +9 -0
- package/src/legacy/tool-ui/src/ContentInputGroup.css +12 -0
- package/src/legacy/tool-ui/src/ContentSummary.css +11 -1
- package/src/legacy/tool-ui/src/ContentSummary.ts +24 -0
- package/src/legacy/tool-ui/src/Dialog.css +15 -4
- package/src/legacy/tool-ui/src/Diff.css +16 -0
- package/src/legacy/tool-ui/src/Diff.ts +76 -45
- package/src/legacy/tool-ui/src/MenuView.css +9 -4
- package/src/legacy/tool-ui/src/ProseMirrorEnhancementMenu.css +9 -1
- package/src/legacy/tool-ui/src/SearchResult.css +3 -3
- package/src/legacy/tool-ui/src/TimedContent.css +5 -1
- package/src/legacy/tool-ui/src/ViewPreview.css +11 -0
- package/src/legacy/tool-ui/src/ViewWatchers.css +1 -1
- package/src/legacy/tool-ui/src/Viewers.css +10 -1
- package/src/legacy/tool-ui/src/main/webapp/dist/RTEProseMirror.bad66c5f4a7498accca1.js +504 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/v4.0cdcad634e3e9cc66dd3.css +3 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/{v4.5311585e2e77268a6386.js → v4.fe59d96d43251aa03766.js} +5 -5
- package/src/legacy/tool-ui/src/main/webapp/dist/v5.268d53cadab4ed4b68a8.css +140 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/{v5.c96a164f24a2a102bde0.js → v5.3eb7662648c301f10aff.js} +5 -5
- package/src/legacy/tool-ui/src/main/webapp/v4/Diff.less +17 -0
- package/src/legacy/tool-ui/src/v5.ts +6 -0
- package/dist/storybook/assets/if-defined-DL7cQU7O.js +0 -1
- package/dist/storybook/assets/state-BBcPmYaV.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/dist/RTEProseMirror.8773fe3756519d83608e.js +0 -504
- package/src/legacy/tool-ui/src/main/webapp/dist/v4.19a7871e6043c2ea6433.css +0 -3
- package/src/legacy/tool-ui/src/main/webapp/dist/v5.990bf181d01e0cbb18e8.css +0 -140
- /package/src/legacy/tool-ui/src/main/webapp/dist/{RTEProseMirror.8773fe3756519d83608e.js.LICENSE.txt → RTEProseMirror.bad66c5f4a7498accca1.js.LICENSE.txt} +0 -0
- /package/src/legacy/tool-ui/src/main/webapp/dist/{v4.5311585e2e77268a6386.js.LICENSE.txt → v4.fe59d96d43251aa03766.js.LICENSE.txt} +0 -0
- /package/src/legacy/tool-ui/src/main/webapp/dist/{v5.c96a164f24a2a102bde0.js.LICENSE.txt → v5.3eb7662648c301f10aff.js.LICENSE.txt} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{x as u}from"./iframe-
|
|
1
|
+
import{x as u}from"./iframe-DlBK9Drk.js";import"./preload-helper-PPVm8Dsz.js";function v(e,t){if(e<=0)return t;let n,o=0;return function(){if(n)return;const r=Date.now(),s=e-r+o;s<=0?(o=r,t.apply(this,[...arguments])):n=setTimeout(()=>{o=r,n=void 0,t.apply(this,[...arguments])},s)}}const x={title:"Utilities/Throttle",tags:["autodocs"],parameters:{docs:{subtitle:"The `throttle` utility function limits how often a function can execute, ensuring it runs at most once per specified interval. Useful for high-frequency events like scroll, resize, or mousemove."},controls:{expanded:!0}},argTypes:{interval:{control:{type:"number",min:0,max:2e3,step:50},description:"Throttle interval in milliseconds"}},args:{interval:200}},d={render:e=>{const t=`throttle-${Math.random().toString(36).substring(2,9)}`;let n=0,o=0;const r=()=>{const m=document.getElementById(`${t}-normal-count`),h=document.getElementById(`${t}-throttled-count`);m&&(m.textContent=String(n)),h&&(h.textContent=String(o))},s=v(e.interval,()=>{o++,r()}),a=()=>{n++,r()},l=()=>{a(),s()};return u`
|
|
2
2
|
<div class="space-y-4">
|
|
3
3
|
<div class="text-base">
|
|
4
4
|
<p class="mb-2">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{x as i,i as g}from"./iframe-
|
|
1
|
+
import{x as i,i as g}from"./iframe-DlBK9Drk.js";import{t as y}from"./custom-element-UsVr97OX.js";import{n as b}from"./property-Bmq4RTSP.js";import{o as h}from"./if-defined-DerKRcyC.js";import{o as x}from"./style-map-DE4G47KD.js";import{E as v,R as w}from"./ReadyMixin-CvX_eidU.js";import{T as k}from"./TooltipMixin-CVKslCDt.js";import"./preload-helper-PPVm8Dsz.js";var T=Object.defineProperty,C=Object.getOwnPropertyDescriptor,u=(t,o,c,l)=>{for(var e=l>1?void 0:l?C(o,c):o,d=t.length-1,m;d>=0;d--)(m=t[d])&&(e=(l?m(o,c,e):m(e))||e);return l&&e&&T(o,c,e),e};let f=class extends k(v(w(g))){constructor(){super(...arguments),this.label="Hover me",this.initialClasses=[]}connectedCallback(){super.connectedCallback(),this.className&&(this.initialClasses=this.className.split(" ").filter(t=>t.trim()))}createRenderRoot(){return this}willUpdate(){const t=[...this.initialClasses,"tooltip-demo"];this.className=t.filter(Boolean).join(" ")}render(){return i`${this.label}`}};u([b({type:String})],f.prototype,"label",2);f=u([y("tooltip-demo")],f);const a=`
|
|
2
2
|
.tooltip-demo {
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
align-items: center;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./iframe-
|
|
1
|
+
import"./iframe-DlBK9Drk.js";import{n as s}from"./property-Bmq4RTSP.js";var c=Object.defineProperty,l=(n,e,h,t)=>{for(var i=void 0,o=n.length-1,r;o>=0;o--)(r=n[o])&&(i=r(e,h,i)||i);return i&&c(e,h,i),i};const p={top:"btu-tooltip-top",bottom:"btu-tooltip-bottom",left:"btu-tooltip-left",right:"btu-tooltip-right"},a={sm:"btu-tooltip-offset-sm",md:"btu-tooltip-offset-md",lg:"btu-tooltip-offset-lg",xl:"btu-tooltip-offset-xl"},d=n=>{class e extends n{constructor(){super(...arguments),this.tooltip="",this.tooltipPosition="top",this.tooltipDelay=300,this.tooltipOffset=null,this.tooltipNoArrow=!1,this.tooltipTrigger="hover focus",this._tooltipEl=null,this._tooltipId=`btu-tooltip-${crypto.randomUUID()}`,this._anchorName=`--btu-trigger-${crypto.randomUUID()}`,this._showTimer=null,this._isVisible=!1,this._activeTriggers=new Set,this._onMouseEnter=this._handleMouseEnter.bind(this),this._onMouseLeave=this._handleMouseLeave.bind(this),this._onFocusIn=this._handleFocusIn.bind(this),this._onFocusOut=this._handleFocusOut.bind(this),this._onClick=this._handleClick.bind(this),this._onNativeToggle=this._handleNativeToggle.bind(this),this._onKeyDown=this._handleKeyDown.bind(this),this._onDocumentClick=null}connectedCallback(){super.connectedCallback(),this._bindTriggerListeners()}disconnectedCallback(){if(this._clearShowTimer(),this._removeDocumentClickListener(),this._unbindTriggerListeners(),this._tooltipEl){try{this._tooltipEl.hidePopover()}catch(t){t instanceof DOMException&&t.name==="InvalidStateError"||console.warn("[btu-tooltip] Failed to hide tooltip during disconnect:",t)}this._tooltipEl.removeEventListener("toggle",this._onNativeToggle),this._tooltipEl.remove(),this._tooltipEl=null}this._removeAriaDescribedBy(),this.style.removeProperty("anchor-name"),this._isVisible=!1,super.disconnectedCallback()}updated(t){super.updated(t),t.has("tooltipTrigger")&&(this._unbindTriggerListeners(),this._bindTriggerListeners(),this._tooltipEl&&(this._isVisible&&this._hide(),this._tooltipEl.setAttribute("popover",this._getPopoverMode()))),(t.has("tooltip")||t.has("tooltipPosition")||t.has("tooltipDelay")||t.has("tooltipOffset")||t.has("tooltipNoArrow"))&&this._syncTooltipElement()}_getPopoverMode(){return"manual"}_syncTooltipElement(){if(!this.tooltip){this._tooltipEl&&(this._hide(),this._tooltipEl.removeEventListener("toggle",this._onNativeToggle),this._tooltipEl.remove(),this._tooltipEl=null,this._removeAriaDescribedBy(),this.style.removeProperty("anchor-name"),document.removeEventListener("keydown",this._onKeyDown));return}this.style.setProperty("anchor-name",this._anchorName),this._tooltipEl||(this._tooltipEl=this._createTooltipElement(),this.appendChild(this._tooltipEl),this._appendAriaDescribedBy(),document.addEventListener("keydown",this._onKeyDown)),this._tooltipEl.textContent=this.tooltip,this._tooltipEl.className=this._buildTooltipClasses()}_createTooltipElement(){const t=document.createElement("div");return t.id=this._tooltipId,t.className=this._buildTooltipClasses(),t.setAttribute("role","tooltip"),t.setAttribute("data-tooltip-internal",""),t.setAttribute("popover",this._getPopoverMode()),t.style.setProperty("position-anchor",this._anchorName),t.textContent=this.tooltip,t.addEventListener("toggle",this._onNativeToggle),t}_buildTooltipClasses(){const t=["btu-tooltip",p[this.tooltipPosition]];return this.tooltipOffset&&a[this.tooltipOffset]&&t.push(a[this.tooltipOffset]),this.tooltipNoArrow&&t.push("btu-tooltip-no-arrow"),t.join(" ")}_hasTrigger(t){return this._activeTriggers.has(t)}_bindTriggerListeners(){const t=new Set(["hover","focus","click"]);this._activeTriggers=new Set(this.tooltipTrigger.trim().split(/\s+/));for(const i of this._activeTriggers)t.has(i)||console.warn(`[btu-tooltip] Unrecognized tooltip-trigger value: "${i}". Valid values: hover, focus, click.`);this._hasTrigger("hover")&&(this.addEventListener("mouseenter",this._onMouseEnter),this.addEventListener("mouseleave",this._onMouseLeave)),this._hasTrigger("focus")&&(this.addEventListener("focusin",this._onFocusIn),this.addEventListener("focusout",this._onFocusOut)),this._hasTrigger("click")&&this.addEventListener("click",this._onClick)}_unbindTriggerListeners(){this.removeEventListener("mouseenter",this._onMouseEnter),this.removeEventListener("mouseleave",this._onMouseLeave),this.removeEventListener("focusin",this._onFocusIn),this.removeEventListener("focusout",this._onFocusOut),this.removeEventListener("click",this._onClick),document.removeEventListener("keydown",this._onKeyDown)}_show(){if(!(this._isVisible||!this._tooltipEl)){try{this._tooltipEl.showPopover()}catch(t){t instanceof DOMException&&t.name==="InvalidStateError"||console.warn("[btu-tooltip] Failed to show tooltip:",t)}this._hasTrigger("click")&&setTimeout(()=>{this._removeDocumentClickListener(),this._onDocumentClick=t=>{const i=t.composedPath();!i.includes(this)&&(!this._tooltipEl||!i.includes(this._tooltipEl))&&this._hide()},document.addEventListener("click",this._onDocumentClick)},0)}}_hide(){if(this._clearShowTimer(),this._removeDocumentClickListener(),!(!this._isVisible||!this._tooltipEl))try{this._tooltipEl.hidePopover()}catch(t){t instanceof DOMException&&t.name==="InvalidStateError"||console.warn("[btu-tooltip] Failed to hide tooltip:",t)}}_removeDocumentClickListener(){this._onDocumentClick&&(document.removeEventListener("click",this._onDocumentClick),this._onDocumentClick=null)}_handleNativeToggle(t){const{newState:i}=t;this._isVisible=i==="open";const o=this._isVisible?"btu-tooltip-show":"btu-tooltip-hide",r=new CustomEvent(o,{bubbles:!0,composed:!0});this.dispatchEvent(r)}_handleKeyDown(t){t.key==="Escape"&&(this._clearShowTimer(),this._hide())}_clearShowTimer(){this._showTimer!==null&&(clearTimeout(this._showTimer),this._showTimer=null)}_handleMouseEnter(){this._clearShowTimer(),this._showTimer=setTimeout(()=>{this._show()},this.tooltipDelay)}_handleMouseLeave(){this._clearShowTimer(),this._hide()}_handleFocusIn(){this._clearShowTimer(),this._show()}_handleFocusOut(){this._clearShowTimer(),this._hide()}_handleClick(){this._clearShowTimer(),this._isVisible?this._hide():this._show()}_appendAriaDescribedBy(){const t=this.getAttribute("aria-describedby");t?t.includes(this._tooltipId)||this.setAttribute("aria-describedby",`${t} ${this._tooltipId}`):this.setAttribute("aria-describedby",this._tooltipId)}_removeAriaDescribedBy(){const t=this.getAttribute("aria-describedby");if(!t)return;const i=t.split(/\s+/).filter(o=>o!==this._tooltipId).join(" ").trim();i?this.setAttribute("aria-describedby",i):this.removeAttribute("aria-describedby")}}return l([s({attribute:"tooltip"})],e.prototype,"tooltip"),l([s({attribute:"tooltip-position"})],e.prototype,"tooltipPosition"),l([s({attribute:"tooltip-delay",type:Number})],e.prototype,"tooltipDelay"),l([s({attribute:"tooltip-offset"})],e.prototype,"tooltipOffset"),l([s({attribute:"tooltip-no-arrow",type:Boolean})],e.prototype,"tooltipNoArrow"),l([s({attribute:"tooltip-trigger"})],e.prototype,"tooltipTrigger"),e};export{d as T};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as L,x as u,E as B,g as M}from"./iframe-
|
|
1
|
+
import{i as L,x as u,E as B,g as M}from"./iframe-DlBK9Drk.js";import{o as C}from"./if-defined-DerKRcyC.js";import{o as E}from"./style-map-DE4G47KD.js";import{n as k}from"./property-Bmq4RTSP.js";import{r as j}from"./state-DVIUS0Gf.js";import{a as m}from"./aria-D5THOgos.js";import{E as R,R as O}from"./ReadyMixin-CvX_eidU.js";import{l as c}from"./i18n-BQ-Uj-0B.js";import{m as A,v as T,f as q}from"./UploadItem-CYQqNwUF.js";import"./Icon-CWyJRQf7.js";import"./preload-helper-PPVm8Dsz.js";import"./celebrate-KwPoF1K3.js";import"./position-CFNQy3J6.js";import"./IconButton-Di5Rgs7F.js";import"./TooltipMixin-CVKslCDt.js";import"./LinearProgress-D9ngIVlv.js";import"./ProgressMixin-CeSrn0_P.js";var N=Object.defineProperty,b=(t,e,r,o)=>{for(var s=void 0,i=t.length-1,n;i>=0;i--)(n=t[i])&&(s=n(e,r,s)||s);return s&&N(e,r,s),s};class f extends R(O(L)){constructor(){super(...arguments),this.accept="",this.maxFileSize=0,this.maxFiles=1/0,this.disabled=!1,this.noDrag=!1,this._files=new Map,this._items=new Map,this._milestones=new Map,this._dragOver=!1,this._dragCounter=0}get _inputEl(){return this.querySelector('input[type="file"]')}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.classList.add("btu-upload")}disconnectedCallback(){super.disconnectedCallback();for(const e of this._files.values())e.status!=="complete"&&this.emit("btu-upload-file-removed",{id:e.id,file:e.file});this._files.clear(),this._items.clear(),this._milestones.clear(),this._dragCounter=0,this._dragOver=!1}firstUpdated(){this.addEventListener("btu-upload-item-remove",e=>{e.stopPropagation();const{id:r}=e.detail;this.removeFile(r)}),this.addEventListener("btu-upload-item-retry",e=>{e.stopPropagation();const{id:r}=e.detail,o=this._files.get(r);o&&this.emit("btu-upload-file-retry",{id:o.id,file:o.file})}),this.emit("btu-upload-ready")}_handleInputChange(e){const r=e.target;r.files&&(this._processFiles(Array.from(r.files)),r.value="")}_handleSelectClick(e){e.stopPropagation(),!this._interactionBlocked&&this._inputEl?.click()}_handleDropzoneClick(){this._interactionBlocked||this._inputEl?.click()}_handleDragEnter(e){this._interactionBlocked||this.noDrag||(e.preventDefault(),this._dragCounter++,this._dragOver=!0)}_handleDragOver(e){this._interactionBlocked||this.noDrag||e.preventDefault()}_handleDragLeave(e){this._interactionBlocked||this.noDrag||(this._dragCounter--,this._dragCounter<=0&&(this._dragCounter=0,this._dragOver=!1))}_handleDrop(e){this._interactionBlocked||this.noDrag||(e.preventDefault(),this._dragCounter=0,this._dragOver=!1,e.dataTransfer?.files&&this._processFiles(Array.from(e.dataTransfer.files)))}_processFiles(e){if(!this._interactionBlocked){if(this.maxFiles===1){const r=e[0];if(!r)return;if(this._validateFile(r)){if(this._files.size>0){const o=this._files.keys().next().value;this.removeFile(o)}this._addFile(r)}for(const o of e.slice(1))this._rejectCount(o);return}for(const r of e){if(this._files.size>=this.maxFiles){this._rejectCount(r);continue}this._validateFile(r)&&this._addFile(r)}}}_rejectCount(e){this.emit("btu-upload-file-rejected",{file:e,reason:"count"}),m(c("upload","announceRejectedCount","File rejected: ___. Maximum file count reached.",[e.name]))}_validateFile(e){return this.accept&&!A(e,this.accept)?(this.emit("btu-upload-file-rejected",{file:e,reason:"type"}),m(c("upload","announceRejectedType","File rejected: ___. File type not accepted.",[e.name])),!1):this.maxFileSize>0&&!T(e,this.maxFileSize)?(this.emit("btu-upload-file-rejected",{file:e,reason:"size"}),m(c("upload","announceRejectedSize","File rejected: ___. File exceeds size limit.",[e.name])),!1):!0}_addFile(e){const r=crypto.randomUUID(),o={id:r,file:e,status:"pending",progress:0};this._files.set(r,o),this._milestones.set(r,new Set),this._renderItem(o),this.requestUpdate(),this.emit("btu-upload-file-added",{id:r,file:e});const s=q(e.size);m(c("upload","announceAdded","File added: ___, ___",[e.name,s]))}_reportUnknownId(e,r){const o=`no file found with id "${r}"`;this.emit("btu-upload-api-error",{method:e,id:r,reason:"unknown-id",message:o}),console.warn(`[btu-upload] ${e}: ${o}`)}_getOrReport(e,r){const o=this._files.get(r);return o||(this._reportUnknownId(e,r),null)}_renderItem(e){const r=this.querySelector(".btu-upload-list");if(!r)return;const o=document.createElement("btu-upload-item");o.setAttribute("role","listitem"),o._configure(e),r.appendChild(o),this._items.set(e.id,o)}setFileProgress(e,r){const o=this._getOrReport("setFileProgress",e);if(!o||o.status==="complete")return;const s=Number.isFinite(r)?Math.round(r):0,i=Math.min(Math.max(s,0),100);if(o.status!=="pending"&&i===o.progress)return;const n=o.status==="error"?{...o,progress:i}:{id:o.id,file:o.file,symbol:o.symbol,status:"uploading",progress:i};this._files.set(e,n),this._items.get(e)?._configure(n);const a=this._milestones.get(e);if(a&&a.size<3)for(const p of[25,50,75])i>=p&&!a.has(p)&&(a.add(p),m(c("upload","announceProgress","___ ___% uploaded",[o.file.name,String(p)])))}setFileStatus(e,r,o){const s=this._getOrReport("setFileStatus",e);if(!s)return;if(s.status==="complete"&&r!=="complete"){const l=`cannot transition from 'complete' to '${r}' for id "${e}"`;this.emit("btu-upload-api-error",{method:"setFileStatus",id:e,reason:"invalid-transition",message:l}),console.warn(`[btu-upload] setFileStatus: ${l}`);return}const{id:i,file:n,symbol:a,progress:p}=s;let d;switch(r){case"uploading":d={id:i,file:n,symbol:a,status:"uploading",progress:p};break;case"complete":d={id:i,file:n,symbol:a,status:"complete",progress:100};break;case"error":d={id:i,file:n,symbol:a,status:"error",progress:p,errorMessage:o??""};break}if(this._files.set(e,d),this._items.get(e)?._configure(d),r==="complete")m(c("upload","announceComplete","___ upload complete",[n.name]));else if(r==="error"){const l=o?.trim();m(l?c("upload","announceErrorWithDetail","___ upload failed: ___",[n.name,l]):c("upload","announceError","___ upload failed",[n.name]))}s.status!=="complete"&&r==="complete"&&this.emit("btu-upload-file-completed",{id:d.id,file:d.file})}setFileSymbol(e,r){const o=this._getOrReport("setFileSymbol",e);if(!o||o.symbol===r)return;const s={...o,symbol:r};this._files.set(e,s),this._items.get(e)?._configure(s)}removeFile(e){const r=this._getOrReport("removeFile",e);r&&(this._files.delete(e),this._milestones.delete(e),this._items.get(e)?.remove(),this._items.delete(e),this.requestUpdate(),this.emit("btu-upload-file-removed",{id:e,file:r.file}),m(c("upload","announceRemoved","File removed: ___",[r.file.name])))}getFiles(){return Array.from(this._files.values())}get _dropzoneFull(){return this.maxFiles===1?!1:this._files.size>=this.maxFiles}get _interactionBlocked(){return this.disabled||this._dropzoneFull}get _showCountPill(){return Number.isFinite(this.maxFiles)&&this.maxFiles!==1}_renderSelectButton(e){return u`<button
|
|
2
2
|
type="button"
|
|
3
3
|
class="btu-upload-dropzone-action"
|
|
4
4
|
?disabled="${this._interactionBlocked}"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as v,E as $,x as l}from"./iframe-
|
|
1
|
+
import{i as v,E as $,x as l}from"./iframe-DlBK9Drk.js";import{b as C}from"./celebrate-KwPoF1K3.js";import{E as B,R as y}from"./ReadyMixin-CvX_eidU.js";import{l as r}from"./i18n-BQ-Uj-0B.js";import"./IconButton-Di5Rgs7F.js";import"./Icon-CWyJRQf7.js";import"./LinearProgress-D9ngIVlv.js";function F(e,t){if(!t||!t.trim())return!0;const s=t.split(",").map(o=>o.trim().toLowerCase()).filter(Boolean),a=e.type.toLowerCase(),n=e.name.toLowerCase();return s.some(o=>{if(o.startsWith("."))return n.endsWith(o);if(o.endsWith("/*")){const i=o.slice(0,o.indexOf("/"));return a.startsWith(i+"/")}return a===o})}function P(e,t){return t<=0?!0:e.size<=t}function S(e){if(!e)return"upload-cloud";const t=e.toLowerCase();return t.startsWith("image/")?"image":t.startsWith("video/")?"film":t.startsWith("audio/")?"music":t.startsWith("text/")||t==="application/pdf"||t==="application/msword"||t.startsWith("application/vnd.openxmlformats")?"file":"upload-cloud"}function x(e){if(e<1024)return r("upload","sizeSubKB","< 1 KB");if(e<1048576)return`${Math.round(e/1024)} ${r("upload","unitKB","KB")}`;if(e<1073741824){const i=e/1048576;return`${i>=10?Math.round(i).toString():i.toFixed(1)} ${r("upload","unitMB","MB")}`}const n=e/1073741824;return`${n>=10?Math.round(n).toString():n.toFixed(1)} ${r("upload","unitGB","GB")}`}const E={pending:"btu-upload-item-active",uploading:"btu-upload-item-active",complete:"btu-upload-item-complete",error:"btu-upload-item-error"};class M extends B(y(v)){constructor(){super(...arguments),this._state=null,this._baseClasses="",this._previousStatus=null,this._stopProgressComplete=t=>t.stopPropagation()}createRenderRoot(){return this}connectedCallback(){super.connectedCallback();const t=this.className?this.className.split(" ").filter(Boolean):[];this._baseClasses=[...t,"btu-upload-item"].join(" "),this.addEventListener("btu-linear-progress-complete",this._stopProgressComplete)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("btu-linear-progress-complete",this._stopProgressComplete)}_configure(t){this._state!==t&&(this._state=t,this.requestUpdate())}willUpdate(){if(!this._state)return;const t=this._state.status;this.className=`${this._baseClasses} ${E[t]}`,this._previousStatus!=="complete"&&t==="complete"&&this._scheduleCelebrate(),this._previousStatus=t}_scheduleCelebrate(){this.updateComplete.then(()=>{const t=this.querySelector("btu-linear-progress");if(!t)return;const s=t.getBoundingClientRect();s.width===0&&s.height===0||C({position:{x:s.right,y:s.top+s.height/2},size:120,duration:1200})})}_handleRemove(){this._state&&this.dispatchEvent(new CustomEvent("btu-upload-item-remove",{detail:{id:this._state.id},bubbles:!0,composed:!0}))}_handleRetry(){this._state&&this.dispatchEvent(new CustomEvent("btu-upload-item-retry",{detail:{id:this._state.id},bubbles:!0,composed:!0}))}render(){if(!this._state)return $;const t=this._state,{file:s,status:a,progress:n,symbol:o}=t,i=s.name,p=o||S(s.type),m=x(s.size),d=a==="error",u=a==="complete",c=u?100:n,h=u?"gray":"primary",b=a==="error"?t.errorMessage:"",f=r("upload","cancelFile","Cancel upload for ___",[i]),_=r("upload","itemCancelTooltip","Cancel"),g=r("upload","retryFile","Retry upload for ___",[i]);return l`
|
|
2
2
|
<btu-icon
|
|
3
3
|
class="${d?"btu-upload-item-icon-error":""} btu-upload-item-icon"
|
|
4
4
|
symbol="${p}"
|
package/dist/storybook/assets/{UploadItem.stories-Pk3ghOcI.js → UploadItem.stories-_le7XBTV.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as y,x as m}from"./iframe-
|
|
1
|
+
import{g as y,x as m}from"./iframe-DlBK9Drk.js";import"./UploadItem-CYQqNwUF.js";import"./preload-helper-PPVm8Dsz.js";import"./celebrate-KwPoF1K3.js";import"./position-CFNQy3J6.js";import"./ReadyMixin-CvX_eidU.js";import"./i18n-BQ-Uj-0B.js";import"./aria-D5THOgos.js";import"./IconButton-Di5Rgs7F.js";import"./property-Bmq4RTSP.js";import"./if-defined-DerKRcyC.js";import"./TooltipMixin-CVKslCDt.js";import"./Icon-CWyJRQf7.js";import"./LinearProgress-D9ngIVlv.js";import"./ProgressMixin-CeSrn0_P.js";const{events:b,args:f,argTypes:h}=y("btu-upload-item"),e=r=>{const c=`upload-item-${crypto.randomUUID().slice(0,8)}`;return setTimeout(()=>{const l=document.getElementById(c)?.querySelector("btu-upload-item");if(!l)return;const u=new File([""],r.name,{type:r.mimeType??""});Object.defineProperty(u,"size",{value:r.size??0});const d=r.status??"uploading",p={id:crypto.randomUUID().slice(0,8),file:u,symbol:r.symbol},g=d==="pending"?{...p,status:"pending",progress:0}:d==="complete"?{...p,status:"complete",progress:100}:d==="error"?{...p,status:"error",progress:r.progress??0,errorMessage:r.errorMessage??""}:{...p,status:"uploading",progress:r.progress??0};l._configure(g)},50),m`<div id="${c}" style="max-width: 480px;"><btu-upload-item></btu-upload-item></div>`},C={title:"Components/Upload/Upload Item",component:"btu-upload-item",tags:["autodocs"],parameters:{docs:{subtitle:"Individual file row rendered inside btu-upload",description:{component:`
|
|
2
2
|
\`btu-upload-item\` renders a single file's state inside a \`btu-upload\` file list. It is an **internal sub-component** — consumers should not create, query, or modify items directly. All interaction goes through \`btu-upload\` methods (\`setFileProgress\`, \`setFileStatus\`, \`setFileSymbol\`, \`removeFile\`).
|
|
3
3
|
|
|
4
4
|
These stories exist for design documentation and visual QA of each status state in isolation. In practice, items are always created, configured, and destroyed by their parent \`btu-upload\`.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{S as
|
|
1
|
+
import{S as D}from"./blocks-DHnzPh43.js";import{r as T,x as j}from"./iframe-DlBK9Drk.js";import{e as M,n as w}from"./ref-BhKk4SDh.js";import"./preload-helper-PPVm8Dsz.js";const K={title:"Welcome",tags:["autodocs","!dev"],parameters:{layout:"fullscreen",controls:{disable:!0},actions:{disable:!0},options:{showPanel:!1},docs:{page:()=>T.createElement("div",{className:"welcome-docs"},T.createElement(D))}}},k=[[13,52,158],[19,183,158],[99,43,176],[95,233,208],[240,67,62],[83,36,148]],d=(e,a)=>e+Math.random()*(a-e),$=e=>e[Math.floor(Math.random()*e.length)];function A(e,a){if(matchMedia("(prefers-reduced-motion: reduce)").matches)return;const t=e.getContext("2d"),l=Array.from({length:3},()=>({x:0,y:0,rgb:$(k),opacity:0,radius:d(250,350)}));let p=null;function O(){const i=5*devicePixelRatio,n=Object.assign(document.createElement("canvas"),{width:i,height:i}),s=n.getContext("2d");s.fillStyle="#000",s.arc(i/2,i/2,1.6*devicePixelRatio,0,Math.PI*2),s.fill(),p=t.createPattern(n,"repeat")}function R(){const{width:i,height:n}=e.getBoundingClientRect();e.width=i*devicePixelRatio,e.height=n*devicePixelRatio,t.setTransform(devicePixelRatio,0,0,devicePixelRatio,0,0),O()}R(),addEventListener("resize",R);const r=a?l[0]:null;r&&(r.rgb=$(k),r.radius=300),(function i(){if(!e.isConnected)return;const n=e.width/devicePixelRatio,s=e.height/devicePixelRatio;t.clearRect(0,0,n,s),r&&a&&(a.active?(r.x+=(a.tx-r.x)*.06,r.y+=(a.ty-r.y)*.06,r.opacity+=(.35-r.opacity)*.08):r.opacity+=(0-r.opacity)*.04);for(const o of l){if(o.opacity<=0)continue;const[u,h,v]=o.rgb,c=t.createRadialGradient(o.x,o.y,0,o.x,o.y,o.radius);c.addColorStop(0,`rgba(${u},${h},${v},${o.opacity})`),c.addColorStop(1,`rgba(${u},${h},${v},0)`),t.fillStyle=c,t.fillRect(o.x-o.radius,o.y-o.radius,o.radius*2,o.radius*2)}p&&(t.globalCompositeOperation="destination-in",t.fillStyle=p,t.fillRect(0,0,n,s),t.globalCompositeOperation="source-over"),requestAnimationFrame(i)})();function C(i){if(!e.isConnected)return;const{width:n,height:s}=e.getBoundingClientRect(),o=300,u=m=>m<2?{x:d(.15*n,.85*n),y:m===0?-o:s+o}:{x:m===2?-o:n+o,y:d(.15*s,.85*s)},h=Math.floor(Math.random()*4),v=(h+(Math.random()<.5?2:[1,3][Math.floor(Math.random()*2)]))%4,c=u(h),z=u(v),y=z.x-c.x,x=z.y-c.y,S=Math.hypot(y,x)||1,U=Math.min(n,s)*d(.15,.35),Y=d(1.2,2.2);i.rgb=$(k),i.radius=d(250,350);let P=null;const _=d(6e3,7500);(function m(E){if(!e.isConnected)return;P??=E;const f=Math.min((E-P)/_,1),L=.5-.5*Math.cos(f*Math.PI),B=Math.sin(f*Y*Math.PI)*U;i.x=c.x+y*L+-x/S*B,i.y=c.y+x*L+y/S*B,i.opacity=.35*Math.min(f/.2,1)*Math.min((1-f)/.2,1),f<1?requestAnimationFrame(m):i.opacity=0})(performance.now())}(a?l.slice(1):l).forEach((i,n)=>setTimeout(()=>{C(i),setInterval(()=>e.isConnected&&C(i),7500)},1e3+n*2500))}const I="position:absolute;inset:0;width:100%;height:100%;pointer-events:none;",q=M(),N=M(),H=M(),b={active:!1,tx:0,ty:0},g={render:()=>(queueMicrotask(()=>{const e=q.value;e&&!e.dataset.init&&(e.dataset.init="1",A(e));const a=N.value;a&&!a.dataset.init&&(a.dataset.init="1",A(a,b));const t=H.value;t&&!t.dataset.init&&(t.dataset.init="1",t.addEventListener("mousemove",l=>{const p=t.getBoundingClientRect();b.tx=l.clientX-p.left,b.ty=l.clientY-p.top,b.active=!0}),t.addEventListener("mouseleave",()=>{b.active=!1}))}),j`
|
|
2
2
|
<div
|
|
3
3
|
${w(H)}
|
|
4
4
|
style="
|
|
@@ -75,9 +75,24 @@ import{S as G}from"./blocks-Dzcxb014.js";import{r as T,x as j}from"./iframe-Byo_
|
|
|
75
75
|
</div>
|
|
76
76
|
`)}
|
|
77
77
|
</div>
|
|
78
|
+
<p
|
|
79
|
+
style="
|
|
80
|
+
margin-top: 16px;
|
|
81
|
+
padding: 6px 12px;
|
|
82
|
+
border-radius: 10px;
|
|
83
|
+
background: color-mix(in oklch, var(--btu-theme-white) 85%, transparent);
|
|
84
|
+
backdrop-filter: blur(8px);
|
|
85
|
+
font-size: 0.8125rem;
|
|
86
|
+
color: oklch(var(--btu-theme-gray-600));
|
|
87
|
+
"
|
|
88
|
+
>
|
|
89
|
+
Using a coding agent? Point it at
|
|
90
|
+
<a href="./llms.txt" target="_blank" style="color: oklch(var(--btu-theme-primary-700));">llms.txt</a>, the
|
|
91
|
+
component docs in markdown.
|
|
92
|
+
</p>
|
|
78
93
|
</div>
|
|
79
94
|
</div>
|
|
80
|
-
`)};
|
|
95
|
+
`)};g.parameters={...g.parameters,docs:{...g.parameters?.docs,source:{originalSource:`{
|
|
81
96
|
render: () => {
|
|
82
97
|
queueMicrotask(() => {
|
|
83
98
|
// Init back canvas (auto-swoop only)
|
|
@@ -208,8 +223,23 @@ import{S as G}from"./blocks-Dzcxb014.js";import{r as T,x as j}from"./iframe-Byo_
|
|
|
208
223
|
</div>
|
|
209
224
|
\`)}
|
|
210
225
|
</div>
|
|
226
|
+
<p
|
|
227
|
+
style="
|
|
228
|
+
margin-top: 16px;
|
|
229
|
+
padding: 6px 12px;
|
|
230
|
+
border-radius: 10px;
|
|
231
|
+
background: color-mix(in oklch, var(--btu-theme-white) 85%, transparent);
|
|
232
|
+
backdrop-filter: blur(8px);
|
|
233
|
+
font-size: 0.8125rem;
|
|
234
|
+
color: oklch(var(--btu-theme-gray-600));
|
|
235
|
+
"
|
|
236
|
+
>
|
|
237
|
+
Using a coding agent? Point it at
|
|
238
|
+
<a href="./llms.txt" target="_blank" style="color: oklch(var(--btu-theme-primary-700));">llms.txt</a>, the
|
|
239
|
+
component docs in markdown.
|
|
240
|
+
</p>
|
|
211
241
|
</div>
|
|
212
242
|
</div>
|
|
213
243
|
\`;
|
|
214
244
|
}
|
|
215
|
-
}`,...
|
|
245
|
+
}`,...g.parameters?.docs?.source}}};const Q=["Page"];export{g as Page,Q as __namedExportsOrder,K as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as $,x as r,g as E}from"./iframe-
|
|
1
|
+
import{i as $,x as r,g as E}from"./iframe-DlBK9Drk.js";import{o as x}from"./style-map-DE4G47KD.js";import{n as _}from"./property-Bmq4RTSP.js";import{r as k}from"./state-DVIUS0Gf.js";import{o as S}from"./if-defined-DerKRcyC.js";import{E as T,R as W}from"./ReadyMixin-CvX_eidU.js";import{O as D}from"./OnFindMixin-oL1bvTFj.js";import"./Icon-CWyJRQf7.js";import"./preload-helper-PPVm8Dsz.js";import"./onFind-Ci35eu2y.js";const F={top:"btu-tooltip-top",bottom:"btu-tooltip-bottom",left:"btu-tooltip-left",right:"btu-tooltip-right"},B={sm:"btu-tooltip-offset-sm",md:"btu-tooltip-offset-md",lg:"btu-tooltip-offset-lg",xl:"btu-tooltip-offset-xl"};class C{constructor(t,e){this._tooltipEl=null,this._targetEl=null,this._anchorName=`--btu-trigger-${crypto.randomUUID()}`,this._showTimer=null,this._ac=null,this._host=t,this._options=e,t.addController(this)}hostUpdated(){const t=this._host.querySelector(this._options.target);if(t&&t!==this._targetEl?(this._detach(),this._targetEl=t,this._attach()):!t&&this._targetEl&&this._detach(),this._tooltipEl){const e=this._options.text();this._tooltipEl.textContent!==e&&(this._tooltipEl.textContent=e)}}hostDisconnected(){this._detach()}_attach(){if(!this._targetEl)return;const{position:t="top",offset:e,noArrow:l,text:s,delay:i=300}=this._options,a=["btu-tooltip",F[t]];e&&a.push(B[e]),l&&a.push("btu-tooltip-no-arrow");const n=document.createElement("div");n.className=a.join(" "),n.setAttribute("role","tooltip"),n.setAttribute("data-tooltip-internal",""),n.setAttribute("popover","manual"),n.style.setProperty("position-anchor",this._anchorName),n.textContent=s(),this._tooltipEl=n,this._targetEl.style.setProperty("anchor-name",this._anchorName),this._host.appendChild(n);const y=new AbortController;this._ac=y;const d={signal:y.signal};this._targetEl.addEventListener("mouseenter",()=>{this._clearShowTimer(),this._showTimer=setTimeout(()=>this._show(),i)},d),this._targetEl.addEventListener("mouseleave",()=>this._hide(),d),this._targetEl.addEventListener("focusin",()=>this._show(),d),this._targetEl.addEventListener("focusout",()=>this._hide(),d),this._targetEl.addEventListener("click",()=>this._hide(),d),document.addEventListener("keydown",v=>{v.key==="Escape"&&this._hide()},d)}_detach(){if(this._clearShowTimer(),this._ac?.abort(),this._ac=null,this._targetEl&&(this._targetEl.style.removeProperty("anchor-name"),this._targetEl=null),this._tooltipEl){try{this._tooltipEl.hidePopover()}catch{}this._tooltipEl.remove(),this._tooltipEl=null}}_show(){if(this._clearShowTimer(),!(!this._tooltipEl||this._tooltipEl.matches(":popover-open")))try{this._tooltipEl.showPopover()}catch{}}_hide(){if(this._clearShowTimer(),!(!this._tooltipEl||!this._tooltipEl.matches(":popover-open")))try{this._tooltipEl.hidePopover()}catch{}}_clearShowTimer(){this._showTimer!==null&&(clearTimeout(this._showTimer),this._showTimer=null)}}var A=Object.defineProperty,p=(o,t,e,l)=>{for(var s=void 0,i=o.length-1,a;i>=0;i--)(a=o[i])&&(s=a(t,e,s)||s);return s&&A(t,e,s),s},c;const u=(c=class extends T(D(W($))){constructor(){super(...arguments),this._internals=this.attachInternals(),this.heading="",this.collapsible=!1,this.collapsed=!1,this.fullscreenable=!1,this._isFullscreen=!1,this._collapseTooltip=new C(this,{target:'button[data-tooltip="collapse"]',text:()=>this.collapsed?"Expand":"Collapse",position:"bottom",noArrow:!0,offset:"sm"}),this._fullscreenTooltip=new C(this,{target:'button[data-tooltip="fullscreen"]',text:()=>this._isFullscreen?"Exit fullscreen":"Enter fullscreen",position:"bottom",noArrow:!0,offset:"sm"}),this._instanceId=c._idCounter++,this.bodyId=`widget-body-${this._instanceId}`,this.dialogId=`widget-dialog-${this._instanceId}`}createRenderRoot(){return this}get isFullscreen(){return this._isFullscreen}willUpdate(t){super.willUpdate(t),t.has("collapsed")&&(this.collapsed?this._internals.states.add("collapsed"):this._internals.states.delete("collapsed"))}connectedCallback(){super.connectedCallback(),this.classList.add("blokk"),this._restoreState(),this._lightDismissHandler=t=>{const e=t.target;e instanceof HTMLDialogElement&&e.id===this.dialogId&&e.close()},document.addEventListener("click",this._lightDismissHandler),this.updateComplete.then(()=>this._setupDialog())}disconnectedCallback(){super.disconnectedCallback(),this._lightDismissHandler&&(document.removeEventListener("click",this._lightDismissHandler),this._lightDismissHandler=void 0),this._dialog&&this._dialogCloseHandler&&(this._dialog.removeEventListener("close",this._dialogCloseHandler),this._dialogCloseHandler=void 0)}firstUpdated(t){super.firstUpdated(t),this.emit("btu-widget-ready")}onFindRegistration(){const t=this.querySelector(".btu-widget__actions"),e=this.querySelector(".btu-widget__body"),l=this.querySelector(".btu-widget__footer");if(!t||!e||!l)return null;const s=t.querySelector("[data-widget-internal]");return{selectors:":scope > :not([data-widget-internal]):not([data-tooltip-internal])",callback:i=>{const a=i.getAttribute("slot");a==="controls"?t.insertBefore(i,s):a==="footer"?l.appendChild(i):e.appendChild(i)}}}handleToggle(){this.collapsed=!this.collapsed,this.collapsible||(this.collapsible=!0),this.emit("btu-widget-collapse-changed",{collapsed:this.collapsed}),this._persistState()}handleFullscreen(){if(!this._dialog){console.warn("Widget: Dialog element not found");return}const t=this.querySelector(".btu-widget__content");if(!t)return;const e=t.querySelector(".btu-widget__body"),l=()=>{this._isFullscreen=!this._isFullscreen,this._isFullscreen?(this._internals.states.add("fullscreen"),e&&e.classList.add("max-h-[calc(100vh-3rem-4rem)]","overflow-auto"),this._dialog.appendChild(t),this._dialog.showModal()):(this._internals.states.delete("fullscreen"),e&&e.classList.remove("max-h-[calc(100vh-3rem-4rem)]","overflow-auto"),this._dialog.close(),this.insertBefore(t,this._dialog)),this.emit("btu-widget-fullscreen-changed",{fullscreen:this._isFullscreen})};document.startViewTransition?(this._dialog.style.viewTransitionName="widget",document.startViewTransition(()=>{l()}).finished.finally(()=>{this._dialog&&(this._dialog.style.viewTransitionName="")})):l()}_setupDialog(){if(this._dialog&&this._dialogCloseHandler&&this._dialog.removeEventListener("close",this._dialogCloseHandler),this._dialog=this.querySelector(`#${this.dialogId}`),!this._dialog){console.warn("Widget: Dialog element not found");return}this._dialogCloseHandler=()=>{if(this._isFullscreen){const t=this._dialog.querySelector(".btu-widget__content");if(t){const e=t.querySelector(".btu-widget__body");e&&e.classList.remove("max-h-[calc(100vh-3rem-4rem)]","overflow-auto"),this.insertBefore(t,this._dialog)}this._isFullscreen=!1,this._internals.states.delete("fullscreen"),this.emit("btu-widget-fullscreen-changed",{fullscreen:!1})}},this._dialog.addEventListener("close",this._dialogCloseHandler)}_restoreState(){if(!this.id||this.hasAttribute("collapsed"))return;const t=`btu-widget-state-${this.id}`;try{const e=localStorage.getItem(t);if(e){const l=JSON.parse(e);typeof l.collapsed=="boolean"&&(this.collapsed=l.collapsed)}}catch(e){console.warn(`Widget: Failed to parse stored state for ${t}`,e)}}_persistState(){if(!this.id)return;const t=`btu-widget-state-${this.id}`,e={collapsed:this.collapsed};try{localStorage.setItem(t,JSON.stringify(e))}catch(l){console.warn(`Widget: Failed to persist state for ${this.id}`,l)}}render(){const t="btu-widget__content overflow-hidden rounded-[inherit] [border:var(--widget-border,1px_solid_oklch(var(--btu-theme-gray-200)))]",e="btu-widget__header flex items-center justify-between gap-2 px-4 py-2 [background-color:var(--header-background,oklch(var(--btu-theme-gray-50)))] [border-bottom-width:1px] [border-bottom-style:solid] [border-bottom-color:var(--widget-border-color,oklch(var(--btu-theme-gray-200)))] transition-[border-color] duration-200",l="btu-widget__heading btu-heading-5 capitalize text-gray-900 flex-1",s="btu-widget__actions flex items-center gap-2",i="btu-button btu-button-text-hidden btu-button-fill-none btu-button-gray btu-button-sm",a=i,n=i;return r`
|
|
2
2
|
<div class="${t}" data-widget-internal>
|
|
3
3
|
<div class="${e}" data-widget-internal>
|
|
4
4
|
${this.heading?r`<span id="widget-heading-${this.bodyId}" class="${l}">${this.heading}</span>`:""}
|
package/dist/storybook/assets/{WithTooltip-65CFNBJE-DK6PZNaa.js → WithTooltip-65CFNBJE-DK6GcBuR.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{R as Bt,_ as Pt,d as Mt}from"./blocks-Dzcxb014.js";import{R as U,S as Re,r as y,a1 as pe,M as We,T as _t,a3 as te,_ as ft}from"./iframe-Byo_x5o2.js";import"./preload-helper-PPVm8Dsz.js";var Ht=ft({"../../node_modules/react-fast-compare/index.js"(e,t){var r=typeof Element<"u",o=typeof Map=="function",n=typeof Set=="function",s=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function l(u,a){if(u===a)return!0;if(u&&a&&typeof u=="object"&&typeof a=="object"){if(u.constructor!==a.constructor)return!1;var i,f,p;if(Array.isArray(u)){if(i=u.length,i!=a.length)return!1;for(f=i;f--!==0;)if(!l(u[f],a[f]))return!1;return!0}var c;if(o&&u instanceof Map&&a instanceof Map){if(u.size!==a.size)return!1;for(c=u.entries();!(f=c.next()).done;)if(!a.has(f.value[0]))return!1;for(c=u.entries();!(f=c.next()).done;)if(!l(f.value[1],a.get(f.value[0])))return!1;return!0}if(n&&u instanceof Set&&a instanceof Set){if(u.size!==a.size)return!1;for(c=u.entries();!(f=c.next()).done;)if(!a.has(f.value[0]))return!1;return!0}if(s&&ArrayBuffer.isView(u)&&ArrayBuffer.isView(a)){if(i=u.length,i!=a.length)return!1;for(f=i;f--!==0;)if(u[f]!==a[f])return!1;return!0}if(u.constructor===RegExp)return u.source===a.source&&u.flags===a.flags;if(u.valueOf!==Object.prototype.valueOf&&typeof u.valueOf=="function"&&typeof a.valueOf=="function")return u.valueOf()===a.valueOf();if(u.toString!==Object.prototype.toString&&typeof u.toString=="function"&&typeof a.toString=="function")return u.toString()===a.toString();if(p=Object.keys(u),i=p.length,i!==Object.keys(a).length)return!1;for(f=i;f--!==0;)if(!Object.prototype.hasOwnProperty.call(a,p[f]))return!1;if(r&&u instanceof Element)return!1;for(f=i;f--!==0;)if(!((p[f]==="_owner"||p[f]==="__v"||p[f]==="__o")&&u.$$typeof)&&!l(u[p[f]],a[p[f]]))return!1;return!0}return u!==u&&a!==a}t.exports=function(u,a){try{return l(u,a)}catch(i){if((i.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw i}}}}),Nt=ft({"../../node_modules/warning/warning.js"(e,t){var r=function(){};t.exports=r}}),Vt=We(_t(),1);const{deprecate:lt}=__STORYBOOK_MODULE_CLIENT_LOGGER__,{global:qt}=__STORYBOOK_MODULE_GLOBAL__;y.createContext();y.createContext();var Ke=function(e){return e.reduce(function(t,r){var o=r[0],n=r[1];return t[o]=n,t},{})},Je=typeof window<"u"&&window.document&&window.document.createElement?y.useLayoutEffect:y.useEffect,j="top",H="bottom",N="right",B="left",$e="auto",ye=[j,H,N,B],ie="start",ge="end",Ut="clippingParents",ct="viewport",ce="popper",zt="reference",Qe=ye.reduce(function(e,t){return e.concat([t+"-"+ie,t+"-"+ge])},[]),pt=[].concat(ye,[$e]).reduce(function(e,t){return e.concat([t,t+"-"+ie,t+"-"+ge])},[]),It="beforeRead",Yt="read",Xt="afterRead",Ft="beforeMain",Gt="main",Kt="afterMain",Jt="beforeWrite",Qt="write",Zt="afterWrite",er=[It,Yt,Xt,Ft,Gt,Kt,Jt,Qt,Zt];function I(e){return e?(e.nodeName||"").toLowerCase():null}function P(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ne(e){var t=P(e).Element;return e instanceof t||e instanceof Element}function _(e){var t=P(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function je(e){if(typeof ShadowRoot>"u")return!1;var t=P(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function tr(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var o=t.styles[r]||{},n=t.attributes[r]||{},s=t.elements[r];!_(s)||!I(s)||(Object.assign(s.style,o),Object.keys(n).forEach(function(l){var u=n[l];u===!1?s.removeAttribute(l):s.setAttribute(l,u===!0?"":u)}))})}function rr(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(o){var n=t.elements[o],s=t.attributes[o]||{},l=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:r[o]),u=l.reduce(function(a,i){return a[i]="",a},{});!_(n)||!I(n)||(Object.assign(n.style,u),Object.keys(s).forEach(function(a){n.removeAttribute(a)}))})}}var dt={name:"applyStyles",enabled:!0,phase:"write",fn:tr,effect:rr,requires:["computeStyles"]};function z(e){return e.split("-")[0]}var re=Math.max,Te=Math.min,ae=Math.round;function ke(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function vt(){return!/^((?!chrome|android).)*safari/i.test(ke())}function se(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var o=e.getBoundingClientRect(),n=1,s=1;t&&_(e)&&(n=e.offsetWidth>0&&ae(o.width)/e.offsetWidth||1,s=e.offsetHeight>0&&ae(o.height)/e.offsetHeight||1);var l=ne(e)?P(e):window,u=l.visualViewport,a=!vt()&&r,i=(o.left+(a&&u?u.offsetLeft:0))/n,f=(o.top+(a&&u?u.offsetTop:0))/s,p=o.width/n,c=o.height/s;return{width:p,height:c,top:f,right:i+p,bottom:f+c,left:i,x:i,y:f}}function Be(e){var t=se(e),r=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:o}}function mt(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&je(r)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function F(e){return P(e).getComputedStyle(e)}function nr(e){return["table","td","th"].indexOf(I(e))>=0}function K(e){return((ne(e)?e.ownerDocument:e.document)||window.document).documentElement}function Le(e){return I(e)==="html"?e:e.assignedSlot||e.parentNode||(je(e)?e.host:null)||K(e)}function Ze(e){return!_(e)||F(e).position==="fixed"?null:e.offsetParent}function or(e){var t=/firefox/i.test(ke()),r=/Trident/i.test(ke());if(r&&_(e)){var o=F(e);if(o.position==="fixed")return null}var n=Le(e);for(je(n)&&(n=n.host);_(n)&&["html","body"].indexOf(I(n))<0;){var s=F(n);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return n;n=n.parentNode}return null}function be(e){for(var t=P(e),r=Ze(e);r&&nr(r)&&F(r).position==="static";)r=Ze(r);return r&&(I(r)==="html"||I(r)==="body"&&F(r).position==="static")?t:r||or(e)||t}function Pe(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function de(e,t,r){return re(e,Te(t,r))}function ir(e,t,r){var o=de(e,t,r);return o>r?r:o}function gt(){return{top:0,right:0,bottom:0,left:0}}function ht(e){return Object.assign({},gt(),e)}function yt(e,t){return t.reduce(function(r,o){return r[o]=e,r},{})}var ar=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,ht(typeof e!="number"?e:yt(e,ye))};function sr(e){var t,r=e.state,o=e.name,n=e.options,s=r.elements.arrow,l=r.modifiersData.popperOffsets,u=z(r.placement),a=Pe(u),i=[B,N].indexOf(u)>=0,f=i?"height":"width";if(!(!s||!l)){var p=ar(n.padding,r),c=Be(s),v=a==="y"?j:B,g=a==="y"?H:N,d=r.rects.reference[f]+r.rects.reference[a]-l[a]-r.rects.popper[f],x=l[a]-r.rects.reference[a],O=be(s),L=O?a==="y"?O.clientHeight||0:O.clientWidth||0:0,A=d/2-x/2,m=p[v],b=L-c[f]-p[g],E=L/2-c[f]/2+A,T=de(m,E,b),S=a;r.modifiersData[o]=(t={},t[S]=T,t.centerOffset=T-E,t)}}function ur(e){var t=e.state,r=e.options,o=r.element,n=o===void 0?"[data-popper-arrow]":o;n!=null&&(typeof n=="string"&&(n=t.elements.popper.querySelector(n),!n)||mt(t.elements.popper,n)&&(t.elements.arrow=n))}var fr={name:"arrow",enabled:!0,phase:"main",fn:sr,effect:ur,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ue(e){return e.split("-")[1]}var lr={top:"auto",right:"auto",bottom:"auto",left:"auto"};function cr(e,t){var r=e.x,o=e.y,n=t.devicePixelRatio||1;return{x:ae(r*n)/n||0,y:ae(o*n)/n||0}}function et(e){var t,r=e.popper,o=e.popperRect,n=e.placement,s=e.variation,l=e.offsets,u=e.position,a=e.gpuAcceleration,i=e.adaptive,f=e.roundOffsets,p=e.isFixed,c=l.x,v=c===void 0?0:c,g=l.y,d=g===void 0?0:g,x=typeof f=="function"?f({x:v,y:d}):{x:v,y:d};v=x.x,d=x.y;var O=l.hasOwnProperty("x"),L=l.hasOwnProperty("y"),A=B,m=j,b=window;if(i){var E=be(r),T="clientHeight",S="clientWidth";if(E===P(r)&&(E=K(r),F(E).position!=="static"&&u==="absolute"&&(T="scrollHeight",S="scrollWidth")),E=E,n===j||(n===B||n===N)&&s===ge){m=H;var w=p&&E===b&&b.visualViewport?b.visualViewport.height:E[T];d-=w-o.height,d*=a?1:-1}if(n===B||(n===j||n===H)&&s===ge){A=N;var R=p&&E===b&&b.visualViewport?b.visualViewport.width:E[S];v-=R-o.width,v*=a?1:-1}}var k=Object.assign({position:u},i&&lr),$=f===!0?cr({x:v,y:d},P(r)):{x:v,y:d};if(v=$.x,d=$.y,a){var W;return Object.assign({},k,(W={},W[m]=L?"0":"",W[A]=O?"0":"",W.transform=(b.devicePixelRatio||1)<=1?"translate("+v+"px, "+d+"px)":"translate3d("+v+"px, "+d+"px, 0)",W))}return Object.assign({},k,(t={},t[m]=L?d+"px":"",t[A]=O?v+"px":"",t.transform="",t))}function pr(e){var t=e.state,r=e.options,o=r.gpuAcceleration,n=o===void 0?!0:o,s=r.adaptive,l=s===void 0?!0:s,u=r.roundOffsets,a=u===void 0?!0:u,i={placement:z(t.placement),variation:ue(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:n,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,et(Object.assign({},i,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:l,roundOffsets:a})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,et(Object.assign({},i,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var bt={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:pr,data:{}},Ee={passive:!0};function dr(e){var t=e.state,r=e.instance,o=e.options,n=o.scroll,s=n===void 0?!0:n,l=o.resize,u=l===void 0?!0:l,a=P(t.elements.popper),i=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&i.forEach(function(f){f.addEventListener("scroll",r.update,Ee)}),u&&a.addEventListener("resize",r.update,Ee),function(){s&&i.forEach(function(f){f.removeEventListener("scroll",r.update,Ee)}),u&&a.removeEventListener("resize",r.update,Ee)}}var wt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:dr,data:{}},vr={left:"right",right:"left",bottom:"top",top:"bottom"};function Se(e){return e.replace(/left|right|bottom|top/g,function(t){return vr[t]})}var mr={start:"end",end:"start"};function tt(e){return e.replace(/start|end/g,function(t){return mr[t]})}function Me(e){var t=P(e),r=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:r,scrollTop:o}}function _e(e){return se(K(e)).left+Me(e).scrollLeft}function gr(e,t){var r=P(e),o=K(e),n=r.visualViewport,s=o.clientWidth,l=o.clientHeight,u=0,a=0;if(n){s=n.width,l=n.height;var i=vt();(i||!i&&t==="fixed")&&(u=n.offsetLeft,a=n.offsetTop)}return{width:s,height:l,x:u+_e(e),y:a}}function hr(e){var t,r=K(e),o=Me(e),n=(t=e.ownerDocument)==null?void 0:t.body,s=re(r.scrollWidth,r.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),l=re(r.scrollHeight,r.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),u=-o.scrollLeft+_e(e),a=-o.scrollTop;return F(n||r).direction==="rtl"&&(u+=re(r.clientWidth,n?n.clientWidth:0)-s),{width:s,height:l,x:u,y:a}}function He(e){var t=F(e),r=t.overflow,o=t.overflowX,n=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+n+o)}function xt(e){return["html","body","#document"].indexOf(I(e))>=0?e.ownerDocument.body:_(e)&&He(e)?e:xt(Le(e))}function ve(e,t){var r;t===void 0&&(t=[]);var o=xt(e),n=o===((r=e.ownerDocument)==null?void 0:r.body),s=P(o),l=n?[s].concat(s.visualViewport||[],He(o)?o:[]):o,u=t.concat(l);return n?u:u.concat(ve(Le(l)))}function De(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function yr(e,t){var r=se(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function rt(e,t,r){return t===ct?De(gr(e,r)):ne(t)?yr(t,r):De(hr(K(e)))}function br(e){var t=ve(Le(e)),r=["absolute","fixed"].indexOf(F(e).position)>=0,o=r&&_(e)?be(e):e;return ne(o)?t.filter(function(n){return ne(n)&&mt(n,o)&&I(n)!=="body"}):[]}function wr(e,t,r,o){var n=t==="clippingParents"?br(e):[].concat(t),s=[].concat(n,[r]),l=s[0],u=s.reduce(function(a,i){var f=rt(e,i,o);return a.top=re(f.top,a.top),a.right=Te(f.right,a.right),a.bottom=Te(f.bottom,a.bottom),a.left=re(f.left,a.left),a},rt(e,l,o));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function Ot(e){var t=e.reference,r=e.element,o=e.placement,n=o?z(o):null,s=o?ue(o):null,l=t.x+t.width/2-r.width/2,u=t.y+t.height/2-r.height/2,a;switch(n){case j:a={x:l,y:t.y-r.height};break;case H:a={x:l,y:t.y+t.height};break;case N:a={x:t.x+t.width,y:u};break;case B:a={x:t.x-r.width,y:u};break;default:a={x:t.x,y:t.y}}var i=n?Pe(n):null;if(i!=null){var f=i==="y"?"height":"width";switch(s){case ie:a[i]=a[i]-(t[f]/2-r[f]/2);break;case ge:a[i]=a[i]+(t[f]/2-r[f]/2);break}}return a}function he(e,t){t===void 0&&(t={});var r=t,o=r.placement,n=o===void 0?e.placement:o,s=r.strategy,l=s===void 0?e.strategy:s,u=r.boundary,a=u===void 0?Ut:u,i=r.rootBoundary,f=i===void 0?ct:i,p=r.elementContext,c=p===void 0?ce:p,v=r.altBoundary,g=v===void 0?!1:v,d=r.padding,x=d===void 0?0:d,O=ht(typeof x!="number"?x:yt(x,ye)),L=c===ce?zt:ce,A=e.rects.popper,m=e.elements[g?L:c],b=wr(ne(m)?m:m.contextElement||K(e.elements.popper),a,f,l),E=se(e.elements.reference),T=Ot({reference:E,element:A,placement:n}),S=De(Object.assign({},A,T)),w=c===ce?S:E,R={top:b.top-w.top+O.top,bottom:w.bottom-b.bottom+O.bottom,left:b.left-w.left+O.left,right:w.right-b.right+O.right},k=e.modifiersData.offset;if(c===ce&&k){var $=k[n];Object.keys(R).forEach(function(W){var V=[N,H].indexOf(W)>=0?1:-1,h=[j,H].indexOf(W)>=0?"y":"x";R[W]+=$[h]*V})}return R}function xr(e,t){t===void 0&&(t={});var r=t,o=r.placement,n=r.boundary,s=r.rootBoundary,l=r.padding,u=r.flipVariations,a=r.allowedAutoPlacements,i=a===void 0?pt:a,f=ue(o),p=f?u?Qe:Qe.filter(function(g){return ue(g)===f}):ye,c=p.filter(function(g){return i.indexOf(g)>=0});c.length===0&&(c=p);var v=c.reduce(function(g,d){return g[d]=he(e,{placement:d,boundary:n,rootBoundary:s,padding:l})[z(d)],g},{});return Object.keys(v).sort(function(g,d){return v[g]-v[d]})}function Or(e){if(z(e)===$e)return[];var t=Se(e);return[tt(e),t,tt(t)]}function Er(e){var t=e.state,r=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var n=r.mainAxis,s=n===void 0?!0:n,l=r.altAxis,u=l===void 0?!0:l,a=r.fallbackPlacements,i=r.padding,f=r.boundary,p=r.rootBoundary,c=r.altBoundary,v=r.flipVariations,g=v===void 0?!0:v,d=r.allowedAutoPlacements,x=t.options.placement,O=z(x),L=O===x,A=a||(L||!g?[Se(x)]:Or(x)),m=[x].concat(A).reduce(function(Z,X){return Z.concat(z(X)===$e?xr(t,{placement:X,boundary:f,rootBoundary:p,padding:i,flipVariations:g,allowedAutoPlacements:d}):X)},[]),b=t.rects.reference,E=t.rects.popper,T=new Map,S=!0,w=m[0],R=0;R<m.length;R++){var k=m[R],$=z(k),W=ue(k)===ie,V=[j,H].indexOf($)>=0,h=V?"width":"height",C=he(t,{placement:k,boundary:f,rootBoundary:p,altBoundary:c,padding:i}),D=V?W?N:B:W?H:j;b[h]>E[h]&&(D=Se(D));var Y=Se(D),q=[];if(s&&q.push(C[$]<=0),u&&q.push(C[D]<=0,C[Y]<=0),q.every(function(Z){return Z})){w=k,S=!1;break}T.set(k,q)}if(S)for(var J=g?3:1,Q=function(Z){var X=m.find(function(xe){var le=T.get(xe);if(le)return le.slice(0,Z).every(function(oe){return oe})});if(X)return w=X,"break"},fe=J;fe>0;fe--){var we=Q(fe);if(we==="break")break}t.placement!==w&&(t.modifiersData[o]._skip=!0,t.placement=w,t.reset=!0)}}var Sr={name:"flip",enabled:!0,phase:"main",fn:Er,requiresIfExists:["offset"],data:{_skip:!1}};function nt(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function ot(e){return[j,N,H,B].some(function(t){return e[t]>=0})}function Tr(e){var t=e.state,r=e.name,o=t.rects.reference,n=t.rects.popper,s=t.modifiersData.preventOverflow,l=he(t,{elementContext:"reference"}),u=he(t,{altBoundary:!0}),a=nt(l,o),i=nt(u,n,s),f=ot(a),p=ot(i);t.modifiersData[r]={referenceClippingOffsets:a,popperEscapeOffsets:i,isReferenceHidden:f,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":p})}var Rr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Tr};function Lr(e,t,r){var o=z(e),n=[B,j].indexOf(o)>=0?-1:1,s=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,l=s[0],u=s[1];return l=l||0,u=(u||0)*n,[B,N].indexOf(o)>=0?{x:u,y:l}:{x:l,y:u}}function Cr(e){var t=e.state,r=e.options,o=e.name,n=r.offset,s=n===void 0?[0,0]:n,l=pt.reduce(function(f,p){return f[p]=Lr(p,t.rects,s),f},{}),u=l[t.placement],a=u.x,i=u.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=a,t.modifiersData.popperOffsets.y+=i),t.modifiersData[o]=l}var Ar={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Cr};function kr(e){var t=e.state,r=e.name;t.modifiersData[r]=Ot({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}var Et={name:"popperOffsets",enabled:!0,phase:"read",fn:kr,data:{}};function Dr(e){return e==="x"?"y":"x"}function Wr(e){var t=e.state,r=e.options,o=e.name,n=r.mainAxis,s=n===void 0?!0:n,l=r.altAxis,u=l===void 0?!1:l,a=r.boundary,i=r.rootBoundary,f=r.altBoundary,p=r.padding,c=r.tether,v=c===void 0?!0:c,g=r.tetherOffset,d=g===void 0?0:g,x=he(t,{boundary:a,rootBoundary:i,padding:p,altBoundary:f}),O=z(t.placement),L=ue(t.placement),A=!L,m=Pe(O),b=Dr(m),E=t.modifiersData.popperOffsets,T=t.rects.reference,S=t.rects.popper,w=typeof d=="function"?d(Object.assign({},t.rects,{placement:t.placement})):d,R=typeof w=="number"?{mainAxis:w,altAxis:w}:Object.assign({mainAxis:0,altAxis:0},w),k=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,$={x:0,y:0};if(E){if(s){var W,V=m==="y"?j:B,h=m==="y"?H:N,C=m==="y"?"height":"width",D=E[m],Y=D+x[V],q=D-x[h],J=v?-S[C]/2:0,Q=L===ie?T[C]:S[C],fe=L===ie?-S[C]:-T[C],we=t.elements.arrow,Z=v&&we?Be(we):{width:0,height:0},X=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:gt(),xe=X[V],le=X[h],oe=de(0,T[C],Z[C]),Ct=A?T[C]/2-J-oe-xe-R.mainAxis:Q-oe-xe-R.mainAxis,At=A?-T[C]/2+J+oe+le+R.mainAxis:fe+oe+le+R.mainAxis,Ce=t.elements.arrow&&be(t.elements.arrow),kt=Ce?m==="y"?Ce.clientTop||0:Ce.clientLeft||0:0,Ve=(W=k?.[m])!=null?W:0,Dt=D+Ct-Ve-kt,Wt=D+At-Ve,qe=de(v?Te(Y,Dt):Y,D,v?re(q,Wt):q);E[m]=qe,$[m]=qe-D}if(u){var Ue,$t=m==="x"?j:B,jt=m==="x"?H:N,ee=E[b],Oe=b==="y"?"height":"width",ze=ee+x[$t],Ie=ee-x[jt],Ae=[j,B].indexOf(O)!==-1,Ye=(Ue=k?.[b])!=null?Ue:0,Xe=Ae?ze:ee-T[Oe]-S[Oe]-Ye+R.altAxis,Fe=Ae?ee+T[Oe]+S[Oe]-Ye-R.altAxis:Ie,Ge=v&&Ae?ir(Xe,ee,Fe):de(v?Xe:ze,ee,v?Fe:Ie);E[b]=Ge,$[b]=Ge-ee}t.modifiersData[o]=$}}var $r={name:"preventOverflow",enabled:!0,phase:"main",fn:Wr,requiresIfExists:["offset"]};function jr(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Br(e){return e===P(e)||!_(e)?Me(e):jr(e)}function Pr(e){var t=e.getBoundingClientRect(),r=ae(t.width)/e.offsetWidth||1,o=ae(t.height)/e.offsetHeight||1;return r!==1||o!==1}function Mr(e,t,r){r===void 0&&(r=!1);var o=_(t),n=_(t)&&Pr(t),s=K(t),l=se(e,n,r),u={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(o||!o&&!r)&&((I(t)!=="body"||He(s))&&(u=Br(t)),_(t)?(a=se(t,!0),a.x+=t.clientLeft,a.y+=t.clientTop):s&&(a.x=_e(s))),{x:l.left+u.scrollLeft-a.x,y:l.top+u.scrollTop-a.y,width:l.width,height:l.height}}function _r(e){var t=new Map,r=new Set,o=[];e.forEach(function(s){t.set(s.name,s)});function n(s){r.add(s.name);var l=[].concat(s.requires||[],s.requiresIfExists||[]);l.forEach(function(u){if(!r.has(u)){var a=t.get(u);a&&n(a)}}),o.push(s)}return e.forEach(function(s){r.has(s.name)||n(s)}),o}function Hr(e){var t=_r(e);return er.reduce(function(r,o){return r.concat(t.filter(function(n){return n.phase===o}))},[])}function Nr(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function Vr(e){var t=e.reduce(function(r,o){var n=r[o.name];return r[o.name]=n?Object.assign({},n,o,{options:Object.assign({},n.options,o.options),data:Object.assign({},n.data,o.data)}):o,r},{});return Object.keys(t).map(function(r){return t[r]})}var it={placement:"bottom",modifiers:[],strategy:"absolute"};function at(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(o){return!(o&&typeof o.getBoundingClientRect=="function")})}function Ne(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,o=r===void 0?[]:r,n=t.defaultOptions,s=n===void 0?it:n;return function(l,u,a){a===void 0&&(a=s);var i={placement:"bottom",orderedModifiers:[],options:Object.assign({},it,s),modifiersData:{},elements:{reference:l,popper:u},attributes:{},styles:{}},f=[],p=!1,c={state:i,setOptions:function(d){var x=typeof d=="function"?d(i.options):d;g(),i.options=Object.assign({},s,i.options,x),i.scrollParents={reference:ne(l)?ve(l):l.contextElement?ve(l.contextElement):[],popper:ve(u)};var O=Hr(Vr([].concat(o,i.options.modifiers)));return i.orderedModifiers=O.filter(function(L){return L.enabled}),v(),c.update()},forceUpdate:function(){if(!p){var d=i.elements,x=d.reference,O=d.popper;if(at(x,O)){i.rects={reference:Mr(x,be(O),i.options.strategy==="fixed"),popper:Be(O)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach(function(S){return i.modifiersData[S.name]=Object.assign({},S.data)});for(var L=0;L<i.orderedModifiers.length;L++){if(i.reset===!0){i.reset=!1,L=-1;continue}var A=i.orderedModifiers[L],m=A.fn,b=A.options,E=b===void 0?{}:b,T=A.name;typeof m=="function"&&(i=m({state:i,options:E,name:T,instance:c})||i)}}}},update:Nr(function(){return new Promise(function(d){c.forceUpdate(),d(i)})}),destroy:function(){g(),p=!0}};if(!at(l,u))return c;c.setOptions(a).then(function(d){!p&&a.onFirstUpdate&&a.onFirstUpdate(d)});function v(){i.orderedModifiers.forEach(function(d){var x=d.name,O=d.options,L=O===void 0?{}:O,A=d.effect;if(typeof A=="function"){var m=A({state:i,name:x,instance:c,options:L}),b=function(){};f.push(m||b)}})}function g(){f.forEach(function(d){return d()}),f=[]}return c}}Ne();var qr=[wt,Et,bt,dt];Ne({defaultModifiers:qr});var Ur=[wt,Et,bt,dt,Ar,Sr,$r,fr,Rr],zr=Ne({defaultModifiers:Ur}),Ir=We(Ht()),Yr=[],Xr=function(e,t,r){r===void 0&&(r={});var o=y.useRef(null),n={onFirstUpdate:r.onFirstUpdate,placement:r.placement||"bottom",strategy:r.strategy||"absolute",modifiers:r.modifiers||Yr},s=y.useState({styles:{popper:{position:n.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),l=s[0],u=s[1],a=y.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(p){var c=p.state,v=Object.keys(c.elements);Mt.flushSync(function(){u({styles:Ke(v.map(function(g){return[g,c.styles[g]||{}]})),attributes:Ke(v.map(function(g){return[g,c.attributes[g]]}))})})},requires:["computeStyles"]}},[]),i=y.useMemo(function(){var p={onFirstUpdate:n.onFirstUpdate,placement:n.placement,strategy:n.strategy,modifiers:[].concat(n.modifiers,[a,{name:"applyStyles",enabled:!1}])};return(0,Ir.default)(o.current,p)?o.current||p:(o.current=p,p)},[n.onFirstUpdate,n.placement,n.strategy,n.modifiers,a]),f=y.useRef();return Je(function(){f.current&&f.current.setOptions(i)},[i]),Je(function(){if(!(e==null||t==null)){var p=r.createPopper||zr,c=p(e,t,i);return f.current=c,function(){c.destroy(),f.current=null}}},[e,t,r.createPopper]),{state:f.current?f.current.state:null,styles:l.styles,attributes:l.attributes,update:f.current?f.current.update:null,forceUpdate:f.current?f.current.forceUpdate:null}};We(Nt());function St(e){var t=y.useRef(e);return t.current=e,y.useCallback(function(){return t.current},[])}var Fr=function(){};function Gr(e){var t=e.initial,r=e.value,o=e.onChange,n=o===void 0?Fr:o;if(t===void 0&&r===void 0)throw new TypeError('Either "value" or "initial" variable must be set. Now both are undefined');var s=y.useState(t),l=s[0],u=s[1],a=St(l),i=y.useCallback(function(p){var c=a(),v=typeof p=="function"?p(c):p;typeof v.persist=="function"&&v.persist(),u(v),typeof n=="function"&&n(v)},[a,n]),f=r!==void 0;return[f?r:l,f?n:i]}function Tt(e,t){return e===void 0&&(e=0),t===void 0&&(t=0),function(){return{width:0,height:0,top:t,right:e,bottom:t,left:e,x:0,y:0,toJSON:function(){return null}}}}var Kr=["styles","attributes"],st={getBoundingClientRect:Tt()},ut={closeOnOutsideClick:!0,closeOnTriggerHidden:!1,defaultVisible:!1,delayHide:0,delayShow:0,followCursor:!1,interactive:!1,mutationObserverOptions:{attributes:!0,childList:!0,subtree:!0},offset:[0,6],trigger:"hover"};function Jr(e,t){var r,o,n;e===void 0&&(e={}),t===void 0&&(t={});var s=Object.keys(ut).reduce(function(h,C){var D;return te({},h,(D={},D[C]=h[C]!==void 0?h[C]:ut[C],D))},e),l=y.useMemo(function(){return[{name:"offset",options:{offset:s.offset}}]},Array.isArray(s.offset)?s.offset:[]),u=te({},t,{placement:t.placement||s.placement,modifiers:t.modifiers||l}),a=y.useState(null),i=a[0],f=a[1],p=y.useState(null),c=p[0],v=p[1],g=Gr({initial:s.defaultVisible,value:s.visible,onChange:s.onVisibleChange}),d=g[0],x=g[1],O=y.useRef();y.useEffect(function(){return function(){return clearTimeout(O.current)}},[]);var L=Xr(s.followCursor?st:i,c,u),A=L.styles,m=L.attributes,b=Pt(L,Kr),E=b.update,T=St({visible:d,triggerRef:i,tooltipRef:c,finalConfig:s}),S=y.useCallback(function(h){return Array.isArray(s.trigger)?s.trigger.includes(h):s.trigger===h},Array.isArray(s.trigger)?s.trigger:[s.trigger]),w=y.useCallback(function(){clearTimeout(O.current),O.current=window.setTimeout(function(){return x(!1)},s.delayHide)},[s.delayHide,x]),R=y.useCallback(function(){clearTimeout(O.current),O.current=window.setTimeout(function(){return x(!0)},s.delayShow)},[s.delayShow,x]),k=y.useCallback(function(){T().visible?w():R()},[T,w,R]);y.useEffect(function(){if(T().finalConfig.closeOnOutsideClick){var h=function(C){var D,Y=T(),q=Y.tooltipRef,J=Y.triggerRef,Q=(C.composedPath==null||(D=C.composedPath())==null?void 0:D[0])||C.target;Q instanceof Node&&q!=null&&J!=null&&!q.contains(Q)&&!J.contains(Q)&&w()};return document.addEventListener("mousedown",h),function(){return document.removeEventListener("mousedown",h)}}},[T,w]),y.useEffect(function(){if(!(i==null||!S("click")))return i.addEventListener("click",k),function(){return i.removeEventListener("click",k)}},[i,S,k]),y.useEffect(function(){if(!(i==null||!S("double-click")))return i.addEventListener("dblclick",k),function(){return i.removeEventListener("dblclick",k)}},[i,S,k]),y.useEffect(function(){if(!(i==null||!S("right-click"))){var h=function(C){C.preventDefault(),k()};return i.addEventListener("contextmenu",h),function(){return i.removeEventListener("contextmenu",h)}}},[i,S,k]),y.useEffect(function(){if(!(i==null||!S("focus")))return i.addEventListener("focus",R),i.addEventListener("blur",w),function(){i.removeEventListener("focus",R),i.removeEventListener("blur",w)}},[i,S,R,w]),y.useEffect(function(){if(!(i==null||!S("hover")))return i.addEventListener("mouseenter",R),i.addEventListener("mouseleave",w),function(){i.removeEventListener("mouseenter",R),i.removeEventListener("mouseleave",w)}},[i,S,R,w]),y.useEffect(function(){if(!(c==null||!S("hover")||!T().finalConfig.interactive))return c.addEventListener("mouseenter",R),c.addEventListener("mouseleave",w),function(){c.removeEventListener("mouseenter",R),c.removeEventListener("mouseleave",w)}},[c,S,R,w,T]);var $=b==null||(r=b.state)==null||(o=r.modifiersData)==null||(n=o.hide)==null?void 0:n.isReferenceHidden;y.useEffect(function(){s.closeOnTriggerHidden&&$&&w()},[s.closeOnTriggerHidden,w,$]),y.useEffect(function(){if(!s.followCursor||i==null)return;function h(C){var D=C.clientX,Y=C.clientY;st.getBoundingClientRect=Tt(D,Y),E?.()}return i.addEventListener("mousemove",h),function(){return i.removeEventListener("mousemove",h)}},[s.followCursor,i,E]),y.useEffect(function(){if(!(c==null||E==null||s.mutationObserverOptions==null)){var h=new MutationObserver(E);return h.observe(c,s.mutationObserverOptions),function(){return h.disconnect()}}},[s.mutationObserverOptions,c,E]);var W=function(h){return h===void 0&&(h={}),te({},h,{style:te({},h.style,A.popper)},m.popper,{"data-popper-interactive":s.interactive})},V=function(h){return h===void 0&&(h={}),te({},h,m.arrow,{style:te({},h.style,A.arrow),"data-popper-arrow":!0})};return te({getArrowProps:V,getTooltipProps:W,setTooltipRef:v,setTriggerRef:f,tooltipRef:c,triggerRef:i,visible:d},b)}var{document:me}=qt,M=(0,Vt.default)(1e3)((e,t,r,o=0)=>t.split("-")[0]===e?r:o),G=8,Qr=Re.div({position:"absolute",borderStyle:"solid"},({placement:e})=>{let t=0,r=0;switch(!0){case(e.startsWith("left")||e.startsWith("right")):{r=8;break}case(e.startsWith("top")||e.startsWith("bottom")):{t=8;break}}return{transform:`translate3d(${t}px, ${r}px, 0px)`}},({theme:e,color:t,placement:r})=>({bottom:`${M("top",r,`${G*-1}px`,"auto")}`,top:`${M("bottom",r,`${G*-1}px`,"auto")}`,right:`${M("left",r,`${G*-1}px`,"auto")}`,left:`${M("right",r,`${G*-1}px`,"auto")}`,borderBottomWidth:`${M("top",r,"0",G)}px`,borderTopWidth:`${M("bottom",r,"0",G)}px`,borderRightWidth:`${M("left",r,"0",G)}px`,borderLeftWidth:`${M("right",r,"0",G)}px`,borderTopColor:M("top",r,e.color[t]||t||e.base==="light"?pe(e.background.app):e.background.app,"transparent"),borderBottomColor:M("bottom",r,e.color[t]||t||e.base==="light"?pe(e.background.app):e.background.app,"transparent"),borderLeftColor:M("left",r,e.color[t]||t||e.base==="light"?pe(e.background.app):e.background.app,"transparent"),borderRightColor:M("right",r,e.color[t]||t||e.base==="light"?pe(e.background.app):e.background.app,"transparent")})),Zr=Re.div(({hidden:e})=>({display:e?"none":"inline-block",zIndex:2147483647,colorScheme:"light dark"}),({theme:e,color:t,hasChrome:r})=>r?{background:t&&e.color[t]||t||e.base==="light"?pe(e.background.app):e.background.app,filter:`
|
|
1
|
+
import{R as Bt,_ as Pt,d as Mt}from"./blocks-DHnzPh43.js";import{R as U,S as Re,r as y,a1 as pe,M as We,T as _t,a3 as te,_ as ft}from"./iframe-DlBK9Drk.js";import"./preload-helper-PPVm8Dsz.js";var Ht=ft({"../../node_modules/react-fast-compare/index.js"(e,t){var r=typeof Element<"u",o=typeof Map=="function",n=typeof Set=="function",s=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function l(u,a){if(u===a)return!0;if(u&&a&&typeof u=="object"&&typeof a=="object"){if(u.constructor!==a.constructor)return!1;var i,f,p;if(Array.isArray(u)){if(i=u.length,i!=a.length)return!1;for(f=i;f--!==0;)if(!l(u[f],a[f]))return!1;return!0}var c;if(o&&u instanceof Map&&a instanceof Map){if(u.size!==a.size)return!1;for(c=u.entries();!(f=c.next()).done;)if(!a.has(f.value[0]))return!1;for(c=u.entries();!(f=c.next()).done;)if(!l(f.value[1],a.get(f.value[0])))return!1;return!0}if(n&&u instanceof Set&&a instanceof Set){if(u.size!==a.size)return!1;for(c=u.entries();!(f=c.next()).done;)if(!a.has(f.value[0]))return!1;return!0}if(s&&ArrayBuffer.isView(u)&&ArrayBuffer.isView(a)){if(i=u.length,i!=a.length)return!1;for(f=i;f--!==0;)if(u[f]!==a[f])return!1;return!0}if(u.constructor===RegExp)return u.source===a.source&&u.flags===a.flags;if(u.valueOf!==Object.prototype.valueOf&&typeof u.valueOf=="function"&&typeof a.valueOf=="function")return u.valueOf()===a.valueOf();if(u.toString!==Object.prototype.toString&&typeof u.toString=="function"&&typeof a.toString=="function")return u.toString()===a.toString();if(p=Object.keys(u),i=p.length,i!==Object.keys(a).length)return!1;for(f=i;f--!==0;)if(!Object.prototype.hasOwnProperty.call(a,p[f]))return!1;if(r&&u instanceof Element)return!1;for(f=i;f--!==0;)if(!((p[f]==="_owner"||p[f]==="__v"||p[f]==="__o")&&u.$$typeof)&&!l(u[p[f]],a[p[f]]))return!1;return!0}return u!==u&&a!==a}t.exports=function(u,a){try{return l(u,a)}catch(i){if((i.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw i}}}}),Nt=ft({"../../node_modules/warning/warning.js"(e,t){var r=function(){};t.exports=r}}),Vt=We(_t(),1);const{deprecate:lt}=__STORYBOOK_MODULE_CLIENT_LOGGER__,{global:qt}=__STORYBOOK_MODULE_GLOBAL__;y.createContext();y.createContext();var Ke=function(e){return e.reduce(function(t,r){var o=r[0],n=r[1];return t[o]=n,t},{})},Je=typeof window<"u"&&window.document&&window.document.createElement?y.useLayoutEffect:y.useEffect,j="top",H="bottom",N="right",B="left",$e="auto",ye=[j,H,N,B],ie="start",ge="end",Ut="clippingParents",ct="viewport",ce="popper",zt="reference",Qe=ye.reduce(function(e,t){return e.concat([t+"-"+ie,t+"-"+ge])},[]),pt=[].concat(ye,[$e]).reduce(function(e,t){return e.concat([t,t+"-"+ie,t+"-"+ge])},[]),It="beforeRead",Yt="read",Xt="afterRead",Ft="beforeMain",Gt="main",Kt="afterMain",Jt="beforeWrite",Qt="write",Zt="afterWrite",er=[It,Yt,Xt,Ft,Gt,Kt,Jt,Qt,Zt];function I(e){return e?(e.nodeName||"").toLowerCase():null}function P(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ne(e){var t=P(e).Element;return e instanceof t||e instanceof Element}function _(e){var t=P(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function je(e){if(typeof ShadowRoot>"u")return!1;var t=P(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function tr(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var o=t.styles[r]||{},n=t.attributes[r]||{},s=t.elements[r];!_(s)||!I(s)||(Object.assign(s.style,o),Object.keys(n).forEach(function(l){var u=n[l];u===!1?s.removeAttribute(l):s.setAttribute(l,u===!0?"":u)}))})}function rr(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(o){var n=t.elements[o],s=t.attributes[o]||{},l=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:r[o]),u=l.reduce(function(a,i){return a[i]="",a},{});!_(n)||!I(n)||(Object.assign(n.style,u),Object.keys(s).forEach(function(a){n.removeAttribute(a)}))})}}var dt={name:"applyStyles",enabled:!0,phase:"write",fn:tr,effect:rr,requires:["computeStyles"]};function z(e){return e.split("-")[0]}var re=Math.max,Te=Math.min,ae=Math.round;function ke(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function vt(){return!/^((?!chrome|android).)*safari/i.test(ke())}function se(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var o=e.getBoundingClientRect(),n=1,s=1;t&&_(e)&&(n=e.offsetWidth>0&&ae(o.width)/e.offsetWidth||1,s=e.offsetHeight>0&&ae(o.height)/e.offsetHeight||1);var l=ne(e)?P(e):window,u=l.visualViewport,a=!vt()&&r,i=(o.left+(a&&u?u.offsetLeft:0))/n,f=(o.top+(a&&u?u.offsetTop:0))/s,p=o.width/n,c=o.height/s;return{width:p,height:c,top:f,right:i+p,bottom:f+c,left:i,x:i,y:f}}function Be(e){var t=se(e),r=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:o}}function mt(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&je(r)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function F(e){return P(e).getComputedStyle(e)}function nr(e){return["table","td","th"].indexOf(I(e))>=0}function K(e){return((ne(e)?e.ownerDocument:e.document)||window.document).documentElement}function Le(e){return I(e)==="html"?e:e.assignedSlot||e.parentNode||(je(e)?e.host:null)||K(e)}function Ze(e){return!_(e)||F(e).position==="fixed"?null:e.offsetParent}function or(e){var t=/firefox/i.test(ke()),r=/Trident/i.test(ke());if(r&&_(e)){var o=F(e);if(o.position==="fixed")return null}var n=Le(e);for(je(n)&&(n=n.host);_(n)&&["html","body"].indexOf(I(n))<0;){var s=F(n);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return n;n=n.parentNode}return null}function be(e){for(var t=P(e),r=Ze(e);r&&nr(r)&&F(r).position==="static";)r=Ze(r);return r&&(I(r)==="html"||I(r)==="body"&&F(r).position==="static")?t:r||or(e)||t}function Pe(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function de(e,t,r){return re(e,Te(t,r))}function ir(e,t,r){var o=de(e,t,r);return o>r?r:o}function gt(){return{top:0,right:0,bottom:0,left:0}}function ht(e){return Object.assign({},gt(),e)}function yt(e,t){return t.reduce(function(r,o){return r[o]=e,r},{})}var ar=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,ht(typeof e!="number"?e:yt(e,ye))};function sr(e){var t,r=e.state,o=e.name,n=e.options,s=r.elements.arrow,l=r.modifiersData.popperOffsets,u=z(r.placement),a=Pe(u),i=[B,N].indexOf(u)>=0,f=i?"height":"width";if(!(!s||!l)){var p=ar(n.padding,r),c=Be(s),v=a==="y"?j:B,g=a==="y"?H:N,d=r.rects.reference[f]+r.rects.reference[a]-l[a]-r.rects.popper[f],x=l[a]-r.rects.reference[a],O=be(s),L=O?a==="y"?O.clientHeight||0:O.clientWidth||0:0,A=d/2-x/2,m=p[v],b=L-c[f]-p[g],E=L/2-c[f]/2+A,T=de(m,E,b),S=a;r.modifiersData[o]=(t={},t[S]=T,t.centerOffset=T-E,t)}}function ur(e){var t=e.state,r=e.options,o=r.element,n=o===void 0?"[data-popper-arrow]":o;n!=null&&(typeof n=="string"&&(n=t.elements.popper.querySelector(n),!n)||mt(t.elements.popper,n)&&(t.elements.arrow=n))}var fr={name:"arrow",enabled:!0,phase:"main",fn:sr,effect:ur,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ue(e){return e.split("-")[1]}var lr={top:"auto",right:"auto",bottom:"auto",left:"auto"};function cr(e,t){var r=e.x,o=e.y,n=t.devicePixelRatio||1;return{x:ae(r*n)/n||0,y:ae(o*n)/n||0}}function et(e){var t,r=e.popper,o=e.popperRect,n=e.placement,s=e.variation,l=e.offsets,u=e.position,a=e.gpuAcceleration,i=e.adaptive,f=e.roundOffsets,p=e.isFixed,c=l.x,v=c===void 0?0:c,g=l.y,d=g===void 0?0:g,x=typeof f=="function"?f({x:v,y:d}):{x:v,y:d};v=x.x,d=x.y;var O=l.hasOwnProperty("x"),L=l.hasOwnProperty("y"),A=B,m=j,b=window;if(i){var E=be(r),T="clientHeight",S="clientWidth";if(E===P(r)&&(E=K(r),F(E).position!=="static"&&u==="absolute"&&(T="scrollHeight",S="scrollWidth")),E=E,n===j||(n===B||n===N)&&s===ge){m=H;var w=p&&E===b&&b.visualViewport?b.visualViewport.height:E[T];d-=w-o.height,d*=a?1:-1}if(n===B||(n===j||n===H)&&s===ge){A=N;var R=p&&E===b&&b.visualViewport?b.visualViewport.width:E[S];v-=R-o.width,v*=a?1:-1}}var k=Object.assign({position:u},i&&lr),$=f===!0?cr({x:v,y:d},P(r)):{x:v,y:d};if(v=$.x,d=$.y,a){var W;return Object.assign({},k,(W={},W[m]=L?"0":"",W[A]=O?"0":"",W.transform=(b.devicePixelRatio||1)<=1?"translate("+v+"px, "+d+"px)":"translate3d("+v+"px, "+d+"px, 0)",W))}return Object.assign({},k,(t={},t[m]=L?d+"px":"",t[A]=O?v+"px":"",t.transform="",t))}function pr(e){var t=e.state,r=e.options,o=r.gpuAcceleration,n=o===void 0?!0:o,s=r.adaptive,l=s===void 0?!0:s,u=r.roundOffsets,a=u===void 0?!0:u,i={placement:z(t.placement),variation:ue(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:n,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,et(Object.assign({},i,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:l,roundOffsets:a})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,et(Object.assign({},i,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var bt={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:pr,data:{}},Ee={passive:!0};function dr(e){var t=e.state,r=e.instance,o=e.options,n=o.scroll,s=n===void 0?!0:n,l=o.resize,u=l===void 0?!0:l,a=P(t.elements.popper),i=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&i.forEach(function(f){f.addEventListener("scroll",r.update,Ee)}),u&&a.addEventListener("resize",r.update,Ee),function(){s&&i.forEach(function(f){f.removeEventListener("scroll",r.update,Ee)}),u&&a.removeEventListener("resize",r.update,Ee)}}var wt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:dr,data:{}},vr={left:"right",right:"left",bottom:"top",top:"bottom"};function Se(e){return e.replace(/left|right|bottom|top/g,function(t){return vr[t]})}var mr={start:"end",end:"start"};function tt(e){return e.replace(/start|end/g,function(t){return mr[t]})}function Me(e){var t=P(e),r=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:r,scrollTop:o}}function _e(e){return se(K(e)).left+Me(e).scrollLeft}function gr(e,t){var r=P(e),o=K(e),n=r.visualViewport,s=o.clientWidth,l=o.clientHeight,u=0,a=0;if(n){s=n.width,l=n.height;var i=vt();(i||!i&&t==="fixed")&&(u=n.offsetLeft,a=n.offsetTop)}return{width:s,height:l,x:u+_e(e),y:a}}function hr(e){var t,r=K(e),o=Me(e),n=(t=e.ownerDocument)==null?void 0:t.body,s=re(r.scrollWidth,r.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),l=re(r.scrollHeight,r.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),u=-o.scrollLeft+_e(e),a=-o.scrollTop;return F(n||r).direction==="rtl"&&(u+=re(r.clientWidth,n?n.clientWidth:0)-s),{width:s,height:l,x:u,y:a}}function He(e){var t=F(e),r=t.overflow,o=t.overflowX,n=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+n+o)}function xt(e){return["html","body","#document"].indexOf(I(e))>=0?e.ownerDocument.body:_(e)&&He(e)?e:xt(Le(e))}function ve(e,t){var r;t===void 0&&(t=[]);var o=xt(e),n=o===((r=e.ownerDocument)==null?void 0:r.body),s=P(o),l=n?[s].concat(s.visualViewport||[],He(o)?o:[]):o,u=t.concat(l);return n?u:u.concat(ve(Le(l)))}function De(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function yr(e,t){var r=se(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function rt(e,t,r){return t===ct?De(gr(e,r)):ne(t)?yr(t,r):De(hr(K(e)))}function br(e){var t=ve(Le(e)),r=["absolute","fixed"].indexOf(F(e).position)>=0,o=r&&_(e)?be(e):e;return ne(o)?t.filter(function(n){return ne(n)&&mt(n,o)&&I(n)!=="body"}):[]}function wr(e,t,r,o){var n=t==="clippingParents"?br(e):[].concat(t),s=[].concat(n,[r]),l=s[0],u=s.reduce(function(a,i){var f=rt(e,i,o);return a.top=re(f.top,a.top),a.right=Te(f.right,a.right),a.bottom=Te(f.bottom,a.bottom),a.left=re(f.left,a.left),a},rt(e,l,o));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function Ot(e){var t=e.reference,r=e.element,o=e.placement,n=o?z(o):null,s=o?ue(o):null,l=t.x+t.width/2-r.width/2,u=t.y+t.height/2-r.height/2,a;switch(n){case j:a={x:l,y:t.y-r.height};break;case H:a={x:l,y:t.y+t.height};break;case N:a={x:t.x+t.width,y:u};break;case B:a={x:t.x-r.width,y:u};break;default:a={x:t.x,y:t.y}}var i=n?Pe(n):null;if(i!=null){var f=i==="y"?"height":"width";switch(s){case ie:a[i]=a[i]-(t[f]/2-r[f]/2);break;case ge:a[i]=a[i]+(t[f]/2-r[f]/2);break}}return a}function he(e,t){t===void 0&&(t={});var r=t,o=r.placement,n=o===void 0?e.placement:o,s=r.strategy,l=s===void 0?e.strategy:s,u=r.boundary,a=u===void 0?Ut:u,i=r.rootBoundary,f=i===void 0?ct:i,p=r.elementContext,c=p===void 0?ce:p,v=r.altBoundary,g=v===void 0?!1:v,d=r.padding,x=d===void 0?0:d,O=ht(typeof x!="number"?x:yt(x,ye)),L=c===ce?zt:ce,A=e.rects.popper,m=e.elements[g?L:c],b=wr(ne(m)?m:m.contextElement||K(e.elements.popper),a,f,l),E=se(e.elements.reference),T=Ot({reference:E,element:A,placement:n}),S=De(Object.assign({},A,T)),w=c===ce?S:E,R={top:b.top-w.top+O.top,bottom:w.bottom-b.bottom+O.bottom,left:b.left-w.left+O.left,right:w.right-b.right+O.right},k=e.modifiersData.offset;if(c===ce&&k){var $=k[n];Object.keys(R).forEach(function(W){var V=[N,H].indexOf(W)>=0?1:-1,h=[j,H].indexOf(W)>=0?"y":"x";R[W]+=$[h]*V})}return R}function xr(e,t){t===void 0&&(t={});var r=t,o=r.placement,n=r.boundary,s=r.rootBoundary,l=r.padding,u=r.flipVariations,a=r.allowedAutoPlacements,i=a===void 0?pt:a,f=ue(o),p=f?u?Qe:Qe.filter(function(g){return ue(g)===f}):ye,c=p.filter(function(g){return i.indexOf(g)>=0});c.length===0&&(c=p);var v=c.reduce(function(g,d){return g[d]=he(e,{placement:d,boundary:n,rootBoundary:s,padding:l})[z(d)],g},{});return Object.keys(v).sort(function(g,d){return v[g]-v[d]})}function Or(e){if(z(e)===$e)return[];var t=Se(e);return[tt(e),t,tt(t)]}function Er(e){var t=e.state,r=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var n=r.mainAxis,s=n===void 0?!0:n,l=r.altAxis,u=l===void 0?!0:l,a=r.fallbackPlacements,i=r.padding,f=r.boundary,p=r.rootBoundary,c=r.altBoundary,v=r.flipVariations,g=v===void 0?!0:v,d=r.allowedAutoPlacements,x=t.options.placement,O=z(x),L=O===x,A=a||(L||!g?[Se(x)]:Or(x)),m=[x].concat(A).reduce(function(Z,X){return Z.concat(z(X)===$e?xr(t,{placement:X,boundary:f,rootBoundary:p,padding:i,flipVariations:g,allowedAutoPlacements:d}):X)},[]),b=t.rects.reference,E=t.rects.popper,T=new Map,S=!0,w=m[0],R=0;R<m.length;R++){var k=m[R],$=z(k),W=ue(k)===ie,V=[j,H].indexOf($)>=0,h=V?"width":"height",C=he(t,{placement:k,boundary:f,rootBoundary:p,altBoundary:c,padding:i}),D=V?W?N:B:W?H:j;b[h]>E[h]&&(D=Se(D));var Y=Se(D),q=[];if(s&&q.push(C[$]<=0),u&&q.push(C[D]<=0,C[Y]<=0),q.every(function(Z){return Z})){w=k,S=!1;break}T.set(k,q)}if(S)for(var J=g?3:1,Q=function(Z){var X=m.find(function(xe){var le=T.get(xe);if(le)return le.slice(0,Z).every(function(oe){return oe})});if(X)return w=X,"break"},fe=J;fe>0;fe--){var we=Q(fe);if(we==="break")break}t.placement!==w&&(t.modifiersData[o]._skip=!0,t.placement=w,t.reset=!0)}}var Sr={name:"flip",enabled:!0,phase:"main",fn:Er,requiresIfExists:["offset"],data:{_skip:!1}};function nt(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function ot(e){return[j,N,H,B].some(function(t){return e[t]>=0})}function Tr(e){var t=e.state,r=e.name,o=t.rects.reference,n=t.rects.popper,s=t.modifiersData.preventOverflow,l=he(t,{elementContext:"reference"}),u=he(t,{altBoundary:!0}),a=nt(l,o),i=nt(u,n,s),f=ot(a),p=ot(i);t.modifiersData[r]={referenceClippingOffsets:a,popperEscapeOffsets:i,isReferenceHidden:f,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":p})}var Rr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Tr};function Lr(e,t,r){var o=z(e),n=[B,j].indexOf(o)>=0?-1:1,s=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,l=s[0],u=s[1];return l=l||0,u=(u||0)*n,[B,N].indexOf(o)>=0?{x:u,y:l}:{x:l,y:u}}function Cr(e){var t=e.state,r=e.options,o=e.name,n=r.offset,s=n===void 0?[0,0]:n,l=pt.reduce(function(f,p){return f[p]=Lr(p,t.rects,s),f},{}),u=l[t.placement],a=u.x,i=u.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=a,t.modifiersData.popperOffsets.y+=i),t.modifiersData[o]=l}var Ar={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Cr};function kr(e){var t=e.state,r=e.name;t.modifiersData[r]=Ot({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}var Et={name:"popperOffsets",enabled:!0,phase:"read",fn:kr,data:{}};function Dr(e){return e==="x"?"y":"x"}function Wr(e){var t=e.state,r=e.options,o=e.name,n=r.mainAxis,s=n===void 0?!0:n,l=r.altAxis,u=l===void 0?!1:l,a=r.boundary,i=r.rootBoundary,f=r.altBoundary,p=r.padding,c=r.tether,v=c===void 0?!0:c,g=r.tetherOffset,d=g===void 0?0:g,x=he(t,{boundary:a,rootBoundary:i,padding:p,altBoundary:f}),O=z(t.placement),L=ue(t.placement),A=!L,m=Pe(O),b=Dr(m),E=t.modifiersData.popperOffsets,T=t.rects.reference,S=t.rects.popper,w=typeof d=="function"?d(Object.assign({},t.rects,{placement:t.placement})):d,R=typeof w=="number"?{mainAxis:w,altAxis:w}:Object.assign({mainAxis:0,altAxis:0},w),k=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,$={x:0,y:0};if(E){if(s){var W,V=m==="y"?j:B,h=m==="y"?H:N,C=m==="y"?"height":"width",D=E[m],Y=D+x[V],q=D-x[h],J=v?-S[C]/2:0,Q=L===ie?T[C]:S[C],fe=L===ie?-S[C]:-T[C],we=t.elements.arrow,Z=v&&we?Be(we):{width:0,height:0},X=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:gt(),xe=X[V],le=X[h],oe=de(0,T[C],Z[C]),Ct=A?T[C]/2-J-oe-xe-R.mainAxis:Q-oe-xe-R.mainAxis,At=A?-T[C]/2+J+oe+le+R.mainAxis:fe+oe+le+R.mainAxis,Ce=t.elements.arrow&&be(t.elements.arrow),kt=Ce?m==="y"?Ce.clientTop||0:Ce.clientLeft||0:0,Ve=(W=k?.[m])!=null?W:0,Dt=D+Ct-Ve-kt,Wt=D+At-Ve,qe=de(v?Te(Y,Dt):Y,D,v?re(q,Wt):q);E[m]=qe,$[m]=qe-D}if(u){var Ue,$t=m==="x"?j:B,jt=m==="x"?H:N,ee=E[b],Oe=b==="y"?"height":"width",ze=ee+x[$t],Ie=ee-x[jt],Ae=[j,B].indexOf(O)!==-1,Ye=(Ue=k?.[b])!=null?Ue:0,Xe=Ae?ze:ee-T[Oe]-S[Oe]-Ye+R.altAxis,Fe=Ae?ee+T[Oe]+S[Oe]-Ye-R.altAxis:Ie,Ge=v&&Ae?ir(Xe,ee,Fe):de(v?Xe:ze,ee,v?Fe:Ie);E[b]=Ge,$[b]=Ge-ee}t.modifiersData[o]=$}}var $r={name:"preventOverflow",enabled:!0,phase:"main",fn:Wr,requiresIfExists:["offset"]};function jr(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Br(e){return e===P(e)||!_(e)?Me(e):jr(e)}function Pr(e){var t=e.getBoundingClientRect(),r=ae(t.width)/e.offsetWidth||1,o=ae(t.height)/e.offsetHeight||1;return r!==1||o!==1}function Mr(e,t,r){r===void 0&&(r=!1);var o=_(t),n=_(t)&&Pr(t),s=K(t),l=se(e,n,r),u={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(o||!o&&!r)&&((I(t)!=="body"||He(s))&&(u=Br(t)),_(t)?(a=se(t,!0),a.x+=t.clientLeft,a.y+=t.clientTop):s&&(a.x=_e(s))),{x:l.left+u.scrollLeft-a.x,y:l.top+u.scrollTop-a.y,width:l.width,height:l.height}}function _r(e){var t=new Map,r=new Set,o=[];e.forEach(function(s){t.set(s.name,s)});function n(s){r.add(s.name);var l=[].concat(s.requires||[],s.requiresIfExists||[]);l.forEach(function(u){if(!r.has(u)){var a=t.get(u);a&&n(a)}}),o.push(s)}return e.forEach(function(s){r.has(s.name)||n(s)}),o}function Hr(e){var t=_r(e);return er.reduce(function(r,o){return r.concat(t.filter(function(n){return n.phase===o}))},[])}function Nr(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function Vr(e){var t=e.reduce(function(r,o){var n=r[o.name];return r[o.name]=n?Object.assign({},n,o,{options:Object.assign({},n.options,o.options),data:Object.assign({},n.data,o.data)}):o,r},{});return Object.keys(t).map(function(r){return t[r]})}var it={placement:"bottom",modifiers:[],strategy:"absolute"};function at(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(o){return!(o&&typeof o.getBoundingClientRect=="function")})}function Ne(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,o=r===void 0?[]:r,n=t.defaultOptions,s=n===void 0?it:n;return function(l,u,a){a===void 0&&(a=s);var i={placement:"bottom",orderedModifiers:[],options:Object.assign({},it,s),modifiersData:{},elements:{reference:l,popper:u},attributes:{},styles:{}},f=[],p=!1,c={state:i,setOptions:function(d){var x=typeof d=="function"?d(i.options):d;g(),i.options=Object.assign({},s,i.options,x),i.scrollParents={reference:ne(l)?ve(l):l.contextElement?ve(l.contextElement):[],popper:ve(u)};var O=Hr(Vr([].concat(o,i.options.modifiers)));return i.orderedModifiers=O.filter(function(L){return L.enabled}),v(),c.update()},forceUpdate:function(){if(!p){var d=i.elements,x=d.reference,O=d.popper;if(at(x,O)){i.rects={reference:Mr(x,be(O),i.options.strategy==="fixed"),popper:Be(O)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach(function(S){return i.modifiersData[S.name]=Object.assign({},S.data)});for(var L=0;L<i.orderedModifiers.length;L++){if(i.reset===!0){i.reset=!1,L=-1;continue}var A=i.orderedModifiers[L],m=A.fn,b=A.options,E=b===void 0?{}:b,T=A.name;typeof m=="function"&&(i=m({state:i,options:E,name:T,instance:c})||i)}}}},update:Nr(function(){return new Promise(function(d){c.forceUpdate(),d(i)})}),destroy:function(){g(),p=!0}};if(!at(l,u))return c;c.setOptions(a).then(function(d){!p&&a.onFirstUpdate&&a.onFirstUpdate(d)});function v(){i.orderedModifiers.forEach(function(d){var x=d.name,O=d.options,L=O===void 0?{}:O,A=d.effect;if(typeof A=="function"){var m=A({state:i,name:x,instance:c,options:L}),b=function(){};f.push(m||b)}})}function g(){f.forEach(function(d){return d()}),f=[]}return c}}Ne();var qr=[wt,Et,bt,dt];Ne({defaultModifiers:qr});var Ur=[wt,Et,bt,dt,Ar,Sr,$r,fr,Rr],zr=Ne({defaultModifiers:Ur}),Ir=We(Ht()),Yr=[],Xr=function(e,t,r){r===void 0&&(r={});var o=y.useRef(null),n={onFirstUpdate:r.onFirstUpdate,placement:r.placement||"bottom",strategy:r.strategy||"absolute",modifiers:r.modifiers||Yr},s=y.useState({styles:{popper:{position:n.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),l=s[0],u=s[1],a=y.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(p){var c=p.state,v=Object.keys(c.elements);Mt.flushSync(function(){u({styles:Ke(v.map(function(g){return[g,c.styles[g]||{}]})),attributes:Ke(v.map(function(g){return[g,c.attributes[g]]}))})})},requires:["computeStyles"]}},[]),i=y.useMemo(function(){var p={onFirstUpdate:n.onFirstUpdate,placement:n.placement,strategy:n.strategy,modifiers:[].concat(n.modifiers,[a,{name:"applyStyles",enabled:!1}])};return(0,Ir.default)(o.current,p)?o.current||p:(o.current=p,p)},[n.onFirstUpdate,n.placement,n.strategy,n.modifiers,a]),f=y.useRef();return Je(function(){f.current&&f.current.setOptions(i)},[i]),Je(function(){if(!(e==null||t==null)){var p=r.createPopper||zr,c=p(e,t,i);return f.current=c,function(){c.destroy(),f.current=null}}},[e,t,r.createPopper]),{state:f.current?f.current.state:null,styles:l.styles,attributes:l.attributes,update:f.current?f.current.update:null,forceUpdate:f.current?f.current.forceUpdate:null}};We(Nt());function St(e){var t=y.useRef(e);return t.current=e,y.useCallback(function(){return t.current},[])}var Fr=function(){};function Gr(e){var t=e.initial,r=e.value,o=e.onChange,n=o===void 0?Fr:o;if(t===void 0&&r===void 0)throw new TypeError('Either "value" or "initial" variable must be set. Now both are undefined');var s=y.useState(t),l=s[0],u=s[1],a=St(l),i=y.useCallback(function(p){var c=a(),v=typeof p=="function"?p(c):p;typeof v.persist=="function"&&v.persist(),u(v),typeof n=="function"&&n(v)},[a,n]),f=r!==void 0;return[f?r:l,f?n:i]}function Tt(e,t){return e===void 0&&(e=0),t===void 0&&(t=0),function(){return{width:0,height:0,top:t,right:e,bottom:t,left:e,x:0,y:0,toJSON:function(){return null}}}}var Kr=["styles","attributes"],st={getBoundingClientRect:Tt()},ut={closeOnOutsideClick:!0,closeOnTriggerHidden:!1,defaultVisible:!1,delayHide:0,delayShow:0,followCursor:!1,interactive:!1,mutationObserverOptions:{attributes:!0,childList:!0,subtree:!0},offset:[0,6],trigger:"hover"};function Jr(e,t){var r,o,n;e===void 0&&(e={}),t===void 0&&(t={});var s=Object.keys(ut).reduce(function(h,C){var D;return te({},h,(D={},D[C]=h[C]!==void 0?h[C]:ut[C],D))},e),l=y.useMemo(function(){return[{name:"offset",options:{offset:s.offset}}]},Array.isArray(s.offset)?s.offset:[]),u=te({},t,{placement:t.placement||s.placement,modifiers:t.modifiers||l}),a=y.useState(null),i=a[0],f=a[1],p=y.useState(null),c=p[0],v=p[1],g=Gr({initial:s.defaultVisible,value:s.visible,onChange:s.onVisibleChange}),d=g[0],x=g[1],O=y.useRef();y.useEffect(function(){return function(){return clearTimeout(O.current)}},[]);var L=Xr(s.followCursor?st:i,c,u),A=L.styles,m=L.attributes,b=Pt(L,Kr),E=b.update,T=St({visible:d,triggerRef:i,tooltipRef:c,finalConfig:s}),S=y.useCallback(function(h){return Array.isArray(s.trigger)?s.trigger.includes(h):s.trigger===h},Array.isArray(s.trigger)?s.trigger:[s.trigger]),w=y.useCallback(function(){clearTimeout(O.current),O.current=window.setTimeout(function(){return x(!1)},s.delayHide)},[s.delayHide,x]),R=y.useCallback(function(){clearTimeout(O.current),O.current=window.setTimeout(function(){return x(!0)},s.delayShow)},[s.delayShow,x]),k=y.useCallback(function(){T().visible?w():R()},[T,w,R]);y.useEffect(function(){if(T().finalConfig.closeOnOutsideClick){var h=function(C){var D,Y=T(),q=Y.tooltipRef,J=Y.triggerRef,Q=(C.composedPath==null||(D=C.composedPath())==null?void 0:D[0])||C.target;Q instanceof Node&&q!=null&&J!=null&&!q.contains(Q)&&!J.contains(Q)&&w()};return document.addEventListener("mousedown",h),function(){return document.removeEventListener("mousedown",h)}}},[T,w]),y.useEffect(function(){if(!(i==null||!S("click")))return i.addEventListener("click",k),function(){return i.removeEventListener("click",k)}},[i,S,k]),y.useEffect(function(){if(!(i==null||!S("double-click")))return i.addEventListener("dblclick",k),function(){return i.removeEventListener("dblclick",k)}},[i,S,k]),y.useEffect(function(){if(!(i==null||!S("right-click"))){var h=function(C){C.preventDefault(),k()};return i.addEventListener("contextmenu",h),function(){return i.removeEventListener("contextmenu",h)}}},[i,S,k]),y.useEffect(function(){if(!(i==null||!S("focus")))return i.addEventListener("focus",R),i.addEventListener("blur",w),function(){i.removeEventListener("focus",R),i.removeEventListener("blur",w)}},[i,S,R,w]),y.useEffect(function(){if(!(i==null||!S("hover")))return i.addEventListener("mouseenter",R),i.addEventListener("mouseleave",w),function(){i.removeEventListener("mouseenter",R),i.removeEventListener("mouseleave",w)}},[i,S,R,w]),y.useEffect(function(){if(!(c==null||!S("hover")||!T().finalConfig.interactive))return c.addEventListener("mouseenter",R),c.addEventListener("mouseleave",w),function(){c.removeEventListener("mouseenter",R),c.removeEventListener("mouseleave",w)}},[c,S,R,w,T]);var $=b==null||(r=b.state)==null||(o=r.modifiersData)==null||(n=o.hide)==null?void 0:n.isReferenceHidden;y.useEffect(function(){s.closeOnTriggerHidden&&$&&w()},[s.closeOnTriggerHidden,w,$]),y.useEffect(function(){if(!s.followCursor||i==null)return;function h(C){var D=C.clientX,Y=C.clientY;st.getBoundingClientRect=Tt(D,Y),E?.()}return i.addEventListener("mousemove",h),function(){return i.removeEventListener("mousemove",h)}},[s.followCursor,i,E]),y.useEffect(function(){if(!(c==null||E==null||s.mutationObserverOptions==null)){var h=new MutationObserver(E);return h.observe(c,s.mutationObserverOptions),function(){return h.disconnect()}}},[s.mutationObserverOptions,c,E]);var W=function(h){return h===void 0&&(h={}),te({},h,{style:te({},h.style,A.popper)},m.popper,{"data-popper-interactive":s.interactive})},V=function(h){return h===void 0&&(h={}),te({},h,m.arrow,{style:te({},h.style,A.arrow),"data-popper-arrow":!0})};return te({getArrowProps:V,getTooltipProps:W,setTooltipRef:v,setTriggerRef:f,tooltipRef:c,triggerRef:i,visible:d},b)}var{document:me}=qt,M=(0,Vt.default)(1e3)((e,t,r,o=0)=>t.split("-")[0]===e?r:o),G=8,Qr=Re.div({position:"absolute",borderStyle:"solid"},({placement:e})=>{let t=0,r=0;switch(!0){case(e.startsWith("left")||e.startsWith("right")):{r=8;break}case(e.startsWith("top")||e.startsWith("bottom")):{t=8;break}}return{transform:`translate3d(${t}px, ${r}px, 0px)`}},({theme:e,color:t,placement:r})=>({bottom:`${M("top",r,`${G*-1}px`,"auto")}`,top:`${M("bottom",r,`${G*-1}px`,"auto")}`,right:`${M("left",r,`${G*-1}px`,"auto")}`,left:`${M("right",r,`${G*-1}px`,"auto")}`,borderBottomWidth:`${M("top",r,"0",G)}px`,borderTopWidth:`${M("bottom",r,"0",G)}px`,borderRightWidth:`${M("left",r,"0",G)}px`,borderLeftWidth:`${M("right",r,"0",G)}px`,borderTopColor:M("top",r,e.color[t]||t||e.base==="light"?pe(e.background.app):e.background.app,"transparent"),borderBottomColor:M("bottom",r,e.color[t]||t||e.base==="light"?pe(e.background.app):e.background.app,"transparent"),borderLeftColor:M("left",r,e.color[t]||t||e.base==="light"?pe(e.background.app):e.background.app,"transparent"),borderRightColor:M("right",r,e.color[t]||t||e.base==="light"?pe(e.background.app):e.background.app,"transparent")})),Zr=Re.div(({hidden:e})=>({display:e?"none":"inline-block",zIndex:2147483647,colorScheme:"light dark"}),({theme:e,color:t,hasChrome:r})=>r?{background:t&&e.color[t]||t||e.base==="light"?pe(e.background.app):e.background.app,filter:`
|
|
2
2
|
drop-shadow(0px 5px 5px rgba(0,0,0,0.05))
|
|
3
3
|
drop-shadow(0 1px 3px rgba(0,0,0,0.1))
|
|
4
4
|
`,borderRadius:e.appBorderRadius+2,fontSize:e.typography.size.s1}:{}),Rt=U.forwardRef(({placement:e="top",hasChrome:t=!0,children:r,arrowProps:o={},tooltipRef:n,color:s,withArrows:l,...u},a)=>U.createElement(Zr,{"data-testid":"tooltip",hasChrome:t,ref:a,...u,color:s},t&&l&&U.createElement(Qr,{placement:e,...o,color:s}),r));Rt.displayName="Tooltip";var en=Re.div`
|