@kaitranntt/ccs 6.5.0-dev.3 → 6.5.0-dev.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/VERSION +1 -1
- package/dist/ccs.js +5 -0
- package/dist/ccs.js.map +1 -1
- package/dist/cliproxy/binary-manager.d.ts +16 -2
- package/dist/cliproxy/binary-manager.d.ts.map +1 -1
- package/dist/cliproxy/binary-manager.js +39 -15
- package/dist/cliproxy/binary-manager.js.map +1 -1
- package/dist/cliproxy/config-generator.d.ts +1 -1
- package/dist/cliproxy/config-generator.d.ts.map +1 -1
- package/dist/cliproxy/config-generator.js +20 -8
- package/dist/cliproxy/config-generator.js.map +1 -1
- package/dist/config/unified-config-loader.d.ts +6 -1
- package/dist/config/unified-config-loader.d.ts.map +1 -1
- package/dist/config/unified-config-loader.js +35 -1
- package/dist/config/unified-config-loader.js.map +1 -1
- package/dist/config/unified-config-types.d.ts +18 -0
- package/dist/config/unified-config-types.d.ts.map +1 -1
- package/dist/config/unified-config-types.js +14 -1
- package/dist/config/unified-config-types.js.map +1 -1
- package/dist/copilot/copilot-executor.d.ts.map +1 -1
- package/dist/copilot/copilot-executor.js +6 -1
- package/dist/copilot/copilot-executor.js.map +1 -1
- package/dist/ui/assets/accounts-C1DiBVWf.js +1 -0
- package/dist/ui/assets/{analytics-iF-Az9y6.js → analytics-34-9qi4o.js} +1 -1
- package/dist/ui/assets/api-Lcsxd42l.js +1 -0
- package/dist/ui/assets/{card-7gGxs3iI.js → card-tk5ihPK8.js} +1 -1
- package/dist/ui/assets/{charts-D_0N6JY8.js → charts-B9Jh-s-X.js} +1 -1
- package/dist/ui/assets/{cliproxy-control-panel-CROmsCnw.js → cliproxy-control-panel-BzhsXWKa.js} +1 -1
- package/dist/ui/assets/cliproxy-lpz8UdFt.js +1 -0
- package/dist/ui/assets/{code-editor-B0MIQXBU.js → code-editor-rSl_-6ob.js} +1 -1
- package/dist/ui/assets/{code-highlight-C2TXE0-z.js → code-highlight-BoHWVYut.js} +1 -1
- package/dist/ui/assets/copilot-Djc29_O8.js +4 -0
- package/dist/ui/assets/{form-utils-BXvNPyud.js → form-utils-BuXDJb0w.js} +1 -1
- package/dist/ui/assets/{health-6IR3Aj8H.js → health-ByL12ZVZ.js} +1 -1
- package/dist/ui/assets/icons-U_6eBV_J.js +1 -0
- package/dist/ui/assets/index-CeV2P3Sp.css +1 -0
- package/dist/ui/assets/index-c9idYjfn.js +48 -0
- package/dist/ui/assets/{notifications-cqk-Qeo2.js → notifications-B2Pz7lik.js} +1 -1
- package/dist/ui/assets/{radix-ui-VbLlN_Dz.js → radix-ui-DFHQr9A5.js} +1 -1
- package/dist/ui/assets/react-vendor-FspHSO0w.js +3 -0
- package/dist/ui/assets/settings-BzHi9yIP.js +1 -0
- package/dist/ui/assets/{shared-DyO5taQR.js → shared-CojMqcSc.js} +1 -1
- package/dist/ui/assets/{switch-RuCXlnvJ.js → switch-BQbPcCIQ.js} +1 -1
- package/dist/ui/assets/{tanstack-yybD444-.js → tanstack-C4gT2P7V.js} +1 -1
- package/dist/ui/index.html +9 -9
- package/dist/web-server/routes.d.ts.map +1 -1
- package/dist/web-server/routes.js +70 -0
- package/dist/web-server/routes.js.map +1 -1
- package/package.json +1 -1
- package/dist/ui/assets/accounts-Cno_nr-i.js +0 -1
- package/dist/ui/assets/api-aiUhSlkb.js +0 -1
- package/dist/ui/assets/cliproxy-D0BBuZq0.js +0 -1
- package/dist/ui/assets/copilot-CioTYLzs.js +0 -4
- package/dist/ui/assets/icons-rlGkaRKF.js +0 -1
- package/dist/ui/assets/index-CmXcNr-M.js +0 -48
- package/dist/ui/assets/index-CpFV39RC.css +0 -1
- package/dist/ui/assets/react-vendor-DMek_JCF.js +0 -3
- package/dist/ui/assets/settings-CswNtUjU.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a,b as Ut}from"./react-vendor-DMek_JCF.js";function Xt(r){if(typeof document>"u")return;let o=document.head||document.getElementsByTagName("head")[0],e=document.createElement("style");e.type="text/css",o.appendChild(e),e.styleSheet?e.styleSheet.cssText=r:e.appendChild(document.createTextNode(r))}const Wt=r=>{switch(r){case"success":return Gt;case"info":return Jt;case"warning":return Qt;case"error":return Zt;default:return null}},Kt=Array(12).fill(0),qt=({visible:r,className:o})=>a.createElement("div",{className:["sonner-loading-wrapper",o].filter(Boolean).join(" "),"data-visible":r},a.createElement("div",{className:"sonner-spinner"},Kt.map((e,s)=>a.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),Gt=a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},a.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"})),Qt=a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},a.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"})),Jt=a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},a.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"})),Zt=a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},a.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"})),te=a.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"},a.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),a.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),ee=()=>{const[r,o]=a.useState(document.hidden);return a.useEffect(()=>{const e=()=>{o(document.hidden)};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)},[]),r};let xt=1;class ae{constructor(){this.subscribe=o=>(this.subscribers.push(o),()=>{const e=this.subscribers.indexOf(o);this.subscribers.splice(e,1)}),this.publish=o=>{this.subscribers.forEach(e=>e(o))},this.addToast=o=>{this.publish(o),this.toasts=[...this.toasts,o]},this.create=o=>{var e;const{message:s,...C}=o,u=typeof o?.id=="number"||((e=o.id)==null?void 0:e.length)>0?o.id:xt++,g=this.toasts.find(b=>b.id===u),_=o.dismissible===void 0?!0:o.dismissible;return this.dismissedToasts.has(u)&&this.dismissedToasts.delete(u),g?this.toasts=this.toasts.map(b=>b.id===u?(this.publish({...b,...o,id:u,title:s}),{...b,...o,id:u,dismissible:_,title:s}):b):this.addToast({title:s,...C,dismissible:_,id:u}),u},this.dismiss=o=>(o?(this.dismissedToasts.add(o),requestAnimationFrame(()=>this.subscribers.forEach(e=>e({id:o,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(s=>s({id:e.id,dismiss:!0}))}),o),this.message=(o,e)=>this.create({...e,message:o}),this.error=(o,e)=>this.create({...e,message:o,type:"error"}),this.success=(o,e)=>this.create({...e,type:"success",message:o}),this.info=(o,e)=>this.create({...e,type:"info",message:o}),this.warning=(o,e)=>this.create({...e,type:"warning",message:o}),this.loading=(o,e)=>this.create({...e,type:"loading",message:o}),this.promise=(o,e)=>{if(!e)return;let s;e.loading!==void 0&&(s=this.create({...e,promise:o,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));const C=Promise.resolve(o instanceof Function?o():o);let u=s!==void 0,g;const _=C.then(async i=>{if(g=["resolve",i],a.isValidElement(i))u=!1,this.create({id:s,type:"default",message:i});else if(se(i)&&!i.ok){u=!1;const t=typeof e.error=="function"?await e.error(`HTTP error! status: ${i.status}`):e.error,x=typeof e.description=="function"?await e.description(`HTTP error! status: ${i.status}`):e.description,E=typeof t=="object"&&!a.isValidElement(t)?t:{message:t};this.create({id:s,type:"error",description:x,...E})}else if(i instanceof Error){u=!1;const t=typeof e.error=="function"?await e.error(i):e.error,x=typeof e.description=="function"?await e.description(i):e.description,E=typeof t=="object"&&!a.isValidElement(t)?t:{message:t};this.create({id:s,type:"error",description:x,...E})}else if(e.success!==void 0){u=!1;const t=typeof e.success=="function"?await e.success(i):e.success,x=typeof e.description=="function"?await e.description(i):e.description,E=typeof t=="object"&&!a.isValidElement(t)?t:{message:t};this.create({id:s,type:"success",description:x,...E})}}).catch(async i=>{if(g=["reject",i],e.error!==void 0){u=!1;const T=typeof e.error=="function"?await e.error(i):e.error,t=typeof e.description=="function"?await e.description(i):e.description,O=typeof T=="object"&&!a.isValidElement(T)?T:{message:T};this.create({id:s,type:"error",description:t,...O})}}).finally(()=>{u&&(this.dismiss(s),s=void 0),e.finally==null||e.finally.call(e)}),b=()=>new Promise((i,T)=>_.then(()=>g[0]==="reject"?T(g[1]):i(g[1])).catch(T));return typeof s!="string"&&typeof s!="number"?{unwrap:b}:Object.assign(s,{unwrap:b})},this.custom=(o,e)=>{const s=e?.id||xt++;return this.create({jsx:o(s),id:s,...e}),s},this.getActiveToasts=()=>this.toasts.filter(o=>!this.dismissedToasts.has(o.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const S=new ae,oe=(r,o)=>{const e=o?.id||xt++;return S.addToast({title:r,...o,id:e}),e},se=r=>r&&typeof r=="object"&&"ok"in r&&typeof r.ok=="boolean"&&"status"in r&&typeof r.status=="number",ne=oe,re=()=>S.toasts,ie=()=>S.getActiveToasts(),we=Object.assign(ne,{success:S.success,info:S.info,warning:S.warning,error:S.error,custom:S.custom,message:S.message,promise:S.promise,dismiss:S.dismiss,loading:S.loading},{getHistory:re,getToasts:ie});Xt("[data-sonner-toaster][dir=ltr],html[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%)}[data-sonner-toaster][dir=rtl],html[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%)}[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:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[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);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[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 rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [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)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [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;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left: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);background:var(--normal-bg);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-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[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}[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}[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,0)) translateX(var(--swipe-amount-x,0));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{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{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{from{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-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--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-sonner-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-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-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, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-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-sonner-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]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[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]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[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]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[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]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[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:first-child{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)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{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%)}");function mt(r){return r.label!==void 0}const le=3,de="24px",ce="16px",Mt=4e3,ue=356,fe=14,me=45,pe=200;function H(...r){return r.filter(Boolean).join(" ")}function ge(r){const[o,e]=r.split("-"),s=[];return o&&s.push(o),e&&s.push(e),s}const he=r=>{var o,e,s,C,u,g,_,b,i;const{invert:T,toast:t,unstyled:x,interacting:O,setHeights:E,visibleToasts:pt,heights:U,index:d,toasts:ot,expanded:X,removeToast:st,defaultRichColors:gt,closeButton:z,style:Z,cancelButtonStyle:Y,actionButtonStyle:ht,className:nt="",descriptionClassName:bt="",duration:tt,position:A,gap:rt,expandByDefault:et,classNames:c,icons:v,closeButtonAriaLabel:j="Close toast"}=r,[$,B]=a.useState(null),[F,it]=a.useState(null),[l,p]=a.useState(!1),[m,D]=a.useState(!1),[W,f]=a.useState(!1),[K,lt]=a.useState(!1),[dt,q]=a.useState(!1),[Ct,vt]=a.useState(0),[At,Et]=a.useState(0),at=a.useRef(t.duration||tt||Mt),Tt=a.useRef(null),P=a.useRef(null),Ht=d===0,Ot=d+1<=pt,N=t.type,G=t.dismissible!==!1,zt=t.className||"",Pt=t.descriptionClassName||"",ct=a.useMemo(()=>U.findIndex(n=>n.toastId===t.id)||0,[U,t.id]),jt=a.useMemo(()=>{var n;return(n=t.closeButton)!=null?n:z},[t.closeButton,z]),St=a.useMemo(()=>t.duration||tt||Mt,[t.duration,tt]),yt=a.useRef(0),Q=a.useRef(0),Nt=a.useRef(0),J=a.useRef(null),[Lt,Yt]=A.split("-"),kt=a.useMemo(()=>U.reduce((n,h,w)=>w>=ct?n:n+h.height,0),[U,ct]),_t=ee(),$t=t.invert||T,wt=N==="loading";Q.current=a.useMemo(()=>ct*rt+kt,[ct,kt]),a.useEffect(()=>{at.current=St},[St]),a.useEffect(()=>{p(!0)},[]),a.useEffect(()=>{const n=P.current;if(n){const h=n.getBoundingClientRect().height;return Et(h),E(w=>[{toastId:t.id,height:h,position:t.position},...w]),()=>E(w=>w.filter(k=>k.toastId!==t.id))}},[E,t.id]),a.useLayoutEffect(()=>{if(!l)return;const n=P.current,h=n.style.height;n.style.height="auto";const w=n.getBoundingClientRect().height;n.style.height=h,Et(w),E(k=>k.find(y=>y.toastId===t.id)?k.map(y=>y.toastId===t.id?{...y,height:w}:y):[{toastId:t.id,height:w,position:t.position},...k])},[l,t.title,t.description,E,t.id,t.jsx,t.action,t.cancel]);const L=a.useCallback(()=>{D(!0),vt(Q.current),E(n=>n.filter(h=>h.toastId!==t.id)),setTimeout(()=>{st(t)},pe)},[t,st,E,Q]);a.useEffect(()=>{if(t.promise&&N==="loading"||t.duration===1/0||t.type==="loading")return;let n;return X||O||_t?(()=>{if(Nt.current<yt.current){const k=new Date().getTime()-yt.current;at.current=at.current-k}Nt.current=new Date().getTime()})():(()=>{at.current!==1/0&&(yt.current=new Date().getTime(),n=setTimeout(()=>{t.onAutoClose==null||t.onAutoClose.call(t,t),L()},at.current))})(),()=>clearTimeout(n)},[X,O,t,N,_t,L]),a.useEffect(()=>{t.delete&&(L(),t.onDismiss==null||t.onDismiss.call(t,t))},[L,t.delete]);function Ft(){var n;if(v?.loading){var h;return a.createElement("div",{className:H(c?.loader,t==null||(h=t.classNames)==null?void 0:h.loader,"sonner-loader"),"data-visible":N==="loading"},v.loading)}return a.createElement(qt,{className:H(c?.loader,t==null||(n=t.classNames)==null?void 0:n.loader),visible:N==="loading"})}const Vt=t.icon||v?.[N]||Wt(N);var Dt,Rt;return a.createElement("li",{tabIndex:0,ref:P,className:H(nt,zt,c?.toast,t==null||(o=t.classNames)==null?void 0:o.toast,c?.default,c?.[N],t==null||(e=t.classNames)==null?void 0:e[N]),"data-sonner-toast":"","data-rich-colors":(Dt=t.richColors)!=null?Dt:gt,"data-styled":!(t.jsx||t.unstyled||x),"data-mounted":l,"data-promise":!!t.promise,"data-swiped":dt,"data-removed":m,"data-visible":Ot,"data-y-position":Lt,"data-x-position":Yt,"data-index":d,"data-front":Ht,"data-swiping":W,"data-dismissible":G,"data-type":N,"data-invert":$t,"data-swipe-out":K,"data-swipe-direction":F,"data-expanded":!!(X||et&&l),"data-testid":t.testId,style:{"--index":d,"--toasts-before":d,"--z-index":ot.length-d,"--offset":`${m?Ct:Q.current}px`,"--initial-height":et?"auto":`${At}px`,...Z,...t.style},onDragEnd:()=>{f(!1),B(null),J.current=null},onPointerDown:n=>{n.button!==2&&(wt||!G||(Tt.current=new Date,vt(Q.current),n.target.setPointerCapture(n.pointerId),n.target.tagName!=="BUTTON"&&(f(!0),J.current={x:n.clientX,y:n.clientY})))},onPointerUp:()=>{var n,h,w;if(K||!G)return;J.current=null;const k=Number(((n=P.current)==null?void 0:n.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ut=Number(((h=P.current)==null?void 0:h.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),y=new Date().getTime()-((w=Tt.current)==null?void 0:w.getTime()),R=$==="x"?k:ut,ft=Math.abs(R)/y;if(Math.abs(R)>=me||ft>.11){vt(Q.current),t.onDismiss==null||t.onDismiss.call(t,t),it($==="x"?k>0?"right":"left":ut>0?"down":"up"),L(),lt(!0);return}else{var M,I;(M=P.current)==null||M.style.setProperty("--swipe-amount-x","0px"),(I=P.current)==null||I.style.setProperty("--swipe-amount-y","0px")}q(!1),f(!1),B(null)},onPointerMove:n=>{var h,w,k;if(!J.current||!G||((h=window.getSelection())==null?void 0:h.toString().length)>0)return;const y=n.clientY-J.current.y,R=n.clientX-J.current.x;var ft;const M=(ft=r.swipeDirections)!=null?ft:ge(A);!$&&(Math.abs(R)>1||Math.abs(y)>1)&&B(Math.abs(R)>Math.abs(y)?"x":"y");let I={x:0,y:0};const Bt=V=>1/(1.5+Math.abs(V)/20);if($==="y"){if(M.includes("top")||M.includes("bottom"))if(M.includes("top")&&y<0||M.includes("bottom")&&y>0)I.y=y;else{const V=y*Bt(y);I.y=Math.abs(V)<Math.abs(y)?V:y}}else if($==="x"&&(M.includes("left")||M.includes("right")))if(M.includes("left")&&R<0||M.includes("right")&&R>0)I.x=R;else{const V=R*Bt(R);I.x=Math.abs(V)<Math.abs(R)?V:R}(Math.abs(I.x)>0||Math.abs(I.y)>0)&&q(!0),(w=P.current)==null||w.style.setProperty("--swipe-amount-x",`${I.x}px`),(k=P.current)==null||k.style.setProperty("--swipe-amount-y",`${I.y}px`)}},jt&&!t.jsx&&N!=="loading"?a.createElement("button",{"aria-label":j,"data-disabled":wt,"data-close-button":!0,onClick:wt||!G?()=>{}:()=>{L(),t.onDismiss==null||t.onDismiss.call(t,t)},className:H(c?.closeButton,t==null||(s=t.classNames)==null?void 0:s.closeButton)},(Rt=v?.close)!=null?Rt:te):null,(N||t.icon||t.promise)&&t.icon!==null&&(v?.[N]!==null||t.icon)?a.createElement("div",{"data-icon":"",className:H(c?.icon,t==null||(C=t.classNames)==null?void 0:C.icon)},t.promise||t.type==="loading"&&!t.icon?t.icon||Ft():null,t.type!=="loading"?Vt:null):null,a.createElement("div",{"data-content":"",className:H(c?.content,t==null||(u=t.classNames)==null?void 0:u.content)},a.createElement("div",{"data-title":"",className:H(c?.title,t==null||(g=t.classNames)==null?void 0:g.title)},t.jsx?t.jsx:typeof t.title=="function"?t.title():t.title),t.description?a.createElement("div",{"data-description":"",className:H(bt,Pt,c?.description,t==null||(_=t.classNames)==null?void 0:_.description)},typeof t.description=="function"?t.description():t.description):null),a.isValidElement(t.cancel)?t.cancel:t.cancel&&mt(t.cancel)?a.createElement("button",{"data-button":!0,"data-cancel":!0,style:t.cancelButtonStyle||Y,onClick:n=>{mt(t.cancel)&&G&&(t.cancel.onClick==null||t.cancel.onClick.call(t.cancel,n),L())},className:H(c?.cancelButton,t==null||(b=t.classNames)==null?void 0:b.cancelButton)},t.cancel.label):null,a.isValidElement(t.action)?t.action:t.action&&mt(t.action)?a.createElement("button",{"data-button":!0,"data-action":!0,style:t.actionButtonStyle||ht,onClick:n=>{mt(t.action)&&(t.action.onClick==null||t.action.onClick.call(t.action,n),!n.defaultPrevented&&L())},className:H(c?.actionButton,t==null||(i=t.classNames)==null?void 0:i.actionButton)},t.action.label):null)};function It(){if(typeof window>"u"||typeof document>"u")return"ltr";const r=document.documentElement.getAttribute("dir");return r==="auto"||!r?window.getComputedStyle(document.documentElement).direction:r}function be(r,o){const e={};return[r,o].forEach((s,C)=>{const u=C===1,g=u?"--mobile-offset":"--offset",_=u?ce:de;function b(i){["top","right","bottom","left"].forEach(T=>{e[`${g}-${T}`]=typeof i=="number"?`${i}px`:i})}typeof s=="number"||typeof s=="string"?b(s):typeof s=="object"?["top","right","bottom","left"].forEach(i=>{s[i]===void 0?e[`${g}-${i}`]=_:e[`${g}-${i}`]=typeof s[i]=="number"?`${s[i]}px`:s[i]}):b(_)}),e}const xe=a.forwardRef(function(o,e){const{id:s,invert:C,position:u="bottom-right",hotkey:g=["altKey","KeyT"],expand:_,closeButton:b,className:i,offset:T,mobileOffset:t,theme:x="light",richColors:O,duration:E,style:pt,visibleToasts:U=le,toastOptions:d,dir:ot=It(),gap:X=fe,icons:st,containerAriaLabel:gt="Notifications"}=o,[z,Z]=a.useState([]),Y=a.useMemo(()=>s?z.filter(l=>l.toasterId===s):z.filter(l=>!l.toasterId),[z,s]),ht=a.useMemo(()=>Array.from(new Set([u].concat(Y.filter(l=>l.position).map(l=>l.position)))),[Y,u]),[nt,bt]=a.useState([]),[tt,A]=a.useState(!1),[rt,et]=a.useState(!1),[c,v]=a.useState(x!=="system"?x:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),j=a.useRef(null),$=g.join("+").replace(/Key/g,"").replace(/Digit/g,""),B=a.useRef(null),F=a.useRef(!1),it=a.useCallback(l=>{Z(p=>{var m;return(m=p.find(D=>D.id===l.id))!=null&&m.delete||S.dismiss(l.id),p.filter(({id:D})=>D!==l.id)})},[]);return a.useEffect(()=>S.subscribe(l=>{if(l.dismiss){requestAnimationFrame(()=>{Z(p=>p.map(m=>m.id===l.id?{...m,delete:!0}:m))});return}setTimeout(()=>{Ut.flushSync(()=>{Z(p=>{const m=p.findIndex(D=>D.id===l.id);return m!==-1?[...p.slice(0,m),{...p[m],...l},...p.slice(m+1)]:[l,...p]})})})}),[z]),a.useEffect(()=>{if(x!=="system"){v(x);return}if(x==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?v("dark"):v("light")),typeof window>"u")return;const l=window.matchMedia("(prefers-color-scheme: dark)");try{l.addEventListener("change",({matches:p})=>{v(p?"dark":"light")})}catch{l.addListener(({matches:m})=>{try{v(m?"dark":"light")}catch(D){console.error(D)}})}},[x]),a.useEffect(()=>{z.length<=1&&A(!1)},[z]),a.useEffect(()=>{const l=p=>{var m;if(g.every(f=>p[f]||p.code===f)){var W;A(!0),(W=j.current)==null||W.focus()}p.code==="Escape"&&(document.activeElement===j.current||(m=j.current)!=null&&m.contains(document.activeElement))&&A(!1)};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[g]),a.useEffect(()=>{if(j.current)return()=>{B.current&&(B.current.focus({preventScroll:!0}),B.current=null,F.current=!1)}},[j.current]),a.createElement("section",{ref:e,"aria-label":`${gt} ${$}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},ht.map((l,p)=>{var m;const[D,W]=l.split("-");return Y.length?a.createElement("ol",{key:l,dir:ot==="auto"?It():ot,tabIndex:-1,ref:j,className:i,"data-sonner-toaster":!0,"data-sonner-theme":c,"data-y-position":D,"data-x-position":W,style:{"--front-toast-height":`${((m=nt[0])==null?void 0:m.height)||0}px`,"--width":`${ue}px`,"--gap":`${X}px`,...pt,...be(T,t)},onBlur:f=>{F.current&&!f.currentTarget.contains(f.relatedTarget)&&(F.current=!1,B.current&&(B.current.focus({preventScroll:!0}),B.current=null))},onFocus:f=>{f.target instanceof HTMLElement&&f.target.dataset.dismissible==="false"||F.current||(F.current=!0,B.current=f.relatedTarget)},onMouseEnter:()=>A(!0),onMouseMove:()=>A(!0),onMouseLeave:()=>{rt||A(!1)},onDragEnd:()=>A(!1),onPointerDown:f=>{f.target instanceof HTMLElement&&f.target.dataset.dismissible==="false"||et(!0)},onPointerUp:()=>et(!1)},Y.filter(f=>!f.position&&p===0||f.position===l).map((f,K)=>{var lt,dt;return a.createElement(he,{key:f.id,icons:st,index:K,toast:f,defaultRichColors:O,duration:(lt=d?.duration)!=null?lt:E,className:d?.className,descriptionClassName:d?.descriptionClassName,invert:C,visibleToasts:U,closeButton:(dt=d?.closeButton)!=null?dt:b,interacting:rt,position:l,style:d?.style,unstyled:d?.unstyled,classNames:d?.classNames,cancelButtonStyle:d?.cancelButtonStyle,actionButtonStyle:d?.actionButtonStyle,closeButtonAriaLabel:d?.closeButtonAriaLabel,removeToast:it,toasts:Y.filter(q=>q.position==f.position),heights:nt.filter(q=>q.position==f.position),setHeights:bt,expandByDefault:_,gap:X,expanded:tt,swipeDirections:o.swipeDirections})})):null}))});export{xe as T,we as t};
|
|
1
|
+
import{c as a,b as Ut}from"./react-vendor-FspHSO0w.js";function Xt(r){if(typeof document>"u")return;let o=document.head||document.getElementsByTagName("head")[0],e=document.createElement("style");e.type="text/css",o.appendChild(e),e.styleSheet?e.styleSheet.cssText=r:e.appendChild(document.createTextNode(r))}const Wt=r=>{switch(r){case"success":return Gt;case"info":return Jt;case"warning":return Qt;case"error":return Zt;default:return null}},Kt=Array(12).fill(0),qt=({visible:r,className:o})=>a.createElement("div",{className:["sonner-loading-wrapper",o].filter(Boolean).join(" "),"data-visible":r},a.createElement("div",{className:"sonner-spinner"},Kt.map((e,s)=>a.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),Gt=a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},a.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"})),Qt=a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},a.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"})),Jt=a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},a.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"})),Zt=a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},a.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"})),te=a.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"},a.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),a.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),ee=()=>{const[r,o]=a.useState(document.hidden);return a.useEffect(()=>{const e=()=>{o(document.hidden)};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)},[]),r};let xt=1;class ae{constructor(){this.subscribe=o=>(this.subscribers.push(o),()=>{const e=this.subscribers.indexOf(o);this.subscribers.splice(e,1)}),this.publish=o=>{this.subscribers.forEach(e=>e(o))},this.addToast=o=>{this.publish(o),this.toasts=[...this.toasts,o]},this.create=o=>{var e;const{message:s,...C}=o,u=typeof o?.id=="number"||((e=o.id)==null?void 0:e.length)>0?o.id:xt++,g=this.toasts.find(b=>b.id===u),_=o.dismissible===void 0?!0:o.dismissible;return this.dismissedToasts.has(u)&&this.dismissedToasts.delete(u),g?this.toasts=this.toasts.map(b=>b.id===u?(this.publish({...b,...o,id:u,title:s}),{...b,...o,id:u,dismissible:_,title:s}):b):this.addToast({title:s,...C,dismissible:_,id:u}),u},this.dismiss=o=>(o?(this.dismissedToasts.add(o),requestAnimationFrame(()=>this.subscribers.forEach(e=>e({id:o,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(s=>s({id:e.id,dismiss:!0}))}),o),this.message=(o,e)=>this.create({...e,message:o}),this.error=(o,e)=>this.create({...e,message:o,type:"error"}),this.success=(o,e)=>this.create({...e,type:"success",message:o}),this.info=(o,e)=>this.create({...e,type:"info",message:o}),this.warning=(o,e)=>this.create({...e,type:"warning",message:o}),this.loading=(o,e)=>this.create({...e,type:"loading",message:o}),this.promise=(o,e)=>{if(!e)return;let s;e.loading!==void 0&&(s=this.create({...e,promise:o,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));const C=Promise.resolve(o instanceof Function?o():o);let u=s!==void 0,g;const _=C.then(async i=>{if(g=["resolve",i],a.isValidElement(i))u=!1,this.create({id:s,type:"default",message:i});else if(se(i)&&!i.ok){u=!1;const t=typeof e.error=="function"?await e.error(`HTTP error! status: ${i.status}`):e.error,x=typeof e.description=="function"?await e.description(`HTTP error! status: ${i.status}`):e.description,E=typeof t=="object"&&!a.isValidElement(t)?t:{message:t};this.create({id:s,type:"error",description:x,...E})}else if(i instanceof Error){u=!1;const t=typeof e.error=="function"?await e.error(i):e.error,x=typeof e.description=="function"?await e.description(i):e.description,E=typeof t=="object"&&!a.isValidElement(t)?t:{message:t};this.create({id:s,type:"error",description:x,...E})}else if(e.success!==void 0){u=!1;const t=typeof e.success=="function"?await e.success(i):e.success,x=typeof e.description=="function"?await e.description(i):e.description,E=typeof t=="object"&&!a.isValidElement(t)?t:{message:t};this.create({id:s,type:"success",description:x,...E})}}).catch(async i=>{if(g=["reject",i],e.error!==void 0){u=!1;const T=typeof e.error=="function"?await e.error(i):e.error,t=typeof e.description=="function"?await e.description(i):e.description,O=typeof T=="object"&&!a.isValidElement(T)?T:{message:T};this.create({id:s,type:"error",description:t,...O})}}).finally(()=>{u&&(this.dismiss(s),s=void 0),e.finally==null||e.finally.call(e)}),b=()=>new Promise((i,T)=>_.then(()=>g[0]==="reject"?T(g[1]):i(g[1])).catch(T));return typeof s!="string"&&typeof s!="number"?{unwrap:b}:Object.assign(s,{unwrap:b})},this.custom=(o,e)=>{const s=e?.id||xt++;return this.create({jsx:o(s),id:s,...e}),s},this.getActiveToasts=()=>this.toasts.filter(o=>!this.dismissedToasts.has(o.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const S=new ae,oe=(r,o)=>{const e=o?.id||xt++;return S.addToast({title:r,...o,id:e}),e},se=r=>r&&typeof r=="object"&&"ok"in r&&typeof r.ok=="boolean"&&"status"in r&&typeof r.status=="number",ne=oe,re=()=>S.toasts,ie=()=>S.getActiveToasts(),we=Object.assign(ne,{success:S.success,info:S.info,warning:S.warning,error:S.error,custom:S.custom,message:S.message,promise:S.promise,dismiss:S.dismiss,loading:S.loading},{getHistory:re,getToasts:ie});Xt("[data-sonner-toaster][dir=ltr],html[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%)}[data-sonner-toaster][dir=rtl],html[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%)}[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:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[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);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[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 rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [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)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [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;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left: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);background:var(--normal-bg);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-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[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}[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}[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,0)) translateX(var(--swipe-amount-x,0));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{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{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{from{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-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--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-sonner-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-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-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, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-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-sonner-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]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[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]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[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]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[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]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[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:first-child{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)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{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%)}");function mt(r){return r.label!==void 0}const le=3,de="24px",ce="16px",Mt=4e3,ue=356,fe=14,me=45,pe=200;function H(...r){return r.filter(Boolean).join(" ")}function ge(r){const[o,e]=r.split("-"),s=[];return o&&s.push(o),e&&s.push(e),s}const he=r=>{var o,e,s,C,u,g,_,b,i;const{invert:T,toast:t,unstyled:x,interacting:O,setHeights:E,visibleToasts:pt,heights:U,index:d,toasts:ot,expanded:X,removeToast:st,defaultRichColors:gt,closeButton:z,style:Z,cancelButtonStyle:Y,actionButtonStyle:ht,className:nt="",descriptionClassName:bt="",duration:tt,position:A,gap:rt,expandByDefault:et,classNames:c,icons:v,closeButtonAriaLabel:j="Close toast"}=r,[$,B]=a.useState(null),[F,it]=a.useState(null),[l,p]=a.useState(!1),[m,D]=a.useState(!1),[W,f]=a.useState(!1),[K,lt]=a.useState(!1),[dt,q]=a.useState(!1),[Ct,vt]=a.useState(0),[At,Et]=a.useState(0),at=a.useRef(t.duration||tt||Mt),Tt=a.useRef(null),P=a.useRef(null),Ht=d===0,Ot=d+1<=pt,N=t.type,G=t.dismissible!==!1,zt=t.className||"",Pt=t.descriptionClassName||"",ct=a.useMemo(()=>U.findIndex(n=>n.toastId===t.id)||0,[U,t.id]),jt=a.useMemo(()=>{var n;return(n=t.closeButton)!=null?n:z},[t.closeButton,z]),St=a.useMemo(()=>t.duration||tt||Mt,[t.duration,tt]),yt=a.useRef(0),Q=a.useRef(0),Nt=a.useRef(0),J=a.useRef(null),[Lt,Yt]=A.split("-"),kt=a.useMemo(()=>U.reduce((n,h,w)=>w>=ct?n:n+h.height,0),[U,ct]),_t=ee(),$t=t.invert||T,wt=N==="loading";Q.current=a.useMemo(()=>ct*rt+kt,[ct,kt]),a.useEffect(()=>{at.current=St},[St]),a.useEffect(()=>{p(!0)},[]),a.useEffect(()=>{const n=P.current;if(n){const h=n.getBoundingClientRect().height;return Et(h),E(w=>[{toastId:t.id,height:h,position:t.position},...w]),()=>E(w=>w.filter(k=>k.toastId!==t.id))}},[E,t.id]),a.useLayoutEffect(()=>{if(!l)return;const n=P.current,h=n.style.height;n.style.height="auto";const w=n.getBoundingClientRect().height;n.style.height=h,Et(w),E(k=>k.find(y=>y.toastId===t.id)?k.map(y=>y.toastId===t.id?{...y,height:w}:y):[{toastId:t.id,height:w,position:t.position},...k])},[l,t.title,t.description,E,t.id,t.jsx,t.action,t.cancel]);const L=a.useCallback(()=>{D(!0),vt(Q.current),E(n=>n.filter(h=>h.toastId!==t.id)),setTimeout(()=>{st(t)},pe)},[t,st,E,Q]);a.useEffect(()=>{if(t.promise&&N==="loading"||t.duration===1/0||t.type==="loading")return;let n;return X||O||_t?(()=>{if(Nt.current<yt.current){const k=new Date().getTime()-yt.current;at.current=at.current-k}Nt.current=new Date().getTime()})():(()=>{at.current!==1/0&&(yt.current=new Date().getTime(),n=setTimeout(()=>{t.onAutoClose==null||t.onAutoClose.call(t,t),L()},at.current))})(),()=>clearTimeout(n)},[X,O,t,N,_t,L]),a.useEffect(()=>{t.delete&&(L(),t.onDismiss==null||t.onDismiss.call(t,t))},[L,t.delete]);function Ft(){var n;if(v?.loading){var h;return a.createElement("div",{className:H(c?.loader,t==null||(h=t.classNames)==null?void 0:h.loader,"sonner-loader"),"data-visible":N==="loading"},v.loading)}return a.createElement(qt,{className:H(c?.loader,t==null||(n=t.classNames)==null?void 0:n.loader),visible:N==="loading"})}const Vt=t.icon||v?.[N]||Wt(N);var Dt,Rt;return a.createElement("li",{tabIndex:0,ref:P,className:H(nt,zt,c?.toast,t==null||(o=t.classNames)==null?void 0:o.toast,c?.default,c?.[N],t==null||(e=t.classNames)==null?void 0:e[N]),"data-sonner-toast":"","data-rich-colors":(Dt=t.richColors)!=null?Dt:gt,"data-styled":!(t.jsx||t.unstyled||x),"data-mounted":l,"data-promise":!!t.promise,"data-swiped":dt,"data-removed":m,"data-visible":Ot,"data-y-position":Lt,"data-x-position":Yt,"data-index":d,"data-front":Ht,"data-swiping":W,"data-dismissible":G,"data-type":N,"data-invert":$t,"data-swipe-out":K,"data-swipe-direction":F,"data-expanded":!!(X||et&&l),"data-testid":t.testId,style:{"--index":d,"--toasts-before":d,"--z-index":ot.length-d,"--offset":`${m?Ct:Q.current}px`,"--initial-height":et?"auto":`${At}px`,...Z,...t.style},onDragEnd:()=>{f(!1),B(null),J.current=null},onPointerDown:n=>{n.button!==2&&(wt||!G||(Tt.current=new Date,vt(Q.current),n.target.setPointerCapture(n.pointerId),n.target.tagName!=="BUTTON"&&(f(!0),J.current={x:n.clientX,y:n.clientY})))},onPointerUp:()=>{var n,h,w;if(K||!G)return;J.current=null;const k=Number(((n=P.current)==null?void 0:n.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ut=Number(((h=P.current)==null?void 0:h.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),y=new Date().getTime()-((w=Tt.current)==null?void 0:w.getTime()),R=$==="x"?k:ut,ft=Math.abs(R)/y;if(Math.abs(R)>=me||ft>.11){vt(Q.current),t.onDismiss==null||t.onDismiss.call(t,t),it($==="x"?k>0?"right":"left":ut>0?"down":"up"),L(),lt(!0);return}else{var M,I;(M=P.current)==null||M.style.setProperty("--swipe-amount-x","0px"),(I=P.current)==null||I.style.setProperty("--swipe-amount-y","0px")}q(!1),f(!1),B(null)},onPointerMove:n=>{var h,w,k;if(!J.current||!G||((h=window.getSelection())==null?void 0:h.toString().length)>0)return;const y=n.clientY-J.current.y,R=n.clientX-J.current.x;var ft;const M=(ft=r.swipeDirections)!=null?ft:ge(A);!$&&(Math.abs(R)>1||Math.abs(y)>1)&&B(Math.abs(R)>Math.abs(y)?"x":"y");let I={x:0,y:0};const Bt=V=>1/(1.5+Math.abs(V)/20);if($==="y"){if(M.includes("top")||M.includes("bottom"))if(M.includes("top")&&y<0||M.includes("bottom")&&y>0)I.y=y;else{const V=y*Bt(y);I.y=Math.abs(V)<Math.abs(y)?V:y}}else if($==="x"&&(M.includes("left")||M.includes("right")))if(M.includes("left")&&R<0||M.includes("right")&&R>0)I.x=R;else{const V=R*Bt(R);I.x=Math.abs(V)<Math.abs(R)?V:R}(Math.abs(I.x)>0||Math.abs(I.y)>0)&&q(!0),(w=P.current)==null||w.style.setProperty("--swipe-amount-x",`${I.x}px`),(k=P.current)==null||k.style.setProperty("--swipe-amount-y",`${I.y}px`)}},jt&&!t.jsx&&N!=="loading"?a.createElement("button",{"aria-label":j,"data-disabled":wt,"data-close-button":!0,onClick:wt||!G?()=>{}:()=>{L(),t.onDismiss==null||t.onDismiss.call(t,t)},className:H(c?.closeButton,t==null||(s=t.classNames)==null?void 0:s.closeButton)},(Rt=v?.close)!=null?Rt:te):null,(N||t.icon||t.promise)&&t.icon!==null&&(v?.[N]!==null||t.icon)?a.createElement("div",{"data-icon":"",className:H(c?.icon,t==null||(C=t.classNames)==null?void 0:C.icon)},t.promise||t.type==="loading"&&!t.icon?t.icon||Ft():null,t.type!=="loading"?Vt:null):null,a.createElement("div",{"data-content":"",className:H(c?.content,t==null||(u=t.classNames)==null?void 0:u.content)},a.createElement("div",{"data-title":"",className:H(c?.title,t==null||(g=t.classNames)==null?void 0:g.title)},t.jsx?t.jsx:typeof t.title=="function"?t.title():t.title),t.description?a.createElement("div",{"data-description":"",className:H(bt,Pt,c?.description,t==null||(_=t.classNames)==null?void 0:_.description)},typeof t.description=="function"?t.description():t.description):null),a.isValidElement(t.cancel)?t.cancel:t.cancel&&mt(t.cancel)?a.createElement("button",{"data-button":!0,"data-cancel":!0,style:t.cancelButtonStyle||Y,onClick:n=>{mt(t.cancel)&&G&&(t.cancel.onClick==null||t.cancel.onClick.call(t.cancel,n),L())},className:H(c?.cancelButton,t==null||(b=t.classNames)==null?void 0:b.cancelButton)},t.cancel.label):null,a.isValidElement(t.action)?t.action:t.action&&mt(t.action)?a.createElement("button",{"data-button":!0,"data-action":!0,style:t.actionButtonStyle||ht,onClick:n=>{mt(t.action)&&(t.action.onClick==null||t.action.onClick.call(t.action,n),!n.defaultPrevented&&L())},className:H(c?.actionButton,t==null||(i=t.classNames)==null?void 0:i.actionButton)},t.action.label):null)};function It(){if(typeof window>"u"||typeof document>"u")return"ltr";const r=document.documentElement.getAttribute("dir");return r==="auto"||!r?window.getComputedStyle(document.documentElement).direction:r}function be(r,o){const e={};return[r,o].forEach((s,C)=>{const u=C===1,g=u?"--mobile-offset":"--offset",_=u?ce:de;function b(i){["top","right","bottom","left"].forEach(T=>{e[`${g}-${T}`]=typeof i=="number"?`${i}px`:i})}typeof s=="number"||typeof s=="string"?b(s):typeof s=="object"?["top","right","bottom","left"].forEach(i=>{s[i]===void 0?e[`${g}-${i}`]=_:e[`${g}-${i}`]=typeof s[i]=="number"?`${s[i]}px`:s[i]}):b(_)}),e}const xe=a.forwardRef(function(o,e){const{id:s,invert:C,position:u="bottom-right",hotkey:g=["altKey","KeyT"],expand:_,closeButton:b,className:i,offset:T,mobileOffset:t,theme:x="light",richColors:O,duration:E,style:pt,visibleToasts:U=le,toastOptions:d,dir:ot=It(),gap:X=fe,icons:st,containerAriaLabel:gt="Notifications"}=o,[z,Z]=a.useState([]),Y=a.useMemo(()=>s?z.filter(l=>l.toasterId===s):z.filter(l=>!l.toasterId),[z,s]),ht=a.useMemo(()=>Array.from(new Set([u].concat(Y.filter(l=>l.position).map(l=>l.position)))),[Y,u]),[nt,bt]=a.useState([]),[tt,A]=a.useState(!1),[rt,et]=a.useState(!1),[c,v]=a.useState(x!=="system"?x:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),j=a.useRef(null),$=g.join("+").replace(/Key/g,"").replace(/Digit/g,""),B=a.useRef(null),F=a.useRef(!1),it=a.useCallback(l=>{Z(p=>{var m;return(m=p.find(D=>D.id===l.id))!=null&&m.delete||S.dismiss(l.id),p.filter(({id:D})=>D!==l.id)})},[]);return a.useEffect(()=>S.subscribe(l=>{if(l.dismiss){requestAnimationFrame(()=>{Z(p=>p.map(m=>m.id===l.id?{...m,delete:!0}:m))});return}setTimeout(()=>{Ut.flushSync(()=>{Z(p=>{const m=p.findIndex(D=>D.id===l.id);return m!==-1?[...p.slice(0,m),{...p[m],...l},...p.slice(m+1)]:[l,...p]})})})}),[z]),a.useEffect(()=>{if(x!=="system"){v(x);return}if(x==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?v("dark"):v("light")),typeof window>"u")return;const l=window.matchMedia("(prefers-color-scheme: dark)");try{l.addEventListener("change",({matches:p})=>{v(p?"dark":"light")})}catch{l.addListener(({matches:m})=>{try{v(m?"dark":"light")}catch(D){console.error(D)}})}},[x]),a.useEffect(()=>{z.length<=1&&A(!1)},[z]),a.useEffect(()=>{const l=p=>{var m;if(g.every(f=>p[f]||p.code===f)){var W;A(!0),(W=j.current)==null||W.focus()}p.code==="Escape"&&(document.activeElement===j.current||(m=j.current)!=null&&m.contains(document.activeElement))&&A(!1)};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[g]),a.useEffect(()=>{if(j.current)return()=>{B.current&&(B.current.focus({preventScroll:!0}),B.current=null,F.current=!1)}},[j.current]),a.createElement("section",{ref:e,"aria-label":`${gt} ${$}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},ht.map((l,p)=>{var m;const[D,W]=l.split("-");return Y.length?a.createElement("ol",{key:l,dir:ot==="auto"?It():ot,tabIndex:-1,ref:j,className:i,"data-sonner-toaster":!0,"data-sonner-theme":c,"data-y-position":D,"data-x-position":W,style:{"--front-toast-height":`${((m=nt[0])==null?void 0:m.height)||0}px`,"--width":`${ue}px`,"--gap":`${X}px`,...pt,...be(T,t)},onBlur:f=>{F.current&&!f.currentTarget.contains(f.relatedTarget)&&(F.current=!1,B.current&&(B.current.focus({preventScroll:!0}),B.current=null))},onFocus:f=>{f.target instanceof HTMLElement&&f.target.dataset.dismissible==="false"||F.current||(F.current=!0,B.current=f.relatedTarget)},onMouseEnter:()=>A(!0),onMouseMove:()=>A(!0),onMouseLeave:()=>{rt||A(!1)},onDragEnd:()=>A(!1),onPointerDown:f=>{f.target instanceof HTMLElement&&f.target.dataset.dismissible==="false"||et(!0)},onPointerUp:()=>et(!1)},Y.filter(f=>!f.position&&p===0||f.position===l).map((f,K)=>{var lt,dt;return a.createElement(he,{key:f.id,icons:st,index:K,toast:f,defaultRichColors:O,duration:(lt=d?.duration)!=null?lt:E,className:d?.className,descriptionClassName:d?.descriptionClassName,invert:C,visibleToasts:U,closeButton:(dt=d?.closeButton)!=null?dt:b,interacting:rt,position:l,style:d?.style,unstyled:d?.unstyled,classNames:d?.classNames,cancelButtonStyle:d?.cancelButtonStyle,actionButtonStyle:d?.actionButtonStyle,closeButtonAriaLabel:d?.closeButtonAriaLabel,removeToast:it,toasts:Y.filter(q=>q.position==f.position),heights:nt.filter(q=>q.position==f.position),setHeights:bt,expandByDefault:_,gap:X,expanded:tt,swipeDirections:o.swipeDirections})})):null}))});export{xe as T,we as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as i,R as Hn,a as Wt,b as Sa,c as Ne}from"./react-vendor-DMek_JCF.js";var gn={exports:{}},nt={};var Co;function Ea(){if(Co)return nt;Co=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(o,r,s){var a=null;if(s!==void 0&&(a=""+s),r.key!==void 0&&(a=""+r.key),"key"in r){s={};for(var c in r)c!=="key"&&(s[c]=r[c])}else s=r;return r=s.ref,{$$typeof:e,type:o,key:a,ref:r!==void 0?r:null,props:s}}return nt.Fragment=t,nt.jsx=n,nt.jsxs=n,nt}var So;function Ra(){return So||(So=1,gn.exports=Ea()),gn.exports}var p=Ra();function Eo(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function we(...e){return t=>{let n=!1;const o=e.map(r=>{const s=Eo(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():Eo(e[r],null)}}}}function j(...e){return i.useCallback(we(...e),e)}var Pa=Symbol.for("react.lazy"),_t=Hn[" use ".trim().toString()];function Aa(e){return typeof e=="object"&&e!==null&&"then"in e}function Jo(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Pa&&"_payload"in e&&Aa(e._payload)}function Un(e){const t=Ta(e),n=i.forwardRef((o,r)=>{let{children:s,...a}=o;Jo(s)&&typeof _t=="function"&&(s=_t(s._payload));const c=i.Children.toArray(s),l=c.find(Ia);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}var vh=Un("Slot");function Ta(e){const t=i.forwardRef((n,o)=>{let{children:r,...s}=n;if(Jo(r)&&typeof _t=="function"&&(r=_t(r._payload)),i.isValidElement(r)){const a=Ma(r),c=Oa(s,r.props);return r.type!==i.Fragment&&(c.ref=o?we(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var _a=Symbol("radix.slottable");function Ia(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_a}function Oa(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Ma(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)}var Da=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Na=Da.reduce((e,t)=>{const n=Un(`Primitive.${t}`),o=i.forwardRef((r,s)=>{const{asChild:a,...c}=r,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...c,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),La="Separator",Ro="horizontal",ja=["horizontal","vertical"],Qo=i.forwardRef((e,t)=>{const{decorative:n,orientation:o=Ro,...r}=e,s=ka(o)?o:Ro,c=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return p.jsx(Na.div,{"data-orientation":s,...c,...r,ref:t})});Qo.displayName=La;function ka(e){return ja.includes(e)}var mh=Qo;function R(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function $a(e,t){const n=i.createContext(t),o=s=>{const{children:a,...c}=s,l=i.useMemo(()=>c,Object.values(c));return p.jsx(n.Provider,{value:l,children:a})};o.displayName=e+"Provider";function r(s){const a=i.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,r]}function Q(e,t=[]){let n=[];function o(s,a){const c=i.createContext(a),l=n.length;n=[...n,a];const u=f=>{const{scope:h,children:m,...w}=f,v=h?.[e]?.[l]||c,g=i.useMemo(()=>w,Object.values(w));return p.jsx(v.Provider,{value:g,children:m})};u.displayName=s+"Provider";function d(f,h){const m=h?.[e]?.[l]||c,w=i.useContext(m);if(w)return w;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const r=()=>{const s=n.map(a=>i.createContext(a));return function(c){const l=c?.[e]||s;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return r.scopeName=e,[o,Fa(r,...t)]}function Fa(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const a=o.reduce((c,{useScope:l,scopeName:u})=>{const f=l(s)[`__scope${u}`];return{...c,...f}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var z=globalThis?.document?i.useLayoutEffect:()=>{},Wa=Hn[" useId ".trim().toString()]||(()=>{}),Ba=0;function ne(e){const[t,n]=i.useState(Wa());return z(()=>{n(o=>o??String(Ba++))},[e]),t?`radix-${t}`:""}var Va=Hn[" useInsertionEffect ".trim().toString()]||z;function me({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,s,a]=Ha({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:r;{const d=i.useRef(e!==void 0);i.useEffect(()=>{const f=d.current;f!==c&&console.warn(`${o} is changing from ${f?"controlled":"uncontrolled"} to ${c?"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.`),d.current=c},[c,o])}const u=i.useCallback(d=>{if(c){const f=Ua(d)?d(e):d;f!==e&&a.current?.(f)}else s(d)},[c,e,s,a]);return[l,u]}function Ha({defaultProp:e,onChange:t}){const[n,o]=i.useState(e),r=i.useRef(n),s=i.useRef(t);return Va(()=>{s.current=t},[t]),i.useEffect(()=>{r.current!==n&&(s.current?.(n),r.current=n)},[n,r]),[n,o,s]}function Ua(e){return typeof e=="function"}function Ga(e){const t=Ka(e),n=i.forwardRef((o,r)=>{const{children:s,...a}=o,c=i.Children.toArray(s),l=c.find(Ya);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function Ka(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const a=qa(r),c=Xa(s,r.props);return r.type!==i.Fragment&&(c.ref=o?we(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var za=Symbol("radix.slottable");function Ya(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===za}function Xa(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function qa(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)}var Za=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],D=Za.reduce((e,t)=>{const n=Ga(`Primitive.${t}`),o=i.forwardRef((r,s)=>{const{asChild:a,...c}=r,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...c,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function er(e,t){e&&Wt.flushSync(()=>e.dispatchEvent(t))}function X(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>t.current?.(...n),[])}function Ja(e,t=globalThis?.document){const n=X(e);i.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var Qa="DismissableLayer",Tn="dismissableLayer.update",ec="dismissableLayer.pointerDownOutside",tc="dismissableLayer.focusOutside",Po,tr=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ze=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...l}=e,u=i.useContext(tr),[d,f]=i.useState(null),h=d?.ownerDocument??globalThis?.document,[,m]=i.useState({}),w=j(t,E=>f(E)),v=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf(g),x=d?v.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,C=x>=y,S=rc(E=>{const _=E.target,I=[...u.branches].some(O=>O.contains(_));!C||I||(r?.(E),a?.(E),E.defaultPrevented||c?.())},h),A=sc(E=>{const _=E.target;[...u.branches].some(O=>O.contains(_))||(s?.(E),a?.(E),E.defaultPrevented||c?.())},h);return Ja(E=>{x===u.layers.size-1&&(o?.(E),!E.defaultPrevented&&c&&(E.preventDefault(),c()))},h),i.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Po=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Ao(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Po)}},[d,h,n,u]),i.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Ao())},[d,u]),i.useEffect(()=>{const E=()=>m({});return document.addEventListener(Tn,E),()=>document.removeEventListener(Tn,E)},[]),p.jsx(D.div,{...l,ref:w,style:{pointerEvents:b?C?"auto":"none":void 0,...e.style},onFocusCapture:R(e.onFocusCapture,A.onFocusCapture),onBlurCapture:R(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:R(e.onPointerDownCapture,S.onPointerDownCapture)})});Ze.displayName=Qa;var nc="DismissableLayerBranch",oc=i.forwardRef((e,t)=>{const n=i.useContext(tr),o=i.useRef(null),r=j(t,o);return i.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(D.div,{...e,ref:r})});oc.displayName=nc;function rc(e,t=globalThis?.document){const n=X(e),o=i.useRef(!1),r=i.useRef(()=>{});return i.useEffect(()=>{const s=c=>{if(c.target&&!o.current){let l=function(){nr(ec,n,u,{discrete:!0})};const u={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=l,t.addEventListener("click",r.current,{once:!0})):l()}else t.removeEventListener("click",r.current);o.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function sc(e,t=globalThis?.document){const n=X(e),o=i.useRef(!1);return i.useEffect(()=>{const r=s=>{s.target&&!o.current&&nr(tc,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Ao(){const e=new CustomEvent(Tn);document.dispatchEvent(e)}function nr(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?er(r,s):r.dispatchEvent(s)}var wn="focusScope.autoFocusOnMount",yn="focusScope.autoFocusOnUnmount",To={bubbles:!1,cancelable:!0},ic="FocusScope",ut=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...a}=e,[c,l]=i.useState(null),u=X(r),d=X(s),f=i.useRef(null),h=j(t,v=>l(v)),m=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(o){let v=function(b){if(m.paused||!c)return;const C=b.target;c.contains(C)?f.current=C:Pe(f.current,{select:!0})},g=function(b){if(m.paused||!c)return;const C=b.relatedTarget;C!==null&&(c.contains(C)||Pe(f.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const S of b)S.removedNodes.length>0&&Pe(c)};document.addEventListener("focusin",v),document.addEventListener("focusout",g);const x=new MutationObserver(y);return c&&x.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",g),x.disconnect()}}},[o,c,m.paused]),i.useEffect(()=>{if(c){Io.add(m);const v=document.activeElement;if(!c.contains(v)){const y=new CustomEvent(wn,To);c.addEventListener(wn,u),c.dispatchEvent(y),y.defaultPrevented||(ac(fc(or(c)),{select:!0}),document.activeElement===v&&Pe(c))}return()=>{c.removeEventListener(wn,u),setTimeout(()=>{const y=new CustomEvent(yn,To);c.addEventListener(yn,d),c.dispatchEvent(y),y.defaultPrevented||Pe(v??document.body,{select:!0}),c.removeEventListener(yn,d),Io.remove(m)},0)}}},[c,u,d,m]);const w=i.useCallback(v=>{if(!n&&!o||m.paused)return;const g=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,y=document.activeElement;if(g&&y){const x=v.currentTarget,[b,C]=cc(x);b&&C?!v.shiftKey&&y===C?(v.preventDefault(),n&&Pe(b,{select:!0})):v.shiftKey&&y===b&&(v.preventDefault(),n&&Pe(C,{select:!0})):y===x&&v.preventDefault()}},[n,o,m.paused]);return p.jsx(D.div,{tabIndex:-1,...a,ref:h,onKeyDown:w})});ut.displayName=ic;function ac(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(Pe(o,{select:t}),document.activeElement!==n)return}function cc(e){const t=or(e),n=_o(t,e),o=_o(t.reverse(),e);return[n,o]}function or(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function _o(e,t){for(const n of e)if(!lc(n,{upTo:t}))return n}function lc(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}function uc(e){return e instanceof HTMLInputElement&&"select"in e}function Pe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&uc(e)&&t&&e.select()}}var Io=dc();function dc(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Oo(e,t),e.unshift(t)},remove(t){e=Oo(e,t),e[0]?.resume()}}}function Oo(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function fc(e){return e.filter(t=>t.tagName!=="A")}var pc="Portal",Je=i.forwardRef((e,t)=>{const{container:n,...o}=e,[r,s]=i.useState(!1);z(()=>s(!0),[]);const a=n||r&&globalThis?.document?.body;return a?Sa.createPortal(p.jsx(D.div,{...o,ref:t}),a):null});Je.displayName=pc;function hc(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var Y=e=>{const{present:t,children:n}=e,o=vc(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),s=j(o.ref,mc(r));return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:s}):null};Y.displayName="Presence";function vc(e){const[t,n]=i.useState(),o=i.useRef(null),r=i.useRef(e),s=i.useRef("none"),a=e?"mounted":"unmounted",[c,l]=hc(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const u=xt(o.current);s.current=c==="mounted"?u:"none"},[c]),z(()=>{const u=o.current,d=r.current;if(d!==e){const h=s.current,m=xt(u);e?l("MOUNT"):m==="none"||u?.display==="none"?l("UNMOUNT"):l(d&&h!==m?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),z(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=m=>{const v=xt(o.current).includes(CSS.escape(m.animationName));if(m.target===t&&v&&(l("ANIMATION_END"),!r.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},h=m=>{m.target===t&&(s.current=xt(o.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:i.useCallback(u=>{o.current=u?getComputedStyle(u):null,n(u)},[])}}function xt(e){return e?.animationName||"none"}function mc(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)}var xn=0;function Bt(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Mo()),document.body.insertAdjacentElement("beforeend",e[1]??Mo()),xn++,()=>{xn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),xn--}},[])}function Mo(){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}var pe=function(){return pe=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},pe.apply(this,arguments)};function rr(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function gc(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,s;o<r;o++)(s||!(o in t))&&(s||(s=Array.prototype.slice.call(t,0,o)),s[o]=t[o]);return e.concat(s||Array.prototype.slice.call(t))}var Pt="right-scroll-bar-position",At="width-before-scroll-bar",wc="with-scroll-bars-hidden",yc="--removed-body-scroll-bar-size";function bn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function xc(e,t){var n=i.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var bc=typeof window<"u"?i.useLayoutEffect:i.useEffect,Do=new WeakMap;function Cc(e,t){var n=xc(null,function(o){return e.forEach(function(r){return bn(r,o)})});return bc(function(){var o=Do.get(n);if(o){var r=new Set(o),s=new Set(e),a=n.current;r.forEach(function(c){s.has(c)||bn(c,null)}),s.forEach(function(c){r.has(c)||bn(c,a)})}Do.set(n,e)},[e]),n}function Sc(e){return e}function Ec(e,t){t===void 0&&(t=Sc);var n=[],o=!1,r={read:function(){if(o)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},useMedium:function(s){var a=t(s,o);return n.push(a),function(){n=n.filter(function(c){return c!==a})}},assignSyncMedium:function(s){for(o=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(c){return s(c)},filter:function(){return n}}},assignMedium:function(s){o=!0;var a=[];if(n.length){var c=n;n=[],c.forEach(s),a=n}var l=function(){var d=a;a=[],d.forEach(s)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),n}}}};return r}function Rc(e){e===void 0&&(e={});var t=Ec(null);return t.options=pe({async:!0,ssr:!1},e),t}var sr=function(e){var t=e.sideCar,n=rr(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return i.createElement(o,pe({},n))};sr.isSideCarExport=!0;function Pc(e,t){return e.useMedium(t),sr}var ir=Rc(),Cn=function(){},Vt=i.forwardRef(function(e,t){var n=i.useRef(null),o=i.useState({onScrollCapture:Cn,onWheelCapture:Cn,onTouchMoveCapture:Cn}),r=o[0],s=o[1],a=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,m=e.noRelative,w=e.noIsolation,v=e.inert,g=e.allowPinchZoom,y=e.as,x=y===void 0?"div":y,b=e.gapMode,C=rr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=h,A=Cc([n,t]),E=pe(pe({},C),r);return i.createElement(i.Fragment,null,d&&i.createElement(S,{sideCar:ir,removeScrollBar:u,shards:f,noRelative:m,noIsolation:w,inert:v,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:b}),a?i.cloneElement(i.Children.only(c),pe(pe({},E),{ref:A})):i.createElement(x,pe({},E,{className:l,ref:A}),c))});Vt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Vt.classNames={fullWidth:At,zeroRight:Pt};var Ac=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Tc(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Ac();return t&&e.setAttribute("nonce",t),e}function _c(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ic(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Oc=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Tc())&&(_c(t,n),Ic(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Mc=function(){var e=Oc();return function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ar=function(){var e=Mc(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},Dc={left:0,top:0,right:0,gap:0},Sn=function(e){return parseInt(e||"",10)||0},Nc=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[Sn(n),Sn(o),Sn(r)]},Lc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Dc;var t=Nc(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},jc=ar(),Ue="data-scroll-locked",kc=function(e,t,n,o){var r=e.left,s=e.top,a=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
1
|
+
import{r as i,R as Hn,a as Wt,b as Sa,c as Ne}from"./react-vendor-FspHSO0w.js";var gn={exports:{}},nt={};var Co;function Ea(){if(Co)return nt;Co=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(o,r,s){var a=null;if(s!==void 0&&(a=""+s),r.key!==void 0&&(a=""+r.key),"key"in r){s={};for(var c in r)c!=="key"&&(s[c]=r[c])}else s=r;return r=s.ref,{$$typeof:e,type:o,key:a,ref:r!==void 0?r:null,props:s}}return nt.Fragment=t,nt.jsx=n,nt.jsxs=n,nt}var So;function Ra(){return So||(So=1,gn.exports=Ea()),gn.exports}var p=Ra();function Eo(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function we(...e){return t=>{let n=!1;const o=e.map(r=>{const s=Eo(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():Eo(e[r],null)}}}}function j(...e){return i.useCallback(we(...e),e)}var Pa=Symbol.for("react.lazy"),_t=Hn[" use ".trim().toString()];function Aa(e){return typeof e=="object"&&e!==null&&"then"in e}function Jo(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Pa&&"_payload"in e&&Aa(e._payload)}function Un(e){const t=Ta(e),n=i.forwardRef((o,r)=>{let{children:s,...a}=o;Jo(s)&&typeof _t=="function"&&(s=_t(s._payload));const c=i.Children.toArray(s),l=c.find(Ia);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}var vh=Un("Slot");function Ta(e){const t=i.forwardRef((n,o)=>{let{children:r,...s}=n;if(Jo(r)&&typeof _t=="function"&&(r=_t(r._payload)),i.isValidElement(r)){const a=Ma(r),c=Oa(s,r.props);return r.type!==i.Fragment&&(c.ref=o?we(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var _a=Symbol("radix.slottable");function Ia(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_a}function Oa(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Ma(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)}var Da=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Na=Da.reduce((e,t)=>{const n=Un(`Primitive.${t}`),o=i.forwardRef((r,s)=>{const{asChild:a,...c}=r,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...c,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),La="Separator",Ro="horizontal",ja=["horizontal","vertical"],Qo=i.forwardRef((e,t)=>{const{decorative:n,orientation:o=Ro,...r}=e,s=ka(o)?o:Ro,c=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return p.jsx(Na.div,{"data-orientation":s,...c,...r,ref:t})});Qo.displayName=La;function ka(e){return ja.includes(e)}var mh=Qo;function R(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function $a(e,t){const n=i.createContext(t),o=s=>{const{children:a,...c}=s,l=i.useMemo(()=>c,Object.values(c));return p.jsx(n.Provider,{value:l,children:a})};o.displayName=e+"Provider";function r(s){const a=i.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,r]}function Q(e,t=[]){let n=[];function o(s,a){const c=i.createContext(a),l=n.length;n=[...n,a];const u=f=>{const{scope:h,children:m,...w}=f,v=h?.[e]?.[l]||c,g=i.useMemo(()=>w,Object.values(w));return p.jsx(v.Provider,{value:g,children:m})};u.displayName=s+"Provider";function d(f,h){const m=h?.[e]?.[l]||c,w=i.useContext(m);if(w)return w;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const r=()=>{const s=n.map(a=>i.createContext(a));return function(c){const l=c?.[e]||s;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return r.scopeName=e,[o,Fa(r,...t)]}function Fa(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const a=o.reduce((c,{useScope:l,scopeName:u})=>{const f=l(s)[`__scope${u}`];return{...c,...f}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var z=globalThis?.document?i.useLayoutEffect:()=>{},Wa=Hn[" useId ".trim().toString()]||(()=>{}),Ba=0;function ne(e){const[t,n]=i.useState(Wa());return z(()=>{n(o=>o??String(Ba++))},[e]),t?`radix-${t}`:""}var Va=Hn[" useInsertionEffect ".trim().toString()]||z;function me({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,s,a]=Ha({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:r;{const d=i.useRef(e!==void 0);i.useEffect(()=>{const f=d.current;f!==c&&console.warn(`${o} is changing from ${f?"controlled":"uncontrolled"} to ${c?"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.`),d.current=c},[c,o])}const u=i.useCallback(d=>{if(c){const f=Ua(d)?d(e):d;f!==e&&a.current?.(f)}else s(d)},[c,e,s,a]);return[l,u]}function Ha({defaultProp:e,onChange:t}){const[n,o]=i.useState(e),r=i.useRef(n),s=i.useRef(t);return Va(()=>{s.current=t},[t]),i.useEffect(()=>{r.current!==n&&(s.current?.(n),r.current=n)},[n,r]),[n,o,s]}function Ua(e){return typeof e=="function"}function Ga(e){const t=Ka(e),n=i.forwardRef((o,r)=>{const{children:s,...a}=o,c=i.Children.toArray(s),l=c.find(Ya);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function Ka(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const a=qa(r),c=Xa(s,r.props);return r.type!==i.Fragment&&(c.ref=o?we(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var za=Symbol("radix.slottable");function Ya(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===za}function Xa(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function qa(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)}var Za=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],D=Za.reduce((e,t)=>{const n=Ga(`Primitive.${t}`),o=i.forwardRef((r,s)=>{const{asChild:a,...c}=r,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...c,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function er(e,t){e&&Wt.flushSync(()=>e.dispatchEvent(t))}function X(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>t.current?.(...n),[])}function Ja(e,t=globalThis?.document){const n=X(e);i.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var Qa="DismissableLayer",Tn="dismissableLayer.update",ec="dismissableLayer.pointerDownOutside",tc="dismissableLayer.focusOutside",Po,tr=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ze=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...l}=e,u=i.useContext(tr),[d,f]=i.useState(null),h=d?.ownerDocument??globalThis?.document,[,m]=i.useState({}),w=j(t,E=>f(E)),v=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf(g),x=d?v.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,C=x>=y,S=rc(E=>{const _=E.target,I=[...u.branches].some(O=>O.contains(_));!C||I||(r?.(E),a?.(E),E.defaultPrevented||c?.())},h),A=sc(E=>{const _=E.target;[...u.branches].some(O=>O.contains(_))||(s?.(E),a?.(E),E.defaultPrevented||c?.())},h);return Ja(E=>{x===u.layers.size-1&&(o?.(E),!E.defaultPrevented&&c&&(E.preventDefault(),c()))},h),i.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Po=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Ao(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Po)}},[d,h,n,u]),i.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Ao())},[d,u]),i.useEffect(()=>{const E=()=>m({});return document.addEventListener(Tn,E),()=>document.removeEventListener(Tn,E)},[]),p.jsx(D.div,{...l,ref:w,style:{pointerEvents:b?C?"auto":"none":void 0,...e.style},onFocusCapture:R(e.onFocusCapture,A.onFocusCapture),onBlurCapture:R(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:R(e.onPointerDownCapture,S.onPointerDownCapture)})});Ze.displayName=Qa;var nc="DismissableLayerBranch",oc=i.forwardRef((e,t)=>{const n=i.useContext(tr),o=i.useRef(null),r=j(t,o);return i.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(D.div,{...e,ref:r})});oc.displayName=nc;function rc(e,t=globalThis?.document){const n=X(e),o=i.useRef(!1),r=i.useRef(()=>{});return i.useEffect(()=>{const s=c=>{if(c.target&&!o.current){let l=function(){nr(ec,n,u,{discrete:!0})};const u={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=l,t.addEventListener("click",r.current,{once:!0})):l()}else t.removeEventListener("click",r.current);o.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function sc(e,t=globalThis?.document){const n=X(e),o=i.useRef(!1);return i.useEffect(()=>{const r=s=>{s.target&&!o.current&&nr(tc,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Ao(){const e=new CustomEvent(Tn);document.dispatchEvent(e)}function nr(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?er(r,s):r.dispatchEvent(s)}var wn="focusScope.autoFocusOnMount",yn="focusScope.autoFocusOnUnmount",To={bubbles:!1,cancelable:!0},ic="FocusScope",ut=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...a}=e,[c,l]=i.useState(null),u=X(r),d=X(s),f=i.useRef(null),h=j(t,v=>l(v)),m=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(o){let v=function(b){if(m.paused||!c)return;const C=b.target;c.contains(C)?f.current=C:Pe(f.current,{select:!0})},g=function(b){if(m.paused||!c)return;const C=b.relatedTarget;C!==null&&(c.contains(C)||Pe(f.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const S of b)S.removedNodes.length>0&&Pe(c)};document.addEventListener("focusin",v),document.addEventListener("focusout",g);const x=new MutationObserver(y);return c&&x.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",g),x.disconnect()}}},[o,c,m.paused]),i.useEffect(()=>{if(c){Io.add(m);const v=document.activeElement;if(!c.contains(v)){const y=new CustomEvent(wn,To);c.addEventListener(wn,u),c.dispatchEvent(y),y.defaultPrevented||(ac(fc(or(c)),{select:!0}),document.activeElement===v&&Pe(c))}return()=>{c.removeEventListener(wn,u),setTimeout(()=>{const y=new CustomEvent(yn,To);c.addEventListener(yn,d),c.dispatchEvent(y),y.defaultPrevented||Pe(v??document.body,{select:!0}),c.removeEventListener(yn,d),Io.remove(m)},0)}}},[c,u,d,m]);const w=i.useCallback(v=>{if(!n&&!o||m.paused)return;const g=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,y=document.activeElement;if(g&&y){const x=v.currentTarget,[b,C]=cc(x);b&&C?!v.shiftKey&&y===C?(v.preventDefault(),n&&Pe(b,{select:!0})):v.shiftKey&&y===b&&(v.preventDefault(),n&&Pe(C,{select:!0})):y===x&&v.preventDefault()}},[n,o,m.paused]);return p.jsx(D.div,{tabIndex:-1,...a,ref:h,onKeyDown:w})});ut.displayName=ic;function ac(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(Pe(o,{select:t}),document.activeElement!==n)return}function cc(e){const t=or(e),n=_o(t,e),o=_o(t.reverse(),e);return[n,o]}function or(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function _o(e,t){for(const n of e)if(!lc(n,{upTo:t}))return n}function lc(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}function uc(e){return e instanceof HTMLInputElement&&"select"in e}function Pe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&uc(e)&&t&&e.select()}}var Io=dc();function dc(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Oo(e,t),e.unshift(t)},remove(t){e=Oo(e,t),e[0]?.resume()}}}function Oo(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function fc(e){return e.filter(t=>t.tagName!=="A")}var pc="Portal",Je=i.forwardRef((e,t)=>{const{container:n,...o}=e,[r,s]=i.useState(!1);z(()=>s(!0),[]);const a=n||r&&globalThis?.document?.body;return a?Sa.createPortal(p.jsx(D.div,{...o,ref:t}),a):null});Je.displayName=pc;function hc(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var Y=e=>{const{present:t,children:n}=e,o=vc(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),s=j(o.ref,mc(r));return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:s}):null};Y.displayName="Presence";function vc(e){const[t,n]=i.useState(),o=i.useRef(null),r=i.useRef(e),s=i.useRef("none"),a=e?"mounted":"unmounted",[c,l]=hc(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const u=xt(o.current);s.current=c==="mounted"?u:"none"},[c]),z(()=>{const u=o.current,d=r.current;if(d!==e){const h=s.current,m=xt(u);e?l("MOUNT"):m==="none"||u?.display==="none"?l("UNMOUNT"):l(d&&h!==m?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),z(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=m=>{const v=xt(o.current).includes(CSS.escape(m.animationName));if(m.target===t&&v&&(l("ANIMATION_END"),!r.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},h=m=>{m.target===t&&(s.current=xt(o.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:i.useCallback(u=>{o.current=u?getComputedStyle(u):null,n(u)},[])}}function xt(e){return e?.animationName||"none"}function mc(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)}var xn=0;function Bt(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Mo()),document.body.insertAdjacentElement("beforeend",e[1]??Mo()),xn++,()=>{xn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),xn--}},[])}function Mo(){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}var pe=function(){return pe=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},pe.apply(this,arguments)};function rr(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function gc(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,s;o<r;o++)(s||!(o in t))&&(s||(s=Array.prototype.slice.call(t,0,o)),s[o]=t[o]);return e.concat(s||Array.prototype.slice.call(t))}var Pt="right-scroll-bar-position",At="width-before-scroll-bar",wc="with-scroll-bars-hidden",yc="--removed-body-scroll-bar-size";function bn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function xc(e,t){var n=i.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var bc=typeof window<"u"?i.useLayoutEffect:i.useEffect,Do=new WeakMap;function Cc(e,t){var n=xc(null,function(o){return e.forEach(function(r){return bn(r,o)})});return bc(function(){var o=Do.get(n);if(o){var r=new Set(o),s=new Set(e),a=n.current;r.forEach(function(c){s.has(c)||bn(c,null)}),s.forEach(function(c){r.has(c)||bn(c,a)})}Do.set(n,e)},[e]),n}function Sc(e){return e}function Ec(e,t){t===void 0&&(t=Sc);var n=[],o=!1,r={read:function(){if(o)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},useMedium:function(s){var a=t(s,o);return n.push(a),function(){n=n.filter(function(c){return c!==a})}},assignSyncMedium:function(s){for(o=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(c){return s(c)},filter:function(){return n}}},assignMedium:function(s){o=!0;var a=[];if(n.length){var c=n;n=[],c.forEach(s),a=n}var l=function(){var d=a;a=[],d.forEach(s)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),n}}}};return r}function Rc(e){e===void 0&&(e={});var t=Ec(null);return t.options=pe({async:!0,ssr:!1},e),t}var sr=function(e){var t=e.sideCar,n=rr(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return i.createElement(o,pe({},n))};sr.isSideCarExport=!0;function Pc(e,t){return e.useMedium(t),sr}var ir=Rc(),Cn=function(){},Vt=i.forwardRef(function(e,t){var n=i.useRef(null),o=i.useState({onScrollCapture:Cn,onWheelCapture:Cn,onTouchMoveCapture:Cn}),r=o[0],s=o[1],a=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,m=e.noRelative,w=e.noIsolation,v=e.inert,g=e.allowPinchZoom,y=e.as,x=y===void 0?"div":y,b=e.gapMode,C=rr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=h,A=Cc([n,t]),E=pe(pe({},C),r);return i.createElement(i.Fragment,null,d&&i.createElement(S,{sideCar:ir,removeScrollBar:u,shards:f,noRelative:m,noIsolation:w,inert:v,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:b}),a?i.cloneElement(i.Children.only(c),pe(pe({},E),{ref:A})):i.createElement(x,pe({},E,{className:l,ref:A}),c))});Vt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Vt.classNames={fullWidth:At,zeroRight:Pt};var Ac=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Tc(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Ac();return t&&e.setAttribute("nonce",t),e}function _c(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ic(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Oc=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Tc())&&(_c(t,n),Ic(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Mc=function(){var e=Oc();return function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ar=function(){var e=Mc(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},Dc={left:0,top:0,right:0,gap:0},Sn=function(e){return parseInt(e||"",10)||0},Nc=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[Sn(n),Sn(o),Sn(r)]},Lc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Dc;var t=Nc(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},jc=ar(),Ue="data-scroll-locked",kc=function(e,t,n,o){var r=e.left,s=e.top,a=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
2
2
|
.`.concat(wc,` {
|
|
3
3
|
overflow: hidden `).concat(o,`;
|
|
4
4
|
padding-right: `).concat(c,"px ").concat(o,`;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
function at(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const u=Object.getOwnPropertyDescriptor(n,i);u&&Object.defineProperty(e,i,u.get?u:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Mr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ne(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ce={exports:{}},R={};var Se;function ot(){if(Se)return R;Se=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),s=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),a=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),m=Symbol.iterator;function v(o){return o===null||typeof o!="object"?null:(o=m&&o[m]||o["@@iterator"],typeof o=="function"?o:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,y={};function g(o,p,_){this.props=o,this.context=p,this.refs=y,this.updater=_||w}g.prototype.isReactComponent={},g.prototype.setState=function(o,p){if(typeof o!="object"&&typeof o!="function"&&o!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,o,p,"setState")},g.prototype.forceUpdate=function(o){this.updater.enqueueForceUpdate(this,o,"forceUpdate")};function E(){}E.prototype=g.prototype;function P(o,p,_){this.props=o,this.context=p,this.refs=y,this.updater=_||w}var $=P.prototype=new E;$.constructor=P,S($,g.prototype),$.isPureReactComponent=!0;var A=Array.isArray;function H(){}var x={H:null,A:null,T:null,S:null},q=Object.prototype.hasOwnProperty;function U(o,p,_){var C=_.ref;return{$$typeof:e,type:o,key:p,ref:C!==void 0?C:null,props:_}}function M(o,p){return U(o.type,p,o.props)}function Y(o){return typeof o=="object"&&o!==null&&o.$$typeof===e}function te(o){var p={"=":"=0",":":"=2"};return"$"+o.replace(/[=:]/g,function(_){return p[_]})}var Ce=/\/+/g;function se(o,p){return typeof o=="object"&&o!==null&&o.key!=null?te(""+o.key):p.toString(36)}function et(o){switch(o.status){case"fulfilled":return o.value;case"rejected":throw o.reason;default:switch(typeof o.status=="string"?o.then(H,H):(o.status="pending",o.then(function(p){o.status==="pending"&&(o.status="fulfilled",o.value=p)},function(p){o.status==="pending"&&(o.status="rejected",o.reason=p)})),o.status){case"fulfilled":return o.value;case"rejected":throw o.reason}}throw o}function K(o,p,_,C,b){var T=typeof o;(T==="undefined"||T==="boolean")&&(o=null);var L=!1;if(o===null)L=!0;else switch(T){case"bigint":case"string":case"number":L=!0;break;case"object":switch(o.$$typeof){case e:case t:L=!0;break;case d:return L=o._init,K(L(o._payload),p,_,C,b)}}if(L)return b=b(o),L=C===""?"."+se(o,0):C,A(b)?(_="",L!=null&&(_=L.replace(Ce,"$&/")+"/"),K(b,p,_,"",function(nt){return nt})):b!=null&&(Y(b)&&(b=M(b,_+(b.key==null||o&&o.key===b.key?"":(""+b.key).replace(Ce,"$&/")+"/")+L)),p.push(b)),1;L=0;var F=C===""?".":C+":";if(A(o))for(var N=0;N<o.length;N++)C=o[N],T=F+se(C,N),L+=K(C,p,_,T,b);else if(N=v(o),typeof N=="function")for(o=N.call(o),N=0;!(C=o.next()).done;)C=C.value,T=F+se(C,N++),L+=K(C,p,_,T,b);else if(T==="object"){if(typeof o.then=="function")return K(et(o),p,_,C,b);throw p=String(o),Error("Objects are not valid as a React child (found: "+(p==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":p)+"). If you meant to render a collection of children, use an array instead.")}return L}function re(o,p,_){if(o==null)return o;var C=[],b=0;return K(o,C,"","",function(T){return p.call(_,T,b++)}),C}function tt(o){if(o._status===-1){var p=o._result;p=p(),p.then(function(_){(o._status===0||o._status===-1)&&(o._status=1,o._result=_)},function(_){(o._status===0||o._status===-1)&&(o._status=2,o._result=_)}),o._status===-1&&(o._status=0,o._result=p)}if(o._status===1)return o._result.default;throw o._result}var _e=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var p=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(p))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)},rt={map:re,forEach:function(o,p,_){re(o,function(){p.apply(this,arguments)},_)},count:function(o){var p=0;return re(o,function(){p++}),p},toArray:function(o){return re(o,function(p){return p})||[]},only:function(o){if(!Y(o))throw Error("React.Children.only expected to receive a single React element child.");return o}};return R.Activity=h,R.Children=rt,R.Component=g,R.Fragment=r,R.Profiler=i,R.PureComponent=P,R.StrictMode=n,R.Suspense=l,R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=x,R.__COMPILER_RUNTIME={__proto__:null,c:function(o){return x.H.useMemoCache(o)}},R.cache=function(o){return function(){return o.apply(null,arguments)}},R.cacheSignal=function(){return null},R.cloneElement=function(o,p,_){if(o==null)throw Error("The argument must be a React element, but you passed "+o+".");var C=S({},o.props),b=o.key;if(p!=null)for(T in p.key!==void 0&&(b=""+p.key),p)!q.call(p,T)||T==="key"||T==="__self"||T==="__source"||T==="ref"&&p.ref===void 0||(C[T]=p[T]);var T=arguments.length-2;if(T===1)C.children=_;else if(1<T){for(var L=Array(T),F=0;F<T;F++)L[F]=arguments[F+2];C.children=L}return U(o.type,b,C)},R.createContext=function(o){return o={$$typeof:s,_currentValue:o,_currentValue2:o,_threadCount:0,Provider:null,Consumer:null},o.Provider=o,o.Consumer={$$typeof:u,_context:o},o},R.createElement=function(o,p,_){var C,b={},T=null;if(p!=null)for(C in p.key!==void 0&&(T=""+p.key),p)q.call(p,C)&&C!=="key"&&C!=="__self"&&C!=="__source"&&(b[C]=p[C]);var L=arguments.length-2;if(L===1)b.children=_;else if(1<L){for(var F=Array(L),N=0;N<L;N++)F[N]=arguments[N+2];b.children=F}if(o&&o.defaultProps)for(C in L=o.defaultProps,L)b[C]===void 0&&(b[C]=L[C]);return U(o,T,b)},R.createRef=function(){return{current:null}},R.forwardRef=function(o){return{$$typeof:f,render:o}},R.isValidElement=Y,R.lazy=function(o){return{$$typeof:d,_payload:{_status:-1,_result:o},_init:tt}},R.memo=function(o,p){return{$$typeof:a,type:o,compare:p===void 0?null:p}},R.startTransition=function(o){var p=x.T,_={};x.T=_;try{var C=o(),b=x.S;b!==null&&b(_,C),typeof C=="object"&&C!==null&&typeof C.then=="function"&&C.then(H,_e)}catch(T){_e(T)}finally{p!==null&&_.types!==null&&(p.types=_.types),x.T=p}},R.unstable_useCacheRefresh=function(){return x.H.useCacheRefresh()},R.use=function(o){return x.H.use(o)},R.useActionState=function(o,p,_){return x.H.useActionState(o,p,_)},R.useCallback=function(o,p){return x.H.useCallback(o,p)},R.useContext=function(o){return x.H.useContext(o)},R.useDebugValue=function(){},R.useDeferredValue=function(o,p){return x.H.useDeferredValue(o,p)},R.useEffect=function(o,p){return x.H.useEffect(o,p)},R.useEffectEvent=function(o){return x.H.useEffectEvent(o)},R.useId=function(){return x.H.useId()},R.useImperativeHandle=function(o,p,_){return x.H.useImperativeHandle(o,p,_)},R.useInsertionEffect=function(o,p){return x.H.useInsertionEffect(o,p)},R.useLayoutEffect=function(o,p){return x.H.useLayoutEffect(o,p)},R.useMemo=function(o,p){return x.H.useMemo(o,p)},R.useOptimistic=function(o,p){return x.H.useOptimistic(o,p)},R.useReducer=function(o,p,_){return x.H.useReducer(o,p,_)},R.useRef=function(o){return x.H.useRef(o)},R.useState=function(o){return x.H.useState(o)},R.useSyncExternalStore=function(o,p,_){return x.H.useSyncExternalStore(o,p,_)},R.useTransition=function(){return x.H.useTransition()},R.version="19.2.1",R}var Pe;function De(){return Pe||(Pe=1,ce.exports=ot()),ce.exports}var c=De();const it=Ne(c),Ir=at({__proto__:null,default:it},[c]);var fe={exports:{}},k={};var xe;function ut(){if(xe)return k;xe=1;var e=De();function t(l){var a="https://react.dev/errors/"+l;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)a+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+l+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var n={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},i=Symbol.for("react.portal");function u(l,a,d){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:h==null?null:""+h,children:l,containerInfo:a,implementation:d}}var s=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(l,a){if(l==="font")return"";if(typeof a=="string")return a==="use-credentials"?a:""}return k.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,k.createPortal=function(l,a){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)throw Error(t(299));return u(l,a,null,d)},k.flushSync=function(l){var a=s.T,d=n.p;try{if(s.T=null,n.p=2,l)return l()}finally{s.T=a,n.p=d,n.d.f()}},k.preconnect=function(l,a){typeof l=="string"&&(a?(a=a.crossOrigin,a=typeof a=="string"?a==="use-credentials"?a:"":void 0):a=null,n.d.C(l,a))},k.prefetchDNS=function(l){typeof l=="string"&&n.d.D(l)},k.preinit=function(l,a){if(typeof l=="string"&&a&&typeof a.as=="string"){var d=a.as,h=f(d,a.crossOrigin),m=typeof a.integrity=="string"?a.integrity:void 0,v=typeof a.fetchPriority=="string"?a.fetchPriority:void 0;d==="style"?n.d.S(l,typeof a.precedence=="string"?a.precedence:void 0,{crossOrigin:h,integrity:m,fetchPriority:v}):d==="script"&&n.d.X(l,{crossOrigin:h,integrity:m,fetchPriority:v,nonce:typeof a.nonce=="string"?a.nonce:void 0})}},k.preinitModule=function(l,a){if(typeof l=="string")if(typeof a=="object"&&a!==null){if(a.as==null||a.as==="script"){var d=f(a.as,a.crossOrigin);n.d.M(l,{crossOrigin:d,integrity:typeof a.integrity=="string"?a.integrity:void 0,nonce:typeof a.nonce=="string"?a.nonce:void 0})}}else a==null&&n.d.M(l)},k.preload=function(l,a){if(typeof l=="string"&&typeof a=="object"&&a!==null&&typeof a.as=="string"){var d=a.as,h=f(d,a.crossOrigin);n.d.L(l,d,{crossOrigin:h,integrity:typeof a.integrity=="string"?a.integrity:void 0,nonce:typeof a.nonce=="string"?a.nonce:void 0,type:typeof a.type=="string"?a.type:void 0,fetchPriority:typeof a.fetchPriority=="string"?a.fetchPriority:void 0,referrerPolicy:typeof a.referrerPolicy=="string"?a.referrerPolicy:void 0,imageSrcSet:typeof a.imageSrcSet=="string"?a.imageSrcSet:void 0,imageSizes:typeof a.imageSizes=="string"?a.imageSizes:void 0,media:typeof a.media=="string"?a.media:void 0})}},k.preloadModule=function(l,a){if(typeof l=="string")if(a){var d=f(a.as,a.crossOrigin);n.d.m(l,{as:typeof a.as=="string"&&a.as!=="script"?a.as:void 0,crossOrigin:d,integrity:typeof a.integrity=="string"?a.integrity:void 0})}else n.d.m(l)},k.requestFormReset=function(l){n.d.r(l)},k.unstable_batchedUpdates=function(l,a){return l(a)},k.useFormState=function(l,a,d){return s.H.useFormState(l,a,d)},k.useFormStatus=function(){return s.H.useHostTransitionStatus()},k.version="19.2.1",k}var be;function lt(){if(be)return fe.exports;be=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),fe.exports=ut(),fe.exports}var Te="popstate";function st(e={}){function t(n,i){let{pathname:u,search:s,hash:f}=n.location;return pe("",{pathname:u,search:s,hash:f},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:X(i)}return ft(t,r,null,e)}function O(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function D(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function ct(){return Math.random().toString(36).substring(2,10)}function Le(e,t){return{usr:e.state,key:e.key,idx:t}}function pe(e,t,r=null,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?V(t):t,state:r,key:t&&t.key||n||ct()}}function X({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function V(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function ft(e,t,r,n={}){let{window:i=document.defaultView,v5Compat:u=!1}=n,s=i.history,f="POP",l=null,a=d();a==null&&(a=0,s.replaceState({...s.state,idx:a},""));function d(){return(s.state||{idx:null}).idx}function h(){f="POP";let y=d(),g=y==null?null:y-a;a=y,l&&l({action:f,location:S.location,delta:g})}function m(y,g){f="PUSH";let E=pe(S.location,y,g);a=d()+1;let P=Le(E,a),$=S.createHref(E);try{s.pushState(P,"",$)}catch(A){if(A instanceof DOMException&&A.name==="DataCloneError")throw A;i.location.assign($)}u&&l&&l({action:f,location:S.location,delta:1})}function v(y,g){f="REPLACE";let E=pe(S.location,y,g);a=d();let P=Le(E,a),$=S.createHref(E);s.replaceState(P,"",$),u&&l&&l({action:f,location:S.location,delta:0})}function w(y){return dt(y)}let S={get action(){return f},get location(){return e(i,s)},listen(y){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Te,h),l=y,()=>{i.removeEventListener(Te,h),l=null}},createHref(y){return t(i,y)},createURL:w,encodeLocation(y){let g=w(y);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:m,replace:v,go(y){return s.go(y)}};return S}function dt(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),O(r,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:X(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=r+n),new URL(n,r)}function Me(e,t,r="/"){return ht(e,t,r,!1)}function ht(e,t,r,n){let i=typeof t=="string"?V(t):t,u=W(i.pathname||"/",r);if(u==null)return null;let s=Ie(e);pt(s);let f=null;for(let l=0;f==null&&l<s.length;++l){let a=Pt(u);f=_t(s[l],a,n)}return f}function Ie(e,t=[],r=[],n="",i=!1){let u=(s,f,l=i,a)=>{let d={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:f,route:s};if(d.relativePath.startsWith("/")){if(!d.relativePath.startsWith(n)&&l)return;O(d.relativePath.startsWith(n),`Absolute route path "${d.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(n.length)}let h=B([n,d.relativePath]),m=r.concat(d);s.children&&s.children.length>0&&(O(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),Ie(s.children,t,m,h,l)),!(s.path==null&&!s.index)&&t.push({path:h,score:wt(h,s.index),routesMeta:m})};return e.forEach((s,f)=>{if(s.path===""||!s.path?.includes("?"))u(s,f);else for(let l of He(s.path))u(s,f,!0,l)}),t}function He(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),u=r.replace(/\?$/,"");if(n.length===0)return i?[u,""]:[u];let s=He(n.join("/")),f=[];return f.push(...s.map(l=>l===""?u:[u,l].join("/"))),i&&f.push(...s),f.map(l=>e.startsWith("/")&&l===""?"/":l)}function pt(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Ct(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var mt=/^:[\w-]+$/,yt=3,gt=2,vt=1,Et=10,Rt=-2,Oe=e=>e==="*";function wt(e,t){let r=e.split("/"),n=r.length;return r.some(Oe)&&(n+=Rt),t&&(n+=gt),r.filter(i=>!Oe(i)).reduce((i,u)=>i+(mt.test(u)?yt:u===""?vt:Et),n)}function Ct(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function _t(e,t,r=!1){let{routesMeta:n}=e,i={},u="/",s=[];for(let f=0;f<n.length;++f){let l=n[f],a=f===n.length-1,d=u==="/"?t:t.slice(u.length)||"/",h=ie({path:l.relativePath,caseSensitive:l.caseSensitive,end:a},d),m=l.route;if(!h&&a&&r&&!n[n.length-1].route.index&&(h=ie({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!h)return null;Object.assign(i,h.params),s.push({params:i,pathname:B([u,h.pathname]),pathnameBase:Ot(B([u,h.pathnameBase])),route:m}),h.pathnameBase!=="/"&&(u=B([u,h.pathnameBase]))}return s}function ie(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=St(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let u=i[0],s=u.replace(/(.)\/+$/,"$1"),f=i.slice(1);return{params:n.reduce((a,{paramName:d,isOptional:h},m)=>{if(d==="*"){let w=f[m]||"";s=u.slice(0,u.length-w.length).replace(/(.)\/+$/,"$1")}const v=f[m];return h&&!v?a[d]=void 0:a[d]=(v||"").replace(/%2F/g,"/"),a},{}),pathname:u,pathnameBase:s,pattern:e}}function St(e,t=!1,r=!0){D(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,f,l)=>(n.push({paramName:f,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function Pt(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return D(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function W(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}var xt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,bt=e=>xt.test(e);function Tt(e,t="/"){let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?V(e):e,u;if(r)if(bt(r))u=r;else{if(r.includes("//")){let s=r;r=r.replace(/\/\/+/g,"/"),D(!1,`Pathnames cannot have embedded double slashes - normalizing ${s} -> ${r}`)}r.startsWith("/")?u=$e(r.substring(1),"/"):u=$e(r,t)}else u=t;return{pathname:u,search:$t(n),hash:kt(i)}}function $e(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function de(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Lt(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Ue(e){let t=Lt(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function Fe(e,t,r,n=!1){let i;typeof e=="string"?i=V(e):(i={...e},O(!i.pathname||!i.pathname.includes("?"),de("?","pathname","search",i)),O(!i.pathname||!i.pathname.includes("#"),de("#","pathname","hash",i)),O(!i.search||!i.search.includes("#"),de("#","search","hash",i)));let u=e===""||i.pathname==="",s=u?"/":i.pathname,f;if(s==null)f=r;else{let h=t.length-1;if(!n&&s.startsWith("..")){let m=s.split("/");for(;m[0]==="..";)m.shift(),h-=1;i.pathname=m.join("/")}f=h>=0?t[h]:"/"}let l=Tt(i,f),a=s&&s!=="/"&&s.endsWith("/"),d=(u||s===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(a||d)&&(l.pathname+="/"),l}var B=e=>e.join("/").replace(/\/\/+/g,"/"),Ot=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),$t=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,kt=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function At(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Nt(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var je=["POST","PUT","PATCH","DELETE"];new Set(je);var Dt=["GET",...je];new Set(Dt);var G=c.createContext(null);G.displayName="DataRouter";var ue=c.createContext(null);ue.displayName="DataRouterState";c.createContext(!1);var Be=c.createContext({isTransitioning:!1});Be.displayName="ViewTransition";var Mt=c.createContext(new Map);Mt.displayName="Fetchers";var It=c.createContext(null);It.displayName="Await";var I=c.createContext(null);I.displayName="Navigation";var Q=c.createContext(null);Q.displayName="Location";var j=c.createContext({outlet:null,matches:[],isDataRoute:!1});j.displayName="Route";var ge=c.createContext(null);ge.displayName="RouteError";function Ht(e,{relative:t}={}){O(Z(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=c.useContext(I),{hash:i,pathname:u,search:s}=ee(e,{relative:t}),f=u;return r!=="/"&&(f=u==="/"?r:B([r,u])),n.createHref({pathname:f,search:s,hash:i})}function Z(){return c.useContext(Q)!=null}function z(){return O(Z(),"useLocation() may be used only in the context of a <Router> component."),c.useContext(Q).location}var We="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Ye(e){c.useContext(I).static||c.useLayoutEffect(e)}function ze(){let{isDataRoute:e}=c.useContext(j);return e?Zt():Ut()}function Ut(){O(Z(),"useNavigate() may be used only in the context of a <Router> component.");let e=c.useContext(G),{basename:t,navigator:r}=c.useContext(I),{matches:n}=c.useContext(j),{pathname:i}=z(),u=JSON.stringify(Ue(n)),s=c.useRef(!1);return Ye(()=>{s.current=!0}),c.useCallback((l,a={})=>{if(D(s.current,We),!s.current)return;if(typeof l=="number"){r.go(l);return}let d=Fe(l,JSON.parse(u),i,a.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:B([t,d.pathname])),(a.replace?r.replace:r.push)(d,a.state,a)},[t,r,u,i,e])}var Ft=c.createContext(null);function jt(e){let t=c.useContext(j).outlet;return c.useMemo(()=>t&&c.createElement(Ft.Provider,{value:e},t),[t,e])}function ee(e,{relative:t}={}){let{matches:r}=c.useContext(j),{pathname:n}=z(),i=JSON.stringify(Ue(r));return c.useMemo(()=>Fe(e,JSON.parse(i),n,t==="path"),[e,i,n,t])}function Bt(e,t){return qe(e,t)}function qe(e,t,r,n,i){O(Z(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u}=c.useContext(I),{matches:s}=c.useContext(j),f=s[s.length-1],l=f?f.params:{},a=f?f.pathname:"/",d=f?f.pathnameBase:"/",h=f&&f.route;{let E=h&&h.path||"";Ke(a,!h||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${a}" (under <Route path="${E}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
2
|
+
|
|
3
|
+
Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let m=z(),v;if(t){let E=typeof t=="string"?V(t):t;O(d==="/"||E.pathname?.startsWith(d),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${d}" but pathname "${E.pathname}" was given in the \`location\` prop.`),v=E}else v=m;let w=v.pathname||"/",S=w;if(d!=="/"){let E=d.replace(/^\//,"").split("/");S="/"+w.replace(/^\//,"").split("/").slice(E.length).join("/")}let y=Me(e,{pathname:S});D(h||y!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),D(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=Kt(y&&y.map(E=>Object.assign({},E,{params:Object.assign({},l,E.params),pathname:B([d,u.encodeLocation?u.encodeLocation(E.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?d:B([d,u.encodeLocation?u.encodeLocation(E.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),s,r,n,i);return t&&g?c.createElement(Q.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},g):g}function Wt(){let e=Qt(),t=At(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:n},u={padding:"2px 4px",backgroundColor:n},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=c.createElement(c.Fragment,null,c.createElement("p",null,"💿 Hey developer 👋"),c.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",c.createElement("code",{style:u},"ErrorBoundary")," or"," ",c.createElement("code",{style:u},"errorElement")," prop on your route.")),c.createElement(c.Fragment,null,c.createElement("h2",null,"Unexpected Application Error!"),c.createElement("h3",{style:{fontStyle:"italic"}},t),r?c.createElement("pre",{style:i},r):null,s)}var Yt=c.createElement(Wt,null),zt=class extends c.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?c.createElement(j.Provider,{value:this.props.routeContext},c.createElement(ge.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function qt({routeContext:e,match:t,children:r}){let n=c.useContext(G);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),c.createElement(j.Provider,{value:e},r)}function Kt(e,t=[],r=null,n=null,i=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let u=e,s=r?.errors;if(s!=null){let d=u.findIndex(h=>h.route.id&&s?.[h.route.id]!==void 0);O(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),u=u.slice(0,Math.min(u.length,d+1))}let f=!1,l=-1;if(r)for(let d=0;d<u.length;d++){let h=u[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(l=d),h.route.id){let{loaderData:m,errors:v}=r,w=h.route.loader&&!m.hasOwnProperty(h.route.id)&&(!v||v[h.route.id]===void 0);if(h.route.lazy||w){f=!0,l>=0?u=u.slice(0,l+1):u=[u[0]];break}}}let a=r&&n?(d,h)=>{n(d,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:Nt(r.matches),errorInfo:h})}:void 0;return u.reduceRight((d,h,m)=>{let v,w=!1,S=null,y=null;r&&(v=s&&h.route.id?s[h.route.id]:void 0,S=h.route.errorElement||Yt,f&&(l<0&&m===0?(Ke("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,y=null):l===m&&(w=!0,y=h.route.hydrateFallbackElement||null)));let g=t.concat(u.slice(0,m+1)),E=()=>{let P;return v?P=S:w?P=y:h.route.Component?P=c.createElement(h.route.Component,null):h.route.element?P=h.route.element:P=d,c.createElement(qt,{match:h,routeContext:{outlet:d,matches:g,isDataRoute:r!=null},children:P})};return r&&(h.route.ErrorBoundary||h.route.errorElement||m===0)?c.createElement(zt,{location:r.location,revalidation:r.revalidation,component:S,error:v,children:E(),routeContext:{outlet:null,matches:g,isDataRoute:!0},onError:a}):E()},null)}function ve(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Vt(e){let t=c.useContext(G);return O(t,ve(e)),t}function Gt(e){let t=c.useContext(ue);return O(t,ve(e)),t}function Jt(e){let t=c.useContext(j);return O(t,ve(e)),t}function Ee(e){let t=Jt(e),r=t.matches[t.matches.length-1];return O(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Xt(){return Ee("useRouteId")}function Qt(){let e=c.useContext(ge),t=Gt("useRouteError"),r=Ee("useRouteError");return e!==void 0?e:t.errors?.[r]}function Zt(){let{router:e}=Vt("useNavigate"),t=Ee("useNavigate"),r=c.useRef(!1);return Ye(()=>{r.current=!0}),c.useCallback(async(i,u={})=>{D(r.current,We),r.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...u}))},[e,t])}var ke={};function Ke(e,t,r){!t&&!ke[e]&&(ke[e]=!0,D(!1,r))}c.memo(er);function er({routes:e,future:t,state:r,unstable_onError:n}){return qe(e,void 0,r,n,t)}function Hr(e){return jt(e.context)}function tr(e){O(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function rr({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:i,static:u=!1,unstable_useTransitions:s}){O(!Z(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),l=c.useMemo(()=>({basename:f,navigator:i,static:u,unstable_useTransitions:s,future:{}}),[f,i,u,s]);typeof r=="string"&&(r=V(r));let{pathname:a="/",search:d="",hash:h="",state:m=null,key:v="default"}=r,w=c.useMemo(()=>{let S=W(a,f);return S==null?null:{location:{pathname:S,search:d,hash:h,state:m,key:v},navigationType:n}},[f,a,d,h,m,v,n]);return D(w!=null,`<Router basename="${f}"> is not able to match the URL "${a}${d}${h}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:c.createElement(I.Provider,{value:l},c.createElement(Q.Provider,{children:t,value:w}))}function Ur({children:e,location:t}){return Bt(me(e),t)}function me(e,t=[]){let r=[];return c.Children.forEach(e,(n,i)=>{if(!c.isValidElement(n))return;let u=[...t,i];if(n.type===c.Fragment){r.push.apply(r,me(n.props.children,u));return}O(n.type===tr,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),O(!n.props.index||!n.props.children,"An index route cannot have child routes.");let s={id:n.props.id||u.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(s.children=me(n.props.children,u)),r.push(s)}),r}var ae="get",oe="application/x-www-form-urlencoded";function le(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function nr(e){return le(e)&&e.tagName.toLowerCase()==="button"}function ar(e){return le(e)&&e.tagName.toLowerCase()==="form"}function or(e){return le(e)&&e.tagName.toLowerCase()==="input"}function ir(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ur(e,t){return e.button===0&&(!t||t==="_self")&&!ir(e)}function ye(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(i=>[r,i]):[[r,n]])},[]))}function lr(e,t){let r=ye(e);return t&&t.forEach((n,i)=>{r.has(i)||t.getAll(i).forEach(u=>{r.append(i,u)})}),r}var ne=null;function sr(){if(ne===null)try{new FormData(document.createElement("form"),0),ne=!1}catch{ne=!0}return ne}var cr=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function he(e){return e!=null&&!cr.has(e)?(D(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${oe}"`),null):e}function fr(e,t){let r,n,i,u,s;if(ar(e)){let f=e.getAttribute("action");n=f?W(f,t):null,r=e.getAttribute("method")||ae,i=he(e.getAttribute("enctype"))||oe,u=new FormData(e)}else if(nr(e)||or(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||f.getAttribute("action");if(n=l?W(l,t):null,r=e.getAttribute("formmethod")||f.getAttribute("method")||ae,i=he(e.getAttribute("formenctype"))||he(f.getAttribute("enctype"))||oe,u=new FormData(f,e),!sr()){let{name:a,type:d,value:h}=e;if(d==="image"){let m=a?`${a}.`:"";u.append(`${m}x`,"0"),u.append(`${m}y`,"0")}else a&&u.append(a,h)}}else{if(le(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=ae,n=null,i=oe,s=e}return u&&i==="text/plain"&&(s=u,u=void 0),{action:n,method:r.toLowerCase(),encType:i,formData:u,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Re(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function dr(e,t,r){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n.pathname==="/"?n.pathname=`_root.${r}`:t&&W(n.pathname,t)==="/"?n.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${r}`,n}async function hr(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function pr(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function mr(e,t,r){let n=await Promise.all(e.map(async i=>{let u=t.routes[i.route.id];if(u){let s=await hr(u,r);return s.links?s.links():[]}return[]}));return Er(n.flat(1).filter(pr).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function Ae(e,t,r,n,i,u){let s=(l,a)=>r[a]?l.route.id!==r[a].route.id:!0,f=(l,a)=>r[a].pathname!==l.pathname||r[a].route.path?.endsWith("*")&&r[a].params["*"]!==l.params["*"];return u==="assets"?t.filter((l,a)=>s(l,a)||f(l,a)):u==="data"?t.filter((l,a)=>{let d=n.routes[l.route.id];if(!d||!d.hasLoader)return!1;if(s(l,a)||f(l,a))return!0;if(l.route.shouldRevalidate){let h=l.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function yr(e,t,{includeHydrateFallback:r}={}){return gr(e.map(n=>{let i=t.routes[n.route.id];if(!i)return[];let u=[i.module];return i.clientActionModule&&(u=u.concat(i.clientActionModule)),i.clientLoaderModule&&(u=u.concat(i.clientLoaderModule)),r&&i.hydrateFallbackModule&&(u=u.concat(i.hydrateFallbackModule)),i.imports&&(u=u.concat(i.imports)),u}).flat(1))}function gr(e){return[...new Set(e)]}function vr(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function Er(e,t){let r=new Set;return new Set(t),e.reduce((n,i)=>{let u=JSON.stringify(vr(i));return r.has(u)||(r.add(u),n.push({key:u,link:i})),n},[])}function Ve(){let e=c.useContext(G);return Re(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Rr(){let e=c.useContext(ue);return Re(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var we=c.createContext(void 0);we.displayName="FrameworkContext";function Ge(){let e=c.useContext(we);return Re(e,"You must render this element inside a <HydratedRouter> element"),e}function wr(e,t){let r=c.useContext(we),[n,i]=c.useState(!1),[u,s]=c.useState(!1),{onFocus:f,onBlur:l,onMouseEnter:a,onMouseLeave:d,onTouchStart:h}=t,m=c.useRef(null);c.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let S=g=>{g.forEach(E=>{s(E.isIntersecting)})},y=new IntersectionObserver(S,{threshold:.5});return m.current&&y.observe(m.current),()=>{y.disconnect()}}},[e]),c.useEffect(()=>{if(n){let S=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(S)}}},[n]);let v=()=>{i(!0)},w=()=>{i(!1),s(!1)};return r?e!=="intent"?[u,m,{}]:[u,m,{onFocus:J(f,v),onBlur:J(l,w),onMouseEnter:J(a,v),onMouseLeave:J(d,w),onTouchStart:J(h,v)}]:[!1,m,{}]}function J(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Cr({page:e,...t}){let{router:r}=Ve(),n=c.useMemo(()=>Me(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?c.createElement(Sr,{page:e,matches:n,...t}):null}function _r(e){let{manifest:t,routeModules:r}=Ge(),[n,i]=c.useState([]);return c.useEffect(()=>{let u=!1;return mr(e,t,r).then(s=>{u||i(s)}),()=>{u=!0}},[e,t,r]),n}function Sr({page:e,matches:t,...r}){let n=z(),{manifest:i,routeModules:u}=Ge(),{basename:s}=Ve(),{loaderData:f,matches:l}=Rr(),a=c.useMemo(()=>Ae(e,t,l,i,n,"data"),[e,t,l,i,n]),d=c.useMemo(()=>Ae(e,t,l,i,n,"assets"),[e,t,l,i,n]),h=c.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let w=new Set,S=!1;if(t.forEach(g=>{let E=i.routes[g.route.id];!E||!E.hasLoader||(!a.some(P=>P.route.id===g.route.id)&&g.route.id in f&&u[g.route.id]?.shouldRevalidate||E.hasClientLoader?S=!0:w.add(g.route.id))}),w.size===0)return[];let y=dr(e,s,"data");return S&&w.size>0&&y.searchParams.set("_routes",t.filter(g=>w.has(g.route.id)).map(g=>g.route.id).join(",")),[y.pathname+y.search]},[s,f,n,i,a,t,e,u]),m=c.useMemo(()=>yr(d,i),[d,i]),v=_r(d);return c.createElement(c.Fragment,null,h.map(w=>c.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...r})),m.map(w=>c.createElement("link",{key:w,rel:"modulepreload",href:w,...r})),v.map(({key:w,link:S})=>c.createElement("link",{key:w,nonce:r.nonce,...S})))}function Pr(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var Je=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Je&&(window.__reactRouterVersion="7.10.1")}catch{}function Fr({basename:e,children:t,unstable_useTransitions:r,window:n}){let i=c.useRef();i.current==null&&(i.current=st({window:n,v5Compat:!0}));let u=i.current,[s,f]=c.useState({action:u.action,location:u.location}),l=c.useCallback(a=>{r===!1?f(a):c.startTransition(()=>f(a))},[r]);return c.useLayoutEffect(()=>u.listen(l),[u,l]),c.createElement(rr,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:u,unstable_useTransitions:r===!0})}var Xe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Qe=c.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:i,reloadDocument:u,replace:s,state:f,target:l,to:a,preventScrollReset:d,viewTransition:h,...m},v){let{basename:w,unstable_useTransitions:S}=c.useContext(I),y=typeof a=="string"&&Xe.test(a),g,E=!1;if(typeof a=="string"&&y&&(g=a,Je))try{let M=new URL(window.location.href),Y=a.startsWith("//")?new URL(M.protocol+a):new URL(a),te=W(Y.pathname,w);Y.origin===M.origin&&te!=null?a=te+Y.search+Y.hash:E=!0}catch{D(!1,`<Link to="${a}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let P=Ht(a,{relative:i}),[$,A,H]=wr(n,m),x=Lr(a,{replace:s,state:f,target:l,preventScrollReset:d,relative:i,viewTransition:h,unstable_useTransitions:S});function q(M){t&&t(M),M.defaultPrevented||x(M)}let U=c.createElement("a",{...m,...H,href:g||P,onClick:E||u?t:q,ref:Pr(v,A),target:l,"data-discover":!y&&r==="render"?"true":void 0});return $&&!y?c.createElement(c.Fragment,null,U,c.createElement(Cr,{page:P})):U});Qe.displayName="Link";var xr=c.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:i=!1,style:u,to:s,viewTransition:f,children:l,...a},d){let h=ee(s,{relative:a.relative}),m=z(),v=c.useContext(ue),{navigator:w,basename:S}=c.useContext(I),y=v!=null&&Nr(h)&&f===!0,g=w.encodeLocation?w.encodeLocation(h).pathname:h.pathname,E=m.pathname,P=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;r||(E=E.toLowerCase(),P=P?P.toLowerCase():null,g=g.toLowerCase()),P&&S&&(P=W(P,S)||P);const $=g!=="/"&&g.endsWith("/")?g.length-1:g.length;let A=E===g||!i&&E.startsWith(g)&&E.charAt($)==="/",H=P!=null&&(P===g||!i&&P.startsWith(g)&&P.charAt(g.length)==="/"),x={isActive:A,isPending:H,isTransitioning:y},q=A?t:void 0,U;typeof n=="function"?U=n(x):U=[n,A?"active":null,H?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let M=typeof u=="function"?u(x):u;return c.createElement(Qe,{...a,"aria-current":q,className:U,ref:d,style:M,to:s,viewTransition:f},typeof l=="function"?l(x):l)});xr.displayName="NavLink";var br=c.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:i,state:u,method:s=ae,action:f,onSubmit:l,relative:a,preventScrollReset:d,viewTransition:h,...m},v)=>{let{unstable_useTransitions:w}=c.useContext(I),S=kr(),y=Ar(f,{relative:a}),g=s.toLowerCase()==="get"?"get":"post",E=typeof f=="string"&&Xe.test(f),P=$=>{if(l&&l($),$.defaultPrevented)return;$.preventDefault();let A=$.nativeEvent.submitter,H=A?.getAttribute("formmethod")||s,x=()=>S(A||$.currentTarget,{fetcherKey:t,method:H,navigate:r,replace:i,state:u,relative:a,preventScrollReset:d,viewTransition:h});w&&r!==!1?c.startTransition(()=>x()):x()};return c.createElement("form",{ref:v,method:g,action:y,onSubmit:n?l:P,...m,"data-discover":!E&&e==="render"?"true":void 0})});br.displayName="Form";function Tr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ze(e){let t=c.useContext(G);return O(t,Tr(e)),t}function Lr(e,{target:t,replace:r,state:n,preventScrollReset:i,relative:u,viewTransition:s,unstable_useTransitions:f}={}){let l=ze(),a=z(),d=ee(e,{relative:u});return c.useCallback(h=>{if(ur(h,t)){h.preventDefault();let m=r!==void 0?r:X(a)===X(d),v=()=>l(e,{replace:m,state:n,preventScrollReset:i,relative:u,viewTransition:s});f?c.startTransition(()=>v()):v()}},[a,l,d,r,n,t,e,i,u,s,f])}function jr(e){D(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=c.useRef(ye(e)),r=c.useRef(!1),n=z(),i=c.useMemo(()=>lr(n.search,r.current?null:t.current),[n.search]),u=ze(),s=c.useCallback((f,l)=>{const a=ye(typeof f=="function"?f(new URLSearchParams(i)):f);r.current=!0,u("?"+a,l)},[u,i]);return[i,s]}var Or=0,$r=()=>`__${String(++Or)}__`;function kr(){let{router:e}=Ze("useSubmit"),{basename:t}=c.useContext(I),r=Xt(),n=e.fetch,i=e.navigate;return c.useCallback(async(u,s={})=>{let{action:f,method:l,encType:a,formData:d,body:h}=fr(u,t);if(s.navigate===!1){let m=s.fetcherKey||$r();await n(m,r,s.action||f,{preventScrollReset:s.preventScrollReset,formData:d,body:h,formMethod:s.method||l,formEncType:s.encType||a,flushSync:s.flushSync})}else await i(s.action||f,{preventScrollReset:s.preventScrollReset,formData:d,body:h,formMethod:s.method||l,formEncType:s.encType||a,replace:s.replace,state:s.state,fromRouteId:r,flushSync:s.flushSync,viewTransition:s.viewTransition})},[n,i,t,r])}function Ar(e,{relative:t}={}){let{basename:r}=c.useContext(I),n=c.useContext(j);O(n,"useFormAction must be used inside a RouteContext");let[i]=n.matches.slice(-1),u={...ee(e||".",{relative:t})},s=z();if(e==null){u.search=s.search;let f=new URLSearchParams(u.search),l=f.getAll("index");if(l.some(d=>d==="")){f.delete("index"),l.filter(h=>h).forEach(h=>f.append("index",h));let d=f.toString();u.search=d?`?${d}`:""}}return(!e||e===".")&&i.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(u.pathname=u.pathname==="/"?r:B([r,u.pathname])),X(u)}function Nr(e,{relative:t}={}){let r=c.useContext(Be);O(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Ze("useViewTransitionState"),i=ee(e,{relative:t});if(!r.isTransitioning)return!1;let u=W(r.currentLocation.pathname,n)||r.currentLocation.pathname,s=W(r.nextLocation.pathname,n)||r.nextLocation.pathname;return ie(i.pathname,s)!=null||ie(i.pathname,u)!=null}var Dr=lt();const Br=Ne(Dr);export{Fr as B,Qe as L,Hr as O,Ir as R,Dr as a,Br as b,it as c,Mr as d,De as e,lt as f,Ne as g,ze as h,Ur as i,tr as j,jr as k,c as r,z as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./radix-ui-DFHQr9A5.js";import{k as Me,r as t}from"./react-vendor-FspHSO0w.js";import{a2 as _e,a3 as ie,V as Oe,W as Pe,X as ce,a4 as Ve,B as b,a5 as me,a6 as xe,i as he,I as $}from"./index-c9idYjfn.js";import{S as B}from"./switch-BQbPcCIQ.js";import{CodeEditor as Be}from"./code-editor-rSl_-6ob.js";import{J as y,am as $e,z as De,k as We,an as de,j as Ue,o as He,ac as pe,l as ue,t as Y,x as J,y as K,D as q,N as Ye,V as Je}from"./icons-U_6eBV_J.js";import"./tanstack-C4gT2P7V.js";import"./notifications-B2Pz7lik.js";import"./utils-CzKF5WmX.js";import"./form-utils-BuXDJb0w.js";import"./code-highlight-BoHWVYut.js";function is(){const[r]=Me(),m=r.get("tab")==="globalenv"?"globalenv":"websearch",[o,u]=t.useState(m),[n,d]=t.useState(null),[g,h]=t.useState(!0),[k,C]=t.useState(!1),[f,p]=t.useState(null),[j,S]=t.useState(!1),[l,v]=t.useState(null),[D,L]=t.useState(!0),[N,w]=t.useState(null),[I,z]=t.useState(!1),[W,F]=t.useState(!1),[R,M]=t.useState(""),[E,G]=t.useState(""),[ge,be]=t.useState(!1),[fe,je]=t.useState(!1),[ve,Ne]=t.useState(!1),[x,_]=t.useState(null),[we,X]=t.useState(!0),[ye,Q]=t.useState(!1),[ke,O]=t.useState(null),[Ce,Z]=t.useState(!1),[U,ee]=t.useState(""),[se,ae]=t.useState("");t.useEffect(()=>{te(),ne(),P(),re()},[]),t.useEffect(()=>{n&&(M(n.providers?.gemini?.model??"gemini-2.5-flash"),G(n.providers?.opencode?.model??"opencode/grok-code"))},[n]);const te=async()=>{try{h(!0),p(null);const s=await fetch("/api/websearch");if(!s.ok)throw new Error("Failed to load WebSearch config");const a=await s.json();d(a)}catch(s){p(s.message)}finally{h(!1)}},ne=async()=>{try{L(!0);const s=await fetch("/api/websearch/status");if(!s.ok)throw new Error("Failed to load status");const a=await s.json();v(a)}catch(s){console.error("Failed to fetch WebSearch status:",s)}finally{L(!1)}},P=async()=>{try{z(!0);const s=await fetch("/api/config/raw");if(!s.ok){w(null);return}const a=await s.text();w(a)}catch(s){console.error("Failed to fetch raw config:",s),w(null)}finally{z(!1)}},re=async()=>{try{X(!0),O(null);const s=await fetch("/api/global-env");if(!s.ok)throw new Error("Failed to load Global Env config");const a=await s.json();_(a)}catch(s){O(s.message)}finally{X(!1)}},Se=async()=>{if(N)try{await navigator.clipboard.writeText(N),F(!0),setTimeout(()=>F(!1),2e3)}catch(s){console.error("Failed to copy:",s)}},Ee=()=>{const s=n?.providers||{},a=s.gemini?.enabled??!1,i=s.grok?.enabled??!1,A=s.opencode?.enabled??!1;T({enabled:!a||i||A,providers:{...s,gemini:{...s.gemini,enabled:!a}}})},T=async s=>{if(!n)return;const a={...n,...s};d(a);try{C(!0),p(null);const i=await fetch("/api/websearch",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!i.ok){const c=await i.json();throw new Error(c.error||"Failed to save")}const A=await i.json();d(A.websearch),S(!0),setTimeout(()=>S(!1),1500),fetch("/api/config/raw").then(c=>c.ok?c.text():null).then(c=>c&&w(c)).catch(()=>{})}catch(i){d(n),p(i.message)}finally{C(!1)}},H=n?.providers?.gemini?.enabled??!1,le=n?.providers?.grok?.enabled??!1,oe=n?.providers?.opencode?.enabled??!1,Ge=()=>{const s=n?.providers||{},a=s.grok?.enabled??!1;T({enabled:H||!a||oe,providers:{...s,grok:{...s.grok,enabled:!a}}})},Ie=()=>{const s=n?.providers||{},a=s.opencode?.enabled??!1;T({enabled:H||le||!a,providers:{...s,opencode:{...s.opencode,enabled:!a}}})},Re=()=>{const s=n?.providers?.gemini?.model??"gemini-2.5-flash";if(R!==s){const a=n?.providers||{};T({providers:{...a,gemini:{...a.gemini,model:R}}})}},Te=()=>{const s=n?.providers?.opencode?.model??"opencode/grok-code";if(E!==s){const a=n?.providers||{};T({providers:{...a,opencode:{...a.opencode,model:E}}})}},V=async s=>{if(!x)return;const a={...x,...s};_(a);try{Q(!0),O(null);const i=await fetch("/api/global-env",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!i.ok){const c=await i.json();throw new Error(c.error||"Failed to save")}const A=await i.json();_(A.config),Z(!0),setTimeout(()=>Z(!1),1500),fetch("/api/config/raw").then(c=>c.ok?c.text():null).then(c=>c&&w(c)).catch(()=>{})}catch(i){_(x),O(i.message)}finally{Q(!1)}},Ae=()=>{V({enabled:!x?.enabled})},Le=()=>{if(!U.trim()||!x)return;const s={...x.env,[U.trim()]:se};V({env:s}),ee(""),ae("")},ze=s=>{if(!x)return;const a={...x.env};delete a[s],V({env:a})},Fe=(s,a)=>{if(!x)return;const i={...x.env,[s]:a};V({env:i})};return g?e.jsx("div",{className:"h-[calc(100vh-100px)] flex items-center justify-center",children:e.jsxs("div",{className:"flex items-center gap-3 text-muted-foreground",children:[e.jsx(y,{className:"w-5 h-5 animate-spin"}),e.jsx("span",{className:"text-lg",children:"Loading configuration..."})]})}):e.jsx("div",{className:"h-[calc(100vh-100px)]",children:e.jsxs(_e,{direction:"horizontal",className:"h-full",children:[e.jsx(ie,{defaultSize:40,minSize:30,maxSize:55,children:e.jsxs("div",{className:"h-full border-r flex flex-col bg-muted/30 relative",children:[e.jsx("div",{className:"p-5 border-b bg-background",children:e.jsx(Oe,{value:o,onValueChange:s=>u(s),children:e.jsxs(Pe,{className:"w-full",children:[e.jsxs(ce,{value:"websearch",className:"flex-1 gap-2",children:[e.jsx($e,{className:"w-4 h-4"}),"WebSearch"]}),e.jsxs(ce,{value:"globalenv",className:"flex-1 gap-2",children:[e.jsx(De,{className:"w-4 h-4"}),"Global Env"]})]})})}),o==="websearch"?e.jsx(Ke,{config:n,status:l,statusLoading:D,saving:k,error:f,success:j,isGeminiEnabled:H,isGrokEnabled:le,isOpenCodeEnabled:oe,geminiModelInput:R,opencodeModelInput:E,showGeminiHint:ge,showOpencodeHint:fe,showGrokHint:ve,setGeminiModelInput:M,setOpencodeModelInput:G,setShowGeminiHint:be,setShowOpencodeHint:je,setShowGrokHint:Ne,toggleGemini:Ee,toggleGrok:Ge,toggleOpenCode:Ie,saveGeminiModel:Re,saveOpencodeModel:Te,fetchStatus:ne,fetchConfig:te,fetchRawConfig:P,loading:g}):e.jsx(qe,{config:x,loading:we,saving:ye,error:ke,success:Ce,newEnvKey:U,newEnvValue:se,setNewEnvKey:ee,setNewEnvValue:ae,toggleGlobalEnv:Ae,addEnvVar:Le,removeEnvVar:ze,updateEnvValue:Fe,fetchGlobalEnvConfig:re,fetchRawConfig:P})]})}),e.jsx(Ve,{className:"w-2 bg-border hover:bg-primary/20 transition-colors cursor-col-resize flex items-center justify-center group",children:e.jsx(We,{className:"w-3 h-3 text-muted-foreground group-hover:text-primary"})}),e.jsx(ie,{defaultSize:60,minSize:35,children:e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsxs("div",{className:"p-4 border-b bg-background flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(de,{className:"w-5 h-5 text-primary"}),e.jsxs("div",{children:[e.jsx("h2",{className:"font-semibold",children:"config.yaml"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"~/.ccs/config.yaml"})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(b,{variant:"outline",size:"sm",onClick:Se,disabled:!N,children:W?e.jsxs(e.Fragment,{children:[e.jsx(Ue,{className:"w-4 h-4 mr-1"}),"Copied"]}):e.jsxs(e.Fragment,{children:[e.jsx(He,{className:"w-4 h-4 mr-1"}),"Copy"]})}),e.jsx(b,{variant:"outline",size:"sm",onClick:P,disabled:I,children:e.jsx(y,{className:`w-4 h-4 ${I?"animate-spin":""}`})})]})]}),e.jsx("div",{className:"flex-1 overflow-auto",children:I?e.jsxs("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:[e.jsx(y,{className:"w-5 h-5 animate-spin mr-2"}),"Loading..."]}):N?e.jsx(Be,{value:N,onChange:()=>{},language:"yaml",readonly:!0,minHeight:"auto",className:"min-h-full"}):e.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:e.jsxs("div",{className:"text-center",children:[e.jsx(de,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),e.jsx("p",{children:"Config file not found"}),e.jsx("code",{className:"text-sm bg-muted px-2 py-1 rounded mt-2 inline-block",children:"ccs migrate"})]})})})]})})]})})}function Ke({status:r,statusLoading:m,saving:o,error:u,success:n,isGeminiEnabled:d,isGrokEnabled:g,isOpenCodeEnabled:h,geminiModelInput:k,opencodeModelInput:C,showGeminiHint:f,showOpencodeHint:p,showGrokHint:j,setGeminiModelInput:S,setOpencodeModelInput:l,setShowGeminiHint:v,setShowOpencodeHint:D,setShowGrokHint:L,toggleGemini:N,toggleGrok:w,toggleOpenCode:I,saveGeminiModel:z,saveOpencodeModel:W,fetchStatus:F,fetchConfig:R,fetchRawConfig:M,loading:E}){return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`absolute left-5 right-5 top-20 z-10 transition-all duration-200 ease-out ${u||n?"opacity-100 translate-y-0":"opacity-0 -translate-y-2 pointer-events-none"}`,children:[u&&e.jsxs(me,{variant:"destructive",className:"py-2 shadow-lg",children:[e.jsx(pe,{className:"h-4 w-4"}),e.jsx(xe,{children:u})]}),n&&e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-md border border-green-200 bg-green-50 text-green-700 shadow-lg dark:border-green-900/50 dark:bg-green-900/90 dark:text-green-300",children:[e.jsx(ue,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"text-sm font-medium",children:"Saved"})]})]}),e.jsx(he,{className:"flex-1",children:e.jsxs("div",{className:"p-5 space-y-6",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"CLI-based web search for third-party profiles (gemini, codex, agy, etc.)"}),e.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg bg-muted/50",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:d?"WebSearch enabled":"WebSearch disabled"}),m?e.jsx("p",{className:"text-sm text-muted-foreground",children:"Checking status..."}):r?.readiness?e.jsx("p",{className:"text-sm text-muted-foreground",children:r.readiness.message}):null]}),e.jsx(b,{variant:"ghost",size:"sm",onClick:F,disabled:m,children:e.jsx(y,{className:`w-4 h-4 ${m?"animate-spin":""}`})})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-base font-medium",children:"Providers"}),e.jsxs("div",{className:`rounded-lg border transition-colors ${d?"border-primary border-l-4":"border-border"}`,children:[e.jsxs("div",{className:"flex items-center justify-between p-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Y,{className:`w-5 h-5 ${d?"text-primary":"text-muted-foreground"}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"font-mono font-medium",children:"gemini"}),e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-green-500/10 text-green-600 font-medium",children:"FREE"}),r?.geminiCli?.installed?e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-green-500/10 text-green-600 font-medium",children:"installed"}):e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-amber-500/10 text-amber-600 font-medium",children:"not installed"})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Google Gemini CLI (1000 req/day free)"})]})]}),e.jsx(B,{checked:d,onCheckedChange:N,disabled:o||!r?.geminiCli?.installed})]}),d&&e.jsx("div",{className:"px-4 pb-4 pt-0",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{className:"text-sm text-muted-foreground whitespace-nowrap",children:"Model:"}),e.jsx($,{value:k,onChange:G=>S(G.target.value),onBlur:z,placeholder:"gemini-2.5-flash",className:"h-8 text-sm font-mono",disabled:o})]})}),!r?.geminiCli?.installed&&!m&&e.jsxs("div",{className:"px-4 pb-4 pt-0 border-t border-border/50",children:[e.jsxs("button",{onClick:()=>v(!f),className:"flex items-center gap-2 text-sm text-amber-600 dark:text-amber-400 hover:underline w-full py-2",children:[f?e.jsx(J,{className:"w-4 h-4"}):e.jsx(K,{className:"w-4 h-4"}),"How to install Gemini CLI"]}),f&&e.jsxs("div",{className:"mt-2 p-3 rounded-md bg-amber-50 dark:bg-amber-900/20 text-sm",children:[e.jsx("p",{className:"text-amber-700 dark:text-amber-300 mb-2",children:"Install globally (FREE tier available):"}),e.jsx("code",{className:"text-sm bg-amber-100 dark:bg-amber-900/40 px-2 py-1 rounded font-mono block mb-2",children:"npm install -g @google/gemini-cli"}),e.jsxs("a",{href:"https://github.com/google-gemini/gemini-cli",target:"_blank",rel:"noopener noreferrer",className:"text-amber-700 dark:text-amber-300 hover:underline inline-flex items-center gap-1",children:[e.jsx(q,{className:"w-3 h-3"}),"View documentation"]})]})]})]}),e.jsxs("div",{className:`rounded-lg border transition-colors ${h?"border-primary border-l-4":"border-border"}`,children:[e.jsxs("div",{className:"flex items-center justify-between p-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Y,{className:`w-5 h-5 ${h?"text-primary":"text-muted-foreground"}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"font-mono font-medium",children:"opencode"}),e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-green-500/10 text-green-600 font-medium",children:"FREE"}),r?.opencodeCli?.installed?e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-green-500/10 text-green-600 font-medium",children:"installed"}):e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-amber-500/10 text-amber-600 font-medium",children:"not installed"})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"OpenCode (web search via Zen)"})]})]}),e.jsx(B,{checked:h,onCheckedChange:I,disabled:o||!r?.opencodeCli?.installed})]}),h&&e.jsx("div",{className:"px-4 pb-4 pt-0",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{className:"text-sm text-muted-foreground whitespace-nowrap",children:"Model:"}),e.jsx($,{value:C,onChange:G=>l(G.target.value),onBlur:W,placeholder:"opencode/grok-code",className:"h-8 text-sm font-mono",disabled:o})]})}),!r?.opencodeCli?.installed&&!m&&e.jsxs("div",{className:"px-4 pb-4 pt-0 border-t border-border/50",children:[e.jsxs("button",{onClick:()=>D(!p),className:"flex items-center gap-2 text-sm text-purple-600 dark:text-purple-400 hover:underline w-full py-2",children:[p?e.jsx(J,{className:"w-4 h-4"}):e.jsx(K,{className:"w-4 h-4"}),"How to install OpenCode"]}),p&&e.jsxs("div",{className:"mt-2 p-3 rounded-md bg-purple-50 dark:bg-purple-900/20 text-sm",children:[e.jsx("p",{className:"text-purple-700 dark:text-purple-300 mb-2",children:"Install globally (FREE tier available):"}),e.jsx("code",{className:"text-sm bg-purple-100 dark:bg-purple-900/40 px-2 py-1 rounded font-mono block mb-2",children:"curl -fsSL https://opencode.ai/install | bash"}),e.jsxs("a",{href:"https://github.com/sst/opencode",target:"_blank",rel:"noopener noreferrer",className:"text-purple-700 dark:text-purple-300 hover:underline inline-flex items-center gap-1",children:[e.jsx(q,{className:"w-3 h-3"}),"View documentation"]})]})]})]}),e.jsxs("div",{className:`rounded-lg border transition-colors ${g?"border-primary border-l-4":"border-border"}`,children:[e.jsxs("div",{className:"flex items-center justify-between p-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Y,{className:`w-5 h-5 ${g?"text-primary":"text-muted-foreground"}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"font-mono font-medium",children:"grok"}),e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-blue-500/10 text-blue-600 font-medium",children:"GROK_API_KEY"}),r?.grokCli?.installed?e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-green-500/10 text-green-600 font-medium",children:"installed"}):e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-amber-500/10 text-amber-600 font-medium",children:"not installed"})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"xAI Grok CLI (web + X search)"})]})]}),e.jsx(B,{checked:g,onCheckedChange:w,disabled:o||!r?.grokCli?.installed})]}),!r?.grokCli?.installed&&!m&&e.jsxs("div",{className:"px-4 pb-4 pt-0 border-t border-border/50",children:[e.jsxs("button",{onClick:()=>L(!j),className:"flex items-center gap-2 text-sm text-blue-600 dark:text-blue-400 hover:underline w-full py-2",children:[j?e.jsx(J,{className:"w-4 h-4"}):e.jsx(K,{className:"w-4 h-4"}),"How to install Grok CLI"]}),j&&e.jsxs("div",{className:"mt-2 p-3 rounded-md bg-blue-50 dark:bg-blue-900/20 text-sm",children:[e.jsx("p",{className:"text-blue-700 dark:text-blue-300 mb-2",children:"Install globally (requires xAI API key):"}),e.jsx("code",{className:"text-sm bg-blue-100 dark:bg-blue-900/40 px-2 py-1 rounded font-mono block mb-2",children:"npm install -g @vibe-kit/grok-cli"}),e.jsxs("a",{href:"https://github.com/superagent-ai/grok-cli",target:"_blank",rel:"noopener noreferrer",className:"text-blue-700 dark:text-blue-300 hover:underline inline-flex items-center gap-1",children:[e.jsx(q,{className:"w-3 h-3"}),"View documentation"]})]})]})]})]})]})}),e.jsx("div",{className:"p-4 border-t bg-background",children:e.jsxs(b,{variant:"outline",size:"sm",onClick:()=>{R(),M()},disabled:E||o,className:"w-full",children:[e.jsx(y,{className:`w-4 h-4 mr-2 ${E?"animate-spin":""}`}),"Refresh"]})})]})}function qe({config:r,loading:m,saving:o,error:u,success:n,newEnvKey:d,newEnvValue:g,setNewEnvKey:h,setNewEnvValue:k,toggleGlobalEnv:C,addEnvVar:f,removeEnvVar:p,fetchGlobalEnvConfig:j,fetchRawConfig:S}){return m?e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsxs("div",{className:"flex items-center gap-3 text-muted-foreground",children:[e.jsx(y,{className:"w-5 h-5 animate-spin"}),e.jsx("span",{children:"Loading..."})]})}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`absolute left-5 right-5 top-20 z-10 transition-all duration-200 ease-out ${u||n?"opacity-100 translate-y-0":"opacity-0 -translate-y-2 pointer-events-none"}`,children:[u&&e.jsxs(me,{variant:"destructive",className:"py-2 shadow-lg",children:[e.jsx(pe,{className:"h-4 w-4"}),e.jsx(xe,{children:u})]}),n&&e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-md border border-green-200 bg-green-50 text-green-700 shadow-lg dark:border-green-900/50 dark:bg-green-900/90 dark:text-green-300",children:[e.jsx(ue,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"text-sm font-medium",children:"Saved"})]})]}),e.jsx(he,{className:"flex-1",children:e.jsxs("div",{className:"p-5 space-y-6",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Environment variables injected into all non-Claude subscription profiles (gemini, codex, agy, copilot, etc.)"}),e.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg bg-muted/50",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:r?.enabled?"Global Env enabled":"Global Env disabled"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:r?.enabled?"Env vars will be injected into third-party profiles":"Env vars will not be injected"})]}),e.jsx(B,{checked:r?.enabled??!0,onCheckedChange:C})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-base font-medium",children:"Environment Variables"}),r?.env&&Object.keys(r.env).length>0?e.jsx("div",{className:"space-y-2",children:Object.entries(r.env).map(([l,v])=>e.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-lg border bg-background",children:[e.jsx("code",{className:"flex-1 font-mono text-sm truncate",children:l}),e.jsx("span",{className:"text-muted-foreground",children:"="}),e.jsx("code",{className:"font-mono text-sm px-2 py-1 bg-muted rounded",children:v}),e.jsx(b,{variant:"ghost",size:"sm",onClick:()=>p(l),disabled:o,className:"h-8 w-8 p-0 text-destructive hover:text-destructive hover:bg-destructive/10",children:e.jsx(Ye,{className:"w-4 h-4"})})]},l))}):e.jsx("div",{className:"p-4 rounded-lg border border-dashed text-center text-muted-foreground",children:e.jsx("p",{children:"No environment variables configured"})}),e.jsxs("div",{className:"p-4 rounded-lg border bg-muted/30",children:[e.jsx("h4",{className:"text-sm font-medium mb-3",children:"Add New Variable"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx($,{value:d,onChange:l=>h(l.target.value.toUpperCase()),placeholder:"KEY_NAME",className:"flex-1 font-mono text-sm h-9",disabled:o}),e.jsx("span",{className:"flex items-center text-muted-foreground",children:"="}),e.jsx($,{value:g,onChange:l=>k(l.target.value),placeholder:"value",className:"flex-1 font-mono text-sm h-9",disabled:o}),e.jsxs(b,{size:"sm",onClick:f,disabled:o||!d.trim(),className:"h-9",children:[e.jsx(Je,{className:"w-4 h-4 mr-1"}),"Add"]})]})]}),e.jsxs("div",{className:"p-4 rounded-lg border bg-muted/30",children:[e.jsx("h4",{className:"text-sm font-medium mb-3",children:"Quick Add Common Variables"}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[[{key:"DISABLE_BUG_COMMAND",value:"1"},{key:"DISABLE_ERROR_REPORTING",value:"1"},{key:"DISABLE_TELEMETRY",value:"1"}].map(({key:l,value:v})=>!r?.env?.[l]&&e.jsxs(b,{variant:"outline",size:"sm",onClick:()=>{h(l),k(v)},className:"text-xs font-mono",children:["+ ",l]},l)),r?.env&&["DISABLE_BUG_COMMAND","DISABLE_ERROR_REPORTING","DISABLE_TELEMETRY"].every(l=>r.env[l])&&e.jsx("span",{className:"text-sm text-muted-foreground",children:"All common variables are configured"})]})]})]})]})}),e.jsx("div",{className:"p-4 border-t bg-background",children:e.jsxs(b,{variant:"outline",size:"sm",onClick:()=>{j(),S()},disabled:m||o,className:"w-full",children:[e.jsx(y,{className:`w-4 h-4 mr-2 ${m?"animate-spin":""}`}),"Refresh"]})})]})}export{is as SettingsPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./radix-ui-
|
|
1
|
+
import{j as s}from"./radix-ui-DFHQr9A5.js";import{r as d}from"./react-vendor-FspHSO0w.js";import{C as l,a as m}from"./card-tk5ihPK8.js";import{aa as c,ab as x,a5 as u,ac as h,a6 as p,B as g}from"./index-c9idYjfn.js";import{s as j,Y as f,aq as N,T as b}from"./icons-U_6eBV_J.js";import"./tanstack-C4gT2P7V.js";import"./notifications-B2Pz7lik.js";import"./utils-CzKF5WmX.js";import"./form-utils-BuXDJb0w.js";import"./code-highlight-BoHWVYut.js";function q(){const[t,r]=d.useState("commands"),{data:e}=c(),{data:n,isLoading:i}=x(t),o=[{id:"commands",label:"Commands",icon:j,count:e?.commands??0},{id:"skills",label:"Skills",icon:f,count:e?.skills??0},{id:"agents",label:"Agents",icon:N,count:e?.agents??0}];return s.jsxs("div",{className:"p-6 max-w-6xl mx-auto space-y-8",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Shared Data"}),s.jsx("p",{className:"text-muted-foreground",children:"Commands, skills, and agents shared across Claude instances"})]}),e&&!e.symlinkStatus.valid&&s.jsxs(u,{variant:"warning",children:[s.jsx(b,{className:"h-4 w-4"}),s.jsx(h,{children:"Configuration Required"}),s.jsxs(p,{children:[e.symlinkStatus.message,". Run `ccs sync` to configure."]})]}),s.jsx("div",{className:"flex gap-2 border-b pb-2",children:o.map(a=>s.jsxs(g,{variant:t===a.id?"default":"ghost",size:"sm",onClick:()=>r(a.id),className:"flex items-center gap-2",children:[s.jsx(a.icon,{className:"w-4 h-4"}),a.label," (",a.count,")"]},a.id))}),s.jsx("div",{className:"mt-4",children:i?s.jsx("div",{className:"text-muted-foreground",children:"Loading..."}):n?.items.length===0?s.jsxs("div",{className:"text-muted-foreground",children:["No ",t," found"]}):s.jsx("div",{className:"grid gap-3",children:n?.items.map(a=>s.jsx(l,{children:s.jsxs(m,{children:[s.jsx("div",{className:"font-medium",children:a.name}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:a.description}),s.jsx("p",{className:"text-xs text-muted-foreground mt-2 font-mono truncate",children:a.path})]})},a.name))})})]})}export{q as SharedPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a,a8 as s,a9 as n}from"./radix-ui-
|
|
1
|
+
import{j as a,a8 as s,a9 as n}from"./radix-ui-DFHQr9A5.js";import"./react-vendor-FspHSO0w.js";import{c as e}from"./index-c9idYjfn.js";function c({className:t,...r}){return a.jsx(s,{"data-slot":"switch",className:e("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...r,children:a.jsx(n,{"data-slot":"switch-thumb",className:e("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}export{c as S};
|