astro-md-editor 0.0.6 → 0.0.7

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.
@@ -14,4 +14,4 @@ Error generating stack: `+l.message+`
14
14
  `)}else{const h=c.indexOf(`
15
15
  `);if(h>=0){const b=c.slice(0,h).trim();c=c.slice(h+1),b.length>0&&(m=JSON.parse(b),f=!0)}}}return(async()=>{try{for(;;){const{value:g,done:y}=await o.read();g&&(c+=g);const h=c.lastIndexOf(`
16
16
  `);if(h>=0){const b=c.slice(0,h);c=c.slice(h+1);const p=b.split(`
17
- `).filter(Boolean);for(const S of p)try{s(JSON.parse(S))}catch(E){i?.(`Invalid JSON line: ${S}`,E)}}if(y)break}}catch(g){i?.("Stream processing error:",g)}})(),s(m)}async function vE({jsonStream:a,onMessage:s,onError:i}){const o=a.getReader(),{value:c,done:f}=await o.read();if(f||!c)throw new Error("Stream ended before first object");const m=JSON.parse(c);return(async()=>{try{for(;;){const{value:g,done:y}=await o.read();if(y)break;if(g)try{s(JSON.parse(g))}catch(h){i?.(`Invalid JSON: ${g}`,h)}}}catch(g){i?.("Stream processing error:",g)}})(),s(m)}function E0(a){const s="/_serverFn/"+a;return Object.assign((...c)=>{const f=yf()?.serverFns?.fetch;return mE(s,c,f??fetch)},{url:s,serverFnMeta:{id:a},[Pc]:!0})}const bE={key:"$TSS/serverfn",test:a=>typeof a!="function"||!(Pc in a)?!1:!!a[Pc],toSerializable:({serverFnMeta:a})=>({functionId:a.id}),fromSerializable:({functionId:a})=>E0(a)};var qc={exports:{}},Yc={};var ay;function SE(){if(ay)return Yc;ay=1;var a=fi().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return Yc.c=function(s){return a.H.useMemoCache(s)},Yc}var ly;function _E(){return ly||(ly=1,qc.exports=SE()),qc.exports}var so=_E();const x0=()=>{throw new Error("createServerOnlyFn() functions can only be called on the server!")};function iy(a){return a!=="__proto__"&&a!=="constructor"&&a!=="prototype"}function Fc(a,s){const i=Object.create(null);if(a)for(const o of Object.keys(a))iy(o)&&(i[o]=a[o]);if(s&&typeof s=="object")for(const o of Object.keys(s))iy(o)&&(i[o]=s[o]);return i}function w0(a){return Object.create(null)}const qr=(a,s)=>{const i=s||a||{};return typeof i.method>"u"&&(i.method="GET"),Object.assign(f=>{const m={...i,...f};return qr(void 0,m)},{options:i,middleware:f=>{const m=[...i.middleware||[]];f.map(h=>{Fp in h?h.options.middleware&&m.push(...h.options.middleware):m.push(h)});const g={...i,middleware:m},y=qr(void 0,g);return y[Fp]=!0,y},inputValidator:f=>{const m={...i,inputValidator:f};return qr(void 0,m)},handler:(...f)=>{const[m,g]=f,y={...i,extractedFn:m,serverFn:g},h=[...y.middleware||[],wE(y)];return m.method=i.method,Object.assign(async b=>{const p=await sy(h,"client",{...m,...y,data:b?.data,headers:b?.headers,signal:b?.signal,fetch:b?.fetch,context:w0()}),S=Ty(p.error);if(S)throw S;if(p.error)throw p.error;return p.result},{...m,method:i.method,__executeServer:async b=>{const p=x0(),S=p.contextAfterGlobalMiddlewares,E={...m,...b,serverFnMeta:m.serverFnMeta,context:Fc(S,b.context),request:p.request};return await sy(h,"server",E).then(z=>({result:z.result,error:z.error,context:z.sendContext}))}})}})};async function sy(a,s,i){const o=yf()?.functionMiddleware||[];let c=EE([...o,...a]);if(s==="server"){const m=x0();m?.executedRequestMiddlewares&&(c=c.filter(g=>!m.executedRequestMiddlewares.has(g)))}const f=async m=>{const g=c.shift();if(!g)return m;try{"inputValidator"in g.options&&g.options.inputValidator&&s==="server"&&(m.data=await xE(g.options.inputValidator,m.data));let y;if(s==="client"?"client"in g.options&&(y=g.options.client):"server"in g.options&&(y=g.options.server),y){const b=await y({...m,next:async(p={})=>{const S={...m,...p,context:Fc(m.context,p.context),sendContext:Fc(m.sendContext,p.sendContext),headers:eE(m.headers,p.headers),_callSiteFetch:m._callSiteFetch,fetch:m._callSiteFetch??p.fetch??m.fetch,result:p.result!==void 0?p.result:p instanceof Response?p:m.result,error:p.error??m.error},E=await f(S);if(E.error)throw E.error;return E}});if(qe(b))return{...m,error:b};if(b instanceof Response)return{...m,result:b};if(!b)throw new Error("User middleware returned undefined. You must call next() or return a result in your middlewares.");return b}return f(m)}catch(y){return{...m,error:y}}};return f({...i,headers:i.headers||{},sendContext:i.sendContext||{},context:i.context||w0(),_callSiteFetch:i.fetch})}function EE(a,s=100){const i=new Set,o=[],c=(f,m)=>{if(m>s)throw new Error(`Middleware nesting depth exceeded maximum of ${s}. Check for circular references.`);f.forEach(g=>{g.options.middleware&&c(g.options.middleware,m+1),i.has(g)||(i.add(g),o.push(g))})};return c(a,0),o}async function xE(a,s){if(a==null)return{};if("~standard"in a){const i=await a["~standard"].validate(s);if(i.issues)throw new Error(JSON.stringify(i.issues,void 0,2));return i.value}if("parse"in a)return a.parse(s);if(typeof a=="function")return a(s);throw new Error("Invalid validator type!")}function wE(a){return{"~types":void 0,options:{inputValidator:a.inputValidator,client:async({next:s,sendContext:i,fetch:o,...c})=>{const f={...c,context:i,fetch:o},m=await a.extractedFn?.(f);return s(m)},server:async({next:s,...i})=>{const o=await a.serverFn?.(i);return s({...i,result:o})}}}}const TE="/assets/styles-CezfLgHY.css",T0=et.createContext(null);function RE(a){const s=so.c(3),{value:i,children:o}=a;let c;return s[0]!==o||s[1]!==i?(c=P.jsx(T0.Provider,{value:i,children:o}),s[0]=o,s[1]=i,s[2]=c):c=s[2],c}function Kx(){const a=et.useContext(T0);if(!a)throw new Error("useCollectionsData must be used within CollectionsDataProvider");return a}const ry={};function AE(a,s){const i=et.useRef(ry);return i.current===ry&&(i.current=a(s)),i}const ME=[];function OE(a){et.useEffect(a,ME)}const os=0;class ro{static create(){return new ro}currentId=os;start(s,i){this.clear(),this.currentId=setTimeout(()=>{this.currentId=os,i()},s)}isStarted(){return this.currentId!==os}clear=()=>{this.currentId!==os&&(clearTimeout(this.currentId),this.currentId=os)};disposeEffect=()=>this.clear}function CE(){const a=AE(ro.create).current;return OE(a.disposeEffect),a}const zE=et.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new ro,currentIdRef:{current:null},currentContextRef:{current:null}});function DE(a){const{children:s,delay:i,timeoutMs:o=0}=a,c=et.useRef(i),f=et.useRef(i),m=et.useRef(null),g=et.useRef(null),y=CE();return P.jsx(zE.Provider,{value:et.useMemo(()=>({hasProvider:!0,delayRef:c,initialDelayRef:f,currentIdRef:m,timeoutMs:o,currentContextRef:g,timeout:y}),[o,y]),children:s})}const NE=et.createContext(void 0),LE=function(s){const{delay:i,closeDelay:o,timeout:c=400}=s,f=et.useMemo(()=>({delay:i,closeDelay:o}),[i,o]),m=et.useMemo(()=>({open:i,close:o}),[i,o]);return P.jsx(NE.Provider,{value:f,children:P.jsx(DE,{delay:m,timeoutMs:c,children:s.children})})};function BE(a){const s=so.c(6);let i,o;s[0]!==a?({delay:o,...i}=a,s[0]=a,s[1]=i,s[2]=o):(i=s[1],o=s[2]);const c=o===void 0?0:o;let f;return s[3]!==c||s[4]!==i?(f=P.jsx(LE,{"data-slot":"tooltip-provider",delay:c,...i}),s[3]=c,s[4]=i,s[5]=f):f=s[5],f}const R0=(...a)=>a.filter((s,i,o)=>!!s&&s.trim()!==""&&o.indexOf(s)===i).join(" ").trim();const UE=a=>a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const jE=a=>a.replace(/^([A-Z])|[\s-_]+(\w)/g,(s,i,o)=>o?o.toUpperCase():i.toLowerCase());const oy=a=>{const s=jE(a);return s.charAt(0).toUpperCase()+s.slice(1)};var HE={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const qE=a=>{for(const s in a)if(s.startsWith("aria-")||s==="role"||s==="title")return!0;return!1};const YE=et.forwardRef(({color:a="currentColor",size:s=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:c="",children:f,iconNode:m,...g},y)=>et.createElement("svg",{ref:y,...HE,width:s,height:s,stroke:a,strokeWidth:o?Number(i)*24/Number(s):i,className:R0("lucide",c),...!f&&!qE(g)&&{"aria-hidden":"true"},...g},[...m.map(([h,b])=>et.createElement(h,b)),...Array.isArray(f)?f:[f]]));const ys=(a,s)=>{const i=et.forwardRef(({className:o,...c},f)=>et.createElement(YE,{ref:f,iconNode:s,className:R0(`lucide-${UE(oy(a))}`,`lucide-${a}`,o),...c}));return i.displayName=oy(a),i};const GE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],VE=ys("circle-check",GE);const XE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],QE=ys("info",XE);const ZE=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],kE=ys("loader-circle",ZE);const KE=[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],JE=ys("octagon-x",KE);const PE=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],FE=ys("triangle-alert",PE);function IE(a){if(typeof document>"u")return;let s=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",s.appendChild(i),i.styleSheet?i.styleSheet.cssText=a:i.appendChild(document.createTextNode(a))}const $E=a=>{switch(a){case"success":return ex;case"info":return ax;case"warning":return nx;case"error":return lx;default:return null}},WE=Array(12).fill(0),tx=({visible:a,className:s})=>F.createElement("div",{className:["sonner-loading-wrapper",s].filter(Boolean).join(" "),"data-visible":a},F.createElement("div",{className:"sonner-spinner"},WE.map((i,o)=>F.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),ex=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.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"})),nx=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},F.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"})),ax=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.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"})),lx=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.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"})),ix=F.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"},F.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),F.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),sx=()=>{const[a,s]=F.useState(document.hidden);return F.useEffect(()=>{const i=()=>{s(document.hidden)};return document.addEventListener("visibilitychange",i),()=>window.removeEventListener("visibilitychange",i)},[]),a};let Ic=1;class rx{constructor(){this.subscribe=s=>(this.subscribers.push(s),()=>{const i=this.subscribers.indexOf(s);this.subscribers.splice(i,1)}),this.publish=s=>{this.subscribers.forEach(i=>i(s))},this.addToast=s=>{this.publish(s),this.toasts=[...this.toasts,s]},this.create=s=>{var i;const{message:o,...c}=s,f=typeof s?.id=="number"||((i=s.id)==null?void 0:i.length)>0?s.id:Ic++,m=this.toasts.find(y=>y.id===f),g=s.dismissible===void 0?!0:s.dismissible;return this.dismissedToasts.has(f)&&this.dismissedToasts.delete(f),m?this.toasts=this.toasts.map(y=>y.id===f?(this.publish({...y,...s,id:f,title:o}),{...y,...s,id:f,dismissible:g,title:o}):y):this.addToast({title:o,...c,dismissible:g,id:f}),f},this.dismiss=s=>(s?(this.dismissedToasts.add(s),requestAnimationFrame(()=>this.subscribers.forEach(i=>i({id:s,dismiss:!0})))):this.toasts.forEach(i=>{this.subscribers.forEach(o=>o({id:i.id,dismiss:!0}))}),s),this.message=(s,i)=>this.create({...i,message:s}),this.error=(s,i)=>this.create({...i,message:s,type:"error"}),this.success=(s,i)=>this.create({...i,type:"success",message:s}),this.info=(s,i)=>this.create({...i,type:"info",message:s}),this.warning=(s,i)=>this.create({...i,type:"warning",message:s}),this.loading=(s,i)=>this.create({...i,type:"loading",message:s}),this.promise=(s,i)=>{if(!i)return;let o;i.loading!==void 0&&(o=this.create({...i,promise:s,type:"loading",message:i.loading,description:typeof i.description!="function"?i.description:void 0}));const c=Promise.resolve(s instanceof Function?s():s);let f=o!==void 0,m;const g=c.then(async h=>{if(m=["resolve",h],F.isValidElement(h))f=!1,this.create({id:o,type:"default",message:h});else if(ux(h)&&!h.ok){f=!1;const p=typeof i.error=="function"?await i.error(`HTTP error! status: ${h.status}`):i.error,S=typeof i.description=="function"?await i.description(`HTTP error! status: ${h.status}`):i.description,w=typeof p=="object"&&!F.isValidElement(p)?p:{message:p};this.create({id:o,type:"error",description:S,...w})}else if(h instanceof Error){f=!1;const p=typeof i.error=="function"?await i.error(h):i.error,S=typeof i.description=="function"?await i.description(h):i.description,w=typeof p=="object"&&!F.isValidElement(p)?p:{message:p};this.create({id:o,type:"error",description:S,...w})}else if(i.success!==void 0){f=!1;const p=typeof i.success=="function"?await i.success(h):i.success,S=typeof i.description=="function"?await i.description(h):i.description,w=typeof p=="object"&&!F.isValidElement(p)?p:{message:p};this.create({id:o,type:"success",description:S,...w})}}).catch(async h=>{if(m=["reject",h],i.error!==void 0){f=!1;const b=typeof i.error=="function"?await i.error(h):i.error,p=typeof i.description=="function"?await i.description(h):i.description,E=typeof b=="object"&&!F.isValidElement(b)?b:{message:b};this.create({id:o,type:"error",description:p,...E})}}).finally(()=>{f&&(this.dismiss(o),o=void 0),i.finally==null||i.finally.call(i)}),y=()=>new Promise((h,b)=>g.then(()=>m[0]==="reject"?b(m[1]):h(m[1])).catch(b));return typeof o!="string"&&typeof o!="number"?{unwrap:y}:Object.assign(o,{unwrap:y})},this.custom=(s,i)=>{const o=i?.id||Ic++;return this.create({jsx:s(o),id:o,...i}),o},this.getActiveToasts=()=>this.toasts.filter(s=>!this.dismissedToasts.has(s.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const He=new rx,ox=(a,s)=>{const i=s?.id||Ic++;return He.addToast({title:a,...s,id:i}),i},ux=a=>a&&typeof a=="object"&&"ok"in a&&typeof a.ok=="boolean"&&"status"in a&&typeof a.status=="number",cx=ox,fx=()=>He.toasts,dx=()=>He.getActiveToasts(),Jx=Object.assign(cx,{success:He.success,info:He.info,warning:He.warning,error:He.error,custom:He.custom,message:He.message,promise:He.promise,dismiss:He.dismiss,loading:He.loading},{getHistory:fx,getToasts:dx});IE("[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 Lr(a){return a.label!==void 0}const hx=3,mx="24px",px="16px",uy=4e3,yx=356,gx=14,vx=45,bx=200;function En(...a){return a.filter(Boolean).join(" ")}function Sx(a){const[s,i]=a.split("-"),o=[];return s&&o.push(s),i&&o.push(i),o}const _x=a=>{var s,i,o,c,f,m,g,y,h;const{invert:b,toast:p,unstyled:S,interacting:E,setHeights:w,visibleToasts:z,heights:R,index:O,toasts:X,expanded:Z,removeToast:V,defaultRichColors:$,closeButton:tt,style:k,cancelButtonStyle:q,actionButtonStyle:I,className:ct="",descriptionClassName:st="",duration:at,position:xt,gap:wt,expandByDefault:qt,classNames:D,icons:K,closeButtonAriaLabel:it="Close toast"}=a,[vt,mt]=F.useState(null),[A,Y]=F.useState(null),[Q,J]=F.useState(!1),[W,ot]=F.useState(!1),[gt,ft]=F.useState(!1),[Rt,Te]=F.useState(!1),[Re,Ee]=F.useState(!1),[Na,Ae]=F.useState(0),[La,Rn]=F.useState(0),pn=F.useRef(p.duration||at||uy),Fe=F.useRef(null),ue=F.useRef(null),Ye=O===0,Ba=O+1<=z,ce=p.type,un=p.dismissible!==!1,fe=p.className||"",hl=p.descriptionClassName||"",At=F.useMemo(()=>R.findIndex(dt=>dt.toastId===p.id)||0,[R,p.id]),kt=F.useMemo(()=>{var dt;return(dt=p.closeButton)!=null?dt:tt},[p.closeButton,tt]),ee=F.useMemo(()=>p.duration||at||uy,[p.duration,at]),In=F.useRef(0),An=F.useRef(0),gs=F.useRef(0),$n=F.useRef(null),[Ua,xe]=xt.split("-"),cn=F.useMemo(()=>R.reduce((dt,Vt,se)=>se>=At?dt:dt+Vt.height,0),[R,At]),ge=sx(),oo=p.invert||b,di=ce==="loading";An.current=F.useMemo(()=>At*wt+cn,[At,cn]),F.useEffect(()=>{pn.current=ee},[ee]),F.useEffect(()=>{J(!0)},[]),F.useEffect(()=>{const dt=ue.current;if(dt){const Vt=dt.getBoundingClientRect().height;return Rn(Vt),w(se=>[{toastId:p.id,height:Vt,position:p.position},...se]),()=>w(se=>se.filter(ve=>ve.toastId!==p.id))}},[w,p.id]),F.useLayoutEffect(()=>{if(!Q)return;const dt=ue.current,Vt=dt.style.height;dt.style.height="auto";const se=dt.getBoundingClientRect().height;dt.style.height=Vt,Rn(se),w(ve=>ve.find(Zt=>Zt.toastId===p.id)?ve.map(Zt=>Zt.toastId===p.id?{...Zt,height:se}:Zt):[{toastId:p.id,height:se,position:p.position},...ve])},[Q,p.title,p.description,w,p.id,p.jsx,p.action,p.cancel]);const yn=F.useCallback(()=>{ot(!0),Ae(An.current),w(dt=>dt.filter(Vt=>Vt.toastId!==p.id)),setTimeout(()=>{V(p)},bx)},[p,V,w,An]);F.useEffect(()=>{if(p.promise&&ce==="loading"||p.duration===1/0||p.type==="loading")return;let dt;return Z||E||ge?(()=>{if(gs.current<In.current){const ve=new Date().getTime()-In.current;pn.current=pn.current-ve}gs.current=new Date().getTime()})():pn.current!==1/0&&(In.current=new Date().getTime(),dt=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),yn()},pn.current)),()=>clearTimeout(dt)},[Z,E,p,ce,ge,yn]),F.useEffect(()=>{p.delete&&(yn(),p.onDismiss==null||p.onDismiss.call(p,p))},[yn,p.delete]);function ml(){var dt;if(K?.loading){var Vt;return F.createElement("div",{className:En(D?.loader,p==null||(Vt=p.classNames)==null?void 0:Vt.loader,"sonner-loader"),"data-visible":ce==="loading"},K.loading)}return F.createElement(tx,{className:En(D?.loader,p==null||(dt=p.classNames)==null?void 0:dt.loader),visible:ce==="loading"})}const pl=p.icon||K?.[ce]||$E(ce);var ja,gn;return F.createElement("li",{tabIndex:0,ref:ue,className:En(ct,fe,D?.toast,p==null||(s=p.classNames)==null?void 0:s.toast,D?.default,D?.[ce],p==null||(i=p.classNames)==null?void 0:i[ce]),"data-sonner-toast":"","data-rich-colors":(ja=p.richColors)!=null?ja:$,"data-styled":!(p.jsx||p.unstyled||S),"data-mounted":Q,"data-promise":!!p.promise,"data-swiped":Re,"data-removed":W,"data-visible":Ba,"data-y-position":Ua,"data-x-position":xe,"data-index":O,"data-front":Ye,"data-swiping":gt,"data-dismissible":un,"data-type":ce,"data-invert":oo,"data-swipe-out":Rt,"data-swipe-direction":A,"data-expanded":!!(Z||qt&&Q),"data-testid":p.testId,style:{"--index":O,"--toasts-before":O,"--z-index":X.length-O,"--offset":`${W?Na:An.current}px`,"--initial-height":qt?"auto":`${La}px`,...k,...p.style},onDragEnd:()=>{ft(!1),mt(null),$n.current=null},onPointerDown:dt=>{dt.button!==2&&(di||!un||(Fe.current=new Date,Ae(An.current),dt.target.setPointerCapture(dt.pointerId),dt.target.tagName!=="BUTTON"&&(ft(!0),$n.current={x:dt.clientX,y:dt.clientY})))},onPointerUp:()=>{var dt,Vt,se;if(Rt||!un)return;$n.current=null;const ve=Number(((dt=ue.current)==null?void 0:dt.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Wn=Number(((Vt=ue.current)==null?void 0:Vt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Zt=new Date().getTime()-((se=Fe.current)==null?void 0:se.getTime()),Me=vt==="x"?ve:Wn,Ha=Math.abs(Me)/Zt;if(Math.abs(Me)>=vx||Ha>.11){Ae(An.current),p.onDismiss==null||p.onDismiss.call(p,p),Y(vt==="x"?ve>0?"right":"left":Wn>0?"down":"up"),yn(),Te(!0);return}else{var Oe,Ce;(Oe=ue.current)==null||Oe.style.setProperty("--swipe-amount-x","0px"),(Ce=ue.current)==null||Ce.style.setProperty("--swipe-amount-y","0px")}Ee(!1),ft(!1),mt(null)},onPointerMove:dt=>{var Vt,se,ve;if(!$n.current||!un||((Vt=window.getSelection())==null?void 0:Vt.toString().length)>0)return;const Zt=dt.clientY-$n.current.y,Me=dt.clientX-$n.current.x;var Ha;const Oe=(Ha=a.swipeDirections)!=null?Ha:Sx(xt);!vt&&(Math.abs(Me)>1||Math.abs(Zt)>1)&&mt(Math.abs(Me)>Math.abs(Zt)?"x":"y");let Ce={x:0,y:0};const yl=fn=>1/(1.5+Math.abs(fn)/20);if(vt==="y"){if(Oe.includes("top")||Oe.includes("bottom"))if(Oe.includes("top")&&Zt<0||Oe.includes("bottom")&&Zt>0)Ce.y=Zt;else{const fn=Zt*yl(Zt);Ce.y=Math.abs(fn)<Math.abs(Zt)?fn:Zt}}else if(vt==="x"&&(Oe.includes("left")||Oe.includes("right")))if(Oe.includes("left")&&Me<0||Oe.includes("right")&&Me>0)Ce.x=Me;else{const fn=Me*yl(Me);Ce.x=Math.abs(fn)<Math.abs(Me)?fn:Me}(Math.abs(Ce.x)>0||Math.abs(Ce.y)>0)&&Ee(!0),(se=ue.current)==null||se.style.setProperty("--swipe-amount-x",`${Ce.x}px`),(ve=ue.current)==null||ve.style.setProperty("--swipe-amount-y",`${Ce.y}px`)}},kt&&!p.jsx&&ce!=="loading"?F.createElement("button",{"aria-label":it,"data-disabled":di,"data-close-button":!0,onClick:di||!un?()=>{}:()=>{yn(),p.onDismiss==null||p.onDismiss.call(p,p)},className:En(D?.closeButton,p==null||(o=p.classNames)==null?void 0:o.closeButton)},(gn=K?.close)!=null?gn:ix):null,(ce||p.icon||p.promise)&&p.icon!==null&&(K?.[ce]!==null||p.icon)?F.createElement("div",{"data-icon":"",className:En(D?.icon,p==null||(c=p.classNames)==null?void 0:c.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||ml():null,p.type!=="loading"?pl:null):null,F.createElement("div",{"data-content":"",className:En(D?.content,p==null||(f=p.classNames)==null?void 0:f.content)},F.createElement("div",{"data-title":"",className:En(D?.title,p==null||(m=p.classNames)==null?void 0:m.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?F.createElement("div",{"data-description":"",className:En(st,hl,D?.description,p==null||(g=p.classNames)==null?void 0:g.description)},typeof p.description=="function"?p.description():p.description):null),F.isValidElement(p.cancel)?p.cancel:p.cancel&&Lr(p.cancel)?F.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||q,onClick:dt=>{Lr(p.cancel)&&un&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,dt),yn())},className:En(D?.cancelButton,p==null||(y=p.classNames)==null?void 0:y.cancelButton)},p.cancel.label):null,F.isValidElement(p.action)?p.action:p.action&&Lr(p.action)?F.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||I,onClick:dt=>{Lr(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,dt),!dt.defaultPrevented&&yn())},className:En(D?.actionButton,p==null||(h=p.classNames)==null?void 0:h.actionButton)},p.action.label):null)};function cy(){if(typeof window>"u"||typeof document>"u")return"ltr";const a=document.documentElement.getAttribute("dir");return a==="auto"||!a?window.getComputedStyle(document.documentElement).direction:a}function Ex(a,s){const i={};return[a,s].forEach((o,c)=>{const f=c===1,m=f?"--mobile-offset":"--offset",g=f?px:mx;function y(h){["top","right","bottom","left"].forEach(b=>{i[`${m}-${b}`]=typeof h=="number"?`${h}px`:h})}typeof o=="number"||typeof o=="string"?y(o):typeof o=="object"?["top","right","bottom","left"].forEach(h=>{o[h]===void 0?i[`${m}-${h}`]=g:i[`${m}-${h}`]=typeof o[h]=="number"?`${o[h]}px`:o[h]}):y(g)}),i}const xx=F.forwardRef(function(s,i){const{id:o,invert:c,position:f="bottom-right",hotkey:m=["altKey","KeyT"],expand:g,closeButton:y,className:h,offset:b,mobileOffset:p,theme:S="light",richColors:E,duration:w,style:z,visibleToasts:R=hx,toastOptions:O,dir:X=cy(),gap:Z=gx,icons:V,containerAriaLabel:$="Notifications"}=s,[tt,k]=F.useState([]),q=F.useMemo(()=>o?tt.filter(Q=>Q.toasterId===o):tt.filter(Q=>!Q.toasterId),[tt,o]),I=F.useMemo(()=>Array.from(new Set([f].concat(q.filter(Q=>Q.position).map(Q=>Q.position)))),[q,f]),[ct,st]=F.useState([]),[at,xt]=F.useState(!1),[wt,qt]=F.useState(!1),[D,K]=F.useState(S!=="system"?S:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),it=F.useRef(null),vt=m.join("+").replace(/Key/g,"").replace(/Digit/g,""),mt=F.useRef(null),A=F.useRef(!1),Y=F.useCallback(Q=>{k(J=>{var W;return(W=J.find(ot=>ot.id===Q.id))!=null&&W.delete||He.dismiss(Q.id),J.filter(({id:ot})=>ot!==Q.id)})},[]);return F.useEffect(()=>He.subscribe(Q=>{if(Q.dismiss){requestAnimationFrame(()=>{k(J=>J.map(W=>W.id===Q.id?{...W,delete:!0}:W))});return}setTimeout(()=>{E2.flushSync(()=>{k(J=>{const W=J.findIndex(ot=>ot.id===Q.id);return W!==-1?[...J.slice(0,W),{...J[W],...Q},...J.slice(W+1)]:[Q,...J]})})})}),[tt]),F.useEffect(()=>{if(S!=="system"){K(S);return}if(S==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?K("dark"):K("light")),typeof window>"u")return;const Q=window.matchMedia("(prefers-color-scheme: dark)");try{Q.addEventListener("change",({matches:J})=>{K(J?"dark":"light")})}catch{Q.addListener(({matches:W})=>{try{K(W?"dark":"light")}catch(ot){console.error(ot)}})}},[S]),F.useEffect(()=>{tt.length<=1&&xt(!1)},[tt]),F.useEffect(()=>{const Q=J=>{var W;if(m.every(ft=>J[ft]||J.code===ft)){var gt;xt(!0),(gt=it.current)==null||gt.focus()}J.code==="Escape"&&(document.activeElement===it.current||(W=it.current)!=null&&W.contains(document.activeElement))&&xt(!1)};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[m]),F.useEffect(()=>{if(it.current)return()=>{mt.current&&(mt.current.focus({preventScroll:!0}),mt.current=null,A.current=!1)}},[it.current]),F.createElement("section",{ref:i,"aria-label":`${$} ${vt}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},I.map((Q,J)=>{var W;const[ot,gt]=Q.split("-");return q.length?F.createElement("ol",{key:Q,dir:X==="auto"?cy():X,tabIndex:-1,ref:it,className:h,"data-sonner-toaster":!0,"data-sonner-theme":D,"data-y-position":ot,"data-x-position":gt,style:{"--front-toast-height":`${((W=ct[0])==null?void 0:W.height)||0}px`,"--width":`${yx}px`,"--gap":`${Z}px`,...z,...Ex(b,p)},onBlur:ft=>{A.current&&!ft.currentTarget.contains(ft.relatedTarget)&&(A.current=!1,mt.current&&(mt.current.focus({preventScroll:!0}),mt.current=null))},onFocus:ft=>{ft.target instanceof HTMLElement&&ft.target.dataset.dismissible==="false"||A.current||(A.current=!0,mt.current=ft.relatedTarget)},onMouseEnter:()=>xt(!0),onMouseMove:()=>xt(!0),onMouseLeave:()=>{wt||xt(!1)},onDragEnd:()=>xt(!1),onPointerDown:ft=>{ft.target instanceof HTMLElement&&ft.target.dataset.dismissible==="false"||qt(!0)},onPointerUp:()=>qt(!1)},q.filter(ft=>!ft.position&&J===0||ft.position===Q).map((ft,Rt)=>{var Te,Re;return F.createElement(_x,{key:ft.id,icons:V,index:Rt,toast:ft,defaultRichColors:E,duration:(Te=O?.duration)!=null?Te:w,className:O?.className,descriptionClassName:O?.descriptionClassName,invert:c,visibleToasts:R,closeButton:(Re=O?.closeButton)!=null?Re:y,interacting:wt,position:Q,style:O?.style,unstyled:O?.unstyled,classNames:O?.classNames,cancelButtonStyle:O?.cancelButtonStyle,actionButtonStyle:O?.actionButtonStyle,closeButtonAriaLabel:O?.closeButtonAriaLabel,removeToast:Y,toasts:q.filter(Ee=>Ee.position==ft.position),heights:ct.filter(Ee=>Ee.position==ft.position),setHeights:st,expandByDefault:g,gap:Z,expanded:at,swipeDirections:s.swipeDirections})})):null}))}),wx=a=>{const s=so.c(7);let i;s[0]!==a?({...i}=a,s[0]=a,s[1]=i):i=s[1];let o,c;s[2]===Symbol.for("react.memo_cache_sentinel")?(o={success:P.jsx(VE,{className:"size-4"}),info:P.jsx(QE,{className:"size-4"}),warning:P.jsx(FE,{className:"size-4"}),error:P.jsx(JE,{className:"size-4"}),loading:P.jsx(kE,{className:"size-4 animate-spin"})},c={"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},s[2]=o,s[3]=c):(o=s[2],c=s[3]);let f;s[4]===Symbol.for("react.memo_cache_sentinel")?(f={classNames:{toast:"cn-toast"}},s[4]=f):f=s[4];let m;return s[5]!==i?(m=P.jsx(xx,{className:"toaster group",icons:o,style:c,toastOptions:f,...i}),s[5]=i,s[6]=m):m=s[6],m},Tx="(function(){try{var stored=window.localStorage.getItem('theme');var mode=(stored==='light'||stored==='dark'||stored==='auto')?stored:'auto';var prefersDark=window.matchMedia('(prefers-color-scheme: dark)').matches;var resolved=mode==='auto'?(prefersDark?'dark':'light'):mode;var root=document.documentElement;root.classList.remove('light','dark');root.classList.add(resolved);if(mode==='auto'){root.removeAttribute('data-theme')}else{root.setAttribute('data-theme',mode)}root.style.colorScheme=resolved;}catch(e){}})();",Rx=qr().handler(E0("e3ae5ae6db5120d43fecff71cd0258cb4a93807a1a382949ccd189596d190566")),gf=B2({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"Astro MD Editor"}],links:[{rel:"stylesheet",href:TE}]}),shellComponent:Ax,loader:()=>Rx()});function Ax(a){const s=so.c(10),{children:i}=a,o=gf.useLoaderData();let c;s[0]===Symbol.for("react.memo_cache_sentinel")?(c=P.jsxs("head",{children:[P.jsx("script",{dangerouslySetInnerHTML:{__html:Tx}}),P.jsx($2,{})]}),s[0]=c):c=s[0];let f;s[1]!==i||s[2]!==o?(f=P.jsx(RE,{value:o,children:i}),s[1]=i,s[2]=o,s[3]=f):f=s[3];let m;s[4]===Symbol.for("react.memo_cache_sentinel")?(m=P.jsx(wx,{}),s[4]=m):m=s[4];let g;s[5]!==f?(g=P.jsxs(BE,{children:[f,m]}),s[5]=f,s[6]=g):g=s[6];let y;s[7]===Symbol.for("react.memo_cache_sentinel")?(y=P.jsx(W2,{}),s[7]=y):y=s[7];let h;return s[8]!==g?(h=P.jsxs("html",{lang:"en",suppressHydrationWarning:!0,children:[c,P.jsxs("body",{className:"font-sans wrap-anywhere antialiased",children:[g,y]})]}),s[8]=g,s[9]=h):h=s[9],h}const Mx="modulepreload",Ox=function(a){return"/"+a},fy={},Cx=function(s,i,o){let c=Promise.resolve();if(i&&i.length>0){let y=function(h){return Promise.all(h.map(b=>Promise.resolve(b).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const m=document.querySelector("meta[property=csp-nonce]"),g=m?.nonce||m?.getAttribute("nonce");c=y(i.map(h=>{if(h=Ox(h),h in fy)return;fy[h]=!0;const b=h.endsWith(".css"),p=b?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${p}`))return;const S=document.createElement("link");if(S.rel=b?"stylesheet":Mx,b||(S.as="script"),S.crossOrigin="",S.href=h,g&&S.setAttribute("nonce",g),document.head.appendChild(S),b)return new Promise((E,w)=>{S.addEventListener("load",E),S.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${h}`)))})}))}function f(m){const g=new Event("vite:preloadError",{cancelable:!0});if(g.payload=m,window.dispatchEvent(g),!g.defaultPrevented)throw m}return c.then(m=>{for(const g of m||[])g.status==="rejected"&&f(g.reason);return s().catch(f)})},zx=()=>Cx(()=>import("./index-UQt6zCrS.js"),[]),Dx=Jc("/")({validateSearch:a=>{const s=a,i=typeof s.collection=="string"&&s.collection.length>0?s.collection:void 0,o=typeof s.file=="string"&&s.file.length>0?s.file:void 0;return{collection:i,file:o}},component:U2(zx,"component")}),Nx=Dx.update({id:"/",path:"/",getParentRoute:()=>gf}),Lx={IndexRoute:Nx},Bx=gf._addFileChildren(Lx);function Ux(){return Z2({routeTree:Bx,scrollRestoration:!0,defaultPreload:"intent",defaultPreloadStaleTime:0})}async function jx(){const a=await Ux();let s;return s=[],window.__TSS_START_OPTIONS__={serializationAdapters:s},s.push(bE),a.options.serializationAdapters&&s.push(...a.options.serializationAdapters),a.update({basepath:"",serializationAdapters:s}),a.state.matches.length||await aE(a),a}async function Hx(){const a=await jx();return window.$_TSR?.h(),a}let Gc;function qx(){return Gc||(Gc=Hx()),P.jsx(u2,{promise:Gc,children:a=>P.jsx(J2,{router:a})})}et.startTransition(()=>{Jv.hydrateRoot(document,P.jsx(et.StrictMode,{children:P.jsx(qx,{})}))});export{kE as L,Vv as R,ro as T,OE as a,d0 as b,CE as c,p2 as d,ys as e,so as f,F as g,E2 as h,qr as i,P as j,E0 as k,dy as l,Kx as m,Dx as n,et as r,Jx as t,AE as u,v2 as w};
17
+ `).filter(Boolean);for(const S of p)try{s(JSON.parse(S))}catch(E){i?.(`Invalid JSON line: ${S}`,E)}}if(y)break}}catch(g){i?.("Stream processing error:",g)}})(),s(m)}async function vE({jsonStream:a,onMessage:s,onError:i}){const o=a.getReader(),{value:c,done:f}=await o.read();if(f||!c)throw new Error("Stream ended before first object");const m=JSON.parse(c);return(async()=>{try{for(;;){const{value:g,done:y}=await o.read();if(y)break;if(g)try{s(JSON.parse(g))}catch(h){i?.(`Invalid JSON: ${g}`,h)}}}catch(g){i?.("Stream processing error:",g)}})(),s(m)}function E0(a){const s="/_serverFn/"+a;return Object.assign((...c)=>{const f=yf()?.serverFns?.fetch;return mE(s,c,f??fetch)},{url:s,serverFnMeta:{id:a},[Pc]:!0})}const bE={key:"$TSS/serverfn",test:a=>typeof a!="function"||!(Pc in a)?!1:!!a[Pc],toSerializable:({serverFnMeta:a})=>({functionId:a.id}),fromSerializable:({functionId:a})=>E0(a)};var qc={exports:{}},Yc={};var ay;function SE(){if(ay)return Yc;ay=1;var a=fi().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return Yc.c=function(s){return a.H.useMemoCache(s)},Yc}var ly;function _E(){return ly||(ly=1,qc.exports=SE()),qc.exports}var so=_E();const x0=()=>{throw new Error("createServerOnlyFn() functions can only be called on the server!")};function iy(a){return a!=="__proto__"&&a!=="constructor"&&a!=="prototype"}function Fc(a,s){const i=Object.create(null);if(a)for(const o of Object.keys(a))iy(o)&&(i[o]=a[o]);if(s&&typeof s=="object")for(const o of Object.keys(s))iy(o)&&(i[o]=s[o]);return i}function w0(a){return Object.create(null)}const qr=(a,s)=>{const i=s||a||{};return typeof i.method>"u"&&(i.method="GET"),Object.assign(f=>{const m={...i,...f};return qr(void 0,m)},{options:i,middleware:f=>{const m=[...i.middleware||[]];f.map(h=>{Fp in h?h.options.middleware&&m.push(...h.options.middleware):m.push(h)});const g={...i,middleware:m},y=qr(void 0,g);return y[Fp]=!0,y},inputValidator:f=>{const m={...i,inputValidator:f};return qr(void 0,m)},handler:(...f)=>{const[m,g]=f,y={...i,extractedFn:m,serverFn:g},h=[...y.middleware||[],wE(y)];return m.method=i.method,Object.assign(async b=>{const p=await sy(h,"client",{...m,...y,data:b?.data,headers:b?.headers,signal:b?.signal,fetch:b?.fetch,context:w0()}),S=Ty(p.error);if(S)throw S;if(p.error)throw p.error;return p.result},{...m,method:i.method,__executeServer:async b=>{const p=x0(),S=p.contextAfterGlobalMiddlewares,E={...m,...b,serverFnMeta:m.serverFnMeta,context:Fc(S,b.context),request:p.request};return await sy(h,"server",E).then(z=>({result:z.result,error:z.error,context:z.sendContext}))}})}})};async function sy(a,s,i){const o=yf()?.functionMiddleware||[];let c=EE([...o,...a]);if(s==="server"){const m=x0();m?.executedRequestMiddlewares&&(c=c.filter(g=>!m.executedRequestMiddlewares.has(g)))}const f=async m=>{const g=c.shift();if(!g)return m;try{"inputValidator"in g.options&&g.options.inputValidator&&s==="server"&&(m.data=await xE(g.options.inputValidator,m.data));let y;if(s==="client"?"client"in g.options&&(y=g.options.client):"server"in g.options&&(y=g.options.server),y){const b=await y({...m,next:async(p={})=>{const S={...m,...p,context:Fc(m.context,p.context),sendContext:Fc(m.sendContext,p.sendContext),headers:eE(m.headers,p.headers),_callSiteFetch:m._callSiteFetch,fetch:m._callSiteFetch??p.fetch??m.fetch,result:p.result!==void 0?p.result:p instanceof Response?p:m.result,error:p.error??m.error},E=await f(S);if(E.error)throw E.error;return E}});if(qe(b))return{...m,error:b};if(b instanceof Response)return{...m,result:b};if(!b)throw new Error("User middleware returned undefined. You must call next() or return a result in your middlewares.");return b}return f(m)}catch(y){return{...m,error:y}}};return f({...i,headers:i.headers||{},sendContext:i.sendContext||{},context:i.context||w0(),_callSiteFetch:i.fetch})}function EE(a,s=100){const i=new Set,o=[],c=(f,m)=>{if(m>s)throw new Error(`Middleware nesting depth exceeded maximum of ${s}. Check for circular references.`);f.forEach(g=>{g.options.middleware&&c(g.options.middleware,m+1),i.has(g)||(i.add(g),o.push(g))})};return c(a,0),o}async function xE(a,s){if(a==null)return{};if("~standard"in a){const i=await a["~standard"].validate(s);if(i.issues)throw new Error(JSON.stringify(i.issues,void 0,2));return i.value}if("parse"in a)return a.parse(s);if(typeof a=="function")return a(s);throw new Error("Invalid validator type!")}function wE(a){return{"~types":void 0,options:{inputValidator:a.inputValidator,client:async({next:s,sendContext:i,fetch:o,...c})=>{const f={...c,context:i,fetch:o},m=await a.extractedFn?.(f);return s(m)},server:async({next:s,...i})=>{const o=await a.serverFn?.(i);return s({...i,result:o})}}}}const TE="/assets/styles-CezfLgHY.css",T0=et.createContext(null);function RE(a){const s=so.c(3),{value:i,children:o}=a;let c;return s[0]!==o||s[1]!==i?(c=P.jsx(T0.Provider,{value:i,children:o}),s[0]=o,s[1]=i,s[2]=c):c=s[2],c}function Kx(){const a=et.useContext(T0);if(!a)throw new Error("useCollectionsData must be used within CollectionsDataProvider");return a}const ry={};function AE(a,s){const i=et.useRef(ry);return i.current===ry&&(i.current=a(s)),i}const ME=[];function OE(a){et.useEffect(a,ME)}const os=0;class ro{static create(){return new ro}currentId=os;start(s,i){this.clear(),this.currentId=setTimeout(()=>{this.currentId=os,i()},s)}isStarted(){return this.currentId!==os}clear=()=>{this.currentId!==os&&(clearTimeout(this.currentId),this.currentId=os)};disposeEffect=()=>this.clear}function CE(){const a=AE(ro.create).current;return OE(a.disposeEffect),a}const zE=et.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new ro,currentIdRef:{current:null},currentContextRef:{current:null}});function DE(a){const{children:s,delay:i,timeoutMs:o=0}=a,c=et.useRef(i),f=et.useRef(i),m=et.useRef(null),g=et.useRef(null),y=CE();return P.jsx(zE.Provider,{value:et.useMemo(()=>({hasProvider:!0,delayRef:c,initialDelayRef:f,currentIdRef:m,timeoutMs:o,currentContextRef:g,timeout:y}),[o,y]),children:s})}const NE=et.createContext(void 0),LE=function(s){const{delay:i,closeDelay:o,timeout:c=400}=s,f=et.useMemo(()=>({delay:i,closeDelay:o}),[i,o]),m=et.useMemo(()=>({open:i,close:o}),[i,o]);return P.jsx(NE.Provider,{value:f,children:P.jsx(DE,{delay:m,timeoutMs:c,children:s.children})})};function BE(a){const s=so.c(6);let i,o;s[0]!==a?({delay:o,...i}=a,s[0]=a,s[1]=i,s[2]=o):(i=s[1],o=s[2]);const c=o===void 0?0:o;let f;return s[3]!==c||s[4]!==i?(f=P.jsx(LE,{"data-slot":"tooltip-provider",delay:c,...i}),s[3]=c,s[4]=i,s[5]=f):f=s[5],f}const R0=(...a)=>a.filter((s,i,o)=>!!s&&s.trim()!==""&&o.indexOf(s)===i).join(" ").trim();const UE=a=>a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const jE=a=>a.replace(/^([A-Z])|[\s-_]+(\w)/g,(s,i,o)=>o?o.toUpperCase():i.toLowerCase());const oy=a=>{const s=jE(a);return s.charAt(0).toUpperCase()+s.slice(1)};var HE={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const qE=a=>{for(const s in a)if(s.startsWith("aria-")||s==="role"||s==="title")return!0;return!1};const YE=et.forwardRef(({color:a="currentColor",size:s=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:c="",children:f,iconNode:m,...g},y)=>et.createElement("svg",{ref:y,...HE,width:s,height:s,stroke:a,strokeWidth:o?Number(i)*24/Number(s):i,className:R0("lucide",c),...!f&&!qE(g)&&{"aria-hidden":"true"},...g},[...m.map(([h,b])=>et.createElement(h,b)),...Array.isArray(f)?f:[f]]));const ys=(a,s)=>{const i=et.forwardRef(({className:o,...c},f)=>et.createElement(YE,{ref:f,iconNode:s,className:R0(`lucide-${UE(oy(a))}`,`lucide-${a}`,o),...c}));return i.displayName=oy(a),i};const GE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],VE=ys("circle-check",GE);const XE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],QE=ys("info",XE);const ZE=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],kE=ys("loader-circle",ZE);const KE=[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],JE=ys("octagon-x",KE);const PE=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],FE=ys("triangle-alert",PE);function IE(a){if(typeof document>"u")return;let s=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",s.appendChild(i),i.styleSheet?i.styleSheet.cssText=a:i.appendChild(document.createTextNode(a))}const $E=a=>{switch(a){case"success":return ex;case"info":return ax;case"warning":return nx;case"error":return lx;default:return null}},WE=Array(12).fill(0),tx=({visible:a,className:s})=>F.createElement("div",{className:["sonner-loading-wrapper",s].filter(Boolean).join(" "),"data-visible":a},F.createElement("div",{className:"sonner-spinner"},WE.map((i,o)=>F.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),ex=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.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"})),nx=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},F.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"})),ax=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.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"})),lx=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.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"})),ix=F.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"},F.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),F.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),sx=()=>{const[a,s]=F.useState(document.hidden);return F.useEffect(()=>{const i=()=>{s(document.hidden)};return document.addEventListener("visibilitychange",i),()=>window.removeEventListener("visibilitychange",i)},[]),a};let Ic=1;class rx{constructor(){this.subscribe=s=>(this.subscribers.push(s),()=>{const i=this.subscribers.indexOf(s);this.subscribers.splice(i,1)}),this.publish=s=>{this.subscribers.forEach(i=>i(s))},this.addToast=s=>{this.publish(s),this.toasts=[...this.toasts,s]},this.create=s=>{var i;const{message:o,...c}=s,f=typeof s?.id=="number"||((i=s.id)==null?void 0:i.length)>0?s.id:Ic++,m=this.toasts.find(y=>y.id===f),g=s.dismissible===void 0?!0:s.dismissible;return this.dismissedToasts.has(f)&&this.dismissedToasts.delete(f),m?this.toasts=this.toasts.map(y=>y.id===f?(this.publish({...y,...s,id:f,title:o}),{...y,...s,id:f,dismissible:g,title:o}):y):this.addToast({title:o,...c,dismissible:g,id:f}),f},this.dismiss=s=>(s?(this.dismissedToasts.add(s),requestAnimationFrame(()=>this.subscribers.forEach(i=>i({id:s,dismiss:!0})))):this.toasts.forEach(i=>{this.subscribers.forEach(o=>o({id:i.id,dismiss:!0}))}),s),this.message=(s,i)=>this.create({...i,message:s}),this.error=(s,i)=>this.create({...i,message:s,type:"error"}),this.success=(s,i)=>this.create({...i,type:"success",message:s}),this.info=(s,i)=>this.create({...i,type:"info",message:s}),this.warning=(s,i)=>this.create({...i,type:"warning",message:s}),this.loading=(s,i)=>this.create({...i,type:"loading",message:s}),this.promise=(s,i)=>{if(!i)return;let o;i.loading!==void 0&&(o=this.create({...i,promise:s,type:"loading",message:i.loading,description:typeof i.description!="function"?i.description:void 0}));const c=Promise.resolve(s instanceof Function?s():s);let f=o!==void 0,m;const g=c.then(async h=>{if(m=["resolve",h],F.isValidElement(h))f=!1,this.create({id:o,type:"default",message:h});else if(ux(h)&&!h.ok){f=!1;const p=typeof i.error=="function"?await i.error(`HTTP error! status: ${h.status}`):i.error,S=typeof i.description=="function"?await i.description(`HTTP error! status: ${h.status}`):i.description,w=typeof p=="object"&&!F.isValidElement(p)?p:{message:p};this.create({id:o,type:"error",description:S,...w})}else if(h instanceof Error){f=!1;const p=typeof i.error=="function"?await i.error(h):i.error,S=typeof i.description=="function"?await i.description(h):i.description,w=typeof p=="object"&&!F.isValidElement(p)?p:{message:p};this.create({id:o,type:"error",description:S,...w})}else if(i.success!==void 0){f=!1;const p=typeof i.success=="function"?await i.success(h):i.success,S=typeof i.description=="function"?await i.description(h):i.description,w=typeof p=="object"&&!F.isValidElement(p)?p:{message:p};this.create({id:o,type:"success",description:S,...w})}}).catch(async h=>{if(m=["reject",h],i.error!==void 0){f=!1;const b=typeof i.error=="function"?await i.error(h):i.error,p=typeof i.description=="function"?await i.description(h):i.description,E=typeof b=="object"&&!F.isValidElement(b)?b:{message:b};this.create({id:o,type:"error",description:p,...E})}}).finally(()=>{f&&(this.dismiss(o),o=void 0),i.finally==null||i.finally.call(i)}),y=()=>new Promise((h,b)=>g.then(()=>m[0]==="reject"?b(m[1]):h(m[1])).catch(b));return typeof o!="string"&&typeof o!="number"?{unwrap:y}:Object.assign(o,{unwrap:y})},this.custom=(s,i)=>{const o=i?.id||Ic++;return this.create({jsx:s(o),id:o,...i}),o},this.getActiveToasts=()=>this.toasts.filter(s=>!this.dismissedToasts.has(s.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const He=new rx,ox=(a,s)=>{const i=s?.id||Ic++;return He.addToast({title:a,...s,id:i}),i},ux=a=>a&&typeof a=="object"&&"ok"in a&&typeof a.ok=="boolean"&&"status"in a&&typeof a.status=="number",cx=ox,fx=()=>He.toasts,dx=()=>He.getActiveToasts(),Jx=Object.assign(cx,{success:He.success,info:He.info,warning:He.warning,error:He.error,custom:He.custom,message:He.message,promise:He.promise,dismiss:He.dismiss,loading:He.loading},{getHistory:fx,getToasts:dx});IE("[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 Lr(a){return a.label!==void 0}const hx=3,mx="24px",px="16px",uy=4e3,yx=356,gx=14,vx=45,bx=200;function En(...a){return a.filter(Boolean).join(" ")}function Sx(a){const[s,i]=a.split("-"),o=[];return s&&o.push(s),i&&o.push(i),o}const _x=a=>{var s,i,o,c,f,m,g,y,h;const{invert:b,toast:p,unstyled:S,interacting:E,setHeights:w,visibleToasts:z,heights:R,index:O,toasts:X,expanded:Z,removeToast:V,defaultRichColors:$,closeButton:tt,style:k,cancelButtonStyle:q,actionButtonStyle:I,className:ct="",descriptionClassName:st="",duration:at,position:xt,gap:wt,expandByDefault:qt,classNames:D,icons:K,closeButtonAriaLabel:it="Close toast"}=a,[vt,mt]=F.useState(null),[A,Y]=F.useState(null),[Q,J]=F.useState(!1),[W,ot]=F.useState(!1),[gt,ft]=F.useState(!1),[Rt,Te]=F.useState(!1),[Re,Ee]=F.useState(!1),[Na,Ae]=F.useState(0),[La,Rn]=F.useState(0),pn=F.useRef(p.duration||at||uy),Fe=F.useRef(null),ue=F.useRef(null),Ye=O===0,Ba=O+1<=z,ce=p.type,un=p.dismissible!==!1,fe=p.className||"",hl=p.descriptionClassName||"",At=F.useMemo(()=>R.findIndex(dt=>dt.toastId===p.id)||0,[R,p.id]),kt=F.useMemo(()=>{var dt;return(dt=p.closeButton)!=null?dt:tt},[p.closeButton,tt]),ee=F.useMemo(()=>p.duration||at||uy,[p.duration,at]),In=F.useRef(0),An=F.useRef(0),gs=F.useRef(0),$n=F.useRef(null),[Ua,xe]=xt.split("-"),cn=F.useMemo(()=>R.reduce((dt,Vt,se)=>se>=At?dt:dt+Vt.height,0),[R,At]),ge=sx(),oo=p.invert||b,di=ce==="loading";An.current=F.useMemo(()=>At*wt+cn,[At,cn]),F.useEffect(()=>{pn.current=ee},[ee]),F.useEffect(()=>{J(!0)},[]),F.useEffect(()=>{const dt=ue.current;if(dt){const Vt=dt.getBoundingClientRect().height;return Rn(Vt),w(se=>[{toastId:p.id,height:Vt,position:p.position},...se]),()=>w(se=>se.filter(ve=>ve.toastId!==p.id))}},[w,p.id]),F.useLayoutEffect(()=>{if(!Q)return;const dt=ue.current,Vt=dt.style.height;dt.style.height="auto";const se=dt.getBoundingClientRect().height;dt.style.height=Vt,Rn(se),w(ve=>ve.find(Zt=>Zt.toastId===p.id)?ve.map(Zt=>Zt.toastId===p.id?{...Zt,height:se}:Zt):[{toastId:p.id,height:se,position:p.position},...ve])},[Q,p.title,p.description,w,p.id,p.jsx,p.action,p.cancel]);const yn=F.useCallback(()=>{ot(!0),Ae(An.current),w(dt=>dt.filter(Vt=>Vt.toastId!==p.id)),setTimeout(()=>{V(p)},bx)},[p,V,w,An]);F.useEffect(()=>{if(p.promise&&ce==="loading"||p.duration===1/0||p.type==="loading")return;let dt;return Z||E||ge?(()=>{if(gs.current<In.current){const ve=new Date().getTime()-In.current;pn.current=pn.current-ve}gs.current=new Date().getTime()})():pn.current!==1/0&&(In.current=new Date().getTime(),dt=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),yn()},pn.current)),()=>clearTimeout(dt)},[Z,E,p,ce,ge,yn]),F.useEffect(()=>{p.delete&&(yn(),p.onDismiss==null||p.onDismiss.call(p,p))},[yn,p.delete]);function ml(){var dt;if(K?.loading){var Vt;return F.createElement("div",{className:En(D?.loader,p==null||(Vt=p.classNames)==null?void 0:Vt.loader,"sonner-loader"),"data-visible":ce==="loading"},K.loading)}return F.createElement(tx,{className:En(D?.loader,p==null||(dt=p.classNames)==null?void 0:dt.loader),visible:ce==="loading"})}const pl=p.icon||K?.[ce]||$E(ce);var ja,gn;return F.createElement("li",{tabIndex:0,ref:ue,className:En(ct,fe,D?.toast,p==null||(s=p.classNames)==null?void 0:s.toast,D?.default,D?.[ce],p==null||(i=p.classNames)==null?void 0:i[ce]),"data-sonner-toast":"","data-rich-colors":(ja=p.richColors)!=null?ja:$,"data-styled":!(p.jsx||p.unstyled||S),"data-mounted":Q,"data-promise":!!p.promise,"data-swiped":Re,"data-removed":W,"data-visible":Ba,"data-y-position":Ua,"data-x-position":xe,"data-index":O,"data-front":Ye,"data-swiping":gt,"data-dismissible":un,"data-type":ce,"data-invert":oo,"data-swipe-out":Rt,"data-swipe-direction":A,"data-expanded":!!(Z||qt&&Q),"data-testid":p.testId,style:{"--index":O,"--toasts-before":O,"--z-index":X.length-O,"--offset":`${W?Na:An.current}px`,"--initial-height":qt?"auto":`${La}px`,...k,...p.style},onDragEnd:()=>{ft(!1),mt(null),$n.current=null},onPointerDown:dt=>{dt.button!==2&&(di||!un||(Fe.current=new Date,Ae(An.current),dt.target.setPointerCapture(dt.pointerId),dt.target.tagName!=="BUTTON"&&(ft(!0),$n.current={x:dt.clientX,y:dt.clientY})))},onPointerUp:()=>{var dt,Vt,se;if(Rt||!un)return;$n.current=null;const ve=Number(((dt=ue.current)==null?void 0:dt.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Wn=Number(((Vt=ue.current)==null?void 0:Vt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Zt=new Date().getTime()-((se=Fe.current)==null?void 0:se.getTime()),Me=vt==="x"?ve:Wn,Ha=Math.abs(Me)/Zt;if(Math.abs(Me)>=vx||Ha>.11){Ae(An.current),p.onDismiss==null||p.onDismiss.call(p,p),Y(vt==="x"?ve>0?"right":"left":Wn>0?"down":"up"),yn(),Te(!0);return}else{var Oe,Ce;(Oe=ue.current)==null||Oe.style.setProperty("--swipe-amount-x","0px"),(Ce=ue.current)==null||Ce.style.setProperty("--swipe-amount-y","0px")}Ee(!1),ft(!1),mt(null)},onPointerMove:dt=>{var Vt,se,ve;if(!$n.current||!un||((Vt=window.getSelection())==null?void 0:Vt.toString().length)>0)return;const Zt=dt.clientY-$n.current.y,Me=dt.clientX-$n.current.x;var Ha;const Oe=(Ha=a.swipeDirections)!=null?Ha:Sx(xt);!vt&&(Math.abs(Me)>1||Math.abs(Zt)>1)&&mt(Math.abs(Me)>Math.abs(Zt)?"x":"y");let Ce={x:0,y:0};const yl=fn=>1/(1.5+Math.abs(fn)/20);if(vt==="y"){if(Oe.includes("top")||Oe.includes("bottom"))if(Oe.includes("top")&&Zt<0||Oe.includes("bottom")&&Zt>0)Ce.y=Zt;else{const fn=Zt*yl(Zt);Ce.y=Math.abs(fn)<Math.abs(Zt)?fn:Zt}}else if(vt==="x"&&(Oe.includes("left")||Oe.includes("right")))if(Oe.includes("left")&&Me<0||Oe.includes("right")&&Me>0)Ce.x=Me;else{const fn=Me*yl(Me);Ce.x=Math.abs(fn)<Math.abs(Me)?fn:Me}(Math.abs(Ce.x)>0||Math.abs(Ce.y)>0)&&Ee(!0),(se=ue.current)==null||se.style.setProperty("--swipe-amount-x",`${Ce.x}px`),(ve=ue.current)==null||ve.style.setProperty("--swipe-amount-y",`${Ce.y}px`)}},kt&&!p.jsx&&ce!=="loading"?F.createElement("button",{"aria-label":it,"data-disabled":di,"data-close-button":!0,onClick:di||!un?()=>{}:()=>{yn(),p.onDismiss==null||p.onDismiss.call(p,p)},className:En(D?.closeButton,p==null||(o=p.classNames)==null?void 0:o.closeButton)},(gn=K?.close)!=null?gn:ix):null,(ce||p.icon||p.promise)&&p.icon!==null&&(K?.[ce]!==null||p.icon)?F.createElement("div",{"data-icon":"",className:En(D?.icon,p==null||(c=p.classNames)==null?void 0:c.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||ml():null,p.type!=="loading"?pl:null):null,F.createElement("div",{"data-content":"",className:En(D?.content,p==null||(f=p.classNames)==null?void 0:f.content)},F.createElement("div",{"data-title":"",className:En(D?.title,p==null||(m=p.classNames)==null?void 0:m.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?F.createElement("div",{"data-description":"",className:En(st,hl,D?.description,p==null||(g=p.classNames)==null?void 0:g.description)},typeof p.description=="function"?p.description():p.description):null),F.isValidElement(p.cancel)?p.cancel:p.cancel&&Lr(p.cancel)?F.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||q,onClick:dt=>{Lr(p.cancel)&&un&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,dt),yn())},className:En(D?.cancelButton,p==null||(y=p.classNames)==null?void 0:y.cancelButton)},p.cancel.label):null,F.isValidElement(p.action)?p.action:p.action&&Lr(p.action)?F.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||I,onClick:dt=>{Lr(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,dt),!dt.defaultPrevented&&yn())},className:En(D?.actionButton,p==null||(h=p.classNames)==null?void 0:h.actionButton)},p.action.label):null)};function cy(){if(typeof window>"u"||typeof document>"u")return"ltr";const a=document.documentElement.getAttribute("dir");return a==="auto"||!a?window.getComputedStyle(document.documentElement).direction:a}function Ex(a,s){const i={};return[a,s].forEach((o,c)=>{const f=c===1,m=f?"--mobile-offset":"--offset",g=f?px:mx;function y(h){["top","right","bottom","left"].forEach(b=>{i[`${m}-${b}`]=typeof h=="number"?`${h}px`:h})}typeof o=="number"||typeof o=="string"?y(o):typeof o=="object"?["top","right","bottom","left"].forEach(h=>{o[h]===void 0?i[`${m}-${h}`]=g:i[`${m}-${h}`]=typeof o[h]=="number"?`${o[h]}px`:o[h]}):y(g)}),i}const xx=F.forwardRef(function(s,i){const{id:o,invert:c,position:f="bottom-right",hotkey:m=["altKey","KeyT"],expand:g,closeButton:y,className:h,offset:b,mobileOffset:p,theme:S="light",richColors:E,duration:w,style:z,visibleToasts:R=hx,toastOptions:O,dir:X=cy(),gap:Z=gx,icons:V,containerAriaLabel:$="Notifications"}=s,[tt,k]=F.useState([]),q=F.useMemo(()=>o?tt.filter(Q=>Q.toasterId===o):tt.filter(Q=>!Q.toasterId),[tt,o]),I=F.useMemo(()=>Array.from(new Set([f].concat(q.filter(Q=>Q.position).map(Q=>Q.position)))),[q,f]),[ct,st]=F.useState([]),[at,xt]=F.useState(!1),[wt,qt]=F.useState(!1),[D,K]=F.useState(S!=="system"?S:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),it=F.useRef(null),vt=m.join("+").replace(/Key/g,"").replace(/Digit/g,""),mt=F.useRef(null),A=F.useRef(!1),Y=F.useCallback(Q=>{k(J=>{var W;return(W=J.find(ot=>ot.id===Q.id))!=null&&W.delete||He.dismiss(Q.id),J.filter(({id:ot})=>ot!==Q.id)})},[]);return F.useEffect(()=>He.subscribe(Q=>{if(Q.dismiss){requestAnimationFrame(()=>{k(J=>J.map(W=>W.id===Q.id?{...W,delete:!0}:W))});return}setTimeout(()=>{E2.flushSync(()=>{k(J=>{const W=J.findIndex(ot=>ot.id===Q.id);return W!==-1?[...J.slice(0,W),{...J[W],...Q},...J.slice(W+1)]:[Q,...J]})})})}),[tt]),F.useEffect(()=>{if(S!=="system"){K(S);return}if(S==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?K("dark"):K("light")),typeof window>"u")return;const Q=window.matchMedia("(prefers-color-scheme: dark)");try{Q.addEventListener("change",({matches:J})=>{K(J?"dark":"light")})}catch{Q.addListener(({matches:W})=>{try{K(W?"dark":"light")}catch(ot){console.error(ot)}})}},[S]),F.useEffect(()=>{tt.length<=1&&xt(!1)},[tt]),F.useEffect(()=>{const Q=J=>{var W;if(m.every(ft=>J[ft]||J.code===ft)){var gt;xt(!0),(gt=it.current)==null||gt.focus()}J.code==="Escape"&&(document.activeElement===it.current||(W=it.current)!=null&&W.contains(document.activeElement))&&xt(!1)};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[m]),F.useEffect(()=>{if(it.current)return()=>{mt.current&&(mt.current.focus({preventScroll:!0}),mt.current=null,A.current=!1)}},[it.current]),F.createElement("section",{ref:i,"aria-label":`${$} ${vt}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},I.map((Q,J)=>{var W;const[ot,gt]=Q.split("-");return q.length?F.createElement("ol",{key:Q,dir:X==="auto"?cy():X,tabIndex:-1,ref:it,className:h,"data-sonner-toaster":!0,"data-sonner-theme":D,"data-y-position":ot,"data-x-position":gt,style:{"--front-toast-height":`${((W=ct[0])==null?void 0:W.height)||0}px`,"--width":`${yx}px`,"--gap":`${Z}px`,...z,...Ex(b,p)},onBlur:ft=>{A.current&&!ft.currentTarget.contains(ft.relatedTarget)&&(A.current=!1,mt.current&&(mt.current.focus({preventScroll:!0}),mt.current=null))},onFocus:ft=>{ft.target instanceof HTMLElement&&ft.target.dataset.dismissible==="false"||A.current||(A.current=!0,mt.current=ft.relatedTarget)},onMouseEnter:()=>xt(!0),onMouseMove:()=>xt(!0),onMouseLeave:()=>{wt||xt(!1)},onDragEnd:()=>xt(!1),onPointerDown:ft=>{ft.target instanceof HTMLElement&&ft.target.dataset.dismissible==="false"||qt(!0)},onPointerUp:()=>qt(!1)},q.filter(ft=>!ft.position&&J===0||ft.position===Q).map((ft,Rt)=>{var Te,Re;return F.createElement(_x,{key:ft.id,icons:V,index:Rt,toast:ft,defaultRichColors:E,duration:(Te=O?.duration)!=null?Te:w,className:O?.className,descriptionClassName:O?.descriptionClassName,invert:c,visibleToasts:R,closeButton:(Re=O?.closeButton)!=null?Re:y,interacting:wt,position:Q,style:O?.style,unstyled:O?.unstyled,classNames:O?.classNames,cancelButtonStyle:O?.cancelButtonStyle,actionButtonStyle:O?.actionButtonStyle,closeButtonAriaLabel:O?.closeButtonAriaLabel,removeToast:Y,toasts:q.filter(Ee=>Ee.position==ft.position),heights:ct.filter(Ee=>Ee.position==ft.position),setHeights:st,expandByDefault:g,gap:Z,expanded:at,swipeDirections:s.swipeDirections})})):null}))}),wx=a=>{const s=so.c(7);let i;s[0]!==a?({...i}=a,s[0]=a,s[1]=i):i=s[1];let o,c;s[2]===Symbol.for("react.memo_cache_sentinel")?(o={success:P.jsx(VE,{className:"size-4"}),info:P.jsx(QE,{className:"size-4"}),warning:P.jsx(FE,{className:"size-4"}),error:P.jsx(JE,{className:"size-4"}),loading:P.jsx(kE,{className:"size-4 animate-spin"})},c={"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},s[2]=o,s[3]=c):(o=s[2],c=s[3]);let f;s[4]===Symbol.for("react.memo_cache_sentinel")?(f={classNames:{toast:"cn-toast"}},s[4]=f):f=s[4];let m;return s[5]!==i?(m=P.jsx(xx,{className:"toaster group",icons:o,style:c,toastOptions:f,...i}),s[5]=i,s[6]=m):m=s[6],m},Tx="(function(){try{var stored=window.localStorage.getItem('theme');var mode=(stored==='light'||stored==='dark'||stored==='auto')?stored:'auto';var prefersDark=window.matchMedia('(prefers-color-scheme: dark)').matches;var resolved=mode==='auto'?(prefersDark?'dark':'light'):mode;var root=document.documentElement;root.classList.remove('light','dark');root.classList.add(resolved);if(mode==='auto'){root.removeAttribute('data-theme')}else{root.setAttribute('data-theme',mode)}root.style.colorScheme=resolved;}catch(e){}})();",Rx=qr().handler(E0("e3ae5ae6db5120d43fecff71cd0258cb4a93807a1a382949ccd189596d190566")),gf=B2({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"Astro MD Editor"}],links:[{rel:"stylesheet",href:TE}]}),shellComponent:Ax,loader:()=>Rx()});function Ax(a){const s=so.c(10),{children:i}=a,o=gf.useLoaderData();let c;s[0]===Symbol.for("react.memo_cache_sentinel")?(c=P.jsxs("head",{children:[P.jsx("script",{dangerouslySetInnerHTML:{__html:Tx}}),P.jsx($2,{})]}),s[0]=c):c=s[0];let f;s[1]!==i||s[2]!==o?(f=P.jsx(RE,{value:o,children:i}),s[1]=i,s[2]=o,s[3]=f):f=s[3];let m;s[4]===Symbol.for("react.memo_cache_sentinel")?(m=P.jsx(wx,{}),s[4]=m):m=s[4];let g;s[5]!==f?(g=P.jsxs(BE,{children:[f,m]}),s[5]=f,s[6]=g):g=s[6];let y;s[7]===Symbol.for("react.memo_cache_sentinel")?(y=P.jsx(W2,{}),s[7]=y):y=s[7];let h;return s[8]!==g?(h=P.jsxs("html",{lang:"en",suppressHydrationWarning:!0,children:[c,P.jsxs("body",{className:"font-sans wrap-anywhere antialiased",children:[g,y]})]}),s[8]=g,s[9]=h):h=s[9],h}const Mx="modulepreload",Ox=function(a){return"/"+a},fy={},Cx=function(s,i,o){let c=Promise.resolve();if(i&&i.length>0){let y=function(h){return Promise.all(h.map(b=>Promise.resolve(b).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const m=document.querySelector("meta[property=csp-nonce]"),g=m?.nonce||m?.getAttribute("nonce");c=y(i.map(h=>{if(h=Ox(h),h in fy)return;fy[h]=!0;const b=h.endsWith(".css"),p=b?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${p}`))return;const S=document.createElement("link");if(S.rel=b?"stylesheet":Mx,b||(S.as="script"),S.crossOrigin="",S.href=h,g&&S.setAttribute("nonce",g),document.head.appendChild(S),b)return new Promise((E,w)=>{S.addEventListener("load",E),S.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${h}`)))})}))}function f(m){const g=new Event("vite:preloadError",{cancelable:!0});if(g.payload=m,window.dispatchEvent(g),!g.defaultPrevented)throw m}return c.then(m=>{for(const g of m||[])g.status==="rejected"&&f(g.reason);return s().catch(f)})},zx=()=>Cx(()=>import("./index-CBGDT9fi.js"),[]),Dx=Jc("/")({validateSearch:a=>{const s=a,i=typeof s.collection=="string"&&s.collection.length>0?s.collection:void 0,o=typeof s.file=="string"&&s.file.length>0?s.file:void 0;return{collection:i,file:o}},component:U2(zx,"component")}),Nx=Dx.update({id:"/",path:"/",getParentRoute:()=>gf}),Lx={IndexRoute:Nx},Bx=gf._addFileChildren(Lx);function Ux(){return Z2({routeTree:Bx,scrollRestoration:!0,defaultPreload:"intent",defaultPreloadStaleTime:0})}async function jx(){const a=await Ux();let s;return s=[],window.__TSS_START_OPTIONS__={serializationAdapters:s},s.push(bE),a.options.serializationAdapters&&s.push(...a.options.serializationAdapters),a.update({basepath:"",serializationAdapters:s}),a.state.matches.length||await aE(a),a}async function Hx(){const a=await jx();return window.$_TSR?.h(),a}let Gc;function qx(){return Gc||(Gc=Hx()),P.jsx(u2,{promise:Gc,children:a=>P.jsx(J2,{router:a})})}et.startTransition(()=>{Jv.hydrateRoot(document,P.jsx(et.StrictMode,{children:P.jsx(qx,{})}))});export{kE as L,Vv as R,ro as T,OE as a,d0 as b,CE as c,p2 as d,ys as e,so as f,F as g,E2 as h,qr as i,P as j,E0 as k,dy as l,Kx as m,Dx as n,et as r,Jx as t,AE as u,v2 as w};