react-semaphor 0.0.630 → 0.0.632
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{dashboard-plus-DQulUok7.js → dashboard-plus-C9Zc94LX.js} +2996 -2997
- package/dist/chunks/dashboard-plus-Cj66-ScR.js +355 -0
- package/dist/chunks/{index-CXL7gvuy.js → index-BN9MFMRc.js} +1 -1
- package/dist/chunks/{index-CCBLRfsE.js → index-Ccd0W9ao.js} +13 -20
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +3 -3
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/main.d.ts +5 -0
- package/package.json +1 -1
- package/dist/chunks/dashboard-plus-B3mZd8dr.js +0 -355
|
@@ -588,7 +588,7 @@ result = df.to_dict('records') # must return 'result' as [dict] type
|
|
|
588
588
|
*
|
|
589
589
|
* This source code is licensed under the ISC license.
|
|
590
590
|
* See the LICENSE file in the root directory of this source tree.
|
|
591
|
-
*/const mn=he("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function $P(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Rne(...e){return t=>{let n=!1;const r=e.map(o=>{const s=$P(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():$P(e[o],null)}}}}function Ys(e){const t=Pne(e),n=S.forwardRef((r,o)=>{const{children:s,...i}=r,a=S.Children.toArray(s),l=a.find(Ane);if(l){const c=l.props.children,u=a.map(f=>f===l?S.Children.count(c)>1?S.Children.only(null):S.isValidElement(c)?c.props.children:null:f);return d.jsx(t,{...i,ref:o,children:S.isValidElement(c)?S.cloneElement(c,void 0,u):null})}return d.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var Dne=Ys("Slot");function Pne(e){const t=S.forwardRef((n,r)=>{const{children:o,...s}=n;if(S.isValidElement(o)){const i=One(o),a=Ine(s,o.props);return o.type!==S.Fragment&&(a.ref=r?Rne(r,i):i),S.cloneElement(o,a)}return S.Children.count(o)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Tne=Symbol("radix.slottable");function Ane(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Tne}function Ine(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function One(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const FP=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,LP=mu,zv=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return LP(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],f=s==null?void 0:s[c];if(u===null)return null;const h=FP(u)||FP(f);return o[c][h]}),a=n&&Object.entries(n).reduce((c,u)=>{let[f,h]=u;return h===void 0||(c[f]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:f,className:h,...p}=u;return Object.entries(p).every(m=>{let[g,b]=m;return Array.isArray(b)?b.includes({...s,...a}[g]):{...s,...a}[g]===b})?[...c,f,h]:c},[]);return LP(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},jm=zv("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),le=S.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>{const i=r?Dne:"button";return d.jsx(i,{className:Z(jm({variant:t,size:n,className:e})),ref:s,...o})});le.displayName="Button";const zP={sales:U0,user:Of,marketing:Pg,financial:wu,operations:Ur,project:qs},$ne={sales:"bg-orange-500",user:"bg-teal-500",marketing:"bg-red-500",financial:"bg-yellow-500",operations:"bg-purple-500",project:"bg-blue-500"};function Fne(e){const t=e.toLowerCase();for(const n in zP)if(t.includes(n))return{Icon:zP[n],color:$ne[n]};return{Icon:Pg,color:"bg-green-500"}}function Lne(e){const t=new Date(e),r=new Date().getTime()-t.getTime(),o=Math.floor(r/(1e3*60*60)),s=Math.floor(r/(1e3*60*60*24)),i=Math.floor(s/7);return o<24?o===1?"1 hour ago":`${o} hours ago`:s<7?s===1?"1 day ago":`${s} days ago`:i<4?i===1?"1 week ago":`${i} weeks ago`:t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function zne({dashboard:e,onView:t,viewCount:n=Math.floor(Math.random()*2e3)+100}){const{Icon:r,color:o}=Fne(e.title);return d.jsxs(Ri,{className:"group h-full cursor-pointer transition-all hover:shadow-lg",onClick:()=>t(e.id),children:[d.jsx(Di,{className:"p-4 pb-3",children:d.jsxs("div",{className:"flex items-start justify-between",children:[d.jsx("div",{className:Z("flex size-9 items-center justify-center rounded-lg text-white",o),children:d.jsx(r,{className:"h-5 w-5"})}),d.jsxs("span",{className:"text-xs text-muted-foreground",children:[n.toLocaleString()," views"]})]})}),d.jsxs(Pa,{className:"space-y-3 p-4 pt-0",children:[d.jsxs("div",{children:[d.jsx("h3",{className:"mb-1 font-semibold text-foreground",children:e.title}),d.jsx("p",{className:"line-clamp-2 text-sm text-muted-foreground",children:e.description||"No description available"})]}),d.jsx("div",{className:"pt-2",children:d.jsxs("span",{className:"text-xs text-muted-foreground",children:["Updated ",Lne(e.updatedAt)]})})]})]})}var Bne=e=>{switch(e){case"success":return Wne;case"info":return qne;case"warning":return Une;case"error":return Gne;default:return null}},Vne=Array(12).fill(0),Hne=({visible:e,className:t})=>E.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},E.createElement("div",{className:"sonner-spinner"},Vne.map((n,r)=>E.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Wne=E.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},E.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"})),Une=E.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},E.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"})),qne=E.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},E.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"})),Gne=E.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},E.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"})),Yne=E.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"},E.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),E.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Zne=()=>{let[e,t]=E.useState(document.hidden);return E.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},uE=1,Kne=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:uE++,s=this.toasts.find(a=>a.id===o),i=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),s?this.toasts=this.toasts.map(a=>a.id===o?(this.publish({...a,...e,id:o,title:n}),{...a,...e,id:o,dismissible:i,title:n}):a):this.addToast({title:n,...r,dismissible:i,id:o}),o},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0,s,i=r.then(async l=>{if(s=["resolve",l],E.isValidElement(l))o=!1,this.create({id:n,type:"default",message:l});else if(Qne(l)&&!l.ok){o=!1;let c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,u=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:n,type:"error",message:c,description:u})}else if(t.success!==void 0){o=!1;let c=typeof t.success=="function"?await t.success(l):t.success,u=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"success",message:c,description:u})}}).catch(async l=>{if(s=["reject",l],t.error!==void 0){o=!1;let c=typeof t.error=="function"?await t.error(l):t.error,u=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"error",message:c,description:u})}}).finally(()=>{var l;o&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,c)=>i.then(()=>s[0]==="reject"?c(s[1]):l(s[1])).catch(c));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||uE++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},So=new Kne,Xne=(e,t)=>{let n=(t==null?void 0:t.id)||uE++;return So.addToast({title:e,...t,id:n}),n},Qne=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Jne=Xne,ere=()=>So.toasts,tre=()=>So.getActiveToasts(),it=Object.assign(Jne,{success:So.success,info:So.info,warning:So.warning,error:So.error,custom:So.custom,message:So.message,promise:So.promise,dismiss:So.dismiss,loading:So.loading},{getHistory:ere,getToasts:tre});function nre(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}nre(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;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);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
591
|
+
*/const mn=he("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function $P(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Rne(...e){return t=>{let n=!1;const r=e.map(o=>{const s=$P(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():$P(e[o],null)}}}}function Ys(e){const t=Pne(e),n=S.forwardRef((r,o)=>{const{children:s,...i}=r,a=S.Children.toArray(s),l=a.find(Ane);if(l){const c=l.props.children,u=a.map(f=>f===l?S.Children.count(c)>1?S.Children.only(null):S.isValidElement(c)?c.props.children:null:f);return d.jsx(t,{...i,ref:o,children:S.isValidElement(c)?S.cloneElement(c,void 0,u):null})}return d.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var Dne=Ys("Slot");function Pne(e){const t=S.forwardRef((n,r)=>{const{children:o,...s}=n;if(S.isValidElement(o)){const i=One(o),a=Ine(s,o.props);return o.type!==S.Fragment&&(a.ref=r?Rne(r,i):i),S.cloneElement(o,a)}return S.Children.count(o)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Tne=Symbol("radix.slottable");function Ane(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Tne}function Ine(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function One(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const FP=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,LP=mu,zv=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return LP(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],f=s==null?void 0:s[c];if(u===null)return null;const h=FP(u)||FP(f);return o[c][h]}),a=n&&Object.entries(n).reduce((c,u)=>{let[f,h]=u;return h===void 0||(c[f]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:f,className:h,...p}=u;return Object.entries(p).every(m=>{let[g,b]=m;return Array.isArray(b)?b.includes({...s,...a}[g]):{...s,...a}[g]===b})?[...c,f,h]:c},[]);return LP(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},jm=zv("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),le=S.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>{const i=r?Dne:"button";return d.jsx(i,{className:Z(jm({variant:t,size:n,className:e})),ref:s,...o})});le.displayName="Button";const zP={sales:U0,user:Of,marketing:Pg,financial:wu,operations:Ur,project:qs},$ne={sales:"bg-orange-500",user:"bg-teal-500",marketing:"bg-red-500",financial:"bg-yellow-500",operations:"bg-purple-500",project:"bg-blue-500"};function Fne(e){const t=e.toLowerCase();for(const n in zP)if(t.includes(n))return{Icon:zP[n],color:$ne[n]};return{Icon:Pg,color:"bg-green-500"}}function Lne(e){const t=new Date(e),r=new Date().getTime()-t.getTime(),o=Math.floor(r/(1e3*60*60)),s=Math.floor(r/(1e3*60*60*24)),i=Math.floor(s/7);return o<24?o===1?"1 hour ago":`${o} hours ago`:s<7?s===1?"1 day ago":`${s} days ago`:i<4?i===1?"1 week ago":`${i} weeks ago`:t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function zne({dashboard:e,onView:t}){const{Icon:n,color:r}=Fne(e.title);return d.jsxs(Ri,{className:"group h-full cursor-pointer transition-all hover:shadow-lg",onClick:()=>t(e.id),children:[d.jsx(Di,{className:"p-4 pb-3",children:d.jsx("div",{className:"flex items-start justify-between",children:d.jsx("div",{className:Z("flex size-9 items-center justify-center rounded-lg text-white",r),children:d.jsx(n,{className:"h-5 w-5"})})})}),d.jsxs(Pa,{className:"space-y-3 p-4 pt-0",children:[d.jsxs("div",{children:[d.jsx("h3",{className:"mb-1 font-semibold text-foreground",children:e.title}),d.jsx("p",{className:"line-clamp-2 text-sm text-muted-foreground",children:e.description||"No description available"})]}),d.jsx("div",{className:"pt-2",children:d.jsxs("span",{className:"text-xs text-muted-foreground",children:["Updated ",Lne(e.updatedAt)]})})]})]})}var Bne=e=>{switch(e){case"success":return Wne;case"info":return qne;case"warning":return Une;case"error":return Gne;default:return null}},Vne=Array(12).fill(0),Hne=({visible:e,className:t})=>E.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},E.createElement("div",{className:"sonner-spinner"},Vne.map((n,r)=>E.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Wne=E.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},E.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"})),Une=E.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},E.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"})),qne=E.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},E.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"})),Gne=E.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},E.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"})),Yne=E.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"},E.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),E.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Zne=()=>{let[e,t]=E.useState(document.hidden);return E.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},uE=1,Kne=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:uE++,s=this.toasts.find(a=>a.id===o),i=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),s?this.toasts=this.toasts.map(a=>a.id===o?(this.publish({...a,...e,id:o,title:n}),{...a,...e,id:o,dismissible:i,title:n}):a):this.addToast({title:n,...r,dismissible:i,id:o}),o},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0,s,i=r.then(async l=>{if(s=["resolve",l],E.isValidElement(l))o=!1,this.create({id:n,type:"default",message:l});else if(Qne(l)&&!l.ok){o=!1;let c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,u=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:n,type:"error",message:c,description:u})}else if(t.success!==void 0){o=!1;let c=typeof t.success=="function"?await t.success(l):t.success,u=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"success",message:c,description:u})}}).catch(async l=>{if(s=["reject",l],t.error!==void 0){o=!1;let c=typeof t.error=="function"?await t.error(l):t.error,u=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"error",message:c,description:u})}}).finally(()=>{var l;o&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,c)=>i.then(()=>s[0]==="reject"?c(s[1]):l(s[1])).catch(c));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||uE++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},So=new Kne,Xne=(e,t)=>{let n=(t==null?void 0:t.id)||uE++;return So.addToast({title:e,...t,id:n}),n},Qne=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Jne=Xne,ere=()=>So.toasts,tre=()=>So.getActiveToasts(),it=Object.assign(Jne,{success:So.success,info:So.info,warning:So.warning,error:So.error,custom:So.custom,message:So.message,promise:So.promise,dismiss:So.dismiss,loading:So.loading},{getHistory:ere,getToasts:tre});function nre(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}nre(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;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);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
592
592
|
`);function Wb(e){return e.label!==void 0}var rre=3,ore="32px",sre="16px",BP=4e3,ire=356,are=14,lre=20,cre=200;function _s(...e){return e.filter(Boolean).join(" ")}function ure(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var dre=e=>{var t,n,r,o,s,i,a,l,c,u,f;let{invert:h,toast:p,unstyled:m,interacting:g,setHeights:b,visibleToasts:y,heights:x,index:v,toasts:w,expanded:C,removeToast:k,defaultRichColors:N,closeButton:_,style:M,cancelButtonStyle:j,actionButtonStyle:A,className:D="",descriptionClassName:T="",duration:I,position:R,gap:O,loadingIcon:z,expandByDefault:V,classNames:F,icons:$,closeButtonAriaLabel:W="Close toast",pauseWhenPageIsHidden:B}=e,[P,H]=E.useState(null),[U,K]=E.useState(null),[G,L]=E.useState(!1),[q,Q]=E.useState(!1),[ee,X]=E.useState(!1),[ae,ie]=E.useState(!1),[oe,me]=E.useState(!1),[_e,ge]=E.useState(0),[ke,Be]=E.useState(0),ht=E.useRef(p.duration||I||BP),We=E.useRef(null),qe=E.useRef(null),yn=v===0,Mn=v+1<=y,re=p.type,fe=p.dismissible!==!1,Re=p.className||"",pe=p.descriptionClassName||"",Le=E.useMemo(()=>x.findIndex(ze=>ze.toastId===p.id)||0,[x,p.id]),nt=E.useMemo(()=>{var ze;return(ze=p.closeButton)!=null?ze:_},[p.closeButton,_]),_t=E.useMemo(()=>p.duration||I||BP,[p.duration,I]),$t=E.useRef(0),xe=E.useRef(0),Lt=E.useRef(0),bt=E.useRef(null),[In,be]=R.split("-"),ve=E.useMemo(()=>x.reduce((ze,Qe,rt)=>rt>=Le?ze:ze+Qe.height,0),[x,Le]),Te=Zne(),Ee=p.invert||h,De=re==="loading";xe.current=E.useMemo(()=>Le*O+ve,[Le,ve]),E.useEffect(()=>{ht.current=_t},[_t]),E.useEffect(()=>{L(!0)},[]),E.useEffect(()=>{let ze=qe.current;if(ze){let Qe=ze.getBoundingClientRect().height;return Be(Qe),b(rt=>[{toastId:p.id,height:Qe,position:p.position},...rt]),()=>b(rt=>rt.filter(zt=>zt.toastId!==p.id))}},[b,p.id]),E.useLayoutEffect(()=>{if(!G)return;let ze=qe.current,Qe=ze.style.height;ze.style.height="auto";let rt=ze.getBoundingClientRect().height;ze.style.height=Qe,Be(rt),b(zt=>zt.find(jt=>jt.toastId===p.id)?zt.map(jt=>jt.toastId===p.id?{...jt,height:rt}:jt):[{toastId:p.id,height:rt,position:p.position},...zt])},[G,p.title,p.description,b,p.id]);let He=E.useCallback(()=>{Q(!0),ge(xe.current),b(ze=>ze.filter(Qe=>Qe.toastId!==p.id)),setTimeout(()=>{k(p)},cre)},[p,k,b,xe]);E.useEffect(()=>{if(p.promise&&re==="loading"||p.duration===1/0||p.type==="loading")return;let ze;return C||g||B&&Te?(()=>{if(Lt.current<$t.current){let Qe=new Date().getTime()-$t.current;ht.current=ht.current-Qe}Lt.current=new Date().getTime()})():ht.current!==1/0&&($t.current=new Date().getTime(),ze=setTimeout(()=>{var Qe;(Qe=p.onAutoClose)==null||Qe.call(p,p),He()},ht.current)),()=>clearTimeout(ze)},[C,g,p,re,B,Te,He]),E.useEffect(()=>{p.delete&&He()},[He,p.delete]);function Oe(){var ze,Qe,rt;return $!=null&&$.loading?E.createElement("div",{className:_s(F==null?void 0:F.loader,(ze=p==null?void 0:p.classNames)==null?void 0:ze.loader,"sonner-loader"),"data-visible":re==="loading"},$.loading):z?E.createElement("div",{className:_s(F==null?void 0:F.loader,(Qe=p==null?void 0:p.classNames)==null?void 0:Qe.loader,"sonner-loader"),"data-visible":re==="loading"},z):E.createElement(Hne,{className:_s(F==null?void 0:F.loader,(rt=p==null?void 0:p.classNames)==null?void 0:rt.loader),visible:re==="loading"})}return E.createElement("li",{tabIndex:0,ref:qe,className:_s(D,Re,F==null?void 0:F.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,F==null?void 0:F.default,F==null?void 0:F[re],(n=p==null?void 0:p.classNames)==null?void 0:n[re]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:N,"data-styled":!(p.jsx||p.unstyled||m),"data-mounted":G,"data-promise":!!p.promise,"data-swiped":oe,"data-removed":q,"data-visible":Mn,"data-y-position":In,"data-x-position":be,"data-index":v,"data-front":yn,"data-swiping":ee,"data-dismissible":fe,"data-type":re,"data-invert":Ee,"data-swipe-out":ae,"data-swipe-direction":U,"data-expanded":!!(C||V&&G),style:{"--index":v,"--toasts-before":v,"--z-index":w.length-v,"--offset":`${q?_e:xe.current}px`,"--initial-height":V?"auto":`${ke}px`,...M,...p.style},onDragEnd:()=>{X(!1),H(null),bt.current=null},onPointerDown:ze=>{De||!fe||(We.current=new Date,ge(xe.current),ze.target.setPointerCapture(ze.pointerId),ze.target.tagName!=="BUTTON"&&(X(!0),bt.current={x:ze.clientX,y:ze.clientY}))},onPointerUp:()=>{var ze,Qe,rt,zt;if(ae||!fe)return;bt.current=null;let jt=Number(((ze=qe.current)==null?void 0:ze.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Bt=Number(((Qe=qe.current)==null?void 0:Qe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Kn=new Date().getTime()-((rt=We.current)==null?void 0:rt.getTime()),rn=P==="x"?jt:Bt,On=Math.abs(rn)/Kn;if(Math.abs(rn)>=lre||On>.11){ge(xe.current),(zt=p.onDismiss)==null||zt.call(p,p),K(P==="x"?jt>0?"right":"left":Bt>0?"down":"up"),He(),ie(!0),me(!1);return}X(!1),H(null)},onPointerMove:ze=>{var Qe,rt,zt,jt;if(!bt.current||!fe||((Qe=window.getSelection())==null?void 0:Qe.toString().length)>0)return;let Bt=ze.clientY-bt.current.y,Kn=ze.clientX-bt.current.x,rn=(rt=e.swipeDirections)!=null?rt:ure(R);!P&&(Math.abs(Kn)>1||Math.abs(Bt)>1)&&H(Math.abs(Kn)>Math.abs(Bt)?"x":"y");let On={x:0,y:0};P==="y"?(rn.includes("top")||rn.includes("bottom"))&&(rn.includes("top")&&Bt<0||rn.includes("bottom")&&Bt>0)&&(On.y=Bt):P==="x"&&(rn.includes("left")||rn.includes("right"))&&(rn.includes("left")&&Kn<0||rn.includes("right")&&Kn>0)&&(On.x=Kn),(Math.abs(On.x)>0||Math.abs(On.y)>0)&&me(!0),(zt=qe.current)==null||zt.style.setProperty("--swipe-amount-x",`${On.x}px`),(jt=qe.current)==null||jt.style.setProperty("--swipe-amount-y",`${On.y}px`)}},nt&&!p.jsx?E.createElement("button",{"aria-label":W,"data-disabled":De,"data-close-button":!0,onClick:De||!fe?()=>{}:()=>{var ze;He(),(ze=p.onDismiss)==null||ze.call(p,p)},className:_s(F==null?void 0:F.closeButton,(o=p==null?void 0:p.classNames)==null?void 0:o.closeButton)},(s=$==null?void 0:$.close)!=null?s:Yne):null,p.jsx||E.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:E.createElement(E.Fragment,null,re||p.icon||p.promise?E.createElement("div",{"data-icon":"",className:_s(F==null?void 0:F.icon,(i=p==null?void 0:p.classNames)==null?void 0:i.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||Oe():null,p.type!=="loading"?p.icon||($==null?void 0:$[re])||Bne(re):null):null,E.createElement("div",{"data-content":"",className:_s(F==null?void 0:F.content,(a=p==null?void 0:p.classNames)==null?void 0:a.content)},E.createElement("div",{"data-title":"",className:_s(F==null?void 0:F.title,(l=p==null?void 0:p.classNames)==null?void 0:l.title)},typeof p.title=="function"?p.title():p.title),p.description?E.createElement("div",{"data-description":"",className:_s(T,pe,F==null?void 0:F.description,(c=p==null?void 0:p.classNames)==null?void 0:c.description)},typeof p.description=="function"?p.description():p.description):null),E.isValidElement(p.cancel)?p.cancel:p.cancel&&Wb(p.cancel)?E.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||j,onClick:ze=>{var Qe,rt;Wb(p.cancel)&&fe&&((rt=(Qe=p.cancel).onClick)==null||rt.call(Qe,ze),He())},className:_s(F==null?void 0:F.cancelButton,(u=p==null?void 0:p.classNames)==null?void 0:u.cancelButton)},p.cancel.label):null,E.isValidElement(p.action)?p.action:p.action&&Wb(p.action)?E.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||A,onClick:ze=>{var Qe,rt;Wb(p.action)&&((rt=(Qe=p.action).onClick)==null||rt.call(Qe,ze),!ze.defaultPrevented&&He())},className:_s(F==null?void 0:F.actionButton,(f=p==null?void 0:p.classNames)==null?void 0:f.actionButton)},p.action.label):null))};function VP(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function fre(e,t){let n={};return[e,t].forEach((r,o)=>{let s=o===1,i=s?"--mobile-offset":"--offset",a=s?sre:ore;function l(c){["top","right","bottom","left"].forEach(u=>{n[`${i}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${i}-${c}`]=a:n[`${i}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(a)}),n}var hre=E.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:s,closeButton:i,className:a,offset:l,mobileOffset:c,theme:u="light",richColors:f,duration:h,style:p,visibleToasts:m=rre,toastOptions:g,dir:b=VP(),gap:y=are,loadingIcon:x,icons:v,containerAriaLabel:w="Notifications",pauseWhenPageIsHidden:C}=e,[k,N]=E.useState([]),_=E.useMemo(()=>Array.from(new Set([r].concat(k.filter(B=>B.position).map(B=>B.position)))),[k,r]),[M,j]=E.useState([]),[A,D]=E.useState(!1),[T,I]=E.useState(!1),[R,O]=E.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),z=E.useRef(null),V=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),F=E.useRef(null),$=E.useRef(!1),W=E.useCallback(B=>{N(P=>{var H;return(H=P.find(U=>U.id===B.id))!=null&&H.delete||So.dismiss(B.id),P.filter(({id:U})=>U!==B.id)})},[]);return E.useEffect(()=>So.subscribe(B=>{if(B.dismiss){N(P=>P.map(H=>H.id===B.id?{...H,delete:!0}:H));return}setTimeout(()=>{Pn.flushSync(()=>{N(P=>{let H=P.findIndex(U=>U.id===B.id);return H!==-1?[...P.slice(0,H),{...P[H],...B},...P.slice(H+1)]:[B,...P]})})})}),[]),E.useEffect(()=>{if(u!=="system"){O(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?O("dark"):O("light")),typeof window>"u")return;let B=window.matchMedia("(prefers-color-scheme: dark)");try{B.addEventListener("change",({matches:P})=>{O(P?"dark":"light")})}catch{B.addListener(({matches:H})=>{try{O(H?"dark":"light")}catch(U){console.error(U)}})}},[u]),E.useEffect(()=>{k.length<=1&&D(!1)},[k]),E.useEffect(()=>{let B=P=>{var H,U;o.every(K=>P[K]||P.code===K)&&(D(!0),(H=z.current)==null||H.focus()),P.code==="Escape"&&(document.activeElement===z.current||(U=z.current)!=null&&U.contains(document.activeElement))&&D(!1)};return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[o]),E.useEffect(()=>{if(z.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,$.current=!1)}},[z.current]),E.createElement("section",{ref:t,"aria-label":`${w} ${V}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},_.map((B,P)=>{var H;let[U,K]=B.split("-");return k.length?E.createElement("ol",{key:B,dir:b==="auto"?VP():b,tabIndex:-1,ref:z,className:a,"data-sonner-toaster":!0,"data-theme":R,"data-y-position":U,"data-lifted":A&&k.length>1&&!s,"data-x-position":K,style:{"--front-toast-height":`${((H=M[0])==null?void 0:H.height)||0}px`,"--width":`${ire}px`,"--gap":`${y}px`,...p,...fre(l,c)},onBlur:G=>{$.current&&!G.currentTarget.contains(G.relatedTarget)&&($.current=!1,F.current&&(F.current.focus({preventScroll:!0}),F.current=null))},onFocus:G=>{G.target instanceof HTMLElement&&G.target.dataset.dismissible==="false"||$.current||($.current=!0,F.current=G.relatedTarget)},onMouseEnter:()=>D(!0),onMouseMove:()=>D(!0),onMouseLeave:()=>{T||D(!1)},onDragEnd:()=>D(!1),onPointerDown:G=>{G.target instanceof HTMLElement&&G.target.dataset.dismissible==="false"||I(!0)},onPointerUp:()=>I(!1)},k.filter(G=>!G.position&&P===0||G.position===B).map((G,L)=>{var q,Q;return E.createElement(dre,{key:G.id,icons:v,index:L,toast:G,defaultRichColors:f,duration:(q=g==null?void 0:g.duration)!=null?q:h,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:n,visibleToasts:m,closeButton:(Q=g==null?void 0:g.closeButton)!=null?Q:i,interacting:T,position:B,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:W,toasts:k.filter(ee=>ee.position==G.position),heights:M.filter(ee=>ee.position==G.position),setHeights:j,expandByDefault:s,gap:y,loadingIcon:x,expanded:A,pauseWhenPageIsHidden:C,swipeDirections:e.swipeDirections})})):null}))}),jn=(e=>(e.DASHBOARD="dashboard",e.VISUAL="visual",e))(jn||{});function Ql(){const{authToken:e,tokenProps:t}=vt();let n=null;t&&(t.endUserId&&t.endUserEmail&&t.tenantId?n={id:t.endUserId,name:t.endUserEmail?String(t.displayName):"",email:t.endUserEmail?String(t.endUserEmail):"",type:"tenant",tenantId:t.tenantId}:t.orgUserId&&t.orgUserEmail&&(n={id:t.orgUserId,name:t.orgUserEmail?String(t.displayName):"",email:t.orgUserEmail?String(t.orgUserEmail):"",type:"organization"}));const{data:r,isLoading:o,isError:s}=un({queryKey:["userInfo",n==null?void 0:n.id],queryFn:async()=>{if(!(n!=null&&n.id))return;const a=await fetch(`https://semaphor.cloud/api/management/v1/unified-users/${n.id}`,{headers:{Authorization:`Bearer ${(e==null?void 0:e.accessToken)||""}`,"Content-Type":"application/json"}});if(!a.ok)throw new Error("Failed to fetch user info");return(await a.json()).user},enabled:!!(e!=null&&e.accessToken)&&!!(n!=null&&n.id)});return{currentUser:n?{...n,...r||{}}:null,isLoading:o,isError:s}}const pre=async(e,t,n,r,o,s)=>{const i={},a={[jn.DASHBOARD]:"dashboards",[jn.VISUAL]:"visuals"};return Un(`https://semaphor.cloud/api/management/v1/${a[t]}`,e,i)},mre=async(e,t,n)=>{const r={[jn.DASHBOARD]:"dashboards",[jn.VISUAL]:"visuals"};return hh(`https://semaphor.cloud/api/management/v1/${r[t]}`,e,n)},gre=async(e,t,n,r)=>{const o={[jn.DASHBOARD]:"dashboards",[jn.VISUAL]:"visuals"},s=await fetch(`https://semaphor.cloud/api/management/v1/${o[t]}/${n}`,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify(r)});if(!s.ok){const i=await s.json();throw new Error((i==null?void 0:i.error)||`HTTP error! status: ${s.status}`)}return s.json()},bre=async(e,t,n)=>{const r={[jn.DASHBOARD]:"dashboards",[jn.VISUAL]:"visuals"},o=await fetch(`https://semaphor.cloud/api/management/v1/${r[t]}/${n}`,{method:"DELETE",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`}});if(!o.ok){const s=await o.json();throw new Error((s==null?void 0:s.error)||`HTTP error! status: ${o.status}`)}return o.json()},yre=async(e,t,n)=>{const r={[jn.DASHBOARD]:"dashboards",[jn.VISUAL]:"visuals"};return hh(`https://semaphor.cloud/api/management/v1/${r[t]}/${n}/duplicate`,e,{})},xre=async(e,t,n,r)=>{const o={[jn.DASHBOARD]:"dashboards",[jn.VISUAL]:"visuals"};return hh(`https://semaphor.cloud/api/management/v1/${o[t]}/${n}/share`,e,r)},vre=async(e,t,n,r)=>{const o={[jn.DASHBOARD]:"dashboards",[jn.VISUAL]:"visuals"},s=await fetch(`https://semaphor.cloud/api/management/v1/${o[t]}/${n}/share`,{method:"DELETE",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify(r)});if(!s.ok){const i=await s.json();throw new Error((i==null?void 0:i.error)||`HTTP error! status: ${s.status}`)}return s.json()},wre=async(e,t,n)=>{const r={[jn.DASHBOARD]:"dashboards",[jn.VISUAL]:"visuals"};return Un(`https://semaphor.cloud/api/management/v1/${r[t]}/${n}/shares`,e)},Sre=async(e,t,n)=>{const r={[jn.DASHBOARD]:"dashboards",[jn.VISUAL]:"visuals"};return Un(`https://semaphor.cloud/api/management/v1/${r[t]}/${n}`,e)};function Cre(e){const{authToken:t}=vt();return un({queryKey:["tenants"],queryFn:()=>Un("https://semaphor.cloud/api/management/v1/tenants",(t==null?void 0:t.accessToken)||""),enabled:(e==null?void 0:e.enabled)!==void 0?e.enabled&&!!(t!=null&&t.accessToken):!!(t!=null&&t.accessToken)})}function Ere(e,t,n,r,o){const{authToken:s}=vt(),{currentUser:i}=Ql();return un({queryKey:[e,t,n,r,o],queryFn:()=>pre((s==null?void 0:s.accessToken)||"",e),enabled:!!(s!=null&&s.accessToken)&&!!i})}function Nre(e,t){const{authToken:n}=vt(),r=Es();return Xl({mutationFn:o=>mre((n==null?void 0:n.accessToken)||"",e,o),onMutate:async()=>{await r.cancelQueries({queryKey:[e]})},onSuccess:async o=>{await r.invalidateQueries({queryKey:[e]}),it.success(`${Mi(e)} created successfully`),t==null||t(o)},onError:o=>{it.error(`Failed to create ${Mi(e)}: ${o.message}`)}})}function X3(e){const{authToken:t}=vt(),n=Es();return Xl({mutationFn:({resourceId:r,data:o})=>gre((t==null?void 0:t.accessToken)||"",e,r,o),onMutate:async()=>{await n.cancelQueries({queryKey:[e]})},onSuccess:async()=>{await n.invalidateQueries({queryKey:[e]})},onError:r=>{it.error(`Failed to update ${Mi(e)}: ${r.message}`)}})}function kre(e,t){const{authToken:n}=vt(),r=Es();return Xl({mutationFn:o=>bre((n==null?void 0:n.accessToken)||"",e,o),onMutate:async()=>{await r.cancelQueries({queryKey:[e]})},onSuccess:async()=>{await r.invalidateQueries({queryKey:[e]}),it.success(`${Mi(e)} deleted successfully`),t==null||t()},onError:o=>{it.error(`Failed to delete ${Mi(e)}: ${o.message}`)}})}function _re(e){const{authToken:t}=vt(),n=Es();return Xl({mutationFn:r=>yre((t==null?void 0:t.accessToken)||"",e,r),onMutate:async()=>{await n.cancelQueries({queryKey:[e]})},onSuccess:async()=>{await n.invalidateQueries({queryKey:[e]}),it.success(`${Mi(e)} duplicated successfully`)},onError:r=>{it.error(`Failed to duplicate ${Mi(e)}: ${r.message}`)}})}function Q3(){const{authToken:e}=vt(),t=Es();return Xl({mutationFn:({resourceType:n,resourceId:r,data:o})=>xre((e==null?void 0:e.accessToken)||"",n,r,o),onMutate:async n=>{await t.cancelQueries({queryKey:["resource-shares",n.resourceType,n.resourceId]})},onSuccess:async(n,r)=>{await t.invalidateQueries({queryKey:["resource-shares",r.resourceType,r.resourceId]}),t.invalidateQueries({queryKey:[r.resourceType]})},onError:n=>{it.error(`Failed to share resource: ${n.message}`)}})}function J3(){const{authToken:e}=vt(),t=Es();return Xl({mutationFn:({resourceType:n,resourceId:r,data:o})=>vre((e==null?void 0:e.accessToken)||"",n,r,o),onMutate:async n=>{await t.cancelQueries({queryKey:["resource-shares",n.resourceType,n.resourceId]})},onSuccess:async(n,r)=>{await t.invalidateQueries({queryKey:["resource-shares",r.resourceType,r.resourceId]}),t.invalidateQueries({queryKey:[r.resourceType]})},onError:n=>{it.error(`Failed to remove resource shares: ${n.message}`)}})}function jre(e,t){const{authToken:n}=vt();return un({queryKey:["resource-shares",e,t],queryFn:()=>wre((n==null?void 0:n.accessToken)||"",e,t),enabled:!!(n!=null&&n.accessToken)&&!!t})}function Mre(e,t,n){const{authToken:r}=vt();return un({queryKey:["resource-by-id",e,t],queryFn:()=>Sre((r==null?void 0:r.accessToken)||"",e,t),enabled:(n==null?void 0:n.enabled)!==void 0?n.enabled&&!!(r!=null&&r.accessToken)&&!!t:!!(r!=null&&r.accessToken)&&!!t})}function Rre(e,t){return Mre(jn.VISUAL,e,t)}function Dre(){const[e,t]=E.useState(new Map),n=E.useCallback((s,i)=>{t(a=>{const l=new Map(a),c=new Set(l.get(s)||[]);return i?c.add(i):(c.add("title"),c.add("description")),l.set(s,c),l})},[]),r=E.useCallback((s,i)=>{t(a=>{const l=new Map(a),c=new Set(l.get(s)||[]);return i?c.delete(i):c.clear(),c.size===0?l.delete(s):l.set(s,c),l})},[]),o=E.useCallback((s,i)=>{const a=e.get(s);return a?i?a.has(i):a.size>0:!1},[e]);return{startUpdating:n,stopUpdating:r,isUpdating:o}}function x_(e,t,n){var f;const r=Ere(e),o=Nre(e,n),s=X3(e),i=kre(e,t),a=_re(e),l=Q3(),c=J3(),u={[jn.DASHBOARD]:"dashboards",[jn.VISUAL]:"visuals"};return{resources:((f=r.data)==null?void 0:f[u[e]])||[],isLoading:r.isLoading,isError:r.isError,isFetching:r.isFetching,error:r.error,createResource:o.mutate,updateResource:s.mutate,deleteResource:i.mutate,duplicateResource:a.mutate,shareResource:l.mutate,removeResourceShares:c.mutate,isCreating:o.isPending,isUpdating:s.isPending,isDeleting:i.isPending,isDuplicating:a.isPending,isSharing:l.isPending,isRemovingShares:c.isPending,isUpdatingShares:l.isPending,refetch:r.refetch}}function eL(e,t){return x_(jn.DASHBOARD,e,t)}function Pre(e,t){return x_(jn.VISUAL,e,t)}function Tre(){const{authToken:e}=vt(),t=Es();return Xl({mutationFn:async({visualId:n,data:r})=>{const o=await fetch(`https://semaphor.cloud/api/management/v1/visuals/${n}`,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e==null?void 0:e.accessToken}`},body:JSON.stringify(r)});if(!o.ok)throw new Error("Failed to update visual");return o.json()},onSuccess:()=>{it.success("Visual updated successfully"),t.invalidateQueries({queryKey:["visuals"]})},onError:()=>{it.error("Failed to update visual")}})}function Rl(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function HP(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Are(...e){return t=>{let n=!1;const r=e.map(o=>{const s=HP(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():HP(e[o],null)}}}}function Wu(...e){return S.useCallback(Are(...e),e)}function Ire(e,t){const n=S.createContext(t),r=s=>{const{children:i,...a}=s,l=S.useMemo(()=>a,Object.values(a));return d.jsx(n.Provider,{value:l,children:i})};r.displayName=e+"Provider";function o(s){const i=S.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function Ore(e,t=[]){let n=[];function r(s,i){const a=S.createContext(i),l=n.length;n=[...n,i];const c=f=>{var y;const{scope:h,children:p,...m}=f,g=((y=h==null?void 0:h[e])==null?void 0:y[l])||a,b=S.useMemo(()=>m,Object.values(m));return d.jsx(g.Provider,{value:b,children:p})};c.displayName=s+"Provider";function u(f,h){var g;const p=((g=h==null?void 0:h[e])==null?void 0:g[l])||a,m=S.useContext(p);if(m)return m;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[c,u]}const o=()=>{const s=n.map(i=>S.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return S.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,$re(o,...t)]}function $re(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:l,scopeName:c})=>{const f=l(s)[`__scope${c}`];return{...a,...f}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var Mm=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{},Fre=S[" useId ".trim().toString()]||(()=>{}),Lre=0;function cS(e){const[t,n]=S.useState(Fre());return Mm(()=>{n(r=>r??String(Lre++))},[e]),e||(t?`radix-${t}`:"")}var zre=S[" useInsertionEffect ".trim().toString()]||Mm;function Bre({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=Vre({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:o;{const u=S.useRef(e!==void 0);S.useEffect(()=>{const f=u.current;f!==a&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,r])}const c=S.useCallback(u=>{var f;if(a){const h=Hre(u)?u(e):u;h!==e&&((f=i.current)==null||f.call(i,h))}else s(u)},[a,e,s,i]);return[l,c]}function Vre({defaultProp:e,onChange:t}){const[n,r]=S.useState(e),o=S.useRef(n),s=S.useRef(t);return zre(()=>{s.current=t},[t]),S.useEffect(()=>{var i;o.current!==n&&((i=s.current)==null||i.call(s,n),o.current=n)},[n,o]),[n,r,s]}function Hre(e){return typeof e=="function"}var Wre=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],La=Wre.reduce((e,t)=>{const n=Ys(`Primitive.${t}`),r=S.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ure(e,t){e&&Da.flushSync(()=>e.dispatchEvent(t))}function Rm(e){const t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function qre(e,t=globalThis==null?void 0:globalThis.document){const n=Rm(e);S.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Gre="DismissableLayer",dE="dismissableLayer.update",Yre="dismissableLayer.pointerDownOutside",Zre="dismissableLayer.focusOutside",WP,tL=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),nL=S.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,c=S.useContext(tL),[u,f]=S.useState(null),h=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=S.useState({}),m=Wu(t,N=>f(N)),g=Array.from(c.layers),[b]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(b),x=u?g.indexOf(u):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,w=x>=y,C=Qre(N=>{const _=N.target,M=[...c.branches].some(j=>j.contains(_));!w||M||(o==null||o(N),i==null||i(N),N.defaultPrevented||a==null||a())},h),k=Jre(N=>{const _=N.target;[...c.branches].some(j=>j.contains(_))||(s==null||s(N),i==null||i(N),N.defaultPrevented||a==null||a())},h);return qre(N=>{x===c.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&a&&(N.preventDefault(),a()))},h),S.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(WP=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),UP(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=WP)}},[u,h,n,c]),S.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),UP())},[u,c]),S.useEffect(()=>{const N=()=>p({});return document.addEventListener(dE,N),()=>document.removeEventListener(dE,N)},[]),d.jsx(La.div,{...l,ref:m,style:{pointerEvents:v?w?"auto":"none":void 0,...e.style},onFocusCapture:Rl(e.onFocusCapture,k.onFocusCapture),onBlurCapture:Rl(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Rl(e.onPointerDownCapture,C.onPointerDownCapture)})});nL.displayName=Gre;var Kre="DismissableLayerBranch",Xre=S.forwardRef((e,t)=>{const n=S.useContext(tL),r=S.useRef(null),o=Wu(t,r);return S.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),d.jsx(La.div,{...e,ref:o})});Xre.displayName=Kre;function Qre(e,t=globalThis==null?void 0:globalThis.document){const n=Rm(e),r=S.useRef(!1),o=S.useRef(()=>{});return S.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){rL(Yre,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Jre(e,t=globalThis==null?void 0:globalThis.document){const n=Rm(e),r=S.useRef(!1);return S.useEffect(()=>{const o=s=>{s.target&&!r.current&&rL(Zre,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function UP(){const e=new CustomEvent(dE);document.dispatchEvent(e)}function rL(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Ure(o,s):o.dispatchEvent(s)}var uS="focusScope.autoFocusOnMount",dS="focusScope.autoFocusOnUnmount",qP={bubbles:!1,cancelable:!0},eoe="FocusScope",oL=S.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,l]=S.useState(null),c=Rm(o),u=Rm(s),f=S.useRef(null),h=Wu(t,g=>l(g)),p=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(r){let g=function(v){if(p.paused||!a)return;const w=v.target;a.contains(w)?f.current=w:il(f.current,{select:!0})},b=function(v){if(p.paused||!a)return;const w=v.relatedTarget;w!==null&&(a.contains(w)||il(f.current,{select:!0}))},y=function(v){if(document.activeElement===document.body)for(const C of v)C.removedNodes.length>0&&il(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",b);const x=new MutationObserver(y);return a&&x.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",b),x.disconnect()}}},[r,a,p.paused]),S.useEffect(()=>{if(a){YP.add(p);const g=document.activeElement;if(!a.contains(g)){const y=new CustomEvent(uS,qP);a.addEventListener(uS,c),a.dispatchEvent(y),y.defaultPrevented||(toe(ioe(sL(a)),{select:!0}),document.activeElement===g&&il(a))}return()=>{a.removeEventListener(uS,c),setTimeout(()=>{const y=new CustomEvent(dS,qP);a.addEventListener(dS,u),a.dispatchEvent(y),y.defaultPrevented||il(g??document.body,{select:!0}),a.removeEventListener(dS,u),YP.remove(p)},0)}}},[a,c,u,p]);const m=S.useCallback(g=>{if(!n&&!r||p.paused)return;const b=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(b&&y){const x=g.currentTarget,[v,w]=noe(x);v&&w?!g.shiftKey&&y===w?(g.preventDefault(),n&&il(v,{select:!0})):g.shiftKey&&y===v&&(g.preventDefault(),n&&il(w,{select:!0})):y===x&&g.preventDefault()}},[n,r,p.paused]);return d.jsx(La.div,{tabIndex:-1,...i,ref:h,onKeyDown:m})});oL.displayName=eoe;function toe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(il(r,{select:t}),document.activeElement!==n)return}function noe(e){const t=sL(e),n=GP(t,e),r=GP(t.reverse(),e);return[n,r]}function sL(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function GP(e,t){for(const n of e)if(!roe(n,{upTo:t}))return n}function roe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ooe(e){return e instanceof HTMLInputElement&&"select"in e}function il(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ooe(e)&&t&&e.select()}}var YP=soe();function soe(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ZP(e,t),e.unshift(t)},remove(t){var n;e=ZP(e,t),(n=e[0])==null||n.resume()}}}function ZP(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ioe(e){return e.filter(t=>t.tagName!=="A")}var aoe="Portal",iL=S.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=S.useState(!1);Mm(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?Pn.createPortal(d.jsx(La.div,{...r,ref:t}),i):null});iL.displayName=aoe;function loe(e,t){return S.useReducer((n,r)=>t[n][r]??n,e)}var Bv=e=>{const{present:t,children:n}=e,r=coe(t),o=typeof n=="function"?n({present:r.isPresent}):S.Children.only(n),s=Wu(r.ref,uoe(o));return typeof n=="function"||r.isPresent?S.cloneElement(o,{ref:s}):null};Bv.displayName="Presence";function coe(e){const[t,n]=S.useState(),r=S.useRef(null),o=S.useRef(e),s=S.useRef("none"),i=e?"mounted":"unmounted",[a,l]=loe(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const c=Ub(r.current);s.current=a==="mounted"?c:"none"},[a]),Mm(()=>{const c=r.current,u=o.current;if(u!==e){const h=s.current,p=Ub(c);e?l("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Mm(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,f=p=>{const g=Ub(r.current).includes(p.animationName);if(p.target===t&&g&&(l("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},h=p=>{p.target===t&&(s.current=Ub(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:S.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function Ub(e){return(e==null?void 0:e.animationName)||"none"}function uoe(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var fS=0;function doe(){S.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??KP()),document.body.insertAdjacentElement("beforeend",e[1]??KP()),fS++,()=>{fS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),fS--}},[])}function KP(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var bi=function(){return bi=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},bi.apply(this,arguments)};function aL(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function foe(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var h0="right-scroll-bar-position",p0="width-before-scroll-bar",hoe="with-scroll-bars-hidden",poe="--removed-body-scroll-bar-size";function hS(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function moe(e,t){var n=E.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var goe=typeof window<"u"?S.useLayoutEffect:S.useEffect,XP=new WeakMap;function boe(e,t){var n=moe(null,function(r){return e.forEach(function(o){return hS(o,r)})});return goe(function(){var r=XP.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||hS(a,null)}),s.forEach(function(a){o.has(a)||hS(a,i)})}XP.set(n,e)},[e]),n}function yoe(e){return e}function xoe(e,t){t===void 0&&(t=yoe);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var l=function(){var u=i;i=[],u.forEach(s)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){i.push(u),c()},filter:function(u){return i=i.filter(u),n}}}};return o}function voe(e){e===void 0&&(e={});var t=xoe(null);return t.options=bi({async:!0,ssr:!1},e),t}var lL=function(e){var t=e.sideCar,n=aL(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return S.createElement(r,bi({},n))};lL.isSideCarExport=!0;function woe(e,t){return e.useMedium(t),lL}var cL=voe(),pS=function(){},Vv=S.forwardRef(function(e,t){var n=S.useRef(null),r=S.useState({onScrollCapture:pS,onWheelCapture:pS,onTouchMoveCapture:pS}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,f=e.shards,h=e.sideCar,p=e.noIsolation,m=e.inert,g=e.allowPinchZoom,b=e.as,y=b===void 0?"div":b,x=e.gapMode,v=aL(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=h,C=boe([n,t]),k=bi(bi({},v),o);return S.createElement(S.Fragment,null,u&&S.createElement(w,{sideCar:cL,removeScrollBar:c,shards:f,noIsolation:p,inert:m,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:x}),i?S.cloneElement(S.Children.only(a),bi(bi({},k),{ref:C})):S.createElement(y,bi({},k,{className:l,ref:C}),a))});Vv.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Vv.classNames={fullWidth:p0,zeroRight:h0};var Soe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Coe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Soe();return t&&e.setAttribute("nonce",t),e}function Eoe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Noe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var koe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Coe())&&(Eoe(t,n),Noe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},_oe=function(){var e=koe();return function(t,n){S.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},uL=function(){var e=_oe(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},joe={left:0,top:0,right:0,gap:0},mS=function(e){return parseInt(e||"",10)||0},Moe=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[mS(n),mS(r),mS(o)]},Roe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return joe;var t=Moe(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Doe=uL(),nf="data-scroll-locked",Poe=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
593
593
|
.`.concat(hoe,` {
|
|
594
594
|
overflow: hidden `).concat(r,`;
|
|
@@ -9627,33 +9627,26 @@ function Tte(e) {
|
|
|
9627
9627
|
}
|
|
9628
9628
|
function Ate({
|
|
9629
9629
|
dashboard: e,
|
|
9630
|
-
onView: t
|
|
9631
|
-
|
|
9632
|
-
// Random view count for demo
|
|
9630
|
+
onView: t
|
|
9631
|
+
// _viewCount = Math.floor(Math.random() * 2000) + 100, // Random view count for demo
|
|
9633
9632
|
}) {
|
|
9634
|
-
const { Icon:
|
|
9633
|
+
const { Icon: n, color: r } = Pte(e.title);
|
|
9635
9634
|
return /* @__PURE__ */ _(
|
|
9636
9635
|
Ps,
|
|
9637
9636
|
{
|
|
9638
9637
|
className: "group h-full cursor-pointer transition-all hover:shadow-lg",
|
|
9639
9638
|
onClick: () => t(e.id),
|
|
9640
9639
|
children: [
|
|
9641
|
-
/* @__PURE__ */ p(Ts, { className: "p-4 pb-3", children: /* @__PURE__ */
|
|
9642
|
-
|
|
9643
|
-
|
|
9644
|
-
|
|
9645
|
-
|
|
9646
|
-
|
|
9647
|
-
|
|
9648
|
-
|
|
9649
|
-
|
|
9650
|
-
|
|
9651
|
-
),
|
|
9652
|
-
/* @__PURE__ */ _("span", { className: "text-xs text-muted-foreground", children: [
|
|
9653
|
-
n.toLocaleString(),
|
|
9654
|
-
" views"
|
|
9655
|
-
] })
|
|
9656
|
-
] }) }),
|
|
9640
|
+
/* @__PURE__ */ p(Ts, { className: "p-4 pb-3", children: /* @__PURE__ */ p("div", { className: "flex items-start justify-between", children: /* @__PURE__ */ p(
|
|
9641
|
+
"div",
|
|
9642
|
+
{
|
|
9643
|
+
className: K(
|
|
9644
|
+
"flex size-9 items-center justify-center rounded-lg text-white",
|
|
9645
|
+
r
|
|
9646
|
+
),
|
|
9647
|
+
children: /* @__PURE__ */ p(n, { className: "h-5 w-5" })
|
|
9648
|
+
}
|
|
9649
|
+
) }) }),
|
|
9657
9650
|
/* @__PURE__ */ _(Fl, { className: "space-y-3 p-4 pt-0", children: [
|
|
9658
9651
|
/* @__PURE__ */ _("div", { children: [
|
|
9659
9652
|
/* @__PURE__ */ p("h3", { className: "mb-1 font-semibold text-foreground", children: e.title }),
|
package/dist/dashboard/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-BN9MFMRc.js"),r=require("../types/index.cjs");exports.Dashboard=e.Dashboard;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;
|
package/dist/dashboard/index.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-BN9MFMRc.js"),h=require("./types/index.cjs"),n=require("./chunks/dashboard-plus-Cj66-ScR.js"),t=require("react/jsx-runtime"),C=require("react");require("react-dom");function T(a){const{displayPreferences:i,...d}=a,u={...d,id:a.dashboardId};return t.jsx(e.ErrorBoundary,{FallbackComponent:e.Fallback,children:t.jsx(e.SemaphorContextProvider,{dashboardProps:u,children:t.jsx(e.UXProvider,{children:t.jsx(e.DisplayPreferencesProvider,{displayPreferences:i,children:t.jsx(e.Container,{type:"visual",...u,children:t.jsx(S,{cardId:a.cardId})})})})})})}function S({cardId:a}){const i=e.useDashboardStore(o=>{var s;return(s=o.dashboard)==null?void 0:s.sheets}),{card:d,frame:u}=C.useMemo(()=>{const o=i==null?void 0:i.flatMap(r=>r.frames),s=o==null?void 0:o.flatMap(r=>r==null?void 0:r.cards),c=s==null?void 0:s.find(r=>(r==null?void 0:r.id)===a),M=o==null?void 0:o.find(r=>{var l;return(l=r==null?void 0:r.cards)==null?void 0:l.find(Y=>(Y==null?void 0:Y.id)===a)});return{card:c,frame:M}},[i,a]);return!d||!u?t.jsx(e.FallbackVisual,{error:new Error("Card not found"),resetErrorBoundary:()=>{},customerFacingMessage:`Card not found with ID: ${a}`}):t.jsx("main",{className:"flex h-full grow flex-col",children:t.jsx(e.ErrorBoundary,{FallbackComponent:({error:o,resetErrorBoundary:s})=>t.jsx(e.FallbackVisual,{error:o,resetErrorBoundary:s,customerFacingMessage:"Error creating visual. Please try again."}),children:t.jsx(e.DashboardCard,{card:d,frame:u})})})}const b=["MM-DD-YYYY","YYYY-MM-DD","MM/DD/YYYY","DD/MM/YYYY","MMMM DD, YYYY","MMM DD, YYYY","DD MMM YYYY","Week of MMM DD, YYYY","Week of MMMM DD, YYYY","YYYY-WW","MMM YYYY","MMMM YYYY","YYYY-MM","MM/YYYY","YYYY MMM","Q1 YYYY","YYYY Q1","1st Quarter YYYY","YYYY-Q1","Quarter 1, YYYY","YYYY","YY","custom"];var D=(a=>(a.SUBTOTAL="__SUBTOTAL__",a.TOTAL="__TOTAL__",a.ALL="__ALL__",a))(D||{});exports.Dashboard=e.Dashboard;exports.DashboardWC=e.DashboardWC;exports.ResourceType=e.ResourceType;exports.SemaphorContextProvider=e.SemaphorContextProvider;exports.SemaphorDataProvider=e.SemaphorQueryClient;exports.SemaphorQueryClient=e.SemaphorQueryClient;exports.createSqlGenConfig=e.createSqlGenConfig;exports.downloadPdf=e.downloadPdf;exports.fmt=e.fmt;exports.getColumnDataType=e.getColumnDataType;exports.getFilterValueType=e.getFilterValueType;exports.getFormattedTableNameForQuery=e.getFormattedTableNameForQuery;exports.getQualifiedTableName=e.getQualifiedTableName;exports.getSql=e.getSql;exports.invalidateToken=e.invalidateToken;exports.isBooleanDataType=e.isBooleanDataType;exports.isColumnInSqlGen=e.isColumnInSqlGen;exports.isDateDataType=e.isDateDataType;exports.isNumberDataType=e.isNumberDataType;exports.isTextDataType=e.isTextDataType;exports.resolveDataType=e.resolveDataType;exports.resolveDatamodelName=e.resolveDatamodelName;exports.useCard=e.useCard;exports.useCurrentActiveCard=e.useCurrentActiveCard;exports.useCurrentCardConfig=e.useCurrentCardConfig;exports.useCurrentSheetActiveCards=e.useCurrentSheetActiveCards;exports.useDashboardActions=e.useDashboardActions;exports.useDashboardStore=e.useDashboardStore;exports.useDataColumns=e.useDataColumns;exports.useDateFilterHook=e.useDateFilterHook;exports.useEditorActions=e.useEditorActions;exports.useEditorAside=e.useEditorAside;exports.useEditorStore=e.useEditorStore;exports.useTextFilterHook=e.useTextFilterHook;exports.EMPTY_SELECTION=h.EMPTY_SELECTION;exports.ResourceManagementPanel=n.ResourceManagementPanel;exports.ScheduleDashboard=n.ScheduleDashboard;exports.SelectComponent=n.SelectComponent;exports.ShareDialog=n.ShareDialog;exports.Surfboard=n.DashboardPlus;exports.cleanCard=n.cleanCard;exports.getDashbaordStateWithoutData=n.getDashbaordStateWithoutData;exports.DATE_FORMAT_VALUES=b;exports.PivotMarkerEnum=D;exports.Visual=T;
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { E as l, F as c, S as h, U as f, a as p, C as m, u as T, b as u, c as C } from "./chunks/index-
|
|
2
|
-
import { D as L, h as k, R as Q, f as w, f as B, r as N, j as O, l as W, t as R, s as U, x as V, y as q, q as I, i as G, p as H, v as j, o as z, n as J, m as K, z as X, w as $, g as Z, B as aa, H as ea, G as sa, I as ra, k as oa, d as ta, K as Ya, A as na, J as ia, e as da } from "./chunks/index-
|
|
1
|
+
import { E as l, F as c, S as h, U as f, a as p, C as m, u as T, b as u, c as C } from "./chunks/index-Ccd0W9ao.js";
|
|
2
|
+
import { D as L, h as k, R as Q, f as w, f as B, r as N, j as O, l as W, t as R, s as U, x as V, y as q, q as I, i as G, p as H, v as j, o as z, n as J, m as K, z as X, w as $, g as Z, B as aa, H as ea, G as sa, I as ra, k as oa, d as ta, K as Ya, A as na, J as ia, e as da } from "./chunks/index-Ccd0W9ao.js";
|
|
3
3
|
import { EMPTY_SELECTION as la } from "./types/index.js";
|
|
4
|
-
import { R as Da, a as ca, b as ha, S as fa, D as pa, c as ma, g as Ta } from "./chunks/dashboard-plus-
|
|
4
|
+
import { R as Da, a as ca, b as ha, S as fa, D as pa, c as ma, g as Ta } from "./chunks/dashboard-plus-C9Zc94LX.js";
|
|
5
5
|
import { jsx as s } from "react/jsx-runtime";
|
|
6
6
|
import { useMemo as b } from "react";
|
|
7
7
|
import "react-dom";
|