1var Eh=Object.defineProperty;var a=(e,t)=>Eh(e,"name",{value:t,configurable:!0});import{R as M,r as d,B as Ps,j as m,A as tn,I as kr}from"./react-vendor-FBArgJI-.js";import{t as Th}from"./bundle-mjs-5MOacnAK.js";try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c9099aff-e9aa-4e02-9f60-cdcb9973b049",e._sentryDebugIdIdentifier="sentry-dbid-c9099aff-e9aa-4e02-9f60-cdcb9973b049")})()}catch{}var Uo=a(function(e,t){return Uo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},Uo(e,t)},"extendStatics");function ST(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Uo(e,t);function n(){this.constructor=e}a(n,"__"),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}a(ST,"__extends");var Le=a(function(){return Le=Object.assign||a(function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},"__assign"),Le.apply(this,arguments)},"__assign");function Fl(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}a(Fl,"__rest");function PT(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}return a(o,"adopt"),new(n||(n=Promise))(function(s,i){function l(f){try{u(r.next(f))}catch(p){i(p)}}a(l,"fulfilled");function c(f){try{u(r.throw(f))}catch(p){i(p)}}a(c,"rejected");function u(f){f.done?s(f.value):o(f.value).then(l,c)}a(u,"step"),u((r=r.apply(e,t||[])).next())})}a(PT,"__awaiter");function ET(e,t){var n={label:0,sent:a(function(){if(s[0]&1)throw s[1];return s[1]},"sent"),trys:[],ops:[]},r,o,s,i=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function l(u){return function(f){return c([u,f])}}function c(u){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(n=0)),n;)try{if(r=1,o&&(s=u[0]&2?o.return:u[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,u[1])).done)return s;switch(o=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,o=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){n.label=u[1];break}if(u[0]===6&&n.label<s[1]){n.label=s[1],s=u;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(u);break}s[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(f){u=[6,f],o=0}finally{r=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}a(ET,"__generator");function Rh(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}a(Rh,"__spreadArray");var Ah=a(e=>{switch(e){case"success":return Dh;case"info":return Oh;case"warning":return Ih;case"error":return jh;default:return null}},"jt"),Mh=Array(12).fill(0),Nh=a(({visible:e,className:t})=>M.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},M.createElement("div",{className:"sonner-spinner"},Mh.map((n,r)=>M.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),"Yt"),Dh=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},M.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Ih=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
1currentColor",height:"20",width:"20"},M.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Oh=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},M.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),jh=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},M.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),kh=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},M.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),M.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),_h=a(()=>{let[e,t]=M.useState(document.hidden);return M.useEffect(()=>{let n=a(()=>{t(document.hidden)},"t");return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},"Ft"),zo=1,Lh=class{static{a(this,"yt")}constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof e?.id=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:zo++,s=this.toasts.find(l=>l.id===o),i=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),s?this.toasts=this.toasts.map(l=>l.id===o?(this.publish({...l,...e,id:o,title:n}),{...l,...e,id:o,dismissible:i,title:n}):l):this.addToast({title:n,...r,dismissible:i,id:o}),o},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
1this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0,s,i=r.then(async c=>{if(s=["resolve",c],M.isValidElement(c))o=!1,this.create({id:n,type:"default",message:c});else if(Vh(c)&&!c.ok){o=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,f=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:n,type:"error",message:u,description:f})}else if(t.success!==void 0){o=!1;let u=typeof t.success=="function"?await t.success(c):t.success,f=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"success",message:u,description:f})}}).catch(async c=>{if(s=["reject",c],t.error!==void 0){o=!1;let u=typeof t.error=="function"?await t.error(c):t.error,f=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"error",message:u,description:f})}}).finally(()=>{var c;o&&(this.dismiss(n),n=void 0),(c=t.finally)==null||c.call(t)}),l=a(()=>new Promise((c,u)=>i.then(()=>s[0]==="reject"?u(s[1]):c(s[1])).catch(u)),"g");return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(e,t)=>{let n=t?.id||zo++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},ve=new Lh,Fh=a((e,t)=>{let n=t?.id||zo++;return ve.addToast({title:e,...t,id:n}),n},"ne"),Vh=a(e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number","ie"),$h=Fh,Bh=a(()=>ve.toasts,"ce"),Hh=a(()=>ve.getActiveToasts(),"de"),TT=Object.assign($h,{success:ve.success,info:ve.info,warning:ve.warning,error:ve.error,custom:ve.custom,message:ve.message,promise:ve.promise,dismiss:ve.dismiss,loading:ve.loading},{getHistory:Bh,getToasts:Hh});function Wh(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}a(Wh,"wt");Wh(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
1left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
1:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
1--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} 2`);function Zn(e){return e.label!==void 0}a(Zn,"tt");var Uh=3,zh="32px",Kh="16px",Ki=4e3,Gh=356,Yh=14,Xh=20,qh=200;function De(...e){return e.filter(Boolean).join(" ")}a(De,"M");function Zh(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}a(Zh,"xe");var Qh=a(e=>{var t,n,r,o,s,i,l,c,u,f,p;let{invert:g,toast:h,unstyled:y,interacting:v,setHeights:b,visibleToasts:C,heights:w,index:x,toasts:S,expanded:P,removeToast:R,defaultRichColors:E,closeButton:T,style:O,cancelButtonStyle:I,actionButtonStyle:L,className:V="",descriptionClassName:W="",duration:H,position:F,gap:j,loadingIcon:k,expandByDefault:$,classNames:A,icons:J,closeButtonAriaLabel:ae="Close toast",pauseWhenPageIsHidden:z}=e,[G,K]=M.useState(null),[ne,le]=M.useState(null),[N,q]=M.useState(!1),[se,Z]=M.useState(!1),[Q,re]=M.useState(!1),[ue,We]=M.useState(!1),[fn,_t]=M.use
2State(!1),[pn,fo]=M.useState(0),[mh,$i]=M.useState(0),hn=M.useRef(h.duration||H||Ki),Bi=M.useRef(null),wt=M.useRef(null),gh=x===0,vh=x+1<=C,Se=h.type,Lt=h.dismissible!==!1,yh=h.className||"",bh=h.descriptionClassName||"",qn=M.useMemo(()=>w.findIndex(U=>U.toastId===h.id)||0,[w,h.id]),xh=M.useMemo(()=>{var U;return(U=h.closeButton)!=null?U:T},[h.closeButton,T]),Hi=M.useMemo(()=>h.duration||H||Ki,[h.duration,H]),po=M.useRef(0),Ft=M.useRef(0),Wi=M.useRef(0),Vt=M.useRef(null),[wh,Ch]=F.split("-"),Ui=M.useMemo(()=>w.reduce((U,te,oe)=>oe>=qn?U:U+te.height,0),[w,qn]),zi=_h(),Sh=h.invert||g,ho=Se==="loading";Ft.current=M.useMemo(()=>qn*j+Ui,[qn,Ui]),M.useEffect(()=>{hn.current=Hi},[Hi]),M.useEffect(()=>{q(!0)},[]),M.useEffect(()=>{let U=wt.current;if(U){let te=U.getBoundingClientRect().height;return $i(te),b(oe=>[{toastId:h.id,height:te,position:h.position},...oe]),()=>b(oe=>oe.filter(Ae=>Ae.toastId!==h.id))}},[b,h.id]),M.useLayoutEffect(()=>{if(!N)return;let U=wt.current,te=U.style.height;U.style.height="auto";let oe=U.getBoundingClientRect().height;U.style.height=te,$i(oe),b(Ae=>Ae.find(Me=>Me.toastId===h.id)?Ae.map(Me=>Me.toastId===h.id?{...Me,height:oe}:Me):[{toastId:h.id,height:oe,position:h.position},...Ae])},[N,h.title,h.description,b,h.id]);let et=M.useCallback(()=>{Z(!0),fo(Ft.current),b(U=>U.filter(te=>te.toastId!==h.id)),setTimeout(()=>{R(h)},qh)},[h,R,b,Ft]);M.useEffect(()=>{if(h.promise&&Se==="loading"||h.duration===1/0||h.type==="loading")return;let U;return P||v||z&&zi?(()=>{if(Wi.current<po.current){let te=new Date().getTime()-po.current;hn.current=hn.current-te}Wi.current=new Date().getTime()})():hn.current!==1/0&&(po.current=new Date().getTime(),U=setTimeout(()=>{var te;(te=h.onAutoClose)==null||te.call(h,h),et()},hn.current)),()=>clearTimeout(U)},[P,v,h,Se,z,zi,et]),M.useEffect(()=>{h.delete&&et()},[et,h.delete]);function Ph(){var U,te,oe;return J!=null&&J.loading?M.createElement("div",{className:De(A?.loader,(U=h?.classNames)==null?void 0:U.loader,"sonner-loader"),"data-visible":Se==="loading"},J.loading):k?M.createElement("div",{className:De(A?.loader,(te=h?.classNames)==null?void 0:te.loader,"sonner-loader"),"data-visible":Se==="loading"},k):M.createElement(Nh,{className:De(A?.loader,(oe=h?.classNames)==null?void 0:oe.loader),visible:Se==="loading"})}return a(Ph,"Zt"),M.createElement("li",{tabIndex:0,ref:wt,className:De(V,yh,A?.toast,(t=h?.classNames)==null?void 0:t.toast,A?.default,A?.[Se],(n=h?.classNames)==null?void 0:n[Se]),"data-sonner-toast":"","data-rich-colors":(r=h.richColors)!=null?r:E,"data-styled":!(h.jsx||h.unstyled||y),"data-mounted":N,"data-promise":!!h.promise,"data-swiped":fn,"data-removed":se,"data-visible":vh,"data-y-position":wh,"data-x-position":Ch,"data-index":x,"data-front":gh,"data-swiping":Q,"data-dismissible":Lt,"data-type":Se,"data-invert":Sh,"data-swipe-out":ue,"data-swipe-direction":ne,"data-expanded":!!(P||$&&N),style:{"--index":x,"--toasts-before":x,"--z-index":S.length-x,"--offset":`${se?pn:Ft.current}px`,"--initial-height":$?"auto":`${mh}px`,...O,...h.style},onDragEnd:a(()=>{re(!1),K(null),Vt.current=null},"onDragEnd"),onPointerDown:a(U=>{ho||!Lt||(Bi.current=new Date,fo(Ft.current),U.target.setPointerCapture(U.pointerId),U.target.tagName!=="BUTTON"&&(re(!0),Vt.current={x:U.clientX,y:U.clientY}))},"onPointerDown"),onPointerUp:a(()=>{var U,te,oe,Ae;if(ue||!Lt)return;Vt.current=null;let Me=Number(((U=wt.current)==null?void 0:U.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),tt=Number(((te=wt.current)==null?void 0:te.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ct=new Date().getTime()-((oe=Bi.current)==null?void 0:oe.getTime()),Ne=G==="x"?Me:tt,nt=Math.abs(Ne)/Ct;if(Math.abs(Ne)>=Xh||nt>.11){fo(Ft.current),(Ae=h.onDismiss)==null||Ae.call(h,h),le(G==="x"?Me>0?"right":"left":tt>0?"down":"up"),et(),We(!0),_t(!1);return}re(!1),K(null)},"onPointerUp"),onPointerMove:a(U=>{var te,oe,Ae,Me;if(!Vt.current||!Lt||((te=window.getSelection())==null?void 0:te.toString().length)>0)return;let tt=U.clientY-Vt.current.y,Ct=U.clientX-Vt.current.x,Ne=(oe=e.swipeDirections)!=null?oe:Zh(F
2);!G&&(Math.abs(Ct)>1||Math.abs(tt)>1)&&K(Math.abs(Ct)>Math.abs(tt)?"x":"y");let nt={x:0,y:0};G==="y"?(Ne.includes("top")||Ne.includes("bottom"))&&(Ne.includes("top")&&tt<0||Ne.includes("bottom")&&tt>0)&&(nt.y=tt):G==="x"&&(Ne.includes("left")||Ne.includes("right"))&&(Ne.includes("left")&&Ct<0||Ne.includes("right")&&Ct>0)&&(nt.x=Ct),(Math.abs(nt.x)>0||Math.abs(nt.y)>0)&&_t(!0),(Ae=wt.current)==null||Ae.style.setProperty("--swipe-amount-x",`${nt.x}px`),(Me=wt.current)==null||Me.style.setProperty("--swipe-amount-y",`${nt.y}px`)},"onPointerMove")},xh&&!h.jsx?M.createElement("button",{"aria-label":ae,"data-disabled":ho,"data-close-button":!0,onClick:ho||!Lt?()=>{}:()=>{var U;et(),(U=h.onDismiss)==null||U.call(h,h)},className:De(A?.closeButton,(o=h?.classNames)==null?void 0:o.closeButton)},(s=J?.close)!=null?s:kh):null,h.jsx||d.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:M.createElement(M.Fragment,null,Se||h.icon||h.promise?M.createElement("div",{"data-icon":"",className:De(A?.icon,(i=h?.classNames)==null?void 0:i.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||Ph():null,h.type!=="loading"?h.icon||J?.[Se]||Ah(Se):null):null,M.createElement("div",{"data-content":"",className:De(A?.content,(l=h?.classNames)==null?void 0:l.content)},M.createElement("div",{"data-title":"",className:De(A?.title,(c=h?.classNames)==null?void 0:c.title)},typeof h.title=="function"?h.title():h.title),h.description?M.createElement("div",{"data-description":"",className:De(W,bh,A?.description,(u=h?.classNames)==null?void 0:u.description)},typeof h.description=="function"?h.description():h.description):null),d.isValidElement(h.cancel)?h.cancel:h.cancel&&Zn(h.cancel)?M.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||I,onClick:a(U=>{var te,oe;Zn(h.cancel)&&Lt&&((oe=(te=h.cancel).onClick)==null||oe.call(te,U),et())},"onClick"),className:De(A?.cancelButton,(f=h?.classNames)==null?void 0:f.cancelButton)},h.cancel.label):null,d.isValidElement(h.action)?h.action:h.action&&Zn(h.action)?M.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||L,onClick:a(U=>{var te,oe;Zn(h.action)&&((oe=(te=h.action).onClick)==null||oe.call(te,U),!U.defaultPrevented&&et())},"onClick"),className:De(A?.actionButton,(p=h?.classNames)==null?void 0:p.actionButton)},h.action.label):null))},"ve");function Gi(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}a(Gi,"_t");function Jh(e,t){let n={};return[e,t].forEach((r,o)=>{let s=o===1,i=s?"--mobile-offset":"--offset",l=s?Kh:zh;function c(u){["top","right","bottom","left"].forEach(f=>{n[`${i}-${f}`]=typeof u=="number"?`${u}px`:u})}a(c,"g"),typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${i}-${u}`]=l:n[`${i}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(l)}),n}a(Jh,"Te");var RT=d.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:s,closeButton:i,className:l,offset:c,mobileOffset:u,theme:f="light",richColors:p,duration:g,style:h,visibleToasts:y=Uh,toastOptions:v,dir:b=Gi(),gap:C=Yh,loadingIcon:w,icons:x,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:P}=e,[R,E]=M.useState([]),T=M.useMemo(()=>Array.from(new Set([r].concat(R.filter(z=>z.position).map(z=>z.position)))),[R,r]),[O,I]=M.useState([]),[L,V]=M.useState(!1),[W,H]=M.useState(!1),[F,j]=M.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),k=M.useRef(null),$=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),A=M.useRef(null),J=M.useRef(!1),ae=M.useCallback(z=>{E(G=>{var K;return(K=G.find(ne=>ne.id===z.id))!=null&&K.delete||ve.dismiss(z.id),G.filter(({id:ne})=>ne!==z.id)})},[]);return M.useEffect(()=>ve.subscribe(z=>{if(z.dismiss){E(G=>G.map(K=>K.id===z.id?{...K,delete:!0}:K));return}setTimeout(()=>{Ps.flushSync(()=>{E(G=>{let K=G.findIndex(ne=>ne.id===z.id);return K!==-1?[...G.slice(0,K),{...G[K],...z},...G.slice(K+1)]:[z,...G]})})})}),[]),M.useEffect(()=>{if(f!=="system"){j(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?j("dark"):j("light")),typeof window>"u")return;let z=window.matchMedia("(prefers-color-scheme: dark)");try{z.addEventListener("change",({matches:G})=>{j(G?"dark":"light")})}catch{z.addListener(({matches:K})=>{try{j(K?"dark":"light")}catch(ne){console.error(ne)}})}},[f]),M.useEffect(()=>{R.length<=1&&V(!1)},[R]),M.useEffect(()=>{let z=a(G=>{var K,ne;o.every(le=>G[le]||G.code===le)&&(V(!0),(K=k.current)==null||K.focus()),G.code==="Escape"&&(document.activeElement===k.current||(ne=k.
2current)!=null&&ne.contains(document.activeElement))&&V(!1)},"d");return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[o]),M.useEffect(()=>{if(k.current)return()=>{A.current&&(A.current.focus({preventScroll:!0}),A.current=null,J.current=!1)}},[k.current]),M.createElement("section",{ref:t,"aria-label":`${S} ${$}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},T.map((z,G)=>{var K;let[ne,le]=z.split("-");return R.length?M.createElement("ol",{key:z,dir:b==="auto"?Gi():b,tabIndex:-1,ref:k,className:l,"data-sonner-toaster":!0,"data-theme":F,"data-y-position":ne,"data-lifted":L&&R.length>1&&!s,"data-x-position":le,style:{"--front-toast-height":`${((K=O[0])==null?void 0:K.height)||0}px`,"--width":`${Gh}px`,"--gap":`${C}px`,...h,...Jh(c,u)},onBlur:a(N=>{J.current&&!N.currentTarget.contains(N.relatedTarget)&&(J.current=!1,A.current&&(A.current.focus({preventScroll:!0}),A.current=null))},"onBlur"),onFocus:a(N=>{N.target instanceof HTMLElement&&N.target.dataset.dismissible==="false"||J.current||(J.current=!0,A.current=N.relatedTarget)},"onFocus"),onMouseEnter:a(()=>V(!0),"onMouseEnter"),onMouseMove:a(()=>V(!0),"onMouseMove"),onMouseLeave:a(()=>{W||V(!1)},"onMouseLeave"),onDragEnd:a(()=>V(!1),"onDragEnd"),onPointerDown:a(N=>{N.target instanceof HTMLElement&&N.target.dataset.dismissible==="false"||H(!0)},"onPointerDown"),onPointerUp:a(()=>H(!1),"onPointerUp")},R.filter(N=>!N.position&&G===0||N.position===z).map((N,q)=>{var se,Z;return M.createElement(Qh,{key:N.id,icons:x,index:q,toast:N,defaultRichColors:p,duration:(se=v?.duration)!=null?se:g,className:v?.className,descriptionClassName:v?.descriptionClassName,invert:n,visibleToasts:y,closeButton:(Z=v?.closeButton)!=null?Z:i,interacting:W,position:z,style:v?.style,unstyled:v?.unstyled,classNames:v?.classNames,cancelButtonStyle:v?.cancelButtonStyle,actionButtonStyle:v?.actionButtonStyle,removeToast:ae,toasts:R.filter(Q=>Q.position==N.position),heights:O.filter(Q=>Q.position==N.position),setHeights:I,expandByDefault:s,gap:C,loadingIcon:w,expanded:L,pauseWhenPageIsHidden:P,swipeDirections:e.swipeDirections})})):null}))});function D(...e){let t="";for(const n of e)t=Vl(t,em(n));return Th(t)}a(D,"classNames");function em(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e!="object")return"";if(Array.isArray(e))return D(...e);let t="";for(const n in e)e[n]&&(t=Vl(t,n));return t}a(em,"parseValue");function Vl(e,t){return t?e?e+" "+t:e+t:e}a(Vl,"appendClass");function Yi(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}a(Yi,"setRef$2");function nn(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Yi(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Yi(e[o],null)}}}}a(nn,"composeRefs$2");function X(...e){return d.useCallback(nn(...e),e)}a(X,"useComposedRefs$2");function ct(e){const t=nm(e),n=d.forwardRef((r,o)=>{const{children:s,...i}=r,l=d.Children.toArray(s),c=l.find(om);if(c){const u=c.props.children,f=l.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return m.jsx(t,{...i,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return m.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}a(ct,"createSlot$2");var tm=ct("Slot");function nm(e){const t=d.forwardRef((n,r)=>{const{children:o,...s}=n;if(d.isValidElement(o)){const i=im(o),l=sm(s,o.props);return o.type!==d.Fragment&&(l.ref=r?nn(r,i):i),d.cloneElement(o,l)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}a(nm,"createSlotClone$2");var rm=Symbol("radix.slottable");function om(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rm}a(om,"isSlottable$4");function sm(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...l)=>{const c=s(...l);return o(...l),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}
2:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}a(sm,"mergeProps$4");function im(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}a(im,"getElementRef$8");function $l(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=$l(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}a($l,"r");function am(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=$l(e))&&(r&&(r+=" "),r+=t);return r}a(am,"clsx");const Xi=a(e=>typeof e=="boolean"?`${e}`:e===0?"0":e,"falsyToString"),qi=am,_r=a((e,t)=>n=>{var r;if(t?.variants==null)return qi(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(u=>{const f=n?.[u],p=s?.[u];if(f===null)return null;const g=Xi(f)||Xi(p);return o[u][g]}),l=n&&Object.entries(n).reduce((u,f)=>{let[p,g]=f;return g===void 0||(u[p]=g),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:p,className:g,...h}=f;return Object.entries(h).every(y=>{let[v,b]=y;return Array.isArray(b)?b.includes({...s,...l}[v]):{...s,...l}[v]===b})?[...u,p,g]:u},[]);return qi(e,i,c,n?.class,n?.className)},"cva");function _e(e,t,{checkForDefaultPrevented:n=!0}={}){return a(function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)},"handleEvent")}a(_e,"composeEventHandlers$3");function lm(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}a(lm,"setRef$1");function Bl(...e){return t=>e.forEach(n=>lm(n,t))}a(Bl,"composeRefs$1");function mt(...e){return d.useCallback(Bl(...e),e)}a(mt,"useComposedRefs$1");function Es(e,t=[]){let n=[];function r(s,i){const l=d.createContext(i),c=n.length;n=[...n,i];function u(p){const{scope:g,children:h,...y}=p,v=g?.[e][c]||l,b=d.useMemo(()=>y,Object.values(y));return m.jsx(v.Provider,{value:b,children:h})}a(u,"Provider");function f(p,g){const h=g?.[e][c]||l,y=d.useContext(h);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${s}\``)}return a(f,"useContext2"),u.displayName=s+"Provider",[u,f]}a(r,"createContext3");const o=a(()=>{const s=n.map(i=>d.createContext(i));return a(function(l){const c=l?.[e]||s;return d.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])},"useScope")},"createScope");return o.scopeName=e,[r,cm(o,...t)]}a(Es,"createContextScope$2");function cm(...e){const t=e[0];if(e.length===1)return t;const n=a(()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return a(function(s){const i=r.reduce((l,{useScope:c,scopeName:u})=>{const p=c(s)[`__scope${u}`];return{...l,...p}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}a(cm,"composeContextScopes$2");var Hl=d.forwardRef((e,t)=>{const{children:n,...r}=e,o=d.Children.toArray(n),s=o.find(um);if(s){const i=s.props.children,l=o.map(c=>c===s?d.Children.count(i)>1?d.Children.only(null):d.isValidElement(i)?i.props.children:null:c);return m.jsx(Ko,{...r,ref:t,children:d.isValidElement(i)?d.cloneElement(i,void 0,l):null})}return m.jsx(Ko,{...r,ref:t,children:n})});Hl.displayName="Slot";var Ko=d.forwardRef((e,t)=>{const{children:n,...r}=e;if(d.isValidElement(n)){const o=fm(n);return d.cloneElement(n,{...dm(r,n.props),ref:t?Bl(t,o):o})}return d.Children.count(n)>1?d.Children.only(null):null});Ko.displayName="SlotClone";var Wl=a(({children:e})=>m.jsx(m.Fragment,{children:e}),"Slottable$1");function um(e){return d.isValidElement(e)&&e.type===Wl}a(um,"isSlottable$3");function dm(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...l)=>{s(...l),o(...l)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}a(dm,"mergeProps$3");function fm(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}a(fm,"getElementRef$7");var pm=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Be=pm.reduce((e,t)=>
2{const n=d.forwardRef((r,o)=>{const{asChild:s,...i}=r,l=s?Hl:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function hm(e,t){e&&tn.flushSync(()=>e.dispatchEvent(t))}a(hm,"dispatchDiscreteCustomEvent$1");function rn(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...n)=>t.current?.(...n),[])}a(rn,"useCallbackRef$2");function mm(e,t=globalThis?.document){const n=rn(e);d.useEffect(()=>{const r=a(o=>{o.key==="Escape"&&n(o)},"handleKeyDown");return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}a(mm,"useEscapeKeydown$1");var gm="DismissableLayer",Go="dismissableLayer.update",vm="dismissableLayer.pointerDownOutside",ym="dismissableLayer.focusOutside",Zi,Ul=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),zl=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:l,...c}=e,u=d.useContext(Ul),[f,p]=d.useState(null),g=f?.ownerDocument??globalThis?.document,[,h]=d.useState({}),y=mt(t,E=>p(E)),v=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),C=v.indexOf(b),w=f?v.indexOf(f):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=w>=C,P=wm(E=>{const T=E.target,O=[...u.branches].some(I=>I.contains(T));!S||O||(o?.(E),i?.(E),E.defaultPrevented||l?.())},g),R=Cm(E=>{const T=E.target;[...u.branches].some(I=>I.contains(T))||(s?.(E),i?.(E),E.defaultPrevented||l?.())},g);return mm(E=>{w===u.layers.size-1&&(r?.(E),!E.defaultPrevented&&l&&(E.preventDefault(),l()))},g),d.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Zi=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Qi(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=Zi)}},[f,g,n,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Qi())},[f,u]),d.useEffect(()=>{const E=a(()=>h({}),"handleUpdate");return document.addEventListener(Go,E),()=>document.removeEventListener(Go,E)},[]),m.jsx(Be.div,{...c,ref:y,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:_e(e.onFocusCapture,R.onFocusCapture),onBlurCapture:_e(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:_e(e.onPointerDownCapture,P.onPointerDownCapture)})});zl.displayName=gm;var bm="DismissableLayerBranch",xm=d.forwardRef((e,t)=>{const n=d.useContext(Ul),r=d.useRef(null),o=mt(t,r);return d.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),m.jsx(Be.div,{...e,ref:o})});xm.displayName=bm;function wm(e,t=globalThis?.document){const n=rn(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const s=a(l=>{if(l.target&&!r.current){let c=a(function(){Kl(vm,n,u,{discrete:!0})},"handleAndDispatchPointerDownOutsideEvent2");const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},"handlePointerDown"),i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:a(()=>r.current=!0,"onPointerDownCapture")}}a(wm,"usePointerDownOutside$1");function Cm(e,t=globalThis?.document){const n=rn(e),r=d.useRef(!1);return d.useEffect(()=>{const o=a(s=>{s.target&&!r.current&&Kl(ym,n,{originalEvent:s},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:a(()=>r.current=!0,"onFocusCapture"),onBlurCapture:a(()=>r.current=!1,"onBlurCapture")}}a(Cm,"useFocusOutside$1");function Qi(){const e=new CustomEvent(Go);document.dispatchEvent(e)}a(Qi,"dispatchUpdate$1");function Kl(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?hm(o,s):o.dispatchEvent(s)}a(Kl,"handleAndDispatchCustomEvent$1");var Xe=globalThis?.document?d.useLayoutEffect:()=>{},Sm=kr.useId||(()=>{}),Pm=0;
2function Em(e){const[t,n]=d.useState(Sm());return Xe(()=>{n(r=>r??String(Pm++))},[e]),t?`radix-${t}`:""}a(Em,"useId$1");const Tm=["top","right","bottom","left"],Fe=Math.min,be=Math.max,gr=Math.round,Qn=Math.floor,ut=a(e=>({x:e,y:e}),"createCoords"),Rm={left:"right",right:"left",bottom:"top",top:"bottom"},Am={start:"end",end:"start"};function Yo(e,t,n){return be(e,Fe(t,n))}a(Yo,"clamp$2");function qe(e,t){return typeof e=="function"?e(t):e}a(qe,"evaluate");function Ze(e){return e.split("-")[0]}a(Ze,"getSide");function on(e){return e.split("-")[1]}a(on,"getAlignment");function Ts(e){return e==="x"?"y":"x"}a(Ts,"getOppositeAxis");function Rs(e){return e==="y"?"height":"width"}a(Rs,"getAxisLength");function dt(e){return["top","bottom"].includes(Ze(e))?"y":"x"}a(dt,"getSideAxis");function As(e){return Ts(dt(e))}a(As,"getAlignmentAxis");function Mm(e,t,n){n===void 0&&(n=!1);const r=on(e),o=As(e),s=Rs(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=vr(i)),[i,vr(i)]}a(Mm,"getAlignmentSides");function Nm(e){const t=vr(e);return[Xo(e),t,Xo(t)]}a(Nm,"getExpandedPlacements");function Xo(e){return e.replace(/start|end/g,t=>Am[t])}a(Xo,"getOppositeAlignmentPlacement");function Dm(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}a(Dm,"getSideList");function Im(e,t,n,r){const o=on(e);let s=Dm(Ze(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Xo)))),s}a(Im,"getOppositeAxisPlacements");function vr(e){return e.replace(/left|right|bottom|top/g,t=>Rm[t])}a(vr,"getOppositePlacement");function Om(e){return{top:0,right:0,bottom:0,left:0,...e}}a(Om,"expandPaddingObject");function Gl(e){return typeof e!="number"?Om(e):{top:e,right:e,bottom:e,left:e}}a(Gl,"getPaddingObject");function yr(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}a(yr,"rectToClientRect");function Ji(e,t,n){let{reference:r,floating:o}=e;const s=dt(t),i=As(t),l=Rs(i),c=Ze(t),u=s==="y",f=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,g=r[l]/2-o[l]/2;let h;switch(c){case"top":h={x:f,y:r.y-o.height};break;case"bottom":h={x:f,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:p};break;case"left":h={x:r.x-o.width,y:p};break;default:h={x:r.x,y:r.y}}switch(on(t)){case"start":h[i]-=g*(n&&u?-1:1);break;case"end":h[i]+=g*(n&&u?-1:1);break}return h}a(Ji,"computeCoordsFromPlacement");const jm=a(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,l=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=Ji(u,r,c),g=r,h={},y=0;for(let v=0;v<l.length;v++){const{name:b,fn:C}=l[v],{x:w,y:x,data:S,reset:P}=await C({x:f,y:p,initialPlacement:r,placement:g,strategy:o,middlewareData:h,rects:u,platform:i,elements:{reference:e,floating:t}});f=w??f,p=x??p,h={...h,[b]:{...h[b],...S}},P&&y<=50&&(y++,typeof P=="object"&&(P.placement&&(g=P.placement),P.rects&&(u=P.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):P.rects),{x:f,y:p}=Ji(u,g,c)),v=-1)}return{x:f,y:p,placement:g,strategy:o,middlewareData:h}},"computePosition$1");async function Sn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:g=!1,padding:h=0}=qe(t,e),y=Gl(h),b=l[g?p==="floating"?"reference":"floating":p],C=yr(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(b)))==null||n?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:u,rootBoundary:f,strategy:c})),w=p==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),S=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x
2))||{x:1,y:1}:{x:1,y:1},P=yr(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:x,strategy:c}):w);return{top:(C.top-P.top+y.top)/S.y,bottom:(P.bottom-C.bottom+y.bottom)/S.y,left:(C.left-P.left+y.left)/S.x,right:(P.right-C.right+y.right)/S.x}}a(Sn,"detectOverflow");const km=a(e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:l,middlewareData:c}=t,{element:u,padding:f=0}=qe(e,t)||{};if(u==null)return{};const p=Gl(f),g={x:n,y:r},h=As(o),y=Rs(h),v=await i.getDimensions(u),b=h==="y",C=b?"top":"left",w=b?"bottom":"right",x=b?"clientHeight":"clientWidth",S=s.reference[y]+s.reference[h]-g[h]-s.floating[y],P=g[h]-s.reference[h],R=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let E=R?R[x]:0;(!E||!await(i.isElement==null?void 0:i.isElement(R)))&&(E=l.floating[x]||s.floating[y]);const T=S/2-P/2,O=E/2-v[y]/2-1,I=Fe(p[C],O),L=Fe(p[w],O),V=I,W=E-v[y]-L,H=E/2-v[y]/2+T,F=Yo(V,H,W),j=!c.arrow&&on(o)!=null&&H!==F&&s.reference[y]/2-(H<V?I:L)-v[y]/2<0,k=j?H<V?H-V:H-W:0;return{[h]:g[h]+k,data:{[h]:F,centerOffset:H-F-k,...j&&{alignmentOffset:k}},reset:j}}}),"arrow$3"),_m=a(function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:v=!0,...b}=qe(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const C=Ze(o),w=dt(l),x=Ze(l)===l,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),P=g||(x||!v?[vr(l)]:Nm(l)),R=y!=="none";!g&&R&&P.push(...Im(l,v,y,S));const E=[l,...P],T=await Sn(t,b),O=[];let I=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&O.push(T[C]),p){const H=Mm(o,i,S);O.push(T[H[0]],T[H[1]])}if(I=[...I,{placement:o,overflows:O}],!O.every(H=>H<=0)){var L,V;const H=(((L=s.flip)==null?void 0:L.index)||0)+1,F=E[H];if(F)return{data:{index:H,overflows:I},reset:{placement:F}};let j=(V=I.filter(k=>k.overflows[0]<=0).sort((k,$)=>k.overflows[1]-$.overflows[1])[0])==null?void 0:V.placement;if(!j)switch(h){case"bestFit":{var W;const k=(W=I.filter($=>{if(R){const A=dt($.placement);return A===w||A==="y"}return!0}).map($=>[$.placement,$.overflows.filter(A=>A>0).reduce((A,J)=>A+J,0)]).sort(($,A)=>$[1]-A[1])[0])==null?void 0:W[0];k&&(j=k);break}case"initialPlacement":j=l;break}if(o!==j)return{reset:{placement:j}}}return{}}}},"flip$2");function ea(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}a(ea,"getSideOffsets");function ta(e){return Tm.some(t=>e[t]>=0)}a(ta,"isAnySideFullyClipped");const Lm=a(function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=qe(e,t);switch(r){case"referenceHidden":{const s=await Sn(t,{...o,elementContext:"reference"}),i=ea(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:ta(i)}}}case"escaped":{const s=await Sn(t,{...o,altBoundary:!0}),i=ea(s,n.floating);return{data:{escapedOffsets:i,escaped:ta(i)}}}default:return{}}}}},"hide$2");async function Fm(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Ze(n),l=on(n),c=dt(n)==="y",u=["left","top"].includes(i)?-1:1,f=s&&c?-1:1,p=qe(t,e);let{mainAxis:g,crossAxis:h,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return l&&typeof y=="number"&&(h=l==="end"?y*-1:y),c?{x:h*f,y:g*u}:{x:g*u,y:h*f}}a(Fm,"convertValueToCoords");const Vm=a(function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:l}=t,c=await Fm(t,e);return i===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}},"offset$2"),$m=a(function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:l={fn:a(b=>{let{x:C,y:w}=b;return{x:C,y:w}},"fn")},...c}=qe(e,t),u={x:n,y:r}
2,f=await Sn(t,c),p=dt(Ze(o)),g=Ts(p);let h=u[g],y=u[p];if(s){const b=g==="y"?"top":"left",C=g==="y"?"bottom":"right",w=h+f[b],x=h-f[C];h=Yo(w,h,x)}if(i){const b=p==="y"?"top":"left",C=p==="y"?"bottom":"right",w=y+f[b],x=y-f[C];y=Yo(w,y,x)}const v=l.fn({...t,[g]:h,[p]:y});return{...v,data:{x:v.x-n,y:v.y-r}}}}},"shift$2"),Bm=a(function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=qe(e,t),f={x:n,y:r},p=dt(o),g=Ts(p);let h=f[g],y=f[p];const v=qe(l,t),b=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const x=g==="y"?"height":"width",S=s.reference[g]-s.floating[x]+b.mainAxis,P=s.reference[g]+s.reference[x]-b.mainAxis;h<S?h=S:h>P&&(h=P)}if(u){var C,w;const x=g==="y"?"width":"height",S=["top","left"].includes(Ze(o)),P=s.reference[p]-s.floating[x]+(S&&((C=i.offset)==null?void 0:C[p])||0)+(S?0:b.crossAxis),R=s.reference[p]+s.reference[x]+(S?0:((w=i.offset)==null?void 0:w[p])||0)-(S?b.crossAxis:0);y<P?y=P:y>R&&(y=R)}return{[g]:h,[p]:y}}}},"limitShift$2"),Hm=a(function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:s}=t,{apply:i=a(()=>{},"apply"),...l}=qe(e,t),c=await Sn(t,l),u=Ze(n),f=on(n),p=dt(n)==="y",{width:g,height:h}=r.floating;let y,v;u==="top"||u==="bottom"?(y=u,v=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(v=u,y=f==="end"?"top":"bottom");const b=h-c.top-c.bottom,C=g-c.left-c.right,w=Fe(h-c[y],b),x=Fe(g-c[v],C),S=!t.middlewareData.shift;let P=w,R=x;if(p?R=f||S?Fe(x,C):C:P=f||S?Fe(w,b):b,S&&!f){const T=be(c.left,0),O=be(c.right,0),I=be(c.top,0),L=be(c.bottom,0);p?R=g-2*(T!==0||O!==0?T+O:be(c.left,c.right)):P=h-2*(I!==0||L!==0?I+L:be(c.top,c.bottom))}await i({...t,availableWidth:R,availableHeight:P});const E=await o.getDimensions(s.floating);return g!==E.width||h!==E.height?{reset:{rects:!0}}:{}}}},"size$2");function sn(e){return Yl(e)?(e.nodeName||"").toLowerCase():"#document"}a(sn,"getNodeName");function xe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}a(xe,"getWindow");function Je(e){var t;return(t=(Yl(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}a(Je,"getDocumentElement");function Yl(e){return e instanceof Node||e instanceof xe(e).Node}a(Yl,"isNode");function Oe(e){return e instanceof Element||e instanceof xe(e).Element}a(Oe,"isElement");function $e(e){return e instanceof HTMLElement||e instanceof xe(e).HTMLElement}a($e,"isHTMLElement");function na(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof xe(e).ShadowRoot}a(na,"isShadowRoot");function In(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=je(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}a(In,"isOverflowElement");function Wm(e){return["table","td","th"].includes(sn(e))}a(Wm,"isTableElement");function Lr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}a(Lr,"isTopLayer");function Ms(e){const t=Ns(),n=Oe(e)?je(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}a(Ms,"isContainingBlock");function Um(e){let t=ft(e);for(;$e(t)&&!Xt(t);){if(Ms(t))return t;if(Lr(t))return null;t=ft(t)}return null}a(Um,"getContainingBlock");function Ns(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}a(Ns,"isWebKit");function Xt(e){return["html","body","#document"].includes(sn(e))}a(Xt,"isLastTraversableNode");function je(e){return xe(e).getComputedStyle(e)}a(je,"getComputedStyle$2");function Fr(e){return Oe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}a(Fr,"getNodeScroll");function ft(e){if(sn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||na(e)&&e.host||Je(e);return na(t)?t.host:t}a(ft,"getParentNode");function Xl(e){const t=ft(e);return Xt(t)?e.ownerDocument?e.ownerDocument.body:e.body:$e(t)&&In(t)?t:Xl(t)}a(Xl,"getNearestOverflowAncestor");function Pn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Xl(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=xe(o);if(s){const l=qo(i);
2return t.concat(i,i.visualViewport||[],In(o)?o:[],l&&n?Pn(l):[])}return t.concat(o,Pn(o,[],n))}a(Pn,"getOverflowAncestors");function qo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}a(qo,"getFrameElement");function ql(e){const t=je(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=$e(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,l=gr(n)!==s||gr(r)!==i;return l&&(n=s,r=i),{width:n,height:r,$:l}}a(ql,"getCssDimensions");function Ds(e){return Oe(e)?e:e.contextElement}a(Ds,"unwrapElement");function Gt(e){const t=Ds(e);if(!$e(t))return ut(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=ql(t);let i=(s?gr(n.width):n.width)/r,l=(s?gr(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}a(Gt,"getScale");const zm=ut(0);function Zl(e){const t=xe(e);return!Ns()||!t.visualViewport?zm:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}a(Zl,"getVisualOffsets");function Km(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==xe(e)?!1:t}a(Km,"shouldAddVisualOffsets");function Mt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Ds(e);let i=ut(1);t&&(r?Oe(r)&&(i=Gt(r)):i=Gt(e));const l=Km(s,n,r)?Zl(s):ut(0);let c=(o.left+l.x)/i.x,u=(o.top+l.y)/i.y,f=o.width/i.x,p=o.height/i.y;if(s){const g=xe(s),h=r&&Oe(r)?xe(r):r;let y=g,v=qo(y);for(;v&&r&&h!==y;){const b=Gt(v),C=v.getBoundingClientRect(),w=je(v),x=C.left+(v.clientLeft+parseFloat(w.paddingLeft))*b.x,S=C.top+(v.clientTop+parseFloat(w.paddingTop))*b.y;c*=b.x,u*=b.y,f*=b.x,p*=b.y,c+=x,u+=S,y=xe(v),v=qo(y)}}return yr({width:f,height:p,x:c,y:u})}a(Mt,"getBoundingClientRect");function Gm(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Je(r),l=t?Lr(t.floating):!1;if(r===i||l&&s)return n;let c={scrollLeft:0,scrollTop:0},u=ut(1);const f=ut(0),p=$e(r);if((p||!p&&!s)&&((sn(r)!=="body"||In(i))&&(c=Fr(r)),$e(r))){const g=Mt(r);u=Gt(r),f.x=g.x+r.clientLeft,f.y=g.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x,y:n.y*u.y-c.scrollTop*u.y+f.y}}a(Gm,"convertOffsetParentRelativeRectToViewportRelativeRect");function Ym(e){return Array.from(e.getClientRects())}a(Ym,"getClientRects");function Ql(e){return Mt(Je(e)).left+Fr(e).scrollLeft}a(Ql,"getWindowScrollBarX");function Xm(e){const t=Je(e),n=Fr(e),r=e.ownerDocument.body,o=be(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=be(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Ql(e);const l=-n.scrollTop;return je(r).direction==="rtl"&&(i+=be(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:l}}a(Xm,"getDocumentRect");function qm(e,t){const n=xe(e),r=Je(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,l=0,c=0;
2if(o){s=o.width,i=o.height;const u=Ns();(!u||u&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:s,height:i,x:l,y:c}}a(qm,"getViewportRect");function Zm(e,t){const n=Mt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=$e(e)?Gt(e):ut(1),i=e.clientWidth*s.x,l=e.clientHeight*s.y,c=o*s.x,u=r*s.y;return{width:i,height:l,x:c,y:u}}a(Zm,"getInnerBoundingClientRect");function ra(e,t,n){let r;if(t==="viewport")r=qm(e,n);else if(t==="document")r=Xm(Je(e));else if(Oe(t))r=Zm(t,n);else{const o=Zl(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return yr(r)}a(ra,"getClientRectFromClippingAncestor");function Jl(e,t){const n=ft(e);return n===t||!Oe(n)||Xt(n)?!1:je(n).position==="fixed"||Jl(n,t)}a(Jl,"hasFixedPositionAncestor");function Qm(e,t){const n=t.get(e);if(n)return n;let r=Pn(e,[],!1).filter(l=>Oe(l)&&sn(l)!=="body"),o=null;const s=je(e).position==="fixed";let i=s?ft(e):e;for(;Oe(i)&&!Xt(i);){const l=je(i),c=Ms(i);!c&&l.position==="fixed"&&(o=null),(s?!c&&!o:!c&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||In(i)&&!c&&Jl(e,i))?r=r.filter(f=>f!==i):o=l,i=ft(i)}return t.set(e,r),r}a(Qm,"getClippingElementAncestors");function Jm(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Lr(t)?[]:Qm(t,this._c):[].concat(n),r],l=i[0],c=i.reduce((u,f)=>{const p=ra(t,f,o);return u.top=be(p.top,u.top),u.right=Fe(p.right,u.right),u.bottom=Fe(p.bottom,u.bottom),u.left=be(p.left,u.left),u},ra(t,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}a(Jm,"getClippingRect");function eg(e){const{width:t,height:n}=ql(e);return{width:t,height:n}}a(eg,"getDimensions");function tg(e,t,n){const r=$e(t),o=Je(t),s=n==="fixed",i=Mt(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const c=ut(0);if(r||!r&&!s)if((sn(t)!=="body"||In(o))&&(l=Fr(t)),r){const p=Mt(t,!0,s,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else o&&(c.x=Ql(o));const u=i.left+l.scrollLeft-c.x,f=i.top+l.scrollTop-c.y;return{x:u,y:f,width:i.width,height:i.height}}a(tg,"getRectRelativeToOffsetParent");function mo(e){return je(e).position==="static"}a(mo,"isStaticPositioned");function oa(e,t){return!$e(e)||je(e).position==="fixed"?null:t?t(e):e.offsetParent}a(oa,"getTrueOffsetParent");function ec(e,t){const n=xe(e);if(Lr(e))return n;if(!$e(e)){let o=ft(e);for(;o&&!Xt(o);){if(Oe(o)&&!mo(o))return o;o=ft(o)}return n}let r=oa(e,t);for(;r&&Wm(r)&&mo(r);)r=oa(r,t);return r&&Xt(r)&&mo(r)&&!Ms(r)?n:r||Um(e)||n}a(ec,"getOffsetParent");const ng=a(async function(e){const t=this.getOffsetParent||ec,n=this.getDimensions,r=await n(e.floating);return{reference:tg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},"getElementRects");function rg(e){return je(e).direction==="rtl"}a(rg,"isRTL");const og={convertOffsetParentRelativeRectToViewportRelativeRect:Gm,getDocumentElement:Je,getClippingRect:Jm,getOffsetParent:ec,getElementRects:ng,getClientRects:Ym,getDimensions:eg,getScale:Gt,isElement:Oe,isRTL:rg};function sg(e,t){let n=null,r;const o=Je(e);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}a(s,"cleanup");function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const{left:u,top:f,width:p,height:g}=e.getBoundingClientRect();if(l||t(),!p||!g)return;const h=Qn(f),y=Qn(o.clientWidth-(u+p)),v=Qn(o.clientHeight-(f+g)),b=Qn(u),w={rootMargin:-h+"px "+-y+"px "+-v+"px "+-b+"px",threshold:be(0,Fe(1,c))||1};let x=!0;function S(P){const R=P[0].intersectionRatio;if(R!==c){if(!x)return i();R?i(!1,R):r=setTimeout(()=>{i(!1,1e-7)},1e3)}x=!1}a(S,"handleObserve");try{n=new IntersectionObserver(S,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,w)}n.observe(e)}return a(i,"refresh"),i(!0),s}a(sg,"observeMove");function tc(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Ds(e),f=o||s?[...u?Pn(u):[],...Pn(t)]:[];f.forEach(C=>{o&&C.addEventListener("scroll",n,{passive:!0}),s&&C.addEventListener("resize",n)});const p=u&&l?sg(u,n):null;let g=-1,h=null;i&&(h=new ResizeObserver(C=>{let[w]=C;w&&w.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(t)})),n()}),u&&!c&&h.observe(u),h.observe(t));let y,v=c?Mt(e):null;c&&b();function b(){const C=Mt(e);v&&(C.x!==v.x||C.y!==v.y||C.width!==v.width||C.height!==v.height)&&n(),v=C,y=requestAnimationFrame(b)}return a(b,"frameLoop"),n(),()=>{var C;f.forEach(w=>{o&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),p?.(),(C=h)==null||C.disconnect(),h=null,c&&cancelAnimationFrame(y)}}a(tc,"autoUpdate");const ig=Vm,ag=$m,lg=_m,cg=Hm,ug=Lm,sa=km,dg=Bm,fg=a((e,t,n)=>{const r=new Map,o={platform:og,...n},s={...o.platform,_c:r};return jm(e,t,{...o,platform:s})},"computePosition");var ur=typeof document<"u"?d.useLayoutEffect:d.useEffect;function br(e,t){if(e===t)return!0;
2if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!br(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!br(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}a(br,"deepEqual");function nc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}a(nc,"getDPR");function ia(e,t){const n=nc(e);return Math.round(t*n)/n}a(ia,"roundByDPR");function aa(e){const t=d.useRef(e);return ur(()=>{t.current=e}),t}a(aa,"useLatestRef");function rc(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[f,p]=d.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,h]=d.useState(r);br(g,r)||h(r);const[y,v]=d.useState(null),[b,C]=d.useState(null),w=d.useCallback(k=>{k!==R.current&&(R.current=k,v(k))},[]),x=d.useCallback(k=>{k!==E.current&&(E.current=k,C(k))},[]),S=s||y,P=i||b,R=d.useRef(null),E=d.useRef(null),T=d.useRef(f),O=c!=null,I=aa(c),L=aa(o),V=d.useCallback(()=>{if(!R.current||!E.current)return;const k={placement:t,strategy:n,middleware:g};L.current&&(k.platform=L.current),fg(R.current,E.current,k).then($=>{const A={...$,isPositioned:!0};W.current&&!br(T.current,A)&&(T.current=A,tn.flushSync(()=>{p(A)}))})},[g,t,n,L]);ur(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,p(k=>({...k,isPositioned:!1})))},[u]);const W=d.useRef(!1);ur(()=>(W.current=!0,()=>{W.current=!1}),[]),ur(()=>{if(S&&(R.current=S),P&&(E.current=P),S&&P){if(I.current)return I.current(S,P,V);V()}},[S,P,V,I,O]);const H=d.useMemo(()=>({reference:R,floating:E,setReference:w,setFloating:x}),[w,x]),F=d.useMemo(()=>({reference:S,floating:P}),[S,P]),j=d.useMemo(()=>{const k={position:n,left:0,top:0};if(!F.floating)return k;const $=ia(F.floating,f.x),A=ia(F.floating,f.y);return l?{...k,transform:"translate("+$+"px, "+A+"px)",...nc(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$,top:A}},[n,l,F.floating,f.x,f.y]);return d.useMemo(()=>({...f,update:V,refs:H,elements:F,floatingStyles:j}),[f,V,H,F,j])}a(rc,"useFloating");const pg=a(e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return a(t,"isRef"),{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?sa({element:r.current,padding:o}).fn(n):{}:r?sa({element:r,padding:o}).fn(n):{}}}},"arrow$1"),oc=a((e,t)=>({...ig(e),options:[e,t]}),"offset"),sc=a((e,t)=>({...ag(e),options:[e,t]}),"shift"),ic=a((e,t)=>({...dg(e),options:[e,t]}),"limitShift"),ac=a((e,t)=>({...lg(e),options:[e,t]}),"flip"),lc=a((e,t)=>({...cg(e),options:[e,t]}),"size"),cc=a((e,t)=>({...ug(e),options:[e,t]}),"hide"),uc=a((e,t)=>({...pg(e),options:[e,t]}),"arrow");var hg="Arrow",dc=d.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return m.jsx(Be.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});dc.displayName=hg;var mg=dc;function Is(e){const[t,n]=d.useState(void 0);return Xe(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,l;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,l=u.blockSize}else i=e.offsetWidth,l=e.offsetHeight;n({width:i,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}a(Is,"useSize$1");var Os="Popper",[fc,pc]=Es(Os),[gg,hc]=fc(Os),mc=a(e=>{const{__scopePopper:t,children:n}=e,[r,o]=d.useState(null);return m.jsx(gg,{scope:t,anchor:r,onAnchorChange:o,children:n})},"Popper$1");mc.displayName=Os;var gc="PopperAnchor",vc=d.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=hc(gc,n),i=d.useRef(null),l=mt(t,i);return d.useEffect(()=>{s.onAnchorChange(r?.current||i.current)}),r?null:m.jsx(Be.div,{...o,ref:l})});vc.displayName=gc;var js="PopperContent",[vg,yg]=fc(js),yc=d.forwardRef((e,t)=>
2{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:h="optimized",onPlaced:y,...v}=e,b=hc(js,n),[C,w]=d.useState(null),x=mt(t,N=>w(N)),[S,P]=d.useState(null),R=Is(S),E=R?.width??0,T=R?.height??0,O=r+(s!=="center"?"-"+s:""),I=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},L=Array.isArray(u)?u:[u],V=L.length>0,W={padding:I,boundary:L.filter(xg),altBoundary:V},{refs:H,floatingStyles:F,placement:j,isPositioned:k,middlewareData:$}=rc({strategy:"fixed",placement:O,whileElementsMounted:a((...N)=>tc(...N,{animationFrame:h==="always"}),"whileElementsMounted"),elements:{reference:b.anchor},middleware:[oc({mainAxis:o+T,alignmentAxis:i}),c&&sc({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?ic():void 0,...W}),c&&ac({...W}),lc({...W,apply:a(({elements:N,rects:q,availableWidth:se,availableHeight:Z})=>{const{width:Q,height:re}=q.reference,ue=N.floating.style;ue.setProperty("--radix-popper-available-width",`${se}px`),ue.setProperty("--radix-popper-available-height",`${Z}px`),ue.setProperty("--radix-popper-anchor-width",`${Q}px`),ue.setProperty("--radix-popper-anchor-height",`${re}px`)},"apply")}),S&&uc({element:S,padding:l}),wg({arrowWidth:E,arrowHeight:T}),g&&cc({strategy:"referenceHidden",...W})]}),[A,J]=wc(j),ae=rn(y);Xe(()=>{k&&ae?.()},[k,ae]);const z=$.arrow?.x,G=$.arrow?.y,K=$.arrow?.centerOffset!==0,[ne,le]=d.useState();return Xe(()=>{C&&le(window.getComputedStyle(C).zIndex)},[C]),m.jsx("div",{ref:H.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:k?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[$.transformOrigin?.x,$.transformOrigin?.y].join(" "),...$.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(vg,{scope:n,placedSide:A,onArrowChange:P,arrowX:z,arrowY:G,shouldHideArrow:K,children:m.jsx(Be.div,{"data-side":A,"data-align":J,...v,ref:x,style:{...v.style,animation:k?void 0:"none"}})})})});yc.displayName=js;var bc="PopperArrow",bg={top:"bottom",right:"left",bottom:"top",left:"right"},xc=d.forwardRef(a(function(t,n){const{__scopePopper:r,...o}=t,s=yg(bc,r),i=bg[s.placedSide];return m.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:m.jsx(mg,{...o,ref:n,style:{...o.style,display:"block"}})})},"PopperArrow2"));xc.displayName=bc;function xg(e){return e!==null}a(xg,"isNotNull$2");var wg=a(e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,l=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,f]=wc(n),p={start:"0%",center:"50%",end:"100%"}[f],g=(o.arrow?.x??0)+l/2,h=(o.arrow?.y??0)+c/2;let y="",v="";return u==="bottom"?(y=i?p:`${g}px`,v=`${-c}px`):u==="top"?(y=i?p:`${g}px`,v=`${r.floating.height+c}px`):u==="right"?(y=`${-c}px`,v=i?p:`${h}px`):u==="left"&&(y=`${r.floating.width+c}px`,v=i?p:`${h}px`),{data:{x:y,y:v}}}}),"transformOrigin$1");function wc(e){const[t,n="center"]=e.split("-");return[t,n]}a(wc,"getSideAndAlignFromPlacement$1");var Cg=mc,Sg=vc,Pg=yc,Eg=xc,Tg="Portal",Cc=d.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=d.useState(!1);Xe(()=>s(!0),[]);const i=n||o&&globalThis?.document?.body;return i?Ps.createPortal(m.jsx(Be.div,{...r,ref:t}),i):null});Cc.displayName=Tg;function Rg(e,t){return d.useReducer((n,r)=>t[n][r]??n,e)}a(Rg,"useStateMachine$3");var ks=a(e=>{const{present:t,children:n}=e,r=Ag(t),o=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),s=mt(r.ref,Mg(o));return typeof n=="function"||r.isPresent?d.cloneElement(o,{ref:s}):null},"Presence$3");ks.displayName="Presence";
2function Ag(e){const[t,n]=d.useState(),r=d.useRef({}),o=d.useRef(e),s=d.useRef("none"),i=e?"mounted":"unmounted",[l,c]=Rg(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const u=Jn(r.current);s.current=l==="mounted"?u:"none"},[l]),Xe(()=>{const u=r.current,f=o.current;if(f!==e){const g=s.current,h=Jn(u);e?c("MOUNT"):h==="none"||u?.display==="none"?c("UNMOUNT"):c(f&&g!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Xe(()=>{if(t){const u=a(p=>{const h=Jn(r.current).includes(p.animationName);p.target===t&&h&&tn.flushSync(()=>c("ANIMATION_END"))},"handleAnimationEnd"),f=a(p=>{p.target===t&&(s.current=Jn(r.current))},"handleAnimationStart");return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:d.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}a(Ag,"usePresence$4");function Jn(e){return e?.animationName||"none"}a(Jn,"getAnimationName$3");function Mg(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}a(Mg,"getElementRef$6");function _s({prop:e,defaultProp:t,onChange:n=a(()=>{},"onChange")}){const[r,o]=Ng({defaultProp:t,onChange:n}),s=e!==void 0,i=s?e:r,l=rn(n),c=d.useCallback(u=>{if(s){const p=typeof u=="function"?u(e):u;p!==e&&l(p)}else o(u)},[s,e,o,l]);return[i,c]}a(_s,"useControllableState$2");function Ng({defaultProp:e,onChange:t}){const n=d.useState(e),[r]=n,o=d.useRef(r),s=rn(t);return d.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}a(Ng,"useUncontrolledState$2");var Dg="VisuallyHidden",Sc=d.forwardRef((e,t)=>m.jsx(Be.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Sc.displayName=Dg;var Ig=Sc,[Vr]=Es("Tooltip",[pc]),$r=pc(),Pc="TooltipProvider",Og=700,Zo="tooltip.open",[jg,Ls]=Vr(Pc),Ec=a(e=>{const{__scopeTooltip:t,delayDuration:n=Og,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,[i,l]=d.useState(!0),c=d.useRef(!1),u=d.useRef(0);return d.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),m.jsx(jg,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:d.useCallback(()=>{window.clearTimeout(u.current),l(!1)},[]),onClose:d.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>l(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:d.useCallback(f=>{c.current=f},[]),disableHoverableContent:o,children:s})},"TooltipProvider");Ec.displayName=Pc;var Br="Tooltip",[kg,On]=Vr(Br),Tc=a(e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:s,disableHoverableContent:i,delayDuration:l}=e,c=Ls(Br,e.__scopeTooltip),u=$r(t),[f,p]=d.useState(null),g=Em(),h=d.useRef(0),y=i??c.disableHoverableContent,v=l??c.delayDuration,b=d.useRef(!1),[C=!1,w]=_s({prop:r,defaultProp:o,onChange:a(E=>{E?(c.onOpen(),document.dispatchEvent(new CustomEvent(Zo))):c.onClose(),s?.(E)},"onChange")}),x=d.useMemo(()=>C?b.current?"delayed-open":"instant-open":"closed",[C]),S=d.useCallback(()=>{window.clearTimeout(h.current),b.current=!1,w(!0)},[w]),P=d.useCallback(()=>{window.clearTimeout(h.current),w(!1)},[w]),R=d.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{b.current=!0,w(!0)},v)},[v,w]);return d.useEffect(()=>()=>window.clearTimeout(h.current),[]),m.jsx(Cg,{...u,children:m.jsx(kg,{scope:t,contentId:g,open:C,stateAttribute:x,trigger:f,onTriggerChange:p,onTriggerEnter:d.useCallback(()=>{c.isOpenDelayed?R():S()},[c.isOpenDelayed,R,S]),onTriggerLeave:d.useCallback(()=>{y?P():window.clearTimeout(h.current)},[P,y]),onOpen:S,onClose:P,disableHoverableContent:y,children:n})})},"Tooltip");Tc.displayName=Br;var Qo="TooltipTrigger",Rc=d.forwardRef((e,t)=>
2{const{__scopeTooltip:n,...r}=e,o=On(Qo,n),s=Ls(Qo,n),i=$r(n),l=d.useRef(null),c=mt(t,l,o.onTriggerChange),u=d.useRef(!1),f=d.useRef(!1),p=d.useCallback(()=>u.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),m.jsx(Sg,{asChild:!0,...i,children:m.jsx(Be.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:_e(e.onPointerMove,g=>{g.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:_e(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:_e(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:_e(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:_e(e.onBlur,o.onClose),onClick:_e(e.onClick,o.onClose)})})});Rc.displayName=Qo;var Fs="TooltipPortal",[_g,Lg]=Vr(Fs,{forceMount:void 0}),Ac=a(e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=On(Fs,t);return m.jsx(_g,{scope:t,forceMount:n,children:m.jsx(ks,{present:n||s.open,children:m.jsx(Cc,{asChild:!0,container:o,children:r})})})},"TooltipPortal");Ac.displayName=Fs;var qt="TooltipContent",Mc=d.forwardRef((e,t)=>{const n=Lg(qt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=On(qt,e.__scopeTooltip);return m.jsx(ks,{present:r||i.open,children:i.disableHoverableContent?m.jsx(Nc,{side:o,...s,ref:t}):m.jsx(Fg,{side:o,...s,ref:t})})}),Fg=d.forwardRef((e,t)=>{const n=On(qt,e.__scopeTooltip),r=Ls(qt,e.__scopeTooltip),o=d.useRef(null),s=mt(t,o),[i,l]=d.useState(null),{trigger:c,onClose:u}=n,f=o.current,{onPointerInTransitChange:p}=r,g=d.useCallback(()=>{l(null),p(!1)},[p]),h=d.useCallback((y,v)=>{const b=y.currentTarget,C={x:y.clientX,y:y.clientY},w=Bg(C,b.getBoundingClientRect()),x=Hg(C,w),S=Wg(v.getBoundingClientRect()),P=zg([...x,...S]);l(P),p(!0)},[p]);return d.useEffect(()=>()=>g(),[g]),d.useEffect(()=>{if(c&&f){const y=a(b=>h(b,f),"handleTriggerLeave"),v=a(b=>h(b,c),"handleContentLeave");return c.addEventListener("pointerleave",y),f.addEventListener("pointerleave",v),()=>{c.removeEventListener("pointerleave",y),f.removeEventListener("pointerleave",v)}}},[c,f,h,g]),d.useEffect(()=>{if(i){const y=a(v=>{const b=v.target,C={x:v.clientX,y:v.clientY},w=c?.contains(b)||f?.contains(b),x=!Ug(C,i);w?g():x&&(g(),u())},"handleTrackPointerGrace");return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[c,f,i,u,g]),m.jsx(Nc,{...e,ref:s})}),[Vg,$g]=Vr(Br,{isInside:!1}),Nc=d.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...l}=e,c=On(qt,n),u=$r(n),{onClose:f}=c;return d.useEffect(()=>(document.addEventListener(Zo,f),()=>document.removeEventListener(Zo,f)),[f]),d.useEffect(()=>{if(c.trigger){const p=a(g=>{g.target?.contains(c.trigger)&&f()},"handleScroll");return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[c.trigger,f]),m.jsx(zl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:a(p=>p.preventDefault(),"onFocusOutside"),onDismiss:f,children:m.jsxs(Pg,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[m.jsx(Wl,{children:r}),m.jsx(Vg,{scope:n,isInside:!0,children:m.jsx(Ig,{id:c.contentId,role:"tooltip",children:o||r})})]})})});Mc.displayName=qt;var Dc="TooltipArrow",Ic=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=$r(n);return $g(Dc,n).isInside?null:m.jsx(Eg,{...o,...r,ref:t})});Ic.displayName=Dc;function Bg(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}a(Bg,"getExitSideFromRect");function Hg(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}a(Hg,"getPaddedExitPoints");function Wg(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}a(Wg,"getPointsFromRect");function Ug(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const l=t[s].x,c=t[s].y,u=t[i].x,f=t[i].y;c>r!=f>r&&n<(u-l)*(r-c)/(f-c)+l&&(o=!o)}return o}a(Ug,"isPointInPolygon$1");function zg(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Kg(t)}a(zg,"getHull");function Kg(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}a(Kg,"getHullPresorted");var AT=Ec,Oc=Tc,jc=Rc,kc=Ac,Gg=Mc,Yg=Ic;const Xg={1:"bg-bolt-ds-bgSecondary",2:"bg-bolt-ds-bgTertiary",3:"bg-bolt-ds-bgTertiary"},_c=d.memo(d.forwardRef(({maxWidth:e,hideArrow:t,truncate:n,surface:r="1",children:o,...s},i)=>m.jsxs(Gg,{ref:i,className:D("z-max text-xs text-bolt-ds-textPrimary border border-bolt-ds-borderPrimary rounded-lg px-2 py-1.5",Xg[r],{truncate:n===!0||n===void 0}),style:{...e===void 0?void 0:{maxWidth:typeof e=="string"?e:`${e}px`}},...s,children:[!t&&m.jsx(Yg,{className:"fill-bolt-ds-borderPrimary"}),o]}))),go="border border-bolt-ds-borderPrimary focus-visible:outline-bolt-ds-brandHover shadow-sm text-bolt-ds-textPrimary";function qg(e,t,n="bg"){switch(e){case"primary":return t==="brand"?"primary":`primary-tint-${t}`;case"secondary":return n==="bg"?"secondary":`secondary-${n}`;case"inverse":return"inverse";case"ghost":return"ghost";case"tint":return`tint-${t}`;case"link-gray":return"link-tint-gray";case"link-color":return t==="neutral"?"link-tint-gray":`link-tint-${t}`;default:return"primary"}}a(qg,"resolveVariant$1");const Zg={lg:"px-0 h-5 gap-2",md:"px-0 h-5 gap-1.5",sm:"px-0 h-5 gap-1.5",xs:"px-0 h-5 gap-1"};function Qg(e){return e.startsWith("link-tint")}a(Qg,"isLinkVariant");const Jg=_r("flex items-center justify-center font-medium shrink-0 min-w-0 max-w-full leading-tight rounded-md focus-visible:outline-2 disabled:op-50 relative disabled:cursor-not-allowed transition-colors focus-visible:shadow-sm",{variants:{variant:{primary:"bg-bolt-ds-brand [&:hover:where(:not
2(:disabled))]:bg-bolt-ds-brandHover shadow-sm text-bolt-ds-onNeutral focus-visible:outline-bolt-ds-brandHover","primary-tint-success":"bg-bolt-ds-success [&:hover:where(:not(:disabled))]:bg-bolt-ds-successHover shadow-sm text-bolt-ds-onNeutral focus-visible:outline-bolt-ds-successHover","primary-tint-warning":"bg-bolt-ds-warning [&:hover:where(:not(:disabled))]:bg-bolt-ds-warningHover shadow-sm text-bolt-ds-onNeutral focus-visible:outline-bolt-ds-warningHover","primary-tint-danger":"bg-bolt-ds-danger [&:hover:where(:not(:disabled))]:bg-bolt-ds-dangerHover shadow-sm text-bolt-ds-onNeutral focus-visible:outline-bolt-ds-dangerHover","primary-tint-neutral":"bg-bolt-ds-neutral [&:hover:where(:not(:disabled))]:bg-bolt-ds-neutralHover shadow-sm text-bolt-ds-onNeutral focus-visible:outline-bolt-ds-neutralHover",secondary:`${go} bg-transparent [&:hover:where(:not(:disabled))]:bg-bolt-ds-bgHover focus-visible:bg-bolt-ds-bgHover`,"secondary-bg-secondary":`${go} bg-bolt-ds-bgSecondary [&:hover:where(:not(:disabled))]:bg-bolt-ds-bgSecondaryHover focus-visible:bg-bolt-ds-bgSecondaryHover`,"secondary-bg-alt":`${go} bg-bolt-ds-bgAlt [&:hover:where(:not(:disabled))]:bg-bolt-ds-bgAltHover focus-visible:bg-bolt-ds-bgAltHover`,inverse:"bg-bolt-ds-inverseBg text-bolt-ds-onInverseBg shadow-sm focus-visible:outline-bolt-ds-brandHover",ghost:"bg-transparent [&:hover:where(:not(:disabled))]:bg-bolt-ds-utilHover text-bolt-ds-textPrimary focus-visible:outline-bolt-ds-brandHover","tint-brand":"bg-bolt-ds-brand/5 [&:hover:where(:not(:disabled))]:bg-bolt-ds-brandHover/10 text-bolt-ds-brand focus-visible:outline-bolt-ds-brandHover","tint-success":"bg-bolt-ds-success/5 [&:hover:where(:not(:disabled))]:bg-bolt-ds-success/10 text-bolt-ds-success focus-visible:outline-bolt-ds-successHover","tint-warning":"bg-bolt-ds-warning/5 [&:hover:where(:not(:disabled))]:bg-bolt-ds-warning/10 text-bolt-ds-warning focus-visible:outline-bolt-ds-warningHover","tint-danger":"bg-bolt-ds-danger/5 [&:hover:where(:not(:disabled))]:bg-bolt-ds-danger/10 text-bolt-ds-danger focus-visible:outline-bolt-ds-dangerHover","tint-neutral":"bg-bolt-ds-neutralBgSubtle [&:hover:where(:not(:disabled))]:bg-bolt-ds-neutralBgSubtleHover text-bolt-ds-textPrimary focus-visible:outline-bolt-ds-neutralHover","link-tint-gray":"bg-transparent text-bolt-ds-textSecondary [&:hover:where(:not(:disabled))]:text-bolt-ds-textPrimary focus-visible:outline-bolt-ds-brandHover","link-tint-brand":"bg-transparent text-bolt-ds-brand [&:hover:where(:not(:disabled))]:text-bolt-ds-brandHover focus-visible:outline-bolt-ds-brandHover","link-tint-success":"bg-transparent text-bolt-ds-success [&:hover:where(:not(:disabled))]:text-bolt-ds-successHover focus-visible:outline-bolt-ds-successHover","link-tint-warning":"bg-transparent text-bolt-ds-warning [&:hover:where(:not(:disabled))]:text-bolt-ds-warningHover focus-visible:outline-bolt-ds-warningHover","link-tint-danger":"bg-transparent text-bolt-ds-danger [&:hover:where(:not(:disabled))]:text-bolt-ds-dangerHover focus-visible:outline-bolt-ds-dangerHover"},size:{xs:"gap-1 text-xs px-2 h-7",sm:"gap-1 text-xs px-2.5 h-8",md:"gap-1 text-sm px-3 h-9",lg:"gap-2 text-sm px-4 h-10","icon-xs":"size-7 rounded","icon-sm":"size-8 rounded-md","icon-md":"size-9 rounded-md","icon-lg":"size-10 rounded-lg"}},defaultVariants:{variant:"primary",size:"lg"}}),Hr=d.memo(d.forwardRef(({className:e,variant:t="primary",size:n="lg",icon:r,tint:o="brand",background:s="bg",type:i="button",disabled:l=!1,asChild:c,truncate:u=!0,children:f,startIcon:p,endIcon:g,iconClassName:h,tooltip:y,loading:v=!1,loader:b,...C},w)=>{const x=c?tm:"button",S=qg(t,o,s),P=r?`icon-${n}`:n,R=Qg(S)?Zg[n]??"":"",E=m.jsx(x,{className:D(Jg({variant:S,size:P}),R,e),ref:w,disabled:l||v,type:i,...C,children:c?f:m.jsx(ev,{loading:v,loader:b,icon:r,startIcon:p,endIcon:g,iconClassName:h,truncate:u,children:f})});return y?m.jsxs(Oc,{open:y.open,children:[m.jsx(jc,{asChild:!0,children:E}),m.jsx(kc,{children:m.jsx(_c,{side:y.side??"bottom",align:y.align??"center",sideOffset:y.sideOffset??6,maxWidth:y.maxWidth,children:y.content})})]}):E})),ev=a(({loading:e,loader:t,icon:n,startIcon:r,endIcon:o,iconClassName:s,truncate:i,children:l})=>m.jsxs(m.Fragment,{children:[e&&m.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:t||m.jsx(tv,{})}),n?m.jsx("div",{className:e?"op-0":"",children:m.jsx("span",{className:D(n,"block size-5",s)})}):i?m.jsxs(m.Fragment,{children:[r&&m.jsx(la,{icon:r,loading:e,iconClassName:s}),m.jsx("span",{className:D("truncate",e?"op-0":""),children:l}),o&&m.jsx(la,{icon:o,loading:e,iconClassName:s})]}):l]}
2),"ButtonContent"),la=a(({icon:e,loading:t,iconClassName:n,size:r})=>m.jsx("span",{className:D(e,"flex items-center justify-center",r==="lg"?"size-5":"size-4",n,{"op-0":t})}),"ButtonIcon");function tv({className:e,size:t}){return m.jsx("span",{className:D(e,"i-svg-spinners:90-ring-with-bg",{"scale-150":t==="lg","scale-125":t==="md","scale-115":t==="sm"})})}a(tv,"DefaultLoader");const nv=d.memo(d.forwardRef(({variant:e="ghost",className:t,tooltip:n,size:r="xs",disabled:o,loading:s,...i},l)=>m.jsx(Hr,{...i,variant:e,icon:"i-ph:x",ref:l,size:r,tooltip:n,loading:s,disabled:o,className:t,"aria-label":i["aria-label"]||"Close"})));function _(e,t,{checkForDefaultPrevented:n=!0}={}){return a(function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)},"handleEvent")}a(_,"composeEventHandlers$2");function rv(e,t){const n=d.createContext(t),r=a(s=>{const{children:i,...l}=s,c=d.useMemo(()=>l,Object.values(l));return m.jsx(n.Provider,{value:c,children:i})},"Provider");r.displayName=e+"Provider";function o(s){const i=d.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return a(o,"useContext2"),[r,o]}a(rv,"createContext2");function Re(e,t=[]){let n=[];function r(s,i){const l=d.createContext(i),c=n.length;n=[...n,i];const u=a(p=>{const{scope:g,children:h,...y}=p,v=g?.[e]?.[c]||l,b=d.useMemo(()=>y,Object.values(y));return m.jsx(v.Provider,{value:b,children:h})},"Provider");u.displayName=s+"Provider";function f(p,g){const h=g?.[e]?.[c]||l,y=d.useContext(h);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${s}\``)}return a(f,"useContext2"),[u,f]}a(r,"createContext3");const o=a(()=>{const s=n.map(i=>d.createContext(i));return a(function(l){const c=l?.[e]||s;return d.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])},"useScope")},"createScope");return o.scopeName=e,[r,ov(o,...t)]}a(Re,"createContextScope$1");function ov(...e){const t=e[0];if(e.length===1)return t;const n=a(()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return a(function(s){const i=r.reduce((l,{useScope:c,scopeName:u})=>{const p=c(s)[`__scope${u}`];return{...l,...p}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}a(ov,"composeContextScopes$1");var de=globalThis?.document?d.useLayoutEffect:()=>{},sv=kr[" useInsertionEffect ".trim().toString()]||de;function Nt({prop:e,defaultProp:t,onChange:n=a(()=>{},"onChange"),caller:r}){const[o,s,i]=iv({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:o;{const f=d.useRef(e!==void 0);d.useEffect(()=>{const p=f.current;p!==l&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=l},[l,r])}const u=d.useCallback(f=>{if(l){const p=av(f)?f(e):f;p!==e&&i.current?.(p)}else s(f)},[l,e,s,i]);return[c,u]}a(Nt,"useControllableState$1");function iv({defaultProp:e,onChange:t}){const[n,r]=d.useState(e),o=d.useRef(n),s=d.useRef(t);return sv(()=>{s.current=t},[t]),d.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}a(iv,"useUncontrolledState$1");function av(e){return typeof e=="function"}a(av,"isFunction");var lv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Y=lv.reduce((e,t)=>{const n=ct(`Primitive.${t}`),r=d.forwardRef((o,s)=>{const{asChild:i,...l}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(c,{...l,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Lc(e,t){e&&tn.flushSync(()=>e.dispatchEvent(t))}a(Lc,"dispatchDiscreteCustomEvent");function Vs(e){const t=e+"CollectionProvider",[n,r]=Re(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=a(v=>{const{scope:b,children:C}=v,w=M.useRef(null),x=M.useRef(new Map).current;return m.jsx(o,{scope:b,itemMap:x,collectionRef:w,children:C})},"CollectionProvider");i.displayName=t;const l=e+"CollectionSlot",c=ct(l),u=M.forwardRef((v,b)=>{const{scope:C,children:w}=v,x=s(l,C),S=X(b,x.collectionRef);return m.jsx(c,{ref:S,children:w})});u.displayName=l;const f=e+"CollectionItemSlot",p="data-radix-collection-item",g=ct(f),h=M.forwardRef((v,b)=>{const{scope:C,children:w,...x}=v,S=M.useRef(null),P=X(b,S),R=s(f,C);return M.useEffect(()=>(R.itemMap.set(S,{ref:S,...x}
2),()=>{R.itemMap.delete(S)})),m.jsx(g,{[p]:"",ref:P,children:w})});h.displayName=f;function y(v){const b=s(e+"CollectionConsumer",v);return M.useCallback(()=>{const w=b.collectionRef.current;if(!w)return[];const x=Array.from(w.querySelectorAll(`[${p}]`));return Array.from(b.itemMap.values()).sort((R,E)=>x.indexOf(R.ref.current)-x.indexOf(E.ref.current))},[b.collectionRef,b.itemMap])}return a(y,"useCollection"),[{Provider:i,Slot:u,ItemSlot:h},y,r]}a(Vs,"createCollection$1");var cv=d.createContext(void 0);function jn(e){const t=d.useContext(cv);return e||t||"ltr"}a(jn,"useDirection");function ye(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...n)=>t.current?.(...n),[])}a(ye,"useCallbackRef$1");function uv(e,t=globalThis?.document){const n=ye(e);d.useEffect(()=>{const r=a(o=>{o.key==="Escape"&&n(o)},"handleKeyDown");return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}a(uv,"useEscapeKeydown");var dv="DismissableLayer",Jo="dismissableLayer.update",fv="dismissableLayer.pointerDownOutside",pv="dismissableLayer.focusOutside",ca,Fc=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),kn=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:l,...c}=e,u=d.useContext(Fc),[f,p]=d.useState(null),g=f?.ownerDocument??globalThis?.document,[,h]=d.useState({}),y=X(t,E=>p(E)),v=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),C=v.indexOf(b),w=f?v.indexOf(f):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=w>=C,P=gv(E=>{const T=E.target,O=[...u.branches].some(I=>I.contains(T));!S||O||(o?.(E),i?.(E),E.defaultPrevented||l?.())},g),R=vv(E=>{const T=E.target;[...u.branches].some(I=>I.contains(T))||(s?.(E),i?.(E),E.defaultPrevented||l?.())},g);return uv(E=>{w===u.layers.size-1&&(r?.(E),!E.defaultPrevented&&l&&(E.preventDefault(),l()))},g),d.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ca=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),ua(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=ca)}},[f,g,n,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),ua())},[f,u]),d.useEffect(()=>{const E=a(()=>h({}),"handleUpdate");return document.addEventListener(Jo,E),()=>document.removeEventListener(Jo,E)},[]),m.jsx(Y.div,{...c,ref:y,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:_(e.onFocusCapture,R.onFocusCapture),onBlurCapture:_(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:_(e.onPointerDownCapture,P.onPointerDownCapture)})});kn.displayName=dv;var hv="DismissableLayerBranch",mv=d.forwardRef((e,t)=>{const n=d.useContext(Fc),r=d.useRef(null),o=X(t,r);return d.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),m.jsx(Y.div,{...e,ref:o})});mv.displayName=hv;function gv(e,t=globalThis?.document){const n=ye(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const s=a(l=>{if(l.target&&!r.current){let c=a(function(){Vc(fv,n,u,{discrete:!0})},"handleAndDispatchPointerDownOutsideEvent2");const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},"handlePointerDown"),i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:a(()=>r.current=!0,"onPointerDownCapture")}}a(gv,"usePointerDownOutside");function vv(e,t=globalThis?.document){const n=ye(e),r=d.useRef(!1);return d.useEffect(()=>{const o=a(s=>{s.target&&!r.current&&Vc(pv,n,{originalEvent:s},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:a(()=>r.current=!0,"onFocusCapture"),onBlurCapture:a(()=>r.current=!1,"onBlurCapture")}}a(vv,"useFocusOutside");function ua(){const e=new CustomEvent(Jo);document.dispatchEvent(e)}
2a(ua,"dispatchUpdate");function Vc(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Lc(o,s):o.dispatchEvent(s)}a(Vc,"handleAndDispatchCustomEvent");var vo=0;function Wr(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??da()),document.body.insertAdjacentElement("beforeend",e[1]??da()),vo++,()=>{vo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),vo--}},[])}a(Wr,"useFocusGuards");function da(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}a(da,"createFocusGuard");var yo="focusScope.autoFocusOnMount",bo="focusScope.autoFocusOnUnmount",fa={bubbles:!1,cancelable:!0},yv="FocusScope",_n=d.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[l,c]=d.useState(null),u=ye(o),f=ye(s),p=d.useRef(null),g=X(t,v=>c(v)),h=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(r){let v=a(function(x){if(h.paused||!l)return;const S=x.target;l.contains(S)?p.current=S:rt(p.current,{select:!0})},"handleFocusIn2"),b=a(function(x){if(h.paused||!l)return;const S=x.relatedTarget;S!==null&&(l.contains(S)||rt(p.current,{select:!0}))},"handleFocusOut2"),C=a(function(x){if(document.activeElement===document.body)for(const P of x)P.removedNodes.length>0&&rt(l)},"handleMutations2");document.addEventListener("focusin",v),document.addEventListener("focusout",b);const w=new MutationObserver(C);return l&&w.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b),w.disconnect()}}},[r,l,h.paused]),d.useEffect(()=>{if(l){ha.add(h);const v=document.activeElement;if(!l.contains(v)){const C=new CustomEvent(yo,fa);l.addEventListener(yo,u),l.dispatchEvent(C),C.defaultPrevented||(bv(Pv($c(l)),{select:!0}),document.activeElement===v&&rt(l))}return()=>{l.removeEventListener(yo,u),setTimeout(()=>{const C=new CustomEvent(bo,fa);l.addEventListener(bo,f),l.dispatchEvent(C),C.defaultPrevented||rt(v??document.body,{select:!0}),l.removeEventListener(bo,f),ha.remove(h)},0)}}},[l,u,f,h]);const y=d.useCallback(v=>{if(!n&&!r||h.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,C=document.activeElement;if(b&&C){const w=v.currentTarget,[x,S]=xv(w);x&&S?!v.shiftKey&&C===S?(v.preventDefault(),n&&rt(x,{select:!0})):v.shiftKey&&C===x&&(v.preventDefault(),n&&rt(S,{select:!0})):C===w&&v.preventDefault()}},[n,r,h.paused]);return m.jsx(Y.div,{tabIndex:-1,...i,ref:g,onKeyDown:y})});_n.displayName=yv;function bv(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(rt(r,{select:t}),document.activeElement!==n)return}a(bv,"focusFirst$3");function xv(e){const t=$c(e),n=pa(t,e),r=pa(t.reverse(),e);return[n,r]}a(xv,"getTabbableEdges");function $c(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a(r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}a($c,"getTabbableCandidates");function pa(e,t){for(const n of e)if(!wv(n,{upTo:t}))return n}a(pa,"findVisible");function wv(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}a(wv,"isHidden");function Cv(e){return e instanceof HTMLInputElement&&"select"in e}a(Cv,"isSelectableInput");function rt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Cv(e)&&t&&e.select()}}a(rt,"focus");var ha=Sv();function Sv(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=ma(e,t),e.unshift(t)},remove(t){e=ma(e,t),e[0]?.resume()}}}a(Sv,"createFocusScopesStack");function ma(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}a(ma,"arrayRemove");function Pv(e){return e.filter(t=>t.tagName!=="A")}a(Pv,"removeLinks");var Ev=kr[" useId ".trim().toString()]||(()=>{}),Tv=0;
2function we(e){const[t,n]=d.useState(Ev());return de(()=>{n(r=>r??String(Tv++))},[e]),e||(t?`radix-${t}`:"")}a(we,"useId");var Rv="Arrow",Bc=d.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return m.jsx(Y.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});Bc.displayName=Rv;var Av=Bc;function Hc(e){const[t,n]=d.useState(void 0);return de(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,l;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,l=u.blockSize}else i=e.offsetWidth,l=e.offsetHeight;n({width:i,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}a(Hc,"useSize");var $s="Popper",[Wc,an]=Re($s),[Mv,Uc]=Wc($s),zc=a(e=>{const{__scopePopper:t,children:n}=e,[r,o]=d.useState(null);return m.jsx(Mv,{scope:t,anchor:r,onAnchorChange:o,children:n})},"Popper");zc.displayName=$s;var Kc="PopperAnchor",Gc=d.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Uc(Kc,n),i=d.useRef(null),l=X(t,i),c=d.useRef(null);return d.useEffect(()=>{const u=c.current;c.current=r?.current||i.current,u!==c.current&&s.onAnchorChange(c.current)}),r?null:m.jsx(Y.div,{...o,ref:l})});Gc.displayName=Kc;var Bs="PopperContent",[Nv,Dv]=Wc(Bs),Yc=d.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:h="optimized",onPlaced:y,...v}=e,b=Uc(Bs,n),[C,w]=d.useState(null),x=X(t,N=>w(N)),[S,P]=d.useState(null),R=Hc(S),E=R?.width??0,T=R?.height??0,O=r+(s!=="center"?"-"+s:""),I=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},L=Array.isArray(u)?u:[u],V=L.length>0,W={padding:I,boundary:L.filter(Ov),altBoundary:V},{refs:H,floatingStyles:F,placement:j,isPositioned:k,middlewareData:$}=rc({strategy:"fixed",placement:O,whileElementsMounted:a((...N)=>tc(...N,{animationFrame:h==="always"}),"whileElementsMounted"),elements:{reference:b.anchor},middleware:[oc({mainAxis:o+T,alignmentAxis:i}),c&&sc({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?ic():void 0,...W}),c&&ac({...W}),lc({...W,apply:a(({elements:N,rects:q,availableWidth:se,availableHeight:Z})=>{const{width:Q,height:re}=q.reference,ue=N.floating.style;ue.setProperty("--radix-popper-available-width",`${se}px`),ue.setProperty("--radix-popper-available-height",`${Z}px`),ue.setProperty("--radix-popper-anchor-width",`${Q}px`),ue.setProperty("--radix-popper-anchor-height",`${re}px`)},"apply")}),S&&uc({element:S,padding:l}),jv({arrowWidth:E,arrowHeight:T}),g&&cc({strategy:"referenceHidden",...W})]}),[A,J]=Zc(j),ae=ye(y);de(()=>{k&&ae?.()},[k,ae]);const z=$.arrow?.x,G=$.arrow?.y,K=$.arrow?.centerOffset!==0,[ne,le]=d.useState();return de(()=>{C&&le(window.getComputedStyle(C).zIndex)},[C]),m.jsx("div",{ref:H.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:k?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[$.transformOrigin?.x,$.transformOrigin?.y].join(" "),...$.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(Nv,{scope:n,placedSide:A,onArrowChange:P,arrowX:z,arrowY:G,shouldHideArrow:K,children:m.jsx(Y.div,{"data-side":A,"data-align":J,...v,ref:x,style:{...v.style,animation:k?void 0:"none"}})})})});Yc.displayName=Bs;var Xc="PopperArrow",Iv={top:"bottom",right:"left",bottom:"top",left:"right"},qc=d.forwardRef(a(function(t,n){const{__scopePopper:r,...o}=t,s=Dv(Xc,r),i=Iv[s.placedSide];return m.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:m.jsx(Av,{...o,ref:n,style:{...o.style,display:"block"}})})},"PopperArrow2"));qc.displayName=Xc;function Ov(e){return e!==null}a(Ov,"isNotNull$1");var jv=a(e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,l=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,f]=Zc(n),p={start:"0%",center:"50%",end:"100%"}[f],g=(o.arrow?.x??0)+l/2,h=(o.arrow?.y??0)+c/2;let y="",v="";return u==="bottom"?(y=i?p:`${g}px`,v=`${-c}px`):u==="top"?(y=i?p:`${g}px`,v=`${r.floating.height+c}px`):u==="right"?(y=`${-c}px`,v=i?p:`${h}px`):u==="left"&&(y=`${r.floating.width+c}px`,v=i?p:`${h}px`),{data:{x:y,y:v}}}}),"transformOrigin");function Zc(e){const[t,n="center"]=e.split("-");return[t,n]}a(Zc,"getSideAndAlignFromPlacement");var Ur=zc,zr=Gc,Hs=Yc,Ws=qc,kv="Portal",Ln=d.forwardRef((e,t)=>
2{const{container:n,...r}=e,[o,s]=d.useState(!1);de(()=>s(!0),[]);const i=n||o&&globalThis?.document?.body;return i?Ps.createPortal(m.jsx(Y.div,{...r,ref:t}),i):null});Ln.displayName=kv;function _v(e,t){return d.useReducer((n,r)=>t[n][r]??n,e)}a(_v,"useStateMachine$2");var He=a(e=>{const{present:t,children:n}=e,r=Lv(t),o=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),s=X(r.ref,Fv(o));return typeof n=="function"||r.isPresent?d.cloneElement(o,{ref:s}):null},"Presence$2");He.displayName="Presence";function Lv(e){const[t,n]=d.useState(),r=d.useRef(null),o=d.useRef(e),s=d.useRef("none"),i=e?"mounted":"unmounted",[l,c]=_v(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const u=er(r.current);s.current=l==="mounted"?u:"none"},[l]),de(()=>{const u=r.current,f=o.current;if(f!==e){const g=s.current,h=er(u);e?c("MOUNT"):h==="none"||u?.display==="none"?c("UNMOUNT"):c(f&&g!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),de(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,p=a(h=>{const v=er(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&v&&(c("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},"handleAnimationEnd"),g=a(h=>{h.target===t&&(s.current=er(r.current))},"handleAnimationStart");return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:d.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}a(Lv,"usePresence$3");function er(e){return e?.animationName||"none"}a(er,"getAnimationName$2");function Fv(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}a(Fv,"getElementRef$5");var xo="rovingFocusGroup.onEntryFocus",Vv={bubbles:!1,cancelable:!0},Fn="RovingFocusGroup",[es,Qc,$v]=Vs(Fn),[Bv,Jc]=Re(Fn,[$v]),[Hv,Wv]=Bv(Fn),eu=d.forwardRef((e,t)=>m.jsx(es.Provider,{scope:e.__scopeRovingFocusGroup,children:m.jsx(es.Slot,{scope:e.__scopeRovingFocusGroup,children:m.jsx(Uv,{...e,ref:t})})}));eu.displayName=Fn;var Uv=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...p}=e,g=d.useRef(null),h=X(t,g),y=jn(s),[v,b]=Nt({prop:i,defaultProp:l??null,onChange:c,caller:Fn}),[C,w]=d.useState(!1),x=ye(u),S=Qc(n),P=d.useRef(!1),[R,E]=d.useState(0);return d.useEffect(()=>{const T=g.current;if(T)return T.addEventListener(xo,x),()=>T.removeEventListener(xo,x)},[x]),m.jsx(Hv,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:v,onItemFocus:d.useCallback(T=>b(T),[b]),onItemShiftTab:d.useCallback(()=>w(!0),[]),onFocusableItemAdd:d.useCallback(()=>E(T=>T+1),[]),onFocusableItemRemove:d.useCallback(()=>E(T=>T-1),[]),children:m.jsx(Y.div,{tabIndex:C||R===0?-1:0,"data-orientation":r,...p,ref:h,style:{outline:"none",...e.style},onMouseDown:_(e.onMouseDown,()=>{P.current=!0}),onFocus:_(e.onFocus,T=>{const O=!P.current;if(T.target===T.currentTarget&&O&&!C){const I=new CustomEvent(xo,Vv);if(T.currentTarget.dispatchEvent(I),!I.defaultPrevented){const L=S().filter(j=>j.focusable),V=L.find(j=>j.active),W=L.find(j=>j.id===v),F=[V,W,...L].filter(Boolean).map(j=>j.ref.current);ru(F,f)}}P.current=!1}),onBlur:_(e.onBlur,()=>w(!1))})})}),tu="RovingFocusGroupItem",nu=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:i,...l}=e,c=we(),u=s||c,f=Wv(tu,n),p=f.currentTabStopId===u,g=Qc(n),{onFocusableItemAdd:h,onFocusableItemRemove:y,currentTabStopId:v}=f;return d.useEffect(()=>{if(r)return h(),()=>y()}
2,[r,h,y]),m.jsx(es.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:m.jsx(Y.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...l,ref:t,onMouseDown:_(e.onMouseDown,b=>{r?f.onItemFocus(u):b.preventDefault()}),onFocus:_(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:_(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){f.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const C=Gv(b,f.orientation,f.dir);if(C!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let x=g().filter(S=>S.focusable).map(S=>S.ref.current);if(C==="last")x.reverse();else if(C==="prev"||C==="next"){C==="prev"&&x.reverse();const S=x.indexOf(b.currentTarget);x=f.loop?Yv(x,S+1):x.slice(S+1)}setTimeout(()=>ru(x))}}),children:typeof i=="function"?i({isCurrentTabStop:p,hasTabStop:v!=null}):i})})});nu.displayName=tu;var zv={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Kv(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}a(Kv,"getDirectionAwareKey$1");function Gv(e,t,n){const r=Kv(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return zv[r]}a(Gv,"getFocusIntent$1");function ru(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}a(ru,"focusFirst$2");function Yv(e,t){return e.map((n,r)=>e[(t+r)%e.length])}a(Yv,"wrapArray$3");var Xv=eu,qv=nu,Zv=a(function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},"getDefaultParent"),$t=new WeakMap,tr=new WeakMap,nr={},wo=0,ou=a(function(e){return e&&(e.host||ou(e.parentNode))},"unwrapHost"),Qv=a(function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ou(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},"correctTargets"),Jv=a(function(e,t,n,r){var o=Qv(t,Array.isArray(e)?e:[e]);nr[n]||(nr[n]=new WeakMap);var s=nr[n],i=[],l=new Set,c=new Set(o),u=a(function(p){!p||l.has(p)||(l.add(p),u(p.parentNode))},"keep");o.forEach(u);var f=a(function(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,function(g){if(l.has(g))f(g);else try{var h=g.getAttribute(r),y=h!==null&&h!=="false",v=($t.get(g)||0)+1,b=(s.get(g)||0)+1;$t.set(g,v),s.set(g,b),i.push(g),v===1&&y&&tr.set(g,!0),b===1&&g.setAttribute(n,"true"),y||g.setAttribute(r,"true")}catch(C){console.error("aria-hidden: cannot operate on ",g,C)}})},"deep");return f(t),l.clear(),wo++,function(){i.forEach(function(p){var g=$t.get(p)-1,h=s.get(p)-1;$t.set(p,g),s.set(p,h),g||(tr.has(p)||p.removeAttribute(r),tr.delete(p)),h||p.removeAttribute(n)}),wo--,wo||($t=new WeakMap,$t=new WeakMap,tr=new WeakMap,nr={})}},"applyAttributeToOthers"),Kr=a(function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Zv(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Jv(r,o,n,"aria-hidden")):function(){return null}},"hideOthers"),dr="right-scroll-bar-position",fr="width-before-scroll-bar",ey="with-scroll-bars-hidden",ty="--removed-body-scroll-bar-size";function Co(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}a(Co,"assignRef");function ny(e,t){var n=d.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}a(ny,"useCallbackRef");var ry=typeof window<"u"?d.useLayoutEffect:d.useEffect,ga=new WeakMap;function oy(e,t){var n=ny(null,function(r){return e.forEach(function(o){return Co(o,r)})});return ry(function(){var r=ga.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(l){s.has(l)||Co(l,null)}),s.forEach(function(l){o.has(l)||Co(l,i)})}ga.set(n,e)},[e]),n}a(oy,"useMergeRefs");function sy(e){return e}a(sy,"ItoI");function iy(e,t){t===void 0&&(t=sy);var n=[],r=!1,o={read:a(function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},"read"),useMedium:a(function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(l){return l!==i})}},"useMedium"),assignSyncMedium:a(function(s){for(r=!0;n.length;){var i=n;
2n=[],i.forEach(s)}n={push:a(function(l){return s(l)},"push"),filter:a(function(){return n},"filter")}},"assignSyncMedium"),assignMedium:a(function(s){r=!0;var i=[];if(n.length){var l=n;n=[],l.forEach(s),i=n}var c=a(function(){var f=i;i=[],f.forEach(s)},"executeQueue"),u=a(function(){return Promise.resolve().then(c)},"cycle");u(),n={push:a(function(f){i.push(f),u()},"push"),filter:a(function(f){return i=i.filter(f),n},"filter")}},"assignMedium")};return o}a(iy,"innerCreateMedium");function ay(e){e===void 0&&(e={});var t=iy(null);return t.options=Le({async:!0,ssr:!1},e),t}a(ay,"createSidecarMedium");var su=a(function(e){var t=e.sideCar,n=Fl(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return d.createElement(r,Le({},n))},"SideCar$1");su.isSideCarExport=!0;function ly(e,t){return e.useMedium(t),su}a(ly,"exportSidecar");var iu=ay(),So=a(function(){},"nothing"),Gr=d.forwardRef(function(e,t){var n=d.useRef(null),r=d.useState({onScrollCapture:So,onWheelCapture:So,onTouchMoveCapture:So}),o=r[0],s=r[1],i=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,p=e.shards,g=e.sideCar,h=e.noIsolation,y=e.inert,v=e.allowPinchZoom,b=e.as,C=b===void 0?"div":b,w=e.gapMode,x=Fl(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=g,P=oy([n,t]),R=Le(Le({},x),o);return d.createElement(d.Fragment,null,f&&d.createElement(S,{sideCar:iu,removeScrollBar:u,shards:p,noIsolation:h,inert:y,setCallbacks:s,allowPinchZoom:!!v,lockRef:n,gapMode:w}),i?d.cloneElement(d.Children.only(l),Le(Le({},R),{ref:P})):d.createElement(C,Le({},R,{className:c,ref:P}),l))});Gr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Gr.classNames={fullWidth:fr,zeroRight:dr};var cy=a(function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__},"getNonce");function uy(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=cy();return t&&e.setAttribute("nonce",t),e}a(uy,"makeStyleTag");function dy(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}a(dy,"injectStyles");function fy(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}a(fy,"insertStyleTag");var py=a(function(){var e=0,t=null;return{add:a(function(n){e==0&&(t=uy())&&(dy(t,n),fy(t)),e++},"add"),remove:a(function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)},"remove")}},"stylesheetSingleton"),hy=a(function(){var e=py();return function(t,n){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},"styleHookSingleton"),au=a(function(){var e=hy(),t=a(function(n){var r=n.styles,o=n.dynamic;return e(r,o),null},"Sheet");return t},"styleSingleton"),my={left:0,top:0,right:0,gap:0},Po=a(function(e){return parseInt(e||"",10)||0},"parse"),gy=a(function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Po(n),Po(r),Po(o)]},"getOffset"),vy=a(function(e){if(e===void 0&&(e="margin"),typeof window>"u")return my;var t=gy(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},"getGapWidth"),yy=au(),Yt="data-scroll-locked",by=a(function(e,t,n,r){var o=e.left,s=e.top,i=e.right,l=e.gap;return n===void 0&&(n="margin"),` 3 .`.concat(ey,` { 4 overflow: hidden `).concat(r,`; 5 padding-right: `).concat(l,"px ").concat(r,`; 6 } 7 body[`).concat(Yt,`] { 8 overflow: hidden `).concat(r,`; 9 overscroll-behavior: contain; 10 `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` 11 padding-left: `.concat(o,`px; 12 padding-top: `).concat(s,`px; 13 padding-right: `).concat(i,`px; 14 margin-left:0; 15 margin-top:0; 16 margin-right: `).concat(l,"px ").concat(r,`; 17 `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),` 18 } 19 20 .`).concat(dr,` { 21 right: `).concat(l,"px ").concat(r,`; 22 } 23 24 .`).concat(fr,` { 25 margin-right: `).concat(l,"px ").concat(r,`; 26 } 27 28 .`).concat(dr," .").concat(dr,` { 29 right: 0 `).concat(r,`; 30 } 31 32 .`).concat(fr," .").concat(fr,` { 33 margin-right: 0 `).concat(r,`; 34 } 35 36 body[`).concat(Yt,`] { 37 `).concat(ty,": ").concat(l,`px; 38 } 39`)},"getStyles"),va=a(function(){var e=parseInt(document.body.getAttribute(Yt)||"0",10);return isFinite(e)?e:0},"getCurrentUseCounter"),xy=a(function(){d.useEffect(function(){return document.body.setAttribute(Yt,(va()+1).toString()),function(){var e=va()-1;e<=0?document.body.removeAttribute(Yt):document.body.setAttribute(Yt,e.toString())}},[])},"useLockAttribute"),wy=a(function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;xy();var s=d.useMemo(function(){return vy(o)},[o]);return d.createElement(yy,{styles:by(s,!t,o,n?"":"!important")})},"RemoveScrollBar"),ts=!1;if(typeof window<"u")try{var rr=Object.defineProperty({},"passive",{get:a(function(){return ts=!0,!0},"get")});window.addEventListener("test",rr,rr),window.removeEventListener("test",rr,rr)}catch{ts=!1}var Bt=ts?{passive:!1}:!1,Cy=a(function(e){return e.tagName==="TEXTAREA"},"alwaysContainsScroll"),lu=a(function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Cy(e)&&n[t]==="visible")},"elementCanBeScrolled"),Sy=a(function(e){return lu(e,"overflowY")},"elementCouldBeVScrolled"),Py=a(function(e){return lu(e,"overflowX")},"elementCouldBeHScrolled"),ya=a(function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=cu(e,r);if(o){var s=uu(e,r),i=s[1],l=s[2];if(i>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},"locationCouldBeScrolled"),Ey=a(function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},"getVScrollVariables"),Ty=a(function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},"getHScrollVariables"),cu=a(function(e,t){return e==="v"?Sy(t):Py(t)},"elementCouldBeScrolled"),uu=a(function(e,t){return e==="v"?Ey(t):Ty(t)},"getScrollVariables"),Ry=a(function(e,t){return e==="h"&&t==="rtl"?-1:1},"getDirectionFactor"),Ay=a(function(e,t,n,r,o){var s=Ry(e,window.getComputedStyle(t).direction),i=s*r,l=n.target,c=t.contains(l),u=!1,f=i>0,p=0,g=0;do{var h=uu(e,l),y=h[0],v=h[1],b=h[2],C=v-b-s*y;(y||C)&&cu(e,l)&&(p+=C,g+=y),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(f&&Math.abs(p)<1||!f&&Math.abs(g)<1)&&(u=!0),u},"handleScroll"),or=a(function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},"getTouchXY"),ba=a(function(e){return[e.deltaX,e.deltaY]},"getDeltaXY"),xa=a(function(e){return e&&"current"in e?e.current:e},"extractRef"),My=a(function(e,t){return e[0]===t[0]&&e[1]===t[1]},"deltaCompare"),Ny=a(function(e){return` 40 .block-interactivity-`.concat(e,` {pointer-events: none;} 41 .allow-interactivity-`).concat(e,` {pointer-events: all;} 42`)},"generateStyle"),Dy=0,Ht=[];function Iy(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),o=d.useState(Dy++)[0],s=d.use
42State(au)[0],i=d.useRef(e);d.useEffect(function(){i.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=Rh([e.lockRef.current],(e.shards||[]).map(xa),!0).filter(Boolean);return v.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=d.useCallback(function(v,b){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!i.current.allowPinchZoom;var C=or(v),w=n.current,x="deltaX"in v?v.deltaX:w[0]-C[0],S="deltaY"in v?v.deltaY:w[1]-C[1],P,R=v.target,E=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in v&&E==="h"&&R.type==="range")return!1;var T=ya(E,R);if(!T)return!0;if(T?P=E:(P=E==="v"?"h":"v",T=ya(E,R)),!T)return!1;if(!r.current&&"changedTouches"in v&&(x||S)&&(r.current=P),!P)return!0;var O=r.current||P;return Ay(O,b,v,O==="h"?x:S)},[]),c=d.useCallback(function(v){var b=v;if(!(!Ht.length||Ht[Ht.length-1]!==s)){var C="deltaY"in b?ba(b):or(b),w=t.current.filter(function(P){return P.name===b.type&&(P.target===b.target||b.target===P.shadowParent)&&My(P.delta,C)})[0];if(w&&w.should){b.cancelable&&b.preventDefault();return}if(!w){var x=(i.current.shards||[]).map(xa).filter(Boolean).filter(function(P){return P.contains(b.target)}),S=x.length>0?l(b,x[0]):!i.current.noIsolation;S&&b.cancelable&&b.preventDefault()}}},[]),u=d.useCallback(function(v,b,C,w){var x={name:v,delta:b,target:C,should:w,shadowParent:Oy(C)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(S){return S!==x})},1)},[]),f=d.useCallback(function(v){n.current=or(v),r.current=void 0},[]),p=d.useCallback(function(v){u(v.type,ba(v),v.target,l(v,e.lockRef.current))},[]),g=d.useCallback(function(v){u(v.type,or(v),v.target,l(v,e.lockRef.current))},[]);d.useEffect(function(){return Ht.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",c,Bt),document.addEventListener("touchmove",c,Bt),document.addEventListener("touchstart",f,Bt),function(){Ht=Ht.filter(function(v){return v!==s}),document.removeEventListener("wheel",c,Bt),document.removeEventListener("touchmove",c,Bt),document.removeEventListener("touchstart",f,Bt)}},[]);var h=e.removeScrollBar,y=e.inert;return d.createElement(d.Fragment,null,y?d.createElement(s,{styles:Ny(o)}):null,h?d.createElement(wy,{gapMode:e.gapMode}):null)}a(Iy,"RemoveScrollSideCar");function Oy(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}a(Oy,"getOutermostShadowParent");const jy=ly(iu,Iy);var Vn=d.forwardRef(function(e,t){return d.createElement(Gr,Le({},e,{ref:t,sideCar:jy}))});Vn.classNames=Gr.classNames;var ns=["Enter"," "],ky=["ArrowDown","PageUp","Home"],du=["ArrowUp","PageDown","End"],_y=[...ky,...du],Ly={ltr:[...ns,"ArrowRight"],rtl:[...ns,"ArrowLeft"]},Fy={ltr:["ArrowLeft"],rtl:["ArrowRight"]},$n="Menu",[En,Vy,$y]=Vs($n),[jt,fu]=Re($n,[$y,an,Jc]),Bn=an(),pu=Jc(),[hu,gt]=jt($n),[By,Hn]=jt($n),mu=a(e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=e,l=Bn(t),[c,u]=d.useState(null),f=d.useRef(!1),p=ye(s),g=jn(o);return d.useEffect(()=>{const h=a(()=>{f.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},"handleKeyDown"),y=a(()=>f.current=!1,"handlePointer");return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),m.jsx(Ur,{...l,children:m.jsx(hu,{scope:t,open:n,onOpenChange:p,content:c,onContentChange:u,children:m.jsx(By,{scope:t,onClose:d.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:g,modal:i,children:r})})})},"Menu");mu.displayName=$n;var Hy="MenuAnchor",Us=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Bn(n);return m.jsx(zr,{...o,...r,ref:t})});Us.displayName=Hy;var zs="MenuPortal",[Wy,gu]=jt(zs,{forceMount:void 0}),vu=a(e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=gt(zs,t);return m.jsx(Wy,{scope:t,forceMount:n,children:m.jsx(He,{present:n||s.open,children:m.jsx(Ln,{asChild:!0,container:o,children:r})})})},"MenuPortal");vu.displayName=zs;var Te="MenuContent",[Uy,Ks]=jt(Te),yu=d.forwardRef((e,t)=>
42{const n=gu(Te,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=gt(Te,e.__scopeMenu),i=Hn(Te,e.__scopeMenu);return m.jsx(En.Provider,{scope:e.__scopeMenu,children:m.jsx(He,{present:r||s.open,children:m.jsx(En.Slot,{scope:e.__scopeMenu,children:i.modal?m.jsx(zy,{...o,ref:t}):m.jsx(Ky,{...o,ref:t})})})})}),zy=d.forwardRef((e,t)=>{const n=gt(Te,e.__scopeMenu),r=d.useRef(null),o=X(t,r);return d.useEffect(()=>{const s=r.current;if(s)return Kr(s)},[]),m.jsx(Gs,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:_(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:a(()=>n.onOpenChange(!1),"onDismiss")})}),Ky=d.forwardRef((e,t)=>{const n=gt(Te,e.__scopeMenu);return m.jsx(Gs,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:a(()=>n.onOpenChange(!1),"onDismiss")})}),Gy=ct("MenuContent.ScrollLock"),Gs=d.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:g,onDismiss:h,disableOutsideScroll:y,...v}=e,b=gt(Te,n),C=Hn(Te,n),w=Bn(n),x=pu(n),S=Vy(n),[P,R]=d.useState(null),E=d.useRef(null),T=X(t,E,b.onContentChange),O=d.useRef(0),I=d.useRef(""),L=d.useRef(0),V=d.useRef(null),W=d.useRef("right"),H=d.useRef(0),F=y?Vn:d.Fragment,j=y?{as:Gy,allowPinchZoom:!0}:void 0,k=a(A=>{const J=I.current+A,ae=S().filter(N=>!N.disabled),z=document.activeElement,G=ae.find(N=>N.ref.current===z)?.textValue,K=ae.map(N=>N.textValue),ne=sb(K,J,G),le=ae.find(N=>N.textValue===ne)?.ref.current;a((function N(q){I.current=q,window.clearTimeout(O.current),q!==""&&(O.current=window.setTimeout(()=>N(""),1e3))}),"updateSearch")(J),le&&setTimeout(()=>le.focus())},"handleTypeaheadSearch");d.useEffect(()=>()=>window.clearTimeout(O.current),[]),Wr();const $=d.useCallback(A=>W.current===V.current?.side&&ab(A,V.current?.area),[]);return m.jsx(Uy,{scope:n,searchRef:I,onItemEnter:d.useCallback(A=>{$(A)&&A.preventDefault()},[$]),onItemLeave:d.useCallback(A=>{$(A)||(E.current?.focus(),R(null))},[$]),onTriggerLeave:d.useCallback(A=>{$(A)&&A.preventDefault()},[$]),pointerGraceTimerRef:L,onPointerGraceIntentChange:d.useCallback(A=>{V.current=A},[]),children:m.jsx(F,{...j,children:m.jsx(_n,{asChild:!0,trapped:o,onMountAutoFocus:_(s,A=>{A.preventDefault(),E.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:m.jsx(kn,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:g,onDismiss:h,children:m.jsx(Xv,{asChild:!0,...x,dir:C.dir,orientation:"vertical",loop:r,currentTabStopId:P,onCurrentTabStopIdChange:R,onEntryFocus:_(c,A=>{C.isUsingKeyboardRef.current||A.preventDefault()}),preventScrollOnEntryFocus:!0,children:m.jsx(Hs,{role:"menu","aria-orientation":"vertical","data-state":ku(b.open),"data-radix-menu-content":"",dir:C.dir,...w,...v,ref:T,style:{outline:"none",...v.style},onKeyDown:_(v.onKeyDown,A=>{const ae=A.target.closest("[data-radix-menu-content]")===A.currentTarget,z=A.ctrlKey||A.altKey||A.metaKey,G=A.key.length===1;ae&&(A.key==="Tab"&&A.preventDefault(),!z&&G&&k(A.key));const K=E.current;if(A.target!==K||!_y.includes(A.key))return;A.preventDefault();const le=S().filter(N=>!N.disabled).map(N=>N.ref.current);du.includes(A.key)&&le.reverse(),rb(le)}),onBlur:_(e.onBlur,A=>{A.currentTarget.contains(A.target)||(window.clearTimeout(O.current),I.current="")}),onPointerMove:_(e.onPointerMove,Tn(A=>{const J=A.target,ae=H.current!==A.clientX;if(A.currentTarget.contains(J)&&ae){const z=A.clientX>H.current?"right":"left";W.current=z,H.current=A.clientX}}))})})})})})})});yu.displayName=Te;var Yy="MenuGroup",Ys=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(Y.div,{role:"group",...r,ref:t})});Ys.displayName=Yy;var Xy="MenuLabel",bu=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(Y.div,{...r,ref:t})});bu.displayName=Xy;var xr="MenuItem",wa="menu.itemSelect",Yr=d.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=d.useRef(null),i=Hn(xr,e.__scopeMenu),l=Ks(xr,e.__scopeMenu),c=X(t,s),u=d.useRef(!1),f=a(()=>{const p=s.current;if(!n&&p){const g=new CustomEvent(wa,{bubbles:!0,cancelable:!0});p.addEventListener(wa,h=>r?.(h),{once:!0}),Lc(p,g),g.defaultPrevented?u.current=!1:i.onClose()}},"handleSelect");return m.jsx(xu,{...o,ref:c,disabled:n,onClick:_(e.onClick,f),onPointerDown:a(p=>{e.onPointerDown?.(p),u.current=!0},"onPointerDown"),onPointerUp:_(e.onPointerUp,p=>{u.current||p.currentTarget?.click()}),onKeyDown:_(e.onKeyDown,p=>{const g=l.searchRef.current!=="";n||g&&p.key===" "||ns.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Yr.displayName=xr;var xu=d.forwardRef((e,t)=>
42{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,i=Ks(xr,n),l=pu(n),c=d.useRef(null),u=X(t,c),[f,p]=d.useState(!1),[g,h]=d.useState("");return d.useEffect(()=>{const y=c.current;y&&h((y.textContent??"").trim())},[s.children]),m.jsx(En.ItemSlot,{scope:n,disabled:r,textValue:o??g,children:m.jsx(qv,{asChild:!0,...l,focusable:!r,children:m.jsx(Y.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:u,onPointerMove:_(e.onPointerMove,Tn(y=>{r?i.onItemLeave(y):(i.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:_(e.onPointerLeave,Tn(y=>i.onItemLeave(y))),onFocus:_(e.onFocus,()=>p(!0)),onBlur:_(e.onBlur,()=>p(!1))})})})}),qy="MenuCheckboxItem",wu=d.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return m.jsx(Tu,{scope:e.__scopeMenu,checked:n,children:m.jsx(Yr,{role:"menuitemcheckbox","aria-checked":wr(n)?"mixed":n,...o,ref:t,"data-state":Zs(n),onSelect:_(o.onSelect,()=>r?.(wr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});wu.displayName=qy;var Cu="MenuRadioGroup",[Zy,Qy]=jt(Cu,{value:void 0,onValueChange:a(()=>{},"onValueChange")}),Su=d.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=ye(r);return m.jsx(Zy,{scope:e.__scopeMenu,value:n,onValueChange:s,children:m.jsx(Ys,{...o,ref:t})})});Su.displayName=Cu;var Pu="MenuRadioItem",Eu=d.forwardRef((e,t)=>{const{value:n,...r}=e,o=Qy(Pu,e.__scopeMenu),s=n===o.value;return m.jsx(Tu,{scope:e.__scopeMenu,checked:s,children:m.jsx(Yr,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":Zs(s),onSelect:_(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Eu.displayName=Pu;var Xs="MenuItemIndicator",[Tu,Jy]=jt(Xs,{checked:!1}),Ru=d.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=Jy(Xs,n);return m.jsx(He,{present:r||wr(s.checked)||s.checked===!0,children:m.jsx(Y.span,{...o,ref:t,"data-state":Zs(s.checked)})})});Ru.displayName=Xs;var eb="MenuSeparator",Au=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(Y.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Au.displayName=eb;var tb="MenuArrow",Mu=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Bn(n);return m.jsx(Ws,{...o,...r,ref:t})});Mu.displayName=tb;var qs="MenuSub",[nb,Nu]=jt(qs),Du=a(e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,s=gt(qs,t),i=Bn(t),[l,c]=d.useState(null),[u,f]=d.useState(null),p=ye(o);return d.useEffect(()=>(s.open===!1&&p(!1),()=>p(!1)),[s.open,p]),m.jsx(Ur,{...i,children:m.jsx(hu,{scope:t,open:r,onOpenChange:p,content:u,onContentChange:f,children:m.jsx(nb,{scope:t,contentId:we(),triggerId:we(),trigger:l,onTriggerChange:c,children:n})})})},"MenuSub");Du.displayName=qs;var gn="MenuSubTrigger",Iu=d.forwardRef((e,t)=>{const n=gt(gn,e.__scopeMenu),r=Hn(gn,e.__scopeMenu),o=Nu(gn,e.__scopeMenu),s=Ks(gn,e.__scopeMenu),i=d.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=s,u={__scopeMenu:e.__scopeMenu},f=d.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return d.useEffect(()=>f,[f]),d.useEffect(()=>{const p=l.current;return()=>{window.clearTimeout(p),c(null)}},[l,c]),m.jsx(Us,{asChild:!0,...u,children:m.jsx(xu,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":ku(n.open
42),...e,ref:nn(t,o.onTriggerChange),onClick:a(p=>{e.onClick?.(p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},"onClick"),onPointerMove:_(e.onPointerMove,Tn(p=>{s.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:_(e.onPointerLeave,Tn(p=>{f();const g=n.content?.getBoundingClientRect();if(g){const h=n.content?.dataset.side,y=h==="right",v=y?-5:5,b=g[y?"left":"right"],C=g[y?"right":"left"];s.onPointerGraceIntentChange({area:[{x:p.clientX+v,y:p.clientY},{x:b,y:g.top},{x:C,y:g.top},{x:C,y:g.bottom},{x:b,y:g.bottom}],side:h}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(p),p.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:_(e.onKeyDown,p=>{const g=s.searchRef.current!=="";e.disabled||g&&p.key===" "||Ly[r.dir].includes(p.key)&&(n.onOpenChange(!0),n.content?.focus(),p.preventDefault())})})})});Iu.displayName=gn;var Ou="MenuSubContent",ju=d.forwardRef((e,t)=>{const n=gu(Te,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=gt(Te,e.__scopeMenu),i=Hn(Te,e.__scopeMenu),l=Nu(Ou,e.__scopeMenu),c=d.useRef(null),u=X(t,c);return m.jsx(En.Provider,{scope:e.__scopeMenu,children:m.jsx(He,{present:r||s.open,children:m.jsx(En.Slot,{scope:e.__scopeMenu,children:m.jsx(Gs,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:a(f=>{i.isUsingKeyboardRef.current&&c.current?.focus(),f.preventDefault()},"onOpenAutoFocus"),onCloseAutoFocus:a(f=>f.preventDefault(),"onCloseAutoFocus"),onFocusOutside:_(e.onFocusOutside,f=>{f.target!==l.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:_(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:_(e.onKeyDown,f=>{const p=f.currentTarget.contains(f.target),g=Fy[i.dir].includes(f.key);p&&g&&(s.onOpenChange(!1),l.trigger?.focus(),f.preventDefault())})})})})})});ju.displayName=Ou;function ku(e){return e?"open":"closed"}a(ku,"getOpenState");function wr(e){return e==="indeterminate"}a(wr,"isIndeterminate$1");function Zs(e){return wr(e)?"indeterminate":e?"checked":"unchecked"}a(Zs,"getCheckedState");function rb(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}a(rb,"focusFirst$1");function ob(e,t){return e.map((n,r)=>e[(t+r)%e.length])}a(ob,"wrapArray$2");function sb(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=ob(e,Math.max(s,0));o.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}a(sb,"getNextMatch");function ib(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const l=t[s],c=t[i],u=l.x,f=l.y,p=c.x,g=c.y;f>r!=g>r&&n<(p-u)*(r-f)/(g-f)+u&&(o=!o)}return o}a(ib,"isPointInPolygon");function ab(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return ib(n,t)}a(ab,"isPointerInGraceArea");function Tn(e){return t=>t.pointerType==="mouse"?e(t):void 0}a(Tn,"whenMouse");var lb=mu,cb=Us,ub=vu,db=yu,fb=Ys,pb=bu,hb=Yr,mb=wu,gb=Su,vb=Eu,yb=Ru,bb=Au,xb=Mu,wb=Du,Cb=Iu,Sb=ju,Xr="DropdownMenu",[Pb]=Re(Xr,[fu]),ge=fu(),[Eb,_u]=Pb(Xr),Lu=a(e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:i,modal:l=!0}=e,c=ge(t),u=d.useRef(null),[f,p]=Nt({prop:o,defaultProp:s??!1,onChange:i,caller:Xr});return m.jsx(Eb,{scope:t,triggerId:we(),triggerRef:u,contentId:we(),open:f,onOpenChange:p,onOpenToggle:d.useCallback(()=>p(g=>!g),[p]),modal:l,children:m.jsx(lb,{...c,open:f,onOpenChange:p,dir:r,modal:l,children:n})})},"DropdownMenu");Lu.displayName=Xr;var Fu="DropdownMenuTrigger",Vu=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=_u(Fu,n),i=ge(n);return m.jsx(cb,{asChild:!0,...i,children:m.jsx(Y.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:nn(t,s.triggerRef),onPointerDown:_(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(s.onOpenToggle(),s.open||l.preventDefault())}),onKeyDown:_(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&s.onOpenToggle(),l.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});
42Vu.displayName=Fu;var Tb="DropdownMenuPortal",$u=a(e=>{const{__scopeDropdownMenu:t,...n}=e,r=ge(t);return m.jsx(ub,{...r,...n})},"DropdownMenuPortal");$u.displayName=Tb;var Bu="DropdownMenuContent",Hu=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=_u(Bu,n),s=ge(n),i=d.useRef(!1);return m.jsx(db,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:_(e.onCloseAutoFocus,l=>{i.current||o.triggerRef.current?.focus(),i.current=!1,l.preventDefault()}),onInteractOutside:_(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,f=c.button===2||u;(!o.modal||f)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Hu.displayName=Bu;var Rb="DropdownMenuGroup",Wu=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ge(n);return m.jsx(fb,{...o,...r,ref:t})});Wu.displayName=Rb;var Ab="DropdownMenuLabel",Mb=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ge(n);return m.jsx(pb,{...o,...r,ref:t})});Mb.displayName=Ab;var Nb="DropdownMenuItem",Uu=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ge(n);return m.jsx(hb,{...o,...r,ref:t})});Uu.displayName=Nb;var Db="DropdownMenuCheckboxItem",zu=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ge(n);return m.jsx(mb,{...o,...r,ref:t})});zu.displayName=Db;var Ib="DropdownMenuRadioGroup",Ob=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ge(n);return m.jsx(gb,{...o,...r,ref:t})});Ob.displayName=Ib;var jb="DropdownMenuRadioItem",kb=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ge(n);return m.jsx(vb,{...o,...r,ref:t})});kb.displayName=jb;var _b="DropdownMenuItemIndicator",Ku=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ge(n);return m.jsx(yb,{...o,...r,ref:t})});Ku.displayName=_b;var Lb="DropdownMenuSeparator",Gu=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ge(n);return m.jsx(bb,{...o,...r,ref:t})});Gu.displayName=Lb;var Fb="DropdownMenuArrow",Yu=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ge(n);return m.jsx(xb,{...o,...r,ref:t})});Yu.displayName=Fb;var Vb=a(e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:s}=e,i=ge(t),[l,c]=Nt({prop:r,defaultProp:s??!1,onChange:o,caller:"DropdownMenuSub"});return m.jsx(wb,{...i,open:l,onOpenChange:c,children:n})},"DropdownMenuSub"),$b="DropdownMenuSubTrigger",Xu=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ge(n);return m.jsx(Cb,{...o,...r,ref:t})});Xu.displayName=$b;var Bb="DropdownMenuSubContent",qu=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ge(n);return m.jsx(Sb,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});qu.displayName=Bb;var Hb=Lu,Wb=Vu,Ub=$u,zb=Hu,MT=Wu,Kb=Uu,NT=zu,DT=Ku,Gb=Gu,IT=Yu,OT=Vb,jT=Xu,kT=qu;const Zu=a(({children:e,contentProps:t,disabled:n,modal:r,onOpenChange:o,open:s,trigger:i})=>{const[l,c]=d.useState(!1),u=s!==void 0,f=u?s:l,p=d.useCallback(g=>{u&&o&&o(g),u||c(g),o&&o(g)},[u,o]);return m.jsxs(Hb,{open:f,onOpenChange:p,modal:r,children:[m.jsx(Wb,{disabled:n,asChild:!0,children:typeof i=="function"?i({open:f}):i}),m.jsx(Ub,{children:m.jsx(zb,{sideOffset:4,onFocusOutside:a(()=>p(!1),"onFocusOutside"),...t,className:D("bg-bolt-ds-bgAlt border-1 border-bolt-ds-borderPrimary rounded-md text-sm select-none flex flex-col p-1 gap-1 z-max overflow-x-hidden overflow-y-auto","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[side=bottom]:slide-in-from-top-1.5 data-[side=bottom]:slide-out-to-top-1.5 origin-[--radix-dropdown-menu-content-transform-origin]","min-w-[--radix-dropdown-menu-trigger-width]","max-h-[--radix-dropdown-menu-content-available-height]",t?.className),children:e})})]})},"Dropdown");Zu.Item=({className:e,onClick:t,children:n,disabled:r})=>m.jsx(Kb,{className:D("w-full outline-none px-2 py-1.5 rounded-md cursor-pointer bg-transparent text-xs min-h-[30px]","data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 data-[disabled]:hover:bg-transparent data-[disabled]:pointer-events-none","hover:bg-bolt-ds-utilHover","data-[highlighted]:bg-bolt-ds-utilHover",e),onSelect:t,disabled:r,children:n});Zu.Separator=({className:e})=>m.jsx(Gb,{className:D("-mx-1 h-px bg-bolt-ds-divider",e)});const Qu=d.createContext(void 0);function Yb(...e){const t=e.flatMap(n=>
42n?.split(/\s+/)??[]).filter(Boolean);return t.length?[...new Set(t)].join(" "):void 0}a(Yb,"mergeIds");function Eo(e,t){return e.includes(t)?e:[...e,t]}a(Eo,"registerId");function To(e,t){return e.filter(n=>n!==t)}a(To,"unregisterId");function ln(){return d.useContext(Qu)}a(ln,"useFieldContext");function Wn({id:e,ariaDescribedBy:t}){const n=ln();return{id:e??n?.controlId,ariaDescribedBy:Yb(t,n?.descriptionIds.join(" "),n?.warningIds.join(" "),n?.errorIds.join(" "))}}a(Wn,"useFieldControlProps");function Qs(e,t){const n=ln(),r=d.useId();return e??(n?`field-${t}-${r}`:void 0)}a(Qs,"useFieldSlotId");function Js(e,t,n){d.useEffect(()=>{if(!(!e||!t||!n))return t(e),()=>n(e)},[e,t,n])}a(Js,"useRegisterFieldSlotId");var Xb=Symbol.for("react.lazy"),Cr=kr[" use ".trim().toString()];function qb(e){return typeof e=="object"&&e!==null&&"then"in e}a(qb,"isPromiseLike");function Ju(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Xb&&"_payload"in e&&qb(e._payload)}a(Ju,"isLazyComponent");function Zb(e){const t=Qb(e),n=d.forwardRef((r,o)=>{let{children:s,...i}=r;Ju(s)&&typeof Cr=="function"&&(s=Cr(s._payload));const l=d.Children.toArray(s),c=l.find(ex);if(c){const u=c.props.children,f=l.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return m.jsx(t,{...i,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return m.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}a(Zb,"createSlot$1");function Qb(e){const t=d.forwardRef((n,r)=>{let{children:o,...s}=n;if(Ju(o)&&typeof Cr=="function"&&(o=Cr(o._payload)),d.isValidElement(o)){const i=nx(o),l=tx(s,o.props);return o.type!==d.Fragment&&(l.ref=r?nn(r,i):i),d.cloneElement(o,l)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}a(Qb,"createSlotClone$1");var Jb=Symbol("radix.slottable");function ex(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Jb}a(ex,"isSlottable$2");function tx(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...l)=>{const c=s(...l);return o(...l),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}a(tx,"mergeProps$2");function nx(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}a(nx,"getElementRef$4");var rx=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ox=rx.reduce((e,t)=>{const n=Zb(`Primitive.${t}`),r=d.forwardRef((o,s)=>{const{asChild:i,...l}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(c,{...l,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),sx="Label",ed=d.forwardRef((e,t)=>m.jsx(ox.label,{...e,ref:t,onMouseDown:a(n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())},"onMouseDown")}));ed.displayName=sx;function ix({className:e,...t}){return m.jsx(ed,{"data-slot":"label",className:D("gap-2 text-sm leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed",e),...t})}a(ix,"Label");const ax=d.forwardRef(({className:e,children:t,orientation:n="horizontal",decorative:r=!0,...o},s)=>{const i=d.Children.count(t)>0,l=D("shrink-0 bg-bolt-ds-divider",n==="horizontal"?"h-px w-full":"h-full w-px");return i?m.jsxs("div",{ref:s,role:r?"none":"separator","aria-orientation":n==="horizontal"?void 0:n,className:D("text-bolt-ds-textTertiary text-xs",n==="horizontal"?"grid w-full grid-cols-[1fr_auto_1fr] items-center gap-3":"grid h-full grid-rows-[1fr_auto_1fr] justify-items-center gap-3",e),...o,children:[m.jsx("span",{"aria-hidden":"true",className:l}),t,m.jsx("span",{"aria-hidden":"true",className:l})]}
42):m.jsx("div",{ref:s,role:r?"none":"separator","aria-orientation":n==="horizontal"?void 0:n,className:D(l,e),...o})});ax.displayName="Separator";const lx=_r(` 43 data-[invalid=true]:text-bolt-ds-danger 44 gap-1.5 group/field flex w-full 45 `,{variants:{orientation:{vertical:"flex-col *:w-full [&>.sr-only]:w-auto",horizontal:` 46 flex-row 47 items-center 48 has-[>[data-slot=field-content]]:items-start 49 *:data-[slot=field-label]:flex-auto 50 [&:has(>[data-slot=field-content])>:is([role=checkbox],[role=radio])]:mt-px 51 `,responsive:` 52 flex-col 53 *:w-full 54 [&>.sr-only]:w-auto 55 @md/field-group:flex-row 56 @md/field-group:items-center 57 @md/field-group:*:w-auto 58 @md/field-group:has-[>[data-slot=field-content]]:items-start 59 @md/field-group:*:data-[slot=field-label]:flex-auto 60 @md/field-group:[&:has(>[data-slot=field-content])>:is([role=checkbox],[role=radio])]:mt-px 61 `}},defaultVariants:{orientation:"vertical"}});function _T({className:e,orientation:t="vertical",...n}){const r=d.useId(),[o,s]=d.useState([]),[i,l]=d.useState([]),[c,u]=d.useState([]),f=d.useCallback(C=>{s(w=>Eo(w,C))},[]),p=d.useCallback(C=>{s(w=>To(w,C))},[]),g=d.useCallback(C=>{l(w=>Eo(w,C))},[]),h=d.useCallback(C=>{l(w=>To(w,C))},[]),y=d.useCallback(C=>{u(w=>Eo(w,C))},[]),v=d.useCallback(C=>{u(w=>To(w,C))},[]),b=d.useMemo(()=>({controlId:r,descriptionIds:o,errorIds:i,warningIds:c,registerDescriptionId:f,unregisterDescriptionId:p,registerErrorId:g,unregisterErrorId:h,registerWarningId:y,unregisterWarningId:v}),[r,o,i,c,f,p,g,h,y,v]);return m.jsx(Qu.Provider,{value:b,children:m.jsx("div",{"data-slot":"field","data-orientation":t,className:D(lx({orientation:t}),e),...n})})}a(_T,"Field");function LT({className:e,htmlFor:t,...n}){const r=ln();return m.jsx(ix,{"data-slot":"field-label",htmlFor:t??r?.controlId,className:D("flex gap-2 leading-snug w-fit text-bolt-ds-textPrimary dark:text-bolt-ds-textSecondary","group/field-label peer/field-label",` 62 *:data-[slot=field]:p-2.5 63 group-data-[disabled=true]/field:opacity-50 64 65 group-[&:has([role=checkbox]):not(:has([data-slot=field-description]))]/field:font-normal 66 67 has-[[data-state=checked]]:bg-bolt-ds-brandHover 68 has-[[data-state=checked]]:bg-opacity-10 69 has-[[data-state=checked]]:border-[rgb(var(--bolt-ds-brandHover))] 70 has-[[data-state=checked]]:border-opacity-30 71 72 has-[>[data-slot=field]]:border 73 has-[>[data-slot=field]]:border-bolt-ds-borderPrimary 74 has-[>[data-slot=field]]:flex-col 75 has-[>[data-slot=field]]:hover:bg-bolt-ds-utilHover 76 has-[>[data-slot=field]]:rounded-lg 77 has-[>[data-slot=field]]:w-full 78 `,e),...n})}a(LT,"FieldLabel");function FT({className:e,id:t,...n}){const r=ln(),o=Qs(t,"description");return Js(o,r?.registerDescriptionId,r?.unregisterDescriptionId),m.jsx("p",{id:o,"data-slot":"field-description",className:D("text-bolt-ds-textTertiary text-left text-sm [[data-variant=legend]+&]:-mt-1.5 leading-normal font-normal group-data-[orientation=horizontal]/field:text-balance","last:mt-0 nth-last-2:-mt-1","[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-bolt-ds-brand",e),...n})}a(FT,"FieldDescription");function VT({className:e,children:t,errors:n,id:r,...o}){const s=ln(),i=Qs(r,"error"),l=!!t,c=!l&&n?.length?[...new Map(n.map(h=>[h?.message,h])).values()]:void 0,u=c?.length===1&&!!c[0]?.message,f=(c?.length??0)>1,p=l||u||f;if(Js(p?i:void 0,s?.registerErrorId,s?.unregisterErrorId),!p)return null;const g=l?t:u?c[0]?.message:m.jsx("ul",{className:"ml-4 flex list-disc flex-col gap-1",children:c?.map((h,y)=>h?.message&&m.jsx("li",{children:h.message},y))});return m.jsx("div",{role:"alert",id:i,"data-slot":"field-error",className:D("text-bolt-ds-danger text-sm font-normal",e),...o,children:g})}a(VT,"FieldError");function $T({className:e,children:t,id:n,...r}){const o=!!t,s=ln(),i=Qs(n,"warning");return Js(o?i:void 0,s?.registerWarningId,s?.unregisterWarningId),o?m.jsx("div",{id:i,"data-slot":"field-warning",className:D("text-bolt-ds-warning text-sm font-normal",e),...r,children:t}):null}a($T,"FieldWarning");const td=d.memo(({text:e,surface:t})=>m.jsxs(Oc,{children:[m.jsx(jc,{asChild:!0,children:m.jsx("button",{type:"button","aria-label":e,className:"text-bolt-ds-textTertiary inline-flex items-center rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-bolt-ds-brandHover bg-transparent",onClick:a(n=>{n.preventDefault(),n.stopPropagation()},"onClick"),onPointerDown:a(n=>{n.stopPropagation()},"onPointerDown"),children:m.jsx("span",{"aria-hidden":"true",className:"i-ph:question size-4"})})}),m.jsx(kc,{children:m.jsx(_c,{side:"bottom",align:"start",alignOffset:-10,sideOffset:6,maxWidth:200,truncate:!1,surface:t,children:e})})]}));td.displayName="FieldHelp";const BT=d.forwardRef(({label:e,variant:t="vertical",size:n="md",error:r,warning:o,hint:s,className:i,disabled:l=!1,placeholder:c,inputClassName:u,onChange:f,onValueChange:p,labelTooltip:g,labelTooltipSurface:h,errorClassName:y,id:v,"aria-describedby":b,...C},w)=>{const{id:x,ariaDescribedBy:S}=Wn({id:v,ariaDescribedBy:b}),P=d.useId(),R=x??P,E=`${R}-hint`,T=t==="vertical"&&(s||r)?`${S??""} ${E}`.trim():S;function O(I){p?.(I.target.value),f?.(I)}return a(O,"handleOnChange"),m.jsxs("div",{className:D("flex",{"flex-col gap-1.5":t==="vertical","items-center justify-between gap-15":t==="horizontal","op-75":l},i),children:[e&&m.jsxs("label",{htmlFor:R,className:D("text-bolt-ds-textSecondary font-medium flex gap-2 items-center",{"text-sm":n==="md","text-xs":n==="sm"}),children:[e,g&&m.jsx(td,{text:g,surface:h})]}),m.jsxs("div",{className:"flex grow-1 flex-col gap-1.5 relative",children:[m.jsx("input",{ref:w,...C,className:D("flex items-center","px-3 py-2.5 bg-transparent border rounded-md focus:ring-2 placeholder:text-bolt-ds-textTertiary outline-none","disabled:cursor-not-allowed disabled:text-bolt-ds-textTertiary","truncate",{"h-11 text-base":n==="md","h-10 text-sm":n==="sm","border-bolt-ds-borderPrimary focus:ring-bolt-ds-brand":!r,"border-bolt-ds-danger focus:ring-bolt-ds-dangerHover":!!r&&!o||!!C["aria-invalid"],"border-bolt-ds-warning focus:ring-bolt-ds-warningHover":!!r&&o,"grow-1":t==="horizontal","pr-10":C.type==="password","text-bolt-ds-textTertiary":C.readOnly},u),placeholder:c,disabled:l,id:R,"aria-describedby":T||void 0,onChange:O}),t==="vertical"&&(s||r)&&m.jsx("p",{className:D({"text-sm":n==="md","text-xs":n==="sm","text-bolt-ds-textTertiary":!r,"text-bolt-ds-danger":!!r&&!o,"text-bolt-ds-warning":!!r&&o},y),id:E,children:r||s})]})]})});function Ca(e,t){if(typeof e=="function")return e(t);
78e!=null&&(e.current=t)}a(Ca,"setRef");function nd(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Ca(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Ca(e[o],null)}}}}a(nd,"composeRefs");function rd(...e){return d.useCallback(nd(...e),e)}a(rd,"useComposedRefs");function cx(e,t=[]){let n=[];function r(s,i){const l=d.createContext(i),c=n.length;n=[...n,i];const u=a(p=>{const{scope:g,children:h,...y}=p,v=g?.[e]?.[c]||l,b=d.useMemo(()=>y,Object.values(y));return m.jsx(v.Provider,{value:b,children:h})},"Provider");u.displayName=s+"Provider";function f(p,g){const h=g?.[e]?.[c]||l,y=d.useContext(h);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${s}\``)}return a(f,"useContext2"),[u,f]}a(r,"createContext3");const o=a(()=>{const s=n.map(i=>d.createContext(i));return a(function(l){const c=l?.[e]||s;return d.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])},"useScope")},"createScope");return o.scopeName=e,[r,ux(o,...t)]}a(cx,"createContextScope");function ux(...e){const t=e[0];if(e.length===1)return t;const n=a(()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return a(function(s){const i=r.reduce((l,{useScope:c,scopeName:u})=>{const p=c(s)[`__scope${u}`];return{...l,...p}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}a(ux,"composeContextScopes");function Sa(e,t,{checkForDefaultPrevented:n=!0}={}){return a(function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)},"handleEvent")}a(Sa,"composeEventHandlers$1");function od(e){const t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}a(od,"usePrevious$1");function dx(e,t){return d.useReducer((n,r)=>t[n][r]??n,e)}a(dx,"useStateMachine$1");var sd=a(e=>{const{present:t,children:n}=e,r=fx(t),o=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),s=rd(r.ref,px(o));return typeof n=="function"||r.isPresent?d.cloneElement(o,{ref:s}):null},"Presence$1");sd.displayName="Presence";function fx(e){const[t,n]=d.useState(),r=d.useRef({}),o=d.useRef(e),s=d.useRef("none"),i=e?"mounted":"unmounted",[l,c]=dx(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const u=sr(r.current);s.current=l==="mounted"?u:"none"},[l]),Xe(()=>{const u=r.current,f=o.current;if(f!==e){const g=s.current,h=sr(u);e?c("MOUNT"):h==="none"||u?.display==="none"?c("UNMOUNT"):c(f&&g!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Xe(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,p=a(h=>{const v=sr(r.current).includes(h.animationName);if(h.target===t&&v&&(c("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},"handleAnimationEnd"),g=a(h=>{h.target===t&&(s.current=sr(r.current))},"handleAnimationStart");return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:d.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}a(fx,"usePresence$2");function sr(e){return e?.animationName||"none"}a(sr,"getAnimationName$1");function px(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}a(px,"getElementRef$3");var id=d.forwardRef((e,t)=>{const{children:n,...r}=e,o=d.Children.toArray(n),s=o.find(mx);if(s){const i=s.props.children,l=o.map(c=>c===s?d.Children.count(i)>1?d.Children.only(null):d.isValidElement(i)?i.props.children:null:c);return m.jsx(rs,{...r,ref:t,children:d.isValidElement(i)?d.cloneElement(i,void 0,l):null})}return m.jsx(rs,{...r,ref:t,children:n})});id.displayName="Slot";var rs=d.forwardRef((e,t)=>
78{const{children:n,...r}=e;if(d.isValidElement(n)){const o=vx(n),s=gx(r,n.props);return n.type!==d.Fragment&&(s.ref=t?nd(t,o):o),d.cloneElement(n,s)}return d.Children.count(n)>1?d.Children.only(null):null});rs.displayName="SlotClone";var hx=a(({children:e})=>m.jsx(m.Fragment,{children:e}),"Slottable");function mx(e){return d.isValidElement(e)&&e.type===hx}a(mx,"isSlottable$1");function gx(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...l)=>{s(...l),o(...l)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}a(gx,"mergeProps$1");function vx(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}a(vx,"getElementRef$2");var yx=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ad=yx.reduce((e,t)=>{const n=d.forwardRef((r,o)=>{const{asChild:s,...i}=r,l=s?id:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),ei="Checkbox",[bx]=cx(ei),[xx,wx]=bx(ei),ld=d.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:s,required:i,disabled:l,value:c="on",onCheckedChange:u,form:f,...p}=e,[g,h]=d.useState(null),y=rd(t,S=>h(S)),v=d.useRef(!1),b=g?f||!!g.closest("form"):!0,[C=!1,w]=_s({prop:o,defaultProp:s,onChange:u}),x=d.useRef(C);return d.useEffect(()=>{const S=g?.form;if(S){const P=a(()=>w(x.current),"reset");return S.addEventListener("reset",P),()=>S.removeEventListener("reset",P)}},[g,w]),m.jsxs(xx,{scope:n,state:C,disabled:l,children:[m.jsx(ad.button,{type:"button",role:"checkbox","aria-checked":it(C)?"mixed":C,"aria-required":i,"data-state":dd(C),"data-disabled":l?"":void 0,disabled:l,value:c,...p,ref:y,onKeyDown:Sa(e.onKeyDown,S=>{S.key==="Enter"&&S.preventDefault()}),onClick:Sa(e.onClick,S=>{w(P=>it(P)?!0:!P),b&&(v.current=S.isPropagationStopped(),v.current||S.stopPropagation())})}),b&&m.jsx(Cx,{control:g,bubbles:!v.current,name:r,value:c,checked:C,required:i,disabled:l,form:f,style:{transform:"translateX(-100%)"},defaultChecked:it(s)?!1:s})]})});ld.displayName=ei;var cd="CheckboxIndicator",ud=d.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,s=wx(cd,n);return m.jsx(sd,{present:r||it(s.state)||s.state===!0,children:m.jsx(ad.span,{"data-state":dd(s.state),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});ud.displayName=cd;var Cx=a(e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:o,...s}=e,i=d.useRef(null),l=od(n),c=Is(t);d.useEffect(()=>{const f=i.current,p=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(p,"checked").set;if(l!==n&&h){const y=new Event("click",{bubbles:r});f.indeterminate=it(n),h.call(f,it(n)?!1:n),f.dispatchEvent(y)}},[l,n,r]);const u=d.useRef(it(n)?!1:n);return m.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o??u.current,...s,tabIndex:-1,ref:i,style:{...e.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})},"BubbleInput$2");function it(e){return e==="indeterminate"}a(it,"isIndeterminate");function dd(e){return it(e)?"indeterminate":e?"checked":"unchecked"}a(dd,"getState$4");var Sx=ld;const Px=d.forwardRef((e,t)=>{const{checked:n,disabled:r,className:o,onChange:s,id:i,"aria-describedby":l,...c}=e,u=Wn({id:i,ariaDescribedBy:l});return m.jsx(Sx,{ref:t,checked:n,id:u.id,"aria-describedby":u.ariaDescribedBy,"data-slot":"checkbox",className:D("group peer","flex items-center justify-center relative","w-4 h-4 shrink-0 rounded border border-bolt-ds-borderPrimary bg-transparent outline-none","text-bolt-ds-onBrand",` 79 [&[aria-checked="true"]]:bg-bolt-ds-brand 80 [&[aria-checked="mixed"]]:bg-bolt-ds-brand 81 82 after:-inset-x-3 83 after:-inset-y-2 84 after:absolute 85 after:content-empty 86 87 [&[aria-invalid="true"]]:aria-checked:border-bolt-ds-borderPrimary 88 [&[aria-invalid="true"]]:border-bolt-ds-danger 89 [&[aria-invalid="true"]]:ring-3 90 [&[aria-invalid="true"]]:ring-bolt-ds-danger 91 [&[aria-invalid="true"]]:ring-opacity-20 92 93 disabled:cursor-not-allowed 94 disabled:opacity-50 95 96 focus-visible:border-ring 97 focus-visible:ring-3 98 focus-visible:ring-ring/50 99 100 group-has-disabled/field:opacity-50 101 102 `,o),onCheckedChange:s,disabled:r,...c,children:m.jsxs(ud,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center",children:[m.jsx("span",{className:"i-ph:check size-3.5 group-data-[state=indeterminate]:hidden"}),m.jsx("span",{className:"i-bolt:minus hidden size-3.5 group-data-[state=indeterminate]:block"})]})})});Px.displayName="Checkbox";const Ex={neutral:"bg-bolt-ds-bg text-bolt-ds-textPrimary border border-bolt-ds-borderPrimary",brand:"bg-bolt-ds-brandBgSubtle text-bolt-ds-onBrandBgSubtle border border-bolt-ds-brandBorderSubtle",success:"bg-bolt-ds-successBgSubtle text-bolt-ds-onSuccessBgSubtle border border-bolt-ds-successBorderSubtle",warning:"bg-bolt-ds-warningBgSubtle text-bolt-ds-onWarningBgSubtle border border-bolt-ds-warningBorderSubtle",danger:"bg-bolt-ds-dangerBgSubtle text-bolt-ds-onDangerBgSubtle border border-bolt-ds-dangerBorderSubtle"},Tx=d.forwardRef(({ariaLabel:e,className:t,type:n="neutral",text:r,handleRemove:o},s)=>m.jsxs("div",{ref:s,className:D("flex items-center gap-1 rounded-md pl-2.5 pr-1 py-1 text-xs",Ex[n],t),children:[r,o&&m.jsx(Hr,{size:"xs",className:"p-1 size-5",iconClassName:"size-3",type:"button",variant:"link-gray",icon:"i-ph:x",onClick:o,"aria-label":e||"Remove"})]}));Tx.displayName="Chip";function Pa(e,[t,n]){return Math.min(n,Math.max(t,e))}a(Pa,"clamp$1");function fd(e){const t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}a(fd,"usePrevious");var pd=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Rx="VisuallyHidden",qr=d.forwardRef((e,t)=>
102m.jsx(Y.span,{...e,ref:t,style:{...pd,...e.style}}));qr.displayName=Rx;var HT=qr,Ax=[" ","Enter","ArrowUp","ArrowDown"],Mx=[" ","Enter"],Dt="Select",[Zr,Qr,Nx]=Vs(Dt),[cn]=Re(Dt,[Nx,an]),Jr=an(),[Dx,vt]=cn(Dt),[Ix,Ox]=cn(Dt),hd=a(e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:l,onValueChange:c,dir:u,name:f,autoComplete:p,disabled:g,required:h,form:y}=e,v=Jr(t),[b,C]=d.useState(null),[w,x]=d.useState(null),[S,P]=d.useState(!1),R=jn(u),[E,T]=Nt({prop:r,defaultProp:o??!1,onChange:s,caller:Dt}),[O,I]=Nt({prop:i,defaultProp:l,onChange:c,caller:Dt}),L=d.useRef(null),V=b?y||!!b.closest("form"):!0,[W,H]=d.useState(new Set),F=Array.from(W).map(j=>j.props.value).join(";");return m.jsx(Ur,{...v,children:m.jsxs(Dx,{required:h,scope:t,trigger:b,onTriggerChange:C,valueNode:w,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:P,contentId:we(),value:O,onValueChange:I,open:E,onOpenChange:T,dir:R,triggerPointerDownPosRef:L,disabled:g,children:[m.jsx(Zr.Provider,{scope:t,children:m.jsx(Ix,{scope:e.__scopeSelect,onNativeOptionAdd:d.useCallback(j=>{H(k=>new Set(k).add(j))},[]),onNativeOptionRemove:d.useCallback(j=>{H(k=>{const $=new Set(k);return $.delete(j),$})},[]),children:n})}),V?m.jsxs(_d,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:p,value:O,onChange:a(j=>I(j.target.value),"onChange"),disabled:g,form:y,children:[O===void 0?m.jsx("option",{value:""}):null,Array.from(W)]},F):null]})})},"Select$1");hd.displayName=Dt;var md="SelectTrigger",gd=d.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=Jr(n),i=vt(md,n),l=i.disabled||r,c=X(t,i.onTriggerChange),u=Qr(n),f=d.useRef("touch"),[p,g,h]=Fd(v=>{const b=u().filter(x=>!x.disabled),C=b.find(x=>x.value===i.value),w=Vd(b,v,C);w!==void 0&&i.onValueChange(w.value)}),y=a(v=>{l||(i.onOpenChange(!0),h()),v&&(i.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})},"handleOpen");return m.jsx(zr,{asChild:!0,...s,children:m.jsx(Y.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":Ld(i.value)?"":void 0,...o,ref:c,onClick:_(o.onClick,v=>{v.currentTarget.focus(),f.current!=="mouse"&&y(v)}),onPointerDown:_(o.onPointerDown,v=>{f.current=v.pointerType;const b=v.target;b.hasPointerCapture(v.pointerId)&&b.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(y(v),v.preventDefault())}),onKeyDown:_(o.onKeyDown,v=>{const b=p.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&g(v.key),!(b&&v.key===" ")&&Ax.includes(v.key)&&(y(),v.preventDefault())})})})});gd.displayName=md;var vd="SelectValue",yd=d.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...l}=e,c=vt(vd,n),{onValueNodeHasChildrenChange:u}=c,f=s!==void 0,p=X(t,c.onValueNodeChange);return de(()=>{u(f)},[u,f]),m.jsx(Y.span,{...l,ref:p,style:{pointerEvents:"none"},children:Ld(c.value)?m.jsx(m.Fragment,{children:i}):s})});yd.displayName=vd;var jx="SelectIcon",bd=d.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return m.jsx(Y.span,{"aria-hidden":!0,...o,ref:t,children:r||"â¼"})});bd.displayName=jx;var kx="SelectPortal",xd=a(e=>m.jsx(Ln,{asChild:!0,...e}),"SelectPortal");xd.displayName=kx;var It="SelectContent",wd=d.forwardRef((e,t)=>{const n=vt(It,e.__scopeSelect),[r,o]=d.useState();if(de(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?tn.createPortal(m.jsx(Cd,{scope:e.__scopeSelect,children:m.jsx(Zr.Slot,{scope:e.__scopeSelect,children:m.jsx("div",{children:e.children})})}),s):null}return m.jsx(Sd,{...e,ref:t})});wd.displayName=It;var Ie=10,[Cd,yt]=cn(It),_x="SelectContentImpl",Lx=ct("SelectContent.RemoveScroll"),Sd=d.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:l,sideOffset:c,align:u,alignOffset:f,arrowPadding:p,collisionBoundary:g,collisionPadding:h,sticky:y,hideWhenDetached:v,avoidCollisions:b,...C}
102=e,w=vt(It,n),[x,S]=d.useState(null),[P,R]=d.useState(null),E=X(t,N=>S(N)),[T,O]=d.useState(null),[I,L]=d.useState(null),V=Qr(n),[W,H]=d.useState(!1),F=d.useRef(!1);d.useEffect(()=>{if(x)return Kr(x)},[x]),Wr();const j=d.useCallback(N=>{const[q,...se]=V().map(re=>re.ref.current),[Z]=se.slice(-1),Q=document.activeElement;for(const re of N)if(re===Q||(re?.scrollIntoView({block:"nearest"}),re===q&&P&&(P.scrollTop=0),re===Z&&P&&(P.scrollTop=P.scrollHeight),re?.focus(),document.activeElement!==Q))return},[V,P]),k=d.useCallback(()=>j([T,x]),[j,T,x]);d.useEffect(()=>{W&&k()},[W,k]);const{onOpenChange:$,triggerPointerDownPosRef:A}=w;d.useEffect(()=>{if(x){let N={x:0,y:0};const q=a(Z=>{N={x:Math.abs(Math.round(Z.pageX)-(A.current?.x??0)),y:Math.abs(Math.round(Z.pageY)-(A.current?.y??0))}},"handlePointerMove"),se=a(Z=>{N.x<=10&&N.y<=10?Z.preventDefault():x.contains(Z.target)||$(!1),document.removeEventListener("pointermove",q),A.current=null},"handlePointerUp");return A.current!==null&&(document.addEventListener("pointermove",q),document.addEventListener("pointerup",se,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",q),document.removeEventListener("pointerup",se,{capture:!0})}}},[x,$,A]),d.useEffect(()=>{const N=a(()=>$(!1),"close");return window.addEventListener("blur",N),window.addEventListener("resize",N),()=>{window.removeEventListener("blur",N),window.removeEventListener("resize",N)}},[$]);const[J,ae]=Fd(N=>{const q=V().filter(Q=>!Q.disabled),se=q.find(Q=>Q.ref.current===document.activeElement),Z=Vd(q,N,se);Z&&setTimeout(()=>Z.ref.current.focus())}),z=d.useCallback((N,q,se)=>{const Z=!F.current&&!se;(w.value!==void 0&&w.value===q||Z)&&(O(N),Z&&(F.current=!0))},[w.value]),G=d.useCallback(()=>x?.focus(),[x]),K=d.useCallback((N,q,se)=>{const Z=!F.current&&!se;(w.value!==void 0&&w.value===q||Z)&&L(N)},[w.value]),ne=r==="popper"?os:Pd,le=ne===os?{side:l,sideOffset:c,align:u,alignOffset:f,arrowPadding:p,collisionBoundary:g,collisionPadding:h,sticky:y,hideWhenDetached:v,avoidCollisions:b}:{};return m.jsx(Cd,{scope:n,content:x,viewport:P,onViewportChange:R,itemRefCallback:z,selectedItem:T,onItemLeave:G,itemTextRefCallback:K,focusSelectedItem:k,selectedItemText:I,position:r,isPositioned:W,searchRef:J,children:m.jsx(Vn,{as:Lx,allowPinchZoom:!0,children:m.jsx(_n,{asChild:!0,trapped:w.open,onMountAutoFocus:a(N=>{N.preventDefault()},"onMountAutoFocus"),onUnmountAutoFocus:_(o,N=>{w.trigger?.focus({preventScroll:!0}),N.preventDefault()}),children:m.jsx(kn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:a(N=>N.preventDefault(),"onFocusOutside"),onDismiss:a(()=>w.onOpenChange(!1),"onDismiss"),children:m.jsx(ne,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:a(N=>N.preventDefault(),"onContextMenu"),...C,...le,onPlaced:a(()=>H(!0),"onPlaced"),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:_(C.onKeyDown,N=>{const q=N.ctrlKey||N.altKey||N.metaKey;if(N.key==="Tab"&&N.preventDefault(),!q&&N.key.length===1&&ae(N.key),["ArrowUp","ArrowDown","Home","End"].includes(N.key)){let Z=V().filter(Q=>!Q.disabled).map(Q=>Q.ref.current);if(["ArrowUp","End"].includes(N.key)&&(Z=Z.slice().reverse()),["ArrowUp","ArrowDown"].includes(N.key)){const Q=N.target,re=Z.indexOf(Q);Z=Z.slice(re+1)}setTimeout(()=>j(Z)),N.preventDefault()}})})})})})})});Sd.displayName=_x;var Fx="SelectItemAlignedPosition",Pd=d.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=vt(It,n),i=yt(It,n),[l,c]=d.useState(null),[u,f]=d.useState(null),p=X(t,E=>f(E)),g=Qr(n),h=d.useRef(!1),y=d.useRef(!0),{viewport:v,selectedItem:b,selectedItemText:C,focusSelectedItem:w}=i,x=d.useCallback(()=>{if(s.trigger&&s.valueNode&&l&&u&&v&&b&&C){const E=s.trigger.getBoundingClientRect(),T=u.getBoundingClientRect(),O=s.valueNode.getBoundingClientRect(),I=C.getBoundingClientRect();if(s.dir!=="rtl"){const Q=I.left-T.left,re=O.left-Q,ue=E.left-re,We=E.width+ue,fn=Math.max(We,T.width),_t=window.innerWidth-Ie,pn=Pa(re,[Ie,Math.max(Ie,_t-fn)]);
102l.style.minWidth=We+"px",l.style.left=pn+"px"}else{const Q=T.right-I.right,re=window.innerWidth-O.right-Q,ue=window.innerWidth-E.right-re,We=E.width+ue,fn=Math.max(We,T.width),_t=window.innerWidth-Ie,pn=Pa(re,[Ie,Math.max(Ie,_t-fn)]);l.style.minWidth=We+"px",l.style.right=pn+"px"}const L=g(),V=window.innerHeight-Ie*2,W=v.scrollHeight,H=window.getComputedStyle(u),F=parseInt(H.borderTopWidth,10),j=parseInt(H.paddingTop,10),k=parseInt(H.borderBottomWidth,10),$=parseInt(H.paddingBottom,10),A=F+j+W+$+k,J=Math.min(b.offsetHeight*5,A),ae=window.getComputedStyle(v),z=parseInt(ae.paddingTop,10),G=parseInt(ae.paddingBottom,10),K=E.top+E.height/2-Ie,ne=V-K,le=b.offsetHeight/2,N=b.offsetTop+le,q=F+j+N,se=A-q;if(q<=K){const Q=L.length>0&&b===L[L.length-1].ref.current;l.style.bottom="0px";const re=u.clientHeight-v.offsetTop-v.offsetHeight,ue=Math.max(ne,le+(Q?G:0)+re+k),We=q+ue;l.style.height=We+"px"}else{const Q=L.length>0&&b===L[0].ref.current;l.style.top="0px";const ue=Math.max(K,F+v.offsetTop+(Q?z:0)+le)+se;l.style.height=ue+"px",v.scrollTop=q-K+v.offsetTop}l.style.margin=`${Ie}
102px 0`,l.style.minHeight=J+"px",l.style.maxHeight=V+"px",r?.(),requestAnimationFrame(()=>h.current=!0)}},[g,s.trigger,s.valueNode,l,u,v,b,C,s.dir,r]);de(()=>x(),[x]);const[S,P]=d.useState();de(()=>{u&&P(window.getComputedStyle(u).zIndex)},[u]);const R=d.useCallback(E=>{E&&y.current===!0&&(x(),w?.(),y.current=!1)},[x,w]);return m.jsx($x,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:h,onScrollButtonChange:R,children:m.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:m.jsx(Y.div,{...o,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Pd.displayName=Fx;var Vx="SelectPopperPosition",os=d.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Ie,...s}=e,i=Jr(n);return m.jsx(Hs,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});os.displayName=Vx;var[$x,ti]=cn(It,{}),ss="SelectViewport",Ed=d.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=yt(ss,n),i=ti(ss,n),l=X(t,s.onViewportChange),c=d.useRef(0);return m.jsxs(m.Fragment,{children:[m.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),m.jsx(Zr.Slot,{scope:n,children:m.jsx(Y.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:_(o.onScroll,u=>{const f=u.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:g}=i;if(g?.current&&p){const h=Math.abs(c.current-f.scrollTop);if(h>0){const y=window.innerHeight-Ie*2,v=parseFloat(p.style.minHeight),b=parseFloat(p.style.height),C=Math.max(v,b);if(C<y){const w=C+h,x=Math.min(y,w),S=w-x;p.style.height=x+"px",p.style.bottom==="0px"&&(f.scrollTop=S>0?S:0,p.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});Ed.displayName=ss;var Td="SelectGroup",[Bx,Hx]=cn(Td),Rd=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=we();return m.jsx(Bx,{scope:n,id:o,children:m.jsx(Y.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Rd.displayName=Td;var Ad="SelectLabel",Wx=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Hx(Ad,n);return m.jsx(Y.div,{id:o.id,...r,ref:t})});Wx.displayName=Ad;var Sr="SelectItem",[Ux,Md]=cn(Sr),Nd=d.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,l=vt(Sr,n),c=yt(Sr,n),u=l.value===r,[f,p]=d.useState(s??""),[g,h]=d.useState(!1),y=X(t,w=>c.itemRefCallback?.(w,r,o)),v=we(),b=d.useRef("touch"),C=a(()=>{o||(l.onValueChange(r),l.onOpenChange(!1))},"handleSelect");if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return m.jsx(Ux,{scope:n,value:r,disabled:o,textId:v,isSelected:u,onItemTextChange:d.useCallback(w=>{p(x=>x||(w?.textContent??"").trim())},[]),children:m.jsx(Zr.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:m.jsx(Y.div,{role:"option","aria-labelledby":v,"data-highlighted":g?"":void 0,"aria-selected":u&&g,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:y,onFocus:_(i.onFocus,()=>h(!0)),onBlur:_(i.onBlur,()=>h(!1)),onClick:_(i.onClick,()=>{b.current!=="mouse"&&C()}),onPointerUp:_(i.onPointerUp,()=>{b.current==="mouse"&&C()}),onPointerDown:_(i.onPointerDown,w=>{b.current=w.pointerType}),onPointerMove:_(i.onPointerMove,w=>{b.current=w.pointerType,o?c.onItemLeave?.():b.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:_(i.onPointerLeave,w=>{w.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:_(i.onKeyDown,w=>{c.searchRef?.current!==""&&w.key===" "||(Mx.includes(w.key)&&C(),w.key===" "&&w.preventDefault())})})})})});Nd.displayName=Sr;var vn="SelectItemText",Dd=d.forwardRef((e,t)=>
102{const{__scopeSelect:n,className:r,style:o,...s}=e,i=vt(vn,n),l=yt(vn,n),c=Md(vn,n),u=Ox(vn,n),[f,p]=d.useState(null),g=X(t,C=>p(C),c.onItemTextChange,C=>l.itemTextRefCallback?.(C,c.value,c.disabled)),h=f?.textContent,y=d.useMemo(()=>m.jsx("option",{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:v,onNativeOptionRemove:b}=u;return de(()=>(v(y),()=>b(y)),[v,b,y]),m.jsxs(m.Fragment,{children:[m.jsx(Y.span,{id:c.textId,...s,ref:g}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?tn.createPortal(s.children,i.valueNode):null]})});Dd.displayName=vn;var Id="SelectItemIndicator",zx=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Md(Id,n).isSelected?m.jsx(Y.span,{"aria-hidden":!0,...r,ref:t}):null});zx.displayName=Id;var is="SelectScrollUpButton",Od=d.forwardRef((e,t)=>{const n=yt(is,e.__scopeSelect),r=ti(is,e.__scopeSelect),[o,s]=d.useState(!1),i=X(t,r.onScrollButtonChange);return de(()=>{if(n.viewport&&n.isPositioned){let l=a(function(){const u=c.scrollTop>0;s(u)},"handleScroll2");const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?m.jsx(kd,{...e,ref:i,onAutoScroll:a(()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)},"onAutoScroll")}):null});Od.displayName=is;var as="SelectScrollDownButton",jd=d.forwardRef((e,t)=>{const n=yt(as,e.__scopeSelect),r=ti(as,e.__scopeSelect),[o,s]=d.useState(!1),i=X(t,r.onScrollButtonChange);return de(()=>{if(n.viewport&&n.isPositioned){let l=a(function(){const u=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<u;s(f)},"handleScroll2");const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?m.jsx(kd,{...e,ref:i,onAutoScroll:a(()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)},"onAutoScroll")}):null});jd.displayName=as;var kd=d.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=yt("SelectScrollButton",n),i=d.useRef(null),l=Qr(n),c=d.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return d.useEffect(()=>()=>c(),[c]),de(()=>{l().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),m.jsx(Y.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:_(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:_(o.onPointerMove,()=>{s.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:_(o.onPointerLeave,()=>{c()})})}),Kx="SelectSeparator",Gx=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return m.jsx(Y.div,{"aria-hidden":!0,...r,ref:t})});Gx.displayName=Kx;var ls="SelectArrow",Yx=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Jr(n),s=vt(ls,n),i=yt(ls,n);return s.open&&i.position==="popper"?m.jsx(Ws,{...o,...r,ref:t}):null});Yx.displayName=ls;var Xx="SelectBubbleInput",_d=d.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=d.useRef(null),s=X(r,o),i=fd(t);return d.useEffect(()=>{const l=o.current;if(!l)return;const c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&f){const p=new Event("change",{bubbles:!0});f.call(l,t),l.dispatchEvent(p)}},[i,t]),m.jsx(Y.select,{...n,style:{...pd,...n.style},ref:s,defaultValue:t})});_d.displayName=Xx;function Ld(e){return e===""||e===void 0}a(Ld,"shouldShowPlaceholder");function Fd(e){const t=ye(e),n=d.useRef(""),r=d.useRef(0),o=d.useCallback(i=>{const l=n.current+i;t(l),a((function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}),"updateSearch")(l)},[t]),s=d.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}a(Fd,"useTypeaheadSearch");function Vd(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=qx(e,Math.max(s,0));o.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}a(Vd,"findNextItem");function qx(e,t){return e.map((n,r)=>e[(t+r)%e.length])}a(qx,"wrapArray$1");var Zx=hd,Qx=gd,Jx=yd,ew=bd,tw=xd,nw=wd,rw=Ed,ow=Rd,sw=Nd,iw=Dd,aw=Od,lw=jd;const WT=d.memo(({id:e,"aria-describedby":t,className:n,labelClassName:r,contentClassName:o,containerClassName:s,disabled:i,size:l="lg",onValueChange:c,defaultValue:u,value:f,options:p,placeholder:g="Selectâ¦",helper:h,error:y,label:v,labelPosition:b="top",loading:C=!1,variant:w="default",footer:x,open:S,onOpenChange:P})=>{const{id:R,ariaDescribedBy:E}=Wn({id:e,ariaDescribedBy:t}
102),T=!!y,O=w==="ghost",I=d.useId(),L=h||y?[E,I].filter(Boolean).join(" "):E;return m.jsxs("div",{className:D("w-full",b==="side"?"flex items-baseline gap-4":"flex flex-col gap-1.5",s),children:[v&&m.jsx("label",{htmlFor:R,className:D("text-sm font-medium text-bolt-ds-textSecondary",i?"opacity-50 pointer-events-none":"",r),children:v}),m.jsxs("div",{className:"flex flex-col gap-1.5 w-full",children:[m.jsxs(Zx,{defaultValue:u,value:f,onValueChange:c,disabled:i||C,open:S,onOpenChange:P,children:[m.jsxs(Qx,{id:R,"aria-describedby":L||void 0,style:{outline:"none"},className:D("flex items-center justify-between rounded-md text-sm relative",O?D("bg-transparent border border-transparent px-1.5 py-1","text-bolt-ds-textSecondary data-[placeholder]:text-bolt-ds-textTertiary",T?"focus:ring-2 focus:ring-bolt-ds-danger":"hover:bg-bolt-ds-utilHover focus:ring-2 focus:ring-bolt-ds-brand"):D("w-full px-3 py-2 shadow-sm","bg-transparent data-[placeholder]:text-bolt-ds-textTertiary border focus:ring-2 focus:border-transparent",T?"border-bolt-ds-danger focus:ring-bolt-ds-danger":"border-bolt-ds-borderPrimary focus:ring-bolt-ds-brand",{"h-11":l==="xl","h-10":l==="lg","h-9":l==="md"}),n),children:[m.jsx(Jx,{placeholder:g,className:"text-sm text-bolt-ds-textPrimary"}),m.jsx(ew,{className:D("ml-2 text-bolt-ds-textTertiary",C?"op-0":""),children:m.jsx("div",{className:"i-ph:caret-down text-xl"})}),C&&m.jsx("div",{className:"absolute right-3 flex items-center justify-center",children:m.jsx("span",{className:"i-svg-spinners:90-ring-with-bg scale-90"})})]}),m.jsx(tw,{children:m.jsxs(nw,{sideOffset:4,position:"popper",className:D("min-w-[var(--radix-select-trigger-width)] max-h-[var(--radix-select-content-available-height)] rounded-md border border-bolt-ds-borderPrimary bg-bolt-ds-bgAlt shadow-lg animate-in fade-in z-max",o),children:[m.jsx(aw,{className:"flex items-center justify-center h-6 text-bolt-ds-textSecondary",children:m.jsx("div",{className:"i-ph:caret-up text-xl"})}),m.jsx(rw,{className:"p-1",children:m.jsx(ow,{children:p.map(V=>m.jsxs(sw,{value:V.value,className:D("group","relative flex cursor-pointer select-none items-center rounded-md px-2 py-1.5 text-sm outline-none","text-bolt-ds-textPrimary text-sm hover:bg-bolt-ds-utilHover","data-[highlighted]:bg-bolt-ds-utilHover","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","data-[state=checked]:font-semibold"),children:[m.jsxs("div",{className:"flex flex-col gap-0.5 min-w-0 flex-1",children:[m.jsx(iw,{children:V.label}),V.description&&m.jsx("div",{className:"text-xs text-bolt-ds-textTertiary font-normal",children:V.description})]}),V.labelDetails]},V.value))})}),m.jsx(lw,{className:"flex items-center justify-center h-6 text-bolt-ds-textTertiary",children:m.jsx("div",{className:"i-ph:caret-down text-xl"})}),x]})})]}),h&&!y&&m.jsx("div",{id:I,className:"text-xs text-bolt-ds-textTertiary",children:h}),y&&m.jsx("div",{id:I,className:"text-xs text-bolt-ds-danger",children:y})]})]})}),Ea={neutral:"bg-bolt-ds-bg text-bolt-ds-textPrimary border border-bolt-ds-borderPrimary",brand:"bg-bolt-ds-brandBgSubtle text-bolt-ds-onBrandBgSubtle border border-bolt-ds-brandBorderSubtle",success:"bg-bolt-ds-successBgSubtle text-bolt-ds-onSuccessBgSubtle border border-bolt-ds-successBorderSubtle",warning:"bg-bolt-ds-warningBgSubtle text-bolt-ds-onWarningBgSubtle border border-bolt-ds-warningBorderSubtle",danger:"bg-bolt-ds-dangerBgSubtle text-bolt-ds-onDangerBgSubtle border border-bolt-ds-dangerBorderSubtle"},cw={md:"text-sm font-medium px-2 h-6",sm:"text-xs font-medium px-1.5 h-5"},$d=d.forwardRef(({children:e,className:t,type:n="neutral",size:r="sm",icon:o,...s},i)=>o?m.jsx("div",{ref:i,className:D("flex items-center justify-center size-12 rounded-full text-xl shrink-0",Ea[n],t),...s,children:m.jsx("span",{className:o})}):m.jsx("span",{ref:i,className:D("inline-flex justify-center items-center rounded-md font-medium",Ea[n],cw[r],t),...s,children:e}));$d.displayName="Badge";const uw={neutral:"bg-bolt-ds-bg text-bolt-ds-neutral border border-bolt-ds-borderPrimary",brand:"bg-bolt-ds-bg text-bolt-ds-brand border border-bolt-ds-borderPrimary",success:"bg-bolt-ds-bg text-bolt-ds-success border border-bolt-ds-borderPrimary",warning:"bg-bolt-ds-bg text-bolt-ds-warning border border-bolt-ds-borderPrimary",danger:"bg-bolt-ds-bg text-bolt-ds-danger border border-bolt-ds-borderPrimary"},dw=a(e=>{switch(e){case"neutral":return"i-heroicons:star";case"brand":return"i-heroicons:information-circle";case"success":return"i-heroicons:check-circle";case"warning":return"i-heroicons:exclamation-triangle";case"danger":return"i-heroicons:exclamation-circle";default:return""}},"getIconBadge"),fw=d.forwardRef(({className:e,type:t="neutral",icon:n,...r},o)=>m.jsx("div",{ref:o,className:D("flex items-center justify-center rounded-full shrink-0 size-12",uw[t],e),...r,children:m.jsx("div",{className:D("size-6",n||dw(t))})}));fw.displayName="IconBadge";var ni="Switch",[pw]=Es(ni),[hw,mw]=pw(ni),Bd=d.forwardRef((e,t)=>
102{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:s,required:i,disabled:l,value:c="on",onCheckedChange:u,...f}=e,[p,g]=d.useState(null),h=mt(t,w=>g(w)),y=d.useRef(!1),v=p?!!p.closest("form"):!0,[b=!1,C]=_s({prop:o,defaultProp:s,onChange:u});return m.jsxs(hw,{scope:n,checked:b,disabled:l,children:[m.jsx(Be.button,{type:"button",role:"switch","aria-checked":b,"aria-required":i,"data-state":Ud(b),"data-disabled":l?"":void 0,disabled:l,value:c,...f,ref:h,onClick:_e(e.onClick,w=>{C(x=>!x),v&&(y.current=w.isPropagationStopped(),y.current||w.stopPropagation())})}),v&&m.jsx(gw,{control:p,bubbles:!y.current,name:r,value:c,checked:b,required:i,disabled:l,style:{transform:"translateX(-100%)"}})]})});Bd.displayName=ni;var Hd="SwitchThumb",Wd=d.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=mw(Hd,n);return m.jsx(Be.span,{"data-state":Ud(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});Wd.displayName=Hd;var gw=a(e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,s=d.useRef(null),i=od(n),l=Is(t);return d.useEffect(()=>{const c=s.current,u=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(u,"checked").set;if(i!==n&&p){const g=new Event("click",{bubbles:r});p.call(c,n),c.dispatchEvent(g)}},[i,n,r]),m.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:s,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})},"BubbleInput$1");function Ud(e){return e?"checked":"unchecked"}a(Ud,"getState$3");var vw=Bd,yw=Wd;const UT=d.memo(e=>{const{id:t,"aria-describedby":n,className:r,thumbClassName:o,checked:s,disabled:i,style:l,onCheckedChange:c,size:u="md",...f}=e,p=Wn({id:t,ariaDescribedBy:n});return m.jsx(vw,{id:p.id,"aria-describedby":p.ariaDescribedBy,checked:s,disabled:i,onCheckedChange:c,className:D("bg-bolt-ds-bgTertiary rounded-full shrink-0 relative data-[state=checked]:bg-bolt-ds-brand outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-bolt-ds-brandHover cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",{"w-[44px] h-[25px]":u==="md","w-9 h-5":u==="sm"},r),style:{WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",...l},...f,children:m.jsx(yw,{className:D("block bg-bolt-ds-onNeutral rounded-full shadow transition-transform duration-100 will-change-transform",{"w-[21px] h-[21px] translate-x-0.5 data-[state=checked]:translate-x-[21px]":u==="md","size-4 translate-x-1 data-[state=checked]:translate-x-[18px]":u==="sm"},o)})})});function ze(e,t,{checkForDefaultPrevented:n=!0}={}){return a(function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)},"handleEvent")}a(ze,"composeEventHandlers");function Pr(e){const t=bw(e),n=d.forwardRef((r,o)=>{const{children:s,...i}=r,l=d.Children.toArray(s),c=l.find(ww);if(c){const u=c.props.children,f=l.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return m.jsx(t,{...i,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return m.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}a(Pr,"createSlot");var zT=Pr("Slot");function bw(e){const t=d.forwardRef((n,r)=>{const{children:o,...s}=n;if(d.isValidElement(o)){const i=Sw(o),l=Cw(s,o.props);return o.type!==d.Fragment&&(l.ref=r?nn(r,i):i),d.cloneElement(o,l)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}a(bw,"createSlotClone");var xw=Symbol("radix.slottable");function ww(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===xw}a(ww,"isSlottable");function Cw(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...l)=>{s(...l),o(...l)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}a(Cw,"mergeProps");function Sw(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}a(Sw,"getElementRef$1");var Pw=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Un=Pw.reduce((e,t)=>
102{const n=Pr(`Primitive.${t}`),r=d.forwardRef((o,s)=>{const{asChild:i,...l}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(c,{...l,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ew(e){const t=e+"CollectionProvider",[n,r]=Re(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=a(v=>{const{scope:b,children:C}=v,w=M.useRef(null),x=M.useRef(new Map).current;return m.jsx(o,{scope:b,itemMap:x,collectionRef:w,children:C})},"CollectionProvider");i.displayName=t;const l=e+"CollectionSlot",c=Pr(l),u=M.forwardRef((v,b)=>{const{scope:C,children:w}=v,x=s(l,C),S=X(b,x.collectionRef);return m.jsx(c,{ref:S,children:w})});u.displayName=l;const f=e+"CollectionItemSlot",p="data-radix-collection-item",g=Pr(f),h=M.forwardRef((v,b)=>{const{scope:C,children:w,...x}=v,S=M.useRef(null),P=X(b,S),R=s(f,C);return M.useEffect(()=>(R.itemMap.set(S,{ref:S,...x}),()=>{R.itemMap.delete(S)})),m.jsx(g,{[p]:"",ref:P,children:w})});h.displayName=f;function y(v){const b=s(e+"CollectionConsumer",v);return M.useCallback(()=>{const w=b.collectionRef.current;if(!w)return[];const x=Array.from(w.querySelectorAll(`[${p}]`));return Array.from(b.itemMap.values()).sort((R,E)=>x.indexOf(R.ref.current)-x.indexOf(E.ref.current))},[b.collectionRef,b.itemMap])}return a(y,"useCollection"),[{Provider:i,Slot:u,ItemSlot:h},y,r]}a(Ew,"createCollection");function zd({prop:e,defaultProp:t,onChange:n=a(()=>{},"onChange")}){const[r,o]=Tw({defaultProp:t,onChange:n}),s=e!==void 0,i=s?e:r,l=ye(n),c=d.useCallback(u=>{if(s){const p=typeof u=="function"?u(e):u;p!==e&&l(p)}else o(u)},[s,e,o,l]);return[i,c]}a(zd,"useControllableState");function Tw({defaultProp:e,onChange:t}){const n=d.useState(e),[r]=n,o=d.useRef(r),s=ye(t);return d.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}a(Tw,"useUncontrolledState");var Ro="rovingFocusGroup.onEntryFocus",Rw={bubbles:!1,cancelable:!0},eo="RovingFocusGroup",[cs,Kd,Aw]=Ew(eo),[Mw,Gd]=Re(eo,[Aw]),[Nw,Dw]=Mw(eo),Yd=d.forwardRef((e,t)=>m.jsx(cs.Provider,{scope:e.__scopeRovingFocusGroup,children:m.jsx(cs.Slot,{scope:e.__scopeRovingFocusGroup,children:m.jsx(Iw,{...e,ref:t})})}));Yd.displayName=eo;var Iw=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...p}=e,g=d.useRef(null),h=X(t,g),y=jn(s),[v=null,b]=zd({prop:i,defaultProp:l,onChange:c}),[C,w]=d.useState(!1),x=ye(u),S=Kd(n),P=d.useRef(!1),[R,E]=d.useState(0);return d.useEffect(()=>{const T=g.current;if(T)return T.addEventListener(Ro,x),()=>T.removeEventListener(Ro,x)},[x]),m.jsx(Nw,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:v,onItemFocus:d.useCallback(T=>b(T),[b]),onItemShiftTab:d.useCallback(()=>w(!0),[]),onFocusableItemAdd:d.useCallback(()=>E(T=>T+1),[]),onFocusableItemRemove:d.useCallback(()=>E(T=>T-1),[]),children:m.jsx(Un.div,{tabIndex:C||R===0?-1:0,"data-orientation":r,...p,ref:h,style:{outline:"none",...e.style},onMouseDown:ze(e.onMouseDown,()=>{P.current=!0}),onFocus:ze(e.onFocus,T=>{const O=!P.current;if(T.target===T.currentTarget&&O&&!C){const I=new CustomEvent(Ro,Rw);if(T.currentTarget.dispatchEvent(I),!I.defaultPrevented){const L=S().filter(j=>j.focusable),V=L.find(j=>j.active),W=L.find(j=>j.id===v),F=[V,W,...L].filter(Boolean).map(j=>j.ref.current);Zd(F,f)}}P.current=!1}),onBlur:ze(e.onBlur,()=>w(!1))})})}),Xd="RovingFocusGroupItem",qd=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,...i}=e,l=we(),c=s||l,u=Dw(Xd,n),f=u.currentTabStopId===c,p=Kd(n),{onFocusableItemAdd:g,onFocusableItemRemove:h}=u;return d.useEffect(()=>{if(r)return g(),()=>h()},[r,g,h]),m.jsx(cs.ItemSlot,{scope:n,id:c,focusable:r,active:o,children:m.jsx(Un.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:ze(e.onMouseDown,y=>{r?u.onItemFocus(c):y.preventDefault()}),onFocus:ze(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:ze(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){u.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const v=kw(y,u.orientation,u.dir);if(v!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let C=p().filter(w=>w.focusable).map(w=>w.ref.current);if(v==="last")C.reverse();else if(v==="prev"||v==="next"){v==="prev"&&C.reverse();const w=C.indexOf(y.currentTarget);C=u.loop?_w(C,w+1):C.slice(w+1)}setTimeout(()=>Zd(C))}})})})});qd.displayName=Xd;var Ow={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function jw(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}a(jw,"getDirectionAwareKey");function kw(e,t,n){const r=jw(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Ow[r]}a(kw,"getFocusIntent");function Zd(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}a(Zd,"focusFirst");function _w(e,t){return e.map((n,r)=>e[(t+r)%e.length])}a(_w,"wrapArray");var Lw=Yd,Fw=qd;function Vw(e,t){return d.useReducer((n,r)=>t[n][r]??n,e)}a(Vw,"useStateMachine");var Qd=a(e=>{const{present:t,children:n}=e,r=$w(t),o=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),s=X(r.ref,Bw(o));return typeof n=="function"||r.isPresent?d.cloneElement(o,{ref:s}):null},"Presence");Qd.displayName="Presence";
102function $w(e){const[t,n]=d.useState(),r=d.useRef({}),o=d.useRef(e),s=d.useRef("none"),i=e?"mounted":"unmounted",[l,c]=Vw(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const u=ir(r.current);s.current=l==="mounted"?u:"none"},[l]),de(()=>{const u=r.current,f=o.current;if(f!==e){const g=s.current,h=ir(u);e?c("MOUNT"):h==="none"||u?.display==="none"?c("UNMOUNT"):c(f&&g!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),de(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,p=a(h=>{const v=ir(r.current).includes(h.animationName);if(h.target===t&&v&&(c("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},"handleAnimationEnd"),g=a(h=>{h.target===t&&(s.current=ir(r.current))},"handleAnimationStart");return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:d.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}a($w,"usePresence$1");function ir(e){return e?.animationName||"none"}a(ir,"getAnimationName");function Bw(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}a(Bw,"getElementRef");var ri="Radio",[Hw,Jd]=Re(ri),[Ww,Uw]=Hw(ri),ef=d.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:s,disabled:i,value:l="on",onCheck:c,form:u,...f}=e,[p,g]=d.useState(null),h=X(t,b=>g(b)),y=d.useRef(!1),v=p?u||!!p.closest("form"):!0;return m.jsxs(Ww,{scope:n,checked:o,disabled:i,children:[m.jsx(Un.button,{type:"button",role:"radio","aria-checked":o,"data-state":rf(o),"data-disabled":i?"":void 0,disabled:i,value:l,...f,ref:h,onClick:ze(e.onClick,b=>{o||c?.(),v&&(y.current=b.isPropagationStopped(),y.current||b.stopPropagation())})}),v&&m.jsx(zw,{control:p,bubbles:!y.current,name:r,value:l,checked:o,required:s,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});ef.displayName=ri;var tf="RadioIndicator",nf=d.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,s=Uw(tf,n);return m.jsx(Qd,{present:r||s.checked,children:m.jsx(Un.span,{"data-state":rf(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t})})});nf.displayName=tf;var zw=a(e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,s=d.useRef(null),i=fd(n),l=Hc(t);return d.useEffect(()=>{const c=s.current,u=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(u,"checked").set;if(i!==n&&p){const g=new Event("click",{bubbles:r});p.call(c,n),c.dispatchEvent(g)}},[i,n,r]),m.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:s,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})},"BubbleInput");function rf(e){return e?"checked":"unchecked"}a(rf,"getState$2");var Kw=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],oi="RadioGroup",[Gw]=Re(oi,[Gd,Jd]),of=Gd(),sf=Jd(),[Yw,Xw]=Gw(oi),af=d.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:s,required:i=!1,disabled:l=!1,orientation:c,dir:u,loop:f=!0,onValueChange:p,...g}=e,h=of(n),y=jn(u),[v,b]=zd({prop:s,defaultProp:o,onChange:p});return m.jsx(Yw,{scope:n,name:r,required:i,disabled:l,value:v,onValueChange:b,children:m.jsx(Lw,{asChild:!0,...h,orientation:c,dir:y,loop:f,children:m.jsx(Un.div,{role:"radiogroup","aria-required":i,"aria-orientation":c,"data-disabled":l?"":void 0,dir:y,...g,ref:t})})})});af.displayName=oi;var lf="RadioGroupItem",cf=d.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,s=Xw(lf,n),i=s.disabled||r,l=of(n),c=sf(n),u=d.useRef(null),f=X(t,u),p=s.value===o.value,g=d.useRef(!1);return d.useEffect(()=>{const h=a(v=>
102{Kw.includes(v.key)&&(g.current=!0)},"handleKeyDown"),y=a(()=>g.current=!1,"handleKeyUp");return document.addEventListener("keydown",h),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",y)}},[]),m.jsx(Fw,{asChild:!0,...l,focusable:!i,active:p,children:m.jsx(ef,{disabled:i,required:s.required,checked:p,...c,...o,name:s.name,ref:f,onCheck:a(()=>s.onValueChange(o.value),"onCheck"),onKeyDown:ze(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:ze(o.onFocus,()=>{g.current&&u.current?.click()})})})});cf.displayName=lf;var qw="RadioGroupIndicator",Zw=d.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=sf(n);return m.jsx(nf,{...o,...r,ref:t})});Zw.displayName=qw;var Qw=af,uf=cf;const df=d.forwardRef(({className:e,...t},n)=>m.jsx(Qw,{ref:n,className:e,...t}));df.displayName="RadioGroup";const ff=d.forwardRef((e,t)=>{const{id:n,"aria-describedby":r,className:o,...s}=e,i=Wn({id:n,ariaDescribedBy:r});return m.jsx(uf,{ref:t,id:i.id,"aria-describedby":i.ariaDescribedBy,className:D("relative box-border flex items-center justify-center group shrink-0","size-4 rounded-full border-2 border-bolt-ds-textTertiary bg-bolt-ds-bgSecondary",` 103 data-[disabled]:cursor-not-allowed 104 data-[disabled]:opacity-50 105 data-[state=checked]:bg-white 106 data-[state=checked]:border-5 107 data-[state=checked]:border-bolt-ds-brand 108 focus-visible:outline-none 109 focus-visible:ring-2 110 focus-visible:ring-bolt-ds-brand 111 focus-visible:ring-offset-2 112 focus-visible:ring-offset-bolt-ds-bgSecondary 113 hover:border-bolt-ds-textSecondary 114 hover:data-[state=checked]:border-bolt-ds-brand 115 `,o),...s})});ff.displayName="RadioGroupItem";const si=d.forwardRef((e,t)=>{const{className:n,children:r,...o}=e;return m.jsx(uf,{ref:t,className:D("bg-bolt-ds-bgSecondary border border-bolt-ds-borderPrimary rounded-lg px-4 min-h-12 text-sm",` 116 data-[disabled]:cursor-not-allowed 117 data-[disabled]:opacity-50 118 data-[state=checked]:bg-bolt-ds-bgTertiary 119 data-[state=checked]:border-bolt-ds-brand 120 data-[state=checked]:ring-0.5 121 data-[state=checked]:ring-bolt-ds-brand 122 enabled:hover:bg-bolt-ds-bgTertiary 123 focus-visible:outline-none 124 focus-visible:ring-2 125 focus-visible:ring-bolt-ds-brand 126 focus-visible:ring-offset-2 127 `,n),...o,children:r})});si.displayName="RadioGroupCardItem";const Jw=d.forwardRef((e,t)=>{const{icon:n,title:r,description:o,className:s,...i}=e;return m.jsxs(si,{ref:t,className:D("flex flex-col gap-0.5 min-w-[210px] py-3",s),...i,children:[m.jsxs("div",{className:"flex gap-1.5 items-center font-medium",children:[m.jsx("span",{className:D(n,"block size-4")}),m.jsx("span",{children:r})]}),o?m.jsx("p",{className:"text-bolt-ds-textSecondary lg:text-sm text-xs text-start",children:o}):null]})});Jw.displayName="RadioGroupOptionCardItem";const KT={Root:df,Item:ff,CardItem:si},e0=_r("inline-flex items-center justify-center rounded font-mono font-medium",{variants:{variant:{default:"border border-bolt-ds-borderPrimary bg-bolt-ds-bgSecondary text-bolt-ds-textSecondary shadow-sm",ghost:"bg-bolt-ds-utilHover text-bolt-ds-textTertiary",outline:"border border-bolt-ds-borderPrimary text-bolt-ds-textTertiary"},size:{sm:"h-5 min-w-5 px-1 text-[10px]",md:"h-6 min-w-6 px-1.5 text-xs",lg:"h-7 min-w-7 px-2 text-sm"}},defaultVariants:{variant:"default",size:"md"}}),t0=d.forwardRef(({className:e,variant:t,size:n,children:r,...o},s)=>m.jsx("kbd",{ref:s,className:D(e0({variant:t,size:n}),e),...o,children:r}));t0.displayName="Kbd";var to="Dialog",[pf]=Re(to),[n0,ke]=pf(to),hf=a(e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,l=d.useRef(null),c=d.useRef(null),[u,f]=Nt({prop:r,defaultProp:o??!1,onChange:s,caller:to});return m.jsx(n0,{scope:t,triggerRef:l,contentRef:c,contentId:we(),titleId:we(),descriptionId:we(),open:u,onOpenChange:f,onOpenToggle:d.useCallback(()=>f(p=>!p),[f]),modal:i,children:n})},"Dialog$1");hf.displayName=to;var mf="DialogTrigger",gf=d.forwardRef((e,t)=>
127{const{__scopeDialog:n,...r}=e,o=ke(mf,n),s=X(t,o.triggerRef);return m.jsx(Y.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":li(o.open),...r,ref:s,onClick:_(e.onClick,o.onOpenToggle)})});gf.displayName=mf;var ii="DialogPortal",[r0,vf]=pf(ii,{forceMount:void 0}),yf=a(e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=ke(ii,t);return m.jsx(r0,{scope:t,forceMount:n,children:d.Children.map(r,i=>m.jsx(He,{present:n||s.open,children:m.jsx(Ln,{asChild:!0,container:o,children:i})}))})},"DialogPortal");yf.displayName=ii;var Er="DialogOverlay",bf=d.forwardRef((e,t)=>{const n=vf(Er,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=ke(Er,e.__scopeDialog);return s.modal?m.jsx(He,{present:r||s.open,children:m.jsx(s0,{...o,ref:t})}):null});bf.displayName=Er;var o0=ct("DialogOverlay.RemoveScroll"),s0=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ke(Er,n);return m.jsx(Vn,{as:o0,allowPinchZoom:!0,shards:[o.contentRef],children:m.jsx(Y.div,{"data-state":li(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Ot="DialogContent",xf=d.forwardRef((e,t)=>{const n=vf(Ot,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=ke(Ot,e.__scopeDialog);return m.jsx(He,{present:r||s.open,children:s.modal?m.jsx(i0,{...o,ref:t}):m.jsx(a0,{...o,ref:t})})});xf.displayName=Ot;var i0=d.forwardRef((e,t)=>{const n=ke(Ot,e.__scopeDialog),r=d.useRef(null),o=X(t,n.contentRef,r);return d.useEffect(()=>{const s=r.current;if(s)return Kr(s)},[]),m.jsx(wf,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:_(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0;(i.button===2||l)&&s.preventDefault()}),onFocusOutside:_(e.onFocusOutside,s=>s.preventDefault())})}),a0=d.forwardRef((e,t)=>{const n=ke(Ot,e.__scopeDialog),r=d.useRef(!1),o=d.useRef(!1);return m.jsx(wf,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a(s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},"onCloseAutoFocus"),onInteractOutside:a(s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;n.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()},"onInteractOutside")})}),wf=d.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,l=ke(Ot,n),c=d.useRef(null),u=X(t,c);return Wr(),m.jsxs(m.Fragment,{children:[m.jsx(_n,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:m.jsx(kn,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":li(l.open),...i,ref:u,onDismiss:a(()=>l.onOpenChange(!1),"onDismiss")})}),m.jsxs(m.Fragment,{children:[m.jsx(l0,{titleId:l.titleId}),m.jsx(u0,{contentRef:c,descriptionId:l.descriptionId})]})]})}),ai="DialogTitle",Zt=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ke(ai,n);return m.jsx(Y.h2,{id:o.titleId,...r,ref:t})});Zt.displayName=ai;var Cf="DialogDescription",Sf=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ke(Cf,n);return m.jsx(Y.p,{id:o.descriptionId,...r,ref:t})});Sf.displayName=Cf;var Pf="DialogClose",Ef=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ke(Pf,n);return m.jsx(Y.button,{type:"button",...r,ref:t,onClick:_(e.onClick,()=>o.onOpenChange(!1))})});Ef.displayName=Pf;function li(e){return e?"open":"closed"}a(li,"getState$1");var Tf="DialogTitleWarning",[GT,Rf]=rv(Tf,{contentName:Ot,titleName:ai,docsSlug:"dialog"}),l0=a(({titleId:e})=>{const t=Rf(Tf),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 128 129If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 130 131For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return d.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},"TitleWarning"),c0="DialogDescriptionWarning",u0=a(({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Rf(c0).contentName}}.`;return d.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");
131t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},"DescriptionWarning"),d0=hf,YT=gf,f0=yf,p0=bf,h0=xf,XT=Zt,m0=Sf,g0=Ef;const ci=d.createContext({transformPagePoint:a(e=>e,"transformPagePoint"),isStatic:!1,reducedMotion:"never"}),no=d.createContext({}),zn=d.createContext(null),ui=typeof document<"u",di=ui?d.useLayoutEffect:d.useEffect,Af=d.createContext({strict:!1}),fi=a(e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),"camelToDash"),v0="framerAppearId",Mf="data-"+fi(v0),y0={useManualTiming:!1};class Ta{static{a(this,"Queue")}constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function b0(e){let t=new Ta,n=new Ta,r=0,o=!1,s=!1;const i=new WeakSet,l={schedule:a((c,u=!1,f=!1)=>{const p=f&&o,g=p?t:n;return u&&i.add(c),g.add(c)&&p&&o&&(r=t.order.length),c},"schedule"),cancel:a(c=>{n.remove(c),i.delete(c)},"cancel"),process:a(c=>{if(o){s=!0;return}if(o=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let u=0;u<r;u++){const f=t.order[u];i.has(f)&&(l.schedule(f),e()),f(c)}o=!1,s&&(s=!1,l.process(c))},"process")};return l}a(b0,"createRenderStep");const ar=["read","resolveKeyframes","update","preRender","render","postRender"],x0=40;function Nf(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=ar.reduce((p,g)=>(p[g]=b0(()=>n=!0),p),{}),i=a(p=>{s[p].process(o)},"processStep"),l=a(()=>{const p=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(p-o.timestamp,x0),1),o.timestamp=p,o.isProcessing=!0,ar.forEach(i),o.isProcessing=!1,n&&t&&(r=!1,e(l))},"processBatch"),c=a(()=>{n=!0,r=!0,o.isProcessing||e(l)},"wake");return{schedule:ar.reduce((p,g)=>{const h=s[g];return p[g]=(y,v=!1,b=!1)=>(n||c(),h.schedule(y,v,b)),p},{}),cancel:a(p=>ar.forEach(g=>s[g].cancel(p)),"cancel"),state:o,steps:s}}a(Nf,"createRenderBatcher");const{schedule:pi}=Nf(queueMicrotask,!1);function Wt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}a(Wt,"isRefObject");const Df=d.createContext({});let Ra=!1;function w0(e,t,n,r,o){const{visualElement:s}=d.useContext(no),i=d.useContext(Af),l=d.useContext(zn),c=d.useContext(ci).reducedMotion,u=d.useRef();r=r||i.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c}));const f=u.current,p=d.useContext(Df);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&S0(u.current,n,o,p),d.useInsertionEffect(()=>{f&&f.update(n,l)});const g=d.useRef(!!(n[Mf]&&!window.HandoffComplete));return di(()=>{f&&(f.updateFeatures(),pi.render(f.render),g.current&&f.animationState&&f.animationState.animateChanges())}),d.useEffect(()=>{f&&(!g.current&&f.animationState&&f.animationState.animateChanges(),g.current&&(g.current=!1,Ra||(Ra=!0,queueMicrotask(C0))))}),f}a(w0,"useVisualElement");function C0(){window.HandoffComplete=!0}a(C0,"completeHandoff");function S0(e,t,n,r){const{layoutId:o,layout:s,drag:i,dragConstraints:l,layoutScroll:c,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:If(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||l&&Wt(l),visualElement:e,scheduleRender:a(()=>e.scheduleRender(),"scheduleRender"),animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:c,layoutRoot:u})}a(S0,"createProjectionNode$1");function If(e){if(e)return e.options.allowProjection!==!1?e.projection:If(e.parent)}a(If,"getClosestProjectingNode");function P0(e,t,n){return d.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Wt(n)&&(n.current=r))},[t])}a(P0,"useMotionRef");function Rn(e){return typeof e=="string"||Array.isArray(e)}a(Rn,"isVariantLabel");function ro(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}a(ro,"isAnimationControls");const hi=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],mi=["initial",...hi];function oo(e){return ro(e.animate)||mi.some(t=>Rn(e[t]))}a(oo,"isControllingVariants");function Of(e){return!!(oo(e)||e.variants)}a(Of,"isVariantNode");function E0(e,t){if(oo(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Rn(n)?n:void 0,animate:Rn(r)?r:void 0}}return e.inherit!==!1?t:{}}a(E0,"getCurrentTreeVariants");function T0(e){const{initial:t,animate:n}=E0(e,d.useContext(no));return d.useMemo(()=>({initial:t,animate:n}),[Aa(t),Aa(n)])}a(T0,"useCreateMotionContext");function Aa(e){return Array.isArray(e)?e.join(" "):e}a(Aa,"variantLabelsAsDependency");const Ma={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"]},Qt={};for(const e in Ma)Qt[e]={isEnabled:a(t=>Ma[e].some(n=>!!t[n]),"isEnabled")};function R0(e){for(const t in e)Qt[t]={...Qt[t],...e[t]}}a(R0,"loadFeatures");const gi=d.createContext({}),A0=Symbol.for("motionComponentSymbol"),me=a(e=>e,"noop");let jf=me;function M0({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&R0(e);function s(l,c){let u;const f={...d.useContext(ci),...l,layoutId:N0(l)},{isStatic:p}
131=f,g=T0(l),h=r(l,p);if(!p&&ui){D0();const y=I0(f);u=y.MeasureLayout,g.visualElement=w0(o,h,f,t,y.ProjectionNode)}return m.jsxs(no.Provider,{value:g,children:[u&&g.visualElement?m.jsx(u,{visualElement:g.visualElement,...f}):null,n(o,l,P0(h,g.visualElement,c),h,p,g.visualElement)]})}a(s,"MotionComponent");const i=d.forwardRef(s);return i[A0]=o,i}a(M0,"createMotionComponent");function N0({layoutId:e}){const t=d.useContext(gi).id;return t&&e!==void 0?t+"-"+e:e}a(N0,"useLayoutId");function D0(e,t){d.useContext(Af).strict}a(D0,"useStrictMode");function I0(e){const{drag:t,layout:n}=Qt;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}a(I0,"getProjectionFunctionality");function O0(e){function t(r,o={}){return M0(e(r,o))}if(a(t,"custom"),typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:a((r,o)=>(n.has(o)||n.set(o,t(o)),n.get(o)),"get")})}a(O0,"createMotionProxy");const j0=["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 vi(e){return typeof e!="string"||e.includes("-")?!1:!!(j0.indexOf(e)>-1||/[A-Z]/u.test(e))}a(vi,"isSVGComponent");const Tr={};function k0(e){Object.assign(Tr,e)}a(k0,"addScaleCorrector");const Kn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],kt=new Set(Kn);function kf(e,{layout:t,layoutId:n}){return kt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Tr[e]||e==="opacity")}a(kf,"isForcedMotionValue");const he=a(e=>!!(e&&e.getVelocity),"isMotionValue"),_0={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},L0=Kn.length;function F0(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,o){let s="";for(let i=0;i<L0;i++){const l=Kn[i];if(e[l]!==void 0){const c=_0[l]||l;s+=`${c}(${e[l]}) `}}return t&&!e.z&&(s+="translateZ(0)"),s=s.trim(),o?s=o(e,r?"":s):n&&r&&(s="none"),s}a(F0,"buildTransform");const _f=a(e=>t=>typeof t=="string"&&t.startsWith(e),"checkStringStartsWith"),Lf=_f("--"),V0=_f("var(--"),yi=a(e=>V0(e)?$0.test(e.split("/*")[0].trim()):!1,"isCSSVariableToken"),$0=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,B0=a((e,t)=>t&&typeof e=="number"?t.transform(e):e,"getValueAsType"),pt=a((e,t,n)=>n>t?t:n<e?e:n,"clamp"),un={test:a(e=>typeof e=="number","test"),parse:parseFloat,transform:a(e=>e,"transform")},bn={...un,transform:a(e=>pt(0,1,e),"transform")},lr={...un,default:1},xn=a(e=>Math.round(e*1e5)/1e5,"sanitize"),bi=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,H0=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,W0=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function Gn(e){return typeof e=="string"}a(Gn,"isString");const Yn=a(e=>({test:a(t=>Gn(t)&&t.endsWith(e)&&t.split(" ").length===1,"test"),parse:parseFloat,transform:a(t=>`${t}${e}`,"transform")}),"createUnitType"),ot=Yn("deg"),Ve=Yn("%"),B=Yn("px"),U0=Yn("vh"),z0=Yn("vw"),Na={...Ve,parse:a(e=>Ve.parse(e)/100,"parse"),transform:a(e=>Ve.transform(e*100),"transform")},Da={...un,transform:Math.round},Ff={borderWidth:B,borderTopWidth:B,borderRightWidth:B,borderBottomWidth:B,borderLeftWidth:B,borderRadius:B,radius:B,borderTopLeftRadius:B,borderTopRightRadius:B,borderBottomRightRadius:B,borderBottomLeftRadius:B,width:B,maxWidth:B,height:B,maxHeight:B,size:B,top:B,right:B,bottom:B,left:B,padding:B,paddingTop:B,paddingRight:B,paddingBottom:B,paddingLeft:B,margin:B,marginTop:B,marginRight:B,marginBottom:B,marginLeft:B,rotate:ot,rotateX:ot,rotateY:ot,rotateZ:ot,scale:lr,scaleX:lr,scaleY:lr,scaleZ:lr,skew:ot,skewX:ot,skewY:ot,distance:B,translateX:B,translateY:B,translateZ:B,x:B,y:B,z:B,perspective:B,transformPerspective:B,opacity:bn,originX:Na,originY:Na,originZ:B,zIndex:Da,backgroundPositionX:B,backgroundPositionY:B,fillOpacity:bn,strokeOpacity:bn,numOctaves:Da};function xi(e,t,n,r){const{style:o,vars:s,transform:i,transformOrigin:l}=e;let c=!1,u=!1,f=!0;for(const p in t){const g=t[p];if(Lf(p)){s[p]=g;continue}const h=Ff[p],y=B0(g,h);if(kt.has(p)){if(c=!0,i[p]=y,!f)continue;g!==(h.default||0)&&(f=!1)}else p.startsWith("origin")?(u=!0,l[p]=y):o[p]=y}if(t.transform||(c||r?o.transform=F0(e.transform,n,f,r):o.transform&&(o.transform="none")),u){const{originX:p="50%",originY:g="50%",originZ:h=0}=l;o.transformOrigin=`${p} ${g} ${h}`}}a(xi,"buildHTMLStyles");const wi=a(()=>({style:{},transform:{},transformOrigin:{},vars:{}}),"createHtmlRenderState");
131function Vf(e,t,n){for(const r in t)!he(t[r])&&!kf(r,n)&&(e[r]=t[r])}a(Vf,"copyRawValuesOnly");function K0({transformTemplate:e},t,n){return d.useMemo(()=>{const r=wi();return xi(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}a(K0,"useInitialMotionValues");function G0(e,t,n){const r=e.style||{},o={};return Vf(o,r,e),Object.assign(o,K0(e,t,n)),o}a(G0,"useStyle");function Y0(e,t,n){const r={},o=G0(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}a(Y0,"useHTMLProps");const X0=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 Rr(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||X0.has(e)}a(Rr,"isValidMotionProp");let $f=a(e=>!Rr(e),"shouldForward");function q0(e){e&&($f=a(t=>t.startsWith("on")?!Rr(t):e(t),"shouldForward"))}a(q0,"loadExternalIsValidProp");try{q0(require("@emotion/is-prop-valid").default)}catch{}function Z0(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||($f(o)||n===!0&&Rr(o)||!t&&!Rr(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}a(Z0,"filterProps");function Ia(e,t,n){return typeof e=="string"?e:B.transform(t+n*e)}a(Ia,"calcOrigin$1");function Q0(e,t,n){const r=Ia(t,e.x,e.width),o=Ia(n,e.y,e.height);return`${r} ${o}`}a(Q0,"calcSVGTransformOrigin");const J0={offset:"stroke-dashoffset",array:"stroke-dasharray"},eC={offset:"strokeDashoffset",array:"strokeDasharray"};function tC(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?J0:eC;e[s.offset]=B.transform(-r);const i=B.transform(t),l=B.transform(n);e[s.array]=`${i} ${l}`}a(tC,"buildSVGPath");function Ci(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:l=1,pathOffset:c=0,...u},f,p,g){if(xi(e,u,f,g),p){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:y,dimensions:v}=e;h.transform&&(v&&(y.transform=h.transform),delete h.transform),v&&(o!==void 0||s!==void 0||y.transform)&&(y.transformOrigin=Q0(v,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),i!==void 0&&tC(h,i,l,c,!1)}a(Ci,"buildSVGAttrs");const Bf=a(()=>({...wi(),attrs:{}}),"createSvgRenderState"),Si=a(e=>typeof e=="string"&&e.toLowerCase()==="svg","isSVGTag");function nC(e,t,n,r){const o=d.useMemo(()=>{const s=Bf();return Ci(s,t,{enableHardwareAcceleration:!1},Si(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Vf(s,e.style,e),o.style={...s,...o.style}}return o}a(nC,"useSVGProps");function rC(e=!1){return a((n,r,o,{latestValues:s},i)=>{const c=(vi(n)?nC:Y0)(r,s,i,n),u=Z0(r,typeof n=="string",e),f=n!==d.Fragment?{...u,...c,ref:o}:{},{children:p}=r,g=d.useMemo(()=>he(p)?p.get():p,[p]);return d.createElement(n,{...f,children:g})},"useRender")}a(rC,"createUseRender");function Hf(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}a(Hf,"renderHTML");const Wf=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 Uf(e,t,n,r){Hf(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Wf.has(o)?o:fi(o),t.attrs[o])}
131a(Uf,"renderSVG");function Pi(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(he(o[i])||t.style&&he(t.style[i])||kf(i,e)||((r=n?.getValue(i))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[i]=o[i]);return s}a(Pi,"scrapeMotionValuesFromProps$1");function zf(e,t,n){const r=Pi(e,t,n);for(const o in e)if(he(e[o])||he(t[o])){const s=Kn.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}a(zf,"scrapeMotionValuesFromProps");function Oa(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}a(Oa,"getValueState");function Ei(e,t,n,r){if(typeof t=="function"){const[o,s]=Oa(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=Oa(r);t=t(n!==void 0?n:e.custom,o,s)}return t}a(Ei,"resolveVariantFromProps");function Kf(e){const t=d.useRef(null);return t.current===null&&(t.current=e()),t.current}a(Kf,"useConstant");const us=a(e=>Array.isArray(e),"isKeyframesTarget"),oC=a(e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),"isCustomValue"),sC=a(e=>us(e)?e[e.length-1]||0:e,"resolveFinalValueInKeyframes");function pr(e){const t=he(e)?e.get():e;return oC(t)?t.toValue():t}a(pr,"resolveMotionValue");function iC({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,s){const i={latestValues:aC(r,o,s,e),renderState:t()};return n&&(i.mount=l=>n(r,l,i)),i}a(iC,"makeState");const Gf=a(e=>(t,n)=>{const r=d.useContext(no),o=d.useContext(zn),s=a(()=>iC(e,t,r,o),"make");return n?s():Kf(s)},"makeUseVisualState");function aC(e,t,n,r){const o={},s=r(e,{});for(const g in s)o[g]=pr(s[g]);let{initial:i,animate:l}=e;const c=oo(e),u=Of(e);t&&u&&!c&&e.inherit!==!1&&(i===void 0&&(i=t.initial),l===void 0&&(l=t.animate));let f=n?n.initial===!1:!1;f=f||i===!1;const p=f?l:i;return p&&typeof p!="boolean"&&!ro(p)&&(Array.isArray(p)?p:[p]).forEach(h=>{const y=Ei(e,h);if(!y)return;const{transitionEnd:v,transition:b,...C}=y;for(const w in C){let x=C[w];if(Array.isArray(x)){const S=f?x.length-1:0;x=x[S]}x!==null&&(o[w]=x)}for(const w in v)o[w]=v[w]}),o}a(aC,"makeLatestValues");const{schedule:ee,cancel:Qe,state:fe,steps:Ao}=Nf(typeof requestAnimationFrame<"u"?requestAnimationFrame:me,!0),lC={useVisualState:Gf({scrapeMotionValuesFromProps:zf,createRenderState:Bf,onMount:a((e,t,{renderState:n,latestValues:r})=>{ee.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),ee.render(()=>{Ci(n,r,{enableHardwareAcceleration:!1},Si(t.tagName),e.transformTemplate),Uf(t,n)})},"onMount")})},cC={useVisualState:Gf({scrapeMotionValuesFromProps:Pi,createRenderState:wi})};function uC(e,{forwardMotionProps:t=!1},n,r){return{...vi(e)?lC:cC,preloadedFeatures:n,useRender:rC(t),createVisualElement:r,Component:e}}a(uC,"createDomMotionConfig");function Ue(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}a(Ue,"addDomEvent");const Yf=a(e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,"isPrimaryPointer");function so(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}a(so,"extractEventInfo");const dC=a(e=>t=>Yf(t)&&e(t,so(t)),"addPointerInfo");function Ke(e,t,n,r){return Ue(e,t,dC(n),r)}a(Ke,"addPointerEvent");const fC=a((e,t)=>n=>t(e(n)),"combineFunctions"),Ge=a((...e)=>e.reduce(fC),"pipe");function Xf(e){let t=null;return()=>{const n=a(()=>{t=null},"openLock");return t===null?(t=e,n):!1}}a(Xf,"createLock");const ja=Xf("dragHorizontal"),ka=Xf("dragVertical");function qf(e){let t=!1;if(e==="y")t=ka();else if(e==="x")t=ja();else{const n=ja(),r=ka();n&&r?t=a(()=>{n(),r()},"lock"):(n&&n(),r&&r())}return t}a(qf,"getGlobalLock");function Zf(){const e=qf(!0);return e?(e(),!1):!0}a(Zf,"isDragActive");class bt{static{a(this,"Feature")}constructor(t){this.isMounted=!1,this.node=t}update(){}}function _a(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",o=a((s,i)=>{if(s.pointerType==="touch"||Zf())return;const l=e.getProps();e.animationState&&l.whileHover&&e.animationState.setActive("whileHover",t);const c=l[r];c&&ee.postRender(()=>c(s,i))},"handleEvent");return Ke(e.current,n,o,{passive:!e.getProps()[r]})}
131a(_a,"addHoverEvent");class pC extends bt{static{a(this,"HoverGesture")}mount(){this.unmount=Ge(_a(this.node,!0),_a(this.node,!1))}unmount(){}}class hC extends bt{static{a(this,"FocusGesture")}constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!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=Ge(Ue(this.node.current,"focus",()=>this.onFocus()),Ue(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Qf=a((e,t)=>t?e===t?!0:Qf(e,t.parentElement):!1,"isNodeOrChild");function Mo(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,so(n))}a(Mo,"fireSyntheticPointerEvent");class mC extends bt{static{a(this,"PressGesture")}constructor(){super(...arguments),this.removeStartListeners=me,this.removeEndListeners=me,this.removeAccessibleListeners=me,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),s=Ke(window,"pointerup",a((l,c)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:f,globalTapTarget:p}=this.node.getProps(),g=!p&&!Qf(this.node.current,l.target)?f:u;g&&ee.update(()=>g(l,c))},"endPointerPress"),{passive:!(r.onTap||r.onPointerUp)}),i=Ke(window,"pointercancel",(l,c)=>this.cancelPress(l,c),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Ge(s,i),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=a(s=>{if(s.key!=="Enter"||this.isPressing)return;const i=a(l=>{l.key!=="Enter"||!this.checkPressEnd()||Mo("up",(c,u)=>{const{onTap:f}=this.node.getProps();f&&ee.postRender(()=>f(c,u))})},"handleKeyup");this.removeEndListeners(),this.removeEndListeners=Ue(this.node.current,"keyup",i),Mo("down",(l,c)=>{this.startPress(l,c)})},"handleKeydown"),n=Ue(this.node.current,"keydown",t),r=a(()=>{this.isPressing&&Mo("cancel",(s,i)=>this.cancelPress(s,i))},"handleBlur"),o=Ue(this.node.current,"blur",r);this.removeAccessibleListeners=Ge(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&ee.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Zf()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&ee.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Ke(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Ue(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Ge(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const ds=new WeakMap,No=new WeakMap,gC=a(e=>{const t=ds.get(e.target);t&&t(e)},"fireObserverCallback"),vC=a(e=>{e.forEach(gC)},"fireAllObserverCallbacks");function yC({root:e,...t}){const n=e||document;No.has(n)||No.set(n,{});const r=No.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(vC,{root:e,...t})),r[o]}a(yC,"initIntersectionObserver");function bC(e,t,n){const r=yC(t);return ds.set(e,n),r.observe(e),()=>{ds.delete(e),r.unobserve(e)}}a(bC,"observeIntersection");const xC={some:0,all:1};class wC extends bt{static{a(this,"InViewFeature")}constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:xC[o]},l=a(c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:f,onViewportLeave:p}=this.node.getProps(),g=u?f:p;g&&g(c)},"onIntersectionUpdate");return bC(this.node.current,i,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(CC(t,n))&&this.startObserver()}unmount(){}}function CC({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}a(CC,"hasViewportOptionChanged");const SC={inView:{Feature:wC},tap:{Feature:mC},focus:{Feature:hC},hover:{Feature:pC}};function Jf(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}a(Jf,"shallowCompare");function io(e,t,n){const r=e.getProps();return Ei(r,t,n!==void 0?n:r.custom,e)}a(io,"resolveVariant");const at=a(e=>e*1e3,"secondsToMilliseconds"),Ye=a(e=>e/1e3,"millisecondsToSeconds"),PC={type:"spring",stiffness:500,damping:25,restSpeed:10},EC=a(e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),"criticallyDampedSpring"),TC={type:"keyframes",duration:.8},RC={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},AC=a((e,{keyframes:t})=>t.length>2?TC:kt.has(e)?e.startsWith("scale")?EC(t[1]):PC:RC,"getDefaultTransition");function MC({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:l,from:c,elapsed:u,...f}){return!!Object.keys(f).length}a(MC,"isTransitionDefined");function Ti(e,t){return e[t]||e.default||e}a(Ti,"getValueTransition");const NC=a(e=>e!==null,"isNotNull");function ao(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(NC),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}a(ao,"getFinalKeyframe");let hr;function DC(){hr=void 0}a(DC,"clearTime");const lt={now:a(()=>(hr===void 0&<.set(fe.isProcessing||y0.useManualTiming?fe.timestamp:performance.now()),hr),"now"),set:a(e=>{hr=e,queueMicrotask(DC)},"set")},ep=a(e=>/^0[^.\s]+$/u.test(e),"isZeroValueString");function IC(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ep(e):!0}a(IC,"isNone");const tp=a(e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),"isNumericalString"),OC=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function jC(e){const t=OC.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}a(jC,"parseCSSVariable");function np(e,t,n=1){const[r,o]=jC(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return tp(i)?parseFloat(i):i}return yi(o)?np(o,t,n+1):o}a(np,"getVariableValue");const kC=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),La=a(e=>e===un||e===B,"isNumOrPxType"),Fa=a((e,t)=>
131parseFloat(e.split(", ")[t]),"getPosFromMatrix"),Va=a((e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return Fa(o[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?Fa(s[1],e):0}},"getTranslateFromMatrix"),_C=new Set(["x","y","z"]),LC=Kn.filter(e=>!_C.has(e));function FC(e){const t=[];return LC.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}a(FC,"removeNonTranslationalTransform");const Jt={width:a(({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),"width"),height:a(({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),"height"),top:a((e,{top:t})=>parseFloat(t),"top"),left:a((e,{left:t})=>parseFloat(t),"left"),bottom:a(({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),"bottom"),right:a(({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),"right"),x:Va(4,13),y:Va(5,14)};Jt.translateX=Jt.x;Jt.translateY=Jt.y;const rp=a(e=>t=>t.test(e),"testValueType"),VC={test:a(e=>e==="auto","test"),parse:a(e=>e,"parse")},op=[un,B,Ve,ot,z0,U0,VC],$a=a(e=>op.find(rp(e)),"findDimensionValueType"),At=new Set;let fs=!1,ps=!1;function sp(){if(ps){const e=Array.from(At).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=FC(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,i])=>{var l;(l=r.getValue(s))===null||l===void 0||l.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ps=!1,fs=!1,At.forEach(e=>e.complete()),At.clear()}a(sp,"measureAllKeyframes");function ip(){At.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ps=!0)})}a(ip,"readAllKeyframes");function $C(){ip(),sp()}a($C,"flushKeyframeResolvers");class Ri{static{a(this,"KeyframeResolver")}constructor(t,n,r,o,s,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(At.add(this),fs||(fs=!0,ee.read(ip),ee.resolveKeyframes(sp))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const i=o?.get(),l=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const c=r.readValue(n,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),o&&i===void 0&&o.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),At.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,At.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Ai=a((e,t)=>n=>!!(Gn(n)&&W0.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),"isColorString"),ap=a((e,t,n)=>r=>{if(!Gn(r))return r;const[o,s,i,l]=r.match(bi);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:l!==void 0?parseFloat(l):1}},"splitColor"),BC=a(e=>pt(0,255,e),"clampRgbUnit"),Do={...un,transform:a(e=>Math.round(BC(e)),"transform")},Rt={test:Ai("rgb","red"),parse:ap("red","green","blue"),transform:a(({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Do.transform(e)+", "+Do.transform(t)+", "+Do.transform(n)+", "+xn(bn.transform(r))+")","transform")};function HC(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}a(HC,"parseHex");const hs={test:Ai("#"),parse:HC,transform:Rt.transform},Ut={test:Ai("hsl","hue"),parse:ap("hue","saturation","lightness"),transform:a(({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Ve.transform(xn(t))+", "+Ve.transform(xn(n))+", "+xn(bn.transform(r))+")","transform")},pe={test:a(e=>Rt.test(e)||hs.test(e)||Ut.test(e),"test"),parse:a(e=>Rt.test(e)?Rt.parse(e):Ut.test(e)?Ut.parse(e):hs.parse(e),"parse"),transform:a(e=>Gn(e)?e:e.hasOwnProperty("red")?Rt.transform(e):Ut.transform(e),"transform")};function WC(e){var t,n;return isNaN(e)&&Gn(e)&&(((t=e.match(bi))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(H0))===null||n===void 0?void 0:n.length)||0)>0}a(WC,"test");const lp="number",cp="color",UC="var",zC="var(",Ba="${}",KC=/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 An(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const l=t.replace(KC,c=>(pe.test(c)?(r.color.push(s),o.push(cp),n.push(pe.parse(c))):c.startsWith(zC)?(r.var.push(s),o.push(UC),n.push(c)):(r.number.push(s),o.push(lp),n.push(parseFloat(c))),++s,Ba)).split(Ba);return{values:n,split:l,indexes:r,types:o}}a(An,"analyseComplexValue");function up(e){return An(e).values}a(up,"parseComplexValue");function dp(e){const{split:t,types:n}=An(e),r=t.length;return o=>{let s="";for(let i=0;i<r;i++)if(s+=t[i],o[i]!==void 0){const l=n[i];l===lp?s+=xn(o[i]):l===cp?s+=pe.transform(o[i]):s+=o[i]}return s}}a(dp,"createTransformer");const GC=a(e=>typeof e=="number"?0:e,"convertNumbersToZero");function YC(e){const t=up(e);return dp(e)(t.map(GC))}a(YC,"getAnimatableNone$1");const ht={test:WC,parse:up,createTransformer:dp,getAnimatableNone:YC},XC=new Set(["brightness","contrast","saturate","opacity"]);function qC(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(bi)||[];if(!r)return e;const o=n.replace(r,"");let s=XC.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}a(qC,"applyDefaultFilter");const ZC=/\b([a-z-]*)\(.*?\)/gu,ms={...ht,getAnimatableNone:a(e=>{const t=e.match(ZC);return t?t.map(qC).join(" "):e},"getAnimatableNone")},QC={...Ff,color:pe,backgroundColor:pe,outlineColor:pe,fill:pe,stroke:pe,borderColor:pe,borderTopColor:pe,borderRightColor:pe,borderBottomColor:pe,borderLeftColor:pe,filter:ms,WebkitFilter:ms},Mi=a(e=>QC[e],"getDefaultValueType");function fp(e,t){let n=Mi(e);
131return n!==ms&&(n=ht),n.getAnimatableNone?n.getAnimatableNone(t):void 0}a(fp,"getAnimatableNone");const JC=new Set(["auto","none","0"]);function eS(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!JC.has(s)&&An(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=fp(n,o)}a(eS,"makeNoneKeyframesAnimatable");class pp extends Ri{static{a(this,"DOMKeyframesResolver")}constructor(t,n,r,o){super(t,n,r,o,o?.owner,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),yi(u))){const f=np(u,n.current);f!==void 0&&(t[c]=f),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!kC.has(r)||t.length!==2)return;const[o,s]=t,i=$a(o),l=$a(s);if(i!==l)if(La(i)&&La(l))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)IC(t[o])&&r.push(o);r.length&&eS(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Jt[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const i=o.length-1,l=o[i];o[i]=Jt[r](n.measureViewportBox(),window.getComputedStyle(n.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEac
131h(([c,u])=>{n.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function hp(e){let t;return()=>(t===void 0&&(t=e()),t)}a(hp,"memo");const Ha=a((e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ht.test(e)||e==="0")&&!e.startsWith("url(")),"isAnimatable");function tS(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}a(tS,"hasKeyframesChanged");function nS(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=Ha(o,t),l=Ha(s,t);return!i||!l?!1:tS(e)||n==="spring"&&r}a(nS,"canAnimate");class mp{static{a(this,"BaseAnimation")}constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:i="loop",...l}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,...l},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&$C(),this._resolved}onKeyframesResolved(t,n){this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:s,delay:i,onComplete:l,onUpdate:c,isGenerator:u}=this.options;if(!u&&!nS(t,r,o,s))if(i)this.options.duration=0;else{c?.(ao(t,this.options,n)),l?.(),this.resolveFinishedPromise();return}const f=this.initPlayback(t,n);f!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...f},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function gp(e,t){return t?e*(1e3/t):0}a(gp,"velocityPerSecond");const rS=5;function vp(e,t,n){const r=Math.max(t-rS,0);return gp(n-e(r),t-r)}a(vp,"calcGeneratorVelocity");const Io=.001,oS=.01,sS=10,iS=.05,aS=1;function lS({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,s,i=1-t;i=pt(iS,aS,i),e=pt(oS,sS,Ye(e)),i<1?(o=a(u=>{const f=u*i,p=f*e,g=f-n,h=gs(u,i),y=Math.exp(-p);return Io-g/h*y},"envelope"),s=a(u=>{const p=u*i*e,g=p*n+n,h=Math.pow(i,2)*Math.pow(u,2)*e,y=Math.exp(-p),v=gs(Math.pow(u,2),i);return(-o(u)+Io>0?-1:1)*((g-h)*y)/v},"derivative")):(o=a(u=>{const f=Math.exp(-u*e),p=(u-n)*e+1;return-Io+f*p},"envelope"),s=a(u=>{const f=Math.exp(-u*e),p=(n-u)*(e*e);return f*p},"derivative"));const l=5/e,c=uS(o,s,l);if(e=at(e),isNaN(c))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:i*2*Math.sqrt(r*u),duration:e}}}a(lS,"findSpring");const cS=12;function uS(e,t,n){let r=n;for(let o=1;o<cS;o++)r=r-e(r)/t(r);return r}a(uS,"approximateRoot");function gs(e,t){return e*Math.sqrt(1-t*t)}a(gs,"calcAngularFreq");const dS=["duration","bounce"],fS=["stiffness","damping","mass"];function Wa(e,t){return t.some(n=>e[n]!==void 0)}a(Wa,"isSpringType");function pS(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Wa(e,fS)&&Wa(e,dS)){const n=lS(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}a(pS,"getSpringOptions");function yp({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],s=e[e.length-1],i={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:f,velocity:p,isResolvedFromDuration:g}=pS({...r,velocity:-Ye(r.velocity||0)}),h=p||0,y=c/(2*Math.sqrt(l*u)),v=s-o,b=Ye(Math.sqrt(l/u)),C=Math.abs(v)<5;n||(n=C?.01:2),t||(t=C?.005:.5);let w;if(y<1){const x=gs(b,y);w=a(S=>{const P=Math.exp(-y*b*S);return s-P*((h+y*b*v)/x*Math.sin(x*S)+v*Math.cos(x*S))},"resolveSpring")}else if(y===1)w=a(x=>s-Math.exp(-b*x)*(v+(h+b*v)*x),"resolveSpring");else{const x=b*Math.sqrt(y*y-1);w=a(S=>{const P=Math.exp(-y*b*S),R=Math.min(x*S,300);return s-P*((h+y*b*v)*Math.sinh(R)+x*v*Math.cosh(R))/x},"resolveSpring")}return{calculatedDuration:g&&f||null,next:a(x=>{const S=w(x);if(g)i.done=x>=f;else{let P=h;x!==0&&(y<1?P=vp(w,x,S):P=0);const R=Math.abs(P)<=n,E=Math.abs(s-S)<=t;i.done=R&&E}return i.value=i.done?s:S,i},"next")}}a(yp,"spring");function Ua({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:l,max:c,restDelta:u=.5,restSpeed:f}){const p=e[0],g={done:!1,value:p},h=a(T=>l!==void 0&&T<l||c!==void 0&&T>c,"isOutOfBounds"),y=a(T=>l===void 0?c:c===void 0||Math.abs(l-T)<Math.abs(c-T)?l:c,"nearestBoundary");let v=n*t;const b=p+v,C=i===void 0?b:i(b);C!==b&&(v=C-p);const w=a(T=>-v*Math.exp(-T/r),"calcDelta"),x=a(T=>C+w(T),"calcLatest"),S=a(T=>{const O=w(T),I=x(T);g.done=Math.abs(O)<=u,g.value=g.done?C:I},"applyFriction");let P,R;const E=a(T=>
131{h(g.value)&&(P=T,R=yp({keyframes:[g.value,y(g.value)],velocity:vp(x,T,g.value),damping:o,stiffness:s,restDelta:u,restSpeed:f}))},"checkCatchBoundary");return E(0),{calculatedDuration:null,next:a(T=>{let O=!1;return!R&&P===void 0&&(O=!0,S(T),E(T)),P!==void 0&&T>=P?R.next(T-P):(!O&&S(T),g)},"next")}}a(Ua,"inertia");const bp=a((e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,"calcBezier"),hS=1e-7,mS=12;function gS(e,t,n,r,o){let s,i,l=0;do i=t+(n-t)/2,s=bp(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>hS&&++l<mS);return i}a(gS,"binarySubdivide");function dn(e,t,n,r){if(e===t&&n===r)return me;const o=a(s=>gS(s,0,1,e,n),"getTForX");return s=>s===0||s===1?s:bp(o(s),t,r)}a(dn,"cubicBezier");const vS=dn(.42,0,1,1),yS=dn(0,0,.58,1),xp=dn(.42,0,.58,1),bS=a(e=>Array.isArray(e)&&typeof e[0]!="number","isEasingArray"),wp=a(e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,"mirrorEasing"),Cp=a(e=>t=>1-e(1-t),"reverseEasing"),Ni=a(e=>1-Math.sin(Math.acos(e)),"circIn"),Sp=Cp(Ni),xS=wp(Ni),Pp=dn(.33,1.53,.69,.99),Di=Cp(Pp),wS=wp(Di),CS=a(e=>(e*=2)<1?.5*Di(e):.5*(2-Math.pow(2,-10*(e-1))),"anticipate"),SS={linear:me,easeIn:vS,easeInOut:xp,easeOut:yS,circIn:Ni,circInOut:xS,circOut:Sp,backIn:Di,backInOut:wS,backOut:Pp,anticipate:CS},za=a(e=>{if(Array.isArray(e)){jf(e.length===4);const[t,n,r,o]=e;return dn(t,n,r,o)}else if(typeof e=="string")return SS[e];return e},"easingDefinitionToFunction"),Mn=a((e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},"progress"),ie=a((e,t,n)=>e+(t-e)*n,"mixNumber$1");function Oo(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}a(Oo,"hueToRgb");function PS({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,i=0;if(!t)o=s=i=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;o=Oo(c,l,e+1/3),s=Oo(c,l,e),i=Oo(c,l,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}a(PS,"hslaToRgba");function Ar(e,t){return n=>n>0?t:e}a(Ar,"mixImmediate");const jo=a((e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},"mixLinearColor"),ES=[hs,Rt,Ut],TS=a(e=>ES.find(t=>t.test(e)),"getColorType");function Ka(e){const t=TS(e);if(!t)return!1;let n=t.parse(e);return t===Ut&&(n=PS(n)),n}a(Ka,"asRGBA");const Ga=a((e,t)=>{const n=Ka(e),r=Ka(t);if(!n||!r)return Ar(e,t);const o={...n};return s=>(o.red=jo(n.red,r.red,s),o.green=jo(n.green,r.green,s),o.blue=jo(n.blue,r.blue,s),o.alpha=ie(n.alpha,r.alpha,s),Rt.transform(o))},"mixColor"),vs=new Set(["none","hidden"]);function RS(e,t){return vs.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}a(RS,"mixVisibility");function AS(e,t){return n=>ie(e,t,n)}a(AS,"mixNumber");function Ii(e){return typeof e=="number"?AS:typeof e=="string"?yi(e)?Ar:pe.test(e)?Ga:DS:Array.isArray(e)?Ep:typeof e=="object"?pe.test(e)?Ga:MS:Ar}a(Ii,"getMixer");function Ep(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>Ii(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}a(Ep,"mixArray");function MS(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Ii(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}a(MS,"mixObject");function NS(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],l=e.indexes[i][o[i]],c=(n=e.values[l])!==null&&n!==void 0?n:0;r[s]=c,o[i]++}return r}a(NS,"matchOrder");const DS=a((e,t)=>{const n=ht.createTransformer(t),r=An(e),o=An(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?vs.has(e)&&!o.values.length||vs.has(t)&&!r.values.length?RS(e,t):Ge(Ep(NS(r,o),o.values),n):Ar(e,t)},"mixComplex");function Tp(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ie(e,t,n):Ii(e)(e,t)}a(Tp,"mix");function IS(e,t,n){const r=[],o=n||Tp,s=e.length-1;for(let i=0;i<s;i++){let l=o(e[i],e[i+1]);if(t){const c=Array.isArray(t)?t[i]||me:t;l=Ge(c,l)}r.push(l)}return r}a(IS,"createMixers");function OS(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(jf(s===t.length),s===1)return()=>t[0];if(s===2&&e[0]===e[1])return()=>t[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const i=IS(t,r,o),l=i.length,c=a(u=>{let f=0;if(l>1)for(;f<e.length-2&&!(u<e[f+1]);f++);const p=Mn(e[f],e[f+1],u);return i[f](p)},"interpolator");return n?u=>c(pt(e[0],e[s-1],u)):c}a(OS,"interpolate");function jS(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Mn(0,t,r);e.push(ie(n,1,o))}}
131a(jS,"fillOffset");function kS(e){const t=[0];return jS(t,e.length-1),t}a(kS,"defaultOffset");function _S(e,t){return e.map(n=>n*t)}a(_S,"convertOffsetToTimes");function LS(e,t){return e.map(()=>t||xp).splice(0,e.length-1)}a(LS,"defaultEasing");function Mr({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=bS(r)?r.map(za):za(r),s={done:!1,value:t[0]},i=_S(n&&n.length===t.length?n:kS(t),e),l=OS(i,t,{ease:Array.isArray(o)?o:LS(t,o)});return{calculatedDuration:e,next:a(c=>(s.value=l(c),s.done=c>=e,s),"next")}}a(Mr,"keyframes");const Ya=2e4;function FS(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Ya;)t+=n,r=e.next(t);return t>=Ya?1/0:t}a(FS,"calcGeneratorDuration");const VS=a(e=>{const t=a(({timestamp:n})=>e(n),"passTimestamp");return{start:a(()=>ee.update(t,!0),"start"),stop:a(()=>Qe(t),"stop"),now:a(()=>fe.isProcessing?fe.timestamp:lt.now(),"now")}},"frameloopDriver"),$S={decay:Ua,inertia:Ua,tween:Mr,keyframes:Mr,spring:yp},BS=a(e=>e/100,"percentToProgress");class lo extends mp{static{a(this,"MainThreadAnimation")}constructor({KeyframeResolver:t=Ri,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:r,motionValue:o,keyframes:s}=this.options,i=a((l,c)=>this.onKeyframesResolved(l,c),"onResolved");r&&o&&o.owner?this.resolver=o.owner.resolveKeyframes(s,i,r,o):this.resolver=new t(s,i,r,o),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=this.options,l=$S[n]||Mr;let c,u;l!==Mr&&typeof t[0]!="number"&&(c=Ge(BS,Tp(t[0],t[1])),t=[0,100]);const f=l({...this.options,keyframes:t});s==="mirror"&&(u=l({...this.options,keyframes:[...t].reverse(),velocity:-i})),f.calculatedDuration===null&&(f.calculatedDuration=FS(f));const{calculatedDuration:p}=f,g=p+o,h=g*(r+1)-o;return{generator:f,mirroredGenerator:u,mapPercentToKeyframes:c,calculatedDuration:p,resolvedDuration:g,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:T}=this.options;return{done:!0,value:T[T.length-1]}}const{finalKeyframe:o,generator:s,mirroredGenerator:i,mapPercentToKeyframes:l,keyframes:c,calculatedDuration:u,totalDuration:f,resolvedDuration:p}=r;if(this.startTime===null)return s.next(0);const{delay:g,repeat:h,repeatType:y,repeatDelay:v,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-f/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const C=this.currentTime-g*(this.speed>=0?1:-1),w=this.speed>=0?C<0:C>f;this.currentTime=Math.max(C,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=f);let x=this.currentTime,S=s;if(h){const T=Math.min(this.currentTime,f)/p;let O=Math.floor(T),I=T%1;!I&&T>=1&&(I=1),I===1&&O--,O=Math.min(O,h+1),O%2&&(y==="reverse"?(I=1-I,v&&(I-=v/p)):y==="mirror"&&(S=i)),x=pt(0,1,I)*p}const P=w?{done:!1,value:c[0]}:S.next(x);l&&(P.value=l(P.value));let{done:R}=P;!w&&u!==null&&(R=this.speed>=0?this.currentTime>=f:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&R);return E&&o!==void 0&&(P.value=ao(c,this.options,o)),b&&b(P.value),E&&this.finish(),P}get duration(){const{resolved:t}=this;return t?Ye(t.calculatedDuration):0}get time(){return Ye(this.currentTime)}set time(t){t=at(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ye(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=VS,onPlay:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=r),this.state==="finished"&&this.updateFinishedProm
131ise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}function qT(e){return new lo(e)}a(qT,"animateValue");const Rp=a(e=>Array.isArray(e)&&typeof e[0]=="number","isBezierDefinition");function Ap(e){return!!(!e||typeof e=="string"&&e in Oi||Rp(e)||Array.isArray(e)&&e.every(Ap))}a(Ap,"isWaapiSupportedEasing");const yn=a(([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,"cubicBezierAsString"),Oi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:yn([0,.65,.55,1]),circOut:yn([.55,0,1,.45]),backIn:yn([.31,.01,.66,-.59]),backOut:yn([.33,1.53,.69,.99])};function HS(e){return Mp(e)||Oi.easeOut}a(HS,"mapEasingToNativeEasingWithDefault");function Mp(e){if(e)return Rp(e)?yn(e):Array.isArray(e)?e.map(HS):Oi[e]}a(Mp,"mapEasingToNativeEasing");function WS(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:l,times:c}={}){const u={[t]:n};c&&(u.offset=c);const f=Mp(l);return Array.isArray(f)&&(u.easing=f),e.animate(u,{delay:r,duration:o,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"})}a(WS,"animateStyle");const US=hp(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),zS=new Set(["opacity","clipPath","filter","transform"]),Nr=10,KS=2e4;function GS(e){return e.type==="spring"||e.name==="backgroundColor"||!Ap(e.ease)}a(GS,"requiresPregeneratedKeyframes");function YS(e,t){const n=new lo({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let s=0;for(;!r.done&&s<KS;)r=n.sample(s),o.push(r.value),s+=Nr;return{times:void 0,keyframes:o,duration:s-Nr,ease:"linear"}}a(YS,"pregenerateKeyframes");class Xa extends mp{static{a(this,"AcceleratedAnimation")}constructor(t){super(t);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new pp(o,(s,i)=>this.onKeyframesResolved(s,i),n,r),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:o=300,times:s,ease:i,type:l,motionValue:c,name:u}=this.options;if(!(!((r=c.owner)===null||r===void 0)&&r.current))return!1;if(GS(this.options)){const{onComplete:p,onUpdate:g,motionValue:h,...y}=this.options,v=YS(t,y);t=v.keyframes,t.length===1&&(t[1]=t[0]),o=v.duration,s=v.times,i=v.ease,l="keyframes"}const f=WS(c.owner.current,u,t,{...this.options,duration:o,times:s,ease:i});return f.startTime=lt.now(),this.pendingTimeline?(f.timeline=this.pendingTimeline,this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:p}=this.options;c.set(ao(t,this.options,n)),p&&p(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:o,times:s,type:l,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Ye(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Ye(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=at(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return me;const{animation:r}=n;r.timeline=t,r.onfinish=null}return me}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;
131n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:s,ease:i,times:l}=t;if(!(n.playState==="idle"||n.playState==="finished")){if(this.time){const{motionValue:c,onUpdate:u,onComplete:f,...p}=this.options,g=new lo({...p,keyframes:r,duration:o,type:s,ease:i,times:l,isGenerator:!0}),h=at(this.time);c.setWithVelocity(g.sample(h-Nr).value,g.sample(h).value,Nr)}this.cancel()}}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:s,damping:i,type:l}=t;return US()&&r&&zS.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&s!=="mirror"&&i!==0&&l!=="inertia"}}function XS(e,t){let n;const r=a(()=>{const{currentTime:o}=t,i=(o===null?0:o.value)/100;n!==i&&e(i),n=i},"onFrame");return ee.update(r,!0),()=>Qe(r)}a(XS,"observeTimeline");const qS=hp(()=>window.ScrollTimeline!==void 0);class ZS{static{a(this,"GroupPlaybackControls")}constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>{if(qS()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),XS(o=>{r.time=r.duration*o},t)});return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const ji=a((e,t,n,r={},o,s)=>i=>{const l=Ti(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-at(c);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:a(g=>{t.set(g),l.onUpdate&&l.onUpdate(g)},"onUpdate"),onComplete:a(()=>{i(),l.onComplete&&l.onComplete()},"onComplete"),name:e,motionValue:t,element:s?void 0:o};MC(l)||(f={...f,...AC(e,f)}),f.duration&&(f.duration=at(f.duration)),f.repeatDelay&&(f.repeatDelay=at(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let p=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(p=!0)),p&&!s&&t.get()!==void 0){const g=ao(f.keyframes,l);if(g!==void 0)return ee.update(()=>{f.onUpdate(g),f.onComplete()}),new ZS([])}return!s&&Xa.supports(f)?new Xa(f):new lo(f)},"animateMotionValue");function Dr(e){return!!(he(e)&&e.add)}a(Dr,"isWillChangeMotionValue");function ki(e,t){e.indexOf(t)===-1&&e.push(t)}a(ki,"addUniqueItem");function _i(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}a(_i,"removeItem");class Li{static{a(this,"SubscriptionManager")}constructor(){this.subscriptions=[]}add(t){return ki(this.subscriptions,t),()=>_i(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const i=this.subscriptions[s];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const qa=30,QS=a(e=>!isNaN(parseFloat(e)),"isFloat"),Za={current:void 0};class JS{static{a(this,"MotionValue")}constructor(t,n={}){this.version="11.2.12",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const s=lt.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=lt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=QS(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Li);const r=this.events[t].add(n);return t==="change"?()=>{r(),ee.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Za.current&&Za.current.push(this),this.current}getPrevious(){return this.prev}
131getVelocity(){const t=lt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>qa)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,qa);return gp(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(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.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Nn(e,t){return new JS(e,t)}a(Nn,"motionValue");function eP(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Nn(n))}a(eP,"setMotionValue");function tP(e,t){const n=io(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const l=sC(s[i]);eP(e,i,l)}}a(tP,"setTarget");function Np(e){return e.getProps()[Mf]}a(Np,"getOptimisedAppearId");function nP({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}a(nP,"shouldBlockAnimation");function Dp(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var s;let{transition:i=e.getDefaultTransition(),transitionEnd:l,...c}=t;const u=e.getValue("willChange");r&&(i=r);const f=[],p=o&&e.animationState&&e.animationState.getState()[o];for(const g in c){const h=e.getValue(g,(s=e.latestValues[g])!==null&&s!==void 0?s:null),y=c[g];if(y===void 0||p&&nP(p,g))continue;const v={delay:n,elapsed:0,...Ti(i||{},g)};let b=!1;if(window.HandoffAppearAnimations){const w=Np(e);if(w){const x=window.HandoffAppearAnimations(w,g,h,ee);x!==null&&(v.elapsed=x,b=!0)}}h.start(ji(g,h,y,e.shouldReduceMotion&&kt.has(g)?{type:!1}:v,e,b));const C=h.animation;C&&(Dr(u)&&(u.add(g),C.then(()=>u.remove(g))),f.push(C))}return l&&Promise.all(f).then(()=>{ee.update(()=>{l&&tP(e,l)})}),f}a(Dp,"animateTarget");function ys(e,t,n={}){var r;const o=io(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Promise.all(Dp(e,o,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:f=0,staggerChildren:p,staggerDirection:g}=s;return rP(e,t,f+u,p,g,n)}:()=>Promise.resolve(),{when:c}=s;if(c){const[u,f]=c==="beforeChildren"?[i,l]:[l,i];return u().then(()=>f())}else return Promise.all([i(),l(n.delay)])}a(ys,"animateVariant");function rP(e,t,n=0,r=0,o=1,s){const i=[],l=(e.variantChildren.size-1)*r,c=o===1?(u=0)=>u*r:(u=0)=>l-u*r;return Array.from(e.variantChildren).sort(oP).forEach((u,f)=>{u.notify("AnimationStart",t),i.push(ys(u,t,{...s,delay:n+c(f)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(i)}a(rP,"animateChildren");function oP(e,t){return e.sortNodePosition(t)}a(oP,"sortByTreeOrder");function sP(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>ys(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=ys(e,t,n);else{const o=typeof t=="function"?io(e,t,n.custom):t;r=Promise.all(Dp(e,o,n))}return r.then(()=>{ee.postRender(()=>{e.notify("AnimationComplete",t)})})}a(sP,"animateVisualElement");const iP=[...hi].reverse(),aP=hi.length;function lP(e){return t=>Promise.all(t.map(({animation:n,options:r})=>sP(e,n,r)))}a(lP,"animateList");function cP(e){let t=lP(e),n=Qa(),r=!0;const o=a(c=>(u,f)=>{var p;const g=io(e,f,c==="exit"?(p=e.presenceContext)===null||p===void 0?void 0:p.custom:void 0);if(g){const{transition:h,transitionEnd:y,...v}=g;u={...u,...v,...y}}return u},"buildResolvedTypeValues");function s(c){t=c(e)}a(s,"setAnimateFunction");function i(c){const u=e.getProps(),f=e.getVariantContext(!0)||{},p=[],g=new Set;let h={},y=1/0;for(let b=0;b<aP;b++){const C=iP[b],w=n[C],x=u[C]!==void 0?u[C]:f[C],S=Rn(x),P=C===c?w.isActive:null;P===!1&&(y=b);let R=x===f[C]&&x!==u[C]&&S;if(R&&r&&e.manuallyAnimateOnMount&&(R=!1),w.protectedKeys={...h},!w.isActive&&P===null||!x&&!w.prevProp||ro(x)||typeof x=="boolean")continue;let T=uP(w.prevProp,x)||C===c&&w.isActive&&!R&&S||b>y&&S,O=!1;const I=Array.isArray(x)?x:[x];let L=I.reduce(o(C),{});P===!1&&(L={});const{prevResolvedValues:V={}}=w,W={...V,...L},H=a(F=>{T=!0,g.has(F)&&(O=!0,g.delete(F)),w.needsAnimating[F]=!0;const j=e.getValue(F);j&&(j.liveStyle=!1)},"markToAnimate");for(const F in W){const j=L[F],k=V[F];if(h.hasOwnProperty(F))continue;let $=!1;us(j)&&us(k)?$=!Jf(j,k):$=j!==k,$?j!=null?H(F):g.add(F):j!==void 0&&g.has(F)?H(F):w.protectedKeys[F]=!0}w.prevProp=x,w.prevResolvedValues=L,w.isActive&&(h={...h,...L}),r&&e.blockInitialAnimation&&(T=!1),T&&(!R||O)&&p.push(...I.map(F=>({animation:F,options:{type:C}})))}if(g.size){const b={};g.forEach(C=>{const w=e.getBaseTarget(C),x=e.getValue(C);x&&(x.liveStyle=!0),b[C]=w??null}),p.push({animation:b})}let v=!!p.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(p):Promise.resolve()}a(i,"animateChanges");function l(c,u){var f;if(n[c].isActive===u)return Promise.resolve();(f=e.variantChildren)===null||f===void 0||f.forEach(g=>{var h;
131return(h=g.animationState)===null||h===void 0?void 0:h.setActive(c,u)}),n[c].isActive=u;const p=i(c);for(const g in n)n[g].protectedKeys={};return p}return a(l,"setActive"),{animateChanges:i,setActive:l,setAnimateFunction:s,getState:a(()=>n,"getState"),reset:a(()=>{n=Qa(),r=!0},"reset")}}a(cP,"createAnimationState");function uP(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Jf(t,e):!1}a(uP,"checkVariantsDidChange");function St(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}a(St,"createTypeState");function Qa(){return{animate:St(!0),whileInView:St(),whileHover:St(),whileTap:St(),whileDrag:St(),whileFocus:St(),exit:St()}}a(Qa,"createState");class dP extends bt{static{a(this,"AnimationFeature")}constructor(t){super(t),t.animationState||(t.animationState=cP(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ro(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let fP=0;class pP extends bt{static{a(this,"ExitAnimationFeature")}constructor(){super(...arguments),this.id=fP++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const hP={animation:{Feature:dP},exit:{Feature:pP}},Ja=a((e,t)=>Math.abs(e-t),"distance");function mP(e,t){const n=Ja(e.x,t.x),r=Ja(e.y,t.y);return Math.sqrt(n**2+r**2)}a(mP,"distance2D");
131class Ip{static{a(this,"PanSession")}constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=_o(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,h=mP(p.offset,{x:0,y:0})>=3;if(!g&&!h)return;const{point:y}=p,{timestamp:v}=fe;this.history.push({...y,timestamp:v});const{onStart:b,onMove:C}=this.handlers;g||(b&&b(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),C&&C(this.lastMoveEvent,p)},this.handlePointerMove=(p,g)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=ko(g,this.transformPagePoint),ee.update(this.updatePoint,!0)},this.handlePointerUp=(p,g)=>{this.end();const{onEnd:h,onSessionEnd:y,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=_o(p.type==="pointercancel"?this.lastMoveEventInfo:ko(g,this.transformPagePoint),this.history);this.startEvent&&h&&h(p,b),y&&y(p,b)},!Yf(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const i=so(t),l=ko(i,this.transformPagePoint),{point:c}=l,{timestamp:u}=fe;this.history=[{...c,timestamp:u}];const{onSessionStart:f}=n;f&&f(t,_o(l,this.history)),this.removeListeners=Ge(Ke(this.contextWindow,"pointermove",this.handlePointerMove),Ke(this.contextWindow,"pointerup",this.handlePointerUp),Ke(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Qe(this.updatePoint)}}function ko(e,t){return t?{point:t(e.point)}:e}a(ko,"transformPoint");function el(e,t){return{x:e.x-t.x,y:e.y-t.y}}a(el,"subtractPoint");function _o({point:e},t){return{point:e,delta:el(e,Op(t)),offset:el(e,gP(t)),velocity:vP(t,.1)}}a(_o,"getPanInfo");function gP(e){return e[0]}a(gP,"startDevicePoint");function Op(e){return e[e.length-1]}a(Op,"lastDevicePoint");function vP(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Op(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>at(t)));)n--;if(!r)return{x:0,y:0};const s=Ye(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}a(vP,"getVelocity");function Ce(e){return e.max-e.min}a(Ce,"calcLength");function bs(e,t=0,n=.01){return Math.abs(e-t)<=n}a(bs,"isNear");function tl(e,t,n,r=.5){e.origin=r,e.originPoint=ie(t.min,t.max,e.origin),e.scale=Ce(n)/Ce(t),(bs(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=ie(n.min,n.max,e.origin)-e.originPoint,(bs(e.translate)||isNaN(e.translate))&&(e.translate=0)}a(tl,"calcAxisDelta");function wn(e,t,n,r){tl(e.x,t.x,n.x,r?r.originX:void 0),tl(e.y,t.y,n.y,r?r.originY:void 0)}a(wn,"calcBoxDelta");function nl(e,t,n){e.min=n.min+t.min,e.max=e.min+Ce(t)}a(nl,"calcRelativeAxis");function yP(e,t,n){nl(e.x,t.x,n.x),nl(e.y,t.y,n.y)}a(yP,"calcRelativeBox");function rl(e,t,n){e.min=t.min-n.min,e.max=e.min+Ce(t)}a(rl,"calcRelativeAxisPosition");function Cn(e,t,n){rl(e.x,t.x,n.x),rl(e.y,t.y,n.y)}a(Cn,"calcRelativePosition");function bP(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ie(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ie(n,e,r.max):Math.min(e,n)),e}a(bP,"applyConstraints");function ol(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}a(ol,"calcRelativeAxisConstraints");function xP(e,{top:t,left:n,bottom:r,right:o}){return{x:ol(e.x,n,o),y:ol(e.y,t,r)}}a(xP,"calcRelativeConstraints");function sl(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}a(sl,"calcViewportAxisConstraints");function wP(e,t){return{x:sl(e.x,t.x),y:sl(e.y,t.y)}}a(wP,"calcViewportConstraints");function CP(e,t){let n=.5;const r=Ce(e),o=Ce(t);return o>r?n=Mn(t.min,t.max-r,e.min):r>o&&(n=Mn(e.min,e.max-o,t.min)),pt(0,1,n)}a(CP,"calcOrigin");function SP(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}a(SP,"rebaseAxisConstraints");const xs=.35;function PP(e=xs){return e===!1?e=0:e===!0&&(e=xs),{x:il(e,"left","right"),y:il(e,"top","bottom")}}a(PP,"resolveDragElastic");function il(e,t,n){return{min:al(e,t),max:al(e,n)}}a(il,"resolveAxisElastic");function al(e,t){return typeof e=="number"?e:e[t]||0}a(al,"resolvePointElastic");const ll=a(()=>({translate:0,scale:1,origin:0,originPoint:0}),"createAxisDelta"),zt=a(()=>({x:ll(),y:ll()}),"createDelta"),cl=a(()=>({min:0,max:0}),"createAxis"),ce=a(()=>({x:cl(),y:cl()}),"createBox");function Ee(e){return[e("x"),e("y")]}a(Ee,"eachAxis");function jp({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}a(jp,"convertBoundingBoxToBox");function EP({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}a(EP,"convertBoxToBoundingBox");function TP(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}a(TP,"transformBoxPoints");function Lo(e){return e===void 0||e===1}a(Lo,"isIdentityScale");function ws({scale:e,scaleX:t,scaleY:n}){return!Lo(e)||!Lo(t)||!Lo(n)}a(ws,"hasScale");function Pt(e){return ws(e)||kp(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}a(Pt,"hasTransform");function kp(e){return ul(e.x)||ul(e.y)}a(kp,"has2DTranslate");function ul(e){return e&&e!=="0%"}a(ul,"is2DTranslate");function Ir(e,t,n){const r=e-n,o=t*r;return n+o}a(Ir,"scalePoint");function dl(e,t,n,r,o){return o!==void 0&&(e=Ir(e,o,r)),Ir(e,n,r)+t}a(dl,"applyPointDelta");function Cs(e,t=0,n=1,r,o){e.min=dl(e.min,t,n,r,o),e.max=dl(e.max,t,n,r,o)}a(Cs,"applyAxisDelta");function _p(e,{x:t,y:n}){Cs(e.x,t.translate,t.scale,t.originPoint),Cs(e.y,n.translate,n.scale,n.originPoint)}a(_p,"applyBoxDelta");function RP(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let l=0;l<o;l++){s=n[l],i=s.projectionDelta;const c=s.instance;c&&c.style&&c.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Kt(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,_p(e,i)),r&&Pt(s.latestValues)&&Kt(e,s.latestValues))}t.x=fl(t.x),t.y=fl(t.y)}a(RP,"applyTreeDeltas");function fl(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}a(fl,"snapToDefault");function st(e,t){e.min=e.min+t,e.max=e.max+t}a(st,"translateAxis");function pl(e,t,[n,r,o]){const s=t[o]!==void 0?t[o]:.5,i=ie(e.min,e.max,s);Cs(e,t[n],t[r],i,t.scale)}a(pl,"transformAxis");const AP=["x","scaleX","originX"],MP=["y","scaleY","originY"];function Kt(e,t){pl(e.x,t,AP),pl(e.y,t,MP)}a(Kt,"transformBox");function Lp(e,t){return jp(TP(e.getBoundingClientRect(),t))}a(Lp,"measureViewportBox");function NP(e,t,n){const r=Lp(e,n),{scroll:o}=t;
131return o&&(st(r.x,o.offset.x),st(r.y,o.offset.y)),r}a(NP,"measurePageBox");const Fp=a(({current:e})=>e?e.ownerDocument.defaultView:null,"getContextWindow"),DP=new WeakMap;class IP{static{a(this,"VisualElementDragControls")}constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ce(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=a(f=>{const{dragSnapToOrigin:p}=this.getProps();p?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(so(f,"page").point)},"onSessionStart"),s=a((f,p)=>{const{drag:g,dragPropagation:h,onDragStart:y}=this.getProps();if(g&&!h&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=qf(g),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ee(b=>{let C=this.getAxisMotionValue(b).get()||0;if(Ve.test(C)){const{projection:w}=this.visualElement;if(w&&w.layout){const x=w.layout.layoutBox[b];x&&(C=Ce(x)*(parseFloat(C)/100))}}this.originPoint[b]=C}),y&&ee.postRender(()=>y(f,p));const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},"onStart"),i=a((f,p)=>{const{dragPropagation:g,dragDirectionLock:h,onDirectionLock:y,onDrag:v}=this.getProps();if(!g&&!this.openGlobalLock)return;const{offset:b}=p;if(h&&this.currentDirection===null){this.currentDirection=OP(b),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",p.point,b),this.updateAxis("y",p.point,b),this.visualElement.render(),v&&v(f,p)},"onMove"),l=a((f,p)=>this.stop(f,p),"onSessionEnd"),c=a(()=>Ee(f=>{var p;return this.getAnimationState(f)==="paused"&&((p=this.getAxisMotionValue(f).animation)===null||p===void 0?void 0:p.play())}),"resumeAnimation"),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Ip(t,{onSessionStart:o,onStart:s,onMove:i,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Fp(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:s}=this.getProps();s&&ee.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!cr(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=bP(i,this.constraints[t],this.elastic[t])),s.set(i)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&Wt(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=xP(o.layoutBox,n):this.constraints=!1,this.elastic=PP(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Ee(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=SP(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Wt(t))return!1;const r=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=NP(r,o.root,this.visualElement.getTransformPagePoint());let i=wP(o.layout.layoutBox,s);if(n){const l=n(EP(i));this.hasMutatedConstraints=!!l,l&&(i=jp(l))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=Ee(f=>{if(!cr(f,n,this.currentDirection))return;
131let p=c&&c[f]||{};i&&(p={min:0,max:0});const g=o?200:1e6,h=o?40:1e7,y={type:"inertia",velocity:r?t[f]:0,bounceStiffness:g,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...p};return this.startAxisValueAnimation(f,y)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(ji(t,r,0,n,this.visualElement))}stopAnimation(){Ee(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ee(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ee(n=>{const{drag:r}=this.getProps();if(!cr(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:l}=o.layout.layoutBox[n];s.set(t[n]-ie(i,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Wt(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Ee(i=>{const l=this.getAxisMotionValue(i);if(l&&this.constraints!==!1){const c=l.get();o[i]=CP({min:c,max:c},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ee(i=>{if(!cr(i,t,null))return;const l=this.getAxisMotionValue(i),{min:c,max:u}=this.constraints[i];l.set(ie(c,u,o[i]))})}addListeners(){if(!this.visualElement.current)return;DP.set(this.visualElement,this);const t=this.visualElement.current,n=Ke(t,"pointerdown",c=>{const{drag:u,dragListener:f=!0}=this.getProps();u&&f&&this.start(c)}),r=a(()=>{const{dragConstraints:c}=this.getProps();Wt(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},"measureDragConstraints"),{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),ee.read(r);const i=Ue(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Ee(f=>{const p=this.getAxisMotionValue(f);p&&(this.originPoint[f]+=c[f].translate,p.set(p.get()+c[f].translate))}),this.visualElement.render())}));return()=>{i(),n(),s(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:i=xs,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:l}}}function cr(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}a(cr,"shouldDrag");function OP(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}a(OP,"getCurrentDirection");class jP extends bt{static{a(this,"DragGesture")}constructor(t){super(t),this.removeGroupControls=me,this.removeListeners=me,this.controls=new IP(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||me}unmount(){this.removeGroupControls(),this.removeListeners()}}const hl=a(e=>(t,n)=>{e&&ee.postRender(()=>e(t,n))},"asyncHandler");class kP extends bt{static{a(this,"PanGesture")}constructor(){super(...arguments),this.removePointerDownListener=me}onPointerDown(t){this.session=new Ip(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Fp(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:hl(t),onStart:hl(n),onMove:r,onEnd:a((s,i)=>{delete this.session,o&&ee.postRender(()=>o(s,i))},"onEnd")}}mount(){this.removePointerDownListener=Ke(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function _P(){const e=d.useContext(zn);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=d.useId();return d.useEffect(()=>r(o),[]),!t&&n?[!1,a(()=>n&&n(o),"safeToRemove")]:[!0]}a(_P,"usePresence");function ZT(){return LP(d.useContext(zn))}a(ZT,"useIsPresent");function LP(e){return e===null?!0:e.isPresent}a(LP,"isPresent");const mr={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ml(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}a(ml,"pixelsToPercent");const mn={correct:a((e,t)=>{if(!t.target)return e;if(typeof e=="string")if(B.test(e))e=parseFloat(e);else return e;const n=ml(e,t.target.x),r=ml(e,t.target.y);return`${n}% ${r}%`},"correct")},FP={correct:a((e,{treeScale:t,projectionDelta:n})=>{const r=e,o=ht.parse(e);if(o.length>5)return r;const s=ht.createTransformer(e),i=typeof o[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;o[0+i]/=l,o[1+i]/=c;const u=ie(l,c,.5);return typeof o[2+i]=="number"&&(o[2+i]/=u),typeof o[3+i]=="number"&&(o[3+i]/=u),s(o)},"correct")};class VP extends d.Component{static{a(this,"MeasureLayoutWithContext")}componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;k0($P),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:a(()=>this.safeToRemove(),"onExitComplete")}
131)),mr.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,i=r.projection;return i&&(i.isPresent=s,o||t.layoutDependency!==n||n===void 0?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||ee.postRender(()=>{const l=i.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),pi.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Vp(e){const[t,n]=_P(),r=d.useContext(gi);return m.jsx(VP,{...e,layoutGroup:r,switchLayoutGroup:d.useContext(Df),isPresent:t,safeToRemove:n})}a(Vp,"MeasureLayout");const $P={borderRadius:{...mn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:mn,borderTopRightRadius:mn,borderBottomLeftRadius:mn,borderBottomRightRadius:mn,boxShadow:FP},$p=["TopLeft","TopRight","BottomLeft","BottomRight"],BP=$p.length,gl=a(e=>typeof e=="string"?parseFloat(e):e,"asNumber"),vl=a(e=>typeof e=="number"||B.test(e),"isPx");function HP(e,t,n,r,o,s){o?(e.opacity=ie(0,n.opacity!==void 0?n.opacity:1,WP(r)),e.o
131pacityExit=ie(t.opacity!==void 0?t.opacity:1,0,UP(r))):s&&(e.opacity=ie(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<BP;i++){const l=`border${$p[i]}Radius`;let c=yl(t,l),u=yl(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||vl(c)===vl(u)?(e[l]=Math.max(ie(gl(c),gl(u),r),0),(Ve.test(u)||Ve.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=ie(t.rotate||0,n.rotate||0,r))}a(HP,"mixValues");function yl(e,t){return e[t]!==void 0?e[t]:e.borderRadius}a(yl,"getRadius");const WP=Bp(0,.5,Sp),UP=Bp(.5,.95,me);function Bp(e,t,n){return r=>r<e?0:r>t?1:n(Mn(e,t,r))}a(Bp,"compress");function bl(e,t){e.min=t.min,e.max=t.max}a(bl,"copyAxisInto");function Pe(e,t){bl(e.x,t.x),bl(e.y,t.y)}a(Pe,"copyBoxInto");function xl(e,t,n,r,o){return e-=t,e=Ir(e,1/n,r),o!==void 0&&(e=Ir(e,1/o,r)),e}a(xl,"removePointDelta");function zP(e,t=0,n=1,r=.5,o,s=e,i=e){if(Ve.test(t)&&(t=parseFloat(t),t=ie(i.min,i.max,t/100)-i.min),typeof t!="number")return;let l=ie(s.min,s.max,r);e===s&&(l-=t),e.min=xl(e.min,t,n,l,o),e.max=xl(e.max,t,n,l,o)}a(zP,"removeAxisDelta");function wl(e,t,[n,r,o],s,i){zP(e,t[n],t[r],t[o],t.scale,s,i)}a(wl,"removeAxisTransforms");const KP=["x","scaleX","originX"],GP=["y","scaleY","originY"];function Cl(e,t,n,r){wl(e.x,t,KP,n?n.x:void 0,r?r.x:void 0),wl(e.y,t,GP,n?n.y:void 0,r?r.y:void 0)}a(Cl,"removeBoxTransforms");function Sl(e){return e.translate===0&&e.scale===1}a(Sl,"isAxisDeltaZero");function Hp(e){return Sl(e.x)&&Sl(e.y)}a(Hp,"isDeltaZero");function YP(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}a(YP,"boxEquals");function Wp(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}a(Wp,"boxEqualsRounded");function Pl(e){return Ce(e.x)/Ce(e.y)}a(Pl,"aspectRatio");class XP{static{a(this,"NodeStack")}constructor(){this.members=[]}add(t){ki(this.members,t),t.scheduleRender()}remove(t){if(_i(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function El(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,i=n?.z||0;if((o||s||i)&&(r=`translate3d(${o}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:f,rotateX:p,rotateY:g,skewX:h,skewY:y}=n;u&&(r=`perspective(${u}px) ${r}`),f&&(r+=`rotate(${f}deg) `),p&&(r+=`rotateX(${p}deg) `),g&&(r+=`rotateY(${g}deg) `),h&&(r+=`skewX(${h}deg) `),y&&(r+=`skewY(${y}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(r+=`scale(${l}, ${c})`),r||"none"}a(El,"buildProjectionTransform");const qP=a((e,t)=>e.depth-t.depth,"compareByDepth");class ZP{static{a(this,"FlatTree")}constructor(){this.children=[],this.isDirty=!1}add(t){ki(this.children,t),this.isDirty=!0}remove(t){_i(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(qP),this.isDirty=!1,this.children.forEach(t)}}function QP(e,t){const n=lt.now(),r=a(({timestamp:o})=>{const s=o-n;s>=t&&(Qe(r),e(s-t))},"checkElapsed");return ee.read(r,!0),()=>Qe(r)}a(QP,"delay");function JP(e){window.MotionDebug&&window.MotionDebug.record(e)}a(JP,"record");function eE(e){return e instanceof SVGElement&&e.tagName!=="svg"}a(eE,"isSVGElement");function tE(e,t,n){const r=he(e)?e:Nn(e);return r.start(ji("",r,t,n)),r.animation}a(tE,"animateSingleValue");const Fo=["","X","Y","Z"],nE={visibility:"hidden"},Tl=1e3;let rE=0;const Et={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Vo(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}a(Vo,"resetDistortingTransform");function Up(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:t}=e.options;return t?Np(t)?!0:e.parent&&!e.parent.hasCheckedOptimisedAppear?Up(e.parent):!1:!1}a(Up,"isOptimisedAppearTree");function zp({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{static{a(this,"ProjectionNode")}constructor(i={},l=t?.()){this.id=rE++,this.animationId=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,Et.totalNodes=Et.resolvedTargetDeltas=Et.recalculatedProjection=0,this.nodes.forEac
vendor: 10,043 bytes, line 131
131h(iE),this.nodes.forEach(dE),this.nodes.forEach(fE),this.nodes.forEach(aE),JP(Et)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new ZP)}addEventListener(i,l){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Li),this.eventHandlers.get(i).add(l)}notifyListeners(i,...l){const c=this.eventHandlers.get(i);c&&c.notify(...l)}hasListeners(i){return this.eventHandlers.has(i)}mount(i,l=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=eE(i),this.instance=i;const{layoutId:c,layout:u,visualElement:f}=this.options;if(f&&!f.current&&f.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),l&&(u||c)&&(this.isLayoutDirty=!0),e){let p;const g=a(()=>this.root.updateBlockedByResize=!1,"resizeUnblockUpdate");e(i,()=>{this.root.updateBlockedByResize=!0,p&&p(),p=QP(g,250),mr.hasAnimatedSinceResize&&(mr.hasAnimatedSinceResize=!1,this.nodes.forEach(Al))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&f&&(c||u)&&this.addEventListener("didUpdate",({delta:p,hasLayoutChanged:g,hasRelativeTargetChanged:h,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||f.getDefaultTransition()||vE,{onLayoutAnimationStart:b,onLayoutAnimationComplete:C}=f.getProps(),w=!this.targetLayout||!Wp(this.targetLayout,y)||h,x=!g&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||x||g&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(p,x);const S={...Ti(v,"layout"),onPlay:b,onComplete:C};(f.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else g||Al(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Qe(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(pE),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&Up(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f<this.path.length;f++){const p=this.path[f];p.shouldResetTransform=!0,p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Rl);return}this.isUpdating||this.nodes.forEach(cE),this.isUpdating=!1,this.nodes.forEach(uE),this.nodes.forEach(oE),this.nodes.forEach(sE),this.clearAllSnapshots();const l=lt.now();fe.delta=pt(0,1e3/60,l-fe.timestamp),fe.timestamp=l,fe.isProcessing=!0,Ao.update.process(fe),Ao.preRender.process(fe),Ao.render.process(fe),fe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,pi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(lE),this.sharedNodes.forEach(hE)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ee.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ee.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=ce(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let l=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(l=!1),l&&(this.scroll={animationId:this.root.animationId,phase:i,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!Hp(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,f=u!==this.prevTransformTemplateValue;i&&(l||Pt(this.latestValues)||f)&&(o(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return i&&(c=this.removeTransform(c)),yE(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:i}=this.options;if(!i)return ce();const l=i.measureViewportBox(),{scroll:c}=this.root;return c&&(st(l.x,c.offset.x),st(l.y,c.offset.y)),l}removeElementScroll(i){const l=ce();Pe(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:f,options:p}=u;if(u!==this.root&&f&&p.layoutScroll){if(f.isRoot){Pe(l,i);const{scroll:g}=this.root;g&&(st(l.x,-g.offset.x),st(l.y,-g.offset.y))}st(l.x,f.offset.x),st(l.y,f.offset.y)}}return l}applyTransform(i,l=!1){const c=ce();Pe(c,i);for(let u=0;u<this.path.length;u++){const f=this.path[u];!l&&f.options.layoutScroll&&f.scroll&&f!==f.root&&Kt(c,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),Pt(f.latestValues)&&Kt(c,f.latestValues)}return Pt(this.latestValues)&&Kt(c,this.latestValues),c}removeTransform(i){const l=ce();Pe(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!Pt(u.latestValues))continue;ws(u.latestValues)&&u.updateSnapshot();const f=ce(),p=u.measurePageBox();Pe(f,p),Cl(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,f)}return Pt(this.latestValues)&&Cl(l,this.latestValues),l}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.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!==fe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var l;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(i||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:p,layoutId:g}=this.options;if(!(!this.layout||!(p||g))){if(this.resolvedRelativeTargetAt=fe.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ce(),this.relativeTargetOrigin=ce(),Cn(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),Pe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=ce(),this.targetWithTransforms=ce()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),yP(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Pe(this.target,this.layout.layoutBox),_p(this.target,this.targetDelta)):Pe(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ce(),this.relativeTargetOrigin=ce(),Cn(this.relativeTargetOrigin,this.target,h.target),Pe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Et.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||ws(this.parent.latestValues)||kp(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var i;const l=this.getLead(),c=!!this.resumingFrom||this!==l;let u=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&
131(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===fe.timestamp&&(u=!1),u)return;const{layout:f,layoutId:p}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||p))return;Pe(this.layoutCorrected,this.layout.layoutBox);const g=this.treeScale.x,h=this.treeScale.y;RP(this.layoutCorrected,this.treeScale,this.path,c),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=ce());const{target:y}=l;if(!y){this.projectionTransform&&(this.projectionDelta=zt(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=zt(),this.projectionDeltaWithTransform=zt());const v=this.projectionTransform;wn(this.projectionDelta,this.layoutCorrected,y,this.latestValues),this.projectionTransform=El(this.projectionDelta,this.treeScale),(this.projectionTransform!==v||this.treeScale.x!==g||this.treeScale.y!==h)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",y)),Et.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),i){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(i,l=!1){const c=this.snapshot,u=c?c.latestValues:{},f={...this.latestValues},p=zt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const g=ce(),h=c?c.source:void 0,y=this.layout?this.layout.source:void 0,v=h!==y,b=this.getStack(),C=!b||b.members.length<=1,w=!!(v&&!C&&this.options.crossfade===!0&&!this.path.some(gE));this.animationProgress=0;let x;this.mixTargetDelta=S=>{const P=S/1e3;Ml(p.x,i.x,P),Ml(p.y,i.y,P),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Cn(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),mE(this.relativeTarget,this.relativeTargetOrigin,g,P),x&&YP(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=ce()),Pe(x,this.relativeTarget)),v&&(this.animationValues=f,HP(f,u,this.latestValues,P,w,C)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Qe(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ee.update(()=>{mr.hasAnimatedSinceResize=!0,this.currentAnimation=tE(0,Tl,{...i,onUpdate:a(l=>{this.mixTargetDelta(l),i.onUpdate&&i.onUpdate(l)},"onUpdate"),onComplete:a(()=>{i.onComplete&&i.onComplete(),this.completeAnimation()},"onComplete")}
vendor: 6,471 bytes, line 131
131),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 i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Tl),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:f}=i;if(!(!l||!c||!u)){if(this!==i&&this.layout&&u&&Kp(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||ce();const p=Ce(this.layout.layoutBox.x);c.x.min=i.target.x.min,c.x.max=c.x.min+p;const g=Ce(this.layout.layoutBox.y);c.y.min=i.target.y.min,c.y.max=c.y.min+g}Pe(l,c),Kt(l,f),wn(this.projectionDeltaWithTransform,this.layoutCorrected,l,f)}}registerSharedNode(i,l){this.sharedNodes.has(i)||this.sharedNodes.set(i,new XP),this.sharedNodes.get(i).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:l}=this.options;return l?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:l}=this.options;return l?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),i&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let l=!1;const{latestValues:c}=i;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&Vo("z",i,u,this.animationValues);for(let f=0;f<Fo.length;f++)Vo(`rotate${Fo[f]}`,i,u,this.animationValues),Vo(`skew${Fo[f]}`,i,u,this.animationValues);i.render();for(const f in u)i.setStaticValue(f,u[f]),this.animationValues&&(this.animationValues[f]=u[f]);i.scheduleRender()}getProjectionStyles(i){var l,c;if(!this.instance||this.isSVG)return;if(!this.isVisible)return nE;const u={visibility:""},f=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=pr(i?.pointerEvents)||"",u.transform=f?f(this.latestValues,""):"none",u;const p=this.getLead();if(!this.projectionDelta||!this.layout||!p.target){const v={};return this.options.layoutId&&(v.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,v.pointerEvents=pr(i?.pointerEvents)||""),this.hasProjected&&!Pt(this.latestValues)&&(v.transform=f?f({},""):"none",this.hasProjected=!1),v}const g=p.animationValues||p.latestValues;this.applyTransformsToTarget(),u.transform=El(this.projectionDeltaWithTransform,this.treeScale,g),f&&(u.transform=f(g,u.transform));const{x:h,y}=this.projectionDelta;u.transformOrigin=`${h.origin*100}% ${y.origin*100}% 0`,p.animationValues?u.opacity=p===this?(c=(l=g.opacity)!==null&&l!==void 0?l:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:g.opacityExit:u.opacity=p===this?g.opacity!==void 0?g.opacity:"":g.opacityExit!==void 0?g.opacityExit:0;for(const v in Tr){if(g[v]===void 0)continue;const{correct:b,applyTo:C}=Tr[v],w=u.transform==="none"?g[v]:b(g[v],p);if(C){const x=C.length;for(let S=0;S<x;S++)u[C[S]]=w}else u[v]=w}return this.options.layoutId&&(u.pointerEvents=p===this?pr(i?.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var l;return(l=i.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(Rl),this.root.sharedNodes.clear()}}}a(zp,"createProjectionNode");function oE(e){e.updateLayout()}a(oE,"updateLayout");function sE(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,i=n.source!==e.layout.source;s==="size"?Ee(p=>{const g=i?n.measuredBox[p]:n.layoutBox[p],h=Ce(g);g.min=r[p].min,g.max=g.min+h}):Kp(s,n.layoutBox,r)&&Ee(p=>{const g=i?n.measuredBox[p]:n.layoutBox[p],h=Ce(r[p]);g.max=g.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[p].max=e.relativeTarget[p].min+h)});const l=zt();wn(l,r,n.layoutBox);const c=zt();i?wn(c,e.applyTransform(o,!0),n.measuredBox):wn(c,r,n.layoutBox);const u=!Hp(l);let f=!1;if(!e.resumeFrom){const p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:g,layout:h}=p;if(g&&h){const y=ce();Cn(y,n.layoutBox,g.layoutBox);const v=ce();Cn(v,r,h.layoutBox),Wp(y,v)||(f=!0),p.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=y,e.relativeParent=p)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeTargetChanged:f})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}a(sE,"notifyLayoutUpdate");function iE(e){Et.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}a(iE,"propagateDirtyNodes");function aE(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}a(aE,"cleanDirtyNodes");function lE(e){e.clearSnapshot()}a(lE,"clearSnapshot");function Rl(e){e.clearMeasurements()}a(Rl,"clearMeasurements");function cE(e){e.isLayoutDirty=!1}a(cE,"clearIsLayoutDirty");function uE(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}a(uE,"resetTransformStyle");function Al(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}a(Al,"finishAnimation");function dE(e){e.resolveTargetDelta()}a(dE,"resolveTargetDelta");function fE(e){e.calcProjection()}a(fE,"calcProjection");
131function pE(e){e.resetSkewAndRotation()}a(pE,"resetSkewAndRotation");function hE(e){e.removeLeadSnapshot()}a(hE,"removeLeadSnapshots");function Ml(e,t,n){e.translate=ie(t.translate,0,n),e.scale=ie(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}a(Ml,"mixAxisDelta");function Nl(e,t,n,r){e.min=ie(t.min,n.min,r),e.max=ie(t.max,n.max,r)}a(Nl,"mixAxis");function mE(e,t,n,r){Nl(e.x,t.x,n.x,r),Nl(e.y,t.y,n.y,r)}a(mE,"mixBox");function gE(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}a(gE,"hasOpacityCrossfade");const vE={duration:.45,ease:[.4,0,.1,1]},Dl=a(e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),"userAgentContains"),Il=Dl("applewebkit/")&&!Dl("chrome/")?Math.round:me;function Ol(e){e.min=Il(e.min),e.max=Il(e.max)}a(Ol,"roundAxis");function yE(e){Ol(e.x),Ol(e.y)}a(yE,"roundBox");function Kp(e,t,n){return e==="position"||e==="preserve-aspect"&&!bs(Pl(t),Pl(n),.2)}a(Kp,"shouldAnimatePositionOnly");const bE=zp({attachResizeListener:a((e,t)=>Ue(e,"resize",t),"attachResizeListener"),measureScroll:a(()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),"measureScroll"),checkIsScrollRoot:a(()=>!0,"checkIsScrollRoot")}),$o={current:void 0},Gp=zp({measureScroll:a(e=>({x:e.scrollLeft,y:e.scrollTop}),"measureScroll"),defaultParent:a(()=>{if(!$o.current){const e=new bE({});e.mount(window),e.setOptions({layoutScroll:!0}),$o.current=e}return $o.current},"defaultParent"),resetTransform:a((e,t)=>{e.style.transform=t!==void 0?t:"none"},"resetTransform"),checkIsScrollRoot:a(e=>window.getComputedStyle(e).position==="fixed","checkIsScrollRoot")}),xE={pan:{Feature:kP},drag:{Feature:jP,ProjectionNode:Gp,MeasureLayout:Vp}},Or={current:null},Fi={current:!1};function Yp(){if(Fi.current=!0,!!ui)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=a(()=>Or.current=e.matches,"setReducedMotionPreferences");e.addListener(t),t()}else Or.current=!1}a(Yp,"initPrefersReducedMotion");function wE(e,t,n){const{willChange:r}=t;for(const o in t){const s=t[o],i=n[o];if(he(s))e.addValue(o,s),Dr(r)&&r.add(o);else if(he(i))e.addValue(o,Nn(s,{owner:e})),Dr(r)&&r.remove(o);else if(i!==s)if(e.hasValue(o)){const l=e.getValue(o);l.liveStyle===!0?l.jump(s):l.hasAnimated||l.set(s)}else{const l=e.getStaticValue(o);e.addValue(o,Nn(l!==void 0?l:s,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}a(wE,"updateMotionValuesFromProps");const jl=new WeakMap,CE=[...op,pe,ht],SE=a(e=>CE.find(rp(e)),"findValueType"),kl=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],PE=mi.length;class EE{static{a(this,"VisualElement")}scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},l={}){this.resolveKeyframes=(g,h,y,v)=>new this.KeyframeResolver(g,h,y,v,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ri,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.scheduleRender=()=>ee.render(this.render,!1,!0);const{latestValues:c,renderState:u}=i;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=l,this.blockInitialAnimation=!!s,this.isControllingVariants=oo(n),this.isVariantNode=Of(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in p){const h=p[g];c[g]!==void 0&&he(h)&&(h.set(c[g],!1),Dr(f)&&f.add(g))}}mount(t){this.current=t,jl.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEac
vendor: 4,575 bytes, line 131
131h((n,r)=>this.bindToMotionValue(r,n)),Fi.current||Yp(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Or.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){jl.delete(this.current),this.projection&&this.projection.unmount(),Qe(this.notifyUpdate),Qe(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){const r=kt.has(t),o=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&ee.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Qt){const n=Qt[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ce()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<kl.length;r++){const o=kl[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,i=t[s];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=wE(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<PE;r++){const o=mi[r],s=this.props[o];(Rn(s)||s===!1)&&(n[o]=s)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Nn(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(tp(o)||ep(o))?o=parseFloat(o):!SE(o)&&ht.test(n)&&(o=fp(t,n)),this.setBaseTarget(t,he(o)?o.get():o)),he(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const i=Ei(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(o=i[t])}if(r&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!he(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Li),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}
131class Xp extends EE{static{a(this,"DOMVisualElement")}constructor(){super(...arguments),this.KeyframeResolver=pp}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function TE(e){return window.getComputedStyle(e)}a(TE,"getComputedStyle$1");class RE extends Xp{static{a(this,"HTMLVisualElement")}constructor(){super(...arguments),this.type="html"}readValueFromInstance(t,n){if(kt.has(n)){const r=Mi(n);return r&&r.default||0}else{const r=TE(t),o=(Lf(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Lp(t,n)}build(t,n,r,o){xi(t,n,r,o.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Pi(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;he(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,o){Hf(t,n,r,o)}}class AE extends Xp{static{a(this,"SVGVisualElement")}constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(kt.has(n)){const r=Mi(n);return r&&r.default||0}return n=Wf.has(n)?n:fi(n),t.getAttribute(n)}measureInstanceViewportBox(){return ce()}scrapeMotionValuesFromProps(t,n,r){return zf(t,n,r)}build(t,n,r,o){Ci(t,n,r,this.isSVGTag,o.transformTemplate)}renderInstance(t,n,r,o){Uf(t,n,r,o)}mount(t){this.isSVGTag=Si(t.tagName),super.mount(t)}}const ME=a((e,t)=>vi(e)?new AE(t,{enableHardwareAcceleration:!1}):new RE(t,{allowProjection:e!==d.Fragment,enableHardwareAcceleration:!0}),"createDomVisualElement"),NE={layout:{ProjectionNode:Gp,MeasureLayout:Vp}},DE={...hP,...SC,...xE,...NE},Dn=O0((e,t)=>uC(e,t,DE,ME));function qp(){const e=d.useRef(!1);return di(()=>(e.current=!0,()=>{e.current=!1}),[]),e}a(qp,"useIsMounted");function IE(){const e=qp(),[t,n]=d.useState(0),r=d.useCallback(()=>{e.current&&n(t+1)},[t]);return[d.useCallback(()=>ee.postRender(r),[r]),t]}a(IE,"useForceUpdate");class OE extends d.Component{static{a(this,"PopChildMeasure")}getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function jE({children:e,isPresent:t}){const n=d.useId(),r=d.useRef(null),o=d.useRef({width:0,height:0,top:0,left:0}),{nonce:s}=d.useContext(ci);return d.useInsertionEffect(()=>{const{width:i,height:l,top:c,left:u}=o.current;if(t||!r.current||!i||!l)return;r.current.dataset.motionPopId=n;const f=document.createElement("style");return s&&(f.nonce=s),document.head.appendChild(f),f.sheet&&f.sheet.insertRule(` 132 [data-motion-pop-id="${n}"] { 133 position: absolute !important; 134 width: ${i}px !important; 135 height: ${l}px !important; 136 top: ${c}px !important; 137 left: ${u}px !important; 138 } 139 `),()=>{document.head.removeChild(f)}},[t]),m.jsx(OE,{isPresent:t,childRef:r,sizeRef:o,children:d.cloneElement(e,{ref:r})})}a(jE,"PopChild");const Bo=a(({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:i})=>{const l=Kf(kE),c=d.useId(),u=d.useMemo(()=>({id:c,initial:t,isPresent:n,custom:o,onExitComplete:a(f=>{l.set(f,!0);for(const p of l.values())if(!p)return;r&&r()},"onExitComplete"),register:a(f=>(l.set(f,!1),()=>l.delete(f)),"register")}),s?[Math.random()]:[n]);return d.useMemo(()=>{l.forEach((f,p)=>l.set(p,!1))},[n]),d.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),i==="popLayout"&&(e=m.jsx(jE,{isPresent:n,children:e})),m.jsx(zn.Provider,{value:u,children:e})},"PresenceChild");function kE(){return new Map}a(kE,"newChildrenMap");function _E(e){return d.useEffect(()=>()=>e(),[])}a(_E,"useUnmountEffect");const Tt=a(e=>e.key||"","getChildKey");function LE(e,t){e.forEach(n=>{const r=Tt(n);t.set(r,n)})}a(LE,"updateChildLookup");function FE(e){const t=[];
139return d.Children.forEach(e,n=>{d.isValidElement(n)&&t.push(n)}),t}a(FE,"onlyElements");const VE=a(({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:s=!0,mode:i="sync"})=>{const l=d.useContext(gi).forceRender||IE()[0],c=qp(),u=FE(e);let f=u;const p=d.useRef(new Map).current,g=d.useRef(f),h=d.useRef(new Map).current,y=d.useRef(!0);if(di(()=>{y.current=!1,LE(u,h),g.current=f}),_E(()=>{y.current=!0,h.clear(),p.clear()}),y.current)return m.jsx(m.Fragment,{children:f.map(w=>m.jsx(Bo,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:s,mode:i,children:w},Tt(w)))});f=[...f];const v=g.current.map(Tt),b=u.map(Tt),C=v.length;for(let w=0;w<C;w++){const x=v[w];b.indexOf(x)===-1&&!p.has(x)&&p.set(x,void 0)}return i==="wait"&&p.size&&(f=[]),p.forEach((w,x)=>{if(b.indexOf(x)!==-1)return;const S=h.get(x);if(!S)return;const P=v.indexOf(x);let R=w;if(!R){const E=a(()=>{p.delete(x);const T=Array.from(h.keys()).filter(O=>!b.includes(O));if(T.forEach(O=>h.delete(O)),g.current=u.filter(O=>{const I=Tt(O);return I===x||T.includes(I)}),!p.size){if(c.current===!1)return;l(),r&&r()}},"onExit");R=m.jsx(Bo,{isPresent:!1,onExitComplete:E,custom:t,presenceAffectsLayout:s,mode:i,children:S},Tt(S)),p.set(x,R)}f.splice(P,0,R)}),f=f.map(w=>{const x=w.key;return p.has(x)?w:m.jsx(Bo,{isPresent:!0,presenceAffectsLayout:s,mode:i,children:w},Tt(w))}),m.jsx(m.Fragment,{children:p.size?f:f.map(w=>d.cloneElement(w))})},"AnimatePresence");function $E(){!Fi.current&&Yp();const[e]=d.useState(Or.current);return e}a($E,"useReducedMotion");const BE=dn(.4,0,.2,1),HE=".Toastify",WE={neutral:"i-heroicons:information-circle",brand:"i-heroicons:sparkles",success:"i-heroicons:check-circle",warning:"i-heroicons:exclamation-triangle",danger:"i-heroicons:exclamation-circle"},jr={duration:.15,ease:BE},UE={closed:{opacity:0,transition:jr},open:{opacity:1,transition:jr}},zE={closed:{x:"-50%",y:"-40%",scale:.96,opacity:0,transition:jr},open:{x:"-50%",y:"-50%",scale:1,opacity:1,transition:jr}},JT=d.memo(({title:e,description:t,badge:n,badgeIcon:r,onBack:o,unstyled:s=!1,className:i,noBorder:l=!1,wrapperClassName:c})=>m.jsxs("div",{className:D(s?"":"flex flex-col gap-6 items-start min-w-0 pt-6 px-6 bg-bolt-ds-bg overflow-hidden",!l&&!s?"border-b border-bolt-ds-borderPrimary pb-6":"",i),children:[n||r?m.jsx($d,{icon:r??(n?WE[n]:void 0),type:n}):null,m.jsxs("div",{className:"flex items-start gap-2 w-full overflow-hidden",children:[o&&m.jsx(Hr,{icon:"i-heroicons:arrow-left-solid",size:"md",variant:"ghost",onClick:o}),m.jsxs("div",{className:D("w-full flex flex-col gap-1 overflow-hidden",o?"pt-1":"",c),children:[e&&m.jsx(Zt,{className:"text-lg font-semibold text-bolt-ds-textPrimary truncate",children:e}),t&&m.jsx("div",{className:"text-base text-bolt-ds-textSecondary",children:t})]})]})]}));d.memo(({src:e,title:t,description:n})=>m.jsxs("div",{children:[m.jsx("div",{className:"w-full h-50 bg-bolt-ds-bgSecondary bg-cover",style:{backgroundImage:`url(${e})`}}),m.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[t?m.jsx(Zt,{className:"text-lg font-semibold text-bolt-ds-textPrimary",children:t}):m.jsx(qr,{children:m.jsx(Zt,{children:e})}),n&&m.jsx("p",{className:"text-base text-bolt-ds-textSecondary",children:n})]})]}));const eR=d.memo(({children:e,className:t,unstyled:n=!1,noPadding:r=!1,...o})=>m.jsx(m0,{className:D({"text-bolt-ds-textSecondary text-sm":!n,"p-6":!n&&!r},t),asChild:!0,...o,children:m.jsx("div",{children:e})})),tR=d.memo(({children:e,orientation:t="horizontal",actionSize:n="compact",className:r})=>m.jsx("div",{className:D("p-6 flex gap-2",{"justify-end":t==="horizontal","flex-col":t==="vertical","[&>*]:flex-1":t==="horizontal"&&n==="fullwidth"},r),children:e})),nR=d.memo(e=>m.jsx(Hr,{...e,className:D("px-4 gap-2",e.className),children:e.children})),rR=d.memo(({contentClassName:e,backdropClassName:t,open:n=!1,width:r="90vw",height:o,showOverflow:s=!0,maxWidth:i,maxHeight:l="85vh",showCloseButton:c=!0,closeButtonClassName:u="",closeOnBackdropClick:f=!0,closeOnEscape:p=!0,unstyled:g=!1,portalContainer:h,children:y,modal:v,backdropVariants:b=UE,contentVariants:C=zE,onClose:w,onOpenAutoFocus:x,"data-testid":S,closeButtonProps:P})=>{const R=d.useRef(w),E=d.useRef(null),T=d.useRef(null);d.useEffect(()=>{R.current=w});const O=d.useCallback(L=>{const W=L?.detail?.originalEvent?.target??L.target;W?.closest(HE)||T.current&&W!==T.current||f&&R.current?.("backdrop")},[f]),I=d.useCallback(L=>{L.preventDefault(),p&&R.current?.("escape")},[p]);return m.jsx(d0,{open:n,modal:v,children:m.jsx(VE,{children:n&&m.jsx(f0,{forceMount:!0,container:h,children:m.jsx(p0,{asChild:!0,children:m.jsx(Dn.div,{ref:T,className:D("bg-black/50 fixed inset-0 z-dialog",t),initial:"closed",animate:"open",exit:"closed",variants:b,children:m.jsx(h0,{ref:E,asChild:!0,"aria-describedby":void 0,onCloseAutoFocus:a(L=>{L.preventDefault(),document.body.style.pointerEvents=""},"onCloseAutoFocus"),onPointerDownOutside:O,onEscapeKeyDown:I,onOpenAutoFocus:x,"data-testid":S,children:m.jsxs(Dn.div,{className:D("fixed top-[50%] left-[50%] z-max -translate-x-1/2 -translate-y-1/2 focus:outline-none",g?void 0:"border border-bolt-ds-borderPrimary rounded-xl bg-bolt-ds-bg shadow-lg",s?"overflow-auto":"overflow-hidden",e),style:{width:typeof r=="string"?r:`${r}
139px`,height:typeof o=="string"?o:o===void 0?void 0:`${o}px`,maxWidth:typeof i=="string"?i:typeof i=="number"?`${i}px`:void 0,maxHeight:typeof l=="string"?l:`${l}px`},initial:"closed",animate:"open",exit:"closed",variants:C,children:[y,c&&m.jsx(g0,{asChild:!0,onClick:a(()=>w?.("close-button"),"onClick"),children:m.jsx(nv,{size:"md",className:D("absolute top-2 right-2 z-layer-3",u),"aria-label":"Close dialog",...P})})]})})})})})})})}),oR=a(({children:e})=>m.jsx(qr,{children:m.jsx(Zt,{children:e})}),"HiddenDialogTitle"),KE=d.forwardRef(({className:e,containerClassName:t,topContent:n,bottomContent:r,...o},s)=>{const i=m.jsx("table",{ref:s,className:D("w-full caption-bottom text-sm",e),...o});return!n&&!r?m.jsx("div",{className:D("border border-bolt-ds-borderPrimary rounded-md relative w-full overflow-auto",t),children:i}):m.jsxs("div",{className:D("relative w-full flex flex-col",t),children:[n,m.jsx("div",{className:D("border border-bolt-ds-borderPrimary overflow-auto grow rounded-t-md",{"rounded-b-md":!r}),children:i}),r]})});KE.displayName="Table";const GE=d.forwardRef(({className:e,...t},n)=>m.jsx("thead",{ref:n,className:D("[&_tr]:border-b [&_tr]:border-bolt-ds-borderPrimary text-bolt-ds-textSecondary text-xs bg-bolt-ds-bgSecondary",e),...t}));GE.displayName="TableHeader";const YE=d.forwardRef(({className:e,...t},n)=>m.jsx("tbody",{ref:n,className:D("[&_tr:last-child]:border-0",e),...t}));YE.displayName="TableBody";const XE=d.forwardRef(({className:e,...t},n)=>m.jsx("tfoot",{ref:n,className:D("border-t border-bolt-ds-divider bg-bolt-ds-bgSecondary font-medium [&>tr]:last:border-b-0",e),...t}));XE.displayName="TableFooter";const qE=d.forwardRef(({className:e,...t},n)=>m.jsx("tr",{ref:n,className:D("border-b last:border-b-0 overflow-hidden border-bolt-ds-divider transition-colors",e),...t}));qE.displayName="TableRow";const ZE=d.forwardRef(({className:e,...t},n)=>m.jsx("th",{ref:n,className:D("bg-bolt-ds-bgSecondary text-xs text-bolt-ds-textTertiary px-4 py-3 border-b border-bolt-ds-divider overflow-hidden h-12 text-left align-middle [&:has([role=checkbox])]:pr-0",e),...t}));ZE.displayName="TableHead";const QE=d.forwardRef(({className:e,...t},n)=>m.jsx("td",{ref:n,className:D("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));QE.displayName="TableCell";const _l={duration:1.5,repeat:1/0,ease:"easeInOut"};function Ho(e){return typeof e=="number"?`${e}px`:e}a(Ho,"toCssSize");const Ss=d.memo(({className:e,style:t,animate:n,children:r})=>m.jsxs(Dn.span,{"aria-hidden":!0,className:D("rounded-md bg-bolt-ds-utilHover relative overflow-hidden leading-none",e),style:t,initial:n?{opacity:.8}:!1,animate:n?{opacity:[.8,.5,.8]}:void 0,transition:n?_l:void 0,children:[n&&m.jsx(Dn.span,{"aria-hidden":!0,className:"absolute inset-0 bg-gradient-to-r from-transparent via-bolt-ds-utilHover to-transparent",initial:{x:"-100%"},animate:{x:"100%"},transition:_l}),r]}));Ss.displayName="SkeletonSurface";const co=d.memo(({className:e,width:t,height:n,borderRadius:r,containerClassName:o,circle:s=!1,count:i=1,inline:l=!1,enableAnimation:c=!0,loading:u=!0,wrapper:f,children:p})=>{const g=$E(),h=c&&!g,y=f,v=s?"50%":Ho(r);if(p!==void 0)return u?m.jsxs("span",{className:D("relative",l?"inline-block":"block",o),"aria-busy":!0,children:[m.jsx("span",{className:"opacity-0 pointer-events-none","aria-hidden":!0,children:p}),m.jsx(Ss,{className:D("absolute inset-0",e),style:{borderRadius:v},animate:h})]}):m.jsx(m.Fragment,{children:p});const b={width:Ho(t),height:Ho(n),borderRadius:v},C=Math.max(1,Math.ceil(i)),w=i%1,x=Array.from({length:C},(S,P)=>{const R={...b};w!==0&&P===C-1&&(R.width=`calc(${b.width??"100%"} * ${w})`);const E=m.jsx(Ss,{className:D(l?"inline-flex":"block",e),style:R,animate:h,children:"â"},P);return y?m.jsx(y,{children:E},P):E});return i===1&&!y&&!o?x[0]:m.jsx("span",{className:D(l?"inline-flex flex-wrap gap-2":"flex flex-col gap-2",o),"aria-busy":!0,children:x})});co.displayName="Skeleton";const JE={xxs:{container:"size-4",rounded:"rounded"},xs:{container:"size-6",rounded:"rounded-md"},sm:{container:"size-8",rounded:"rounded-lg"},md:{container:"size-9",rounded:"rounded-lg"},lg:{container:"size-12",rounded:"rounded-xl"},xl:{container:"size-14",rounded:"rounded-xl"},"2xl":{container:"size-16",rounded:"rounded-2xl"}},eT=d.memo(({size:e="sm",type:t="circle",className:n})=>{const{container:r,rounded:o}=JE[e];return m.jsx(co,{className:D(r,t==="circle"?"rounded-full":o,n)})});eT.displayName="SkeletonAvatar";const tT=d.memo(({lines:e=3,className:t})=>m.jsx("div",{className:D("space-y-2",t),children:Array.from({length:e},(n,r)=>m.jsx(co,{className:D("h-4",r===e-1&&e>1?"w-3/5":"w-full")},r))}));tT.displayName="SkeletonText";const nT=d.memo(({className:e,rowClassName:t="h-4 w-full",amount:n=4})=>m.jsx("div",{className:D("space-y-2",e),children:Array.from(Array(n).keys()).map(r=>m.jsx(co,{className:t},r))}));nT.displayName="SkeletonGroup";const rT=_r("inline-flex items-center justify-center shrink-0",{variants:{variant:{default:"bg-bolt-ds-bgSecondary text-bolt-ds-textPrimary",brand:"bg-bolt-ds-brandBgSubtle text-bolt-ds-onBrandBgSubtle",success:"bg-bolt-ds-successBgSubtle text-bolt-ds-onSuccessBgSubtle",warning:"bg-bolt-ds-warningBgSubtle text-bolt-ds-onWarningBgSubtle",danger:"bg-bolt-ds-dangerBgSubtle text-bolt-ds-onDangerBgSubtle",neutral:"bg-bolt-ds-utilHover text-bolt-ds-iconSecondary"},size:{xs:"size-6",sm:"size-8",md:"size-10",lg:"size-12",xl:"size-16"},shape:{rounded:"rounded-lg",squircle:"rounded-[20%]",circle:"rounded-full"}},defaultVariants:{variant:"neutral",size:"md",shape:"squircle"}}),oT={xs:"size-3.5",sm:"size-4",md:"size-5",lg:"size-6",xl:"size-8"},Zp=d.forwardRef(({className:e,variant:t,size:n,shape:r,icon:o,iconClassName:s,...i},l)=>{const c=oT[n??"md"];return m.jsx("div",{ref:l,className:D(rT({variant:t,size:n,shape:r}),e),...i,children:m.jsx("span",{"aria-hidden":"true",className:D(o,c,s)})})});Zp.displayName="IconDecoration";var uo="Popover",[Qp]=Re(uo,[an]),Xn=an(),[sT,xt]=Qp(uo),Jp=a(e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,l=Xn(t),c=d.useRef(null),[u,f]=d.useState(!1),[p,g]=Nt({prop:r,defaultProp:o??!1,onChange:s,caller:uo});return m.jsx(Ur,{...l,children:m.jsx(sT,{scope:t,contentId:we(),triggerRef:c,open:p,onOpenChange:g,onOpenToggle:d.useCallback(()=>g(h=>!h),[g]),hasCustomAnchor:u,onCustomAnchorAdd:d.useCallback(()=>f(!0),[]),onCustomAnchorRemove:d.useCallback(()=>f(!1),[]),modal:i,children:n})})},"Popover$1");Jp.displayName=uo;var eh="PopoverAnchor",th=d.forwardRef((e,t)=>
139{const{__scopePopover:n,...r}=e,o=xt(eh,n),s=Xn(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:l}=o;return d.useEffect(()=>(i(),()=>l()),[i,l]),m.jsx(zr,{...s,...r,ref:t})});th.displayName=eh;var nh="PopoverTrigger",rh=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=xt(nh,n),s=Xn(n),i=X(t,o.triggerRef),l=m.jsx(Y.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":uh(o.open),...r,ref:i,onClick:_(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:m.jsx(zr,{asChild:!0,...s,children:l})});rh.displayName=nh;var Vi="PopoverPortal",[iT,aT]=Qp(Vi,{forceMount:void 0}),oh=a(e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=xt(Vi,t);return m.jsx(iT,{scope:t,forceMount:n,children:m.jsx(He,{present:n||s.open,children:m.jsx(Ln,{asChild:!0,container:o,children:r})})})},"PopoverPortal");oh.displayName=Vi;var en="PopoverContent",sh=d.forwardRef((e,t)=>{const n=aT(en,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=xt(en,e.__scopePopover);return m.jsx(He,{present:r||s.open,children:s.modal?m.jsx(cT,{...o,ref:t}):m.jsx(uT,{...o,ref:t})})});sh.displayName=en;var lT=ct("PopoverContent.RemoveScroll"),cT=d.forwardRef((e,t)=>{const n=xt(en,e.__scopePopover),r=d.useRef(null),o=X(t,r),s=d.useRef(!1);return d.useEffect(()=>{const i=r.current;if(i)return Kr(i)},[]),m.jsx(Vn,{as:lT,allowPinchZoom:!0,children:m.jsx(ih,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_(e.onCloseAutoFocus,i=>{i.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:_(e.onPointerDownOutside,i=>{const l=i.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:_(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),uT=d.forwardRef((e,t)=>{const n=xt(en,e.__scopePopover),r=d.useRef(!1),o=d.useRef(!1);return m.jsx(ih,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a(s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},"onCloseAutoFocus"),onInteractOutside:a(s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;n.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()},"onInteractOutside")})}),ih=d.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:f,...p}=e,g=xt(en,n),h=Xn(n);return Wr(),m.jsx(_n,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:m.jsx(kn,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:a(()=>g.onOpenChange(!1),"onDismiss"),children:m.jsx(Hs,{"data-state":uh(g.open),role:"dialog",id:g.contentId,...h,...p,ref:t,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),ah="PopoverClose",lh=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=xt(ah,n);return m.jsx(Y.button,{type:"button",...r,ref:t,onClick:_(e.onClick,()=>o.onOpenChange(!1))})});lh.displayName=ah;var dT="PopoverArrow",ch=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Xn(n);return m.jsx(Ws,{...o,...r,ref:t})});ch.displayName=dT;function uh(e){return e?"open":"closed"}a(uh,"getState");var fT=Jp,pT=th,hT=rh,mT=oh,gT=sh,vT=lh,yT=ch;const Wo=["data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2","data-[side=right]:sli
139de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2"],Ll="rounded-lg border border-bolt-ds-borderPrimary bg-bolt-ds-bgAlt shadow-lg outline-none",bT=M.forwardRef(({className:e,align:t="center",sideOffset:n=4,variant:r="panel",...o},s)=>m.jsx(gT,{ref:s,"data-slot":"popover-content",align:t,sideOffset:n,className:r==="unstyled"?D(...Wo,e):r==="surface"?D(Ll,...Wo,e):D("z-50 w-72 p-4",Ll,...Wo,e),...o})),sR={Arrow:yT,Root:fT,Trigger:hT,Anchor:pT,Content:bT,Portal:mT,Close:vT},iR=d.memo(d.forwardRef(({items:e,value:t,defaultValue:n,onValueChange:r,variant:o="tint",contained:s=!0,iconOnly:i=!1,className:l},c)=>{const u=d.useId(),f=t!==void 0,p=e.find(x=>!x.disabled)?.value,[g,h]=d.useState(()=>{const x=n??e[0]?.value??"";return e.find(P=>P.value===x)?.disabled?p??x:x}),y=f?t:g,v=a(x=>{f||h(x),r?.(x)},"handleClick"),b=a(x=>{const S=Array.from(x.currentTarget.querySelectorAll('[role="tab"]:not(:disabled)'));if(S.length===0)return;const P=S.indexOf(document.activeElement);let R;if(x.key==="ArrowRight"?R=(P+1)%S.length:x.key==="ArrowLeft"?R=(P-1+S.length)%S.length:x.key==="Home"?R=0:x.key==="End"&&(R=S.length-1),R!==void 0){x.preventDefault();const E=S[R];E.focus();const T=E.dataset.value;T&&v(T)}},"handleKeyDown"),C=e.find(x=>x.value===y),w=!C||C.disabled;return m.jsx("div",{role:"tablist",ref:c,onKeyDown:b,className:D("flex items-center",s&&"p-1 shrink-0 border border-bolt-ds-borderPrimary rounded-lg w-max",l),children:e.map(x=>{const S=y===x.value,P=S&&!x.disabled||w&&x.value===p;return m.jsxs("button",{role:"tab",type:"button","data-value":x.value,onClick:a(()=>v(x.value),"onClick"),disabled:x.disabled,tabIndex:P?0:-1,"aria-selected":S,"aria-label":i?x.label:void 0,className:D("relative flex items-center justify-center gap-1.5 h-7 rounded-md text-sm font-medium shrink-0 bg-transparent","outline-none focus-visible:outline-2 focus-visible:outline-bolt-ds-brandHover","disabled:op-50 disabled:cursor-not-allowed",i?"w-7":"px-3",S?o==="secondary"?"text-bolt-ds-textPrimary":"text-bolt-ds-brand":"text-bolt-ds-textSecondary"),children:[S&&m.jsx(Dn.div,{"data-testid":"tab-active-indicator",layoutId:u,className:D("absolute inset-0 rounded-md",o==="secondary"?"bg-bolt-ds-inverseBg/10":"bg-bolt-ds-brand/10"),transition:{type:"spring",bounce:.2,duration:.35}}),x.icon&&m.jsx("span",{className:"relative size-4 flex items-center justify-center shrink-0",children:x.icon}),!i&&x.label&&m.jsx("span",{className:"relative truncate",children:x.label})]},x.value)})})})),dh=d.forwardRef(({className:e,icon:t,iconVariant:n="neutral",children:r,...o},s)=>m.jsxs("div",{ref:s,className:D("flex flex-col gap-4 items-center justify-center text-center",e),...o,children:[t&&m.jsx(Zp,{icon:t,variant:n,size:"lg",shape:"circle",className:"border border-bolt-ds-borderPrimary bg-bolt-ds-neutralBgSubtle"}),r]}));dh.displayName="EmptyState.Root";const fh=d.forwardRef(({className:e,children:t,...n},r)=>m.jsx("h3",{ref:r,className:D("font-medium text-base text-bolt-ds-textPrimary",e),...n,children:t}));fh.displayName="EmptyState.Title";const ph=d.forwardRef(({className:e,children:t,...n},r)=>m.jsx("p",{ref:r,className:D("text-sm text-bolt-ds-textTertiary max-w-sm",e),...n,children:t}));ph.displayName="EmptyState.Description";const hh=d.forwardRef(({className:e,children:t,...n},r)=>m.jsx("div",{ref:r,className:D("flex items-center gap-3",e),...n,children:t}));hh.displayName="EmptyState.Actions";const aR=a(({icon:e,title:t,caption:n,actions:r})=>m.jsxs(dh,{icon:e,children:[m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsx(fh,{children:t}),m.jsx(ph,{children:n})]}),r&&m.jsx(hh,{children:r})]}),"EmptyState");export{RT as $,KE as A,Hr as B,nv as C,rR as D,GE as E,td as F,qE as G,ZE as H,BT as I,YE as J,QE as K,_T as L,LT as M,FT as N,p0 as O,kc as P,$d as Q,Oc as R,OT as S,jc as T,aR as U,Zu as V,NT as W,DT as X,UT as Y,co as Z,we as _,dn as a,Fl as a$,Y as a0,nn as a1,WT as a2,oR as a3,VE as a4,nT as a5,Sc as a6,am as a7,iR as a8,KT as a9,FS as aA,Ya as aB,Ye as aC,bS as aD,ie as aE,_i as aF,kS as aG,jS as aH,at as aI,Mn as aJ,tE as aK,ZS as aL,Dp as aM,VT as aN,Zp as aO,fw as aP,AT as aQ,$E as aR,Zt as aS,zT as aT,ax as aU,Es as aV,mt as aW,Hl as aX,rn as aY,Be as aZ,ay as a_,MT as aa,Yg as ab,OS as ac,di as ad,Qe as ae,ee as af,Za as ag,Kf as ah,ci as ai,he as aj,fe as ak,qT as al,X as am,de as an,Nt as ao,ze as ap,Re as aq,Vs as ar,jn as as,Gb as at,Nn as au,eE as av,AE as aw,RE as ax,jl as ay,yp as az,JT as b,oy as b0,Le as b1,dr as b2,fr as b3,au as b4,Rh as b5,wy as b6,ly as b7,_s as b8,Cg as b9,R0 as bA,Af as bB,SC as bC,hP as bD,ME as bE,sP as bF,tP as bG,ZT as bH,mm as bI,hm as bJ,cx as bK,Bl as bL,$T as bM,QP as bN,Em as ba,Sg as bb,_e as bc,Xe as bd,Cc as be,pc as bf,od as bg,Kr as bh,zl as bi,Pg as bj,Eg as bk,zu as bl,Tx as bm,IT as bn,ye as bo,fd as bp,_ as bq,HT as br,He as b
139s,Lc as bt,kn as bu,ST as bv,PT as bw,ET as bx,O0 as by,uC as bz,D as c,tR as d,nR as e,_c as f,d0 as g,YT as h,h0 as i,g0 as j,XT as k,f0 as l,m0 as m,sR as n,Dn as o,tv as p,zb as q,Kb as r,Hb as s,Wb as t,TT as u,Ub as v,jT as w,kT as x,eR as y,Px as z}; 140//# sourceMappingURL=EmptyState-CUjdgELX.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.