@arcteninc/core 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/dist/core.css +0 -1
- package/dist/index.cjs +0 -14
- package/dist/index.mjs +0 -6221
- package/dist/server.cjs +0 -1
- package/dist/server.mjs +0 -26
package/package.json
CHANGED
package/dist/core.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-100:oklch(93.6% .032 17.717);--color-red-400:oklch(70.4% .191 22.216);--color-red-700:oklch(50.5% .213 27.518);--color-red-950:oklch(25.8% .092 26.042);--color-green-100:oklch(96.2% .044 156.743);--color-green-400:oklch(79.2% .209 151.711);--color-green-700:oklch(52.7% .154 150.069);--color-green-950:oklch(26.6% .065 152.934);--color-blue-500:oklch(62.3% .214 259.815);--color-stone-50:oklch(98.5% .001 106.423);--color-stone-100:oklch(97% .001 106.424);--color-stone-200:oklch(92.3% .003 48.717);--color-stone-400:oklch(70.9% .01 56.259);--color-stone-600:oklch(44.4% .011 73.639);--color-stone-700:oklch(37.4% .01 67.558);--color-stone-800:oklch(26.8% .007 34.298);--color-stone-900:oklch(21.6% .006 56.043);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-md:28rem;--container-lg:32rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-widest:.1em;--radius-xs:.125rem;--radius-2xl:1rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-background:var(--background);--color-muted-foreground:var(--muted-foreground)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){*{outline-color:color-mix(in oklab,var(--ring)50%,transparent)}}body{background-color:var(--background);color:var(--foreground)}.prose ul{margin:.75em 0;padding-left:1.5em;list-style-type:disc}.prose ol{margin:.75em 0;padding-left:1.5em;list-style-type:decimal}.prose li{margin:.25em 0;padding-left:.25em}.prose ul ul,.prose ol ul{margin:.25em 0;list-style-type:circle}.prose ul ul ul,.prose ol ul ul,.prose ol ol ul,.prose ul ol ul{list-style-type:square}.prose ol ol,.prose ul ol{margin:.25em 0;list-style-type:lower-alpha}.prose ol ol ol,.prose ul ol ol,.prose ul ul ol,.prose ol ul ol{list-style-type:lower-roman}.prose li>p{margin:0}.prose li>ul,.prose li>ol{margin-top:.25em;margin-bottom:.25em}.prose ul[data-type=taskList],.prose ul.contains-task-list{padding-left:0;list-style-type:none}.prose li[data-type=taskItem],.prose li.task-list-item{align-items:flex-start;gap:.5em;padding-left:0;list-style-type:none;display:flex}.prose input[type=checkbox]{cursor:pointer;width:1em;height:1em;accent-color:var(--primary);flex-shrink:0;margin-top:.35em}.prose li[data-type=taskItem]>label,.prose li.task-list-item>label{cursor:pointer;flex:1;align-items:flex-start;gap:.5em;display:flex}.prose li[data-type=taskItem] input[type=checkbox]:checked+label,.prose li.task-list-item input[type=checkbox]:checked~*{opacity:.6;text-decoration:line-through}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.-top-6{top:calc(var(--spacing)*-6)}.top-0{top:calc(var(--spacing)*0)}.top-1\/2{top:50%}.top-4{top:calc(var(--spacing)*4)}.top-\[50\%\]{top:50%}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-4{right:calc(var(--spacing)*4)}.bottom-0{bottom:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.left-4{left:calc(var(--spacing)*4)}.left-\[50\%\]{left:50%}.z-50{z-index:50}.order-first{order:-9999}.order-last{order:9999}.-mx-1{margin-inline:calc(var(--spacing)*-1)}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing)*1)}.my-1\.5{margin-block:calc(var(--spacing)*1.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.mr-1{margin-right:calc(var(--spacing)*1)}.mr-2{margin-right:calc(var(--spacing)*2)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-6{margin-left:calc(var(--spacing)*6)}.ml-auto{margin-left:auto}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.field-sizing-content{field-sizing:content}.size-2{width:calc(var(--spacing)*2);height:calc(var(--spacing)*2)}.size-2\.5{width:calc(var(--spacing)*2.5);height:calc(var(--spacing)*2.5)}.size-3{width:calc(var(--spacing)*3);height:calc(var(--spacing)*3)}.size-3\.5{width:calc(var(--spacing)*3.5);height:calc(var(--spacing)*3.5)}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-5{width:calc(var(--spacing)*5);height:calc(var(--spacing)*5)}.size-6{width:calc(var(--spacing)*6);height:calc(var(--spacing)*6)}.size-8{width:calc(var(--spacing)*8);height:calc(var(--spacing)*8)}.size-9{width:calc(var(--spacing)*9);height:calc(var(--spacing)*9)}.size-10{width:calc(var(--spacing)*10);height:calc(var(--spacing)*10)}.size-full{width:100%;height:100%}.h-1{height:calc(var(--spacing)*1)}.h-2{height:calc(var(--spacing)*2)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-\(--radix-dropdown-menu-content-available-height\){max-height:var(--radix-dropdown-menu-content-available-height)}.max-h-\(--radix-select-content-available-height\){max-height:var(--radix-select-content-available-height)}.max-h-48{max-height:calc(var(--spacing)*48)}.max-h-64{max-height:calc(var(--spacing)*64)}.max-h-96{max-height:calc(var(--spacing)*96)}.max-h-\[300px\]{max-height:300px}.max-h-full{max-height:100%}.min-h-16{min-height:calc(var(--spacing)*16)}.w-1{width:calc(var(--spacing)*1)}.w-2{width:calc(var(--spacing)*2)}.w-3{width:calc(var(--spacing)*3)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-8{width:calc(var(--spacing)*8)}.w-64{width:calc(var(--spacing)*64)}.w-96{width:calc(var(--spacing)*96)}.w-\[30px\]{width:30px}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.max-w-0{max-width:calc(var(--spacing)*0)}.max-w-\[85\%\]{max-width:85%}.max-w-\[calc\(100\%-2rem\)\]{max-width:calc(100% - 2rem)}.max-w-full{max-width:100%}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-5{min-width:calc(var(--spacing)*5)}.min-w-\[8rem\]{min-width:8rem}.min-w-\[60px\]{min-width:60px}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.origin-\(--radix-dropdown-menu-content-transform-origin\){transform-origin:var(--radix-dropdown-menu-content-transform-origin)}.origin-\(--radix-hover-card-content-transform-origin\){transform-origin:var(--radix-hover-card-content-transform-origin)}.origin-\(--radix-select-content-transform-origin\){transform-origin:var(--radix-select-content-transform-origin)}.origin-\(--radix-tooltip-content-transform-origin\){transform-origin:var(--radix-tooltip-content-transform-origin)}.-translate-x-1{--tw-translate-x:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-\[calc\(-50\%_-_2px\)\]{--tw-translate-y: calc(-50% - 2px) ;translate:var(--tw-translate-x)var(--tw-translate-y)}.rotate-0{rotate:none}.rotate-45{rotate:45deg}.rotate-180{rotate:180deg}.animate-in{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-ew-resize{cursor:ew-resize}.cursor-move{cursor:move}.cursor-nwse-resize{cursor:nwse-resize}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.resize{resize:both}.resize-none{resize:none}.scroll-my-1{scroll-margin-block:calc(var(--spacing)*1)}.scroll-py-1{scroll-padding-block:calc(var(--spacing)*1)}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\.5{gap:calc(var(--spacing)*2.5)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.scroll-smooth{scroll-behavior:smooth}.rounded{border-radius:.25rem}.rounded-\[2px\]{border-radius:2px}.rounded-\[calc\(var\(--radius\)-5px\)\]{border-radius:calc(var(--radius) - 5px)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.rounded-xs{border-radius:var(--radius-xs)}.rounded-t-full{border-top-left-radius:3.40282e38px;border-top-right-radius:3.40282e38px}.rounded-l-2xl{border-top-left-radius:var(--radius-2xl);border-bottom-left-radius:var(--radius-2xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-none{--tw-border-style:none;border-style:none}.border-border{border-color:var(--border)}.border-input{border-color:var(--input)}.border-transparent{border-color:#0000}.bg-accent{background-color:var(--accent)}.bg-background{background-color:var(--background)}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-border{background-color:var(--border)}.bg-current{background-color:currentColor}.bg-destructive,.bg-destructive\/10{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.bg-destructive\/10{background-color:color-mix(in oklab,var(--destructive)10%,transparent)}}.bg-foreground{background-color:var(--foreground)}.bg-green-100{background-color:var(--color-green-100)}.bg-muted{background-color:var(--muted)}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-red-100{background-color:var(--color-red-100)}.bg-secondary{background-color:var(--secondary)}.bg-stone-50{background-color:var(--color-stone-50)}.bg-stone-100{background-color:var(--color-stone-100)}.bg-stone-400{background-color:var(--color-stone-400)}.bg-stone-400\/30{background-color:#a6a09b4d}@supports (color:color-mix(in lab,red,red)){.bg-stone-400\/30{background-color:color-mix(in oklab,var(--color-stone-400)30%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-\[length\:250\%_100\%\,auto\]{background-size:250% 100%,auto}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.\[background-repeat\:no-repeat\,padding-box\]{background-repeat:no-repeat,padding-box}.fill-current{fill:currentColor}.fill-foreground{fill:var(--foreground)}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.px-0\.5{padding-inline:calc(var(--spacing)*.5)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-1\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-6{padding-block:calc(var(--spacing)*6)}.pt-3{padding-top:calc(var(--spacing)*3)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-3{padding-right:calc(var(--spacing)*3)}.pr-8{padding-right:calc(var(--spacing)*8)}.pr-12{padding-right:calc(var(--spacing)*12)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pl-2{padding-left:calc(var(--spacing)*2)}.pl-3{padding-left:calc(var(--spacing)*3)}.pl-8{padding-left:calc(var(--spacing)*8)}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-none{--tw-leading:1;line-height:1}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-balance{text-wrap:balance}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent-foreground{color:var(--accent-foreground)}.text-background{color:var(--background)}.text-destructive{color:var(--destructive)}.text-foreground{color:var(--foreground)}.text-green-700{color:var(--color-green-700)}.text-muted-foreground,.text-muted-foreground\/40{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/40{color:color-mix(in oklab,var(--muted-foreground)40%,transparent)}}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-red-700{color:var(--color-red-700)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-stone-600{color:var(--color-stone-600)}.text-transparent{color:#0000}.text-white{color:var(--color-white)}.italic{font-style:italic}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[color\,box-shadow\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.fade-in-0{--tw-enter-opacity:0}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.zoom-in-95{--tw-enter-scale:.95}.\[--bg\:linear-gradient\(90deg\,\#0000_calc\(50\%-var\(--spread\)\)\,var\(--color-background\)\,\#0000_calc\(50\%\+var\(--spread\)\)\)\]{--bg:linear-gradient(90deg,#0000 calc(50% - var(--spread)),var(--color-background),#0000 calc(50% + var(--spread)))}.\[writing-mode\:vertical-lr\]{writing-mode:vertical-lr}@media(hover:hover){.group-hover\:pointer-events-auto:is(:where(.group):hover *){pointer-events:auto}.group-hover\:flex:is(:where(.group):hover *){display:flex}.group-hover\:hidden:is(:where(.group):hover *){display:none}.group-hover\:max-w-\[100px\]:is(:where(.group):hover *){max-width:100px}.group-hover\:bg-blue-500\/40:is(:where(.group):hover *){background-color:#3080ff66}@supports (color:color-mix(in lab,red,red)){.group-hover\:bg-blue-500\/40:is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-blue-500)40%,transparent)}}.group-hover\:opacity-0:is(:where(.group):hover *){opacity:0}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.group-has-\[\>input\]\/input-group\:pt-2\.5:is(:where(.group\/input-group):has(>input) *){padding-top:calc(var(--spacing)*2.5)}.group-has-\[\>input\]\/input-group\:pb-2\.5:is(:where(.group\/input-group):has(>input) *){padding-bottom:calc(var(--spacing)*2.5)}.group-data-\[disabled\=true\]\/input-group\:opacity-50:is(:where(.group\/input-group)[data-disabled=true] *){opacity:.5}.selection\:bg-primary ::selection{background-color:var(--primary)}.selection\:bg-primary::selection{background-color:var(--primary)}.selection\:text-primary-foreground ::selection{color:var(--primary-foreground)}.selection\:text-primary-foreground::selection{color:var(--primary-foreground)}.file\:inline-flex::file-selector-button{display:inline-flex}.file\:h-7::file-selector-button{height:calc(var(--spacing)*7)}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}@media(hover:hover){.hover\:w-1:hover{width:calc(var(--spacing)*1)}.hover\:bg-accent:hover{background-color:var(--accent)}.hover\:bg-blue-500\/20:hover{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.hover\:bg-blue-500\/20:hover{background-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}.hover\:bg-blue-500\/40:hover{background-color:#3080ff66}@supports (color:color-mix(in lab,red,red)){.hover\:bg-blue-500\/40:hover{background-color:color-mix(in oklab,var(--color-blue-500)40%,transparent)}}.hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,var(--destructive)90%,transparent)}}.hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--primary)90%,transparent)}}.hover\:bg-secondary\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab,var(--secondary)80%,transparent)}}.hover\:bg-stone-200:hover{background-color:var(--color-stone-200)}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:text-muted-foreground\/60:hover{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.hover\:text-muted-foreground\/60:hover{color:color-mix(in oklab,var(--muted-foreground)60%,transparent)}}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}}.focus\:bg-accent:focus{background-color:var(--accent)}.focus\:text-accent-foreground:focus{color:var(--accent-foreground)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-ring:focus{--tw-ring-color:var(--ring)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.focus\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.focus-visible\:border-ring:focus-visible{border-color:var(--ring)}.focus-visible\:ring-0:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-\[3px\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:color-mix(in oklab,var(--destructive)20%,transparent)}}.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:color-mix(in oklab,var(--ring)50%,transparent)}}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.has-\[\[data-slot\=input-group-control\]\:focus-visible\]\:border-ring:has([data-slot=input-group-control]:focus-visible){border-color:var(--ring)}.has-\[\[data-slot\=input-group-control\]\:focus-visible\]\:ring-\[3px\]:has([data-slot=input-group-control]:focus-visible){--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.has-\[\[data-slot\=input-group-control\]\:focus-visible\]\:ring-ring\/50:has([data-slot=input-group-control]:focus-visible){--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.has-\[\[data-slot\=input-group-control\]\:focus-visible\]\:ring-ring\/50:has([data-slot=input-group-control]:focus-visible){--tw-ring-color:color-mix(in oklab,var(--ring)50%,transparent)}}.has-\[\[data-slot\]\[aria-invalid\=true\]\]\:border-destructive:has([data-slot][aria-invalid=true]){border-color:var(--destructive)}.has-\[\[data-slot\]\[aria-invalid\=true\]\]\:ring-destructive\/20:has([data-slot][aria-invalid=true]){--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.has-\[\[data-slot\]\[aria-invalid\=true\]\]\:ring-destructive\/20:has([data-slot][aria-invalid=true]){--tw-ring-color:color-mix(in oklab,var(--destructive)20%,transparent)}}.has-\[\>\[data-align\=block-end\]\]\:h-auto:has(>[data-align=block-end]){height:auto}.has-\[\>\[data-align\=block-end\]\]\:flex-col:has(>[data-align=block-end]){flex-direction:column}.has-\[\>\[data-align\=block-start\]\]\:h-auto:has(>[data-align=block-start]){height:auto}.has-\[\>\[data-align\=block-start\]\]\:flex-col:has(>[data-align=block-start]){flex-direction:column}.has-\[\>button\]\:mr-\[-0\.45rem\]:has(>button){margin-right:-.45rem}.has-\[\>button\]\:ml-\[-0\.45rem\]:has(>button){margin-left:-.45rem}.has-\[\>kbd\]\:mr-\[-0\.35rem\]:has(>kbd){margin-right:-.35rem}.has-\[\>kbd\]\:ml-\[-0\.35rem\]:has(>kbd){margin-left:-.35rem}.has-\[\>svg\]\:p-0:has(>svg){padding:calc(var(--spacing)*0)}.has-\[\>svg\]\:px-2:has(>svg){padding-inline:calc(var(--spacing)*2)}.has-\[\>svg\]\:px-2\.5:has(>svg){padding-inline:calc(var(--spacing)*2.5)}.has-\[\>svg\]\:px-3:has(>svg){padding-inline:calc(var(--spacing)*3)}.has-\[\>svg\]\:px-4:has(>svg){padding-inline:calc(var(--spacing)*4)}.has-\[\>textarea\]\:h-auto:has(>textarea){height:auto}.aria-invalid\:border-destructive[aria-invalid=true]{border-color:var(--destructive)}.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab,var(--destructive)20%,transparent)}}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true]{pointer-events:none}.data-\[disabled\=true\]\:opacity-50[data-disabled=true]{opacity:.5}.data-\[inset\]\:pl-8[data-inset]{padding-left:calc(var(--spacing)*8)}.data-\[placeholder\]\:text-muted-foreground[data-placeholder]{color:var(--muted-foreground)}.data-\[selected\=true\]\:bg-accent[data-selected=true]{background-color:var(--accent)}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:var(--accent-foreground)}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:calc(2*var(--spacing))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:calc(2*var(--spacing))}.data-\[size\=default\]\:h-9[data-size=default]{height:calc(var(--spacing)*9)}.data-\[size\=sm\]\:h-8[data-size=sm]{height:calc(var(--spacing)*8)}:is(.\*\*\:data-\[slot\=command-input-wrapper\]\:h-12 *)[data-slot=command-input-wrapper]{height:calc(var(--spacing)*12)}:is(.\*\:data-\[slot\=select-value\]\:line-clamp-1>*)[data-slot=select-value]{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:is(.\*\:data-\[slot\=select-value\]\:flex>*)[data-slot=select-value]{display:flex}:is(.\*\:data-\[slot\=select-value\]\:items-center>*)[data-slot=select-value]{align-items:center}:is(.\*\:data-\[slot\=select-value\]\:gap-2>*)[data-slot=select-value]{gap:calc(var(--spacing)*2)}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=closed\]\:slide-out-to-top-2[data-state=closed]{--tw-exit-translate-y:calc(2*var(--spacing)*-1)}.data-\[state\=open\]\:animate-in[data-state=open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:var(--accent)}.data-\[state\=open\]\:text-accent-foreground[data-state=open]{color:var(--accent-foreground)}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:var(--muted-foreground)}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\[state\=open\]\:slide-in-from-top-2[data-state=open]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.data-\[variant\=destructive\]\:text-destructive[data-variant=destructive]{color:var(--destructive)}.data-\[variant\=destructive\]\:focus\:bg-destructive\/10[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.data-\[variant\=destructive\]\:focus\:bg-destructive\/10[data-variant=destructive]:focus{background-color:color-mix(in oklab,var(--destructive)10%,transparent)}}.data-\[variant\=destructive\]\:focus\:text-destructive[data-variant=destructive]:focus{color:var(--destructive)}@media(min-width:40rem){.sm\:max-w-lg{max-width:var(--container-lg)}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:text-left{text-align:left}}@media(min-width:48rem){.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}.dark\:border-input:is(.dark *){border-color:var(--input)}.dark\:bg-destructive\/60:is(.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:bg-destructive\/60:is(.dark *){background-color:color-mix(in oklab,var(--destructive)60%,transparent)}}.dark\:bg-green-950\/30:is(.dark *){background-color:#032e154d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-green-950\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-green-950)30%,transparent)}}.dark\:bg-input\/30:is(.dark *){background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:bg-input\/30:is(.dark *){background-color:color-mix(in oklab,var(--input)30%,transparent)}}.dark\:bg-red-950\/30:is(.dark *){background-color:#4608094d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-red-950\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-red-950)30%,transparent)}}.dark\:bg-stone-600:is(.dark *){background-color:var(--color-stone-600)}.dark\:bg-stone-800:is(.dark *){background-color:var(--color-stone-800)}.dark\:bg-stone-900:is(.dark *){background-color:var(--color-stone-900)}.dark\:bg-transparent:is(.dark *){background-color:#0000}.dark\:text-green-400:is(.dark *){color:var(--color-green-400)}.dark\:text-red-400:is(.dark *){color:var(--color-red-400)}.dark\:text-stone-400:is(.dark *){color:var(--color-stone-400)}@media(hover:hover){.dark\:hover\:bg-accent:is(.dark *):hover,.dark\:hover\:bg-accent\/50:is(.dark *):hover{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-accent\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--accent)50%,transparent)}}.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--input)50%,transparent)}}.dark\:hover\:bg-stone-700:is(.dark *):hover{background-color:var(--color-stone-700)}}.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:color-mix(in oklab,var(--destructive)40%,transparent)}}.dark\:has-\[\[data-slot\]\[aria-invalid\=true\]\]\:ring-destructive\/40:is(.dark *):has([data-slot][aria-invalid=true]){--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:has-\[\[data-slot\]\[aria-invalid\=true\]\]\:ring-destructive\/40:is(.dark *):has([data-slot][aria-invalid=true]){--tw-ring-color:color-mix(in oklab,var(--destructive)40%,transparent)}}.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:color-mix(in oklab,var(--destructive)40%,transparent)}}.dark\:data-\[variant\=destructive\]\:focus\:bg-destructive\/20:is(.dark *)[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:data-\[variant\=destructive\]\:focus\:bg-destructive\/20:is(.dark *)[data-variant=destructive]:focus{background-color:color-mix(in oklab,var(--destructive)20%,transparent)}}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-inline:calc(var(--spacing)*2)}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-block:calc(var(--spacing)*1.5)}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:var(--muted-foreground)}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-inline:calc(var(--spacing)*2)}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:calc(var(--spacing)*0)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:calc(var(--spacing)*5)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:calc(var(--spacing)*5)}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:calc(var(--spacing)*12)}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-inline:calc(var(--spacing)*2)}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-block:calc(var(--spacing)*3)}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:calc(var(--spacing)*5)}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:calc(var(--spacing)*5)}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-3 svg:not([class*=size-]){width:calc(var(--spacing)*3);height:calc(var(--spacing)*3)}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.\[\&_svg\:not\(\[class\*\=\'text-\'\]\)\]\:text-muted-foreground svg:not([class*=text-]){color:var(--muted-foreground)}.\[\.border-b\]\:pb-3.border-b{padding-bottom:calc(var(--spacing)*3)}.\[\.border-t\]\:pt-3.border-t{padding-top:calc(var(--spacing)*3)}:is(.\*\:\[span\]\:last\:flex>*):is(span):last-child{display:flex}:is(.\*\:\[span\]\:last\:items-center>*):is(span):last-child{align-items:center}:is(.\*\:\[span\]\:last\:gap-2>*):is(span):last-child{gap:calc(var(--spacing)*2)}:is(.data-\[variant\=destructive\]\:\*\:\[svg\]\:\!text-destructive[data-variant=destructive]>*):is(svg){color:var(--destructive)!important}.\[\&\>\*\:first-child\]\:mt-0>:first-child{margin-top:calc(var(--spacing)*0)}.\[\&\>\*\:last-child\]\:mb-0>:last-child{margin-bottom:calc(var(--spacing)*0)}.has-\[\>\[data-align\=block-end\]\]\:\[\&\>input\]\:pt-3:has(>[data-align=block-end])>input{padding-top:calc(var(--spacing)*3)}.has-\[\>\[data-align\=block-start\]\]\:\[\&\>input\]\:pb-3:has(>[data-align=block-start])>input{padding-bottom:calc(var(--spacing)*3)}.has-\[\>\[data-align\=inline-end\]\]\:\[\&\>input\]\:pr-2:has(>[data-align=inline-end])>input{padding-right:calc(var(--spacing)*2)}.has-\[\>\[data-align\=inline-start\]\]\:\[\&\>input\]\:pl-2:has(>[data-align=inline-start])>input{padding-left:calc(var(--spacing)*2)}.\[\&\>kbd\]\:rounded-\[calc\(var\(--radius\)-5px\)\]>kbd{border-radius:calc(var(--radius) - 5px)}.\[\&\>svg\]\:pointer-events-none>svg{pointer-events:none}.\[\&\>svg\]\:size-2\.5>svg{width:calc(var(--spacing)*2.5);height:calc(var(--spacing)*2.5)}.\[\&\>svg\]\:size-3>svg{width:calc(var(--spacing)*3);height:calc(var(--spacing)*3)}.\[\&\>svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-3\.5>svg:not([class*=size-]){width:calc(var(--spacing)*3.5);height:calc(var(--spacing)*3.5)}.\[\&\>svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4>svg:not([class*=size-]){width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.\[\&\[aria-expanded\=\"true\"\]\]\:bg-accent[aria-expanded=true]{background-color:var(--accent)}.\[\&\[aria-expanded\=\"true\"\]\]\:text-foreground[aria-expanded=true]{color:var(--foreground)}[data-slot=tooltip-content] .\[\[data-slot\=tooltip-content\]_\&\]\:bg-background\/20{background-color:var(--background)}@supports (color:color-mix(in lab,red,red)){[data-slot=tooltip-content] .\[\[data-slot\=tooltip-content\]_\&\]\:bg-background\/20{background-color:color-mix(in oklab,var(--background)20%,transparent)}}[data-slot=tooltip-content] .\[\[data-slot\=tooltip-content\]_\&\]\:text-background{color:var(--background)}[data-slot=tooltip-content] .dark\:\[\[data-slot\=tooltip-content\]_\&\]\:bg-background\/10:is(.dark *){background-color:var(--background)}@supports (color:color-mix(in lab,red,red)){[data-slot=tooltip-content] .dark\:\[\[data-slot\=tooltip-content\]_\&\]\:bg-background\/10:is(.dark *){background-color:color-mix(in oklab,var(--background)10%,transparent)}}@media(hover:hover){a.\[a\&\]\:hover\:bg-accent:hover{background-color:var(--accent)}a.\[a\&\]\:hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){a.\[a\&\]\:hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,var(--destructive)90%,transparent)}}a.\[a\&\]\:hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){a.\[a\&\]\:hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--primary)90%,transparent)}}a.\[a\&\]\:hover\:bg-secondary\/90:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){a.\[a\&\]\:hover\:bg-secondary\/90:hover{background-color:color-mix(in oklab,var(--secondary)90%,transparent)}}a.\[a\&\]\:hover\:text-accent-foreground:hover{color:var(--accent-foreground)}}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}:root{--background:oklch(100% 0 0);--foreground:oklch(14.5% 0 0);--card:oklch(100% 0 0);--card-foreground:oklch(14.5% 0 0);--popover:oklch(100% 0 0);--popover-foreground:oklch(14.5% 0 0);--primary:oklch(20.5% 0 0);--primary-foreground:oklch(98.5% 0 0);--secondary:oklch(97% 0 0);--secondary-foreground:oklch(20.5% 0 0);--muted:oklch(97% 0 0);--muted-foreground:oklch(55.6% 0 0);--accent:oklch(92.3% .003 48.717);--accent-foreground:oklch(20.5% 0 0);--destructive:oklch(57.7% .245 27.325);--destructive-foreground:oklch(57.7% .245 27.325);--border:oklch(92.2% 0 0);--input:oklch(92.2% 0 0);--ring:oklch(70.8% 0 0);--chart-1:oklch(64.6% .222 41.116);--chart-2:oklch(60% .118 184.704);--chart-3:oklch(39.8% .07 227.392);--chart-4:oklch(82.8% .189 84.429);--chart-5:oklch(76.9% .188 70.08);--radius:.625rem;--sidebar:oklch(98.5% 0 0);--sidebar-foreground:oklch(14.5% 0 0);--sidebar-primary:oklch(20.5% 0 0);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(97% 0 0);--sidebar-accent-foreground:oklch(20.5% 0 0);--sidebar-border:oklch(92.2% 0 0);--sidebar-ring:oklch(70.8% 0 0)}.dark{--background:oklch(14.5% 0 0);--foreground:oklch(98.5% 0 0);--card:oklch(14.5% 0 0);--card-foreground:oklch(98.5% 0 0);--popover:oklch(14.5% 0 0);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(98.5% 0 0);--primary-foreground:oklch(20.5% 0 0);--secondary:oklch(26.9% 0 0);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(26.9% 0 0);--muted-foreground:oklch(70.8% 0 0);--accent:oklch(26.9% 0 0);--accent-foreground:oklch(98.5% 0 0);--destructive:oklch(39.6% .141 25.723);--destructive-foreground:oklch(63.7% .237 25.331);--border:oklch(26.9% 0 0);--input:oklch(26.9% 0 0);--ring:oklch(43.9% 0 0);--chart-1:oklch(48.8% .243 264.376);--chart-2:oklch(69.6% .17 162.48);--chart-3:oklch(76.9% .188 70.08);--chart-4:oklch(62.7% .265 303.9);--chart-5:oklch(64.5% .246 16.439);--sidebar:oklch(20.5% 0 0);--sidebar-foreground:oklch(98.5% 0 0);--sidebar-primary:oklch(48.8% .243 264.376);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(26.9% 0 0);--sidebar-accent-foreground:oklch(98.5% 0 0);--sidebar-border:oklch(26.9% 0 0);--sidebar-ring:oklch(43.9% 0 0)}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}}
|
package/dist/index.cjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";var pa=Object.create;var Bs=Object.defineProperty;var ga=Object.getOwnPropertyDescriptor;var ya=Object.getOwnPropertyNames;var xa=Object.getPrototypeOf,va=Object.prototype.hasOwnProperty;var ba=(t,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of ya(e))!va.call(t,i)&&i!==n&&Bs(t,i,{get:()=>e[i],enumerable:!(s=ga(e,i))||s.enumerable});return t};var wa=(t,e,n)=>(n=t!=null?pa(xa(t)):{},ba(e||!t||!t.__esModule?Bs(n,"default",{value:t,enumerable:!0}):n,t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react/jsx-runtime"),m=require("react"),K=require("lucide-react"),Ta=require("@ai-sdk/react"),zs=require("ai"),io=require("@radix-ui/react-slot"),oo=require("class-variance-authority"),Sa=require("clsx"),Ca=require("tailwind-merge"),Pa=require("@radix-ui/react-tooltip"),xt=require("zod"),$s=require("@radix-ui/react-use-controllable-state"),Aa=require("@radix-ui/react-collapsible"),Ma=require("./server.cjs");function $n(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const ut=$n(m),_t=$n(Pa),Un=$n(Aa);function at(...t){return Ca.twMerge(Sa.clsx(t))}const Va=oo.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function ct({className:t,variant:e,size:n,asChild:s=!1,...i}){const r=s?io.Slot:"button";return h.jsx(r,{"data-slot":"button",className:at(Va({variant:e,size:n,className:t})),...i})}const ja=oo.cva("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function en({className:t,variant:e,asChild:n=!1,...s}){const i=n?io.Slot:"span";return h.jsx(i,{"data-slot":"badge",className:at(ja({variant:e}),t),...s})}const Da=({textAreaRef:t,triggerAutoSize:e,maxHeight:n=Number.MAX_SAFE_INTEGER,minHeight:s=0})=>{const[i,r]=ut.useState(!0);ut.useEffect(()=>{const a=t.current;if(a){i&&(a.style.minHeight=`${s+6}px`,n>s&&(a.style.maxHeight=`${n}px`),r(!1)),a.style.height=`${s+6}px`;const l=a.scrollHeight;l>n?a.style.height=`${n}px`:a.style.height=`${l+6}px`}},[t.current,e])},ro=ut.forwardRef(({maxHeight:t=Number.MAX_SAFE_INTEGER,minHeight:e=52,className:n,onChange:s,value:i,...r},o)=>{const a=ut.useRef(null),[l,c]=ut.useState("");return Da({textAreaRef:a,triggerAutoSize:l,maxHeight:t,minHeight:e}),m.useImperativeHandle(o,()=>({textArea:a.current,focus:()=>a?.current?.focus(),maxHeight:t,minHeight:e})),ut.useEffect(()=>{c(i)},[r?.defaultValue,i]),h.jsx("textarea",{...r,value:i,ref:a,className:at("flex w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",n),onChange:u=>{c(u.target.value),s?.(u)}})});ro.displayName="AutosizeTextarea";function Ea({delayDuration:t=0,...e}){return h.jsx(_t.Provider,{"data-slot":"tooltip-provider",delayDuration:t,...e})}function At({...t}){return h.jsx(Ea,{children:h.jsx(_t.Root,{"data-slot":"tooltip",...t})})}function Mt({...t}){return h.jsx(_t.Trigger,{"data-slot":"tooltip-trigger",...t})}function Vt({className:t,sideOffset:e=0,children:n,...s}){return h.jsx(_t.Portal,{children:h.jsxs(_t.Content,{"data-slot":"tooltip-content",sideOffset:e,className:at("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",t),...s,children:[n,h.jsx(_t.Arrow,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}function Us({className:t,...e}){return h.jsx("kbd",{"data-slot":"kbd",className:at("bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium select-none","[&_svg:not([class*='size-'])]:size-3","[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",t),...e})}const _n=m.createContext({});function Wn(t){const e=m.useRef(null);return e.current===null&&(e.current=t()),e.current}const Kn=typeof window<"u",ao=Kn?m.useLayoutEffect:m.useEffect,$e=m.createContext(null);function Hn(t,e){t.indexOf(e)===-1&&t.push(e)}function Xn(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const ht=(t,e,n)=>n>e?e:n<t?t:n;function xn(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let Xt=()=>{},ft=()=>{};process.env.NODE_ENV!=="production"&&(Xt=(t,e,n)=>{!t&&typeof console<"u"&&console.warn(xn(e,n))},ft=(t,e,n)=>{if(!t)throw new Error(xn(e,n))});const mt={},lo=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function co(t){return typeof t=="object"&&t!==null}const uo=t=>/^0[^.\s]+$/u.test(t);function Yn(t){let e;return()=>(e===void 0&&(e=t()),e)}const st=t=>t,ka=(t,e)=>n=>e(t(n)),me=(...t)=>t.reduce(ka),le=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class Gn{constructor(){this.subscriptions=[]}add(e){return Hn(this.subscriptions,e),()=>Xn(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const rt=t=>t*1e3,nt=t=>t/1e3;function ho(t,e){return e?t*(1e3/e):0}const _s=new Set;function qn(t,e,n){t||_s.has(e)||(console.warn(xn(e,n)),_s.add(e))}const fo=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Ra=1e-7,Na=12;function Ia(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=fo(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>Ra&&++a<Na);return o}function pe(t,e,n,s){if(t===e&&n===s)return st;const i=r=>Ia(r,0,1,t,n);return r=>r===0||r===1?r:fo(i(r),e,s)}const mo=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,po=t=>e=>1-t(1-e),go=pe(.33,1.53,.69,.99),Zn=po(go),yo=mo(Zn),xo=t=>(t*=2)<1?.5*Zn(t):.5*(2-Math.pow(2,-10*(t-1))),Jn=t=>1-Math.sin(Math.acos(t)),vo=po(Jn),bo=mo(Jn),La=pe(.42,0,1,1),Oa=pe(0,0,.58,1),wo=pe(.42,0,.58,1),Fa=t=>Array.isArray(t)&&typeof t[0]!="number",To=t=>Array.isArray(t)&&typeof t[0]=="number",Ws={linear:st,easeIn:La,easeInOut:wo,easeOut:Oa,circIn:Jn,circInOut:bo,circOut:vo,backIn:Zn,backInOut:yo,backOut:go,anticipate:xo},Ba=t=>typeof t=="string",Ks=t=>{if(To(t)){ft(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,s,i]=t;return pe(e,n,s,i)}else if(Ba(t))return ft(Ws[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),Ws[t];return t},Ae=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function za(t,e){let n=new Set,s=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){o.has(u)&&(c.schedule(u),t()),u(a)}const c={schedule:(u,d=!1,f=!1)=>{const y=f&&i?n:s;return d&&o.add(u),y.has(u)||y.add(u),u},cancel:u=>{s.delete(u),o.delete(u)},process:u=>{if(a=u,i){r=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,r&&(r=!1,c.process(u))}};return c}const $a=40;function So(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Ae.reduce((w,V)=>(w[V]=za(r),w),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:g,postRender:y}=o,x=()=>{const w=mt.useManualTiming?i.timestamp:performance.now();n=!1,mt.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(w-i.timestamp,$a),1)),i.timestamp=w,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),u.process(i),d.process(i),f.process(i),g.process(i),y.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(x))},b=()=>{n=!0,s=!0,i.isProcessing||t(x)};return{schedule:Ae.reduce((w,V)=>{const P=o[V];return w[V]=(D,j=!1,A=!1)=>(n||b(),P.schedule(D,j,A)),w},{}),cancel:w=>{for(let V=0;V<Ae.length;V++)o[Ae[V]].cancel(w)},state:i,steps:o}}const{schedule:I,cancel:bt,state:X,steps:nn}=So(typeof requestAnimationFrame<"u"?requestAnimationFrame:st,!0);let Ee;function Ua(){Ee=void 0}const q={now:()=>(Ee===void 0&&q.set(X.isProcessing||mt.useManualTiming?X.timestamp:performance.now()),Ee),set:t=>{Ee=t,queueMicrotask(Ua)}},Co=t=>e=>typeof e=="string"&&e.startsWith(t),Qn=Co("--"),_a=Co("var(--"),ts=t=>_a(t)?Wa.test(t.split("/*")[0].trim()):!1,Wa=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Yt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},ce={...Yt,transform:t=>ht(0,1,t)},Me={...Yt,default:1},ie=t=>Math.round(t*1e5)/1e5,es=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ka(t){return t==null}const Ha=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ns=(t,e)=>n=>!!(typeof n=="string"&&Ha.test(n)&&n.startsWith(t)||e&&!Ka(n)&&Object.prototype.hasOwnProperty.call(n,e)),Po=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(es);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Xa=t=>ht(0,255,t),sn={...Yt,transform:t=>Math.round(Xa(t))},Et={test:ns("rgb","red"),parse:Po("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+sn.transform(t)+", "+sn.transform(e)+", "+sn.transform(n)+", "+ie(ce.transform(s))+")"};function Ya(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const vn={test:ns("#"),parse:Ya,transform:Et.transform},ge=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),vt=ge("deg"),dt=ge("%"),M=ge("px"),Ga=ge("vh"),qa=ge("vw"),Hs={...dt,parse:t=>dt.parse(t)/100,transform:t=>dt.transform(t*100)},Ot={test:ns("hsl","hue"),parse:Po("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+dt.transform(ie(e))+", "+dt.transform(ie(n))+", "+ie(ce.transform(s))+")"},_={test:t=>Et.test(t)||vn.test(t)||Ot.test(t),parse:t=>Et.test(t)?Et.parse(t):Ot.test(t)?Ot.parse(t):vn.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Et.transform(t):Ot.transform(t),getAnimatableNone:t=>{const e=_.parse(t);return e.alpha=0,_.transform(e)}},Za=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ja(t){return isNaN(t)&&typeof t=="string"&&(t.match(es)?.length||0)+(t.match(Za)?.length||0)>0}const Ao="number",Mo="color",Qa="var",tl="var(",Xs="${}",el=/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 ue(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(el,l=>(_.test(l)?(s.color.push(r),i.push(Mo),n.push(_.parse(l))):l.startsWith(tl)?(s.var.push(r),i.push(Qa),n.push(l)):(s.number.push(r),i.push(Ao),n.push(parseFloat(l))),++r,Xs)).split(Xs);return{values:n,split:a,indexes:s,types:i}}function Vo(t){return ue(t).values}function jo(t){const{split:e,types:n}=ue(t),s=e.length;return i=>{let r="";for(let o=0;o<s;o++)if(r+=e[o],i[o]!==void 0){const a=n[o];a===Ao?r+=ie(i[o]):a===Mo?r+=_.transform(i[o]):r+=i[o]}return r}}const nl=t=>typeof t=="number"?0:_.test(t)?_.getAnimatableNone(t):t;function sl(t){const e=Vo(t);return jo(t)(e.map(nl))}const wt={test:Ja,parse:Vo,createTransformer:jo,getAnimatableNone:sl};function on(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function il({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=on(l,a,t+1/3),r=on(l,a,t),o=on(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function Le(t,e){return n=>n>0?e:t}const O=(t,e,n)=>t+(e-t)*n,rn=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},ol=[vn,Et,Ot],rl=t=>ol.find(e=>e.test(t));function Ys(t){const e=rl(t);if(Xt(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let n=e.parse(t);return e===Ot&&(n=il(n)),n}const Gs=(t,e)=>{const n=Ys(t),s=Ys(e);if(!n||!s)return Le(t,e);const i={...n};return r=>(i.red=rn(n.red,s.red,r),i.green=rn(n.green,s.green,r),i.blue=rn(n.blue,s.blue,r),i.alpha=O(n.alpha,s.alpha,r),Et.transform(i))},bn=new Set(["none","hidden"]);function al(t,e){return bn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function ll(t,e){return n=>O(t,e,n)}function ss(t){return typeof t=="number"?ll:typeof t=="string"?ts(t)?Le:_.test(t)?Gs:dl:Array.isArray(t)?Do:typeof t=="object"?_.test(t)?Gs:cl:Le}function Do(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>ss(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function cl(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=ss(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function ul(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const r=e.types[i],o=t.indexes[r][s[r]],a=t.values[o]??0;n[i]=a,s[r]++}return n}const dl=(t,e)=>{const n=wt.createTransformer(e),s=ue(t),i=ue(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?bn.has(t)&&!i.values.length||bn.has(e)&&!s.values.length?al(t,e):me(Do(ul(s,i),i.values),n):(Xt(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Le(t,e))};function Eo(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?O(t,e,n):ss(t)(t,e)}const hl=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>I.update(e,n),stop:()=>bt(e),now:()=>X.isProcessing?X.timestamp:q.now()}},ko=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=Math.round(t(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Oe=2e4;function is(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Oe;)e+=n,s=t.next(e);return e>=Oe?1/0:e}function fl(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(is(s),Oe);return{type:"keyframes",ease:r=>s.next(i*r).value/e,duration:nt(i)}}const ml=5;function Ro(t,e,n){const s=Math.max(e-ml,0);return ho(n-t(s),e-s)}const 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},an=.001;function pl({duration:t=L.duration,bounce:e=L.bounce,velocity:n=L.velocity,mass:s=L.mass}){let i,r;Xt(t<=rt(L.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-e;o=ht(L.minDamping,L.maxDamping,o),t=ht(L.minDuration,L.maxDuration,nt(t)),o<1?(i=c=>{const u=c*o,d=u*t,f=u-n,g=wn(c,o),y=Math.exp(-d);return an-f/g*y},r=c=>{const d=c*o*t,f=d*n+n,g=Math.pow(o,2)*Math.pow(c,2)*t,y=Math.exp(-d),x=wn(Math.pow(c,2),o);return(-i(c)+an>0?-1:1)*((f-g)*y)/x}):(i=c=>{const u=Math.exp(-c*t),d=(c-n)*t+1;return-an+u*d},r=c=>{const u=Math.exp(-c*t),d=(n-c)*(t*t);return u*d});const a=5/t,l=yl(i,r,a);if(t=rt(t),isNaN(l))return{stiffness:L.stiffness,damping:L.damping,duration:t};{const c=Math.pow(l,2)*s;return{stiffness:c,damping:o*2*Math.sqrt(s*c),duration:t}}}const gl=12;function yl(t,e,n){let s=n;for(let i=1;i<gl;i++)s=s-t(s)/e(s);return s}function wn(t,e){return t*Math.sqrt(1-e*e)}const xl=["duration","bounce"],vl=["stiffness","damping","mass"];function qs(t,e){return e.some(n=>t[n]!==void 0)}function bl(t){let e={velocity:L.velocity,stiffness:L.stiffness,damping:L.damping,mass:L.mass,isResolvedFromDuration:!1,...t};if(!qs(t,vl)&&qs(t,xl))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*ht(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:L.mass,stiffness:i,damping:r}}else{const n=pl(t);e={...e,...n,mass:L.mass},e.isResolvedFromDuration=!0}return e}function Fe(t=L.visualDuration,e=L.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:g}=bl({...n,velocity:-nt(n.velocity||0)}),y=f||0,x=c/(2*Math.sqrt(l*u)),b=o-r,v=nt(Math.sqrt(l/u)),T=Math.abs(b)<5;s||(s=T?L.restSpeed.granular:L.restSpeed.default),i||(i=T?L.restDelta.granular:L.restDelta.default);let w;if(x<1){const P=wn(v,x);w=D=>{const j=Math.exp(-x*v*D);return o-j*((y+x*v*b)/P*Math.sin(P*D)+b*Math.cos(P*D))}}else if(x===1)w=P=>o-Math.exp(-v*P)*(b+(y+v*b)*P);else{const P=v*Math.sqrt(x*x-1);w=D=>{const j=Math.exp(-x*v*D),A=Math.min(P*D,300);return o-j*((y+x*v*b)*Math.sinh(A)+P*b*Math.cosh(A))/P}}const V={calculatedDuration:g&&d||null,next:P=>{const D=w(P);if(g)a.done=P>=d;else{let j=P===0?y:0;x<1&&(j=P===0?rt(y):Ro(w,P,D));const A=Math.abs(j)<=s,F=Math.abs(o-D)<=i;a.done=A&&F}return a.value=a.done?o:D,a},toString:()=>{const P=Math.min(is(V),Oe),D=ko(j=>V.next(P*j).value,P,30);return P+"ms "+D},toTransition:()=>{}};return V}Fe.applyToOptions=t=>{const e=fl(t,100,Fe);return t.ease=e.ease,t.duration=rt(e.duration),t.type="keyframes",t};function Tn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=t[0],f={done:!1,value:d},g=A=>a!==void 0&&A<a||l!==void 0&&A>l,y=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let x=n*e;const b=d+x,v=o===void 0?b:o(b);v!==b&&(x=v-d);const T=A=>-x*Math.exp(-A/s),w=A=>v+T(A),V=A=>{const F=T(A),N=w(A);f.done=Math.abs(F)<=c,f.value=f.done?v:N};let P,D;const j=A=>{g(f.value)&&(P=A,D=Fe({keyframes:[f.value,y(f.value)],velocity:Ro(w,A,f.value),damping:i,stiffness:r,restDelta:c,restSpeed:u}))};return j(0),{calculatedDuration:null,next:A=>{let F=!1;return!D&&P===void 0&&(F=!0,V(A),j(A)),P!==void 0&&A>=P?D.next(A-P):(!F&&V(A),f)}}}function wl(t,e,n){const s=[],i=n||mt.mix||Eo,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||st:e;a=me(l,a)}s.push(a)}return s}function Tl(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(ft(r===e.length,"Both input and output ranges must be the same length","range-length"),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=wl(e,s,i),l=a.length,c=u=>{if(o&&u<t[0])return e[0];let d=0;if(l>1)for(;d<t.length-2&&!(u<t[d+1]);d++);const f=le(t[d],t[d+1],u);return a[d](f)};return n?u=>c(ht(t[0],t[r-1],u)):c}function Sl(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=le(0,e,s);t.push(O(n,1,i))}}function Cl(t){const e=[0];return Sl(e,t.length-1),e}function Pl(t,e){return t.map(n=>n*e)}function Al(t,e){return t.map(()=>e||wo).splice(0,t.length-1)}function Ft({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Fa(s)?s.map(Ks):Ks(s),r={done:!1,value:e[0]},o=Pl(n&&n.length===e.length?n:Cl(e),t),a=Tl(o,e,{ease:Array.isArray(i)?i:Al(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const Ml=t=>t!==null;function os(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(Ml),a=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const Vl={decay:Tn,inertia:Tn,tween:Ft,keyframes:Ft,spring:Fe};function No(t){typeof t.type=="string"&&(t.type=Vl[t.type])}class rs{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const jl=t=>t/100;class as extends rs{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==q.now()&&this.tick(q.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(){const{options:e}=this;No(e);const{type:n=Ft,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const l=n||Ft;process.env.NODE_ENV!=="production"&&l!==Ft&&ft(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Ft&&typeof a[0]!="number"&&(this.mixKeyframes=me(jl,Eo(a[0],a[1])),a=[0,100]);const c=l({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=is(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=c}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:g,type:y,onUpdate:x,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const v=this.currentTime-c*(this.playbackSpeed>=0?1:-1),T=this.playbackSpeed>=0?v<0:v>i;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let w=this.currentTime,V=s;if(d){const A=Math.min(this.currentTime,i)/a;let F=Math.floor(A),N=A%1;!N&&A>=1&&(N=1),N===1&&F--,F=Math.min(F,d+1),!!(F%2)&&(f==="reverse"?(N=1-N,g&&(N-=g/a)):f==="mirror"&&(V=o)),w=ht(0,1,N)*a}const P=T?{done:!1,value:u[0]}:V.next(w);r&&(P.value=r(P.value));let{done:D}=P;!T&&l!==null&&(D=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const j=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return j&&y!==Tn&&(P.value=os(u,this.options,b,this.speed)),x&&x(P.value),j&&this.finish(),P}then(e,n){return this.finished.then(e,n)}get duration(){return nt(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+nt(e)}get time(){return nt(this.currentTime)}set time(e){e=rt(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?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(q.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=nt(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=hl,startTime:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),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(q.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(),this.driver=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 Dl(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const kt=t=>t*180/Math.PI,Sn=t=>{const e=kt(Math.atan2(t[1],t[0]));return Cn(e)},El={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Sn,rotateZ:Sn,skewX:t=>kt(Math.atan(t[1])),skewY:t=>kt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Cn=t=>(t=t%360,t<0&&(t+=360),t),Zs=Sn,Js=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Qs=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),kl={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Js,scaleY:Qs,scale:t=>(Js(t)+Qs(t))/2,rotateX:t=>Cn(kt(Math.atan2(t[6],t[5]))),rotateY:t=>Cn(kt(Math.atan2(-t[2],t[0]))),rotateZ:Zs,rotate:Zs,skewX:t=>kt(Math.atan(t[4])),skewY:t=>kt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Pn(t){return t.includes("scale")?1:0}function An(t,e){if(!t||t==="none")return Pn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=kl,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=El,i=a}if(!i)return Pn(e);const r=s[e],o=i[1].split(",").map(Nl);return typeof r=="function"?r(o):o[r]}const Rl=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return An(n,e)};function Nl(t){return parseFloat(t.trim())}const Gt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],qt=new Set(Gt),ti=t=>t===Yt||t===M,Il=new Set(["x","y","z"]),Ll=Gt.filter(t=>!Il.has(t));function Ol(t){const e=[];return Ll.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const Rt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>An(e,"x"),y:(t,{transform:e})=>An(e,"y")};Rt.translateX=Rt.x;Rt.translateY=Rt.y;const Nt=new Set;let Mn=!1,Vn=!1,jn=!1;function Io(){if(Vn){const t=Array.from(Nt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Ol(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,o])=>{s.getValue(r)?.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Vn=!1,Mn=!1,Nt.forEach(t=>t.complete(jn)),Nt.clear()}function Lo(){Nt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Vn=!0)})}function Fl(){jn=!0,Lo(),Io(),jn=!1}class ls{constructor(e,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Nt.add(this),Mn||(Mn=!0,I.read(Lo),I.resolveKeyframes(Io))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=i?.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&r===void 0&&i.set(e[0])}Dl(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Nt.delete(this)}cancel(){this.state==="scheduled"&&(Nt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Bl=t=>t.startsWith("--");function zl(t,e,n){Bl(e)?t.style.setProperty(e,n):t.style[e]=n}const $l=Yn(()=>window.ScrollTimeline!==void 0),Ul={};function _l(t,e){const n=Yn(t);return()=>Ul[e]??n()}const Oo=_l(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),se=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,ei={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:se([0,.65,.55,1]),circOut:se([.55,0,1,.45]),backIn:se([.31,.01,.66,-.59]),backOut:se([.33,1.53,.69,.99])};function Fo(t,e){if(t)return typeof t=="function"?Oo()?ko(t,e):"ease-out":To(t)?se(t):Array.isArray(t)?t.map(n=>Fo(n,e)||ei.easeOut):ei[t]}function Wl(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const d=Fo(a,i);Array.isArray(d)&&(u.easing=d);const f={delay:s,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),t.animate(u,f)}function Bo(t){return typeof t=="function"&&"applyToOptions"in t}function Kl({type:t,...e}){return Bo(t)&&Oo()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Hl extends rs{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,ft(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=Kl(e);this.animation=Wl(n,s,i,c,r),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const u=os(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):zl(n,s,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(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;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return nt(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+nt(e)}get time(){return nt(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=rt(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&$l()?(this.animation.timeline=e,st):n(this)}}const zo={anticipate:xo,backInOut:yo,circInOut:bo};function Xl(t){return t in zo}function Yl(t){typeof t.ease=="string"&&Xl(t.ease)&&(t.ease=zo[t.ease])}const ni=10;class Gl extends Hl{constructor(e){Yl(e),No(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new as({...o,autoplay:!1}),l=rt(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-ni).value,a.sample(l).value,ni),a.stop()}}const si=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(wt.test(t)||t==="0")&&!t.startsWith("url("));function ql(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Zl(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=si(i,e),a=si(r,e);return Xt(o===a,`You are trying to animate ${e} from "${i}" to "${r}". "${o?r:i}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:ql(t)||(n==="spring"||Bo(n))&&s}function Dn(t){t.duration=0,t.type="keyframes"}const Jl=new Set(["opacity","clipPath","filter","transform"]),Ql=Yn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function tc(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=e.owner.getProps();return Ql()&&n&&Jl.has(n)&&(n!=="transform"||!c)&&!l&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const ec=40;class nc extends rs{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=q.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:l,motionValue:c,element:u,...d},g=u?.KeyframeResolver||ls;this.keyframeResolver=new g(a,(y,x,b)=>this.onKeyframesResolved(y,x,f,!b),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:c,onUpdate:u}=s;this.resolvedAt=q.now(),Zl(e,r,o,a)||((mt.instantAnimations||!l)&&u?.(os(e,s,n)),e[0]=e[e.length-1],Dn(s),s.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>ec?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},g=!c&&tc(f)?new Gl({...f,element:f.motionValue.owner.current}):new as(f);g.finished.then(()=>this.notifyFinished()).catch(st),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Fl()),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()}}const sc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ic(t){const e=sc.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}const oc=4;function $o(t,e,n=1){ft(n<=oc,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=ic(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return lo(o)?parseFloat(o):o}return ts(i)?$o(i,e,n+1):i}function cs(t,e){return t?.[e]??t?.default??t}const Uo=new Set(["width","height","top","left","right","bottom",...Gt]),rc={test:t=>t==="auto",parse:t=>t},_o=t=>e=>e.test(t),Wo=[Yt,M,dt,vt,qa,Ga,rc],ii=t=>Wo.find(_o(t));function ac(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||uo(t):!0}const lc=new Set(["brightness","contrast","saturate","opacity"]);function cc(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(es)||[];if(!s)return t;const i=n.replace(s,"");let r=lc.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const uc=/\b([a-z-]*)\(.*?\)/gu,En={...wt,getAnimatableNone:t=>{const e=t.match(uc);return e?e.map(cc).join(" "):t}},oi={...Yt,transform:Math.round},dc={rotate:vt,rotateX:vt,rotateY:vt,rotateZ:vt,scale:Me,scaleX:Me,scaleY:Me,scaleZ:Me,skew:vt,skewX:vt,skewY:vt,distance:M,translateX:M,translateY:M,translateZ:M,x:M,y:M,z:M,perspective:M,transformPerspective:M,opacity:ce,originX:Hs,originY:Hs,originZ:M},us={borderWidth:M,borderTopWidth:M,borderRightWidth:M,borderBottomWidth:M,borderLeftWidth:M,borderRadius:M,radius:M,borderTopLeftRadius:M,borderTopRightRadius:M,borderBottomRightRadius:M,borderBottomLeftRadius:M,width:M,maxWidth:M,height:M,maxHeight:M,top:M,right:M,bottom:M,left:M,padding:M,paddingTop:M,paddingRight:M,paddingBottom:M,paddingLeft:M,margin:M,marginTop:M,marginRight:M,marginBottom:M,marginLeft:M,backgroundPositionX:M,backgroundPositionY:M,...dc,zIndex:oi,fillOpacity:ce,strokeOpacity:ce,numOctaves:oi},hc={...us,color:_,backgroundColor:_,outlineColor:_,fill:_,stroke:_,borderColor:_,borderTopColor:_,borderRightColor:_,borderBottomColor:_,borderLeftColor:_,filter:En,WebkitFilter:En},Ko=t=>hc[t];function Ho(t,e){let n=Ko(t);return n!==En&&(n=wt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const fc=new Set(["auto","none","0"]);function mc(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!fc.has(r)&&ue(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=Ho(n,i)}class pc extends ls{constructor(e,n,s,i,r){super(e,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let c=e[l];if(typeof c=="string"&&(c=c.trim(),ts(c))){const u=$o(c,n.current);u!==void 0&&(e[l]=u),l===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Uo.has(s)||e.length!==2)return;const[i,r]=e,o=ii(i),a=ii(r);if(o!==a)if(ti(o)&&ti(a))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else Rt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||ac(e[i]))&&s.push(i);s.length&&mc(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Rt[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=Rt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{e.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function gc(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const Xo=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Yo(t){return co(t)&&"offsetHeight"in t}const ri=30,yc=t=>!isNaN(parseFloat(t));class xc{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=q.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=q.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=yc(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&qn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Gn);const s=this.events[e].add(n);return e==="change"?()=>{s(),I.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=q.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>ri)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ri);return ho(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),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 Kt(t,e){return new xc(t,e)}const{schedule:ds}=So(queueMicrotask,!1),ot={x:!1,y:!1};function Go(){return ot.x||ot.y}function vc(t){return t==="x"||t==="y"?ot[t]?null:(ot[t]=!0,()=>{ot[t]=!1}):ot.x||ot.y?null:(ot.x=ot.y=!0,()=>{ot.x=ot.y=!1})}function qo(t,e){const n=gc(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function ai(t){return!(t.pointerType==="touch"||Go())}function bc(t,e,n={}){const[s,i,r]=qo(t,n),o=a=>{if(!ai(a))return;const{target:l}=a,c=e(l,a);if(typeof c!="function"||!l)return;const u=d=>{ai(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,i)};return s.forEach(a=>{a.addEventListener("pointerenter",o,i)}),r}const Zo=(t,e)=>e?t===e?!0:Zo(t,e.parentElement):!1,hs=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,wc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Tc(t){return wc.has(t.tagName)||t.tabIndex!==-1}const ke=new WeakSet;function li(t){return e=>{e.key==="Enter"&&t(e)}}function ln(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Sc=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=li(()=>{if(ke.has(n))return;ln(n,"down");const i=li(()=>{ln(n,"up")}),r=()=>ln(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function ci(t){return hs(t)&&!Go()}function Cc(t,e,n={}){const[s,i,r]=qo(t,n),o=a=>{const l=a.currentTarget;if(!ci(a))return;ke.add(l);const c=e(l,a),u=(g,y)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),ke.has(l)&&ke.delete(l),ci(g)&&typeof c=="function"&&c(g,{success:y})},d=g=>{u(g,l===window||l===document||n.useGlobalTarget||Zo(l,g.target))},f=g=>{u(g,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),Yo(a)&&(a.addEventListener("focus",c=>Sc(c,i)),!Tc(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function Jo(t){return co(t)&&"ownerSVGElement"in t}function Pc(t){return Jo(t)&&t.tagName==="svg"}const Y=t=>!!(t&&t.getVelocity),Ac=[...Wo,_,wt],Mc=t=>Ac.find(_o(t)),fs=m.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function ui(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Vc(...t){return e=>{let n=!1;const s=t.map(i=>{const r=ui(i,e);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let i=0;i<s.length;i++){const r=s[i];typeof r=="function"?r():ui(t[i],null)}}}}function jc(...t){return ut.useCallback(Vc(...t),t)}class Dc extends ut.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=n.offsetParent,i=Yo(s)&&s.offsetWidth||0,r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft,r.right=i-r.width-r.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Ec({children:t,isPresent:e,anchorX:n,root:s}){const i=m.useId(),r=m.useRef(null),o=m.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=m.useContext(fs),l=jc(r,t?.ref);return m.useInsertionEffect(()=>{const{width:c,height:u,top:d,left:f,right:g}=o.current;if(e||!r.current||!c||!u)return;const y=n==="left"?`left: ${f}`:`right: ${g}`;r.current.dataset.motionPopId=i;const x=document.createElement("style");a&&(x.nonce=a);const b=s??document.head;return b.appendChild(x),x.sheet&&x.sheet.insertRule(`
|
|
2
|
-
[data-motion-pop-id="${i}"] {
|
|
3
|
-
position: absolute !important;
|
|
4
|
-
width: ${c}px !important;
|
|
5
|
-
height: ${u}px !important;
|
|
6
|
-
${y}px !important;
|
|
7
|
-
top: ${d}px !important;
|
|
8
|
-
}
|
|
9
|
-
`),()=>{b.contains(x)&&b.removeChild(x)}},[e]),h.jsx(Dc,{isPresent:e,childRef:r,sizeRef:o,children:ut.cloneElement(t,{ref:l})})}const kc=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:r,mode:o,anchorX:a,root:l})=>{const c=Wn(Rc),u=m.useId();let d=!0,f=m.useMemo(()=>(d=!1,{id:u,initial:e,isPresent:n,custom:i,onExitComplete:g=>{c.set(g,!0);for(const y of c.values())if(!y)return;s&&s()},register:g=>(c.set(g,!1),()=>c.delete(g))}),[n,c,s]);return r&&d&&(f={...f}),m.useMemo(()=>{c.forEach((g,y)=>c.set(y,!1))},[n]),ut.useEffect(()=>{!n&&!c.size&&s&&s()},[n]),o==="popLayout"&&(t=h.jsx(Ec,{isPresent:n,anchorX:a,root:l,children:t})),h.jsx($e.Provider,{value:f,children:t})};function Rc(){return new Map}function Qo(t=!0){const e=m.useContext($e);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,r=m.useId();m.useEffect(()=>{if(t)return i(r)},[t]);const o=m.useCallback(()=>t&&s&&s(r),[r,s,t]);return!n&&s?[!1,o]:[!0]}const Ve=t=>t.key||"";function di(t){const e=[];return m.Children.forEach(t,n=>{m.isValidElement(n)&&e.push(n)}),e}const Nc=({children:t,custom:e,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:r="sync",propagate:o=!1,anchorX:a="left",root:l})=>{const[c,u]=Qo(o),d=m.useMemo(()=>di(t),[t]),f=o&&!c?[]:d.map(Ve),g=m.useRef(!0),y=m.useRef(d),x=Wn(()=>new Map),[b,v]=m.useState(d),[T,w]=m.useState(d);ao(()=>{g.current=!1,y.current=d;for(let D=0;D<T.length;D++){const j=Ve(T[D]);f.includes(j)?x.delete(j):x.get(j)!==!0&&x.set(j,!1)}},[T,f.length,f.join("-")]);const V=[];if(d!==b){let D=[...d];for(let j=0;j<T.length;j++){const A=T[j],F=Ve(A);f.includes(F)||(D.splice(j,0,A),V.push(A))}return r==="wait"&&V.length&&(D=V),w(di(D)),v(d),null}process.env.NODE_ENV!=="production"&&r==="wait"&&T.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:P}=m.useContext(_n);return h.jsx(h.Fragment,{children:T.map(D=>{const j=Ve(D),A=o&&!c?!1:d===T||f.includes(j),F=()=>{if(x.has(j))x.set(j,!0);else return;let N=!0;x.forEach(J=>{J||(N=!1)}),N&&(P?.(),w(y.current),o&&u?.(),s&&s())};return h.jsx(kc,{isPresent:A,initial:!g.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:r,root:l,onExitComplete:A?void 0:F,anchorX:a,children:D},j)})})},ms=m.createContext({strict:!1}),hi={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ht={};for(const t in hi)Ht[t]={isEnabled:e=>hi[t].some(n=>!!e[n])};function kn(t){for(const e in t)Ht[e]={...Ht[e],...t[e]}}function Ic({children:t,features:e,strict:n=!1}){const[,s]=m.useState(!cn(e)),i=m.useRef(void 0);if(!cn(e)){const{renderer:r,...o}=e;i.current=r,kn(o)}return m.useEffect(()=>{cn(e)&&e().then(({renderer:r,...o})=>{kn(o),i.current=r,s(!0)})},[]),h.jsx(ms.Provider,{value:{renderer:i.current,strict:n},children:t})}function cn(t){return typeof t=="function"}const Lc=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Be(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Lc.has(t)}let tr=t=>!Be(t);function Oc(t){typeof t=="function"&&(tr=e=>e.startsWith("on")?!Be(e):t(e))}try{Oc(require("@emotion/is-prop-valid").default)}catch{}function Fc(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(tr(i)||n===!0&&Be(i)||!e&&!Be(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const Ue=m.createContext({});function _e(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function de(t){return typeof t=="string"||Array.isArray(t)}const ps=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],gs=["initial",...ps];function We(t){return _e(t.animate)||gs.some(e=>de(t[e]))}function er(t){return!!(We(t)||t.variants)}function Bc(t,e){if(We(t)){const{initial:n,animate:s}=t;return{initial:n===!1||de(n)?n:void 0,animate:de(s)?s:void 0}}return t.inherit!==!1?e:{}}function zc(t){const{initial:e,animate:n}=Bc(t,m.useContext(Ue));return m.useMemo(()=>({initial:e,animate:n}),[fi(e),fi(n)])}function fi(t){return Array.isArray(t)?t.join(" "):t}const he={};function $c(t){for(const e in t)he[e]=t[e],Qn(e)&&(he[e].isCSSVariable=!0)}function nr(t,{layout:e,layoutId:n}){return qt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!he[t]||t==="opacity")}const Uc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},_c=Gt.length;function Wc(t,e,n){let s="",i=!0;for(let r=0;r<_c;r++){const o=Gt[r],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=Xo(a,us[o]);if(!l){i=!1;const u=Uc[o]||o;s+=`${u}(${c}) `}n&&(e[o]=c)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function ys(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const l in e){const c=e[l];if(qt.has(l)){o=!0;continue}else if(Qn(l)){i[l]=c;continue}else{const u=Xo(c,us[l]);l.startsWith("origin")?(a=!0,r[l]=u):s[l]=u}}if(e.transform||(o||n?s.transform=Wc(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=r;s.transformOrigin=`${l} ${c} ${u}`}}const xs=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function sr(t,e,n){for(const s in e)!Y(e[s])&&!nr(s,n)&&(t[s]=e[s])}function Kc({transformTemplate:t},e){return m.useMemo(()=>{const n=xs();return ys(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Hc(t,e){const n=t.style||{},s={};return sr(s,n,t),Object.assign(s,Kc(t,e)),s}function Xc(t,e){const n={},s=Hc(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const Yc={offset:"stroke-dashoffset",array:"stroke-dasharray"},Gc={offset:"strokeDashoffset",array:"strokeDasharray"};function qc(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?Yc:Gc;t[r.offset]=M.transform(-s);const o=M.transform(e),a=M.transform(n);t[r.array]=`${o} ${a}`}function ir(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},l,c,u){if(ys(t,a,c),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:f}=t;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),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),i!==void 0&&qc(d,i,r,o,!1)}const or=()=>({...xs(),attrs:{}}),rr=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Zc(t,e,n,s){const i=m.useMemo(()=>{const r=or();return ir(r,e,rr(s),t.transformTemplate,t.style),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};sr(r,t.style,t),i.style={...r,...i.style}}return i}const Jc=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function vs(t){return typeof t!="string"||t.includes("-")?!1:!!(Jc.indexOf(t)>-1||/[A-Z]/u.test(t))}function Qc(t,e,n,{latestValues:s},i,r=!1){const a=(vs(t)?Zc:Xc)(e,s,i,t),l=Fc(e,typeof t=="string",r),c=t!==m.Fragment?{...l,...a,ref:n}:{},{children:u}=e,d=m.useMemo(()=>Y(u)?u.get():u,[u]);return m.createElement(t,{...c,children:d})}function mi(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function bs(t,e,n,s){if(typeof e=="function"){const[i,r]=mi(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=mi(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function Re(t){return Y(t)?t.get():t}function tu({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:eu(n,s,i,t),renderState:e()}}function eu(t,e,n,s){const i={},r=s(t,{});for(const f in r)i[f]=Re(r[f]);let{initial:o,animate:a}=t;const l=We(t),c=er(t);e&&c&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const d=u?a:o;if(d&&typeof d!="boolean"&&!_e(d)){const f=Array.isArray(d)?d:[d];for(let g=0;g<f.length;g++){const y=bs(t,f[g]);if(y){const{transitionEnd:x,transition:b,...v}=y;for(const T in v){let w=v[T];if(Array.isArray(w)){const V=u?w.length-1:0;w=w[V]}w!==null&&(i[T]=w)}for(const T in x)i[T]=x[T]}}}return i}const ar=t=>(e,n)=>{const s=m.useContext(Ue),i=m.useContext($e),r=()=>tu(t,e,s,i);return n?r():Wn(r)};function ws(t,e,n){const{style:s}=t,i={};for(const r in s)(Y(s[r])||e.style&&Y(e.style[r])||nr(r,t)||n?.getValue(r)?.liveStyle!==void 0)&&(i[r]=s[r]);return i}const nu=ar({scrapeMotionValuesFromProps:ws,createRenderState:xs});function lr(t,e,n){const s=ws(t,e,n);for(const i in t)if(Y(t[i])||Y(e[i])){const r=Gt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}const su=ar({scrapeMotionValuesFromProps:lr,createRenderState:or}),iu=Symbol.for("motionComponentSymbol");function Bt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function ou(t,e,n){return m.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):Bt(n)&&(n.current=s))},[e])}const Ts=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ru="framerAppearId",cr="data-"+Ts(ru),ur=m.createContext({});function au(t,e,n,s,i){const{visualElement:r}=m.useContext(Ue),o=m.useContext(ms),a=m.useContext($e),l=m.useContext(fs).reducedMotion,c=m.useRef(null);s=s||o.renderer,!c.current&&s&&(c.current=s(t,{visualState:e,parent:r,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=m.useContext(ur);u&&!u.projection&&i&&(u.type==="html"||u.type==="svg")&&lu(c.current,n,i,d);const f=m.useRef(!1);m.useInsertionEffect(()=>{u&&f.current&&u.update(n,a)});const g=n[cr],y=m.useRef(!!g&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return ao(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),y.current&&u.animationState&&u.animationState.animateChanges())}),m.useEffect(()=>{u&&(!y.current&&u.animationState&&u.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),y.current=!1),u.enteringChildren=void 0)}),u}function lu(t,e,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:dr(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&Bt(a),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:u,layoutScroll:l,layoutRoot:c})}function dr(t){if(t)return t.options.allowProjection!==!1?t.projection:dr(t.parent)}function Ne(t,{forwardMotionProps:e=!1}={},n,s){n&&kn(n);const i=vs(t)?su:nu;function r(a,l){let c;const u={...m.useContext(fs),...a,layoutId:cu(a)},{isStatic:d}=u,f=zc(a),g=i(a,d);if(!d&&Kn){uu(u,n);const y=du(u);c=y.MeasureLayout,f.visualElement=au(t,g,u,s,y.ProjectionNode)}return h.jsxs(Ue.Provider,{value:f,children:[c&&f.visualElement?h.jsx(c,{visualElement:f.visualElement,...u}):null,Qc(t,a,ou(g,f.visualElement,l),g,d,e)]})}r.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const o=m.forwardRef(r);return o[iu]=t,o}function cu({layoutId:t}){const e=m.useContext(_n).id;return e&&t!==void 0?e+"-"+t:t}function uu(t,e){const n=m.useContext(ms).strict;if(process.env.NODE_ENV!=="production"&&e&&n){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?Xt(!1,s,"lazy-strict-mode"):ft(!1,s,"lazy-strict-mode")}}function du(t){const{drag:e,layout:n}=Ht;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function hu(t,e){if(typeof Proxy>"u")return Ne;const n=new Map,s=(r,o)=>Ne(r,o,t,e),i=(r,o)=>(process.env.NODE_ENV!=="production"&&qn(!1,"motion() is deprecated. Use motion.create() instead."),s(r,o));return new Proxy(i,{get:(r,o)=>o==="create"?s:(n.has(o)||n.set(o,Ne(o,void 0,t,e)),n.get(o))})}function hr({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function fu({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function mu(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function un(t){return t===void 0||t===1}function Rn({scale:t,scaleX:e,scaleY:n}){return!un(t)||!un(e)||!un(n)}function Dt(t){return Rn(t)||fr(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function fr(t){return pi(t.x)||pi(t.y)}function pi(t){return t&&t!=="0%"}function ze(t,e,n){const s=t-n,i=e*s;return n+i}function gi(t,e,n,s,i){return i!==void 0&&(t=ze(t,i,s)),ze(t,n,s)+e}function Nn(t,e=0,n=1,s,i){t.min=gi(t.min,e,n,s,i),t.max=gi(t.max,e,n,s,i)}function mr(t,{x:e,y:n}){Nn(t.x,e.translate,e.scale,e.originPoint),Nn(t.y,n.translate,n.scale,n.originPoint)}const yi=.999999999999,xi=1.0000000000001;function pu(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a<i;a++){r=n[a],o=r.projectionDelta;const{visualElement:l}=r.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&$t(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,mr(t,o)),s&&Dt(r.latestValues)&&$t(t,r.latestValues))}e.x<xi&&e.x>yi&&(e.x=1),e.y<xi&&e.y>yi&&(e.y=1)}function zt(t,e){t.min=t.min+e,t.max=t.max+e}function vi(t,e,n,s,i=.5){const r=O(t.min,t.max,i);Nn(t,e,n,r,s)}function $t(t,e){vi(t.x,e.x,e.scaleX,e.scale,e.originX),vi(t.y,e.y,e.scaleY,e.scale,e.originY)}function pr(t,e){return hr(mu(t.getBoundingClientRect(),e))}function gu(t,e,n){const s=pr(t,n),{scroll:i}=e;return i&&(zt(s.x,i.offset.x),zt(s.y,i.offset.y)),s}const bi=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ut=()=>({x:bi(),y:bi()}),wi=()=>({min:0,max:0}),U=()=>({x:wi(),y:wi()}),In={current:null},gr={current:!1};function yu(){if(gr.current=!0,!!Kn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>In.current=t.matches;t.addEventListener("change",e),e()}else In.current=!1}const xu=new WeakMap;function vu(t,e,n){for(const s in e){const i=e[s],r=n[s];if(Y(i))t.addValue(s,i);else if(Y(r))t.addValue(s,Kt(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const o=t.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(s);t.addValue(s,Kt(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const Ti=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class bu{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ls,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},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=()=>{const f=q.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,I.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=We(n),this.isVariantNode=er(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const g=d[f];l[f]!==void 0&&Y(g)&&g.set(l[f])}}mount(e){this.current=e,xu.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((n,s)=>this.bindToMotionValue(s,n)),gr.current||yu(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:In.current,process.env.NODE_ENV!=="production"&&qn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),bt(this.notifyUpdate),bt(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=qt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&I.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r&&r(),n.owner&&n.stop()})}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 Ht){const n=Ht[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):U()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Ti.length;s++){const i=Ti[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=e[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=vu(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){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=Kt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(lo(s)||uo(s))?s=parseFloat(s):!Mc(s)&&wt.test(n)&&(s=Ho(e,n)),this.setBaseTarget(e,Y(s)?s.get():s)),Y(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const r=bs(this.props,n,this.presenceContext?.custom);r&&(s=r[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!Y(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Gn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){ds.render(this.render)}}class yr extends bu{constructor(){super(...arguments),this.KeyframeResolver=pc}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Y(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function xr(t,{style:e,vars:n},s,i){const r=t.style;let o;for(o in e)r[o]=e[o];i?.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function wu(t){return window.getComputedStyle(t)}class Tu extends yr{constructor(){super(...arguments),this.type="html",this.renderInstance=xr}readValueFromInstance(e,n){if(qt.has(n))return this.projection?.isProjecting?Pn(n):Rl(e,n);{const s=wu(e),i=(Qn(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return pr(e,n)}build(e,n,s){ys(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return ws(e,n,s)}}const vr=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"]);function Su(t,e,n,s){xr(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(vr.has(i)?i:Ts(i),e.attrs[i])}class Cu extends yr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=U}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(qt.has(n)){const s=Ko(n);return s&&s.default||0}return n=vr.has(n)?n:Ts(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return lr(e,n,s)}build(e,n,s){ir(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){Su(e,n,s,i)}mount(e){this.isSVGTag=rr(e.tagName),super.mount(e)}}const br=(t,e)=>vs(t)?new Cu(e):new Tu(e,{allowProjection:t!==m.Fragment});function Wt(t,e,n){const s=t.getProps();return bs(s,e,n!==void 0?n:s.custom,t)}const Ln=t=>Array.isArray(t);function Pu(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Kt(n))}function Au(t){return Ln(t)?t[t.length-1]||0:t}function Mu(t,e){const n=Wt(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=Au(r[o]);Pu(t,o,a)}}function Vu(t){return!!(Y(t)&&t.add)}function On(t,e){const n=t.getValue("willChange");if(Vu(n))return n.add(e);if(!n&&mt.WillChange){const s=new mt.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function wr(t){return t.props[cr]}const ju=t=>t!==null;function Du(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(ju),r=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[r]}const Eu={type:"spring",stiffness:500,damping:25,restSpeed:10},ku=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Ru={type:"keyframes",duration:.8},Nu={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Iu=(t,{keyframes:e})=>e.length>2?Ru:qt.has(t)?t.startsWith("scale")?ku(e[1]):Eu:Nu;function Lu({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Ss=(t,e,n,s={},i,r)=>o=>{const a=cs(s,t)||{},l=a.delay||s.delay||0;let{elapsed:c=0}=s;c=c-rt(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};Lu(a)||Object.assign(u,Iu(t,u)),u.duration&&(u.duration=rt(u.duration)),u.repeatDelay&&(u.repeatDelay=rt(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Dn(u),u.delay===0&&(d=!0)),(mt.instantAnimations||mt.skipAnimations)&&(d=!0,Dn(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!r&&e.get()!==void 0){const f=Du(u.keyframes,a);if(f!==void 0){I.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new as(u):new nc(u)};function Ou({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Tr(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r=t.getDefaultTransition(),transitionEnd:o,...a}=e;s&&(r=s);const l=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const u in a){const d=t.getValue(u,t.latestValues[u]??null),f=a[u];if(f===void 0||c&&Ou(c,u))continue;const g={delay:n,...cs(r||{},u)},y=d.get();if(y!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===y&&!g.velocity)continue;let x=!1;if(window.MotionHandoffAnimation){const v=wr(t);if(v){const T=window.MotionHandoffAnimation(v,u,I);T!==null&&(g.startTime=T,x=!0)}}On(t,u),d.start(Ss(u,d,f,t.shouldReduceMotion&&Uo.has(u)?{type:!1}:g,t,x));const b=d.animation;b&&l.push(b)}return o&&Promise.all(l).then(()=>{I.update(()=>{o&&Mu(t,o)})}),l}function Sr(t,e,n,s=0,i=1){const r=Array.from(t).sort((c,u)=>c.sortNodePosition(u)).indexOf(e),o=t.size,a=(o-1)*s;return typeof n=="function"?n(r,o):i===1?r*s:a-r*s}function Fn(t,e,n={}){const s=Wt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(Tr(t,s,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=i;return Fu(t,e,l,c,u,d,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,c]=a==="beforeChildren"?[r,o]:[o,r];return l().then(()=>c())}else return Promise.all([r(),o(n.delay)])}function Fu(t,e,n=0,s=0,i=0,r=1,o){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(Fn(l,e,{...o,delay:n+(typeof s=="function"?0:s)+Sr(t.variantChildren,l,s,i,r)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function Bu(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>Fn(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=Fn(t,e,n);else{const i=typeof e=="function"?Wt(t,e,n.custom):e;s=Promise.all(Tr(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}function Cr(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const zu=gs.length;function Pr(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Pr(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<zu;n++){const s=gs[n],i=t.props[s];(de(i)||i===!1)&&(e[s]=i)}return e}const $u=[...ps].reverse(),Uu=ps.length;function _u(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Bu(t,n,s)))}function Wu(t){let e=_u(t),n=Si(),s=!0;const i=l=>(c,u)=>{const d=Wt(t,u,l==="exit"?t.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:g,...y}=d;c={...c,...y,...g}}return c};function r(l){e=l(t)}function o(l){const{props:c}=t,u=Pr(t.parent)||{},d=[],f=new Set;let g={},y=1/0;for(let b=0;b<Uu;b++){const v=$u[b],T=n[v],w=c[v]!==void 0?c[v]:u[v],V=de(w),P=v===l?T.isActive:null;P===!1&&(y=b);let D=w===u[v]&&w!==c[v]&&V;if(D&&s&&t.manuallyAnimateOnMount&&(D=!1),T.protectedKeys={...g},!T.isActive&&P===null||!w&&!T.prevProp||_e(w)||typeof w=="boolean")continue;const j=Ku(T.prevProp,w);let A=j||v===l&&T.isActive&&!D&&V||b>y&&V,F=!1;const N=Array.isArray(w)?w:[w];let J=N.reduce(i(v),{});P===!1&&(J={});const{prevResolvedValues:It={}}=T,xe={...It,...J},Zt=$=>{A=!0,f.has($)&&(F=!0,f.delete($)),T.needsAnimating[$]=!0;const B=t.getValue($);B&&(B.liveStyle=!1)};for(const $ in xe){const B=J[$],Q=It[$];if(g.hasOwnProperty($))continue;let H=!1;Ln(B)&&Ln(Q)?H=!Cr(B,Q):H=B!==Q,H?B!=null?Zt($):f.add($):B!==void 0&&f.has($)?Zt($):T.protectedKeys[$]=!0}T.prevProp=w,T.prevResolvedValues=J,T.isActive&&(g={...g,...J}),s&&t.blockInitialAnimation&&(A=!1);const St=D&&j;A&&(!St||F)&&d.push(...N.map($=>{const B={type:v};if(typeof $=="string"&&s&&!St&&t.manuallyAnimateOnMount&&t.parent){const{parent:Q}=t,H=Wt(Q,$);if(Q.enteringChildren&&H){const{delayChildren:Jt}=H.transition||{};B.delay=Sr(Q.enteringChildren,t,Jt)}}return{animation:$,options:B}}))}if(f.size){const b={};if(typeof c.initial!="boolean"){const v=Wt(t,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(b.transition=v.transition)}f.forEach(v=>{const T=t.getBaseTarget(v),w=t.getValue(v);w&&(w.liveStyle=!0),b[v]=T??null}),d.push({animation:b})}let x=!!d.length;return s&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(x=!1),s=!1,x?e(d):Promise.resolve()}function a(l,c){if(n[l].isActive===c)return Promise.resolve();t.variantChildren?.forEach(d=>d.animationState?.setActive(l,c)),n[l].isActive=c;const u=o(l);for(const d in n)n[d].protectedKeys={};return u}return{animateChanges:o,setActive:a,setAnimateFunction:r,getState:()=>n,reset:()=>{n=Si()}}}function Ku(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Cr(e,t):!1}function jt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Si(){return{animate:jt(!0),whileInView:jt(),whileHover:jt(),whileTap:jt(),whileDrag:jt(),whileFocus:jt(),exit:jt()}}class Tt{constructor(e){this.isMounted=!1,this.node=e}update(){}}class Hu extends Tt{constructor(e){super(e),e.animationState||(e.animationState=Wu(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();_e(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let Xu=0;class Yu extends Tt{constructor(){super(...arguments),this.id=Xu++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const Ar={animation:{Feature:Hu},exit:{Feature:Yu}};function fe(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function ye(t){return{point:{x:t.pageX,y:t.pageY}}}const Gu=t=>e=>hs(e)&&t(e,ye(e));function oe(t,e,n,s){return fe(t,e,Gu(n),s)}const Mr=1e-4,qu=1-Mr,Zu=1+Mr,Vr=.01,Ju=0-Vr,Qu=0+Vr;function G(t){return t.max-t.min}function td(t,e,n){return Math.abs(t-e)<=n}function Ci(t,e,n,s=.5){t.origin=s,t.originPoint=O(e.min,e.max,t.origin),t.scale=G(n)/G(e),t.translate=O(n.min,n.max,t.origin)-t.originPoint,(t.scale>=qu&&t.scale<=Zu||isNaN(t.scale))&&(t.scale=1),(t.translate>=Ju&&t.translate<=Qu||isNaN(t.translate))&&(t.translate=0)}function re(t,e,n,s){Ci(t.x,e.x,n.x,s?s.originX:void 0),Ci(t.y,e.y,n.y,s?s.originY:void 0)}function Pi(t,e,n){t.min=n.min+e.min,t.max=t.min+G(e)}function ed(t,e,n){Pi(t.x,e.x,n.x),Pi(t.y,e.y,n.y)}function Ai(t,e,n){t.min=e.min-n.min,t.max=t.min+G(e)}function ae(t,e,n){Ai(t.x,e.x,n.x),Ai(t.y,e.y,n.y)}function et(t){return[t("x"),t("y")]}const jr=({current:t})=>t?t.ownerDocument.defaultView:null,Mi=(t,e)=>Math.abs(t-e);function nd(t,e){const n=Mi(t.x,e.x),s=Mi(t.y,e.y);return Math.sqrt(n**2+s**2)}class Dr{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=hn(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,y=nd(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!y)return;const{point:x}=f,{timestamp:b}=X;this.history.push({...x,timestamp:b});const{onStart:v,onMove:T}=this.handlers;g||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,f)},this.handlePointerMove=(f,g)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=dn(g,this.transformPagePoint),I.update(this.updatePoint,!0)},this.handlePointerUp=(f,g)=>{this.end();const{onEnd:y,onSessionEnd:x,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=hn(f.type==="pointercancel"?this.lastMoveEventInfo:dn(g,this.transformPagePoint),this.history);this.startEvent&&y&&y(f,v),x&&x(f,v)},!hs(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=o,this.contextWindow=i||window;const a=ye(e),l=dn(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=X;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(e,hn(l,this.history)),this.removeListeners=me(oe(this.contextWindow,"pointermove",this.handlePointerMove),oe(this.contextWindow,"pointerup",this.handlePointerUp),oe(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),bt(this.updatePoint)}}function dn(t,e){return e?{point:e(t.point)}:t}function Vi(t,e){return{x:t.x-e.x,y:t.y-e.y}}function hn({point:t},e){return{point:t,delta:Vi(t,Er(e)),offset:Vi(t,sd(e)),velocity:id(e,.1)}}function sd(t){return t[0]}function Er(t){return t[t.length-1]}function id(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Er(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>rt(e)));)n--;if(!s)return{x:0,y:0};const r=nt(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function od(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?O(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?O(n,t,s.max):Math.min(t,n)),t}function ji(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function rd(t,{top:e,left:n,bottom:s,right:i}){return{x:ji(t.x,n,i),y:ji(t.y,e,s)}}function Di(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function ad(t,e){return{x:Di(t.x,e.x),y:Di(t.y,e.y)}}function ld(t,e){let n=.5;const s=G(t),i=G(e);return i>s?n=le(e.min,e.max-s,t.min):s>i&&(n=le(t.min,t.max-i,e.min)),ht(0,1,n)}function cd(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Bn=.35;function ud(t=Bn){return t===!1?t=0:t===!0&&(t=Bn),{x:Ei(t,"left","right"),y:Ei(t,"top","bottom")}}function Ei(t,e,n){return{min:ki(t,e),max:ki(t,n)}}function ki(t,e){return typeof t=="number"?t:t[e]||0}const dd=new WeakMap;class hd{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=U(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ye(d).point)},o=(d,f)=>{const{drag:g,dragPropagation:y,onDragStart:x}=this.getProps();if(g&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=vc(g),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),et(v=>{let T=this.getAxisMotionValue(v).get()||0;if(dt.test(T)){const{projection:w}=this.visualElement;if(w&&w.layout){const V=w.layout.layoutBox[v];V&&(T=G(V)*(parseFloat(T)/100))}}this.originPoint[v]=T}),x&&I.postRender(()=>x(d,f)),On(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:g,dragDirectionLock:y,onDirectionLock:x,onDrag:b}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:v}=f;if(y&&this.currentDirection===null){this.currentDirection=fd(v),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),b&&b(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>et(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Dr(e,{onSessionStart:r,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:s,contextWindow:jr(this.visualElement)})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!i||!s)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&I.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!je(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=od(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;e&&Bt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=rd(s.layoutBox,e):this.constraints=!1,this.elastic=ud(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&et(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=cd(s.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Bt(e))return!1;const s=e.current;ft(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=gu(s,i.root,this.visualElement.getTransformPagePoint());let o=ad(i.layout.layoutBox,r);if(n){const a=n(fu(o));this.hasMutatedConstraints=!!a,a&&(o=hr(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=et(u=>{if(!je(u,n,this.currentDirection))return;let d=l&&l[u]||{};o&&(d={min:0,max:0});const f=i?200:1e6,g=i?40:1e7,y={type:"inertia",velocity:s?e[u]:0,bounceStiffness:f,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...r,...d};return this.startAxisValueAnimation(u,y)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return On(this.visualElement,e),s.start(Ss(e,s,0,n,this.visualElement,!1))}stopAnimation(){et(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){et(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){et(n=>{const{drag:s}=this.getProps();if(!je(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];r.set(e[n]-O(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Bt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};et(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=ld({min:l,max:l},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),et(o=>{if(!je(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(O(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;dd.set(this.visualElement,this);const e=this.visualElement.current,n=oe(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();Bt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,r=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),I.read(s);const o=fe(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(et(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())}));return()=>{o(),n(),r(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=Bn,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function je(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function fd(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class md extends Tt{constructor(e){super(e),this.removeGroupControls=st,this.removeListeners=st,this.controls=new hd(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||st}unmount(){this.removeGroupControls(),this.removeListeners()}}const Ri=t=>(e,n)=>{t&&I.postRender(()=>t(e,n))};class pd extends Tt{constructor(){super(...arguments),this.removePointerDownListener=st}onPointerDown(e){this.session=new Dr(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:jr(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Ri(e),onStart:Ri(n),onMove:s,onEnd:(r,o)=>{delete this.session,i&&I.postRender(()=>i(r,o))}}}mount(){this.removePointerDownListener=oe(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Ie={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ni(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const ne={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(M.test(t))t=parseFloat(t);else return t;const n=Ni(t,e.target.x),s=Ni(t,e.target.y);return`${n}% ${s}%`}},gd={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=wt.parse(t);if(i.length>5)return s;const r=wt.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const c=O(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),r(i)}};let fn=!1;class yd extends m.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=e;$c(xd),r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),fn&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),Ie.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,{projection:o}=s;return o&&(o.isPresent=r,fn=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==r?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||I.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),ds.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;fn=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function kr(t){const[e,n]=Qo(),s=m.useContext(_n);return h.jsx(yd,{...t,layoutGroup:s,switchLayoutGroup:m.useContext(ur),isPresent:e,safeToRemove:n})}const xd={borderRadius:{...ne,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ne,borderTopRightRadius:ne,borderBottomLeftRadius:ne,borderBottomRightRadius:ne,boxShadow:gd};function vd(t,e,n){const s=Y(t)?t:Kt(t);return s.start(Ss("",s,e,n)),s.animation}const bd=(t,e)=>t.depth-e.depth;class wd{constructor(){this.children=[],this.isDirty=!1}add(e){Hn(this.children,e),this.isDirty=!0}remove(e){Xn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(bd),this.isDirty=!1,this.children.forEach(e)}}function Td(t,e){const n=q.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(bt(s),t(r-e))};return I.setup(s,!0),()=>bt(s)}const Rr=["TopLeft","TopRight","BottomLeft","BottomRight"],Sd=Rr.length,Ii=t=>typeof t=="string"?parseFloat(t):t,Li=t=>typeof t=="number"||M.test(t);function Cd(t,e,n,s,i,r){i?(t.opacity=O(0,n.opacity??1,Pd(s)),t.opacityExit=O(e.opacity??1,0,Ad(s))):r&&(t.opacity=O(e.opacity??1,n.opacity??1,s));for(let o=0;o<Sd;o++){const a=`border${Rr[o]}Radius`;let l=Oi(e,a),c=Oi(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Li(l)===Li(c)?(t[a]=Math.max(O(Ii(l),Ii(c),s),0),(dt.test(c)||dt.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=O(e.rotate||0,n.rotate||0,s))}function Oi(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Pd=Nr(0,.5,vo),Ad=Nr(.5,.95,st);function Nr(t,e,n){return s=>s<t?0:s>e?1:n(le(t,e,s))}function Fi(t,e){t.min=e.min,t.max=e.max}function tt(t,e){Fi(t.x,e.x),Fi(t.y,e.y)}function Bi(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function zi(t,e,n,s,i){return t-=e,t=ze(t,1/n,s),i!==void 0&&(t=ze(t,1/i,s)),t}function Md(t,e=0,n=1,s=.5,i,r=t,o=t){if(dt.test(e)&&(e=parseFloat(e),e=O(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=O(r.min,r.max,s);t===r&&(a-=e),t.min=zi(t.min,e,n,a,i),t.max=zi(t.max,e,n,a,i)}function $i(t,e,[n,s,i],r,o){Md(t,e[n],e[s],e[i],e.scale,r,o)}const Vd=["x","scaleX","originX"],jd=["y","scaleY","originY"];function Ui(t,e,n,s){$i(t.x,e,Vd,n?n.x:void 0,s?s.x:void 0),$i(t.y,e,jd,n?n.y:void 0,s?s.y:void 0)}function _i(t){return t.translate===0&&t.scale===1}function Ir(t){return _i(t.x)&&_i(t.y)}function Wi(t,e){return t.min===e.min&&t.max===e.max}function Dd(t,e){return Wi(t.x,e.x)&&Wi(t.y,e.y)}function Ki(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Lr(t,e){return Ki(t.x,e.x)&&Ki(t.y,e.y)}function Hi(t){return G(t.x)/G(t.y)}function Xi(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Ed{constructor(){this.members=[]}add(e){Hn(this.members,e),e.scheduleRender()}remove(e){if(Xn(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const r=this.members[i];if(r.isPresent!==!1){s=r;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function kd(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=n?.z||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:g,skewY:y}=n;c&&(s=`perspective(${c}px) ${s}`),u&&(s+=`rotate(${u}deg) `),d&&(s+=`rotateX(${d}deg) `),f&&(s+=`rotateY(${f}deg) `),g&&(s+=`skewX(${g}deg) `),y&&(s+=`skewY(${y}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const mn=["","X","Y","Z"],Rd=1e3;let Nd=0;function pn(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Or(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=wr(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",I,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&Or(s)}function Fr({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e?.()){this.id=Nd++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Od),this.nodes.forEach($d),this.nodes.forEach(Ud),this.nodes.forEach(Fd)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new wd)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Gn),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Jo(o)&&!Pc(o),this.instance=o;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let u,d=0;const f=()=>this.root.updateBlockedByResize=!1;I.read(()=>{d=window.innerWidth}),t(o,()=>{const g=window.innerWidth;g!==d&&(d=g,this.root.updateBlockedByResize=!0,u&&u(),u=Td(f,250),Ie.hasAnimatedSinceResize&&(Ie.hasAnimatedSinceResize=!1,this.nodes.forEach(qi)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||c.getDefaultTransition()||Xd,{onLayoutAnimationStart:x,onLayoutAnimationComplete:b}=c.getProps(),v=!this.targetLayout||!Lr(this.targetLayout,g),T=!d&&f;if(this.options.layoutRoot||this.resumeFrom||T||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...cs(y,"layout"),onPlay:x,onComplete:b};(c.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(u,T)}else d||qi(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),bt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(_d),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Or(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Yi);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Gi);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(zd),this.nodes.forEach(Id),this.nodes.forEach(Ld)):this.nodes.forEach(Gi),this.clearAllSnapshots();const a=q.now();X.delta=ht(0,1e3/60,a-X.timestamp),X.timestamp=a,X.isProcessing=!0,nn.update.process(X),nn.preRender.process(X),nn.render.process(X),X.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ds.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Bd),this.sharedNodes.forEach(Wd)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,I.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){I.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!G(this.snapshot.measuredBox.x)&&!G(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=U(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Ir(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&this.instance&&(a||Dt(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),Yd(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return U();const a=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Gd))){const{scroll:c}=this.root;c&&(zt(a.x,c.offset.x),zt(a.y,c.offset.y))}return a}removeElementScroll(o){const a=U();if(tt(a,o),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;c!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&tt(a,o),zt(a.x,u.offset.x),zt(a.y,u.offset.y))}return a}applyTransform(o,a=!1){const l=U();tt(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&$t(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Dt(u.latestValues)&&$t(l,u.latestValues)}return Dt(this.latestValues)&&$t(l,this.latestValues),l}removeTransform(o){const a=U();tt(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Dt(c.latestValues))continue;Rn(c.latestValues)&&c.updateSnapshot();const u=U(),d=c.measurePageBox();tt(u,d),Ui(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Dt(this.latestValues)&&Ui(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==X.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!(!this.layout||!(u||d))){if(this.resolvedRelativeTargetAt=X.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=U(),this.relativeTargetOrigin=U(),ae(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),tt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=U(),this.targetWithTransforms=U()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ed(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):tt(this.target,this.layout.layoutBox),mr(this.target,this.targetDelta)):tt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=U(),this.relativeTargetOrigin=U(),ae(this.relativeTargetOrigin,this.target,f.target),tt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Rn(this.parent.latestValues)||fr(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===X.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;tt(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;pu(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=U());const{target:g}=o;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Bi(this.prevProjectionDelta.x,this.projectionDelta.x),Bi(this.prevProjectionDelta.y,this.projectionDelta.y)),re(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!Xi(this.projectionDelta.x,this.prevProjectionDelta.x)||!Xi(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ut(),this.projectionDelta=Ut(),this.projectionDeltaWithTransform=Ut()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=Ut();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=U(),g=l?l.source:void 0,y=this.layout?this.layout.source:void 0,x=g!==y,b=this.getStack(),v=!b||b.members.length<=1,T=!!(x&&!v&&this.options.crossfade===!0&&!this.path.some(Hd));this.animationProgress=0;let w;this.mixTargetDelta=V=>{const P=V/1e3;Zi(d.x,o.x,P),Zi(d.y,o.y,P),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ae(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Kd(this.relativeTarget,this.relativeTargetOrigin,f,P),w&&Dd(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=U()),tt(w,this.relativeTarget)),x&&(this.animationValues=u,Cd(u,c,this.latestValues,P,T,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(bt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=I.update(()=>{Ie.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Kt(0)),this.currentAnimation=vd(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Rd),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&Br(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||U();const d=G(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const f=G(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}tt(a,l),$t(a,u),re(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Ed),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&pn("z",o,c,this.animationValues);for(let u=0;u<mn.length;u++)pn(`rotate${mn[u]}`,o,c,this.animationValues),pn(`skew${mn[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Re(a?.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Re(a?.pointerEvents)||""),this.hasProjected&&!Dt(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=kd(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),o.transform=d;const{x:f,y:g}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${g.origin*100}% 0`,c.animationValues?o.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const y in he){if(u[y]===void 0)continue;const{correct:x,applyTo:b,isCSSVariable:v}=he[y],T=d==="none"?u[y]:x(u[y],c);if(b){const w=b.length;for(let V=0;V<w;V++)o[b[V]]=T}else v?this.options.visualElement.renderState.vars[y]=T:o[y]=T}this.options.layoutId&&(o.pointerEvents=c===this?Re(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(Yi),this.root.sharedNodes.clear()}}}function Id(t){t.updateLayout()}function Ld(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,r=e.source!==t.layout.source;i==="size"?et(u=>{const d=r?e.measuredBox[u]:e.layoutBox[u],f=G(d);d.min=n[u].min,d.max=d.min+f}):Br(i,e.layoutBox,n)&&et(u=>{const d=r?e.measuredBox[u]:e.layoutBox[u],f=G(n[u]);d.max=d.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[u].max=t.relativeTarget[u].min+f)});const o=Ut();re(o,n,e.layoutBox);const a=Ut();r?re(a,t.applyTransform(s,!0),e.measuredBox):re(a,n,e.layoutBox);const l=!Ir(o);let c=!1;if(!t.resumeFrom){const u=t.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:f}=u;if(d&&f){const g=U();ae(g,e.layoutBox,d.layoutBox);const y=U();ae(y,n,f.layoutBox),Lr(g,y)||(c=!0),u.options.layoutRoot&&(t.relativeTarget=y,t.relativeTargetOrigin=g,t.relativeParent=u)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Od(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Fd(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Bd(t){t.clearSnapshot()}function Yi(t){t.clearMeasurements()}function Gi(t){t.isLayoutDirty=!1}function zd(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function qi(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function $d(t){t.resolveTargetDelta()}function Ud(t){t.calcProjection()}function _d(t){t.resetSkewAndRotation()}function Wd(t){t.removeLeadSnapshot()}function Zi(t,e,n){t.translate=O(e.translate,0,n),t.scale=O(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ji(t,e,n,s){t.min=O(e.min,n.min,s),t.max=O(e.max,n.max,s)}function Kd(t,e,n,s){Ji(t.x,e.x,n.x,s),Ji(t.y,e.y,n.y,s)}function Hd(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Xd={duration:.45,ease:[.4,0,.1,1]},Qi=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),to=Qi("applewebkit/")&&!Qi("chrome/")?Math.round:st;function eo(t){t.min=to(t.min),t.max=to(t.max)}function Yd(t){eo(t.x),eo(t.y)}function Br(t,e,n){return t==="position"||t==="preserve-aspect"&&!td(Hi(e),Hi(n),.2)}function Gd(t){return t!==t.root&&t.scroll?.wasRoot}const qd=Fr({attachResizeListener:(t,e)=>fe(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),gn={current:void 0},zr=Fr({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!gn.current){const t=new qd({});t.mount(window),t.setOptions({layoutScroll:!0}),gn.current=t}return gn.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Zd={pan:{Feature:pd},drag:{Feature:md,ProjectionNode:zr,MeasureLayout:kr}};function no(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,r=s[i];r&&I.postRender(()=>r(e,ye(e)))}class Jd extends Tt{mount(){const{current:e}=this.node;e&&(this.unmount=bc(e,(n,s)=>(no(this.node,s,"Start"),i=>no(this.node,i,"End"))))}unmount(){}}class Qd extends Tt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=me(fe(this.node.current,"focus",()=>this.onFocus()),fe(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function so(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),r=s[i];r&&I.postRender(()=>r(e,ye(e)))}class th extends Tt{mount(){const{current:e}=this.node;e&&(this.unmount=Cc(e,(n,s)=>(so(this.node,s,"Start"),(i,{success:r})=>so(this.node,i,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const zn=new WeakMap,yn=new WeakMap,eh=t=>{const e=zn.get(t.target);e&&e(t)},nh=t=>{t.forEach(eh)};function sh({root:t,...e}){const n=t||document;yn.has(n)||yn.set(n,{});const s=yn.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(nh,{root:t,...e})),s[i]}function ih(t,e,n){const s=sh(e);return zn.set(t,n),s.observe(t),()=>{zn.delete(t),s.unobserve(t)}}const oh={some:0,all:1};class rh extends Tt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:r}=e,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:oh[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,r&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return ih(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(ah(e,n))&&this.startObserver()}unmount(){}}function ah({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const $r={inView:{Feature:rh},tap:{Feature:th},focus:{Feature:Qd},hover:{Feature:Jd}},lh={layout:{ProjectionNode:zr,MeasureLayout:kr}},ch={...Ar,...$r,...Zd,...lh},uh=hu(ch,br),dh={renderer:br,...Ar,...$r};function Ur(t,e){return Ne(t,e)}const De=Ur("div"),hh=Ur("p");function fh(t){const e=t.name||"unnamed",n=mh(t),{schema:s,def:i}=ph(t);return{name:e,description:n,parameters:s,parametersDef:i}}function mh(t){const n=t.toString().match(/\/\*\*\s*\n([^*]|\*[^/])*\*\//);if(n){const i=n[0].match(/\/\*\*\s*\n\s*\*\s*([^\n@]+)/);if(i&&i[1])return i[1].trim()}return`Execute ${t.name||"function"}`}function ph(t){const n=t.toString().match(/\(([^)]*)\)/);if(!n||!n[1]||!n[1].trim())return{schema:xt.z.object({}),def:{}};const i=n[1].split(",").map(a=>a.trim()),r={},o={};for(const a of i){const l=a.match(/(\w+)\s*:\s*(\w+)/);if(l&&l[1]&&l[2]){const c=l[1];switch(l[2].toLowerCase()){case"string":r[c]=xt.z.string().describe(c),o[c]={type:"string",description:c};break;case"number":r[c]=xt.z.number().describe(c),o[c]={type:"number",description:c};break;case"boolean":r[c]=xt.z.boolean().describe(c),o[c]={type:"boolean",description:c};break;case"any":r[c]=xt.z.any().describe(c),o[c]={type:"any",description:c};break;default:r[c]=xt.z.string().describe(c),o[c]={type:"string",description:c}}}else{const c=a.match(/(\w+)/);if(c&&c[1]){const u=c[1];r[u]=xt.z.string().describe(u),o[u]={type:"string",description:u}}}}return{schema:xt.z.object(r),def:o}}function gh(t){return t.map(fh)}function yh({toolName:t,description:e,args:n,onApprove:s,onDeny:i}){const r=Object.keys(n).length>0;return h.jsx("div",{className:"bg-stone-100 dark:bg-stone-800 border border-border rounded-lg px-3 py-2.5 my-1.5",children:h.jsxs("div",{className:"flex items-start gap-2",children:[h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsx("div",{className:"flex items-center gap-1.5 mb-1",children:h.jsx("span",{className:"text-sm font-medium text-foreground",children:t})}),r&&h.jsx("div",{className:"space-y-0.5 mb-1.5",children:Object.entries(n).map(([o,a])=>h.jsxs("div",{className:"flex items-start gap-1.5 text-xs",children:[h.jsxs("span",{className:"text-muted-foreground min-w-[60px]",children:[o,":"]}),h.jsx("span",{className:"font-mono text-foreground",children:typeof a=="string"?a:JSON.stringify(a)})]},o))})]}),h.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[h.jsxs(ct,{size:"sm",variant:"ghost",className:"h-6 px-2 text-xs",onClick:s,children:[h.jsx(K.Check,{className:"h-3 w-3 mr-1"}),"Approve"]}),h.jsx(ct,{size:"sm",variant:"ghost",className:"h-6 px-2 text-xs text-muted-foreground",onClick:i,children:h.jsx(K.X,{className:"h-3 w-3"})})]})]})})}function xh({toolName:t,args:e,isDenied:n,isSafe:s}){const[i,r]=m.useState(!1),o=Object.keys(e).length>0;return h.jsxs("div",{className:"my-1",children:[h.jsxs("button",{onClick:()=>o&&r(!i),className:`inline-flex items-center gap-1.5 text-xs rounded-md px-2 py-1 transition-colors ${n?"bg-red-100 dark:bg-red-950/30 text-red-700 dark:text-red-400":"bg-green-100 dark:bg-green-950/30 text-green-700 dark:text-green-400"} ${o?"cursor-pointer hover:bg-opacity-80":""}`,children:[o&&h.jsx("span",{className:"transition-transform duration-200",children:i?h.jsx(K.ChevronDown,{className:"h-3 w-3"}):h.jsx(K.ChevronRight,{className:"h-3 w-3"})}),n?h.jsx(K.X,{className:"h-3 w-3"}):s?h.jsx(K.Zap,{className:"h-3 w-3"}):h.jsx(K.Check,{className:"h-3 w-3"}),h.jsxs("span",{className:"font-medium",children:[n?"Denied":s?"Auto-executed":"Executed"," ",t]})]}),i&&o&&h.jsx("div",{className:"mt-1 ml-6 p-2 bg-stone-50 dark:bg-stone-900 rounded-md border border-border",children:h.jsx("div",{className:"space-y-0.5",children:Object.entries(e).map(([a,l])=>h.jsxs("div",{className:"flex items-start gap-1.5 text-xs",children:[h.jsxs("span",{className:"text-muted-foreground min-w-[60px]",children:[a,":"]}),h.jsx("span",{className:"font-mono text-foreground",children:typeof l=="string"?l:JSON.stringify(l)})]},a))})})]})}function vh({...t}){return h.jsx(Un.Root,{"data-slot":"collapsible",...t})}function bh({...t}){return h.jsx(Un.CollapsibleTrigger,{"data-slot":"collapsible-trigger",...t})}function wh({...t}){return h.jsx(Un.CollapsibleContent,{"data-slot":"collapsible-content",...t})}const Th=m.lazy(()=>import("streamdown").then(t=>({default:t.Streamdown}))),Cs=m.memo(({className:t,...e})=>typeof window>"u"?null:h.jsx(m.Suspense,{fallback:null,children:h.jsx(Th,{className:at("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",t),...e})}),(t,e)=>t.children===e.children);Cs.displayName="Response";const Sh=Object.freeze(Object.defineProperty({__proto__:null,Response:Cs},Symbol.toStringTag,{value:"Module"})),Ch=({children:t,as:e="p",className:n,duration:s=2,spread:i=2})=>{const r=uh.create(e),o=m.useMemo(()=>(t?.length??0)*i,[t,i]);return h.jsx(r,{animate:{backgroundPosition:"0% center"},className:at("relative inline-block bg-[length:250%_100%,auto] bg-clip-text text-transparent","[--bg:linear-gradient(90deg,#0000_calc(50%-var(--spread)),var(--color-background),#0000_calc(50%+var(--spread)))] [background-repeat:no-repeat,padding-box]",n),initial:{backgroundPosition:"100% center"},style:{"--spread":`${o}px`,backgroundImage:"var(--bg), linear-gradient(var(--color-muted-foreground), var(--color-muted-foreground))"},transition:{repeat:Number.POSITIVE_INFINITY,duration:s,ease:"linear"},children:t})},Ph=m.memo(Ch),_r=m.createContext(null),Ah=()=>{const t=m.useContext(_r);if(!t)throw new Error("Reasoning components must be used within Reasoning");return t},Mh=1e3,Vh=1e3,Wr=m.memo(({className:t,isStreaming:e=!1,open:n,defaultOpen:s=!0,onOpenChange:i,duration:r,children:o,...a})=>{const[l,c]=$s.useControllableState({prop:n,defaultProp:s,onChange:i}),[u,d]=$s.useControllableState({prop:r,defaultProp:0}),[f,g]=m.useState(!1),[y,x]=m.useState(null);m.useEffect(()=>{e?y===null&&x(Date.now()):y!==null&&(d(Math.ceil((Date.now()-y)/Vh)),x(null))},[e,y,d]),m.useEffect(()=>{if(s&&!e&&l&&!f){const v=setTimeout(()=>{c(!1),g(!0)},Mh);return()=>clearTimeout(v)}},[e,l,s,c,f]);const b=v=>{c(v)};return h.jsx(_r.Provider,{value:{isStreaming:e,isOpen:l,setIsOpen:c,duration:u},children:h.jsx(vh,{className:at("not-prose mb-4",t),onOpenChange:b,open:l,...a,children:o})})}),jh=(t,e)=>t||e===0?h.jsx(Ph,{duration:1,children:"Thinking..."}):e===void 0?h.jsx("p",{children:"Thought for a few seconds"}):h.jsxs("p",{children:["Thought for ",e," seconds"]}),Kr=m.memo(({className:t,children:e,...n})=>{const{isStreaming:s,isOpen:i,duration:r}=Ah();return h.jsx(bh,{className:at("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",t),...n,children:e??h.jsxs(h.Fragment,{children:[h.jsx(K.BrainIcon,{className:"size-4"}),jh(s,r),h.jsx(K.ChevronDownIcon,{className:at("size-4 transition-transform",i?"rotate-180":"rotate-0")})]})})}),Hr=m.memo(({className:t,children:e,...n})=>h.jsx(wh,{className:at("mt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",t),...n,children:h.jsx(Cs,{className:"grid gap-2",children:e})}));Wr.displayName="Reasoning";Kr.displayName="ReasoningTrigger";Hr.displayName="ReasoningContent";function Dh({theme:t="auto",layout:e="sidebar",model:n="auto",animated:s=!0,title:i="Chat",logo:r=void 0,defaultWidth:o=384,minWidth:a=300,maxWidth:l=800,initiallyExpanded:c=!1,tools:u=[],safeTools:d=[],systemPrompt:f="",tokenEndpoint:g="/api/arcten/token",apiBaseUrl:y="https://api.arcten.com",user:x}){const[b,v]=m.useState(null),T=m.useRef(null),[w,V]=m.useState(null),[P,D]=m.useState(null),j=m.useRef(null),[A,F]=m.useState(c),[N,J]=m.useState(o),[It,xe]=m.useState(600),[Zt,St]=m.useState(!1),[R,$]=m.useState(!1),[B,Q]=m.useState(!1),[H,Jt]=m.useState({x:100,y:100}),[Ps,Ke]=m.useState(!1),[He,As]=m.useState({x:0,y:0}),[Xr,Yr]=m.useState(!1),Xe=m.useRef(null),ve=m.useRef(null),[be,Ye]=m.useState(""),[Ms,Gr]=m.useState(null),[qr,Zr]=m.useState("Thinking..."),[Ge,qe]=m.useState(new Set),[Jr,Qr]=m.useState(""),[Ct,ta]=m.useState([]),[Ze,Vs]=m.useState(!1),[Je,js]=m.useState([]),[Ds,Qe]=m.useState(()=>typeof window<"u"?crypto.randomUUID():null),[Lt,we]=m.useState(!1),[Eh,Te]=m.useState(!1),[kh,Se]=m.useState([]),Pt=m.useMemo(()=>[...u,...d],[u,d]),Es=m.useMemo(()=>gh(Pt),[Pt]),ks=m.useMemo(()=>{const p=new Map;return Pt.forEach(S=>p.set(S.name,S)),p},[Pt]),Rs=m.useMemo(()=>new Set(d.map(p=>p.name)),[d]),Ns=["Thinking...","Pondering...","Contemplating...","Considering...","Analyzing...","Processing...","Reasoning...","Mulling it over...","Computing...","Cooking up a response...","Brewing ideas...","Connecting the dots...","Piecing it together...","Spinning up thoughts...","Loading brain cells...","Sharpening pencils...","Herding ideas...","Warming up neurons...","Stirring the think-pot...","Plotting a plan...","Wiggling the logic wires...","Rolling ideas around...","Charging the brainstorm...","Booting the brain...","Dusting off the cortex...","Running mental diagnostics...","Fetching cleverness...","Whisking up notions...","Tuning the idea radio...","Juggling possibilities...","Breathing in inspiration...","Squeezing the thought sponge...","Tickling the gray matter...","Bubbling up insights...","Spicing the soup of thought...","Lacing up hypotheses...","Winding the idea clock...","Casting the net for clues...","Polishing the crystal ball...","Mapping the maze...","Crunching the brain-biscuits...","Cueing the eureka moment...","Summoning the muse...","Knocking on insight’s door...","Combing the noodle...","Sailing the think-ship...","Scooping brain gelato...","Testing wild hunches...","Tick-tocking the neurons...","Planting idea seeds...","Shaking the thought snow globe...","Unlocking the mental toolbox...","Nudging the puzzle pieces...","Lighting the idea bulb...","Preheating the oven of insight...","Mixing the mental trail mix...","Spooling up reasoning reels...","Skimming the mind-palace index...","Surfing the thought waves...","Kicking the tires on ideas...","Rattling the idea can...","Waving the logic wand..."];m.useEffect(()=>{if(typeof window<"u"){const p=localStorage.getItem("arcten-sidebar-expanded");p&&F(JSON.parse(p));const S=localStorage.getItem("arcten-sidebar-width");S&&J(parseInt(S));const E=localStorage.getItem("arcten-sidebar-height");E&&xe(parseInt(E));const k=localStorage.getItem("arcten-sidebar-detached");k&&$(JSON.parse(k));const W=localStorage.getItem("arcten-sidebar-position");if(W){const Z=JSON.parse(W),z=50,pt=Math.max(z-o,Math.min(Z.x,window.innerWidth-z)),gt=Math.max(0,Math.min(Z.y,window.innerHeight-z));Jt({x:pt,y:gt})}const C=localStorage.getItem("arcten-sidebar-minimized");C&&Q(JSON.parse(C)),Yr(!0)}},[]),m.useEffect(()=>((async()=>{try{const S=await fetch(g,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({user:x})});if(!S.ok)throw new Error("Failed to fetch token");const E=await S.json();v(E.clientToken),T.current=E.clientToken,D(E.expiresAt),V(null)}catch(S){V(S instanceof Error?S.message:"Failed to fetch token")}})(),()=>{j.current&&clearTimeout(j.current)}),[g,x]),m.useEffect(()=>{if(!P)return;j.current&&clearTimeout(j.current);const p=Math.floor(Date.now()/1e3),S=P-p,k=Math.max(0,S-5);return console.log(`Token expires at ${new Date(P*1e3).toISOString()}`),console.log(`Scheduling token refresh in ${k} seconds`),j.current=setTimeout(async()=>{console.log("Refreshing token...");try{const W=await fetch(g,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({user:x})});if(!W.ok)throw new Error("Failed to refresh token");const C=await W.json();v(C.clientToken),T.current=C.clientToken,D(C.expiresAt),V(null),console.log("Token refreshed successfully")}catch(W){console.error("Token refresh failed:",W),V(W instanceof Error?W.message:"Failed to refresh token")}},k*1e3),()=>{j.current&&clearTimeout(j.current)}},[P,g,x]),m.useEffect(()=>{(async()=>{if(Pt.length!==0)try{const S=Pt.map(k=>({name:k.name,code:k.toString()})),E=await fetch(`${y}/tools/describe`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tools:S})});if(E.ok){const k=await E.json();ta(k.tools)}}catch(S){console.error("Failed to fetch tool descriptions:",S)}})()},[Pt]),m.useEffect(()=>{Promise.resolve().then(()=>Sh).then(p=>{Gr(()=>p.Response)})},[]),m.useEffect(()=>{const p=()=>{Qr(window.location.pathname)};p(),window.addEventListener("popstate",p);const S=setInterval(p,500);return()=>{window.removeEventListener("popstate",p),clearInterval(S)}},[]);async function Is(){if(!(!x?.id||!b)){Te(!0);try{const S=await(await fetch(`${y}/conversations`,{headers:{Authorization:`Bearer ${b}`}})).json();js(S.conversations||[])}catch(p){console.error("Failed to fetch conversations:",p)}finally{Te(!1)}}}m.useEffect(()=>{x?.id&&b&&Is()},[x,b]);function ea(p){const S=Math.floor((Date.now()-p)/1e3);return S<60?"now":S<3600?`${Math.floor(S/60)}m`:S<86400?`${Math.floor(S/3600)}h`:`${Math.floor(S/86400)}d`}function na(){const p=crypto.randomUUID();Qe(p),Pe([]),Se([]),we(!1)}async function sa(p){if(b)try{await fetch(`${y}/conversations/${p}`,{method:"DELETE",headers:{Authorization:`Bearer ${b}`}}),js(Je.filter(S=>S._id!==p)),p===Ds&&na()}catch(S){console.error("Failed to delete conversation:",S)}}async function ia(p){Qe(p.chatId),we(!1),Te(!0);try{const S=await fetch(`${y}/conversations/${p.chatId}/messages`,{headers:{Authorization:`Bearer ${T.current}`}});if(!S.ok)throw new Error(`Failed to fetch messages: ${S.statusText}`);const k=(await S.json()).messages||[];Pe(k),Se(k)}catch(S){console.error("Failed to load conversation messages:",S);const E=p.messages||[];Pe(E),Se(E)}finally{Te(!1)}}const oa=(async(p,S={})=>{const E=S.headers?new Headers(S.headers):new Headers;return E.delete("user-agent"),E.delete("User-Agent"),fetch(p,{...S,headers:E})}),{messages:Qt,sendMessage:ra,status:lt,error:Ls,stop:Ce,addToolResult:te,setMessages:Pe}=Ta.useChat({id:Ds||void 0,transport:new zs.DefaultChatTransport({api:`${y}/chat`,fetch:oa,headers:()=>{const p={};return T.current&&(p.Authorization=`Bearer ${T.current}`),p},body:()=>({tools:Es.map(p=>({name:p.name,description:p.description,parameters:p.parametersDef})),systemPrompt:f,currentRoute:Jr})}),sendAutomaticallyWhen:zs.lastAssistantMessageIsCompleteWithToolCalls});m.useEffect(()=>{A&&ve.current&&ve.current.focus()},[A,Qt]);function aa(){F(!0),localStorage.setItem("arcten-sidebar-expanded","true")}function la(){F(!1),localStorage.setItem("arcten-sidebar-expanded","false")}m.useEffect(()=>{},[A]),m.useEffect(()=>{Xe.current&&Xe.current.scrollIntoView({behavior:"smooth"})},[Qt]),m.useEffect(()=>{function p(S){S.key==="Escape"&&(lt==="streaming"||lt==="submitted")&&(S.preventDefault(),Ce())}return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[lt,Ce]);function ca(){const p=crypto.randomUUID();Qe(p),Pe([]),Se([]),we(!1)}function Os(p){if(p.preventDefault(),!be.trim())return;(lt==="streaming"||lt==="submitted")&&Ce();const S=Ns[Math.floor(Math.random()*Ns.length)]||"Thinking...";Zr(S),ra({text:be}),Ye("")}function ua(p){const S=p.target.value;Ye(S)}m.useEffect(()=>{if(!Zt)return;function p(E){if(R){const k=E.clientX-H.x,W=E.clientY-H.y;k>=a&&k<=l&&J(k),W>=400&&W<=1e3&&xe(W)}else{const k=window.innerWidth-E.clientX;k>=a&&k<=l&&J(k)}}function S(){St(!1),localStorage.setItem("arcten-sidebar-width",N.toString()),localStorage.setItem("arcten-sidebar-height",It.toString())}return window.addEventListener("mousemove",p),window.addEventListener("mouseup",S),()=>{window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",S)}},[Zt,N,It,R,H,a,l]);function da(p){p.preventDefault(),St(!0)}function ha(){$(!0),Q(!1),localStorage.setItem("arcten-sidebar-detached","true"),localStorage.setItem("arcten-sidebar-minimized","false")}function fa(){$(!1),Q(!1),localStorage.setItem("arcten-sidebar-detached","false"),localStorage.setItem("arcten-sidebar-minimized","false")}function Fs(){Q(!B),localStorage.setItem("arcten-sidebar-minimized",JSON.stringify(!B))}function ma(p){R&&(Ke(!0),As({x:p.clientX-H.x,y:p.clientY-H.y}))}return m.useEffect(()=>{if(!R)return;function p(){Jt(S=>{const k=window.innerWidth-50,W=window.innerHeight-50,C=50-N,Z=0,z=Math.max(C,Math.min(S.x,k)),pt=Math.max(Z,Math.min(S.y,W));if(z!==S.x||pt!==S.y){const gt={x:z,y:pt};return localStorage.setItem("arcten-sidebar-position",JSON.stringify(gt)),gt}return S})}return window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[R,N]),m.useEffect(()=>{if(!Ps)return;function p(E){const k=E.clientX-He.x,W=E.clientY-He.y,C=50,Z=window.innerWidth-C,z=window.innerHeight-C,pt=C-N,gt=0,tn=Math.max(pt,Math.min(k,Z)),it=Math.max(gt,Math.min(W,z));Jt({x:tn,y:it})}function S(){Ke(!1),localStorage.setItem("arcten-sidebar-position",JSON.stringify(H))}return window.addEventListener("mousemove",p),window.addEventListener("mouseup",S),()=>{window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",S)}},[Ps,He,H,N]),Xr?w?h.jsx("div",{className:"fixed right-0 top-0 h-screen w-96 flex items-center justify-center p-4 bg-stone-50 dark:bg-stone-900 border-l border-border",children:h.jsxs("div",{className:"p-4 bg-destructive/10 text-destructive text-sm rounded-lg",children:["Authentication error: ",w]})}):b?h.jsx(Ic,{features:dh,children:h.jsx(De,{id:"arcten-sidebar","data-theme":t,"data-layout":e,"data-model":n,initial:R?{opacity:0,scale:.95,filter:"blur(4px)"}:!1,animate:R?{opacity:1,scale:1,filter:"blur(0px)"}:{},transition:{duration:.2,ease:"easeOut"},className:`
|
|
10
|
-
${R?"fixed z-50 shadow-xl rounded-xl":"h-screen flex-shrink-0 relative rounded-l-2xl"}
|
|
11
|
-
${A?"bg-stone-50 dark:bg-stone-900":"bg-stone-100 dark:bg-stone-800 hover:bg-stone-200 dark:hover:bg-stone-700 transition-colors duration-200"}
|
|
12
|
-
${R?"border border-border":"border-l border-border"}
|
|
13
|
-
${A?"":"w-[30px]"}
|
|
14
|
-
`,style:A?R?{width:`${N}px`,height:B?"auto":`${It}px`,left:`${H.x}px`,top:`${H.y}px`}:{width:`${N}px`}:void 0,onClick:A?void 0:aa,children:A?h.jsxs(h.Fragment,{children:[!R&&h.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-1 cursor-col-resize hover:bg-blue-500/40 hover:w-1 transition-all group",onMouseDown:da,children:h.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-3 -translate-x-1"})}),R&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"absolute bottom-0 right-0 w-4 h-4 cursor-nwse-resize",onMouseDown:p=>{p.preventDefault(),St(!0)}}),h.jsx("div",{className:"absolute bottom-0 left-4 right-4 h-3 cursor-move hover:bg-blue-500/20 group",onMouseDown:p=>{p.preventDefault(),p.stopPropagation(),Ke(!0),As({x:p.clientX-H.x,y:p.clientY-H.y})},children:h.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-8 h-1 rounded-full bg-stone-400/30 group-hover:bg-blue-500/40 transition-colors"})}),h.jsx("div",{className:"absolute top-0 right-0 bottom-0 w-1 cursor-ew-resize hover:bg-blue-500/40",onMouseDown:p=>{p.preventDefault(),St(!0)}})]}),h.jsxs("div",{className:"flex flex-col h-full",children:[h.jsxs("div",{className:`flex items-center justify-between p-3 border-b border-border ${R?"cursor-move":""}`,onMouseDown:R?ma:void 0,children:[h.jsx("h2",{className:`text-base font-semibold ${R&&B?"cursor-pointer":""}`,onClick:R&&B?p=>{p.stopPropagation(),Fs()}:void 0,children:i}),h.jsxs("div",{className:"flex items-center gap-1",onClick:p=>p.stopPropagation(),children:[h.jsxs(At,{children:[h.jsx(Mt,{asChild:!0,children:h.jsx(ct,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:ca,"aria-label":"New chat",children:h.jsx(K.Plus,{className:"h-4 w-4"})})}),h.jsx(Vt,{children:"Start a new conversation"})]}),h.jsxs(At,{children:[h.jsx(Mt,{asChild:!0,children:h.jsx(ct,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:R?fa:ha,"aria-label":R?"Dock sidebar":"Float sidebar",children:R?h.jsx(K.Dock,{className:"h-4 w-4"}):h.jsx(K.PictureInPicture2,{className:"h-4 w-4"})})}),h.jsx(Vt,{children:R?"Dock to sidebar":"Undock to floating window"})]}),h.jsxs(At,{children:[h.jsx(Mt,{asChild:!0,children:h.jsx(ct,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:R?Fs:la,"aria-label":R?B?"Maximize":"Minimize":"Close sidebar",children:R?B?h.jsx(K.Maximize2,{className:"h-4 w-4"}):h.jsx(K.Minimize2,{className:"h-4 w-4"}):h.jsx(K.X,{className:"h-4 w-4"})})}),h.jsx(Vt,{children:R?B?"Maximize window":"Minimize to header":"Close the chat"})]})]})]}),!B&&h.jsxs(h.Fragment,{children:[x&&Je.length>0&&h.jsxs("div",{className:`border-b border-border ${Lt?"flex flex-col flex-1":""}`,children:[h.jsxs("div",{className:"flex items-center justify-between px-3 py-1",children:[h.jsx("h3",{className:"text-xs font-semibold text-muted-foreground",children:"Recent chats"}),h.jsx(ct,{variant:"ghost",className:"h-auto px-2 py-1 text-xs text-muted-foreground hover:text-foreground",onClick:()=>{Lt||Is(),we(!Lt)},children:Lt?"Show less":"View all"})]}),h.jsx("div",{className:`px-2 pb-2 space-y-0.5 ${Lt?"flex-1 overflow-y-auto":""}`,children:Je.slice(0,Lt?void 0:3).map(p=>h.jsx("div",{className:"group",children:h.jsxs(ct,{variant:"ghost",className:"w-full justify-between h-auto py-1 px-3 font-normal",onClick:()=>ia(p),children:[h.jsx("span",{className:"text-xs truncate",children:p.title}),h.jsxs("div",{className:"ml-2 flex items-center",children:[h.jsx("span",{className:"text-xs text-muted-foreground group-hover:hidden",children:ea(p.updatedAt)}),h.jsx(ct,{variant:"ghost",size:"icon",className:"h-2 w-2 p-0 hidden group-hover:flex text-muted-foreground hover:text-foreground",onClick:S=>{S.stopPropagation(),sa(p._id)},children:h.jsx(K.X,{className:"h-3 w-3"})})]})]})},p._id))})]}),h.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden relative",children:[h.jsx("div",{className:"flex-1 overflow-y-auto p-4 space-y-4 scroll-smooth",children:Qt.length===0?h.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[r&&h.jsx("div",{className:"mb-6",children:r}),h.jsx("h3",{className:"text-lg font-semibold text-center mb-2",children:"How can I help you?"}),Ct.length>0&&h.jsx("div",{className:"mt-4 px-4 max-w-md mx-auto",children:h.jsxs("div",{className:"flex flex-wrap gap-2 justify-center",children:[(Ze?Ct:Ct.slice(0,10)).map(p=>h.jsxs(At,{children:[h.jsx(Mt,{asChild:!0,children:h.jsx(en,{variant:"secondary",className:"cursor-pointer text-xs px-2 py-1 hover:bg-stone-200 dark:hover:bg-stone-700 transition-colors",onClick:()=>{Ye(p.sampleUsage),ve.current?.focus()},children:p.friendlyName})}),h.jsx(Vt,{children:h.jsxs("div",{className:"max-w-xs",children:[h.jsx("p",{className:"font-medium",children:p.description}),h.jsxs("p",{className:"text-xs text-muted-foreground mt-2",children:[h.jsx("span",{className:"font-medium",children:"Example:"}),' "',p.sampleUsage,'"']}),p.paramCount>0&&h.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[h.jsx("span",{className:"font-medium",children:"Parameters:"})," ",p.params.join(", ")]})]})})]},p.name)),Ct.length>10&&!Ze&&h.jsxs(At,{children:[h.jsx(Mt,{asChild:!0,children:h.jsxs(en,{variant:"secondary",className:"cursor-pointer text-xs px-2 py-1 hover:bg-stone-200 dark:hover:bg-stone-700 transition-colors",onClick:()=>Vs(!0),children:["+",Ct.length-10," more"]})}),h.jsx(Vt,{children:h.jsxs("div",{className:"max-w-xs",children:[h.jsx("p",{className:"font-medium mb-2",children:"Additional tools:"}),h.jsx("div",{className:"space-y-1 max-h-64 overflow-y-auto pr-2",children:Ct.slice(10).map(p=>h.jsxs("div",{children:[h.jsxs("span",{className:"font-medium text-xs",children:[p.friendlyName,":"]}),h.jsx("span",{className:"text-xs text-muted-foreground ml-1",children:p.description})]},p.name))}),h.jsx("p",{className:"text-xs text-muted-foreground mt-2 italic",children:"Click to show all tools"})]})})]}),Ze&&Ct.length>10&&h.jsx(en,{variant:"secondary",className:"cursor-pointer text-xs px-2 py-1 hover:bg-stone-200 dark:hover:bg-stone-700 transition-colors",onClick:()=>Vs(!1),children:"Show less"})]})})]}):h.jsxs(h.Fragment,{children:[Qt.map(p=>{const S=p.parts.filter(C=>C.type==="text");p.parts.filter(C=>C.type==="reasoning");const E=p.parts.filter(C=>C.type?.startsWith("tool-")),k=p.parts.filter(C=>C.type==="text"||C.type==="reasoning"),W=S.map(C=>C.text).join("");return h.jsx("div",{className:`${p.role==="user"?"flex justify-end":"w-full"}`,children:h.jsx("div",{className:`${p.role==="user"?"max-w-[85%] text-right":"w-full"}`,children:p.role==="user"?h.jsx(hh,{initial:{opacity:0,filter:"blur(4px)"},animate:{opacity:1,filter:"blur(0px)"},transition:{duration:.3,ease:"easeOut"},className:"text-sm whitespace-pre-wrap inline-block bg-stone-100 dark:bg-stone-800 px-3 py-2 rounded-xl",children:W}):h.jsxs("div",{className:"space-y-2",children:[E.map((C,Z)=>{const z=C.type?.replace("tool-","")||"",pt=Es.find(it=>it.name===z),gt=C.state==="input-available",tn=C.state==="output-available";if(gt)return Rs.has(z)?((async()=>{if(Ge.has(C.toolCallId))return;qe(ee=>new Set(ee).add(C.toolCallId));const yt=ks.get(z);if(yt)try{console.log("Auto-executing safe tool:",z);const ee=await yt(...Object.values(C.input||{}));te({toolCallId:C.toolCallId,tool:z,output:ee}),console.log("Safe tool result added:",C.toolCallId)}catch(ee){te({toolCallId:C.toolCallId,tool:z,output:`Error: ${ee}`}),console.log("Safe tool error result added:",C.toolCallId)}})(),null):h.jsx(De,{initial:{opacity:0,y:10,filter:"blur(4px)"},animate:{opacity:1,y:0,filter:"blur(0px)"},transition:{duration:.3,ease:"easeOut"},children:h.jsx(yh,{toolName:z,description:pt?.description||"",args:C.input||{},onApprove:async()=>{if(Ge.has(C.toolCallId)){console.log("Tool call already being processed:",C.toolCallId);return}qe(yt=>new Set(yt).add(C.toolCallId));const it=ks.get(z);if(it)try{const yt=await it(...Object.values(C.input||{}));te({toolCallId:C.toolCallId,tool:z,output:yt}),console.log("Tool result added:",C.toolCallId)}catch(yt){te({toolCallId:C.toolCallId,tool:z,output:`Error: ${yt}`}),console.log("Tool error result added:",C.toolCallId)}},onDeny:async()=>{if(Ge.has(C.toolCallId)){console.log("Tool call already being processed:",C.toolCallId);return}qe(it=>new Set(it).add(C.toolCallId)),te({toolCallId:C.toolCallId,tool:z,output:"User denied tool execution"}),console.log("Tool denied:",C.toolCallId)}})},`${C.toolCallId}-${Z}`);if(tn){const it=C.output==="User denied tool execution";return h.jsx(xh,{toolName:z,args:C.input||{},isDenied:it,isSafe:Rs.has(z)},`${C.toolCallId}-${Z}`)}return null}),k.map((C,Z)=>C.type==="text"&&C.text&&Ms?h.jsx(Ms,{className:"text-sm prose prose-sm dark:prose-invert max-w-none",children:C.text},`${p.id}-${Z}`):C.type==="reasoning"&&C.text?h.jsxs(Wr,{className:"w-full",isStreaming:lt==="streaming"&&Z===p.parts.length-1&&p.id===Qt.at(-1)?.id,children:[h.jsx(Kr,{}),h.jsx(Hr,{children:C.text})]},`${p.id}-${Z}`):null)]})})},p.id)}),h.jsx("div",{ref:Xe})]})}),Ls&&h.jsxs("div",{className:"px-4 py-2 bg-destructive/10 text-destructive text-xs",children:["Error: ",Ls.message]}),h.jsxs("div",{className:"p-4 border-t border-border relative overflow-visible",children:[h.jsx(Nc,{mode:"wait",children:(lt==="streaming"||lt==="submitted")&&h.jsxs(De,{initial:{opacity:0,filter:"blur(4px)",y:5},animate:{opacity:1,filter:"blur(0px)",y:0},exit:{opacity:0,filter:"blur(4px)",y:5},transition:{duration:.2,ease:"easeOut"},className:"absolute left-1/2 -translate-x-1/2 -top-6 flex items-center gap-1.5 bg-stone-100 dark:bg-stone-800 px-3 py-1.5 rounded-full shadow-lg border border-border z-50",children:[h.jsx(De,{className:"w-2 h-2 bg-stone-400 dark:bg-stone-600",animate:{rotate:[0,0,90,90],borderRadius:["50%","30%","30%","50%"],scale:[.75,1,1,.75]},transition:{duration:2,repeat:1/0,ease:"easeInOut",times:[0,.4,.6,1]}}),h.jsx("p",{className:"text-xs text-muted-foreground",children:qr})]})}),h.jsxs("form",{onSubmit:Os,className:"relative",children:[h.jsx(ro,{ref:ve,value:be,onChange:ua,placeholder:"Ask anything..",className:"w-full pr-12 resize-none border border-border rounded-xl px-4 py-3",minHeight:24,maxHeight:200,onKeyDown:p=>{p.key==="Enter"&&!p.shiftKey&&(p.preventDefault(),Os(p))}}),lt==="streaming"||lt==="submitted"?h.jsxs(At,{children:[h.jsx(Mt,{asChild:!0,children:h.jsx(ct,{type:"button",size:"icon",variant:"ghost",className:"absolute top-1/2 -translate-y-1/2 right-2 h-8 w-8",onClick:Ce,children:h.jsx(K.Square,{className:"h-4 w-4"})})}),h.jsxs(Vt,{children:[h.jsx(Us,{children:"Escape"})," to stop"]})]}):h.jsxs(At,{children:[h.jsx(Mt,{asChild:!0,children:h.jsx(ct,{type:"submit",size:"icon",variant:"ghost",className:"absolute top-1/2 -translate-y-1/2 right-2 h-8 w-8",disabled:!be.trim(),children:h.jsx(K.ArrowRight,{className:"h-4 w-4"})})}),h.jsxs(Vt,{children:[h.jsx(Us,{children:"Enter"})," to send"]})]})]})]})]}),h.jsxs("a",{href:"https://arcten.com",target:"_blank",rel:"noopener noreferrer",className:"group flex items-center justify-center gap-1.5 py-3 text-xs text-muted-foreground/40 hover:text-muted-foreground/60 transition-all overflow-hidden",children:[h.jsx("span",{className:"max-w-0 opacity-0 group-hover:max-w-[100px] group-hover:opacity-100 transition-all duration-300 whitespace-nowrap",children:"Powered by"}),h.jsx("div",{className:"w-4 h-2 bg-current rounded-t-full flex-shrink-0"}),h.jsx("span",{className:"max-w-0 opacity-0 group-hover:max-w-[100px] group-hover:opacity-100 transition-all duration-300 whitespace-nowrap",children:"Arcten"})]})]})]})]}):h.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 h-full cursor-pointer",children:[h.jsx(K.BotMessageSquare,{className:"h-5 w-5 text-stone-600 dark:text-stone-400"}),h.jsx("span",{className:"text-xs font-medium text-stone-600 dark:text-stone-400 [writing-mode:vertical-lr]",children:"AI agent"})]})})}):h.jsx("div",{className:"fixed right-0 top-0 h-screen w-96 flex items-center justify-center p-4 bg-stone-50 dark:bg-stone-900 border-l border-border",children:h.jsx("div",{className:"p-4 text-muted-foreground text-sm",children:"Loading..."})}):null}exports.verifyToken=Ma.verifyToken;exports.ArctenAgent=Dh;
|