@vireo-ai/trellis-ui 0.1.46 → 0.1.47

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.
Files changed (112) hide show
  1. package/package.json +1 -1
  2. package/packages/client/types/components/app/contract.d.ts +7 -7
  3. package/packages/client/types/components/box/contract.d.ts +2 -2
  4. package/packages/client/types/components/card/contract.d.ts +2 -2
  5. package/packages/client/types/components/container/contract.d.ts +2 -2
  6. package/packages/client/types/components/date-picker/contract.d.ts +2 -2
  7. package/packages/client/types/components/date-picker/machine.d.ts +4 -4
  8. package/packages/client/types/components/file-upload/contract.d.ts +1 -1
  9. package/packages/client/types/components/file-upload/index.d.ts +2 -0
  10. package/packages/client/types/components/file-upload/machine.d.ts +2 -1
  11. package/packages/client/types/components/flex/contract.d.ts +2 -2
  12. package/packages/client/types/components/frame/contract.d.ts +2 -2
  13. package/packages/client/types/components/grid/contract.d.ts +2 -2
  14. package/packages/client/types/components/layout.d.ts +2 -2
  15. package/packages/client/types/components/menu/contract.d.ts +2 -2
  16. package/packages/client/types/components/modal/contract.d.ts +2 -2
  17. package/packages/client/types/components/section/contract.d.ts +2 -2
  18. package/packages/client/types/components/select/contract.d.ts +2 -2
  19. package/packages/client/types/components/select/machine.d.ts +4 -4
  20. package/packages/client/types/components/sidebar/contract.d.ts +3 -3
  21. package/packages/client/types/components/stack/contract.d.ts +2 -2
  22. package/packages/client/types/components/tooltip/contract.d.ts +4 -4
  23. package/packages/client/types/motion/flip.d.ts +14 -0
  24. package/packages/client/types/motion/index.d.ts +2 -0
  25. package/packages/client/types/motion/size.d.ts +25 -0
  26. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/build-metadata.json +300 -286
  27. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/motion.js +1 -1
  28. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/shortcut.js +1 -1
  29. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/sortable.js +1 -1
  30. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-motion-DCacA4wj.js +2 -0
  31. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{capability-motion-LgqzTNla.js.map → capability-motion-DCacA4wj.js.map} +1 -1
  32. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-shortcut-Z-__iteD.js +2 -0
  33. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-shortcut-Z-__iteD.js.map +1 -0
  34. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-sortable-BnB9Wz0E.js +3 -0
  35. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{capability-sortable-DhIaUo4k.js.map → capability-sortable-BnB9Wz0E.js.map} +1 -1
  36. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{controller-DsXbNzqk.js → controller-BOf7dxV2.js} +2 -2
  37. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{controller-DsXbNzqk.js.map → controller-BOf7dxV2.js.map} +1 -1
  38. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{core-DFCT8LQq.js → core-DBX5qDXb.js} +2 -2
  39. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{core-DFCT8LQq.js.map → core-DBX5qDXb.js.map} +1 -1
  40. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/dom-invalidation-Dw6clnS4.js +2 -0
  41. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/dom-invalidation-Dw6clnS4.js.map +1 -0
  42. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-DVQC6yVd.js → entry.generated-BEjAV5NT.js} +2 -2
  43. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-DVQC6yVd.js.map → entry.generated-BEjAV5NT.js.map} +1 -1
  44. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-DpIBgUZ3.js → entry.generated-BUbxiHwA.js} +2 -2
  45. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-DpIBgUZ3.js.map → entry.generated-BUbxiHwA.js.map} +1 -1
  46. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BV49EHah.js +2 -0
  47. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BV49EHah.js.map +1 -0
  48. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BdiyPh0p.js +2 -0
  49. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BdiyPh0p.js.map +1 -0
  50. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-DnQY2zaY.js → entry.generated-By9j8PrV.js} +2 -2
  51. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-DnQY2zaY.js.map → entry.generated-By9j8PrV.js.map} +1 -1
  52. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-BTe_Q79G.js → entry.generated-C0S3uZrm.js} +2 -2
  53. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-BTe_Q79G.js.map → entry.generated-C0S3uZrm.js.map} +1 -1
  54. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-C5kjUnFe.js +2 -0
  55. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-C5kjUnFe.js.map +1 -0
  56. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DcXzHGIV.js +2 -0
  57. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DcXzHGIV.js.map +1 -0
  58. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DeXEkXMW.js +2 -0
  59. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DeXEkXMW.js.map +1 -0
  60. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-pap9Z0I-.js → entry.generated-Dqyot6vM.js} +2 -2
  61. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-pap9Z0I-.js.map → entry.generated-Dqyot6vM.js.map} +1 -1
  62. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-XfwHguip.js → entry.generated-EAAmcnsg.js} +2 -2
  63. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-XfwHguip.js.map → entry.generated-EAAmcnsg.js.map} +1 -1
  64. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-F2czAXCg.js +2 -0
  65. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-F2czAXCg.js.map +1 -0
  66. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry2.generated-a2NebZsn.js +2 -0
  67. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry2.generated-a2NebZsn.js.map +1 -0
  68. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/motion-DT-Hq9qe.js +3 -0
  69. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/motion-DT-Hq9qe.js.map +1 -0
  70. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/ui-CfByjNaO.js +4 -0
  71. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/ui-CfByjNaO.js.map +1 -0
  72. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/accordion.js +1 -1
  73. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/data-grid.js +1 -1
  74. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/date-picker.js +1 -1
  75. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/dropdown.js +1 -1
  76. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/file-upload.js +1 -1
  77. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/index.js +1 -1
  78. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/keybinding.js +1 -1
  79. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/modal.js +1 -1
  80. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/panels.js +1 -1
  81. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/select.js +1 -1
  82. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/sidebar.js +1 -1
  83. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/tabs.js +1 -1
  84. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/toast.js +1 -1
  85. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/tooltip.js +1 -1
  86. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/core.js +1 -1
  87. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/index.js +1 -1
  88. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/logical-entry-manifest.json +116 -99
  89. package/packages/server/trellis_ui/static/trellis_ui/assets/js/trellis.js +9 -9
  90. package/packages/server/trellis_ui/static/trellis_ui/assets/js/trellis.min.js +9 -9
  91. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-motion-LgqzTNla.js +0 -2
  92. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-shortcut-Br_XBf7u.js +0 -2
  93. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-shortcut-Br_XBf7u.js.map +0 -1
  94. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-sortable-DhIaUo4k.js +0 -3
  95. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-B-PuCg-D.js +0 -2
  96. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-B-PuCg-D.js.map +0 -1
  97. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-B956G6Cz.js +0 -2
  98. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-B956G6Cz.js.map +0 -1
  99. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DNtvOM3X.js +0 -2
  100. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DNtvOM3X.js.map +0 -1
  101. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-RnJw-Qs4.js +0 -2
  102. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-RnJw-Qs4.js.map +0 -1
  103. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-ifMDOEy_.js +0 -2
  104. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-ifMDOEy_.js.map +0 -1
  105. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-jP0UEZIS.js +0 -2
  106. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-jP0UEZIS.js.map +0 -1
  107. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry2.generated-CB866C3K.js +0 -2
  108. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry2.generated-CB866C3K.js.map +0 -1
  109. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/motion-D2EM1olE.js +0 -3
  110. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/motion-D2EM1olE.js.map +0 -1
  111. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/ui-CV0dnUFY.js +0 -4
  112. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/ui-CV0dnUFY.js.map +0 -1
@@ -1,3 +0,0 @@
1
- import{m as e,p as t}from"./ui-CV0dnUFY.js";function n(e,t){e.indexOf(t)===-1&&e.push(t)}function r(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var i=(e,t,n)=>n>t?t:n<e?e:n;function a(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}var o={},s=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),c=e=>typeof e==`object`&&!!e,l=e=>/^0[^.\s]+$/u.test(e);function u(e){let t;return()=>(t===void 0&&(t=e()),t)}var d=e=>e,f=(...e)=>e.reduce((e,t)=>n=>t(e(n))),p=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},m=class{constructor(){this.subscriptions=[]}add(e){return n(this.subscriptions,e),()=>r(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}},h=e=>e*1e3,g=e=>e/1e3,_=(e,t)=>t?1e3/t*e:0,v=new Set;function y(e,t,n){e||v.has(t)||(console.warn(a(t,n)),v.add(t))}var b=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e},x=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,S=1e-7,C=12;function w(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=x(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>S&&++s<C);return o}function T(e,t,n,r){if(e===t&&n===r)return d;let i=t=>w(t,0,1,e,n);return e=>e===0||e===1?e:x(i(e),t,r)}var E=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,D=e=>t=>1-e(1-t),ee=T(.33,1.53,.69,.99),te=D(ee),ne=E(te),re=e=>e>=1?1:(e*=2)<1?.5*te(e):.5*(2-2**(-10*(e-1))),O=e=>1-Math.sin(Math.acos(e)),ie=D(O),ae=E(O),oe=T(.42,0,1,1),se=T(0,0,.58,1),ce=T(.42,0,.58,1),le=e=>Array.isArray(e)&&typeof e[0]!=`number`;function ue(e,t){return le(e)?e[b(0,e.length,t)]:e}var de=e=>Array.isArray(e)&&typeof e[0]==`number`,fe={linear:d,easeIn:oe,easeInOut:ce,easeOut:se,circIn:O,circInOut:ae,circOut:ie,backIn:te,backInOut:ne,backOut:ee,anticipate:re},pe=e=>typeof e==`string`,me=e=>{if(de(e)){e.length;let[t,n,r,i]=e;return T(t,n,r,i)}else if(pe(e))return fe[e],`${e}`,fe[e];return e},he=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function ge(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 _e=40;function ve(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,s=he.reduce((e,t)=>(e[t]=ge(a),e),{}),{setup:c,read:l,resolveKeyframes:u,preUpdate:d,update:f,preRender:p,render:m,postRender:h}=s,g=()=>{let a=o.useManualTiming,s=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(s-i.timestamp,_e),1)),i.timestamp=s,i.isProcessing=!0,c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),h.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(g))},_=()=>{n=!0,r=!0,i.isProcessing||e(g)};return{schedule:he.reduce((e,t)=>{let r=s[t];return e[t]=(e,t=!1,i=!1)=>(n||_(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<he.length;t++)s[he[t]].cancel(e)},state:i,steps:s}}var{schedule:k,cancel:ye,state:be,steps:xe}=ve(typeof requestAnimationFrame<`u`?requestAnimationFrame:d,!0),Se;function Ce(){Se=void 0}var A={now:()=>(Se===void 0&&A.set(be.isProcessing||o.useManualTiming?be.timestamp:performance.now()),Se),set:e=>{Se=e,queueMicrotask(Ce)}},we=e=>t=>typeof t==`string`&&t.startsWith(e),Te=we(`--`),Ee=we(`var(--`),De=e=>Ee(e)?Oe.test(e.split(`/*`)[0].trim()):!1,Oe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function ke(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var Ae={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},je={...Ae,transform:e=>i(0,1,e)},Me={...Ae,default:1},Ne=e=>Math.round(e*1e5)/1e5,Pe=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Fe(e){return e==null}var Ie=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Le=(e,t)=>n=>!!(typeof n==`string`&&Ie.test(n)&&n.startsWith(e)||t&&!Fe(n)&&Object.prototype.hasOwnProperty.call(n,t)),Re=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(Pe);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},ze=e=>i(0,255,e),Be={...Ae,transform:e=>Math.round(ze(e))},j={test:Le(`rgb`,`red`),parse:Re(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Be.transform(e)+`, `+Be.transform(t)+`, `+Be.transform(n)+`, `+Ne(je.transform(r))+`)`};function Ve(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 He={test:Le(`#`),parse:Ve,transform:j.transform},Ue=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),M=Ue(`deg`),We=Ue(`%`),N=Ue(`px`),Ge=Ue(`vh`),Ke=Ue(`vw`),qe={...We,parse:e=>We.parse(e)/100,transform:e=>We.transform(e*100)},P={test:Le(`hsl`,`hue`),parse:Re(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+We.transform(Ne(t))+`, `+We.transform(Ne(n))+`, `+Ne(je.transform(r))+`)`},F={test:e=>j.test(e)||He.test(e)||P.test(e),parse:e=>j.test(e)?j.parse(e):P.test(e)?P.parse(e):He.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?j.transform(e):P.transform(e),getAnimatableNone:e=>{let t=F.parse(e);return t.alpha=0,F.transform(t)}},Je=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ye(e){return isNaN(e)&&typeof e==`string`&&(e.match(Pe)?.length||0)+(e.match(Je)?.length||0)>0}var Xe=`number`,Ze=`color`,Qe=`var`,$e=`var(`,et="${}",tt=/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 nt(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(tt,e=>(F.test(e)?(r.color.push(a),i.push(Ze),n.push(F.parse(e))):e.startsWith($e)?(r.var.push(a),i.push(Qe),n.push(e)):(r.number.push(a),i.push(Xe),n.push(parseFloat(e))),++a,et)).split(et),indexes:r,types:i}}function rt(e){return nt(e).values}function it({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];e===Xe?i+=Ne(r[a]):e===Ze?i+=F.transform(r[a]):i+=r[a]}return i}}function at(e){return it(nt(e))}var ot=e=>typeof e==`number`?0:F.test(e)?F.getAnimatableNone(e):e,st=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:ot(e);function ct(e){let t=nt(e);return it(t)(t.values.map((e,n)=>st(e,t.split[n])))}var I={test:Ye,parse:rt,createTransformer:at,getAnimatableNone:ct};function lt(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 ut({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=lt(s,r,e+1/3),a=lt(s,r,e),o=lt(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 ft=(e,t,n)=>e+(t-e)*n,pt=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},mt=[He,j,P],ht=e=>mt.find(t=>t.test(e));function gt(e){let t=ht(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===P&&(n=ut(n)),n}var _t=(e,t)=>{let n=gt(e),r=gt(t);if(!n||!r)return dt(e,t);let i={...n};return e=>(i.red=pt(n.red,r.red,e),i.green=pt(n.green,r.green,e),i.blue=pt(n.blue,r.blue,e),i.alpha=ft(n.alpha,r.alpha,e),j.transform(i))},vt=new Set([`none`,`hidden`]);function yt(e,t){return vt.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function bt(e,t){return n=>ft(e,t,n)}function xt(e){return typeof e==`number`?bt:typeof e==`string`?De(e)?dt:F.test(e)?_t:Tt:Array.isArray(e)?St:typeof e==`object`?F.test(e)?_t:Ct:dt}function St(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>xt(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Ct(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=xt(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function wt(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]];n[i]=e.values[o]??0,r[a]++}return n}var Tt=(e,t)=>{let n=I.createTransformer(t),r=nt(e),i=nt(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?vt.has(e)&&!i.values.length||vt.has(t)&&!r.values.length?yt(e,t):f(St(wt(r,i),i.values),n):(`${e}${t}`,dt(e,t))};function Et(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?ft(e,t,n):xt(e)(e,t)}var Dt=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>k.update(t,e),stop:()=>ye(t),now:()=>be.isProcessing?be.timestamp:A.now()}},Ot=(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)})`},kt=2e4;function At(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 jt(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(At(r),kt);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:g(i)}}var L={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 Mt(e,t){return e*Math.sqrt(1-t*t)}var Nt=12;function Pt(e,t,n){let r=n;for(let n=1;n<Nt;n++)r-=e(r)/t(r);return r}var Ft=.001;function It({duration:e=L.duration,bounce:t=L.bounce,velocity:n=L.velocity,mass:r=L.mass}){let a,o;L.maxDuration;let s=1-t;s=i(L.minDamping,L.maxDamping,s),e=i(L.minDuration,L.maxDuration,g(e)),s<1?(a=t=>{let r=t*s,i=r*e,a=r-n,o=Mt(t,s),c=Math.exp(-i);return Ft-a/o*c},o=t=>{let r=t*s*e,i=r*n+n,o=s**2*t**2*e,c=Math.exp(-r),l=Mt(t**2,s);return(-a(t)+Ft>0?-1:1)*((i-o)*c)/l}):(a=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),o=t=>Math.exp(-t*e)*((n-t)*(e*e)));let c=5/e,l=Pt(a,o,c);if(e=h(e),isNaN(l))return{stiffness:L.stiffness,damping:L.damping,duration:e};{let t=l**2*r;return{stiffness:t,damping:s*2*Math.sqrt(r*t),duration:e}}}var Lt=[`duration`,`bounce`],Rt=[`stiffness`,`damping`,`mass`];function zt(e,t){return t.some(t=>e[t]!==void 0)}function Bt(e){let t={velocity:L.velocity,stiffness:L.stiffness,damping:L.damping,mass:L.mass,isResolvedFromDuration:!1,...e};if(!zt(e,Rt)&&zt(e,Lt))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),a=r*r,o=2*i(.05,1,1-(e.bounce||0))*Math.sqrt(a);t={...t,mass:L.mass,stiffness:a,damping:o}}else{let n=It({...e,velocity:0});t={...t,...n,mass:L.mass},t.isResolvedFromDuration=!0}return t}function R(e=L.visualDuration,t=L.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}=Bt({...n,velocity:-g(n.velocity||0)}),m=f||0,_=l/(2*Math.sqrt(c*u)),v=o-a,y=g(Math.sqrt(c/u)),b=Math.abs(v)<5;r||=b?L.restSpeed.granular:L.restSpeed.default,i||=b?L.restDelta.granular:L.restDelta.default;let x,S,C,w,T,E;if(_<1)C=Mt(y,_),w=(m+_*y*v)/C,x=e=>o-Math.exp(-_*y*e)*(w*Math.sin(C*e)+v*Math.cos(C*e)),T=_*y*w+v*C,E=_*y*v-w*C,S=e=>Math.exp(-_*y*e)*(T*Math.sin(C*e)+E*Math.cos(C*e));else if(_===1){x=e=>o-Math.exp(-y*e)*(v+(m+y*v)*e);let e=m+y*v;S=t=>Math.exp(-y*t)*(y*e*t-m)}else{let e=y*Math.sqrt(_*_-1);x=t=>{let n=Math.exp(-_*y*t),r=Math.min(e*t,300);return o-n*((m+_*y*v)*Math.sinh(r)+e*v*Math.cosh(r))/e};let t=(m+_*y*v)/e,n=_*y*t-v*e,r=_*y*v-t*e;S=t=>{let i=Math.exp(-_*y*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let D={calculatedDuration:p&&d||null,velocity:e=>h(S(e)),next:e=>{if(!p&&_<1){let t=Math.exp(-_*y*e),n=Math.sin(C*e),a=Math.cos(C*e),c=o-t*(w*n+v*a),l=h(t*(T*n+E*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=x(e);if(p)s.done=e>=d;else{let n=h(S(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(At(D),kt),t=Ot(t=>D.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return D}R.applyToOptions=e=>{let t=jt(e,100,R);return e.ease=t.ease,e.duration=h(t.duration),e.type=`keyframes`,e};var Vt=5;function Ht(e,t,n){let r=Math.max(t-Vt,0);return _(n-e(r),t-r)}function Ut({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=R({keyframes:[f.value,m(f.value)],velocity:Ht(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 Wt(e,t,n){let r=[],i=n||o.mix||Et,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=f(Array.isArray(t)?t[n]||d:t,a)),r.push(a)}return r}function Gt(e,t,{clamp:n=!0,ease:r,mixer:a}={}){let o=e.length;if(t.length,o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];let s=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());let c=Wt(t,r,a),l=c.length,u=n=>{if(s&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=p(e[r],e[r+1],n);return c[r](i)};return n?t=>u(i(e[0],e[o-1],t)):u}function Kt(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=p(0,t,r);e.push(ft(n,1,i))}}function qt(e){let t=[0];return Kt(t,e.length-1),t}function Jt(e,t){return e.map(e=>e*t)}function Yt(e,t){return e.map(()=>t||ce).splice(0,e.length-1)}function Xt({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=le(r)?r.map(me):me(r),a={done:!1,value:t[0]},o=Gt(Jt(n&&n.length===t.length?n:qt(t),e),t,{ease:Array.isArray(i)?i:Yt(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var Zt=e=>e!==null;function Qt(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Zt),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var $t={decay:Ut,inertia:Ut,tween:Xt,keyframes:Xt,spring:R};function en(e){typeof e.type==`string`&&(e.type=$t[e.type])}var tn=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)}},nn=e=>e/100,rn=class extends tn{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!==A.now()&&this.tick(A.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;en(e);let{type:t=Xt,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Xt;s!==Xt&&typeof o[0]!=`number`&&(this.mixKeyframes=f(nn,Et(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=At(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.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:a,mirroredGenerator:o,resolvedDuration:s,calculatedDuration:c}=this;if(this.startTime===null)return n.next(0);let{delay:l=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:p,type:m,onUpdate:h,finalKeyframe:g}=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 _=this.currentTime-l*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?_<0:_>r;this.currentTime=Math.max(_,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let y=this.currentTime,b=n;if(d){let e=Math.min(this.currentTime,r)/s,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,d+1),t%2&&(f===`reverse`?(n=1-n,p&&(n-=p/s)):f===`mirror`&&(b=o)),y=i(0,1,n)*s}let x;v?(this.delayState.value=u[0],x=this.delayState):x=b.next(y),a&&!v&&(x.value=a(x.value));let{done:S}=x;!v&&c!==null&&(S=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let C=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&S);return C&&m!==Ut&&(x.value=Qt(u,this.options,g,this.speed)),h&&h(x.value),C&&this.finish(),x}then(e,t){return this.finished.then(e,t)}get duration(){return g(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+g(e)}get time(){return g(this.currentTime)}set time(e){e=h(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 Ht(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(A.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=g(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=Dt,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(A.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 an(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var z=e=>e*180/Math.PI,on=e=>cn(z(Math.atan2(e[1],e[0]))),sn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:on,rotateZ:on,skewX:e=>z(Math.atan(e[1])),skewY:e=>z(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},cn=e=>(e%=360,e<0&&(e+=360),e),ln=on,un=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),dn=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),fn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:un,scaleY:dn,scale:e=>(un(e)+dn(e))/2,rotateX:e=>cn(z(Math.atan2(e[6],e[5]))),rotateY:e=>cn(z(Math.atan2(-e[2],e[0]))),rotateZ:ln,rotate:ln,skewX:e=>z(Math.atan(e[4])),skewY:e=>z(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function pn(e){return+!!e.includes(`scale`)}function mn(e,t){if(!e||e===`none`)return pn(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=fn,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=sn,i=t}if(!i)return pn(t);let a=r[t],o=i[1].split(`,`).map(gn);return typeof a==`function`?a(o):o[a]}var hn=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return mn(n,t)};function gn(e){return parseFloat(e.trim())}var _n=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],vn=new Set([..._n,`pathRotation`]),yn=e=>e===Ae||e===N,bn=new Set([`x`,`y`,`z`]),xn=_n.filter(e=>!bn.has(e));function Sn(e){let t=[];return xn.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var B={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})=>mn(t,`x`),y:(e,{transform:t})=>mn(t,`y`)};B.translateX=B.x,B.translateY=B.y;var V=new Set,Cn=!1,wn=!1,Tn=!1;function En(){if(wn){let e=Array.from(V).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=Sn(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)})}wn=!1,Cn=!1,V.forEach(e=>e.complete(Tn)),V.clear()}function Dn(){V.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(wn=!0)})}function On(){Tn=!0,Dn(),En(),Tn=!1}var kn=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?(V.add(this),Cn||(Cn=!0,k.read(Dn),k.resolveKeyframes(En))):(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])}an(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),V.delete(this)}cancel(){this.state===`scheduled`&&(V.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},An=e=>e.startsWith(`--`);function jn(e,t,n){An(t)?e.style.setProperty(t,n):e.style[t]=n}var Mn={};function Nn(e,t){let n=u(e);return()=>Mn[t]??n()}var Pn=Nn(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Fn=Nn(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),In=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Ln={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:In([0,.65,.55,1]),circOut:In([.55,0,1,.45]),backIn:In([.31,.01,.66,-.59]),backOut:In([.33,1.53,.69,.99])};function Rn(e,t){if(e)return typeof e==`function`?Fn()?Ot(e,t):`ease-out`:de(e)?In(e):Array.isArray(e)?e.map(e=>Rn(e,t)||Ln.easeOut):Ln[e]}function zn(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=Rn(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 Bn(e){return typeof e==`function`&&`applyToOptions`in e}function Vn({type:e,...t}){return Bn(e)&&Fn()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Hn=class extends tn{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=Vn(e);this.animation=zn(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Qt(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),jn(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 g(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+g(e)}get time(){return g(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=h(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&&Pn()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),d):r(this)}},Un={anticipate:re,backInOut:ne,circInOut:ae};function Wn(e){return e in Un}function Gn(e){typeof e.ease==`string`&&Wn(e.ease)&&(e.ease=Un[e.ease])}var Kn=10,qn=class extends Hn{constructor(e){Gn(e),en(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:a,...o}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let s=new rn({...o,autoplay:!1}),c=Math.max(Kn,A.now()-this.startTime),l=i(0,Kn,c-Kn),u=s.sample(c).value,{name:d}=this.options;a&&d&&jn(a,d,u),t.setWithVelocity(s.sample(Math.max(0,c-l)).value,u,l),s.stop()}},Jn=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(I.test(e)||e===`0`)&&!e.startsWith(`url(`));function Yn(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 Xn(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=Jn(i,t),s=Jn(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:Yn(e)||(n===`spring`||Bn(n))&&r}function Zn(e){e.duration=0,e.type=`keyframes`}var Qn=new Set([`opacity`,`clipPath`,`filter`,`transform`]),$n=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function er(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&$n.test(e[t]))return!0;return!1}var tr=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),nr=u(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function rr(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:c,transformTemplate:l}=t.owner.getProps();return nr()&&n&&(Qn.has(n)||tr.has(n)&&er(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var ir=40,ar=class extends tn{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=A.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||kn;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:s,delay:c,isHandoff:l,onUpdate:u}=n;this.resolvedAt=A.now();let f=!0;Xn(e,i,a,s)||(f=!1,(o.instantAnimations||!c)&&u?.(Qt(e,n,t)),e[0]=e[e.length-1],Zn(n),n.repeat=0);let p={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>ir?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},m=f&&!l&&rr(p),h=p.motionValue?.owner?.current,g;if(m)try{g=new qn({...p,element:h})}catch{g=new rn(p)}else g=new rn(p);g.finished.then(()=>{this.notifyFinished()}).catch(d),this.pendingTimeline&&=(this.stopTimeline=g.attachTimeline(this.pendingTimeline),void 0),this._animation=g}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(),On()),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()}},or=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 or{then(e,t){return this.finished.finally(e).then(()=>{})}},lr=class extends Hn{constructor(e){super(),this.animation=e,e.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()}}},ur=new WeakMap,dr=(e,t=``)=>`${e}:${t}`;function fr(e){let t=ur.get(e);return t||(t=new Map,ur.set(e,t)),t}var pr=30,mr=e=>!isNaN(parseFloat(e)),hr={current:void 0},gr=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=A.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=A.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=mr(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 m);let n=this.events[e].add(t);return e===`change`?()=>{n(),k.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 hr.current&&hr.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=A.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>pr)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,pr);return _(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 H(e,t){return new gr(e,t)}function _r(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function U(e,t){let n=e?.[t]??e?.default??e;return n===e?n:_r(n,e)}var vr={type:`spring`,stiffness:500,damping:25,restSpeed:10},yr=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),br={type:`keyframes`,duration:.8},xr={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Sr=(e,{keyframes:t})=>t.length>2?br:vn.has(e)?e.startsWith(`scale`)?yr(t[1]):vr:xr,Cr=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function wr(e){for(let t in e)if(!Cr.has(t))return!0;return!1}var Tr=(e,t,n,r={},i,a)=>s=>{let c=U(r,e)||{},l=c.delay||r.delay||0,{elapsed:u=0}=r;u-=h(l);let d={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...c,delay:-u,onUpdate:e=>{t.set(e),c.onUpdate&&c.onUpdate(e)},onComplete:()=>{s(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:a?void 0:i};wr(c)||Object.assign(d,Sr(e,d)),d.duration&&=h(d.duration),d.repeatDelay&&=h(d.repeatDelay),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(Zn(d),d.delay===0&&(f=!0)),(o.instantAnimations||o.skipAnimations||i?.shouldSkipAnimations||c.skipAnimations)&&(f=!0,Zn(d),d.delay=0),d.allowFlatten=!c.type&&!c.ease,f&&!a&&t.get()!==void 0){let e=Qt(d.keyframes,c);if(e!==void 0){k.update(()=>{d.onUpdate(e),d.onComplete()});return}}return c.isSync?new rn(d):new ar(d)},Er=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Dr(e){let t=Er.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function Or(e,t,n=1){`${e}`;let[r,i]=Dr(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return s(e)?parseFloat(e):e}return De(i)?Or(i,t,n+1):i}function kr(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Ar(e,t,n,r){if(typeof t==`function`){let[i,a]=kr(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]=kr(r);t=t(n===void 0?e.custom:n,i,a)}return t}function jr(e,t,n){let r=e.getProps();return Ar(r,t,n===void 0?r.custom:n,e)}var Mr=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,..._n]),Nr=e=>Array.isArray(e);function Pr(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,H(n))}function Fr(e){return Nr(e)?e[e.length-1]||0:e}function Ir(e,t){let{transitionEnd:n={},transition:r={},...i}=jr(e,t)||{};i={...i,...n};for(let t in i)Pr(e,t,Fr(i[t]))}var W=e=>!!(e&&e.getVelocity);function Lr(e){return!!(W(e)&&e.add)}function Rr(e,t){let n=e.getValue(`willChange`);if(Lr(n))return n.add(t);if(!n&&o.WillChange){let n=new o.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function zr(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var Br=`data-`+zr(`framerAppearId`);function Vr(e){return e.props[Br]}function Hr({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Ur(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?_r(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&&Hr(f,t))continue;let o={delay:n,...U(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){k.update(()=>r.set(i));continue}let p=!1;if(window.MotionHandoffAnimation){let n=Vr(e);if(n){let e=window.MotionHandoffAnimation(n,t,k);e!==null&&(o.startTime=e,p=!0)}}Rr(e,t);let m=l??e.shouldReduceMotion;r.start(Tr(t,r,i,m&&Mr.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>k.update(()=>{o&&Ir(e,o)});d.length?Promise.all(d).then(t):t()}return d}var Wr={test:e=>e===`auto`,parse:e=>e},Gr=e=>t=>t.test(e),Kr=[Ae,N,We,M,Ke,Ge,Wr],qr=e=>Kr.find(Gr(e));function Jr(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||l(e)}var Yr=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Xr(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(Pe)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Yr.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Zr=/\b([a-z-]*)\(.*?\)/gu,Qr={...I,getAnimatableNone:e=>{let t=e.match(Zr);return t?t.map(Xr).join(` `):e}},$r={...I,getAnimatableNone:e=>{let t=I.parse(e);return I.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},ei={...Ae,transform:Math.round},ti={borderWidth:N,borderTopWidth:N,borderRightWidth:N,borderBottomWidth:N,borderLeftWidth:N,borderRadius:N,borderTopLeftRadius:N,borderTopRightRadius:N,borderBottomRightRadius:N,borderBottomLeftRadius:N,width:N,maxWidth:N,height:N,maxHeight:N,top:N,right:N,bottom:N,left:N,inset:N,insetBlock:N,insetBlockStart:N,insetBlockEnd:N,insetInline:N,insetInlineStart:N,insetInlineEnd:N,padding:N,paddingTop:N,paddingRight:N,paddingBottom:N,paddingLeft:N,paddingBlock:N,paddingBlockStart:N,paddingBlockEnd:N,paddingInline:N,paddingInlineStart:N,paddingInlineEnd:N,margin:N,marginTop:N,marginRight:N,marginBottom:N,marginLeft:N,marginBlock:N,marginBlockStart:N,marginBlockEnd:N,marginInline:N,marginInlineStart:N,marginInlineEnd:N,fontSize:N,backgroundPositionX:N,backgroundPositionY:N,rotate:M,pathRotation:M,rotateX:M,rotateY:M,rotateZ:M,scale:Me,scaleX:Me,scaleY:Me,scaleZ:Me,skew:M,skewX:M,skewY:M,distance:N,translateX:N,translateY:N,translateZ:N,x:N,y:N,z:N,perspective:N,transformPerspective:N,opacity:je,originX:qe,originY:qe,originZ:N,zIndex:ei,fillOpacity:je,strokeOpacity:je,numOctaves:ei},ni={...ti,color:F,backgroundColor:F,outlineColor:F,fill:F,stroke:F,borderColor:F,borderTopColor:F,borderRightColor:F,borderBottomColor:F,borderLeftColor:F,filter:Qr,WebkitFilter:Qr,mask:$r,WebkitMask:$r},ri=e=>ni[e],ii=new Set([Qr,$r]);function ai(e,t){let n=ri(e);return ii.has(n)||(n=I),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var oi=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`&&!oi.has(t)&&nt(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=ai(n,i)}var ci=class extends kn{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(),De(r))){let i=Or(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Mr.has(n)||e.length!==2)return;let[r,i]=e,a=qr(r),o=qr(i);if(ke(r)!==ke(i)&&B[n]){this.needsMeasurement=!0;return}if(a!==o)if(yn(a)&&yn(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else B[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||Jr(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=B[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]=B[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()}},li=new Set(`borderWidth.borderTopWidth.borderRightWidth.borderBottomWidth.borderLeftWidth.borderRadius.borderTopLeftRadius.borderTopRightRadius.borderBottomRightRadius.borderBottomLeftRadius.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`.split(`.`));function ui(e,t){for(let n=0;n<e.length;n++)typeof e[n]==`number`&&li.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 fi=(e,t)=>t&&typeof e==`number`?t.transform(e):e,{schedule:pi,cancel:mi}=ve(queueMicrotask,!1);function hi(e,t){let n=window.getComputedStyle(e);return An(t)?n.getPropertyValue(t):n[t]}function gi(e){return c(e)&&`ownerSVGElement`in e}function _i(e){return gi(e)&&e.tagName===`svg`}var vi=[...Kr,F,I],yi=e=>vi.find(Gr(e)),bi=0,xi=()=>`motion-view-${bi++}`,Si=e=>e.startsWith(`motion-view-`);function Ci(e,t,n){t&&(e.style?.setProperty(`view-transition-class`,t),n.push(e))}function wi(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 Ti(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]??xi();return e.style?.setProperty(`view-transition-name`,d),n.push(e),t.set(e,d),Ci(e,i,a),wi(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`&&!Si(d)?f=d:(f=xi(),e.style?.setProperty(`view-transition-name`,f),n.push(e)),t.set(e,f),Ci(e,i,a),wi(e,f,o,s,c),f})}function Ei(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 Di(e){return e===`layout`?`group`:e===`enter`||e===`new`?`new`:`old`}var Oi={},G=null,K={set:(e,t)=>{Oi[e]=t},commit:()=>{G||(G=document.createElement(`style`),G.id=`motion-view`);let e=``;for(let t in Oi){let n=Oi[t];e+=`${t} {\n`;for(let[t,r]of Object.entries(n))e+=` ${t}: ${r};\n`;e+=`}
2
- `}G.textContent=e,document.head.appendChild(G),Oi={}},remove:()=>{G&&G.parentElement&&G.parentElement.removeChild(G)}};function ki(e){let t=e.match(/::view-transition-(old|new|group-children|group|image-pair)\((.*?)\)/);return t?{layer:t[2],type:t[1]}:null}function Ai(){return document.getAnimations().filter(e=>{let{effect:t}=e;return!!t&&t.target===document.documentElement&&t.pseudoElement?.startsWith(`::view-transition`)})}function ji(e,t){return t.has(e)&&Object.keys(t.get(e)).length>0}var Mi=[`layout`,`enter`,`exit`,`new`,`old`],Ni={group:[`layout`],new:[`new`,`enter`],old:[`old`,`exit`]},Pi={new:{opacity:0,scale:.85},old:{opacity:1,scale:1}},Fi=.2;function Ii(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 or([])))();let l=new Map,u=[],d=[],f=[],p=new Set,m=new Map,g=new Set,_=new Map,v=new Map,b=new Map,x=new Map,S=e=>{n.forEach((t,n)=>{let c=o.get(n),h=n===`root`||!r.has(n)?void 0:s.has(n)?`none`:`contain`,g;if(n===`root`||!r.has(n))g=[n];else if(a.has(n))if(e===`old`)x.set(n,di(n)),g=Ti(n,l,u,void 0,c,d,h,f,p),b.set(n,g);else{for(let e of x.get(n)??[])e.style?.removeProperty(`view-transition-name`),l.delete(e);g=Ti(a.get(n),l,u,b.get(n),c,d,h,f,p)}else g=Ti(n,l,u,void 0,c,d,h,f,p);let y=i.get(n);g.forEach((n,r)=>{let i=m.get(n);m.set(n,i&&i!==t?{...i,...t}:t),y!==void 0&&_.set(n,y);let a=v.get(n)??{};a[e]=[r,g.length],v.set(n,a)})})},C=(e,t)=>{let n=v.get(e);return(t===`old`?n?.old:t===`new`?n?.new:n?.new??n?.old)??[-1,1]},w=(e,t,n,r,i)=>{let a=Ri(U(c,n),U(Li(e,t)??{},n));return typeof a.delay==`function`&&(a.delay=a.delay(r,i)),a},T=new Map,E=e=>l.forEach((t,n)=>{let r=n.getBoundingClientRect?.();if(r&&r.height){let n=T.get(t)??{};n[e]={width:r.width,height:r.height},T.set(t,n)}}),D=()=>{g.clear();for(let e of v.keys())e!==`root`&&(_.get(e)??ee(e))&&g.add(e)},ee=e=>{let t=T.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)>Fi},te=()=>{ji(`root`,n)||K.set(`:root`,{"view-transition-name":`none`}),K.set(`::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)`,{"animation-timing-function":`linear !important`}),g.forEach(e=>{K.set(`::view-transition-group(${e})`,{overflow:`clip`}),K.set(`::view-transition-old(${e}), ::view-transition-new(${e})`,{width:`100%`,height:`100%`,"object-fit":`cover`})}),p.forEach(e=>{K.set(`::view-transition-group-children(${e})`,{overflow:`clip`})}),K.commit()},ne=()=>{Ei(u,d,f),K.remove()},re=async()=>{await t(),S(`new`),E(`new`),D(),te()},O;try{S(`old`),E(`old`),te(),O=document.startViewTransition(re)}catch(e){return ne(),Promise.reject(e)}return O.finished.finally(ne),new Promise((e,t)=>{O.ready.then(()=>{let t=Ai(),n=[],r=new Set,i=new Set;m.forEach((e,t)=>{let a=v.get(t),o=!!a?.new&&!a?.old,s=!!a?.old&&!a?.new;for(let a of Mi){if(!e[a]||a===`enter`&&!o||a===`exit`&&!s)continue;let l=Di(a),[u,d]=C(t,l);if(u===-1)continue;let{keyframes:f,options:p}=e[a];for(let[m,g]of Object.entries(f)){if(g==null)continue;if(m===`x`||m===`y`){y(!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=Ri(U(c,m),U(p,m));if(!Array.isArray(g)){let t=a===`enter`?e.exit?.keyframes[m]:void 0,n=t==null?m===`opacity`||(l===`new`?o:s)?Pi[l]?.[m]:void 0:Array.isArray(t)?t[t.length-1]:t;n!==void 0&&(g=[n,g])}typeof f.delay==`function`&&(f.delay=f.delay(u,d)),f.duration&&=h(f.duration),f.delay&&=h(f.delay),n.push(new Hn({...f,element:document.documentElement,name:m,pseudoElement:`::view-transition-${l}(${t})`,keyframes:g})),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=ki(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 lr(e)):e.cancel();continue}let c=v.get(o.layer),l=(o.type===`old`||o.type===`new`)&&!!c?.old&&!!c?.new,u=o.type.startsWith(`group`)||l?`group`:o.type,[d,f]=C(o.layer,u),p=w(s,u,u===`group`?`layout`:``,d===-1?0:d,f),g=p.visualDuration;p.duration&&=h(p.duration),p=Vn(p);let _=l&&g!==void 0?h(g):p.duration,y=l?`linear`:Rn(p.ease,p.duration);t.updateTiming({delay:h(p.delay??0),duration:_,easing:y}),n.push(new lr(e))}e(new or(n))}).catch(()=>O.updateCallbackDone.then(()=>e(new or([])),t))})}function Li(e,t){for(let n of Ni[t]??[]){let t=e?.[n]?.options;if(t)return t}}function Ri(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 q=[],zi=null;function Bi(){zi=null;let[e]=q;e&&Vi(e)}function Vi(e){r(q,e),zi=e,Ii(e).then(t=>(e.notifyReady(t),t.finished)).catch(t=>e.notifyReject(t)).finally(Bi)}function Hi(){for(let e=q.length-1;e>=0;e--){let t=q[e],{interrupt:n}=t.options;if(n===`immediate`){let n=q.slice(0,e+1).map(e=>e.update),r=q.slice(e+1);t.update=()=>{n.forEach(e=>e())},q=[t,...r];break}}(!zi||q[0]?.options.interrupt===`immediate`)&&Bi()}function Ui(e){q.push(e),pi.render(Hi)}var Wi=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=d,this.notifyReject=d,this.readyPromise=new Promise((e,t)=>{this.notifyReady=e,this.notifyReject=t}),this.update=e,this.options={interrupt:`wait`,...t},this.readyPromise.catch(d),Ui(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 Gi(e,t={}){return new Wi(e,t)}var Ki=()=>({min:0,max:0}),qi=()=>({x:Ki(),y:Ki()}),Ji=new WeakMap;function Yi(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function Xi(e){return typeof e==`string`||Array.isArray(e)}var Zi=[`initial`,`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`];function Qi(e){return Yi(e.animate)||Zi.some(t=>Xi(e[t]))}function $i(e){return!!(Qi(e)||e.variants)}function ea(e,t,n){for(let r in t){let i=t[r],a=n[r];if(W(i))e.addValue(r,i);else if(W(a))e.addValue(r,H(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,H(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var ta={current:null},na={current:!1},ra=typeof window<`u`;function ia(){if(na.current=!0,ra)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>ta.current=e.matches;e.addEventListener(`change`,t),t()}else ta.current=!1}var aa=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],oa={},sa=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=kn,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=A.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,k.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=Qi(t),this.isVariantNode=$i(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&&W(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,Ji.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:(na.current||ia(),this.shouldReduceMotion=ta.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(),ye(this.notifyUpdate),ye(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&&Qn.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Hn({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:h(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=vn.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&k.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 oa){let t=oa[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):qi()}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<aa.length;t++){let n=aa[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=ea(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=H(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`&&(s(n)||l(n))?n=parseFloat(n):!yi(n)&&I.test(t)&&(n=ai(e,t)),this.setBaseTarget(e,W(n)?n.get():n)),W(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=Ar(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&&!W(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 m),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){pi.render(this.render)}},ca=class extends sa{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;W(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function la({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function ua(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 da(e,t){return la(ua(e.getBoundingClientRect(),t))}var fa={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},pa=_n.length;function ma(e,t,n){let r=``,i=!0;for(let a=0;a<pa;a++){let o=_n[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=fi(s,ti[o]);if(!c){i=!1;let t=fa[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${fi(a,ti.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function ha(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(vn.has(e)){o=!0;continue}else if(Te(e)){i[e]=n;continue}else{let t=fi(n,ti[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=ma(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 ga(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 _a(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var va={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(N.test(e))e=parseFloat(e);else return e;return`${_a(e,t.target.x)}% ${_a(e,t.target.y)}%`}},ya={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=I.parse(e);if(i.length>5)return r;let a=I.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=ft(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},ba={borderRadius:{...va,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:va,borderTopRightRadius:va,borderBottomLeftRadius:va,borderBottomRightRadius:va,boxShadow:ya};function xa(e,{layout:t,layoutId:n}){return vn.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!ba[e]||e===`opacity`)}function Sa(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(W(r[t])||i&&W(i[t])||xa(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function Ca(e){return window.getComputedStyle(e)}var wa=class extends ca{constructor(){super(...arguments),this.type=`html`,this.renderInstance=ga}readValueFromInstance(e,t){if(vn.has(t))return this.projection?.isProjecting?pn(t):hn(e,t);{let n=Ca(e),r=(Te(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return da(e,t)}build(e,t,n){ha(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Sa(e,t,n)}};function Ta(e,t){return e in t}var Ea=class extends sa{constructor(){super(...arguments),this.type=`object`}readValueFromInstance(e,t){if(Ta(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 qi()}build(e,t){Object.assign(e.output,t)}renderInstance(e,{output:t}){Object.assign(e,t)}sortInstanceNodePosition(){return 0}},Da={offset:`stroke-dashoffset`,array:`stroke-dasharray`},Oa={offset:`strokeDashoffset`,array:`strokeDasharray`};function ka(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?Da:Oa;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var Aa=[`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(ha(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 Aa)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 Ma=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`]),Na=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function Pa(e,t,n,r){ga(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(Ma.has(n)?n:zr(n),t.attrs[n])}function Fa(e,t,n){let r=Sa(e,t,n);for(let n in e)if(W(e[n])||W(t[n])){let t=_n.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var Ia=class extends ca{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=qi}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(vn.has(t)){let e=ri(t);return e&&e.default||0}return t=Ma.has(t)?t:zr(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Fa(e,t,n)}build(e,t,n){ja(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){Pa(e,t,n,r)}mount(e){this.isSVGTag=Na(e.tagName),super.mount(e)}};function La(e,t,n){let r=W(e)?e:H(e);return r.start(Tr(``,r,t,n)),r.animation}function Ra(e){return typeof e==`object`&&!Array.isArray(e)}function za(e,t,n,r){return e==null?[]:typeof e==`string`&&Ra(t)?di(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(e=>e!=null):[e]}function Ba(e,t,n){return e*(t+1)+n*t}function Va(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 Ha(e,t,n){for(let i=0;i<e.length;i++){let a=e[i];a.at>t&&a.at<n&&(r(e,a),i--)}}function Ua(e,t,n,r,i,a){Ha(e,i,a);for(let o=0;o<t.length;o++)e.push({value:t[o],at:ft(i,a,r[o]),easing:ue(n,o)})}function Wa(e,t,n=0){let r=t+1+t*n;for(let t=0;t<e.length;t++)e[t]=e[t]/r}function Ga(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var Ka=`easeInOut`,qa=20;function Ja(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}else if(!Array.isArray(o)){l.set(o.name,Va(d,o.at,u,l));continue}let[p,m,g={}]=o;g.at!==void 0&&(d=Va(d,g.at,u,l));let _=0,v=(e,n,r,o=0,s=0)=>{let c=Za(e),{delay:l=0,times:u=qt(c),type:p=t.type||`keyframes`,repeat:m,repeatType:g,repeatDelay:v=0,...y}=n,{ease:b=t.ease||`easeOut`,duration:x}=n,S=typeof l==`function`?l(o,s):l,C=c.length,w=Bn(p)?p:i?.[p||`keyframes`];if(C<=2&&w){let e=100;if(C===2&&eo(c)){let t=c[1]-c[0];e=Math.abs(t)}let n={...t,...y};x!==void 0&&(n.duration=h(x));let r=jt(n,e,w);b=r.ease,x=r.duration}x??=a;let T=d+S;u.length===1&&u[0]===0&&(u[1]=1);let E=u.length-c.length;if(E>0&&Kt(u,E),c.length===1&&c.unshift(null),m&&`${m}${qa}`,m&&m<qa){let e=x>0?v/x:0;x=Ba(x,m,v);let t=[...c],n=[...u];b=Array.isArray(b)?[...b]:[b];let r=[...b],i=g===`reverse`||g===`mirror`,a=t,o=r;i&&(a=[...t].reverse(),g===`reverse`&&(o=[...r].reverse().map(e=>typeof e==`function`?D(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),b.push(`linear`)),c.push(...d);for(let e=0;e<d.length;e++)u.push(n[e]+p),b.push(e===0?`linear`:ue(f,e-1))}Wa(u,m,e)}let ee=T+x;Ua(r,c,b,u,T,ee),_=Math.max(S+x,_),f=Math.max(ee,f)};if(W(p)){let e=Ya(p,s);v(m,g,Xa(`default`,e))}else{let e=za(p,m,r,c),t=e.length;for(let n=0;n<t;n++){m=m,g=g;let r=e[n],i=Ya(r,s);for(let e in m)v(m[e],Qa(g,e),Xa(e,i),n,t)}}u=d,d+=_}return s.forEach((e,r)=>{for(let i in e){let a=e[i];a.sort(Ga);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(p(0,f,t)),l.push(r||`easeOut`)}c[0]!==0&&(c.unshift(0),s.unshift(s[0]),l.unshift(Ka)),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,...m}=t;u.transition[i]={...m,duration:f,ease:l,times:c,...n}}}),o}function Ya(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Xa(e,t){return t[e]||(t[e]=[]),t[e]}function Za(e){return Array.isArray(e)?e:[e]}function Qa(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var $a=e=>typeof e==`number`,eo=e=>e.every($a);function to(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=gi(e)&&!_i(e)?new Ia(t):new wa(t);n.mount(e),Ji.set(e,n)}function no(e){let t=new Ea({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});t.mount(e),Ji.set(e,t)}function ro(e,t){return W(e)||typeof e==`number`||typeof e==`string`&&!Ra(t)}function io(e,t,n,r){let i=[];if(ro(e,t))i.push(La(e,Ra(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return i;let a=za(e,t,r),o=a.length;for(let e=0;e<o;e++){let r=a[e],s=r instanceof Element?to:no;Ji.has(r)||s(r);let c=Ji.get(r),l={...n};`delay`in l&&typeof l.delay==`function`&&(l.delay=l.delay(e,o)),i.push(...Ur(c,{...t,transition:l},{}))}}return i}function ao(e,t,n){let r=[];return Ja(e.map(e=>{if(Array.isArray(e)&&typeof e[0]==`function`){let t=e[0],n=H(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:R}).forEach(({keyframes:e,transition:t},n)=>{r.push(...io(n,e,t))}),r}function oo(e){return Array.isArray(e)&&e.some(Array.isArray)}function so(e={}){let{scope:t,reduceMotion:n,skipAnimations:i}=e;function a(e,a,o){let s=[],c,l={};if(n!==void 0&&(l.reduceMotion=n),i!==void 0&&(l.skipAnimations=i),oo(e)){let{onComplete:n,...r}=a||{};typeof n==`function`&&(c=n),s=ao(e,{...l,...r},t)}else{let{onComplete:n,...r}=o||{};typeof n==`function`&&(c=n),s=io(e,a,{...l,...r},t)}let u=new cr(s);return c&&u.finished.then(c),t&&(t.animations.push(u),u.finished.then(()=>{r(t.animations,u)})),u}return a}var co=so();function lo(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={...U(s,e)};i.duration&&=h(i.duration),i.delay&&=h(i.delay);let a=fr(r),c=dr(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]=hi(r,i)),an(t),ui(t,i),!a&&t.length<2&&t.unshift(hi(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 Hn(r);t.set(n,i),i.finished.finally(()=>t.delete(n)),s.push(i)}return s}var uo=(e=>{function t(t,n,r){return new cr(lo(t,n,r,e))}return t})(),J=(e,t)=>({finished:e,then:e.then.bind(e),...t}),Y=e=>J((async()=>{await e?.()})(),{cancel(){},stop(){},complete(){}}),fo=(e,t)=>{let n=!1,r=()=>{n||(n=!0,t?.())};return J(e.finished.then(()=>{},()=>{}).finally(r),{cancel(){e.cancel(),r()},stop(){e.stop(),r()},complete(){e.complete(),r()}})},po=(...e)=>J(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 J((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()}})},ho=new WeakMap,go=e=>ho.get(e),_o=e=>{let t=ho.get(e);return t?.handle.stop(),t},vo=(e,t)=>{ho.set(e,t)},yo=(e,t)=>{ho.get(e)?.handle===t&&ho.delete(e)},bo=(e,t,n,r,i)=>{let a=fo(t(_o(e))),o=()=>a.stop();r?.addEventListener(`abort`,o,{once:!0});let s,c=()=>{r?.removeEventListener(`abort`,o),go(e)?.handle===s&&i?.(),yo(e,s)};return s=J(a.finished.finally(c),{cancel(){a.cancel(),c()},stop(){a.stop(),c()},complete(){a.complete()}}),vo(e,{handle:s,properties:n}),s},X=Object.freeze({fast:Object.freeze({duration:.08}),moderate:Object.freeze({duration:.16}),slow:Object.freeze({duration:.24})}),Z={out:[.23,1,.32,1],inOut:[.77,0,.175,1]},Q=Object.freeze({feedback:Object.freeze({duration:X.fast.duration,ease:Z.out}),presence:Object.freeze({duration:X.moderate.duration,ease:Z.out}),presenceEmphasized:Object.freeze({duration:X.slow.duration,ease:Z.out}),layout:Object.freeze({duration:X.moderate.duration,ease:Z.inOut}),layoutQuick:Object.freeze({duration:X.fast.duration,ease:Z.inOut}),layoutSpring:Object.freeze({visualDuration:X.moderate.duration,bounce:0}),resize:Object.freeze({visualDuration:X.moderate.duration,bounce:0}),gestureExit:Object.freeze({duration:X.moderate.duration,ease:Z.out}),gestureSettle:Object.freeze({visualDuration:X.slow.duration,bounce:0})}),xo=new Set([`layoutSpring`,`resize`,`gestureSettle`]),So=new Set([`feedback`,`presence`,`presenceEmphasized`,`layout`,`layoutQuick`,`layoutSpring`,`resize`,`gestureSettle`]),Co={feedback:`feedback`,presence:`presence`,presenceEmphasized:`presence-emphasized`,layout:`layout`,layoutQuick:`layout-quick`,layoutSpring:`layout-spring`,resize:`resize`,gestureExit:`gesture-exit`,gestureSettle:`gesture-settle`},wo={feedback:`fast`,presence:`moderate`,presenceEmphasized:`slow`,layout:`moderate`,layoutQuick:`fast`,layoutSpring:`moderate`,resize:`moderate`,gestureExit:`moderate`,gestureSettle:`slow`},To=(e,t)=>{let n=Number.parseFloat(e.getPropertyValue(t));return Number.isFinite(n)?n:void 0},Eo=(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},Do=(e,t)=>{let n=getComputedStyle(e),r=Eo(n,`--motion-duration-${wo[t]}`),i=To(n,`--motion-bounce-${Co[t]}`),a=Q[t];return xo.has(t)||So.has(t)&&(i??0)>0?{visualDuration:r===void 0?`visualDuration`in a?a.visualDuration:a.duration:r/1e3,bounce:i??(`bounce`in a?a.bounce:0)}:{duration:r===void 0?`duration`in a?a.duration:a.visualDuration:r/1e3,...`ease`in a?{ease:a.ease}:{}}},Oo=(e,t)=>xo.has(e)||t!==void 0&&So.has(e)&&(To(getComputedStyle(t),`--motion-bounce-${Co[e]}`)??0)>0,ko=(e,t)=>Do(e,t),Ao=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%)`})})})}),jo=(e=`moderate`,t)=>{if(typeof e!=`string`)return e;if(t===void 0)return X[e];let n=Eo(getComputedStyle(t),`--motion-duration-${e}`);return n===void 0?X[e]:{duration:n/1e3}},Mo=e=>Array.isArray(e)?e[e.length-1]:e,No=e=>Array.isArray(e)?[...e]:e,Po=`(prefers-reduced-motion: reduce)`,Fo=()=>typeof window>`u`||typeof window.matchMedia!=`function`?!1:window.matchMedia(Po).matches,$=(e=`user`)=>e===`always`?!0:e===`never`?!1:Fo(),Io=(e,t={},n=`user`)=>$(n)?{...e,duration:0,...t}:e,Lo=e=>{let{height:t,width:n}=e.getBoundingClientRect();return{height:t,width:n}},Ro=(e,t,n)=>n.some(n=>Math.abs(n===`height`||n===`maxHeight`?e.height-t.height:e.width-t.width)>=1),zo=(e,t={})=>{let n=[...new Set(t.properties??[`height`,`width`])],r=t.role??`layout`,i=Lo(e),a=null,o=0,s=!1,c=[...new Set([...n,...n.includes(`maxHeight`)?[`height`]:[],...n.includes(`maxWidth`)?[`width`]:[]])],l=Object.fromEntries(c.map(t=>[t,e.style.getPropertyValue(t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`))])),u={overflow:e.style.overflow,willChange:e.style.willChange},d=()=>{for(let[t,n]of Object.entries(l))e.style.setProperty(t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),n);Object.assign(e.style,u)},f=()=>{let t=Lo(e);return a?.handle.stop(),a=null,d(),t},p=(t=()=>{},c={})=>{if(s)return null;if(a&&c.animate!==!1&&c.key!==void 0&&a.key===c.key)return t(),a.handle;let l=a?f():i;t();let u=Lo(e);if(i=u,c.animate===!1||!Ro(l,u,n)||$())return null;let p={...n.some(e=>e===`height`||e===`maxHeight`)?{height:[`${l.height}px`,`${u.height}px`]}:{},...n.some(e=>e===`width`||e===`maxWidth`)?{width:[`${l.width}px`,`${u.width}px`]}:{}};e.style.overflow=`hidden`,e.style.willChange=n.map(e=>e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)).join(`, `),`height`in p&&(e.style.height=`${l.height}px`),`width`in p&&(e.style.width=`${l.width}px`),n.includes(`maxHeight`)&&(e.style.maxHeight=`${Math.max(l.height,u.height)}px`),n.includes(`maxWidth`)&&(e.style.maxWidth=`${Math.max(l.width,u.width)}px`),e.getBoundingClientRect();let m=bo(e,()=>uo(e,p,{...ko(e,r),...Oo(r,e)?{type:R}:{}}),new Set([`block-size`,`inline-size`])),h={handle:m,generation:++o,key:c.key};return a=h,m.finished.finally(()=>{a?.generation===h.generation&&(a=null,d())}),m};return{update:p,refresh:e=>p(void 0,e),destroy(){s||(s=!0,a&&f(),d())}}},Bo=e=>typeof e==`object`&&!!e&&`initial`in e,Vo=e=>{let t={},n=new Map,r=new Map,i;Object.keys(e.values).forEach(r=>{let i=e.values[r];t[r]=H(Bo(i)?i.initial:i),Bo(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($(e.reducedMotion))return s(i),Y();let c=Object.keys(i).flatMap(e=>{let s=i[e];if(s===void 0||!t[e])return[];o(e);let c=fo(co(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?po(...c):Y()},current:a,destroy:()=>{i?.(),r.forEach(e=>e.cancel()),r.clear()}}},Ho=e=>!(e instanceof Element)&&typeof e==`object`&&!!e&&`signal`in e,Uo=e=>{let t=e instanceof Element?e:e.el;if(!(t instanceof Element))throw TypeError(`Motion subject requires an Element target.`);return t},Wo=(e,t)=>{let n=Uo(e);if(!t)return n;if(t instanceof Element)return t;let r=Ho(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},Go=e=>Ho(e)?e.signal:null,Ko=new WeakMap,qo=(e,t)=>{let n=Wo(e,t.target);if(!(n instanceof HTMLElement))throw TypeError(`Motion resize requires an HTMLElement target.`);let r=Wo(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=Go(e);if(i?.aborted)return Y();let a=_o(n);Ko.has(n)||Ko.set(n,{height:n.style.height,opacity:n.style.opacity,overflow:n.style.overflow,willChange:n.style.willChange});let o=Math.max(r.scrollHeight,r.getBoundingClientRect().height),s=a?.properties.has(`block-size`)?n.getBoundingClientRect().height:t.from===`content`?o:0,c=t.to===`content`?o:0,l=$(),u=t.speed===void 0?void 0:jo(t.speed,n),d={},f=new Set;n.style.overflow=`hidden`,n.style.willChange=l?`opacity`:`height, opacity`,l?n.style.height=`${c}px`:(d.height=[s,c],f.add(`block-size`)),t.opacity!==void 0&&(d.opacity=a?.properties.has(`opacity`)?Mo(t.opacity):No(t.opacity),f.add(`opacity`));let p=t.role??`resize`,m=u===void 0?{}:`stiffness`in u?u:Oo(p)?{visualDuration:u.duration}:u,h=fo(uo(n,d,l?{...Q.feedback,type:`tween`}:{...ko(n,p),...Oo(p,n)?{type:R}:{},...m,...t.transition})),g=()=>h.stop();i?.addEventListener(`abort`,g,{once:!0});let _,v=()=>{if(i?.removeEventListener(`abort`,g),go(n)?.handle!==_)return;let e=Ko.get(n);e&&Object.assign(n.style,e),Ko.delete(n),yo(n,_)};return _=J(h.finished.finally(v),{cancel(){h.cancel(),v()},stop(){h.stop()},complete(){h.complete()}}),vo(n,{handle:_,properties:f}),_},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)?Mo(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)?Mo(t):t]]:[])),$o=(e,t,n,r,i)=>{let a=i?`feedback`:t,o=a===void 0?{type:`tween`,ease:Z.out}:{...Do(e,a),type:Oo(a,e)?R:`tween`},s=n===void 0?void 0:jo(i?`fast`:n,e),c=s===void 0?o:`stiffness`in s?{...o,type:R,...s}:{...o,duration:s.duration};return{...c.duration===void 0&&c.type===void 0?{duration:X.moderate.duration}:{},...c,...r}},es=(e,t,n)=>{let r=Wo(e,t.target),i=Go(e);if(i?.aborted)return Y();let a=$();if(a){let e=Qo(t.keyframes);Object.keys(e).length>0&&co(r,e,{duration:0}).complete()}let o=a?Zo(t.keyframes):Jo(t.keyframes);return Object.keys(o).length===0?(co(r,Object.fromEntries(Object.entries(Jo(t.keyframes)).map(([e,t])=>[e,Array.isArray(t)?Mo(t):t])),{duration:0}).complete(),Y()):bo(r,e=>co(r,Yo(o,e?.properties),$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?Y():mo(...this.#t.map(e=>()=>po(...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=e=>`[${t}="${as(e)}"]`,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=Q.layout,ms={transform:[`none`,`none`]},hs=`[${t}], [${e}]`,gs=(e,t,n={})=>{if(typeof document.startViewTransition!=`function`||$(n.reducedMotion))return Y(e);let r=t??(n.layout||n.preset===`layout`?hs:null),i=us(n.scope??document,r),a=Gi(e,{...Q.layout,interrupt:`immediate`,...n.transition});return i.forEach(({subject:e,newSubject:t})=>{a.add(e,t),n.className&&a.class(n.className),typeof n.crop==`boolean`&&a.crop(n.crop),typeof n.group==`boolean`&&a.group(n.group),n.layout!==!1&&n.preset!==`none`&&a.layout(typeof n.layout==`object`?n.layout:ps);let r=n.newView??(n.preset===`stream`?ms:void 0),i=n.oldView??(n.preset===`stream`?ms:void 0),o=n.enter,s=n.exit;r&&a.new(r,Q.feedback),i&&a.old(i,Q.feedback),o&&a.enter(o,Q.feedback),s&&a.exit(s,Q.feedback)}),J(Promise.resolve(a.then(()=>{},()=>{})),{cancel(){Ai().forEach(e=>e.cancel())},stop(){Ai().forEach(e=>e.pause())},complete(){Ai().forEach(e=>{try{e.finish()}catch{e.cancel()}})}})},_s=Object.assign(is,{presets:Ao,roles:Q,speeds:X,easings:Z,createController:Vo,withReducedMotion:Io,view:(e,t={})=>{let{targets:n,...r}=t;return gs(async()=>{await e(),await ds()},n,{preset:`layout`,...r})}});export{H as _,os as a,$ as c,bo as d,_o as f,di as g,co as h,as as i,Do as l,uo as m,gs as n,is as o,Y as p,fs as r,zo as s,_s as t,Q as u,R as v};
3
- //# sourceMappingURL=motion-D2EM1olE.js.map