@vireo-ai/trellis-ui 0.1.55 → 0.1.56
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/README.md +1 -23
- package/package.json +3 -2
- package/packages/client/types/components/badge/contract.d.ts +1 -1
- package/packages/client/types/components/box/contract.d.ts +3 -3
- package/packages/client/types/components/button/contract.d.ts +1 -1
- package/packages/client/types/components/container/contract.d.ts +3 -3
- package/packages/client/types/components/date-picker/contract.d.ts +2 -2
- package/packages/client/types/components/date-picker/machine.d.ts +2 -2
- package/packages/client/types/components/flex/contract.d.ts +3 -3
- package/packages/client/types/components/frame/contract.d.ts +3 -3
- package/packages/client/types/components/grid/contract.d.ts +3 -3
- package/packages/client/types/components/input/contract.d.ts +2 -2
- package/packages/client/types/components/layout.d.ts +3 -3
- package/packages/client/types/components/modal/contract.d.ts +3 -2
- package/packages/client/types/components/modal/index.d.ts +1 -1
- package/packages/client/types/components/section/contract.d.ts +3 -3
- package/packages/client/types/components/select/contract.d.ts +1 -1
- package/packages/client/types/components/select/machine.d.ts +2 -2
- package/packages/client/types/components/stack/contract.d.ts +3 -3
- package/packages/client/types/components/table/contract.d.ts +1 -1
- package/packages/client/types/components/textarea/contract.d.ts +1 -1
- package/packages/client/types/runtime/focus-scope.d.ts +5 -6
- package/packages/client/types/runtime/focus.d.ts +9 -0
- package/packages/client/types/runtime/index.d.ts +2 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/build-metadata.json +341 -326
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/motion.js +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/shortcut.js +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/sortable.js +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{capability-motion-C3q5Xzv2.js → capability-motion-B7n3PcSH.js} +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{capability-motion-C3q5Xzv2.js.map → capability-motion-B7n3PcSH.js.map} +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-shortcut-DZUQHJ3A.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-shortcut-DZUQHJ3A.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-sortable-BgPVyFfh.js +5 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{capability-sortable-Bh6pkITu.js.map → capability-sortable-BgPVyFfh.js.map} +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/collection-navigation-hTbwy6oQ.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/collection-navigation-hTbwy6oQ.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{controller-crMEr9_l.js → controller-CalXJ5hB.js} +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{controller-crMEr9_l.js.map → controller-CalXJ5hB.js.map} +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{core-DOHj5fa1.js → core-CYvnO__o.js} +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{core-DOHj5fa1.js.map → core-CYvnO__o.js.map} +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/cursor-data-source-Do0FfF4Z.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/cursor-data-source-Do0FfF4Z.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-ollD3I52.js → entry.generated-B4lDxzh9.js} +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-ollD3I52.js.map → entry.generated-B4lDxzh9.js.map} +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-D8iA1e6i.js → entry.generated-BQNpmLZO.js} +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-D8iA1e6i.js.map → entry.generated-BQNpmLZO.js.map} +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BXvp4vUv.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BXvp4vUv.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BlsLkwW8.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BlsLkwW8.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-BeNK2EFl.js → entry.generated-CC-C5gQn.js} +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-BeNK2EFl.js.map → entry.generated-CC-C5gQn.js.map} +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CheA8dXD.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CheA8dXD.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-CvL196IN.js → entry.generated-CwuIK_Zx.js} +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-CvL196IN.js.map → entry.generated-CwuIK_Zx.js.map} +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-D-2vjhTV.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-D-2vjhTV.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DSWnCzSX.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DSWnCzSX.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DaC7gw-h.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DaC7gw-h.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-DVOBR4CK.js → entry.generated-DaXIKPN9.js} +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-DVOBR4CK.js.map → entry.generated-DaXIKPN9.js.map} +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-BmVGptdJ.js → entry.generated-Dfm1775-.js} +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-BmVGptdJ.js.map → entry.generated-Dfm1775-.js.map} +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DuY9bHje.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DuY9bHje.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-QFVPoffg.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-QFVPoffg.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-d1MxpnFh.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-d1MxpnFh.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-pfUkaGe1.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-pfUkaGe1.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-xjydizn-.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-xjydizn-.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{flip-XeJ05afl.js → flip-BGTjVnQy.js} +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{flip-XeJ05afl.js.map → flip-BGTjVnQy.js.map} +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/focus-pk_lz9sg.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/focus-pk_lz9sg.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/focus-scope-BrYxsrhc.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/focus-scope-BrYxsrhc.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{motion-CbwLBhMt.js → motion-fU4E5Q4w.js} +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{motion-CbwLBhMt.js.map → motion-fU4E5Q4w.js.map} +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/ui-B3f-Nt9P.js +4 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/ui-B3f-Nt9P.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/accordion.js +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/data-grid.js +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/date-picker.js +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/dropdown.js +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/formset.js +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/index.js +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/input.js +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/keybinding.js +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/modal.js +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/panels.js +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/radio.js +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/select.js +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/sidebar.js +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/slider.js +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/tabs.js +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/toast.js +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/tooltip.js +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/virtualizer.js +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/core.js +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/index.js +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/logical-entry-manifest.json +152 -138
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/trellis.js +11 -11
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/trellis.min.js +11 -11
- package/packages/client/types/runtime/focus-handoff.d.ts +0 -12
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-shortcut-BwvEqEbL.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-shortcut-BwvEqEbL.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-sortable-Bh6pkITu.js +0 -5
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/collection-navigation-BbxUBQFs.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/collection-navigation-BbxUBQFs.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/cursor-data-source-FA9FLGtB.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/cursor-data-source-FA9FLGtB.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-B41qiwNq.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-B41qiwNq.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-B7n4iFyw.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-B7n4iFyw.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Bq2KAnfO.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Bq2KAnfO.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-C3cRWutN.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-C3cRWutN.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CGasYxmV.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CGasYxmV.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CyynUmGS.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CyynUmGS.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DScbsE6-.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DScbsE6-.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DjKX5KuB.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DjKX5KuB.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-R1BlPlZW.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-R1BlPlZW.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-iMJrYzAB.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-iMJrYzAB.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-n_t4T8XC.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-n_t4T8XC.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/focus-handoff-BE3g0swK.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/focus-handoff-BE3g0swK.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/focus-scope-DtaPVNl5.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/focus-scope-DtaPVNl5.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/ui-CGwc8KXJ.js +0 -4
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/ui-CGwc8KXJ.js.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`area[href]:not([inert]):not([inert] *)`,`button:not([inert]):not([inert] *)`,`[tabindex]:not(slot):not([inert]):not([inert] *)`,`audio[controls]:not([inert]):not([inert] *)`,`video[controls]:not([inert]):not([inert] *)`,`[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)`,`details>summary:first-of-type:not([inert]):not([inert] *)`,`details:not([inert]):not([inert] *)`],t=e.join(`,`),n=typeof Element>`u`,r=n?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,i=!n&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},a=function(e,t){t===void 0&&(t=!0);var n=e?.getAttribute?.call(e,`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):a(e.parentNode))},o=function(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},s=function(e,n,i){if(a(e))return[];var o=Array.prototype.slice.apply(e.querySelectorAll(t));return n&&r.call(e,t)&&o.unshift(e),o=o.filter(i),o},c=function(e,n,i){for(var o=[],s=Array.from(e);s.length;){var l=s.shift();if(!a(l,!1)){if(l.tagName===`SLOT`){var u=l.assignedElements(),d=c(u.length?u:l.children,!0,i);i.flatten?o.push.apply(o,d):o.push({scopeParent:l,candidates:d})}else{r.call(l,t)&&i.filter(l)&&(n||!e.includes(l))&&o.push(l);var f=l.shadowRoot||typeof i.getShadowRoot==`function`&&i.getShadowRoot(l),p=!a(f,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(l));if(f&&p){var m=c(f===!0?l.children:f.children,!0,i);i.flatten?o.push.apply(o,m):o.push({scopeParent:l,candidates:m})}else s.unshift.apply(s,l.children)}}}return o},l=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},u=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||o(e))&&!l(e)?0:e.tabIndex},d=function(e,t){var n=u(e);return n<0&&t&&!l(e)?0:n},f=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},p=function(e){return e.tagName===`INPUT`},m=function(e){return p(e)&&e.type===`hidden`},h=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},g=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},_=function(e){if(!e.name)return!0;var t=e.form||i(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){return console.error(`Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s`,e.message),!1}var a=g(r,e.form);return!a||a===e},v=function(e){return p(e)&&e.type===`radio`},y=function(e){return v(e)&&!_(e)},b=function(e){var t=e&&i(e),n=t?.host,r=!1;if(t&&t!==e){var a,o,s;for(r=!!((a=n)!=null&&(o=a.ownerDocument)!=null&&o.contains(n)||e!=null&&(s=e.ownerDocument)!=null&&s.contains(e));!r&&n;){var c,l;t=i(n),n=t?.host,r=!!((c=n)!=null&&(l=c.ownerDocument)!=null&&l.contains(n))}}return r},x=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},S=function(e,t){var n=t.displayCheck,a=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});var o=getComputedStyle(e).visibility;if(o===`hidden`||o===`collapse`)return!0;var s=r.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(r.call(s,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof a==`function`){for(var c=e;e;){var l=e.parentElement,u=i(e);if(l&&!l.shadowRoot&&a(l)===!0)return x(e);e=e.assignedSlot?e.assignedSlot:!l&&u!==e.ownerDocument?u.host:l}e=c}if(b(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return x(e);return!1},C=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var i=t.children.item(n);if(i.tagName===`LEGEND`)return r.call(t,`fieldset[disabled] *`)?!0:!i.contains(e)}return!0}t=t.parentElement}return!1},w=function(e,t){return!(t.disabled||m(t)||S(t,e)||h(t)||C(t))},T=function(e,t){return!(y(t)||u(t)<0||!w(e,t))},E=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},D=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=d(a,i),s=i?D(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(f).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},O=function(e,t){return t||={},D(t.getShadowRoot?c([e],t.includeContainer,{filter:T.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:E}):s(e,t.includeContainer,T.bind(null,t)))},k=function(e,n){if(n||={},!e)throw Error(`No node provided`);return r.call(e,t)!==!1&&T(n,e)},A=e.concat(`iframe:not([inert]):not([inert] *)`).join(`,`),j=function(e,t){if(t||={},!e)throw Error(`No node provided`);return r.call(e,A)!==!1&&w(t,e)},M=new Set([`Tab`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`ArrowUp`,`Home`,`End`,`PageDown`,`PageUp`]),N={displayCheck:`full-native`},P=new WeakMap,F=e=>{e.suppressed?.removeAttribute(`data-ui-focus-indicator`),e.suppressed=null},I=e=>{let t=P.get(e);if(t)return t;let n={suppressed:null};return P.set(e,n),e.addEventListener(`keydown`,e=>{M.has(e.key)&&F(n)},!0),e.addEventListener(`focusout`,e=>{e.target===n.suppressed&&F(n)},!0),e.addEventListener(`pointerup`,()=>F(n),!0),e.addEventListener(`pointercancel`,()=>F(n),!0),e.defaultView?.addEventListener(`blur`,()=>F(n)),n},L=e=>!e?.isConnected||e.getAttribute(`aria-disabled`)===`true`||e.closest(`[aria-hidden="true"], [hidden], [inert]`)?!1:j(e,N),R=e=>I(e.ownerDocument).suppressed===e&&e.getAttribute(`data-ui-focus-indicator`)===`suppressed`,z=(e,{preventScroll:t=!0,showIndicator:n=!0}={})=>{if(!L(e))return!1;let r=I(e.ownerDocument);return F(r),n||(e.setAttribute(`data-ui-focus-indicator`,`suppressed`),r.suppressed=e),e.focus({preventScroll:t,focusVisible:n}),e.ownerDocument.activeElement===e||(r.suppressed===e&&F(r),!1)};export{O as i,R as n,k as r,z as t};
|
|
2
|
+
//# sourceMappingURL=focus-pk_lz9sg.js.map
|
package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/focus-pk_lz9sg.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focus-pk_lz9sg.js","names":[],"sources":["../../../../../../../../../node_modules/.pnpm/tabbable@6.5.0/node_modules/tabbable/dist/index.esm.js","../../../../../../../../client/src/runtime/focus.ts"],"sourcesContent":["/*!\n* tabbable 6.5.0\n* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE\n*/\n// NOTE: separate `:not()` selectors has broader browser support than the newer\n// `:not([inert], [inert] *)` (Feb 2023)\nvar candidateSelectors = ['input:not([inert]):not([inert] *)', 'select:not([inert]):not([inert] *)', 'textarea:not([inert]):not([inert] *)', 'a[href]:not([inert]):not([inert] *)', 'area[href]:not([inert]):not([inert] *)', 'button:not([inert]):not([inert] *)', '[tabindex]:not(slot):not([inert]):not([inert] *)', 'audio[controls]:not([inert]):not([inert] *)', 'video[controls]:not([inert]):not([inert] *)', '[contenteditable]:not([contenteditable=\"false\"]):not([inert]):not([inert] *)', 'details>summary:first-of-type:not([inert]):not([inert] *)', 'details:not([inert]):not([inert] *)'];\nvar candidateSelector = /* #__PURE__ */candidateSelectors.join(',');\nvar NoElement = typeof Element === 'undefined';\nvar matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\nvar getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {\n var _element$getRootNode;\n return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);\n} : function (element) {\n return element === null || element === void 0 ? void 0 : element.ownerDocument;\n};\n\n/**\n * Determines if a node is inert or in an inert ancestor.\n * @param {Node} [node]\n * @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to\n * see if any of them are inert. If false, only `node` itself is considered.\n * @returns {boolean} True if inert itself or by way of being in an inert ancestor.\n * False if `node` is falsy.\n */\nvar _isInert = function isInert(node, lookUp) {\n var _node$getAttribute;\n if (lookUp === void 0) {\n lookUp = true;\n }\n // CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`\n // JS API property; we have to check the attribute, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's an active element\n var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'inert');\n var inert = inertAtt === '' || inertAtt === 'true';\n\n // NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`\n // if it weren't for `matches()` not being a function on shadow roots; the following\n // code works for any kind of node\n var result = inert || lookUp && node && (\n // closest does not exist on shadow roots, so we fall back to a manual\n // lookup upward, in case it is not defined.\n typeof node.closest === 'function' ? node.closest('[inert]') : _isInert(node.parentNode));\n return result;\n};\n\n/**\n * Determines if a node's content is editable.\n * @param {Element} [node]\n * @returns True if it's content-editable; false if it's not or `node` is falsy.\n */\nvar isContentEditable = function isContentEditable(node) {\n var _node$getAttribute2;\n // CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have\n // to use the attribute directly to check for this, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's a non-editable element\n var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, 'contenteditable');\n return attValue === '' || attValue === 'true';\n};\n\n/**\n * @param {Element} el container to check in\n * @param {boolean} includeContainer add container to check\n * @param {(node: Element) => boolean} filter filter candidates\n * @returns {Element[]}\n */\nvar getCandidates = function getCandidates(el, includeContainer, filter) {\n // even if `includeContainer=false`, we still have to check it for inertness because\n // if it's inert (either by itself or via its parent), then all its children are inert\n if (_isInert(el)) {\n return [];\n }\n var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));\n if (includeContainer && matches.call(el, candidateSelector)) {\n candidates.unshift(el);\n }\n candidates = candidates.filter(filter);\n return candidates;\n};\n\n/**\n * @callback GetShadowRoot\n * @param {Element} element to check for shadow root\n * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.\n */\n\n/**\n * @callback ShadowRootFilter\n * @param {Element} shadowHostNode the element which contains shadow content\n * @returns {boolean} true if a shadow root could potentially contain valid candidates.\n */\n\n/**\n * @typedef {Object} CandidateScope\n * @property {Element} scopeParent contains inner candidates\n * @property {Element[]} candidates list of candidates found in the scope parent\n */\n\n/**\n * @typedef {Object} IterativeOptions\n * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;\n * if a function, implies shadow support is enabled and either returns the shadow root of an element\n * or a boolean stating if it has an undisclosed shadow root\n * @property {(node: Element) => boolean} filter filter candidates\n * @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list\n * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;\n */\n\n/**\n * @param {Element[]} elements list of element containers to match candidates from\n * @param {boolean} includeContainer add container list to check\n * @param {IterativeOptions} options\n * @returns {Array.<Element|CandidateScope>}\n */\nvar _getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {\n var candidates = [];\n var elementsToCheck = Array.from(elements);\n while (elementsToCheck.length) {\n var element = elementsToCheck.shift();\n if (_isInert(element, false)) {\n // no need to look up since we're drilling down\n // anything inside this container will also be inert\n continue;\n }\n if (element.tagName === 'SLOT') {\n // add shadow dom slot scope (slot itself cannot be focusable)\n var assigned = element.assignedElements();\n var content = assigned.length ? assigned : element.children;\n var nestedCandidates = _getCandidatesIteratively(content, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: nestedCandidates\n });\n }\n } else {\n // check candidate element\n var validCandidate = matches.call(element, candidateSelector);\n if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {\n candidates.push(element);\n }\n\n // iterate over shadow content if possible\n var shadowRoot = element.shadowRoot ||\n // check for an undisclosed shadow\n typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);\n\n // no inert look up because we're already drilling down and checking for inertness\n // on the way down, so all containers to this root node should have already been\n // vetted as non-inert\n var validShadowRoot = !_isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));\n if (shadowRoot && validShadowRoot) {\n // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed\n // shadow exists, so look at light dom children as fallback BUT create a scope for any\n // child candidates found because they're likely slotted elements (elements that are\n // children of the web component element (which has the shadow), in the light dom, but\n // slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,\n // _after_ we return from this recursive call\n var _nestedCandidates = _getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, _nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: _nestedCandidates\n });\n }\n } else {\n // there's not shadow so just dig into the element's (light dom) children\n // __without__ giving the element special scope treatment\n elementsToCheck.unshift.apply(elementsToCheck, element.children);\n }\n }\n }\n return candidates;\n};\n\n/**\n * @private\n * Determines if the node has an explicitly specified `tabindex` attribute.\n * @param {HTMLElement} node\n * @returns {boolean} True if so; false if not.\n */\nvar hasTabIndex = function hasTabIndex(node) {\n return !isNaN(parseInt(node.getAttribute('tabindex'), 10));\n};\n\n/**\n * Determine the tab index of a given node.\n * @param {HTMLElement} node\n * @returns {number} Tab order (negative, 0, or positive number).\n * @throws {Error} If `node` is falsy.\n */\nvar getTabIndex = function getTabIndex(node) {\n if (!node) {\n throw new Error('No node provided');\n }\n if (node.tabIndex < 0) {\n // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default\n // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n // yet they are still part of the regular tab order; in FF, they get a default\n // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n // order, consider their tab index to be 0.\n // Also browsers do not return `tabIndex` correctly for contentEditable nodes;\n // so if they don't have a tabindex attribute specifically set, assume it's 0.\n if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {\n return 0;\n }\n }\n return node.tabIndex;\n};\n\n/**\n * Determine the tab index of a given node __for sort order purposes__.\n * @param {HTMLElement} node\n * @param {boolean} [isScope] True for a custom element with shadow root or slot that, by default,\n * has tabIndex -1, but needs to be sorted by document order in order for its content to be\n * inserted into the correct sort position.\n * @returns {number} Tab order (negative, 0, or positive number).\n */\nvar getSortOrderTabIndex = function getSortOrderTabIndex(node, isScope) {\n var tabIndex = getTabIndex(node);\n if (tabIndex < 0 && isScope && !hasTabIndex(node)) {\n return 0;\n }\n return tabIndex;\n};\nvar sortOrderedTabbables = function sortOrderedTabbables(a, b) {\n return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;\n};\nvar isInput = function isInput(node) {\n return node.tagName === 'INPUT';\n};\nvar isHiddenInput = function isHiddenInput(node) {\n return isInput(node) && node.type === 'hidden';\n};\nvar isDetailsWithSummary = function isDetailsWithSummary(node) {\n var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {\n return child.tagName === 'SUMMARY';\n });\n return r;\n};\nvar getCheckedRadio = function getCheckedRadio(nodes, form) {\n for (var i = 0; i < nodes.length; i++) {\n if (nodes[i].checked && nodes[i].form === form) {\n return nodes[i];\n }\n }\n};\nvar isTabbableRadio = function isTabbableRadio(node) {\n if (!node.name) {\n return true;\n }\n var radioScope = node.form || getRootNode(node);\n var queryRadios = function queryRadios(name) {\n return radioScope.querySelectorAll('input[type=\"radio\"][name=\"' + name + '\"]');\n };\n var radioSet;\n if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {\n radioSet = queryRadios(window.CSS.escape(node.name));\n } else {\n try {\n radioSet = queryRadios(node.name);\n } catch (err) {\n // eslint-disable-next-line no-console\n console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);\n return false;\n }\n }\n var checked = getCheckedRadio(radioSet, node.form);\n return !checked || checked === node;\n};\nvar isRadio = function isRadio(node) {\n return isInput(node) && node.type === 'radio';\n};\nvar isNonTabbableRadio = function isNonTabbableRadio(node) {\n return isRadio(node) && !isTabbableRadio(node);\n};\n\n// determines if a node is ultimately attached to the window's document\nvar isNodeAttached = function isNodeAttached(node) {\n var _nodeRoot;\n // The root node is the shadow root if the node is in a shadow DOM; some document otherwise\n // (but NOT _the_ document; see second 'If' comment below for more).\n // If rootNode is shadow root, it'll have a host, which is the element to which the shadow\n // is attached, and the one we need to check if it's in the document or not (because the\n // shadow, and all nodes it contains, is never considered in the document since shadows\n // behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,\n // is hidden, or is not in the document itself but is detached, it will affect the shadow's\n // visibility, including all the nodes it contains). The host could be any normal node,\n // or a custom element (i.e. web component). Either way, that's the one that is considered\n // part of the document, not the shadow root, nor any of its children (i.e. the node being\n // tested).\n // To further complicate things, we have to look all the way up until we find a shadow HOST\n // that is attached (or find none) because the node might be in nested shadows...\n // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the\n // document (per the docs) and while it's a Document-type object, that document does not\n // appear to be the same as the node's `ownerDocument` for some reason, so it's safer\n // to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,\n // using `rootNode.contains(node)` will _always_ be true we'll get false-positives when\n // node is actually detached.\n // NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible\n // if a tabbable/focusable node was quickly added to the DOM, focused, and then removed\n // from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then\n // `ownerDocument` will be `null`, hence the optional chaining on it.\n var nodeRoot = node && getRootNode(node);\n var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;\n\n // in some cases, a detached node will return itself as the root instead of a document or\n // shadow root object, in which case, we shouldn't try to look further up the host chain\n var attached = false;\n if (nodeRoot && nodeRoot !== node) {\n var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;\n attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && (_nodeRootHost$ownerDo = _nodeRootHost.ownerDocument) !== null && _nodeRootHost$ownerDo !== void 0 && _nodeRootHost$ownerDo.contains(nodeRootHost) || node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.contains(node));\n while (!attached && nodeRootHost) {\n var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;\n // since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,\n // which means we need to get the host's host and check if that parent host is contained\n // in (i.e. attached to) the document\n nodeRoot = getRootNode(nodeRootHost);\n nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;\n attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));\n }\n }\n return attached;\n};\nvar isZeroArea = function isZeroArea(node) {\n var _node$getBoundingClie = node.getBoundingClientRect(),\n width = _node$getBoundingClie.width,\n height = _node$getBoundingClie.height;\n return width === 0 && height === 0;\n};\nvar isHidden = function isHidden(node, _ref) {\n var displayCheck = _ref.displayCheck,\n getShadowRoot = _ref.getShadowRoot;\n if (displayCheck === 'full-native') {\n if ('checkVisibility' in node) {\n // Chrome >= 105, Edge >= 105, Firefox >= 106, Safari >= 17.4\n // @see https://developer.mozilla.org/en-US/docs/Web/API/Element/checkVisibility#browser_compatibility\n var visible = node.checkVisibility({\n // Checking opacity might be desirable for some use cases, but natively,\n // opacity zero elements _are_ focusable and tabbable.\n checkOpacity: false,\n opacityProperty: false,\n contentVisibilityAuto: true,\n visibilityProperty: true,\n // This is an alias for `visibilityProperty`. Contemporary browsers\n // support both. However, this alias has wider browser support (Chrome\n // >= 105 and Firefox >= 106, vs. Chrome >= 121 and Firefox >= 122), so\n // we include it anyway.\n checkVisibilityCSS: true\n });\n return !visible;\n }\n // Fall through to manual visibility checks\n }\n\n // NOTE: visibility will be `undefined` if node is detached from the document\n // (see notes about this further down), which means we will consider it visible\n // (this is legacy behavior from a very long way back)\n // NOTE: we check this regardless of `displayCheck=\"none\"` because this is a\n // _visibility_ check, not a _display_ check\n var _getComputedStyle = getComputedStyle(node),\n visibility = _getComputedStyle.visibility;\n if (visibility === 'hidden' || visibility === 'collapse') {\n return true;\n }\n var isDirectSummary = matches.call(node, 'details>summary:first-of-type');\n var nodeUnderDetails = isDirectSummary ? node.parentElement : node;\n if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {\n return true;\n }\n if (!displayCheck || displayCheck === 'full' ||\n // full-native can run this branch when it falls through in case\n // Element#checkVisibility is unsupported\n displayCheck === 'full-native' || displayCheck === 'legacy-full') {\n if (typeof getShadowRoot === 'function') {\n // figure out if we should consider the node to be in an undisclosed shadow and use the\n // 'non-zero-area' fallback\n var originalNode = node;\n while (node) {\n var parentElement = node.parentElement;\n var rootNode = getRootNode(node);\n if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow\n ) {\n // node has an undisclosed shadow which means we can only treat it as a black box, so we\n // fall back to a non-zero-area test\n return isZeroArea(node);\n } else if (node.assignedSlot) {\n // iterate up slot\n node = node.assignedSlot;\n } else if (!parentElement && rootNode !== node.ownerDocument) {\n // cross shadow boundary\n node = rootNode.host;\n } else {\n // iterate up normal dom\n node = parentElement;\n }\n }\n node = originalNode;\n }\n // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support\n // (i.e. it does not also presume that all nodes might have undisclosed shadows); or\n // it might be a falsy value, which means shadow DOM support is disabled\n\n // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)\n // now we can just test to see if it would normally be visible or not, provided it's\n // attached to the main document.\n // NOTE: We must consider case where node is inside a shadow DOM and given directly to\n // `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.\n\n if (isNodeAttached(node)) {\n // this works wherever the node is: if there's at least one client rect, it's\n // somehow displayed; it also covers the CSS 'display: contents' case where the\n // node itself is hidden in place of its contents; and there's no need to search\n // up the hierarchy either\n return !node.getClientRects().length;\n }\n\n // Else, the node isn't attached to the document, which means the `getClientRects()`\n // API will __always__ return zero rects (this can happen, for example, if React\n // is used to render nodes onto a detached tree, as confirmed in this thread:\n // https://github.com/facebook/react/issues/9117#issuecomment-284228870)\n //\n // It also means that even window.getComputedStyle(node).display will return `undefined`\n // because styles are only computed for nodes that are in the document.\n //\n // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable\n // somehow. Though it was never stated officially, anyone who has ever used tabbable\n // APIs on nodes in detached containers has actually implicitly used tabbable in what\n // was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck=\"none\"` mode -- essentially\n // considering __everything__ to be visible because of the innability to determine styles.\n //\n // v6.0.0: As of this major release, the default 'full' option __no longer treats detached\n // nodes as visible with the 'none' fallback.__\n if (displayCheck !== 'legacy-full') {\n return true; // hidden\n }\n // else, fallback to 'none' mode and consider the node visible\n } else if (displayCheck === 'non-zero-area') {\n // NOTE: Even though this tests that the node's client rect is non-zero to determine\n // whether it's displayed, and that a detached node will __always__ have a zero-area\n // client rect, we don't special-case for whether the node is attached or not. In\n // this mode, we do want to consider nodes that have a zero area to be hidden at all\n // times, and that includes attached or not.\n return isZeroArea(node);\n }\n\n // visible, as far as we can tell, or per current `displayCheck=none` mode, we assume\n // it's visible\n return false;\n};\n\n// form fields (nested) inside a disabled fieldset are not focusable/tabbable\n// unless they are in the _first_ <legend> element of the top-most disabled\n// fieldset\nvar isDisabledFromFieldset = function isDisabledFromFieldset(node) {\n if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {\n var parentNode = node.parentElement;\n // check if `node` is contained in a disabled <fieldset>\n while (parentNode) {\n if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {\n // look for the first <legend> among the children of the disabled <fieldset>\n for (var i = 0; i < parentNode.children.length; i++) {\n var child = parentNode.children.item(i);\n // when the first <legend> (in document order) is found\n if (child.tagName === 'LEGEND') {\n // if its parent <fieldset> is not nested in another disabled <fieldset>,\n // return whether `node` is a descendant of its first <legend>\n return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);\n }\n }\n // the disabled <fieldset> containing `node` has no <legend>\n return true;\n }\n parentNode = parentNode.parentElement;\n }\n }\n\n // else, node's tabbable/focusable state should not be affected by a fieldset's\n // enabled/disabled state\n return false;\n};\nvar isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {\n if (node.disabled || isHiddenInput(node) || isHidden(node, options) ||\n // For a details element with a summary, the summary element gets the focus\n isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {\n return false;\n }\n return true;\n};\nvar isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {\n if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {\n return false;\n }\n return true;\n};\nvar isShadowRootTabbable = function isShadowRootTabbable(shadowHostNode) {\n var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);\n if (isNaN(tabIndex) || tabIndex >= 0) {\n return true;\n }\n // If a custom element has an explicit negative tabindex,\n // browsers will not allow tab targeting said element's children.\n return false;\n};\n\n/**\n * @param {Array.<Element|CandidateScope>} candidates\n * @returns Element[]\n */\nvar _sortByOrder = function sortByOrder(candidates) {\n var regularTabbables = [];\n var orderedTabbables = [];\n candidates.forEach(function (item, i) {\n var isScope = !!item.scopeParent;\n var element = isScope ? item.scopeParent : item;\n var candidateTabindex = getSortOrderTabIndex(element, isScope);\n var elements = isScope ? _sortByOrder(item.candidates) : element;\n if (candidateTabindex === 0) {\n isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);\n } else {\n orderedTabbables.push({\n documentOrder: i,\n tabIndex: candidateTabindex,\n item: item,\n isScope: isScope,\n content: elements\n });\n }\n });\n return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {\n sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);\n return acc;\n }, []).concat(regularTabbables);\n};\nvar tabbable = function tabbable(container, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = _getCandidatesIteratively([container], options.includeContainer, {\n filter: isNodeMatchingSelectorTabbable.bind(null, options),\n flatten: false,\n getShadowRoot: options.getShadowRoot,\n shadowRootFilter: isShadowRootTabbable\n });\n } else {\n candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));\n }\n return _sortByOrder(candidates);\n};\nvar focusable = function focusable(container, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = _getCandidatesIteratively([container], options.includeContainer, {\n filter: isNodeMatchingSelectorFocusable.bind(null, options),\n flatten: true,\n getShadowRoot: options.getShadowRoot\n });\n } else {\n candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));\n }\n return candidates;\n};\nvar isTabbable = function isTabbable(node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, candidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorTabbable(options, node);\n};\nvar focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe:not([inert]):not([inert] *)').join(',');\nvar isFocusable = function isFocusable(node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, focusableCandidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorFocusable(options, node);\n};\n\nexport { focusable, getTabIndex, isFocusable, isTabbable, tabbable };\n//# sourceMappingURL=index.esm.js.map\n","import {isFocusable, type CheckOptions} from 'tabbable';\n\ntype FocusElementOptions = {\n preventScroll?: boolean;\n showIndicator?: boolean;\n};\n\ntype FocusState = {\n suppressed: HTMLElement | null;\n};\n\nconst NAVIGATION_KEYS = new Set([\n 'Tab',\n 'ArrowDown',\n 'ArrowLeft',\n 'ArrowRight',\n 'ArrowUp',\n 'Home',\n 'End',\n 'PageDown',\n 'PageUp',\n]);\n\nconst FOCUSABILITY_OPTIONS = {displayCheck: 'full-native'} satisfies CheckOptions;\n\nconst states = new WeakMap<Document, FocusState>();\n\nconst clearFocusIndicatorSuppression = (state: FocusState): void => {\n state.suppressed?.removeAttribute('data-ui-focus-indicator');\n state.suppressed = null;\n};\n\nconst stateFor = (document: Document): FocusState => {\n const existing = states.get(document);\n if (existing) return existing;\n\n const state: FocusState = {suppressed: null};\n states.set(document, state);\n\n document.addEventListener('keydown', (event) => {\n if (NAVIGATION_KEYS.has(event.key)) clearFocusIndicatorSuppression(state);\n }, true);\n document.addEventListener('focusout', (event) => {\n if (event.target === state.suppressed) clearFocusIndicatorSuppression(state);\n }, true);\n document.addEventListener('pointerup', () => clearFocusIndicatorSuppression(state), true);\n document.addEventListener('pointercancel', () => clearFocusIndicatorSuppression(state), true);\n document.defaultView?.addEventListener('blur', () => clearFocusIndicatorSuppression(state));\n return state;\n};\n\nconst isProgrammaticallyFocusable = (element: HTMLElement | null): element is HTMLElement => {\n if (!element?.isConnected || element.getAttribute('aria-disabled') === 'true') return false;\n if (element.closest('[aria-hidden=\"true\"], [hidden], [inert]')) return false;\n return isFocusable(element, FOCUSABILITY_OPTIONS);\n};\n\nconst isFocusIndicatorSuppressed = (element: HTMLElement): boolean => (\n stateFor(element.ownerDocument).suppressed === element\n && element.getAttribute('data-ui-focus-indicator') === 'suppressed'\n);\n\nconst focusElement = (\n element: HTMLElement | null,\n {preventScroll = true, showIndicator = true}: FocusElementOptions = {},\n): boolean => {\n if (!isProgrammaticallyFocusable(element)) return false;\n const state = stateFor(element.ownerDocument);\n clearFocusIndicatorSuppression(state);\n if (!showIndicator) {\n element.setAttribute('data-ui-focus-indicator', 'suppressed');\n state.suppressed = element;\n }\n\n element.focus({preventScroll, focusVisible: showIndicator});\n if (element.ownerDocument.activeElement === element) return true;\n if (state.suppressed === element) clearFocusIndicatorSuppression(state);\n return false;\n};\n\nexport {\n focusElement,\n isFocusIndicatorSuppressed,\n isProgrammaticallyFocusable,\n};\nexport type {FocusElementOptions};\n"],"x_google_ignoreList":[0],"mappings":"AAMA,IAAI,EAAqB,CAAC,oCAAqC,qCAAsC,uCAAwC,sCAAuC,yCAA0C,qCAAsC,mDAAoD,8CAA+C,8CAA+C,+EAAgF,4DAA6D,qCAAqC,EACpkB,EAAmC,EAAmB,KAAK,GAAG,EAC9D,EAAY,OAAO,QAAY,IAC/B,EAAU,EAAY,UAAY,CAAC,EAAI,QAAQ,UAAU,SAAW,QAAQ,UAAU,mBAAqB,QAAQ,UAAU,sBAC7H,EAAc,CAAC,GAAa,QAAQ,UAAU,YAAc,SAAU,EAAS,CAEjF,OAAO,GAAkF,aAAyF,KAAK,CAAO,CAChM,EAAI,SAAU,EAAS,CACrB,OAAO,GAA0D,aACnE,EAUI,EAAW,SAAiB,EAAM,EAAQ,CAExC,IAAW,IAAK,KAClB,EAAS,IAKX,IAAI,EAAW,GAAuE,cAAsF,KAAK,EAAM,OAAO,EAU9L,OATY,IAAa,IAAM,IAAa,QAKtB,GAAU,IAGhC,OAAO,EAAK,SAAY,WAAa,EAAK,QAAQ,SAAS,EAAI,EAAS,EAAK,UAAU,EAEzF,EAOI,EAAoB,SAA2B,EAAM,CACvD,IAII,EAAW,GAAwE,cAAwF,KAAK,EAAM,iBAAiB,EAC3M,OAAO,IAAa,IAAM,IAAa,MACzC,EAQI,EAAgB,SAAuB,EAAI,EAAkB,EAAQ,CAGvE,GAAI,EAAS,CAAE,EACb,MAAO,CAAC,EAEV,IAAI,EAAa,MAAM,UAAU,MAAM,MAAM,EAAG,iBAAiB,CAAiB,CAAC,EAKnF,OAJI,GAAoB,EAAQ,KAAK,EAAI,CAAiB,GACxD,EAAW,QAAQ,CAAE,EAEvB,EAAa,EAAW,OAAO,CAAM,EAC9B,CACT,EAoCI,EAA4B,SAAkC,EAAU,EAAkB,EAAS,CAGrG,IAFA,IAAI,EAAa,CAAC,EACd,EAAkB,MAAM,KAAK,CAAQ,EAClC,EAAgB,QAAQ,CAC7B,IAAI,EAAU,EAAgB,MAAM,EAChC,MAAS,EAAS,EAAK,EAK3B,IAAI,EAAQ,UAAY,OAAQ,CAE9B,IAAI,EAAW,EAAQ,iBAAiB,EAEpC,EAAmB,EADT,EAAS,OAAS,EAAW,EAAQ,SACO,GAAM,CAAO,EACnE,EAAQ,QACV,EAAW,KAAK,MAAM,EAAY,CAAgB,EAElD,EAAW,KAAK,CACd,YAAa,EACb,WAAY,CACd,CAAC,CAEL,KAAO,CAEgB,EAAQ,KAAK,EAAS,CAC1B,GAAK,EAAQ,OAAO,CAAO,IAAM,GAAoB,CAAC,EAAS,SAAS,CAAO,IAC9F,EAAW,KAAK,CAAO,EAIzB,IAAI,EAAa,EAAQ,YAEzB,OAAO,EAAQ,eAAkB,YAAc,EAAQ,cAAc,CAAO,EAKxE,EAAkB,CAAC,EAAS,EAAY,EAAK,IAAM,CAAC,EAAQ,kBAAoB,EAAQ,iBAAiB,CAAO,GACpH,GAAI,GAAc,EAAiB,CAOjC,IAAI,EAAoB,EAA0B,IAAe,GAAO,EAAQ,SAAW,EAAW,SAAU,GAAM,CAAO,EACzH,EAAQ,QACV,EAAW,KAAK,MAAM,EAAY,CAAiB,EAEnD,EAAW,KAAK,CACd,YAAa,EACb,WAAY,CACd,CAAC,CAEL,MAGE,EAAgB,QAAQ,MAAM,EAAiB,EAAQ,QAAQ,CAEnE,EACF,CACA,OAAO,CACT,EAQI,EAAc,SAAqB,EAAM,CAC3C,MAAO,CAAC,MAAM,SAAS,EAAK,aAAa,UAAU,EAAG,EAAE,CAAC,CAC3D,EAQI,EAAc,SAAqB,EAAM,CAC3C,GAAI,CAAC,EACH,MAAU,MAAM,kBAAkB,EAcpC,OAZI,EAAK,SAAW,IAQb,0BAA0B,KAAK,EAAK,OAAO,GAAK,EAAkB,CAAI,IAAM,CAAC,EAAY,CAAI,EACzF,EAGJ,EAAK,QACd,EAUI,EAAuB,SAA8B,EAAM,EAAS,CACtE,IAAI,EAAW,EAAY,CAAI,EAI/B,OAHI,EAAW,GAAK,GAAW,CAAC,EAAY,CAAI,EACvC,EAEF,CACT,EACI,EAAuB,SAA8B,EAAG,EAAG,CAC7D,OAAO,EAAE,WAAa,EAAE,SAAW,EAAE,cAAgB,EAAE,cAAgB,EAAE,SAAW,EAAE,QACxF,EACI,EAAU,SAAiB,EAAM,CACnC,OAAO,EAAK,UAAY,OAC1B,EACI,EAAgB,SAAuB,EAAM,CAC/C,OAAO,EAAQ,CAAI,GAAK,EAAK,OAAS,QACxC,EACI,EAAuB,SAA8B,EAAM,CAI7D,OAHQ,EAAK,UAAY,WAAa,MAAM,UAAU,MAAM,MAAM,EAAK,QAAQ,CAAC,CAAC,KAAK,SAAU,EAAO,CACrG,OAAO,EAAM,UAAY,SAC3B,CAAC,CAEH,EACI,EAAkB,SAAyB,EAAO,EAAM,CAC1D,IAAK,IAAI,EAAI,EAAG,EAAI,EAAM,OAAQ,IAChC,GAAI,EAAM,EAAE,CAAC,SAAW,EAAM,EAAE,CAAC,OAAS,EACxC,OAAO,EAAM,EAGnB,EACI,EAAkB,SAAyB,EAAM,CACnD,GAAI,CAAC,EAAK,KACR,MAAO,GAET,IAAI,EAAa,EAAK,MAAQ,EAAY,CAAI,EAC1C,EAAc,SAAqB,EAAM,CAC3C,OAAO,EAAW,iBAAiB,6BAA+B,EAAO,IAAI,CAC/E,EACI,EACJ,GAAI,OAAO,OAAW,KAAsB,OAAO,MAAQ,QAAe,OAAO,OAAO,IAAI,QAAW,WACrG,EAAW,EAAY,OAAO,IAAI,OAAO,EAAK,IAAI,CAAC,OAEnD,GAAI,CACF,EAAW,EAAY,EAAK,IAAI,CAClC,OAAS,EAAK,CAGZ,OADA,QAAQ,MAAM,2IAA4I,EAAI,OAAO,EAC9J,EACT,CAEF,IAAI,EAAU,EAAgB,EAAU,EAAK,IAAI,EACjD,MAAO,CAAC,GAAW,IAAY,CACjC,EACI,EAAU,SAAiB,EAAM,CACnC,OAAO,EAAQ,CAAI,GAAK,EAAK,OAAS,OACxC,EACI,EAAqB,SAA4B,EAAM,CACzD,OAAO,EAAQ,CAAI,GAAK,CAAC,EAAgB,CAAI,CAC/C,EAGI,EAAiB,SAAwB,EAAM,CACjD,IAwBI,EAAW,GAAQ,EAAY,CAAI,EACnC,EAA4B,GAAgE,KAI5F,EAAW,GACf,GAAI,GAAY,IAAa,EAAM,CACjC,IAAI,EAAe,EAAuB,EAE1C,IADA,EAAW,CAAC,GAAG,EAAgB,IAAkB,OAAqC,EAAwB,EAAc,gBAAmB,MAA4C,EAAsB,SAAS,CAAY,GAAK,GAAS,OAA4B,EAAsB,EAAK,gBAAmB,MAA0C,EAAoB,SAAS,CAAI,GAClY,CAAC,GAAY,GAAc,CAChC,IAAgB,EAAgB,EAIhC,EAAW,EAAY,CAAY,EACnC,EAA6B,GAAkE,KAC/F,EAAW,CAAC,GAAG,EAAiB,IAAkB,OAAsC,EAAwB,EAAe,gBAAmB,MAA4C,EAAsB,SAAS,CAAY,EAC3O,CACF,CACA,OAAO,CACT,EACI,EAAa,SAAoB,EAAM,CACzC,IAAI,EAAwB,EAAK,sBAAsB,EACrD,EAAQ,EAAsB,MAC9B,EAAS,EAAsB,OACjC,OAAO,IAAU,GAAK,IAAW,CACnC,EACI,EAAW,SAAkB,EAAM,EAAM,CAC3C,IAAI,EAAe,EAAK,aACtB,EAAgB,EAAK,cACvB,GAAI,IAAiB,eACf,oBAAqB,EAgBvB,MAAO,CAbO,EAAK,gBAAgB,CAGjC,aAAc,GACd,gBAAiB,GACjB,sBAAuB,GACvB,mBAAoB,GAKpB,mBAAoB,EACtB,CACc,EAUlB,IACE,EADsB,iBAAiB,CACV,CAAC,CAAC,WACjC,GAAI,IAAe,UAAY,IAAe,WAC5C,MAAO,GAGT,IAAI,EADkB,EAAQ,KAAK,EAAM,+BACJ,EAAI,EAAK,cAAgB,EAC9D,GAAI,EAAQ,KAAK,EAAkB,uBAAuB,EACxD,MAAO,GAET,GAAI,CAAC,GAAgB,IAAiB,QAGtC,IAAiB,eAAiB,IAAiB,cAAe,CAChE,GAAI,OAAO,GAAkB,WAAY,CAIvC,IADA,IAAI,EAAe,EACZ,GAAM,CACX,IAAI,EAAgB,EAAK,cACrB,EAAW,EAAY,CAAI,EAC/B,GAAI,GAAiB,CAAC,EAAc,YAAc,EAAc,CAAa,IAAM,GAIjF,OAAO,EAAW,CAAI,EACjB,AAQL,EARS,EAAK,aAEP,EAAK,aACH,CAAC,GAAiB,IAAa,EAAK,cAEtC,EAAS,KAGT,CAEX,CACA,EAAO,CACT,CAWA,GAAI,EAAe,CAAI,EAKrB,MAAO,CAAC,EAAK,eAAe,CAAC,CAAC,OAmBhC,GAAI,IAAiB,cACnB,MAAO,EAGX,MAAO,GAAI,IAAiB,gBAM1B,OAAO,EAAW,CAAI,EAKxB,MAAO,EACT,EAKI,EAAyB,SAAgC,EAAM,CACjE,GAAI,mCAAmC,KAAK,EAAK,OAAO,EAGtD,IAFA,IAAI,EAAa,EAAK,cAEf,GAAY,CACjB,GAAI,EAAW,UAAY,YAAc,EAAW,SAAU,CAE5D,IAAK,IAAI,EAAI,EAAG,EAAI,EAAW,SAAS,OAAQ,IAAK,CACnD,IAAI,EAAQ,EAAW,SAAS,KAAK,CAAC,EAEtC,GAAI,EAAM,UAAY,SAGpB,OAAO,EAAQ,KAAK,EAAY,sBAAsB,EAAI,GAAO,CAAC,EAAM,SAAS,CAAI,CAEzF,CAEA,MAAO,EACT,CACA,EAAa,EAAW,aAC1B,CAKF,MAAO,EACT,EACI,EAAkC,SAAyC,EAAS,EAAM,CAM5F,MALA,EAAI,EAAK,UAAY,EAAc,CAAI,GAAK,EAAS,EAAM,CAAO,GAElE,EAAqB,CAAI,GAAK,EAAuB,CAAI,EAI3D,EACI,EAAiC,SAAwC,EAAS,EAAM,CAI1F,MAHA,EAAI,EAAmB,CAAI,GAAK,EAAY,CAAI,EAAI,GAAK,CAAC,EAAgC,EAAS,CAAI,EAIzG,EACI,EAAuB,SAA8B,EAAgB,CACvE,IAAI,EAAW,SAAS,EAAe,aAAa,UAAU,EAAG,EAAE,EAMnE,MALA,GAAI,MAAM,CAAQ,GAAK,GAAY,EAMrC,EAMI,EAAe,SAAqB,EAAY,CAClD,IAAI,EAAmB,CAAC,EACpB,EAAmB,CAAC,EAkBxB,OAjBA,EAAW,QAAQ,SAAU,EAAM,EAAG,CACpC,IAAI,EAAU,CAAC,CAAC,EAAK,YACjB,EAAU,EAAU,EAAK,YAAc,EACvC,EAAoB,EAAqB,EAAS,CAAO,EACzD,EAAW,EAAU,EAAa,EAAK,UAAU,EAAI,EACrD,IAAsB,EACxB,EAAU,EAAiB,KAAK,MAAM,EAAkB,CAAQ,EAAI,EAAiB,KAAK,CAAO,EAEjG,EAAiB,KAAK,CACpB,cAAe,EACf,SAAU,EACJ,OACG,UACT,QAAS,CACX,CAAC,CAEL,CAAC,EACM,EAAiB,KAAK,CAAoB,CAAC,CAAC,OAAO,SAAU,EAAK,EAAU,CAEjF,OADA,EAAS,QAAU,EAAI,KAAK,MAAM,EAAK,EAAS,OAAO,EAAI,EAAI,KAAK,EAAS,OAAO,EAC7E,CACT,EAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAgB,CAChC,EACI,EAAW,SAAkB,EAAW,EAAS,CAanD,MAZA,KAAqB,CAAC,EAYf,EAVH,EAAQ,cACG,EAA0B,CAAC,CAAS,EAAG,EAAQ,iBAAkB,CAC5E,OAAQ,EAA+B,KAAK,KAAM,CAAO,EACzD,QAAS,GACT,cAAe,EAAQ,cACvB,iBAAkB,CACpB,CAAC,EAEY,EAAc,EAAW,EAAQ,iBAAkB,EAA+B,KAAK,KAAM,CAAO,CAAC,CAEtF,CAChC,EAeI,EAAa,SAAoB,EAAM,EAAS,CAElD,GADA,IAAqB,CAAC,EAClB,CAAC,EACH,MAAU,MAAM,kBAAkB,EAKpC,OAHI,EAAQ,KAAK,EAAM,CAAiB,IAAM,IAGvC,EAA+B,EAAS,CAAI,CACrD,EACI,EAA4C,EAAmB,OAAO,oCAAoC,CAAC,CAAC,KAAK,GAAG,EACpH,EAAc,SAAqB,EAAM,EAAS,CAEpD,GADA,IAAqB,CAAC,EAClB,CAAC,EACH,MAAU,MAAM,kBAAkB,EAKpC,OAHI,EAAQ,KAAK,EAAM,CAA0B,IAAM,IAGhD,EAAgC,EAAS,CAAI,CACtD,EChkBM,EAAkB,IAAI,IAAI,CAC5B,MACA,YACA,YACA,aACA,UACA,OACA,MACA,WACA,QACJ,CAAC,EAEK,EAAuB,CAAC,aAAc,aAAa,EAEnD,EAAS,IAAI,QAEb,EAAkC,GAA4B,CAChE,EAAM,YAAY,gBAAgB,yBAAyB,EAC3D,EAAM,WAAa,IACvB,EAEM,EAAY,GAAmC,CACjD,IAAM,EAAW,EAAO,IAAI,CAAQ,EACpC,GAAI,EAAU,OAAO,EAErB,IAAM,EAAoB,CAAC,WAAY,IAAI,EAY3C,OAXA,EAAO,IAAI,EAAU,CAAK,EAE1B,EAAS,iBAAiB,UAAY,GAAU,CACxC,EAAgB,IAAI,EAAM,GAAG,GAAG,EAA+B,CAAK,CAC5E,EAAG,EAAI,EACP,EAAS,iBAAiB,WAAa,GAAU,CACzC,EAAM,SAAW,EAAM,YAAY,EAA+B,CAAK,CAC/E,EAAG,EAAI,EACP,EAAS,iBAAiB,gBAAmB,EAA+B,CAAK,EAAG,EAAI,EACxF,EAAS,iBAAiB,oBAAuB,EAA+B,CAAK,EAAG,EAAI,EAC5F,EAAS,aAAa,iBAAiB,WAAc,EAA+B,CAAK,CAAC,EACnF,CACX,EAEM,EAA+B,GAC7B,CAAC,GAAS,aAAe,EAAQ,aAAa,eAAe,IAAM,QACnE,EAAQ,QAAQ,yCAAyC,EAAU,GAChE,EAAY,EAAS,CAAoB,EAG9C,EAA8B,GAChC,EAAS,EAAQ,aAAa,CAAC,CAAC,aAAe,GAC5C,EAAQ,aAAa,yBAAyB,IAAM,aAGrD,GACF,EACA,CAAC,gBAAgB,GAAM,gBAAgB,IAA6B,CAAC,IAC3D,CACV,GAAI,CAAC,EAA4B,CAAO,EAAG,MAAO,GAClD,IAAM,EAAQ,EAAS,EAAQ,aAAa,EAU5C,OATA,EAA+B,CAAK,EAC/B,IACD,EAAQ,aAAa,0BAA2B,YAAY,EAC5D,EAAM,WAAa,GAGvB,EAAQ,MAAM,CAAC,gBAAe,aAAc,CAAa,CAAC,EACtD,EAAQ,cAAc,gBAAkB,IACxC,EAAM,aAAe,GAAS,EAA+B,CAAK,EAC/D,GACX"}
|
package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/focus-scope-BrYxsrhc.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{i as e,r as t,t as n}from"./focus-pk_lz9sg.js";var r=t=>e(t).filter(e=>e instanceof HTMLElement),i={displayCheck:`none`},a=n=>t(n,i)?n:e(n,i).find(e=>e instanceof HTMLElement)??n,o=(e,t)=>{n(r(e)[0]??e,t)},s=(e,t)=>{if(e.key!==`Tab`)return;let i=r(t);if(i.length===0){e.preventDefault(),n(t);return}let a=i[0],o=i.at(-1);e.shiftKey&&document.activeElement===a?(e.preventDefault(),n(o)):!e.shiftKey&&document.activeElement===o&&(e.preventDefault(),n(a))};export{s as i,o as n,r,a as t};
|
|
2
|
+
//# sourceMappingURL=focus-scope-BrYxsrhc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focus-scope-BrYxsrhc.js","names":[],"sources":["../../../../../../../../client/src/runtime/focus-scope.ts"],"sourcesContent":["import {isTabbable, tabbable, type CheckOptions} from 'tabbable';\n\nimport {focusElement, type FocusElementOptions} from './focus';\n\nconst tabbableElements = (scope: HTMLElement): HTMLElement[] => (\n tabbable(scope).filter((element): element is HTMLElement => element instanceof HTMLElement)\n);\n\nconst STRUCTURAL_OPTIONS = {displayCheck: 'none'} satisfies CheckOptions;\n\nconst closestTabbable = (el: HTMLElement): HTMLElement => {\n if (isTabbable(el, STRUCTURAL_OPTIONS)) return el;\n return tabbable(el, STRUCTURAL_OPTIONS)\n .find((element): element is HTMLElement => element instanceof HTMLElement) ?? el;\n};\n\nconst focusFirst = (scope: HTMLElement, options?: FocusElementOptions): void => {\n focusElement(tabbableElements(scope)[0] ?? scope, options);\n};\n\nconst trapFocus = (event: KeyboardEvent, scope: HTMLElement): void => {\n if (event.key !== 'Tab') return;\n const candidates = tabbableElements(scope);\n if (candidates.length === 0) {\n event.preventDefault();\n focusElement(scope);\n return;\n }\n const first = candidates[0] as HTMLElement;\n const last = candidates.at(-1) as HTMLElement;\n if (event.shiftKey && document.activeElement === first) {\n event.preventDefault();\n focusElement(last);\n } else if (!event.shiftKey && document.activeElement === last) {\n event.preventDefault();\n focusElement(first);\n }\n};\n\nexport {closestTabbable, focusFirst, tabbableElements, trapFocus};\n"],"mappings":"sDAIA,IAAM,EAAoB,GACtB,EAAS,CAAK,CAAC,CAAC,OAAQ,GAAoC,aAAmB,WAAW,EAGxF,EAAqB,CAAC,aAAc,MAAM,EAE1C,EAAmB,GACjB,EAAW,EAAI,CAAkB,EAAU,EACxC,EAAS,EAAI,CAAkB,CAAC,CAClC,KAAM,GAAoC,aAAmB,WAAW,GAAK,EAGhF,GAAc,EAAoB,IAAwC,CAC5E,EAAa,EAAiB,CAAK,CAAC,CAAC,IAAM,EAAO,CAAO,CAC7D,EAEM,GAAa,EAAsB,IAA6B,CAClE,GAAI,EAAM,MAAQ,MAAO,OACzB,IAAM,EAAa,EAAiB,CAAK,EACzC,GAAI,EAAW,SAAW,EAAG,CACzB,EAAM,eAAe,EACrB,EAAa,CAAK,EAClB,MACJ,CACA,IAAM,EAAQ,EAAW,GACnB,EAAO,EAAW,GAAG,EAAE,EACzB,EAAM,UAAY,SAAS,gBAAkB,GAC7C,EAAM,eAAe,EACrB,EAAa,CAAI,GACV,CAAC,EAAM,UAAY,SAAS,gBAAkB,IACrD,EAAM,eAAe,EACrB,EAAa,CAAK,EAE1B"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{f as e,p as t}from"./ui-CGwc8KXJ.js";var n=Object.freeze({fast:Object.freeze({duration:.08}),moderate:Object.freeze({duration:.16}),slow:Object.freeze({duration:.24})}),r={out:[.23,1,.32,1],inOut:[.77,0,.175,1]},i=Object.freeze({feedback:Object.freeze({duration:n.fast.duration,ease:r.out}),presence:Object.freeze({duration:n.moderate.duration,ease:r.out}),presenceEmphasized:Object.freeze({duration:n.slow.duration,ease:r.out}),layout:Object.freeze({duration:n.moderate.duration,ease:r.inOut}),layoutQuick:Object.freeze({duration:n.fast.duration,ease:r.inOut}),layoutSpring:Object.freeze({visualDuration:n.moderate.duration,bounce:0}),resize:Object.freeze({visualDuration:n.moderate.duration,bounce:0}),gestureExit:Object.freeze({duration:n.moderate.duration,ease:r.out}),gestureSettle:Object.freeze({visualDuration:n.slow.duration,bounce:0})}),a=new Set([`layoutSpring`,`resize`,`gestureSettle`]),o=new Set([`feedback`,`presence`,`presenceEmphasized`,`layout`,`layoutQuick`,`layoutSpring`,`resize`,`gestureSettle`]),s={feedback:`feedback`,presence:`presence`,presenceEmphasized:`presence-emphasized`,layout:`layout`,layoutQuick:`layout-quick`,layoutSpring:`layout-spring`,resize:`resize`,gestureExit:`gesture-exit`,gestureSettle:`gesture-settle`},c={feedback:`fast`,presence:`moderate`,presenceEmphasized:`slow`,layout:`moderate`,layoutQuick:`fast`,layoutSpring:`moderate`,resize:`moderate`,gestureExit:`moderate`,gestureSettle:`slow`},l=(e,t)=>{let n=Number.parseFloat(e.getPropertyValue(t));return Number.isFinite(n)?n:void 0},u=(e,t)=>{let n=e.getPropertyValue(t).trim().toLowerCase(),r=Number.parseFloat(n);if(Number.isFinite(r))return n.endsWith(`ms`)?r:n.endsWith(`s`)?r*1e3:r},d=(e,t)=>{let n=getComputedStyle(e),r=u(n,`--motion-duration-${c[t]}`),d=l(n,`--motion-bounce-${s[t]}`),f=i[t];return a.has(t)||o.has(t)&&(d??0)>0?{visualDuration:r===void 0?`visualDuration`in f?f.visualDuration:f.duration:r/1e3,bounce:d??(`bounce`in f?f.bounce:0)}:{duration:r===void 0?`duration`in f?f.duration:f.visualDuration:r/1e3,...`ease`in f?{ease:f.ease}:{}}},f=(e,t)=>a.has(e)||t!==void 0&&o.has(e)&&(l(getComputedStyle(t),`--motion-bounce-${s[e]}`)??0)>0,p=(e,t)=>d(e,t),m=Object.freeze({opacity:Object.freeze({in:Object.freeze({opacity:Object.freeze([0,1])}),out:Object.freeze({opacity:Object.freeze([1,0])})}),popover:Object.freeze({in:Object.freeze({opacity:Object.freeze([0,1]),scale:Object.freeze([.97,1])}),out:Object.freeze({opacity:Object.freeze([1,0]),scale:Object.freeze([1,.97])})}),modal:Object.freeze({in:Object.freeze({opacity:Object.freeze([0,1]),y:Object.freeze([`calc(8px * var(--motion-displacement-scale, 1))`,`0px`]),scale:Object.freeze([.98,1])}),out:Object.freeze({opacity:Object.freeze([1,0]),y:Object.freeze([`0px`,`calc(8px * var(--motion-displacement-scale, 1))`]),scale:Object.freeze([1,.98])})}),toast:Object.freeze({in:Object.freeze({opacity:Object.freeze([0,1]),transform:Object.freeze([`translateY(calc(var(--ui-toast-stack-offset, 0px) + var(--ui-toast-outside, -100%))) scale(var(--ui-toast-stack-scale, 1))`,`translateY(var(--ui-toast-stack-offset, 0px)) scale(var(--ui-toast-stack-scale, 1))`])}),out:Object.freeze({opacity:0,transform:`translateY(calc(var(--ui-toast-stack-offset, 0px) + var(--ui-toast-outside, -100%))) scale(var(--ui-toast-stack-scale, 1))`})}),sheet:Object.freeze({left:Object.freeze({in:Object.freeze({opacity:Object.freeze([0,1]),transform:Object.freeze([`translateX(-100%)`,`none`])}),out:Object.freeze({opacity:0,transform:`translateX(-100%)`})}),right:Object.freeze({in:Object.freeze({opacity:Object.freeze([0,1]),transform:Object.freeze([`translateX(100%)`,`none`])}),out:Object.freeze({opacity:0,transform:`translateX(100%)`})}),top:Object.freeze({in:Object.freeze({opacity:Object.freeze([0,1]),transform:Object.freeze([`translateY(-100%)`,`none`])}),out:Object.freeze({opacity:0,transform:`translateY(-100%)`})}),bottom:Object.freeze({in:Object.freeze({opacity:Object.freeze([0,1]),transform:Object.freeze([`translateY(100%)`,`none`])}),out:Object.freeze({opacity:0,transform:`translateY(100%)`})})})}),h=(e=`moderate`,t)=>{if(typeof e!=`string`)return e;if(t===void 0)return n[e];let r=u(getComputedStyle(t),`--motion-duration-${e}`);return r===void 0?n[e]:{duration:r/1e3}},g=e=>Array.isArray(e)?e[e.length-1]:e,_=`(prefers-reduced-motion: reduce)`,v=()=>typeof window>`u`||typeof window.matchMedia!=`function`?!1:window.matchMedia(_).matches,y=(e=`user`)=>e===`always`||e!==`never`&&v(),b=(e,t={},n=`user`)=>y(n)?{...e,duration:0,...t}:e;function x(e,t){e.indexOf(t)===-1&&e.push(t)}function S(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var C=(e,t,n)=>n>t?t:n<e?e:n;function w(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}var T={},ee=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),te=e=>typeof e==`object`&&!!e,ne=e=>/^0[^.\s]+$/u.test(e);function re(e){let t;return()=>(t===void 0&&(t=e()),t)}var E=e=>e,D=(...e)=>e.reduce((e,t)=>n=>t(e(n))),ie=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},ae=class{constructor(){this.subscriptions=[]}add(e){return x(this.subscriptions,e),()=>S(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},O=e=>e*1e3,k=e=>e/1e3,oe=(e,t)=>t?1e3/t*e:0,se=new Set;function ce(e,t,n){e||se.has(t)||(console.warn(w(t,n)),se.add(t))}var le=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e},ue=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,de=1e-7,fe=12;function pe(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=ue(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>de&&++s<fe);return o}function me(e,t,n,r){if(e===t&&n===r)return E;let i=t=>pe(t,0,1,e,n);return e=>e===0||e===1?e:ue(i(e),t,r)}var he=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ge=e=>t=>1-e(1-t),_e=me(.33,1.53,.69,.99),ve=ge(_e),ye=he(ve),be=e=>e>=1?1:(e*=2)<1?.5*ve(e):.5*(2-2**(-10*(e-1))),xe=e=>1-Math.sin(Math.acos(e)),Se=ge(xe),Ce=he(xe),we=me(.42,0,1,1),Te=me(0,0,.58,1),Ee=me(.42,0,.58,1),De=e=>Array.isArray(e)&&typeof e[0]!=`number`;function Oe(e,t){return De(e)?e[le(0,e.length,t)]:e}var ke=e=>Array.isArray(e)&&typeof e[0]==`number`,Ae={linear:E,easeIn:we,easeInOut:Ee,easeOut:Te,circIn:xe,circInOut:Ce,circOut:Se,backIn:ve,backInOut:ye,backOut:_e,anticipate:be},je=e=>typeof e==`string`,Me=e=>{if(ke(e)){e.length;let[t,n,r,i]=e;return me(t,n,r,i)}return je(e)?(Ae[e],`${e}`,Ae[e]):e},Ne=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function Pe(e){let t=new Set,n=new Set,r=!1,i=!1,a=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(c.schedule(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r?t:n;return i&&a.add(e),s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0;let a=t;t=n,n=a,t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}var Fe=40;function Ie(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Ne.reduce((e,t)=>(e[t]=Pe(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=T.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,Fe),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:Ne.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<Ne.length;t++)o[Ne[t]].cancel(e)},state:i,steps:o}}var{schedule:A,cancel:Le,state:Re,steps:ze}=Ie(typeof requestAnimationFrame<`u`?requestAnimationFrame:E,!0),Be;function Ve(){Be=void 0}var j={now:()=>(Be===void 0&&j.set(Re.isProcessing||T.useManualTiming?Re.timestamp:performance.now()),Be),set:e=>{Be=e,queueMicrotask(Ve)}},He=e=>t=>typeof t==`string`&&t.startsWith(e),Ue=He(`--`),We=He(`var(--`),Ge=e=>We(e)?Ke.test(e.split(`/*`)[0].trim()):!1,Ke=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function qe(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var M={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Je={...M,transform:e=>C(0,1,e)},Ye={...M,default:1},Xe=e=>Math.round(e*1e5)/1e5,Ze=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Qe(e){return e==null}var $e=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,et=(e,t)=>n=>!!(typeof n==`string`&&$e.test(n)&&n.startsWith(e)||t&&!Qe(n)&&Object.prototype.hasOwnProperty.call(n,t)),tt=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(Ze);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},nt=e=>C(0,255,e),rt={...M,transform:e=>Math.round(nt(e))},N={test:et(`rgb`,`red`),parse:tt(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+rt.transform(e)+`, `+rt.transform(t)+`, `+rt.transform(n)+`, `+Xe(Je.transform(r))+`)`};function it(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var at={test:et(`#`),parse:it,transform:N.transform},ot=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),P=ot(`deg`),st=ot(`%`),F=ot(`px`),ct=ot(`vh`),lt=ot(`vw`),ut={...st,parse:e=>st.parse(e)/100,transform:e=>st.transform(e*100)},I={test:et(`hsl`,`hue`),parse:tt(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+st.transform(Xe(t))+`, `+st.transform(Xe(n))+`, `+Xe(Je.transform(r))+`)`},L={test:e=>N.test(e)||at.test(e)||I.test(e),parse:e=>N.test(e)?N.parse(e):I.test(e)?I.parse(e):at.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?N.transform(e):I.transform(e),getAnimatableNone:e=>{let t=L.parse(e);return t.alpha=0,L.transform(t)}},dt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ft(e){return isNaN(e)&&typeof e==`string`&&(e.match(Ze)?.length||0)+(e.match(dt)?.length||0)>0}var pt=`number`,mt=`color`,ht=`var`,gt=`var(`,_t="${}",vt=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function R(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(vt,e=>(L.test(e)?(r.color.push(a),i.push(mt),n.push(L.parse(e))):e.startsWith(gt)?(r.var.push(a),i.push(ht),n.push(e)):(r.number.push(a),i.push(pt),n.push(parseFloat(e))),++a,_t)).split(_t),indexes:r,types:i}}function yt(e){return R(e).values}function bt({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];i+=e===pt?Xe(r[a]):e===mt?L.transform(r[a]):r[a]}return i}}function xt(e){return bt(R(e))}var St=e=>typeof e==`number`?0:L.test(e)?L.getAnimatableNone(e):e,Ct=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:St(e);function wt(e){let t=R(e);return bt(t)(t.values.map((e,n)=>Ct(e,t.split[n])))}var z={test:ft,parse:yt,createTransformer:xt,getAnimatableNone:wt};function Tt(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Et({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Tt(s,r,e+1/3),a=Tt(s,r,e),o=Tt(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Dt(e,t){return n=>n>0?t:e}var Ot=(e,t,n)=>e+(t-e)*n,kt=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},At=[at,N,I],jt=e=>At.find(t=>t.test(e));function Mt(e){let t=jt(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===I&&(n=Et(n)),n}var Nt=(e,t)=>{let n=Mt(e),r=Mt(t);if(!n||!r)return Dt(e,t);let i={...n};return e=>(i.red=kt(n.red,r.red,e),i.green=kt(n.green,r.green,e),i.blue=kt(n.blue,r.blue,e),i.alpha=Ot(n.alpha,r.alpha,e),N.transform(i))},Pt=new Set([`none`,`hidden`]);function Ft(e,t){return Pt.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function It(e,t){return n=>Ot(e,t,n)}function Lt(e){return typeof e==`number`?It:typeof e==`string`?Ge(e)?Dt:L.test(e)?Nt:Vt:Array.isArray(e)?Rt:typeof e==`object`?L.test(e)?Nt:zt:Dt}function Rt(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>Lt(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function zt(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Lt(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Bt(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}var Vt=(e,t)=>{let n=z.createTransformer(t),r=R(e),i=R(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Pt.has(e)&&!i.values.length||Pt.has(t)&&!r.values.length?Ft(e,t):D(Rt(Bt(r,i),i.values),n):(`${e}${t}`,Dt(e,t))};function Ht(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?Ot(e,t,n):Lt(e)(e,t)}var Ut=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>A.update(t,e),stop:()=>Le(t),now:()=>Re.isProcessing?Re.timestamp:j.now()}},Wt=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},Gt=2e4;function Kt(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function qt(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(Kt(r),Gt);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:k(i)}}var B={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Jt(e,t){return e*Math.sqrt(1-t*t)}var Yt=12;function Xt(e,t,n){let r=n;for(let n=1;n<Yt;n++)r-=e(r)/t(r);return r}var Zt=.001;function Qt({duration:e=B.duration,bounce:t=B.bounce,velocity:n=B.velocity,mass:r=B.mass}){let i,a;B.maxDuration;let o=1-t;o=C(B.minDamping,B.maxDamping,o),e=C(B.minDuration,B.maxDuration,k(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=Jt(t,o),c=Math.exp(-i);return Zt-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=Jt(t**2,o);return(-i(t)+Zt>0?-1:1)*((a-s)*c)/l}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=Xt(i,a,s);if(e=O(e),isNaN(c))return{stiffness:B.stiffness,damping:B.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var $t=[`duration`,`bounce`],en=[`stiffness`,`damping`,`mass`];function tn(e,t){return t.some(t=>e[t]!==void 0)}function nn(e){let t={velocity:B.velocity,stiffness:B.stiffness,damping:B.damping,mass:B.mass,isResolvedFromDuration:!1,...e};if(!tn(e,en)&&tn(e,$t)){if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*C(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:B.mass,stiffness:i,damping:a}}else{let n=Qt({...e,velocity:0});t={...t,...n,mass:B.mass},t.isResolvedFromDuration=!0}}return t}function V(e=B.visualDuration,t=B.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=nn({...n,velocity:-k(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=k(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?B.restSpeed.granular:B.restSpeed.default,i||=v?B.restDelta.granular:B.restDelta.default;let y,b,x,S,C,w;if(h<1)x=Jt(_,h),S=(m+h*_*g)/x,y=e=>{let t=Math.exp(-h*_*e);return o-t*(S*Math.sin(x*e)+g*Math.cos(x*e))},C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let T={calculatedDuration:p&&d||null,velocity:e=>O(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=O(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=O(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(Kt(T),Gt),t=Wt(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}V.applyToOptions=e=>{let t=qt(e,100,V);return e.ease=t.ease,e.duration=O(t.duration),e.type=`keyframes`,e};var rn=5;function an(e,t,n){let r=Math.max(t-rn,0);return oe(n-e(r),t-r)}function on({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=V({keyframes:[f.value,m(f.value)],velocity:an(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function sn(e,t,n){let r=[],i=n||T.mix||Ht,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=D(Array.isArray(t)?t[n]||E:t,a)),r.push(a)}return r}function cn(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=sn(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=ie(e[r],e[r+1],n);return s[r](i)};return n?t=>l(C(e[0],e[a-1],t)):l}function ln(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=ie(0,t,r);e.push(Ot(n,1,i))}}function un(e){let t=[0];return ln(t,e.length-1),t}function dn(e,t){return e.map(e=>e*t)}function fn(e,t){return e.map(()=>t||Ee).splice(0,e.length-1)}function pn({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=De(r)?r.map(Me):Me(r),a={done:!1,value:t[0]},o=cn(dn(n&&n.length===t.length?n:un(t),e),t,{ease:Array.isArray(i)?i:fn(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var mn=e=>e!==null;function hn(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(mn),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var gn={decay:on,inertia:on,tween:pn,keyframes:pn,spring:V};function _n(e){typeof e.type==`string`&&(e.type=gn[e.type])}var vn=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},yn=e=>e/100,bn=class extends vn{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==j.now()&&this.tick(j.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;_n(e);let{type:t=pn,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||pn;s!==pn&&typeof o[0]!=`number`&&(this.mixKeyframes=D(yn,Ht(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=Kt(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.currentTime=this.holdTime===null?t:this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=C(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==on&&(b.value=hn(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return k(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+k(e)}get time(){return k(this.currentTime)}set time(e){e=O(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return an(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(j.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=k(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=Ut,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(j.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function xn(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var H=e=>e*180/Math.PI,Sn=e=>wn(H(Math.atan2(e[1],e[0]))),Cn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Sn,rotateZ:Sn,skewX:e=>H(Math.atan(e[1])),skewY:e=>H(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},wn=e=>(e%=360,e<0&&(e+=360),e),Tn=Sn,En=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Dn=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),On={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:En,scaleY:Dn,scale:e=>(En(e)+Dn(e))/2,rotateX:e=>wn(H(Math.atan2(e[6],e[5]))),rotateY:e=>wn(H(Math.atan2(-e[2],e[0]))),rotateZ:Tn,rotate:Tn,skewX:e=>H(Math.atan(e[4])),skewY:e=>H(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function kn(e){return+!!e.includes(`scale`)}function An(e,t){if(!e||e===`none`)return kn(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=On,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Cn,i=t}if(!i)return kn(t);let a=r[t],o=i[1].split(`,`).map(Mn);return typeof a==`function`?a(o):o[a]}var jn=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return An(n,t)};function Mn(e){return parseFloat(e.trim())}var Nn=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],Pn=new Set([...Nn,`pathRotation`]),Fn=e=>e===M||e===F,In=new Set([`x`,`y`,`z`]),Ln=Nn.filter(e=>!In.has(e));function Rn(e){let t=[];return Ln.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var U={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>An(t,`x`),y:(e,{transform:t})=>An(t,`y`)};U.translateX=U.x,U.translateY=U.y;var W=new Set,zn=!1,Bn=!1,Vn=!1;function Hn(){if(Bn){let e=Array.from(W).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=Rn(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}Bn=!1,zn=!1,W.forEach(e=>e.complete(Vn)),W.clear()}function Un(){W.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Bn=!0)})}function Wn(){Vn=!0,Un(),Hn(),Vn=!1}var Gn=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(W.add(this),zn||(zn=!0,A.read(Un),A.resolveKeyframes(Hn))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}xn(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),W.delete(this)}cancel(){this.state===`scheduled`&&(W.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},Kn=e=>e.startsWith(`--`);function qn(e,t,n){Kn(t)?e.style.setProperty(t,n):e.style[t]=n}var Jn={};function Yn(e,t){let n=re(e);return()=>Jn[t]??n()}var Xn=Yn(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Zn=Yn(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Qn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,$n={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Qn([0,.65,.55,1]),circOut:Qn([.55,0,1,.45]),backIn:Qn([.31,.01,.66,-.59]),backOut:Qn([.33,1.53,.69,.99])};function er(e,t){if(e)return typeof e==`function`?Zn()?Wt(e,t):`ease-out`:ke(e)?Qn(e):Array.isArray(e)?e.map(e=>er(e,t)||$n.easeOut):$n[e]}function tr(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=er(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function nr(e){return typeof e==`function`&&`applyToOptions`in e}function rr({type:e,...t}){return nr(e)&&Zn()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var G=class extends vn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=rr(e);this.animation=tr(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=hn(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),qn(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e!==`idle`&&e!==`finished`&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return k(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+k(e)}get time(){return k(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=O(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Xn()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),E):r(this)}},ir={anticipate:be,backInOut:ye,circInOut:Ce};function ar(e){return e in ir}function or(e){typeof e.ease==`string`&&ar(e.ease)&&(e.ease=ir[e.ease])}var sr=10,cr=class extends G{constructor(e){or(e),_n(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new bn({...a,autoplay:!1}),s=Math.max(sr,j.now()-this.startTime),c=C(0,sr,s-sr),l=o.sample(s).value,{name:u}=this.options;i&&u&&qn(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},lr=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(z.test(e)||e===`0`)&&!e.startsWith(`url(`));function ur(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function dr(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=lr(i,t),s=lr(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:ur(e)||(n===`spring`||nr(n))&&r}function fr(e){e.duration=0,e.type=`keyframes`}var pr=new Set([`opacity`,`clipPath`,`filter`,`transform`,`backgroundColor`]),mr=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function hr(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&mr.test(e[t]))return!0;return!1}var gr=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),_r=re(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function vr(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e,c=t?.owner?.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return _r()&&n&&(pr.has(n)||gr.has(n)&&hr(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var yr=40,br=class extends vn{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=j.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u},f=l?.KeyframeResolver||Gn;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=j.now();let u=!0;dr(e,i,a,o)||(u=!1,(T.instantAnimations||!s)&&l?.(hn(e,n,t)),e[0]=e[e.length-1],fr(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>yr?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&vr(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new cr({...d,element:p})}catch{m=new bn(d)}else m=new bn(d);m.finished.then(()=>{this.notifyFinished()}).catch(E),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Wn()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}},xr=class{constructor(e){this.stop=()=>this.runAll(`stop`),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e){let t=this.animations.map(t=>t.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll(`time`)}set time(e){this.setAll(`time`,e)}get speed(){return this.getAll(`speed`)}set speed(e){this.setAll(`speed`,e)}get state(){return this.getAll(`state`)}get startTime(){return this.getAll(`startTime`)}get duration(){return Sr(this.animations,`duration`)}get iterationDuration(){return Sr(this.animations,`iterationDuration`)}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll(`play`)}pause(){this.runAll(`pause`)}cancel(){this.runAll(`cancel`)}complete(){this.runAll(`complete`)}};function Sr(e,t){let n=0;for(let r=0;r<e.length;r++){let i=e[r][t];i!==null&&i>n&&(n=i)}return n}var Cr=class extends xr{then(e,t){return this.finished.finally(e).then(()=>{})}},wr=class extends G{constructor(e){super(),this.animation=e,e.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()}}},Tr=new WeakMap,Er=(e,t=``)=>`${e}:${t}`;function Dr(e){let t=Tr.get(e);return t||(t=new Map,Tr.set(e,t)),t}var Or=30,kr=e=>!isNaN(parseFloat(e)),Ar={current:void 0},jr=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=j.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=j.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=kr(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new ae);let n=this.events[e].add(t);return e===`change`?()=>{n(),A.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Ar.current&&Ar.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=j.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Or)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,Or);return oe(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function K(e,t){return new jr(e,t)}function Mr(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function q(e,t){let n=e?.[t]??e?.default??e;return n===e?n:Mr(n,e)}var Nr={type:`spring`,stiffness:500,damping:25,restSpeed:10},Pr=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Fr={type:`keyframes`,duration:.8},Ir={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Lr=(e,{keyframes:t})=>t.length>2?Fr:Pn.has(e)?e.startsWith(`scale`)?Pr(t[1]):Nr:Ir,Rr=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function zr(e){for(let t in e)if(!Rr.has(t))return!0;return!1}var Br=(e,t,n,r={},i,a)=>o=>{let s=q(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=O(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};zr(s)||Object.assign(u,Lr(e,u)),u.duration&&=O(u.duration),u.repeatDelay&&=O(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(fr(u),u.delay===0&&(d=!0)),(T.instantAnimations||T.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,fr(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=hn(u.keyframes,s);if(e!==void 0){A.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new bn(u):new br(u)},Vr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Hr(e){let t=Vr.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function Ur(e,t,n=1){`${e}`;let[r,i]=Hr(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return ee(e)?parseFloat(e):e}return Ge(i)?Ur(i,t,n+1):i}function Wr(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Gr(e,t,n,r){if(typeof t==`function`){let[i,a]=Wr(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=Wr(r);t=t(n===void 0?e.custom:n,i,a)}return t}function Kr(e,t,n){let r=e.getProps();return Gr(r,t,n===void 0?r.custom:n,e)}var qr=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...Nn]),Jr=e=>Array.isArray(e);function Yr(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,K(n))}function Xr(e){return Jr(e)?e[e.length-1]||0:e}function Zr(e,t){let{transitionEnd:n={},transition:r={},...i}=Kr(e,t)||{};i={...i,...n};for(let t in i)Yr(e,t,Xr(i[t]))}var J=e=>!!(e&&e.getVelocity);function Qr(e){return!!(J(e)&&e.add)}function $r(e,t){let n=e.getValue(`willChange`);if(Qr(n))return n.add(t);if(!n&&T.WillChange){let n=new T.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function ei(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var ti=`data-`+ei(`framerAppearId`);function ni(e){return e.props[ti]}function ri({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function ii(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?Mr(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState&&e.animationState.getState()[i],p=a?.path;p&&p.animateVisualElement(e,s,a,n,d);for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&ri(f,t))continue;let o={delay:n,...q(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){A.update(()=>r.set(i));continue}let p=!1;if(window.MotionHandoffAnimation){let n=ni(e);if(n){let e=window.MotionHandoffAnimation(n,t,A);e!==null&&(o.startTime=e,p=!0)}}$r(e,t);let m=l??e.shouldReduceMotion;r.start(Br(t,r,i,m&&qr.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>A.update(()=>{o&&Zr(e,o)});d.length?Promise.all(d).then(t):t()}return d}var ai={test:e=>e===`auto`,parse:e=>e},oi=e=>t=>t.test(e),si=[M,F,st,P,lt,ct,ai],ci=e=>si.find(oi(e));function li(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||ne(e)}var ui=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function di(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(Ze)||[];if(!r)return e;let i=n.replace(r,``),a=+!!ui.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var fi=/\b([a-z-]*)\(.*?\)/gu,pi={...z,getAnimatableNone:e=>{let t=e.match(fi);return t?t.map(di).join(` `):e}},mi={...z,getAnimatableNone:e=>{let t=z.parse(e);return z.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},hi={...M,transform:Math.round},gi={borderWidth:F,borderTopWidth:F,borderRightWidth:F,borderBottomWidth:F,borderLeftWidth:F,borderRadius:F,borderTopLeftRadius:F,borderTopRightRadius:F,borderBottomRightRadius:F,borderBottomLeftRadius:F,width:F,maxWidth:F,height:F,maxHeight:F,top:F,right:F,bottom:F,left:F,inset:F,insetBlock:F,insetBlockStart:F,insetBlockEnd:F,insetInline:F,insetInlineStart:F,insetInlineEnd:F,padding:F,paddingTop:F,paddingRight:F,paddingBottom:F,paddingLeft:F,paddingBlock:F,paddingBlockStart:F,paddingBlockEnd:F,paddingInline:F,paddingInlineStart:F,paddingInlineEnd:F,margin:F,marginTop:F,marginRight:F,marginBottom:F,marginLeft:F,marginBlock:F,marginBlockStart:F,marginBlockEnd:F,marginInline:F,marginInlineStart:F,marginInlineEnd:F,fontSize:F,backgroundPositionX:F,backgroundPositionY:F,rotate:P,pathRotation:P,rotateX:P,rotateY:P,rotateZ:P,scale:Ye,scaleX:Ye,scaleY:Ye,scaleZ:Ye,skew:P,skewX:P,skewY:P,distance:F,translateX:F,translateY:F,translateZ:F,x:F,y:F,z:F,perspective:F,transformPerspective:F,opacity:Je,originX:ut,originY:ut,originZ:F,zIndex:hi,fillOpacity:Je,strokeOpacity:Je,numOctaves:hi},_i={...gi,color:L,backgroundColor:L,outlineColor:L,fill:L,stroke:L,borderColor:L,borderTopColor:L,borderRightColor:L,borderBottomColor:L,borderLeftColor:L,filter:pi,WebkitFilter:pi,mask:mi,WebkitMask:mi},vi=e=>_i[e],yi=new Set([pi,mi]);function bi(e,t){let n=vi(e);return yi.has(n)||(n=z),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var xi=new Set([`auto`,`none`,`0`]);function Si(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!xi.has(t)&&R(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=bi(n,i)}var Ci=class extends Gn{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),Ge(r))){let i=Ur(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!qr.has(n)||e.length!==2)return;let[r,i]=e,a=ci(r),o=ci(i);if(qe(r)!==qe(i)&&U[n]){this.needsMeasurement=!0;return}if(a!==o){if(Fn(a)&&Fn(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else U[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||li(e[t]))&&n.push(t);n.length&&Si(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=U[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=U[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},wi=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`],Ti=new Set([`borderWidth`,`borderTopWidth`,`borderRightWidth`,`borderBottomWidth`,`borderLeftWidth`,`borderRadius`,...wi,`width`,`maxWidth`,`height`,`maxHeight`,`top`,`right`,`bottom`,`left`,`inset`,`insetBlock`,`insetBlockStart`,`insetBlockEnd`,`insetInline`,`insetInlineStart`,`insetInlineEnd`,`padding`,`paddingTop`,`paddingRight`,`paddingBottom`,`paddingLeft`,`paddingBlock`,`paddingBlockStart`,`paddingBlockEnd`,`paddingInline`,`paddingInlineStart`,`paddingInlineEnd`,`margin`,`marginTop`,`marginRight`,`marginBottom`,`marginLeft`,`marginBlock`,`marginBlockStart`,`marginBlockEnd`,`marginInline`,`marginInlineStart`,`marginInlineEnd`,`fontSize`,`backgroundPositionX`,`backgroundPositionY`]);function Ei(e,t){for(let n=0;n<e.length;n++)typeof e[n]==`number`&&Ti.has(t)&&(e[n]=e[n]+`px`)}function Di(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var Oi=(e,t)=>t&&typeof e==`number`?t.transform(e):e,{schedule:ki,cancel:Ai}=Ie(queueMicrotask,!1);function ji(e,t){let n=window.getComputedStyle(e);return Kn(t)?n.getPropertyValue(t):n[t]}function Mi(e){return te(e)&&`ownerSVGElement`in e}function Ni(e){return Mi(e)&&e.tagName===`svg`}var Pi=[...si,L,z],Fi=e=>Pi.find(oi(e)),Ii=0,Li=()=>`motion-view-${Ii++}`,Ri=e=>e.startsWith(`motion-view-`);function zi(e,t,n){t&&(e.style?.setProperty(`view-transition-class`,t),n.push(e))}function Bi(e,t,n,r,i){if(n&&(e.style?.setProperty(`view-transition-group`,n),r.push(e),n!==`none`&&i)){let n=getComputedStyle(e);(n.overflowX!==`visible`||n.overflowY!==`visible`)&&i.add(t)}}function Vi(e,t,n,r,i,a=[],o,s=[],c){let l=Di(e);if(r)return l.map((e,l)=>{let u=t.get(e);if(u)return u;let d=r[l]??Li();return e.style?.setProperty(`view-transition-name`,d),n.push(e),t.set(e,d),zi(e,i,a),Bi(e,d,o,s,c),d});let u=l.map(e=>t.has(e)?void 0:getComputedStyle(e).getPropertyValue(`view-transition-name`));return l.map((e,r)=>{let l=t.get(e);if(l)return l;let d=u[r],f;return d&&d!==`none`&&d!==`auto`&&d!==`match-element`&&!Ri(d)?f=d:(f=Li(),e.style?.setProperty(`view-transition-name`,f),n.push(e)),t.set(e,f),zi(e,i,a),Bi(e,f,o,s,c),f})}function Hi(e,t=[],n=[]){for(let t of e)t.style?.removeProperty(`view-transition-name`);for(let e of t)e.style?.removeProperty(`view-transition-class`);for(let e of n)e.style?.removeProperty(`view-transition-group`)}function Ui(e){return e===`layout`?`group`:e===`enter`||e===`new`?`new`:`old`}var Wi={},Y=null,X={set:(e,t)=>{Wi[e]=t},commit:()=>{Y||(Y=document.createElement(`style`),Y.id=`motion-view`);let e=``;for(let t in Wi){let n=Wi[t];e+=`${t} {\n`;for(let[t,r]of Object.entries(n))e+=` ${t}: ${r};\n`;e+=`}
|
|
1
|
+
import{f as e,p as t}from"./ui-B3f-Nt9P.js";var n=Object.freeze({fast:Object.freeze({duration:.08}),moderate:Object.freeze({duration:.16}),slow:Object.freeze({duration:.24})}),r={out:[.23,1,.32,1],inOut:[.77,0,.175,1]},i=Object.freeze({feedback:Object.freeze({duration:n.fast.duration,ease:r.out}),presence:Object.freeze({duration:n.moderate.duration,ease:r.out}),presenceEmphasized:Object.freeze({duration:n.slow.duration,ease:r.out}),layout:Object.freeze({duration:n.moderate.duration,ease:r.inOut}),layoutQuick:Object.freeze({duration:n.fast.duration,ease:r.inOut}),layoutSpring:Object.freeze({visualDuration:n.moderate.duration,bounce:0}),resize:Object.freeze({visualDuration:n.moderate.duration,bounce:0}),gestureExit:Object.freeze({duration:n.moderate.duration,ease:r.out}),gestureSettle:Object.freeze({visualDuration:n.slow.duration,bounce:0})}),a=new Set([`layoutSpring`,`resize`,`gestureSettle`]),o=new Set([`feedback`,`presence`,`presenceEmphasized`,`layout`,`layoutQuick`,`layoutSpring`,`resize`,`gestureSettle`]),s={feedback:`feedback`,presence:`presence`,presenceEmphasized:`presence-emphasized`,layout:`layout`,layoutQuick:`layout-quick`,layoutSpring:`layout-spring`,resize:`resize`,gestureExit:`gesture-exit`,gestureSettle:`gesture-settle`},c={feedback:`fast`,presence:`moderate`,presenceEmphasized:`slow`,layout:`moderate`,layoutQuick:`fast`,layoutSpring:`moderate`,resize:`moderate`,gestureExit:`moderate`,gestureSettle:`slow`},l=(e,t)=>{let n=Number.parseFloat(e.getPropertyValue(t));return Number.isFinite(n)?n:void 0},u=(e,t)=>{let n=e.getPropertyValue(t).trim().toLowerCase(),r=Number.parseFloat(n);if(Number.isFinite(r))return n.endsWith(`ms`)?r:n.endsWith(`s`)?r*1e3:r},d=(e,t)=>{let n=getComputedStyle(e),r=u(n,`--motion-duration-${c[t]}`),d=l(n,`--motion-bounce-${s[t]}`),f=i[t];return a.has(t)||o.has(t)&&(d??0)>0?{visualDuration:r===void 0?`visualDuration`in f?f.visualDuration:f.duration:r/1e3,bounce:d??(`bounce`in f?f.bounce:0)}:{duration:r===void 0?`duration`in f?f.duration:f.visualDuration:r/1e3,...`ease`in f?{ease:f.ease}:{}}},f=(e,t)=>a.has(e)||t!==void 0&&o.has(e)&&(l(getComputedStyle(t),`--motion-bounce-${s[e]}`)??0)>0,p=(e,t)=>d(e,t),m=Object.freeze({opacity:Object.freeze({in:Object.freeze({opacity:Object.freeze([0,1])}),out:Object.freeze({opacity:Object.freeze([1,0])})}),popover:Object.freeze({in:Object.freeze({opacity:Object.freeze([0,1]),scale:Object.freeze([.97,1])}),out:Object.freeze({opacity:Object.freeze([1,0]),scale:Object.freeze([1,.97])})}),modal:Object.freeze({in:Object.freeze({opacity:Object.freeze([0,1]),y:Object.freeze([`calc(8px * var(--motion-displacement-scale, 1))`,`0px`]),scale:Object.freeze([.98,1])}),out:Object.freeze({opacity:Object.freeze([1,0]),y:Object.freeze([`0px`,`calc(8px * var(--motion-displacement-scale, 1))`]),scale:Object.freeze([1,.98])})}),toast:Object.freeze({in:Object.freeze({opacity:Object.freeze([0,1]),transform:Object.freeze([`translateY(calc(var(--ui-toast-stack-offset, 0px) + var(--ui-toast-outside, -100%))) scale(var(--ui-toast-stack-scale, 1))`,`translateY(var(--ui-toast-stack-offset, 0px)) scale(var(--ui-toast-stack-scale, 1))`])}),out:Object.freeze({opacity:0,transform:`translateY(calc(var(--ui-toast-stack-offset, 0px) + var(--ui-toast-outside, -100%))) scale(var(--ui-toast-stack-scale, 1))`})}),sheet:Object.freeze({left:Object.freeze({in:Object.freeze({opacity:Object.freeze([0,1]),transform:Object.freeze([`translateX(-100%)`,`none`])}),out:Object.freeze({opacity:0,transform:`translateX(-100%)`})}),right:Object.freeze({in:Object.freeze({opacity:Object.freeze([0,1]),transform:Object.freeze([`translateX(100%)`,`none`])}),out:Object.freeze({opacity:0,transform:`translateX(100%)`})}),top:Object.freeze({in:Object.freeze({opacity:Object.freeze([0,1]),transform:Object.freeze([`translateY(-100%)`,`none`])}),out:Object.freeze({opacity:0,transform:`translateY(-100%)`})}),bottom:Object.freeze({in:Object.freeze({opacity:Object.freeze([0,1]),transform:Object.freeze([`translateY(100%)`,`none`])}),out:Object.freeze({opacity:0,transform:`translateY(100%)`})})})}),h=(e=`moderate`,t)=>{if(typeof e!=`string`)return e;if(t===void 0)return n[e];let r=u(getComputedStyle(t),`--motion-duration-${e}`);return r===void 0?n[e]:{duration:r/1e3}},g=e=>Array.isArray(e)?e[e.length-1]:e,_=`(prefers-reduced-motion: reduce)`,v=()=>typeof window>`u`||typeof window.matchMedia!=`function`?!1:window.matchMedia(_).matches,y=(e=`user`)=>e===`always`||e!==`never`&&v(),b=(e,t={},n=`user`)=>y(n)?{...e,duration:0,...t}:e;function x(e,t){e.indexOf(t)===-1&&e.push(t)}function S(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var C=(e,t,n)=>n>t?t:n<e?e:n;function w(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}var T={},ee=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),te=e=>typeof e==`object`&&!!e,ne=e=>/^0[^.\s]+$/u.test(e);function re(e){let t;return()=>(t===void 0&&(t=e()),t)}var E=e=>e,D=(...e)=>e.reduce((e,t)=>n=>t(e(n))),ie=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},ae=class{constructor(){this.subscriptions=[]}add(e){return x(this.subscriptions,e),()=>S(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},O=e=>e*1e3,k=e=>e/1e3,oe=(e,t)=>t?1e3/t*e:0,se=new Set;function ce(e,t,n){e||se.has(t)||(console.warn(w(t,n)),se.add(t))}var le=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e},ue=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,de=1e-7,fe=12;function pe(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=ue(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>de&&++s<fe);return o}function me(e,t,n,r){if(e===t&&n===r)return E;let i=t=>pe(t,0,1,e,n);return e=>e===0||e===1?e:ue(i(e),t,r)}var he=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ge=e=>t=>1-e(1-t),_e=me(.33,1.53,.69,.99),ve=ge(_e),ye=he(ve),be=e=>e>=1?1:(e*=2)<1?.5*ve(e):.5*(2-2**(-10*(e-1))),xe=e=>1-Math.sin(Math.acos(e)),Se=ge(xe),Ce=he(xe),we=me(.42,0,1,1),Te=me(0,0,.58,1),Ee=me(.42,0,.58,1),De=e=>Array.isArray(e)&&typeof e[0]!=`number`;function Oe(e,t){return De(e)?e[le(0,e.length,t)]:e}var ke=e=>Array.isArray(e)&&typeof e[0]==`number`,Ae={linear:E,easeIn:we,easeInOut:Ee,easeOut:Te,circIn:xe,circInOut:Ce,circOut:Se,backIn:ve,backInOut:ye,backOut:_e,anticipate:be},je=e=>typeof e==`string`,Me=e=>{if(ke(e)){e.length;let[t,n,r,i]=e;return me(t,n,r,i)}return je(e)?(Ae[e],`${e}`,Ae[e]):e},Ne=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function Pe(e){let t=new Set,n=new Set,r=!1,i=!1,a=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(c.schedule(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r?t:n;return i&&a.add(e),s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0;let a=t;t=n,n=a,t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}var Fe=40;function Ie(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Ne.reduce((e,t)=>(e[t]=Pe(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=T.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,Fe),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:Ne.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<Ne.length;t++)o[Ne[t]].cancel(e)},state:i,steps:o}}var{schedule:A,cancel:Le,state:Re,steps:ze}=Ie(typeof requestAnimationFrame<`u`?requestAnimationFrame:E,!0),Be;function Ve(){Be=void 0}var j={now:()=>(Be===void 0&&j.set(Re.isProcessing||T.useManualTiming?Re.timestamp:performance.now()),Be),set:e=>{Be=e,queueMicrotask(Ve)}},He=e=>t=>typeof t==`string`&&t.startsWith(e),Ue=He(`--`),We=He(`var(--`),Ge=e=>We(e)?Ke.test(e.split(`/*`)[0].trim()):!1,Ke=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function qe(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var M={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Je={...M,transform:e=>C(0,1,e)},Ye={...M,default:1},Xe=e=>Math.round(e*1e5)/1e5,Ze=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Qe(e){return e==null}var $e=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,et=(e,t)=>n=>!!(typeof n==`string`&&$e.test(n)&&n.startsWith(e)||t&&!Qe(n)&&Object.prototype.hasOwnProperty.call(n,t)),tt=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(Ze);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},nt=e=>C(0,255,e),rt={...M,transform:e=>Math.round(nt(e))},N={test:et(`rgb`,`red`),parse:tt(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+rt.transform(e)+`, `+rt.transform(t)+`, `+rt.transform(n)+`, `+Xe(Je.transform(r))+`)`};function it(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var at={test:et(`#`),parse:it,transform:N.transform},ot=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),P=ot(`deg`),st=ot(`%`),F=ot(`px`),ct=ot(`vh`),lt=ot(`vw`),ut={...st,parse:e=>st.parse(e)/100,transform:e=>st.transform(e*100)},I={test:et(`hsl`,`hue`),parse:tt(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+st.transform(Xe(t))+`, `+st.transform(Xe(n))+`, `+Xe(Je.transform(r))+`)`},L={test:e=>N.test(e)||at.test(e)||I.test(e),parse:e=>N.test(e)?N.parse(e):I.test(e)?I.parse(e):at.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?N.transform(e):I.transform(e),getAnimatableNone:e=>{let t=L.parse(e);return t.alpha=0,L.transform(t)}},dt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ft(e){return isNaN(e)&&typeof e==`string`&&(e.match(Ze)?.length||0)+(e.match(dt)?.length||0)>0}var pt=`number`,mt=`color`,ht=`var`,gt=`var(`,_t="${}",vt=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function R(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(vt,e=>(L.test(e)?(r.color.push(a),i.push(mt),n.push(L.parse(e))):e.startsWith(gt)?(r.var.push(a),i.push(ht),n.push(e)):(r.number.push(a),i.push(pt),n.push(parseFloat(e))),++a,_t)).split(_t),indexes:r,types:i}}function yt(e){return R(e).values}function bt({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];i+=e===pt?Xe(r[a]):e===mt?L.transform(r[a]):r[a]}return i}}function xt(e){return bt(R(e))}var St=e=>typeof e==`number`?0:L.test(e)?L.getAnimatableNone(e):e,Ct=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:St(e);function wt(e){let t=R(e);return bt(t)(t.values.map((e,n)=>Ct(e,t.split[n])))}var z={test:ft,parse:yt,createTransformer:xt,getAnimatableNone:wt};function Tt(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Et({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Tt(s,r,e+1/3),a=Tt(s,r,e),o=Tt(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Dt(e,t){return n=>n>0?t:e}var Ot=(e,t,n)=>e+(t-e)*n,kt=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},At=[at,N,I],jt=e=>At.find(t=>t.test(e));function Mt(e){let t=jt(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===I&&(n=Et(n)),n}var Nt=(e,t)=>{let n=Mt(e),r=Mt(t);if(!n||!r)return Dt(e,t);let i={...n};return e=>(i.red=kt(n.red,r.red,e),i.green=kt(n.green,r.green,e),i.blue=kt(n.blue,r.blue,e),i.alpha=Ot(n.alpha,r.alpha,e),N.transform(i))},Pt=new Set([`none`,`hidden`]);function Ft(e,t){return Pt.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function It(e,t){return n=>Ot(e,t,n)}function Lt(e){return typeof e==`number`?It:typeof e==`string`?Ge(e)?Dt:L.test(e)?Nt:Vt:Array.isArray(e)?Rt:typeof e==`object`?L.test(e)?Nt:zt:Dt}function Rt(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>Lt(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function zt(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Lt(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Bt(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}var Vt=(e,t)=>{let n=z.createTransformer(t),r=R(e),i=R(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Pt.has(e)&&!i.values.length||Pt.has(t)&&!r.values.length?Ft(e,t):D(Rt(Bt(r,i),i.values),n):(`${e}${t}`,Dt(e,t))};function Ht(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?Ot(e,t,n):Lt(e)(e,t)}var Ut=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>A.update(t,e),stop:()=>Le(t),now:()=>Re.isProcessing?Re.timestamp:j.now()}},Wt=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},Gt=2e4;function Kt(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function qt(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(Kt(r),Gt);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:k(i)}}var B={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Jt(e,t){return e*Math.sqrt(1-t*t)}var Yt=12;function Xt(e,t,n){let r=n;for(let n=1;n<Yt;n++)r-=e(r)/t(r);return r}var Zt=.001;function Qt({duration:e=B.duration,bounce:t=B.bounce,velocity:n=B.velocity,mass:r=B.mass}){let i,a;B.maxDuration;let o=1-t;o=C(B.minDamping,B.maxDamping,o),e=C(B.minDuration,B.maxDuration,k(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=Jt(t,o),c=Math.exp(-i);return Zt-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=Jt(t**2,o);return(-i(t)+Zt>0?-1:1)*((a-s)*c)/l}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=Xt(i,a,s);if(e=O(e),isNaN(c))return{stiffness:B.stiffness,damping:B.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var $t=[`duration`,`bounce`],en=[`stiffness`,`damping`,`mass`];function tn(e,t){return t.some(t=>e[t]!==void 0)}function nn(e){let t={velocity:B.velocity,stiffness:B.stiffness,damping:B.damping,mass:B.mass,isResolvedFromDuration:!1,...e};if(!tn(e,en)&&tn(e,$t)){if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*C(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:B.mass,stiffness:i,damping:a}}else{let n=Qt({...e,velocity:0});t={...t,...n,mass:B.mass},t.isResolvedFromDuration=!0}}return t}function V(e=B.visualDuration,t=B.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=nn({...n,velocity:-k(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=k(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?B.restSpeed.granular:B.restSpeed.default,i||=v?B.restDelta.granular:B.restDelta.default;let y,b,x,S,C,w;if(h<1)x=Jt(_,h),S=(m+h*_*g)/x,y=e=>{let t=Math.exp(-h*_*e);return o-t*(S*Math.sin(x*e)+g*Math.cos(x*e))},C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let T={calculatedDuration:p&&d||null,velocity:e=>O(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=O(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=O(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(Kt(T),Gt),t=Wt(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}V.applyToOptions=e=>{let t=qt(e,100,V);return e.ease=t.ease,e.duration=O(t.duration),e.type=`keyframes`,e};var rn=5;function an(e,t,n){let r=Math.max(t-rn,0);return oe(n-e(r),t-r)}function on({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=V({keyframes:[f.value,m(f.value)],velocity:an(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function sn(e,t,n){let r=[],i=n||T.mix||Ht,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=D(Array.isArray(t)?t[n]||E:t,a)),r.push(a)}return r}function cn(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=sn(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=ie(e[r],e[r+1],n);return s[r](i)};return n?t=>l(C(e[0],e[a-1],t)):l}function ln(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=ie(0,t,r);e.push(Ot(n,1,i))}}function un(e){let t=[0];return ln(t,e.length-1),t}function dn(e,t){return e.map(e=>e*t)}function fn(e,t){return e.map(()=>t||Ee).splice(0,e.length-1)}function pn({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=De(r)?r.map(Me):Me(r),a={done:!1,value:t[0]},o=cn(dn(n&&n.length===t.length?n:un(t),e),t,{ease:Array.isArray(i)?i:fn(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var mn=e=>e!==null;function hn(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(mn),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var gn={decay:on,inertia:on,tween:pn,keyframes:pn,spring:V};function _n(e){typeof e.type==`string`&&(e.type=gn[e.type])}var vn=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},yn=e=>e/100,bn=class extends vn{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==j.now()&&this.tick(j.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;_n(e);let{type:t=pn,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||pn;s!==pn&&typeof o[0]!=`number`&&(this.mixKeyframes=D(yn,Ht(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=Kt(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.currentTime=this.holdTime===null?t:this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=C(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==on&&(b.value=hn(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return k(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+k(e)}get time(){return k(this.currentTime)}set time(e){e=O(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return an(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(j.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=k(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=Ut,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(j.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function xn(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var H=e=>e*180/Math.PI,Sn=e=>wn(H(Math.atan2(e[1],e[0]))),Cn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Sn,rotateZ:Sn,skewX:e=>H(Math.atan(e[1])),skewY:e=>H(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},wn=e=>(e%=360,e<0&&(e+=360),e),Tn=Sn,En=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Dn=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),On={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:En,scaleY:Dn,scale:e=>(En(e)+Dn(e))/2,rotateX:e=>wn(H(Math.atan2(e[6],e[5]))),rotateY:e=>wn(H(Math.atan2(-e[2],e[0]))),rotateZ:Tn,rotate:Tn,skewX:e=>H(Math.atan(e[4])),skewY:e=>H(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function kn(e){return+!!e.includes(`scale`)}function An(e,t){if(!e||e===`none`)return kn(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=On,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Cn,i=t}if(!i)return kn(t);let a=r[t],o=i[1].split(`,`).map(Mn);return typeof a==`function`?a(o):o[a]}var jn=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return An(n,t)};function Mn(e){return parseFloat(e.trim())}var Nn=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],Pn=new Set([...Nn,`pathRotation`]),Fn=e=>e===M||e===F,In=new Set([`x`,`y`,`z`]),Ln=Nn.filter(e=>!In.has(e));function Rn(e){let t=[];return Ln.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var U={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>An(t,`x`),y:(e,{transform:t})=>An(t,`y`)};U.translateX=U.x,U.translateY=U.y;var W=new Set,zn=!1,Bn=!1,Vn=!1;function Hn(){if(Bn){let e=Array.from(W).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=Rn(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}Bn=!1,zn=!1,W.forEach(e=>e.complete(Vn)),W.clear()}function Un(){W.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Bn=!0)})}function Wn(){Vn=!0,Un(),Hn(),Vn=!1}var Gn=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(W.add(this),zn||(zn=!0,A.read(Un),A.resolveKeyframes(Hn))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}xn(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),W.delete(this)}cancel(){this.state===`scheduled`&&(W.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},Kn=e=>e.startsWith(`--`);function qn(e,t,n){Kn(t)?e.style.setProperty(t,n):e.style[t]=n}var Jn={};function Yn(e,t){let n=re(e);return()=>Jn[t]??n()}var Xn=Yn(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Zn=Yn(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Qn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,$n={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Qn([0,.65,.55,1]),circOut:Qn([.55,0,1,.45]),backIn:Qn([.31,.01,.66,-.59]),backOut:Qn([.33,1.53,.69,.99])};function er(e,t){if(e)return typeof e==`function`?Zn()?Wt(e,t):`ease-out`:ke(e)?Qn(e):Array.isArray(e)?e.map(e=>er(e,t)||$n.easeOut):$n[e]}function tr(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=er(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function nr(e){return typeof e==`function`&&`applyToOptions`in e}function rr({type:e,...t}){return nr(e)&&Zn()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var G=class extends vn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=rr(e);this.animation=tr(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=hn(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),qn(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e!==`idle`&&e!==`finished`&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return k(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+k(e)}get time(){return k(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=O(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Xn()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),E):r(this)}},ir={anticipate:be,backInOut:ye,circInOut:Ce};function ar(e){return e in ir}function or(e){typeof e.ease==`string`&&ar(e.ease)&&(e.ease=ir[e.ease])}var sr=10,cr=class extends G{constructor(e){or(e),_n(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new bn({...a,autoplay:!1}),s=Math.max(sr,j.now()-this.startTime),c=C(0,sr,s-sr),l=o.sample(s).value,{name:u}=this.options;i&&u&&qn(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},lr=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(z.test(e)||e===`0`)&&!e.startsWith(`url(`));function ur(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function dr(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=lr(i,t),s=lr(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:ur(e)||(n===`spring`||nr(n))&&r}function fr(e){e.duration=0,e.type=`keyframes`}var pr=new Set([`opacity`,`clipPath`,`filter`,`transform`,`backgroundColor`]),mr=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function hr(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&mr.test(e[t]))return!0;return!1}var gr=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),_r=re(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function vr(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e,c=t?.owner?.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return _r()&&n&&(pr.has(n)||gr.has(n)&&hr(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var yr=40,br=class extends vn{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=j.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u},f=l?.KeyframeResolver||Gn;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=j.now();let u=!0;dr(e,i,a,o)||(u=!1,(T.instantAnimations||!s)&&l?.(hn(e,n,t)),e[0]=e[e.length-1],fr(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>yr?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&vr(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new cr({...d,element:p})}catch{m=new bn(d)}else m=new bn(d);m.finished.then(()=>{this.notifyFinished()}).catch(E),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Wn()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}},xr=class{constructor(e){this.stop=()=>this.runAll(`stop`),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e){let t=this.animations.map(t=>t.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll(`time`)}set time(e){this.setAll(`time`,e)}get speed(){return this.getAll(`speed`)}set speed(e){this.setAll(`speed`,e)}get state(){return this.getAll(`state`)}get startTime(){return this.getAll(`startTime`)}get duration(){return Sr(this.animations,`duration`)}get iterationDuration(){return Sr(this.animations,`iterationDuration`)}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll(`play`)}pause(){this.runAll(`pause`)}cancel(){this.runAll(`cancel`)}complete(){this.runAll(`complete`)}};function Sr(e,t){let n=0;for(let r=0;r<e.length;r++){let i=e[r][t];i!==null&&i>n&&(n=i)}return n}var Cr=class extends xr{then(e,t){return this.finished.finally(e).then(()=>{})}},wr=class extends G{constructor(e){super(),this.animation=e,e.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()}}},Tr=new WeakMap,Er=(e,t=``)=>`${e}:${t}`;function Dr(e){let t=Tr.get(e);return t||(t=new Map,Tr.set(e,t)),t}var Or=30,kr=e=>!isNaN(parseFloat(e)),Ar={current:void 0},jr=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=j.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=j.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=kr(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new ae);let n=this.events[e].add(t);return e===`change`?()=>{n(),A.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Ar.current&&Ar.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=j.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Or)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,Or);return oe(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function K(e,t){return new jr(e,t)}function Mr(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function q(e,t){let n=e?.[t]??e?.default??e;return n===e?n:Mr(n,e)}var Nr={type:`spring`,stiffness:500,damping:25,restSpeed:10},Pr=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Fr={type:`keyframes`,duration:.8},Ir={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Lr=(e,{keyframes:t})=>t.length>2?Fr:Pn.has(e)?e.startsWith(`scale`)?Pr(t[1]):Nr:Ir,Rr=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function zr(e){for(let t in e)if(!Rr.has(t))return!0;return!1}var Br=(e,t,n,r={},i,a)=>o=>{let s=q(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=O(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};zr(s)||Object.assign(u,Lr(e,u)),u.duration&&=O(u.duration),u.repeatDelay&&=O(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(fr(u),u.delay===0&&(d=!0)),(T.instantAnimations||T.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,fr(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=hn(u.keyframes,s);if(e!==void 0){A.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new bn(u):new br(u)},Vr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Hr(e){let t=Vr.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function Ur(e,t,n=1){`${e}`;let[r,i]=Hr(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return ee(e)?parseFloat(e):e}return Ge(i)?Ur(i,t,n+1):i}function Wr(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Gr(e,t,n,r){if(typeof t==`function`){let[i,a]=Wr(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=Wr(r);t=t(n===void 0?e.custom:n,i,a)}return t}function Kr(e,t,n){let r=e.getProps();return Gr(r,t,n===void 0?r.custom:n,e)}var qr=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...Nn]),Jr=e=>Array.isArray(e);function Yr(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,K(n))}function Xr(e){return Jr(e)?e[e.length-1]||0:e}function Zr(e,t){let{transitionEnd:n={},transition:r={},...i}=Kr(e,t)||{};i={...i,...n};for(let t in i)Yr(e,t,Xr(i[t]))}var J=e=>!!(e&&e.getVelocity);function Qr(e){return!!(J(e)&&e.add)}function $r(e,t){let n=e.getValue(`willChange`);if(Qr(n))return n.add(t);if(!n&&T.WillChange){let n=new T.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function ei(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var ti=`data-`+ei(`framerAppearId`);function ni(e){return e.props[ti]}function ri({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function ii(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?Mr(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState&&e.animationState.getState()[i],p=a?.path;p&&p.animateVisualElement(e,s,a,n,d);for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&ri(f,t))continue;let o={delay:n,...q(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){A.update(()=>r.set(i));continue}let p=!1;if(window.MotionHandoffAnimation){let n=ni(e);if(n){let e=window.MotionHandoffAnimation(n,t,A);e!==null&&(o.startTime=e,p=!0)}}$r(e,t);let m=l??e.shouldReduceMotion;r.start(Br(t,r,i,m&&qr.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>A.update(()=>{o&&Zr(e,o)});d.length?Promise.all(d).then(t):t()}return d}var ai={test:e=>e===`auto`,parse:e=>e},oi=e=>t=>t.test(e),si=[M,F,st,P,lt,ct,ai],ci=e=>si.find(oi(e));function li(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||ne(e)}var ui=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function di(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(Ze)||[];if(!r)return e;let i=n.replace(r,``),a=+!!ui.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var fi=/\b([a-z-]*)\(.*?\)/gu,pi={...z,getAnimatableNone:e=>{let t=e.match(fi);return t?t.map(di).join(` `):e}},mi={...z,getAnimatableNone:e=>{let t=z.parse(e);return z.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},hi={...M,transform:Math.round},gi={borderWidth:F,borderTopWidth:F,borderRightWidth:F,borderBottomWidth:F,borderLeftWidth:F,borderRadius:F,borderTopLeftRadius:F,borderTopRightRadius:F,borderBottomRightRadius:F,borderBottomLeftRadius:F,width:F,maxWidth:F,height:F,maxHeight:F,top:F,right:F,bottom:F,left:F,inset:F,insetBlock:F,insetBlockStart:F,insetBlockEnd:F,insetInline:F,insetInlineStart:F,insetInlineEnd:F,padding:F,paddingTop:F,paddingRight:F,paddingBottom:F,paddingLeft:F,paddingBlock:F,paddingBlockStart:F,paddingBlockEnd:F,paddingInline:F,paddingInlineStart:F,paddingInlineEnd:F,margin:F,marginTop:F,marginRight:F,marginBottom:F,marginLeft:F,marginBlock:F,marginBlockStart:F,marginBlockEnd:F,marginInline:F,marginInlineStart:F,marginInlineEnd:F,fontSize:F,backgroundPositionX:F,backgroundPositionY:F,rotate:P,pathRotation:P,rotateX:P,rotateY:P,rotateZ:P,scale:Ye,scaleX:Ye,scaleY:Ye,scaleZ:Ye,skew:P,skewX:P,skewY:P,distance:F,translateX:F,translateY:F,translateZ:F,x:F,y:F,z:F,perspective:F,transformPerspective:F,opacity:Je,originX:ut,originY:ut,originZ:F,zIndex:hi,fillOpacity:Je,strokeOpacity:Je,numOctaves:hi},_i={...gi,color:L,backgroundColor:L,outlineColor:L,fill:L,stroke:L,borderColor:L,borderTopColor:L,borderRightColor:L,borderBottomColor:L,borderLeftColor:L,filter:pi,WebkitFilter:pi,mask:mi,WebkitMask:mi},vi=e=>_i[e],yi=new Set([pi,mi]);function bi(e,t){let n=vi(e);return yi.has(n)||(n=z),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var xi=new Set([`auto`,`none`,`0`]);function Si(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!xi.has(t)&&R(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=bi(n,i)}var Ci=class extends Gn{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),Ge(r))){let i=Ur(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!qr.has(n)||e.length!==2)return;let[r,i]=e,a=ci(r),o=ci(i);if(qe(r)!==qe(i)&&U[n]){this.needsMeasurement=!0;return}if(a!==o){if(Fn(a)&&Fn(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else U[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||li(e[t]))&&n.push(t);n.length&&Si(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=U[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=U[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},wi=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`],Ti=new Set([`borderWidth`,`borderTopWidth`,`borderRightWidth`,`borderBottomWidth`,`borderLeftWidth`,`borderRadius`,...wi,`width`,`maxWidth`,`height`,`maxHeight`,`top`,`right`,`bottom`,`left`,`inset`,`insetBlock`,`insetBlockStart`,`insetBlockEnd`,`insetInline`,`insetInlineStart`,`insetInlineEnd`,`padding`,`paddingTop`,`paddingRight`,`paddingBottom`,`paddingLeft`,`paddingBlock`,`paddingBlockStart`,`paddingBlockEnd`,`paddingInline`,`paddingInlineStart`,`paddingInlineEnd`,`margin`,`marginTop`,`marginRight`,`marginBottom`,`marginLeft`,`marginBlock`,`marginBlockStart`,`marginBlockEnd`,`marginInline`,`marginInlineStart`,`marginInlineEnd`,`fontSize`,`backgroundPositionX`,`backgroundPositionY`]);function Ei(e,t){for(let n=0;n<e.length;n++)typeof e[n]==`number`&&Ti.has(t)&&(e[n]=e[n]+`px`)}function Di(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var Oi=(e,t)=>t&&typeof e==`number`?t.transform(e):e,{schedule:ki,cancel:Ai}=Ie(queueMicrotask,!1);function ji(e,t){let n=window.getComputedStyle(e);return Kn(t)?n.getPropertyValue(t):n[t]}function Mi(e){return te(e)&&`ownerSVGElement`in e}function Ni(e){return Mi(e)&&e.tagName===`svg`}var Pi=[...si,L,z],Fi=e=>Pi.find(oi(e)),Ii=0,Li=()=>`motion-view-${Ii++}`,Ri=e=>e.startsWith(`motion-view-`);function zi(e,t,n){t&&(e.style?.setProperty(`view-transition-class`,t),n.push(e))}function Bi(e,t,n,r,i){if(n&&(e.style?.setProperty(`view-transition-group`,n),r.push(e),n!==`none`&&i)){let n=getComputedStyle(e);(n.overflowX!==`visible`||n.overflowY!==`visible`)&&i.add(t)}}function Vi(e,t,n,r,i,a=[],o,s=[],c){let l=Di(e);if(r)return l.map((e,l)=>{let u=t.get(e);if(u)return u;let d=r[l]??Li();return e.style?.setProperty(`view-transition-name`,d),n.push(e),t.set(e,d),zi(e,i,a),Bi(e,d,o,s,c),d});let u=l.map(e=>t.has(e)?void 0:getComputedStyle(e).getPropertyValue(`view-transition-name`));return l.map((e,r)=>{let l=t.get(e);if(l)return l;let d=u[r],f;return d&&d!==`none`&&d!==`auto`&&d!==`match-element`&&!Ri(d)?f=d:(f=Li(),e.style?.setProperty(`view-transition-name`,f),n.push(e)),t.set(e,f),zi(e,i,a),Bi(e,f,o,s,c),f})}function Hi(e,t=[],n=[]){for(let t of e)t.style?.removeProperty(`view-transition-name`);for(let e of t)e.style?.removeProperty(`view-transition-class`);for(let e of n)e.style?.removeProperty(`view-transition-group`)}function Ui(e){return e===`layout`?`group`:e===`enter`||e===`new`?`new`:`old`}var Wi={},Y=null,X={set:(e,t)=>{Wi[e]=t},commit:()=>{Y||(Y=document.createElement(`style`),Y.id=`motion-view`);let e=``;for(let t in Wi){let n=Wi[t];e+=`${t} {\n`;for(let[t,r]of Object.entries(n))e+=` ${t}: ${r};\n`;e+=`}
|
|
2
2
|
`}Y.textContent=e,document.head.appendChild(Y),Wi={}},remove:()=>{Y&&Y.parentElement&&Y.parentElement.removeChild(Y)}};function Gi(e){let t=e.match(/::view-transition-(old|new|group-children|group|image-pair)\((.*?)\)/);return t?{layer:t[2],type:t[1]}:null}function Ki(){return document.getAnimations().filter(e=>{let{effect:t}=e;return!!t&&t.target===document.documentElement&&t.pseudoElement?.startsWith(`::view-transition`)})}function qi(e,t){return t.has(e)&&Object.keys(t.get(e)).length>0}var Ji=[`layout`,`enter`,`exit`,`new`,`old`],Yi=e=>e.split(` `).every(e=>parseFloat(e)===0),Xi={group:[`layout`],new:[`new`,`enter`],old:[`old`,`exit`]},Zi={new:{opacity:0,scale:.85},old:{opacity:1,scale:1}},Qi=.2;function $i(e){let{update:t,targets:n,resolveDefs:r,cropOverride:i,pairs:a,classNames:o,flatGroups:s,options:c}=e;if(!document.startViewTransition)return(async()=>(await t(),new xr([])))();let l=new Map,u=[],d=[],f=[],p=new Set,m=new Map,h=new Set,g=new Map,_=new Map,v=new Map,y=new Map,b=e=>{n.forEach((t,n)=>{let c=o.get(n),h=n===`root`||!r.has(n)?void 0:s.has(n)?`none`:`contain`,b;if(n===`root`||!r.has(n))b=[n];else if(a.has(n)){if(e===`old`)y.set(n,Di(n)),b=Vi(n,l,u,void 0,c,d,h,f,p),v.set(n,b);else{for(let e of y.get(n)??[])e.style?.removeProperty(`view-transition-name`),l.delete(e);b=Vi(a.get(n),l,u,v.get(n),c,d,h,f,p)}}else b=Vi(n,l,u,void 0,c,d,h,f,p);let x=i.get(n);b.forEach((n,r)=>{let i=m.get(n);m.set(n,i&&i!==t?{...i,...t}:t),x!==void 0&&g.set(n,x);let a=_.get(n)??{};a[e]=[r,b.length],_.set(n,a)})})},x=(e,t)=>{let n=_.get(e);return(t===`old`?n?.old:t===`new`?n?.new:n?.new??n?.old)??[-1,1]},S=(e,t,n,r,i)=>{let a=ta(q(c,n),q(ea(e,t)??{},n));return typeof a.delay==`function`&&(a.delay=a.delay(r,i)),a},C=e=>{let[t,n]=x(e,`group`),r=S(m.get(e),`group`,`layout`,t===-1?0:t,n);r.duration&&=O(r.duration);let{delay:i=0,duration:a,ease:o}=rr(r);return{delay:O(i),duration:a,ease:o}},w=new Map,T=e=>l.forEach((t,n)=>{let r=n,i=r.getBoundingClientRect?.();if(i&&i.height){let n=getComputedStyle(r),a={};for(let e of wi)a[e]=n[e];let o=w.get(t)??{};o[e]={width:i.width,height:i.height,radii:a},w.set(t,o)}}),ee=()=>{h.clear();for(let e of _.keys())e!==`root`&&(g.get(e)??te(e))&&h.add(e)},te=e=>{let t=w.get(e);return!t?.old||!t?.new||!t.old.height||!t.new.height?!1:Math.abs(t.old.width/t.old.height-t.new.width/t.new.height)>Qi},ne=()=>{qi(`root`,n)||X.set(`:root`,{"view-transition-name":`none`}),X.set(`::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)`,{"animation-timing-function":`linear !important`}),h.forEach(e=>{X.set(`::view-transition-group(${e})`,{overflow:`clip`}),X.set(`::view-transition-old(${e}), ::view-transition-new(${e})`,{width:`100%`,height:`100%`,"object-fit":`cover`})}),p.forEach(e=>{X.set(`::view-transition-group-children(${e})`,{overflow:`clip`})}),X.commit()},re=()=>{Hi(u,d,f),X.remove()},E=async()=>{await t(),b(`new`),T(`new`),ee(),ne()},D;try{b(`old`),T(`old`),ne(),D=document.startViewTransition(E)}catch(e){return re(),Promise.reject(e)}return D.finished.finally(re),new Promise((e,t)=>{D.ready.then(()=>{let t=Ki(),n=[],r=new Set,i=new Set;m.forEach((e,t)=>{let a=_.get(t),o=!!a?.new&&!a?.old,s=!!a?.old&&!a?.new;for(let a of Ji){if(!e[a]||a===`enter`&&!o||a===`exit`&&!s)continue;let l=Ui(a),[u,d]=x(t,l);if(u===-1)continue;let{keyframes:f,options:p}=e[a];for(let[m,h]of Object.entries(f)){if(h==null)continue;if(m===`x`||m===`y`){ce(!1,`animateView() animates view-transition layers with CSS properties; the "${m}" shorthand has no effect - use transform, e.g. { transform: "translateX(40px)" }.`);continue}if(a===`new`&&o&&e.enter?.keyframes[m]!=null||a===`old`&&s&&e.exit?.keyframes[m]!=null)continue;let f=ta(q(c,m),q(p,m));if(!Array.isArray(h)){let t=a===`enter`?e.exit?.keyframes[m]:void 0,n=t==null?m===`opacity`||(l===`new`?o:s)?Zi[l]?.[m]:void 0:Array.isArray(t)?t[t.length-1]:t;n!==void 0&&(h=[n,h])}typeof f.delay==`function`&&(f.delay=f.delay(u,d)),f.duration&&=O(f.duration),f.delay&&=O(f.delay),n.push(new G({...f,element:document.documentElement,name:m,pseudoElement:`::view-transition-${l}(${t})`,keyframes:h})),r.add(`${t}:${l}`),m===`opacity`&&i.add(`${t}:${l}`)}}});for(let e of t){if(e.playState===`finished`)continue;let{effect:t}=e;if(!t||!(t instanceof KeyframeEffect))continue;let{pseudoElement:a}=t;if(!a)continue;let o=Gi(a);if(!o)continue;let s=m.get(o.layer);if(r.has(`${o.layer}:${o.type}`)){i.has(`${o.layer}:new`)&&i.has(`${o.layer}:old`)&&t.getKeyframes().some(e=>e.mixBlendMode)?n.push(new wr(e)):e.cancel();continue}let c=o.type===`old`?`new`:o.type===`new`?`old`:void 0;if(c&&r.has(`${o.layer}:${c}`)&&!i.has(`${o.layer}:${c}`)){e.cancel();continue}let l=_.get(o.layer),u=(o.type===`old`||o.type===`new`)&&!!l?.old&&!!l?.new,d;if(o.type.startsWith(`group`)){let{delay:e,duration:t,ease:n}=C(o.layer);d={delay:e,duration:t,easing:er(n,t)}}else{let e=u?`group`:o.type,[t,n]=x(o.layer,e),r=S(s,e,e===`group`?`layout`:``,t===-1?0:t,n),i=r.visualDuration;r.duration&&(r.duration=O(r.duration)),r=rr(r),d={delay:O(r.delay??0),duration:u&&i!==void 0?O(i):r.duration,easing:u?`linear`:er(r.ease,r.duration)}}t.updateTiming(d),n.push(new wr(e))}w.forEach((e,t)=>{if(!h.has(t))return;let{delay:r,duration:i,ease:a}=C(t);for(let o of wi){let s=e.old?.radii[o]||e.new?.radii[o]||`0px`,c=e.new?.radii[o]||e.old?.radii[o]||`0px`;Yi(s)&&Yi(c)||n.push(new G({element:document.documentElement,name:o,pseudoElement:`::view-transition-group(${t})`,keyframes:[s,c],delay:r,duration:i,ease:a}))}}),e(new xr(n))}).catch(()=>D.updateCallbackDone.then(()=>e(new xr([])),t))})}function ea(e,t){for(let n of Xi[t]??[]){let t=e?.[n]?.options;if(t)return t}}function ta(e,t){let n={...e,...t};return t.duration!==void 0&&(t.visualDuration===void 0&&delete n.visualDuration,t.type===void 0&&delete n.type),n}var Z=[],na=null;function ra(){na=null;let[e]=Z;e&&ia(e)}function ia(e){S(Z,e),na=e,$i(e).then(t=>(e.notifyReady(t),t.finished)).catch(t=>e.notifyReject(t)).finally(ra)}function aa(){for(let e=Z.length-1;e>=0;e--){let t=Z[e],{interrupt:n}=t.options;if(n===`immediate`){let n=Z.slice(0,e+1).map(e=>e.update),r=Z.slice(e+1);t.update=()=>{n.forEach(e=>e())},Z=[t,...r];break}}(!na||Z[0]?.options.interrupt===`immediate`)&&ra()}function oa(e){Z.push(e),ki.render(aa)}var sa=class{constructor(e,t={}){this.currentSubject=`root`,this.targets=new Map,this.resolveDefs=new Set,this.cropOverride=new Map,this.pairs=new Map,this.classNames=new Map,this.flatGroups=new Set,this.notifyReady=E,this.notifyReject=E,this.readyPromise=new Promise((e,t)=>{this.notifyReady=e,this.notifyReject=t}),this.update=e,this.options={interrupt:`wait`,...t},this.readyPromise.catch(E),oa(this)}add(e,t){return this.currentSubject=e,this.resolveDefs.add(e),t!==void 0&&this.pairs.set(e,t),this.targets.has(e)||this.targets.set(e,{}),this}crop(e=!0){return this.cropOverride.set(this.currentSubject,e),this}group(e=!0){return e?this.flatGroups.delete(this.currentSubject):this.flatGroups.add(this.currentSubject),this}class(e){return this.classNames.set(this.currentSubject,e),this}layout(e={}){return this.updateTarget(`layout`,{},e),this}enter(e,t){return this.updateTarget(`enter`,e,t),this}exit(e,t){return this.updateTarget(`exit`,e,t),this}new(e,t){return this.updateTarget(`new`,e,t),this}old(e,t){return this.updateTarget(`old`,e,t),this}updateTarget(e,t,n={}){let{currentSubject:r,targets:i}=this;i.has(r)||i.set(r,{});let a=i.get(r);a[e]={keyframes:t,options:n}}then(e,t){return this.readyPromise.then(e,t)}};function ca(e,t={}){return new sa(e,t)}var la=()=>({min:0,max:0}),ua=()=>({x:la(),y:la()}),da=new WeakMap;function fa(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function pa(e){return typeof e==`string`||Array.isArray(e)}var ma=[`initial`,`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`];function ha(e){return fa(e.animate)||ma.some(t=>pa(e[t]))}function ga(e){return!!(ha(e)||e.variants)}function _a(e,t,n){for(let r in t){let i=t[r],a=n[r];if(J(i))e.addValue(r,i);else if(J(a))e.addValue(r,K(i,{owner:e}));else if(a!==i){if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,K(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var va={current:null},ya={current:!1},ba=typeof window<`u`;function xa(){if(ya.current=!0,ba){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>va.current=e.matches;e.addEventListener(`change`,t),t()}else va.current=!1}}var Sa=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],Ca={},wa=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Gn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=j.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,A.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=ha(t),this.isVariantNode=ga(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&J(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,da.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(ya.current||xa(),this.shouldReduceMotion=va.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Le(this.notifyUpdate),Le(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&pr.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new G({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:O(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=Pn.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&A.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in Ca){let t=Ca[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ua()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<Sa.length;t++){let n=Sa[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=_a(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=K(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(ee(n)||ne(n))?n=parseFloat(n):!Fi(n)&&z.test(t)&&(n=bi(e,t)),this.setBaseTarget(e,J(n)?n.get():n)),J(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=Gr(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!J(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new ae),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){ki.render(this.render)}},Ta=class extends wa{constructor(){super(...arguments),this.KeyframeResolver=Ci}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;J(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function Ea({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Da(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Oa(e,t){return Ea(Da(e.getBoundingClientRect(),t))}var ka={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Aa=Nn.length;function ja(e,t,n){let r=``,i=!0;for(let a=0;a<Aa;a++){let o=Nn[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=Oi(s,gi[o]);if(!c){i=!1;let t=ka[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${Oi(a,gi.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function Ma(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(Pn.has(e)){o=!0;continue}if(Ue(e)){i[e]=n;continue}{let t=Oi(n,gi[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=ja(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function Na(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function Pa(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Fa={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(F.test(e))e=parseFloat(e);else return e}return`${Pa(e,t.target.x)}% ${Pa(e,t.target.y)}%`}},Ia={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=z.parse(e);if(i.length>5)return r;let a=z.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=Ot(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},La={borderRadius:{...Fa,applyTo:[...wi]},borderTopLeftRadius:Fa,borderTopRightRadius:Fa,borderBottomLeftRadius:Fa,borderBottomRightRadius:Fa,boxShadow:Ia};function Ra(e,{layout:t,layoutId:n}){return Pn.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!La[e]||e===`opacity`)}function za(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(J(r[t])||i&&J(i[t])||Ra(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function Ba(e){return window.getComputedStyle(e)}var Va=class extends Ta{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Na}mount(e){e.style,super.mount(e)}readValueFromInstance(e,t){if(Pn.has(t))return this.projection?.isProjecting?kn(t):jn(e,t);{let n=Ba(e),r=(Ue(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Oa(e,t)}build(e,t,n){Ma(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return za(e,t,n)}};function Ha(e,t){return e in t}var Ua=class extends wa{constructor(){super(...arguments),this.type=`object`}readValueFromInstance(e,t){if(Ha(t,e)){let n=e[t];if(typeof n==`string`||typeof n==`number`)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(e,t){delete t.output[e]}measureInstanceViewportBox(){return ua()}build(e,t){Object.assign(e.output,t)}renderInstance(e,{output:t}){Object.assign(e,t)}sortInstanceNodePosition(){return 0}},Wa={offset:`stroke-dashoffset`,array:`stroke-dasharray`},Ga={offset:`strokeDashoffset`,array:`strokeDasharray`};function Ka(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?Wa:Ga;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var qa=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function Ja(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(Ma(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of qa)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&Ka(d,i,a,o,!1)}var Ya=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),Xa=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function Za(e,t,n,r){Na(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(Ya.has(n)?n:ei(n),t.attrs[n])}function Qa(e,t,n){let r=za(e,t,n);for(let n in e)if(J(e[n])||J(t[n])){let t=Nn.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var $a=class extends Ta{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=ua}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Pn.has(t)){let e=vi(t);return e&&e.default||0}return t=Ya.has(t)?t:ei(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Qa(e,t,n)}build(e,t,n){Ja(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){Za(e,t,n,r)}mount(e){this.isSVGTag=Xa(e.tagName),super.mount(e)}};function eo(e,t,n){let r=J(e)?e:K(e);return r.start(Br(``,r,t,n)),r.animation}function to(e){return typeof e==`object`&&!Array.isArray(e)}function no(e,t,n,r){return e==null?[]:typeof e==`string`&&to(t)?Di(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(e=>e!=null):[e]}function ro(e,t,n){return e*(t+1)+n*t}function io(e,t,n,r){return typeof t==`number`?t:t.startsWith(`-`)||t.startsWith(`+`)?Math.max(0,e+parseFloat(t)):t===`<`?n:t.startsWith(`<`)?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function ao(e,t,n){for(let r=0;r<e.length;r++){let i=e[r];i.at>t&&i.at<n&&(S(e,i),r--)}}function oo(e,t,n,r,i,a){ao(e,i,a);for(let o=0;o<t.length;o++)e.push({value:t[o],at:Ot(i,a,r[o]),easing:Oe(n,o)})}function so(e,t,n=0){let r=t+1+t*n;for(let t=0;t<e.length;t++)e[t]=e[t]/r}function co(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var lo=`easeInOut`,uo=20;function fo(e,{defaultTransition:t={},...n}={},r,i){let a=t.duration||.3,o=new Map,s=new Map,c={},l=new Map,u=0,d=0,f=0;for(let n=0;n<e.length;n++){let o=e[n];if(typeof o==`string`){l.set(o,d);continue}if(!Array.isArray(o)){l.set(o.name,io(d,o.at,u,l));continue}let[p,m,h={}]=o;h.at!==void 0&&(d=io(d,h.at,u,l));let g=0,_=(e,n,r,o=0,s=0)=>{let c=ho(e),{delay:l=0,times:u=un(c),type:p=t.type||`keyframes`,repeat:m,repeatType:h,repeatDelay:_=0,...v}=n,{ease:y=t.ease||`easeOut`,duration:b}=n,x=typeof l==`function`?l(o,s):l,S=c.length,C=nr(p)?p:i?.[p||`keyframes`];if(S<=2&&C){let e=100;if(S===2&&vo(c)){let t=c[1]-c[0];e=Math.abs(t)}let n={...t,...v};b!==void 0&&(n.duration=O(b));let r=qt(n,e,C);y=r.ease,b=r.duration}b??=a;let w=d+x;u.length===1&&u[0]===0&&(u[1]=1);let T=u.length-c.length;if(T>0&&ln(u,T),c.length===1&&c.unshift(null),m&&`${m}${uo}`,m&&m<uo){let e=b>0?_/b:0;b=ro(b,m,_);let t=[...c],n=[...u];y=Array.isArray(y)?[...y]:[y];let r=[...y],i=h===`reverse`||h===`mirror`,a=t,o=r;i&&(a=[...t].reverse(),h===`reverse`&&(o=[...r].reverse().map(e=>typeof e==`function`?ge(e):e)));for(let s=0;s<m;s++){let l=i&&s%2==0,d=l?a:t,f=l?o:r,p=(s+1)*(1+e);e>0&&(c.push(c[c.length-1]),u.push(p),y.push(`linear`)),c.push(...d);for(let e=0;e<d.length;e++)u.push(n[e]+p),y.push(e===0?`linear`:Oe(f,e-1))}so(u,m,e)}let ee=w+b;oo(r,c,y,u,w,ee),g=Math.max(x+b,g),f=Math.max(ee,f)};if(J(p)){let e=po(p,s);_(m,h,mo(`default`,e))}else{let e=no(p,m,r,c),t=e.length;for(let n=0;n<t;n++){m=m,h=h;let r=e[n],i=po(r,s);for(let e in m)_(m[e],go(h,e),mo(e,i),n,t)}}u=d,d+=g}return s.forEach((e,r)=>{for(let i in e){let a=e[i];a.sort(co);let s=[],c=[],l=[];for(let e=0;e<a.length;e++){let{at:t,value:n,easing:r}=a[e];s.push(n),c.push(ie(0,f,t)),l.push(r||`easeOut`)}c[0]!==0&&(c.unshift(0),s.unshift(s[0]),l.unshift(lo)),c[c.length-1]!==1&&(c.push(1),s.push(null)),o.has(r)||o.set(r,{keyframes:{},transition:{}});let u=o.get(r);u.keyframes[i]=s;let{type:d,...p}=t;u.transition[i]={...p,duration:f,ease:l,times:c,...n}}}),o}function po(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function mo(e,t){return t[e]||(t[e]=[]),t[e]}function ho(e){return Array.isArray(e)?e:[e]}function go(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var _o=e=>typeof e==`number`,vo=e=>e.every(_o);function yo(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Mi(e)&&!Ni(e)?new $a(t):new Va(t);n.mount(e),da.set(e,n)}function bo(e){let t=new Ua({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});t.mount(e),da.set(e,t)}function xo(e,t){return J(e)||typeof e==`number`||typeof e==`string`&&!to(t)}function So(e,t,n,r){let i=[];if(xo(e,t))i.push(eo(e,to(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return i;let a=no(e,t,r),o=a.length;for(let e=0;e<o;e++){let r=a[e],s=r instanceof Element?yo:bo;da.has(r)||s(r);let c=da.get(r),l={...n};`delay`in l&&typeof l.delay==`function`&&(l.delay=l.delay(e,o)),i.push(...ii(c,{...t,transition:l},{}))}}return i}function Co(e,t,n){let r=[];return fo(e.map(e=>{if(Array.isArray(e)&&typeof e[0]==`function`){let t=e[0],n=K(0);return n.on(`change`,t),e.length===1?[n,[0,1]]:e.length===2?[n,[0,1],e[1]]:[n,e[1],e[2]]}return e}),t,n,{spring:V}).forEach(({keyframes:e,transition:t},n)=>{r.push(...So(n,e,t))}),r}function wo(e){return Array.isArray(e)&&e.some(Array.isArray)}function To(e={}){let{scope:t,reduceMotion:n,skipAnimations:r}=e;function i(e,i,a){let o=[],s,c={};if(n!==void 0&&(c.reduceMotion=n),r!==void 0&&(c.skipAnimations=r),wo(e)){let{onComplete:n,...r}=i||{};typeof n==`function`&&(s=n),o=Co(e,{...c,...r},t)}else{let{onComplete:n,...r}=a||{};typeof n==`function`&&(s=n),o=So(e,i,{...c,...r},t)}let l=new Cr(o);return s&&l.finished.then(s),t&&(t.animations.push(l),l.finished.then(()=>{S(t.animations,l)})),l}return i}var Eo=To();function Do(e,t,n,r){if(e==null)return[];let i=Di(e,r),a=i.length,o=[];for(let e=0;e<a;e++){let r=i[e],s={...n};typeof s.delay==`function`&&(s.delay=s.delay(e,a));for(let e in t){let n=t[e];Array.isArray(n)||(n=[n]);let i={...q(s,e)};i.duration&&=O(i.duration),i.delay&&=O(i.delay);let a=Dr(r),c=Er(e,i.pseudoElement||``),l=a.get(c);l&&l.stop(),o.push({map:a,key:c,unresolvedKeyframes:n,options:{...i,element:r,name:e,allowFlatten:!s.type&&!s.ease}})}}for(let e=0;e<o.length;e++){let{unresolvedKeyframes:t,options:n}=o[e],{element:r,name:i,pseudoElement:a}=n;!a&&t[0]===null&&(t[0]=ji(r,i)),xn(t),Ei(t,i),!a&&t.length<2&&t.unshift(ji(r,i)),n.keyframes=t}let s=[];for(let e=0;e<o.length;e++){let{map:t,key:n,options:r}=o[e],i=new G(r);t.set(n,i),i.finished.finally(()=>t.delete(n)),s.push(i)}return s}var Oo=(e=>{function t(t,n,r){return new Cr(Do(t,n,r,e))}return t})(),ko=(e,t)=>({finished:e,then:e.then.bind(e),...t}),Q=e=>ko((async()=>{await e?.()})(),{cancel(){},stop(){},complete(){}}),Ao=(e,t)=>{let n=!1,r=()=>{n||(n=!0,t?.())},i=()=>{},a=new Promise(e=>{i=e}),o=e.finished.then(()=>{},()=>{}),s=Promise.race([o,a]).finally(r),c=e=>{try{e()}finally{i(),r()}};return ko(s,{cancel(){c(()=>e.cancel())},stop(){c(()=>e.stop())},complete(){c(()=>e.complete())}})},jo=(...e)=>ko(Promise.allSettled(e.map(e=>e.finished)).then(()=>{}),{cancel(){e.forEach(e=>e.cancel())},stop(){e.forEach(e=>e.stop())},complete(){e.forEach(e=>e.complete())}}),Mo=(...e)=>{let t=!1,n=!1,r=null;return ko((async()=>{for(let i of e){if(t)break;r=i(),n&&r.complete(),await r.finished.catch(()=>{})}})(),{cancel(){t=!0,r?.cancel()},stop(){t=!0,r?.stop()},complete(){n=!0,r?.complete()}})},$=new WeakMap,No=e=>{let t=$.get(e);if(t)return t.handle.stop(),$.get(e)===t&&$.delete(e),t.properties},Po=(e,t,n,r,i)=>{let a=Ao(t(No(e))),o,s=()=>o.stop(),c=()=>{r?.removeEventListener(`abort`,s),$.get(e)?.handle===o&&(i?.(),$.get(e)?.handle===o&&$.delete(e))};return o=ko(a.finished.finally(c),{cancel(){a.cancel(),c()},stop(){a.stop(),c()},complete(){a.complete()}}),$.set(e,{handle:o,properties:n}),r?.addEventListener(`abort`,s,{once:!0}),o},Fo=e=>!(e instanceof Element)&&typeof e==`object`&&!!e&&`signal`in e,Io=e=>{let t=e instanceof Element?e:e.el;if(!(t instanceof Element))throw TypeError(`Motion subject requires an Element target.`);return t},Lo=(e,t)=>{let n=Io(e);if(!t)return n;if(t instanceof Element)return t;let r=Fo(e)?e.root:n;if(!(r instanceof Element))throw TypeError(`Motion transition subject requires an Element root.`);let i=r.matches(t)?r:r.querySelector(t);if(!i)throw Error(`Motion target not found: ${t}`);return i},Ro=e=>Fo(e)?e.signal:null,zo=e=>Array.isArray(e)?e.at(-1):e,Bo=e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Array.isArray(t)?[...t]:t])),Vo=(e,t)=>t===`height`?`${e.getBoundingClientRect().height}px`:t===`width`?`${e.getBoundingClientRect().width}px`:getComputedStyle(e)[t],Ho=(e,t)=>Array.isArray(e)?[t,...e.slice(1)]:[t,e],Uo=(e,t)=>{let n=Lo(e,t.target);if(!(n instanceof HTMLElement))throw TypeError(`Size motion requires an HTMLElement target.`);let r=t.signal??Ro(e);if(r?.aborted)return t.cleanup?.(),Q();let a=Bo(t.keyframes),o=new Set(Object.keys(a));if(o.size===0)return t.cleanup?.(),Q();if(y()){No(n);let e=Object.fromEntries(Object.entries(t.keyframes).flatMap(([e,t])=>e===`opacity`?[]:[[e,zo(t)]]));Object.entries(e).forEach(([e,t])=>{n.style[e]=typeof t==`number`?`${t}px`:String(t)}),Object.keys(e).length>0&&Oo(n,e,{duration:0}).complete();let a=t.keyframes.opacity;return a===void 0?(t.cleanup?.(),Q()):Po(n,()=>Oo(n,{opacity:typeof a==`number`?a:[...a]},{...i.feedback,type:`tween`}),new Set([`opacity`]),r,t.cleanup)}let s=new Map([...o].map(e=>[e,Vo(n,e)])),c=t.role??`layout`;return Po(n,e=>{for(let t of o)e?.has(t)&&(a[t]=Ho(a[t],s.get(t)));return Oo(n,a,{...p(n,c),...f(c,n)?{type:V}:{type:`tween`},...t.transition})},o,r,t.cleanup)},Wo=e=>typeof e==`object`&&!!e&&`initial`in e,Go=e=>{let t={},n=new Map,r=new Map,i;Object.keys(e.values).forEach(r=>{let i=e.values[r],a=Wo(i)?i.initial:i;t[r]=K(a),Wo(i)&&i.transition&&n.set(r,i.transition)});let a=()=>Object.fromEntries(Object.keys(t).map(e=>[e,t[e].get()])),o=e=>{r.get(e)?.stop(),r.delete(e)},s=e=>{Object.keys(e).forEach(n=>{let r=e[n];r!==void 0&&t[n]&&(o(n),t[n].set(r))})};return{mount:n=>{i?.();let r=new Map,o=()=>{Object.entries(e.style(a())).forEach(([e,t])=>{r.has(e)||r.set(e,e.startsWith(`--`)?n.style.getPropertyValue(e):String(n.style[e]??``)),e.startsWith(`--`)?n.style.setProperty(e,String(t)):n.style[e]=String(t)})},s=Object.values(t).map(e=>e.on(`change`,o));o();let c=!0,l=()=>{c&&(c=!1,s.forEach(e=>e()),r.forEach((e,t)=>{t.startsWith(`--`)?n.style.setProperty(t,e):n.style[t]=e}),i===l&&(i=void 0))};return i=l,l},set:s,animate:(i,a)=>{if(y(e.reducedMotion))return s(i),Q();let c=Object.keys(i).flatMap(e=>{let s=i[e];if(s===void 0||!t[e])return[];o(e);let c=Ao(Eo(t[e],s,{...n.get(e),...a}));return r.set(e,c),c.finished.finally(()=>{r.get(e)===c&&r.delete(e)}),[c]});return c.length?jo(...c):Q()},current:a,destroy:()=>{i?.(),r.forEach(e=>e.cancel()),r.clear()}}},Ko=new WeakMap,qo=(e,t)=>{let n=Lo(e,t.target);if(!(n instanceof HTMLElement))throw TypeError(`Motion resize requires an HTMLElement target.`);let r=Lo(e,t.measure??n);if(r===n)throw Error(`Motion resize requires a separate measurement element.`);if(!(r instanceof HTMLElement))throw TypeError(`Motion resize measurement requires an HTMLElement.`);let i=Ro(e);if(i?.aborted)return Q();let a=Math.max(r.scrollHeight,r.getBoundingClientRect().height),o=n.getBoundingClientRect().height,s=No(n),c=s?.has(`height`)?o:t.from===`content`?a:0,l=t.to===`content`?a:0;Ko.has(n)||Ko.set(n,{height:n.style.height,opacity:n.style.opacity,overflow:n.style.overflow,willChange:n.style.willChange});let u=y(),d=t.speed===void 0?void 0:h(t.speed,n),p={height:[c,l]};n.style.overflow=`hidden`,n.style.willChange=u?`opacity`:`height, opacity`,t.opacity!==void 0&&(p.opacity=s?.has(`opacity`)?Array.isArray(t.opacity)?t.opacity.at(-1):t.opacity:Array.isArray(t.opacity)?[...t.opacity]:t.opacity);let m=t.role??`resize`,g=d===void 0?{}:`stiffness`in d?d:f(m)?{visualDuration:d.duration}:d,_=()=>{let e=Ko.get(n);e&&Object.assign(n.style,e),Ko.delete(n)};return Uo(e,{target:n,keyframes:p,role:m,transition:{...g,...t.transition},signal:i,cleanup:_})},Jo=e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Array.isArray(t)?[...t]:t])),Yo=(e,t=new Set)=>Object.fromEntries(Object.entries(Jo(e)).map(([e,n])=>[e,t.has(e)&&Array.isArray(n)?g(n):n])),Xo=new Set(`bottom.filter.height.maxHeight.maxWidth.inset.insetBlock.insetInline.left.right.top.transform.width.translate.x.y.z.scale.scaleX.scaleY.rotate.rotateX.rotateY.skew.skewX.skewY`.split(`.`)),Zo=e=>Object.fromEntries(Object.entries(Jo(e)).flatMap(([e,t])=>Xo.has(e)?[]:[[e,t]])),Qo=e=>Object.fromEntries(Object.entries(Jo(e)).flatMap(([e,t])=>Xo.has(e)?[[e,Array.isArray(t)?g(t):t]]:[])),$o=(e,t,i,a,o)=>{let s=o?`feedback`:t,c=s===void 0?{type:`tween`,ease:r.out}:{...d(e,s),type:f(s,e)?V:`tween`},l=i===void 0?void 0:h(o?`fast`:i,e),u=l===void 0?c:`stiffness`in l?{...c,type:V,...l}:{...c,duration:l.duration};return{...u.duration===void 0&&u.type===void 0?{duration:n.moderate.duration}:{},...u,...a}},es=(e,t,n)=>{let r=Lo(e,t.target),i=Ro(e);if(i?.aborted)return Q();let a=y();if(a){let e=Qo(t.keyframes);Object.keys(e).length>0&&Eo(r,e,{duration:0}).complete()}let o=a?Zo(t.keyframes):Jo(t.keyframes);return Object.keys(o).length===0?(Eo(r,Object.fromEntries(Object.entries(Jo(t.keyframes)).map(([e,t])=>[e,Array.isArray(t)?g(t):t])),{duration:0}).complete(),Q()):Po(r,e=>Eo(r,Yo(o,e),$o(r,t.role??n.role,t.speed??n.speed,{...n.transition,...t.transition},a)),new Set(Object.keys(o)),i)},ts=(e,t,n)=>{if(t.kind===`animate`)return es(e,t,n);let r=t.speed??n.speed??t.options.speed,i=t.role??n.role??t.options.role,a={...n.transition,...t.options.transition,...t.transition};return qo(e,{...t.options,...r===void 0?{}:{speed:r},...i===void 0?{}:{role:i},...Object.keys(a).length===0?{}:{transition:a}})},ns=(e,t)=>t===void 0?{keyframes:e}:{target:e,keyframes:t},rs=class e{#e;#t;#n;constructor(e,t=[],n={}){this.#e=e,this.#t=t,this.#n=n}#r(t,n){if(!n||this.#t.length===0)return new e(this.#e,[...this.#t,[t]],this.#n);let r=this.#t.slice(0,-1),i=this.#t.at(-1)??[];return new e(this.#e,[...r,[...i,t]],this.#n)}#i(t){let n=this.#t.at(-1);if(!n?.length)throw Error(`Declare a motion segment before configuring it.`);let r=this.#t.slice(0,-1);return new e(this.#e,[...r,[...n.slice(0,-1),t(n.at(-1))]],this.#n)}animate(e,t){return this.#r({kind:`animate`,...ns(e,t)},!1)}with(e,t){return this.#r({kind:`animate`,...ns(e,t)},!0)}then(e,t){return this.animate(e,t)}resize(e){return this.#r({kind:`resize`,options:e},!1)}speed(e){return this.#i(t=>({...t,speed:e}))}role(e){return this.#i(t=>({...t,role:e}))}transition(e){return this.#i(t=>({...t,transition:{...t.transition,...e}}))}defaults(t){let n=t.speed??this.#n.speed,r=t.role??this.#n.role,i={...this.#n.transition,...t.transition};return new e(this.#e,this.#t,{...n===void 0?{}:{speed:n},...r===void 0?{}:{role:r},...Object.keys(i).length===0?{}:{transition:i}})}play(){return this.#t.length===0?Q():Mo(...this.#t.map(e=>()=>jo(...e.map(e=>ts(this.#e,e,this.#n)))))}},is=e=>new rs(e),as=e=>{let t=globalThis.CSS;return typeof t?.escape==`function`?t.escape(e):e.replaceAll(`\\`,`\\\\`).replaceAll(`"`,`\\"`)},os=t=>`[${e}="${as(t)}"]`,ss=e=>`[data-ui-${as(e)}]`,cs=e=>e instanceof Element?null:typeof e==`string`?e:`selector`in e?e.selector:`part`in e?ss(e.part):`key`in e?os(e.key):null,ls=e=>{if(e instanceof Element)return[e];let t=cs(e);return t?[t]:[]},us=(e=document,t)=>t?(Array.isArray(t)?t:[t]).flatMap(e=>{if(e instanceof Element)return[{subject:e}];if(typeof e==`object`&&`from`in e){let t=ls(e.from),n=ls(e.to);return t.flatMap((e,t)=>{let r=n[t]??n[0];return r?[{subject:e,newSubject:r}]:[]})}let t=cs(e);return t?[{subject:t}]:[]}):[],ds=async()=>{},fs=e=>{ds=async()=>{await e()}},ps=i.layout,ms={transform:[`none`,`none`]},hs=`[${e}], [${t}]`,gs=(e,t,n={})=>{if(typeof document.startViewTransition!=`function`||y(n.reducedMotion))return Q(e);let r=t??(n.layout||n.preset===`layout`?hs:null),a=us(n.scope??document,r),o=ca(e,{...i.layout,interrupt:`immediate`,...n.transition});return a.forEach(({subject:e,newSubject:t})=>{o.add(e,t),n.className&&o.class(n.className),typeof n.crop==`boolean`&&o.crop(n.crop),typeof n.group==`boolean`&&o.group(n.group),n.layout!==!1&&n.preset!==`none`&&o.layout(typeof n.layout==`object`?n.layout:ps);let r=n.newView??(n.preset===`stream`?ms:void 0),a=n.oldView??(n.preset===`stream`?ms:void 0),s=n.enter,c=n.exit;r&&o.new(r,i.feedback),a&&o.old(a,i.feedback),s&&o.enter(s,i.feedback),c&&o.exit(c,i.feedback)}),ko(Promise.resolve(o.then(()=>{},()=>{})),{cancel(){Ki().forEach(e=>e.cancel())},stop(){Ki().forEach(e=>e.pause())},complete(){Ki().forEach(e=>{try{e.finish()}catch{e.cancel()}})}})},_s=Object.assign(is,{presets:m,roles:i,speeds:n,easings:r,createController:Go,stop(e){No(e)},withReducedMotion:b,view:(e,t={})=>{let{targets:n,...r}=t;return gs(async()=>{await e(),await ds()},n,{preset:`layout`,...r})}});export{i as S,K as _,os as a,f as b,Ro as c,No as d,Q as f,Di as g,Eo as h,as as i,Lo as l,Oo as m,gs as n,is as o,jo as p,fs as r,Uo as s,_s as t,Po as u,V as v,p as x,y};
|
|
3
|
-
//# sourceMappingURL=motion-
|
|
3
|
+
//# sourceMappingURL=motion-fU4E5Q4w.js.map
|