UNPKG

react-bunny-banners

Version:

Reusable React UI components for Bajaj Finance Fixed Deposit features

32 lines (29 loc) 39.4 kB
(function(g,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("react"),require("react-dom"),require("@radix-ui/react-slot"),require("class-variance-authority"),require("clsx"),require("tailwind-merge")):typeof define=="function"&&define.amd?define(["exports","react","react-dom","@radix-ui/react-slot","class-variance-authority","clsx","tailwind-merge"],w):(g=typeof globalThis<"u"?globalThis:g||self,w(g.BannerBunnyComponents={},g.React,g.ReactDOM,g.reactSlot,g.classVarianceAuthority,g.clsx,g.tailwindMerge))})(this,function(g,w,rr,Xe,Ke,Ge,Qe){"use strict";function Ze(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const n in r)if(n!=="default"){const l=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,l.get?l:{enumerable:!0,get:()=>r[n]})}}return t.default=r,Object.freeze(t)}const j=Ze(w);var re={exports:{}},W={};/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var me;function et(){if(me)return W;me=1;var r=w,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function f(m,v,D){var E,S={},R=null,I=null;D!==void 0&&(R=""+D),v.key!==void 0&&(R=""+v.key),v.ref!==void 0&&(I=v.ref);for(E in v)l.call(v,E)&&!u.hasOwnProperty(E)&&(S[E]=v[E]);if(m&&m.defaultProps)for(E in v=m.defaultProps,v)S[E]===void 0&&(S[E]=v[E]);return{$$typeof:t,type:m,key:R,ref:I,props:S,_owner:c.current}}return W.Fragment=n,W.jsx=f,W.jsxs=f,W}var V={};/** * @license React * react-jsx-runtime.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var ge;function tt(){return ge||(ge=1,process.env.NODE_ENV!=="production"&&function(){var r=w,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),m=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),I=Symbol.for("react.offscreen"),O=Symbol.iterator,$="@@iterator";function H(e){if(e===null||typeof e!="object")return null;var a=O&&e[O]||e[$];return typeof a=="function"?a:null}var k=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(e){{for(var a=arguments.length,o=new Array(a>1?a-1:0),s=1;s<a;s++)o[s-1]=arguments[s];Y("error",e,o)}}function Y(e,a,o){{var s=k.ReactDebugCurrentFrame,h=s.getStackAddendum();h!==""&&(a+="%s",o=o.concat([h]));var p=o.map(function(d){return String(d)});p.unshift("Warning: "+a),Function.prototype.apply.call(console[e],console,p)}}var Et=!1,Rt=!1,Tt=!1,_t=!1,St=!1,_e;_e=Symbol.for("react.module.reference");function Ct(e){return!!(typeof e=="string"||typeof e=="function"||e===l||e===u||St||e===c||e===D||e===E||_t||e===I||Et||Rt||Tt||typeof e=="object"&&e!==null&&(e.$$typeof===R||e.$$typeof===S||e.$$typeof===f||e.$$typeof===m||e.$$typeof===v||e.$$typeof===_e||e.getModuleId!==void 0))}function jt(e,a,o){var s=e.displayName;if(s)return s;var h=a.displayName||a.name||"";return h!==""?o+"("+h+")":o}function Se(e){return e.displayName||"Context"}function M(e){if(e==null)return null;if(typeof e.tag=="number"&&b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case l:return"Fragment";case n:return"Portal";case u:return"Profiler";case c:return"StrictMode";case D:return"Suspense";case E:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case m:var a=e;return Se(a)+".Consumer";case f:var o=e;return Se(o._context)+".Provider";case v:return jt(e,e.render,"ForwardRef");case S:var s=e.displayName||null;return s!==null?s:M(e.type)||"Memo";case R:{var h=e,p=h._payload,d=h._init;try{return M(d(p))}catch{return null}}}return null}var F=Object.assign,q=0,Ce,je,Oe,ke,Pe,Ae,De;function $e(){}$e.__reactDisabledLog=!0;function Ot(){{if(q===0){Ce=console.log,je=console.info,Oe=console.warn,ke=console.error,Pe=console.group,Ae=console.groupCollapsed,De=console.groupEnd;var e={configurable:!0,enumerable:!0,value:$e,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}q++}}function kt(){{if(q--,q===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:F({},e,{value:Ce}),info:F({},e,{value:je}),warn:F({},e,{value:Oe}),error:F({},e,{value:ke}),group:F({},e,{value:Pe}),groupCollapsed:F({},e,{value:Ae}),groupEnd:F({},e,{value:De})})}q<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var se=k.ReactCurrentDispatcher,ie;function Q(e,a,o){{if(ie===void 0)try{throw Error()}catch(h){var s=h.stack.trim().match(/\n( *(at )?)/);ie=s&&s[1]||""}return` `+ie+e}}var le=!1,Z;{var Pt=typeof WeakMap=="function"?WeakMap:Map;Z=new Pt}function Me(e,a){if(!e||le)return"";{var o=Z.get(e);if(o!==void 0)return o}var s;le=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var p;p=se.current,se.current=null,Ot();try{if(a){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(C){s=C}Reflect.construct(e,[],d)}else{try{d.call()}catch(C){s=C}e.call(d.prototype)}}else{try{throw Error()}catch(C){s=C}e()}}catch(C){if(C&&s&&typeof C.stack=="string"){for(var i=C.stack.split(` `),_=s.stack.split(` `),y=i.length-1,x=_.length-1;y>=1&&x>=0&&i[y]!==_[x];)x--;for(;y>=1&&x>=0;y--,x--)if(i[y]!==_[x]){if(y!==1||x!==1)do if(y--,x--,x<0||i[y]!==_[x]){var P=` `+i[y].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),typeof e=="function"&&Z.set(e,P),P}while(y>=1&&x>=0);break}}}finally{le=!1,se.current=p,kt(),Error.prepareStackTrace=h}var L=e?e.displayName||e.name:"",z=L?Q(L):"";return typeof e=="function"&&Z.set(e,z),z}function At(e,a,o){return Me(e,!1)}function Dt(e){var a=e.prototype;return!!(a&&a.isReactComponent)}function ee(e,a,o){if(e==null)return"";if(typeof e=="function")return Me(e,Dt(e));if(typeof e=="string")return Q(e);switch(e){case D:return Q("Suspense");case E:return Q("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case v:return At(e.render);case S:return ee(e.type,a,o);case R:{var s=e,h=s._payload,p=s._init;try{return ee(p(h),a,o)}catch{}}}return""}var J=Object.prototype.hasOwnProperty,Ne={},Ie=k.ReactDebugCurrentFrame;function te(e){if(e){var a=e._owner,o=ee(e.type,e._source,a?a.type:null);Ie.setExtraStackFrame(o)}else Ie.setExtraStackFrame(null)}function $t(e,a,o,s,h){{var p=Function.call.bind(J);for(var d in e)if(p(e,d)){var i=void 0;try{if(typeof e[d]!="function"){var _=Error((s||"React class")+": "+o+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw _.name="Invariant Violation",_}i=e[d](a,d,s,o,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(y){i=y}i&&!(i instanceof Error)&&(te(h),b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",s||"React class",o,d,typeof i),te(null)),i instanceof Error&&!(i.message in Ne)&&(Ne[i.message]=!0,te(h),b("Failed %s type: %s",o,i.message),te(null))}}}var Mt=Array.isArray;function de(e){return Mt(e)}function Nt(e){{var a=typeof Symbol=="function"&&Symbol.toStringTag,o=a&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o}}function It(e){try{return Ye(e),!1}catch{return!0}}function Ye(e){return""+e}function Fe(e){if(It(e))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Nt(e)),Ye(e)}var X=k.ReactCurrentOwner,Yt={key:!0,ref:!0,__self:!0,__source:!0},ze,Be,ce;ce={};function Ft(e){if(J.call(e,"ref")){var a=Object.getOwnPropertyDescriptor(e,"ref").get;if(a&&a.isReactWarning)return!1}return e.ref!==void 0}function zt(e){if(J.call(e,"key")){var a=Object.getOwnPropertyDescriptor(e,"key").get;if(a&&a.isReactWarning)return!1}return e.key!==void 0}function Bt(e,a){if(typeof e.ref=="string"&&X.current&&a&&X.current.stateNode!==a){var o=M(X.current.type);ce[o]||(b('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',M(X.current.type),e.ref),ce[o]=!0)}}function Lt(e,a){{var o=function(){ze||(ze=!0,b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",a))};o.isReactWarning=!0,Object.defineProperty(e,"key",{get:o,configurable:!0})}}function Wt(e,a){{var o=function(){Be||(Be=!0,b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",a))};o.isReactWarning=!0,Object.defineProperty(e,"ref",{get:o,configurable:!0})}}var Vt=function(e,a,o,s,h,p,d){var i={$$typeof:t,type:e,key:a,ref:o,props:d,_owner:p};return i._store={},Object.defineProperty(i._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(i,"_self",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.defineProperty(i,"_source",{configurable:!1,enumerable:!1,writable:!1,value:h}),Object.freeze&&(Object.freeze(i.props),Object.freeze(i)),i};function Ut(e,a,o,s,h){{var p,d={},i=null,_=null;o!==void 0&&(Fe(o),i=""+o),zt(a)&&(Fe(a.key),i=""+a.key),Ft(a)&&(_=a.ref,Bt(a,h));for(p in a)J.call(a,p)&&!Yt.hasOwnProperty(p)&&(d[p]=a[p]);if(e&&e.defaultProps){var y=e.defaultProps;for(p in y)d[p]===void 0&&(d[p]=y[p])}if(i||_){var x=typeof e=="function"?e.displayName||e.name||"Unknown":e;i&&Lt(d,x),_&&Wt(d,x)}return Vt(e,i,_,h,s,X.current,d)}}var ue=k.ReactCurrentOwner,Le=k.ReactDebugCurrentFrame;function B(e){if(e){var a=e._owner,o=ee(e.type,e._source,a?a.type:null);Le.setExtraStackFrame(o)}else Le.setExtraStackFrame(null)}var fe;fe=!1;function he(e){return typeof e=="object"&&e!==null&&e.$$typeof===t}function We(){{if(ue.current){var e=M(ue.current.type);if(e)return` Check the render method of \``+e+"`."}return""}}function Ht(e){return""}var Ve={};function qt(e){{var a=We();if(!a){var o=typeof e=="string"?e:e.displayName||e.name;o&&(a=` Check the top-level render call using <`+o+">.")}return a}}function Ue(e,a){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var o=qt(a);if(Ve[o])return;Ve[o]=!0;var s="";e&&e._owner&&e._owner!==ue.current&&(s=" It was passed a child from "+M(e._owner.type)+"."),B(e),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',o,s),B(null)}}function He(e,a){{if(typeof e!="object")return;if(de(e))for(var o=0;o<e.length;o++){var s=e[o];he(s)&&Ue(s,a)}else if(he(e))e._store&&(e._store.validated=!0);else if(e){var h=H(e);if(typeof h=="function"&&h!==e.entries)for(var p=h.call(e),d;!(d=p.next()).done;)he(d.value)&&Ue(d.value,a)}}}function Jt(e){{var a=e.type;if(a==null||typeof a=="string")return;var o;if(typeof a=="function")o=a.propTypes;else if(typeof a=="object"&&(a.$$typeof===v||a.$$typeof===S))o=a.propTypes;else return;if(o){var s=M(a);$t(o,e.props,"prop",s,e)}else if(a.PropTypes!==void 0&&!fe){fe=!0;var h=M(a);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",h||"Unknown")}typeof a.getDefaultProps=="function"&&!a.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Xt(e){{for(var a=Object.keys(e.props),o=0;o<a.length;o++){var s=a[o];if(s!=="children"&&s!=="key"){B(e),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",s),B(null);break}}e.ref!==null&&(B(e),b("Invalid attribute `ref` supplied to `React.Fragment`."),B(null))}}var qe={};function Je(e,a,o,s,h,p){{var d=Ct(e);if(!d){var i="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(i+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var _=Ht();_?i+=_:i+=We();var y;e===null?y="null":de(e)?y="array":e!==void 0&&e.$$typeof===t?(y="<"+(M(e.type)||"Unknown")+" />",i=" Did you accidentally export a JSX literal instead of a component?"):y=typeof e,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",y,i)}var x=Ut(e,a,o,h,p);if(x==null)return x;if(d){var P=a.children;if(P!==void 0)if(s)if(de(P)){for(var L=0;L<P.length;L++)He(P[L],e);Object.freeze&&Object.freeze(P)}else b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else He(P,e)}if(J.call(a,"key")){var z=M(e),C=Object.keys(a).filter(function(tr){return tr!=="key"}),pe=C.length>0?"{key: someKey, "+C.join(": ..., ")+": ...}":"{key: someKey}";if(!qe[z+pe]){var er=C.length>0?"{"+C.join(": ..., ")+": ...}":"{}";b(`A props object containing a "key" prop is being spread into JSX: let props = %s; <%s {...props} /> React keys must be passed directly to JSX without using spread: let props = %s; <%s key={someKey} {...props} />`,pe,z,er,z),qe[z+pe]=!0}}return e===l?Xt(x):Jt(x),x}}function Kt(e,a,o){return Je(e,a,o,!0)}function Gt(e,a,o){return Je(e,a,o,!1)}var Qt=Gt,Zt=Kt;V.Fragment=l,V.jsx=Qt,V.jsxs=Zt}()),V}process.env.NODE_ENV==="production"?re.exports=et():re.exports=tt();var T=re.exports;const rt=()=>T.jsx("div",{className:"flex items-center justify-center",children:T.jsxs("div",{className:"relative",children:[T.jsx("div",{className:"w-16 h-16 bg-gradient-to-br from-primary to-secondary rounded-full flex items-center justify-center text-white font-bold text-3xl shadow-lg",children:"🐰"}),T.jsx("div",{className:"absolute -bottom-1 -right-1 w-6 h-6 bg-gradient-to-br from-orange-400 to-orange-500 rounded-full flex items-center justify-center text-xs shadow-md",children:"🥕"})]})}),at=()=>T.jsx("div",{className:"flex items-center justify-center",children:T.jsx("div",{className:"animate-spin text-6xl",children:"🥕"})}),nt=({onToggle:r,isUIVisible:t,imageSrc:n="🐰🥕",alt:l="Toggle UI"})=>{const[c,u]=w.useState(!1),[f,m]=w.useState({x:50,y:50}),[v,D]=w.useState({x:0,y:0}),E=w.useRef(null),S=$=>{u(!0),D({x:$.clientX-f.x,y:$.clientY-f.y})},R=$=>{if(c){const H=$.clientX-v.x,k=$.clientY-v.y,b=window.innerWidth-80,Y=window.innerHeight-80;m({x:Math.max(0,Math.min(H,b)),y:Math.max(0,Math.min(k,Y))})}},I=()=>{u(!1)},O=()=>{c||r()};return w.useEffect(()=>{if(c)return document.addEventListener("mousemove",R),document.addEventListener("mouseup",I),()=>{document.removeEventListener("mousemove",R),document.removeEventListener("mouseup",I)}},[c,v]),T.jsx("button",{ref:E,className:`fixed z-50 w-28 h-28 flex items-center justify-center cursor-move transition-all duration-200 ${c?"scale-110":"hover:scale-105"}`,style:{left:`${f.x}px`,top:`${f.y}px`,userSelect:"none"},onMouseDown:S,onClick:O,title:t?"Hide BannerBunny":"Show BannerBunny",children:n.startsWith("http")||n.startsWith("/")?T.jsx("img",{src:n,alt:l,className:"w-24 h-24 object-contain pointer-events-none"}):T.jsx("div",{className:"text-6xl pointer-events-none",children:n})})},ot=1,st=1e6;let ae=0;function it(){return ae=(ae+1)%Number.MAX_SAFE_INTEGER,ae.toString()}const ne=new Map,ve=r=>{if(ne.has(r))return;const t=setTimeout(()=>{ne.delete(r),U({type:"REMOVE_TOAST",toastId:r})},st);ne.set(r,t)},lt=(r,t)=>{switch(t.type){case"ADD_TOAST":return{...r,toasts:[t.toast,...r.toasts].slice(0,ot)};case"UPDATE_TOAST":return{...r,toasts:r.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?ve(n):r.toasts.forEach(l=>{ve(l.id)}),{...r,toasts:r.toasts.map(l=>l.id===n||n===void 0?{...l,open:!1}:l)}}case"REMOVE_TOAST":return t.toastId===void 0?{...r,toasts:[]}:{...r,toasts:r.toasts.filter(n=>n.id!==t.toastId)}}},K=[];let G={toasts:[]};function U(r){G=lt(G,r),K.forEach(t=>{t(G)})}function dt({...r}){const t=it(),n=c=>U({type:"UPDATE_TOAST",toast:{...c,id:t}}),l=()=>U({type:"DISMISS_TOAST",toastId:t});return U({type:"ADD_TOAST",toast:{...r,id:t,open:!0,onOpenChange:c=>{c||l()}}}),{id:t,dismiss:l,update:n}}function ct(){const[r,t]=j.useState(G);return j.useEffect(()=>(K.push(t),()=>{const n=K.indexOf(t);n>-1&&K.splice(n,1)}),[r]),{...r,toast:dt,dismiss:n=>U({type:"DISMISS_TOAST",toastId:n})}}var be=["light","dark"],ut="(prefers-color-scheme: dark)";j.createContext(void 0),j.memo(({forcedTheme:r,storageKey:t,attribute:n,enableSystem:l,enableColorScheme:c,defaultTheme:u,value:f,attrs:m,nonce:v})=>{let D=u==="system",E=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${m.map(O=>`'${O}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,S=c?be.includes(u)&&u?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${u}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",R=(O,$=!1,H=!0)=>{let k=f?f[O]:O,b=$?O+"|| ''":`'${k}'`,Y="";return c&&H&&!$&&be.includes(O)&&(Y+=`d.style.colorScheme = '${O}';`),n==="class"?$||k?Y+=`c.add(${b})`:Y+="null":k&&(Y+=`d[s](n,${b})`),Y},I=r?`!function(){${E}${R(r)}}()`:l?`!function(){try{${E}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${D})){var t='${ut}',m=window.matchMedia(t);if(m.media!==t||m.matches){${R("dark")}}else{${R("light")}}}else if(e){${f?`var x=${JSON.stringify(f)};`:""}${R(f?"x[e]":"e",!0)}}${D?"":"else{"+R(u,!1,!1)+"}"}${S}}catch(e){}}()`:`!function(){try{${E}var e=localStorage.getItem('${t}');if(e){${f?`var x=${JSON.stringify(f)};`:""}${R(f?"x[e]":"e",!0)}}else{${R(u,!1,!1)};}${S}}catch(t){}}();`;return j.createElement("script",{nonce:v,dangerouslySetInnerHTML:{__html:I}})}),Array(12).fill(0),w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},w.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"})),w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},w.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"})),w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},w.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"})),w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},w.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"}));var oe=1,ft=class{constructor(){this.subscribe=r=>(this.subscribers.push(r),()=>{let t=this.subscribers.indexOf(r);this.subscribers.splice(t,1)}),this.publish=r=>{this.subscribers.forEach(t=>t(r))},this.addToast=r=>{this.publish(r),this.toasts=[...this.toasts,r]},this.create=r=>{var t;let{message:n,...l}=r,c=typeof(r==null?void 0:r.id)=="number"||((t=r.id)==null?void 0:t.length)>0?r.id:oe++,u=this.toasts.find(m=>m.id===c),f=r.dismissible===void 0?!0:r.dismissible;return u?this.toasts=this.toasts.map(m=>m.id===c?(this.publish({...m,...r,id:c,title:n}),{...m,...r,id:c,dismissible:f,title:n}):m):this.addToast({title:n,...l,dismissible:f,id:c}),c},this.dismiss=r=>(r||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:r,dismiss:!0})),r),this.message=(r,t)=>this.create({...t,message:r}),this.error=(r,t)=>this.create({...t,message:r,type:"error"}),this.success=(r,t)=>this.create({...t,type:"success",message:r}),this.info=(r,t)=>this.create({...t,type:"info",message:r}),this.warning=(r,t)=>this.create({...t,type:"warning",message:r}),this.loading=(r,t)=>this.create({...t,type:"loading",message:r}),this.promise=(r,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:r,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let l=r instanceof Promise?r:r(),c=n!==void 0;return l.then(async u=>{if(pt(u)&&!u.ok){c=!1;let f=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,m=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description;this.create({id:n,type:"error",message:f,description:m})}else if(t.success!==void 0){c=!1;let f=typeof t.success=="function"?await t.success(u):t.success,m=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"success",message:f,description:m})}}).catch(async u=>{if(t.error!==void 0){c=!1;let f=typeof t.error=="function"?await t.error(u):t.error,m=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"error",message:f,description:m})}}).finally(()=>{var u;c&&(this.dismiss(n),n=void 0),(u=t.finally)==null||u.call(t)}),n},this.custom=(r,t)=>{let n=(t==null?void 0:t.id)||oe++;return this.create({jsx:r(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},A=new ft,ht=(r,t)=>{let n=(t==null?void 0:t.id)||oe++;return A.addToast({title:r,...t,id:n}),n},pt=r=>r&&typeof r=="object"&&"ok"in r&&typeof r.ok=="boolean"&&"status"in r&&typeof r.status=="number",mt=ht,gt=()=>A.toasts,vt=Object.assign(mt,{success:A.success,info:A.info,warning:A.warning,error:A.error,custom:A.custom,message:A.message,promise:A.promise,dismiss:A.dismiss,loading:A.loading},{getHistory:gt});function bt(r,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css",t==="top"&&n.firstChild?n.insertBefore(l,n.firstChild):n.appendChild(l),l.styleSheet?l.styleSheet.cssText=r:l.appendChild(document.createTextNode(r))}bt(`: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}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-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;background:var(--gray1);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}: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:0;right:0;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, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);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-border: hsl(0, 0%, 20%);--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-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%)} `);function N(...r){return Qe.twMerge(Ge.clsx(r))}const yt=Ke.cva("inline-flex items-center justify-center gap-2 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 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{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"}}),ye=j.forwardRef(({className:r,variant:t,size:n,asChild:l=!1,...c},u)=>{const f=l?Xe.Slot:"button";return T.jsx(f,{className:N(yt({variant:t,size:n,className:r})),ref:u,...c})});ye.displayName="Button";const we=j.forwardRef(({className:r,...t},n)=>T.jsx("div",{ref:n,className:N("rounded-lg border bg-card text-card-foreground shadow-sm",r),...t}));we.displayName="Card";const xe=j.forwardRef(({className:r,...t},n)=>T.jsx("div",{ref:n,className:N("flex flex-col space-y-1.5 p-6",r),...t}));xe.displayName="CardHeader";const Ee=j.forwardRef(({className:r,...t},n)=>T.jsx("h3",{ref:n,className:N("text-2xl font-semibold leading-none tracking-tight",r),...t}));Ee.displayName="CardTitle";const wt=j.forwardRef(({className:r,...t},n)=>T.jsx("p",{ref:n,className:N("text-sm text-muted-foreground",r),...t}));wt.displayName="CardDescription";const Re=j.forwardRef(({className:r,...t},n)=>T.jsx("div",{ref:n,className:N("p-6 pt-0",r),...t}));Re.displayName="CardContent";const xt=j.forwardRef(({className:r,...t},n)=>T.jsx("div",{ref:n,className:N("flex items-center p-6 pt-0",r),...t}));xt.displayName="CardFooter";const Te=j.forwardRef(({className:r,...t},n)=>T.jsx("textarea",{className:N("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",r),ref:n,...t}));Te.displayName="Textarea",g.BunnyLogo=rt,g.Button=ye,g.Card=we,g.CardContent=Re,g.CardHeader=xe,g.CardTitle=Ee,g.CarrotSpinner=at,g.DraggableCarrotButton=nt,g.Textarea=Te,g.cn=N,g.toast=vt,g.useToast=ct,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});