@tnf-dev/react 1.0.1-20 → 1.0.1-22

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.
@@ -1,5 +1,5 @@
1
1
  "use client"
2
- var zt=Object.create;var pr=Object.defineProperty;var Ft=Object.getOwnPropertyDescriptor;var Wt=Object.getOwnPropertyNames;var Ut=Object.getPrototypeOf,Jt=Object.prototype.hasOwnProperty;var Q=(t,r)=>()=>(r||t((r={exports:{}}).exports,r),r.exports);var qt=(t,r,n,e)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of Wt(r))!Jt.call(t,i)&&i!==n&&pr(t,i,{get:()=>r[i],enumerable:!(e=Ft(r,i))||e.enumerable});return t};var Ce=(t,r,n)=>(n=t!=null?zt(Ut(t)):{},qt(r||!t||!t.__esModule?pr(n,"default",{value:t,enumerable:!0}):n,t));var xr=Q(p=>{"use strict";var S=typeof Symbol=="function"&&Symbol.for,Ee=S?Symbol.for("react.element"):60103,Ne=S?Symbol.for("react.portal"):60106,re=S?Symbol.for("react.fragment"):60107,te=S?Symbol.for("react.strict_mode"):60108,ne=S?Symbol.for("react.profiler"):60114,ie=S?Symbol.for("react.provider"):60109,oe=S?Symbol.for("react.context"):60110,Ae=S?Symbol.for("react.async_mode"):60111,ae=S?Symbol.for("react.concurrent_mode"):60111,se=S?Symbol.for("react.forward_ref"):60112,ue=S?Symbol.for("react.suspense"):60113,Ht=S?Symbol.for("react.suspense_list"):60120,le=S?Symbol.for("react.memo"):60115,fe=S?Symbol.for("react.lazy"):60116,Kt=S?Symbol.for("react.block"):60121,Bt=S?Symbol.for("react.fundamental"):60117,Yt=S?Symbol.for("react.responder"):60118,Xt=S?Symbol.for("react.scope"):60119;function R(t){if(typeof t=="object"&&t!==null){var r=t.$$typeof;switch(r){case Ee:switch(t=t.type,t){case Ae:case ae:case re:case ne:case te:case ue:return t;default:switch(t=t&&t.$$typeof,t){case oe:case se:case fe:case le:case ie:return t;default:return r}}case Ne:return r}}}function br(t){return R(t)===ae}p.AsyncMode=Ae;p.ConcurrentMode=ae;p.ContextConsumer=oe;p.ContextProvider=ie;p.Element=Ee;p.ForwardRef=se;p.Fragment=re;p.Lazy=fe;p.Memo=le;p.Portal=Ne;p.Profiler=ne;p.StrictMode=te;p.Suspense=ue;p.isAsyncMode=function(t){return br(t)||R(t)===Ae};p.isConcurrentMode=br;p.isContextConsumer=function(t){return R(t)===oe};p.isContextProvider=function(t){return R(t)===ie};p.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===Ee};p.isForwardRef=function(t){return R(t)===se};p.isFragment=function(t){return R(t)===re};p.isLazy=function(t){return R(t)===fe};p.isMemo=function(t){return R(t)===le};p.isPortal=function(t){return R(t)===Ne};p.isProfiler=function(t){return R(t)===ne};p.isStrictMode=function(t){return R(t)===te};p.isSuspense=function(t){return R(t)===ue};p.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===re||t===ae||t===ne||t===te||t===ue||t===Ht||typeof t=="object"&&t!==null&&(t.$$typeof===fe||t.$$typeof===le||t.$$typeof===ie||t.$$typeof===oe||t.$$typeof===se||t.$$typeof===Bt||t.$$typeof===Yt||t.$$typeof===Xt||t.$$typeof===Kt)};p.typeOf=R});var wr=Q((Qo,Sr)=>{"use strict";Sr.exports=xr()});var Ie=Q((ea,Cr)=>{"use strict";var je=wr(),Zt={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Qt={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},en={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Or={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},_e={};_e[je.ForwardRef]=en;_e[je.Memo]=Or;function Rr(t){return je.isMemo(t)?Or:_e[t.$$typeof]||Zt}var rn=Object.defineProperty,tn=Object.getOwnPropertyNames,Pr=Object.getOwnPropertySymbols,nn=Object.getOwnPropertyDescriptor,on=Object.getPrototypeOf,kr=Object.prototype;function Tr(t,r,n){if(typeof r!="string"){if(kr){var e=on(r);e&&e!==kr&&Tr(t,e,n)}var i=tn(r);Pr&&(i=i.concat(Pr(r)));for(var o=Rr(t),a=Rr(r),s=0;s<i.length;++s){var l=i[s];if(!Qt[l]&&!(n&&n[l])&&!(a&&a[l])&&!(o&&o[l])){var f=nn(r,l);try{rn(t,l,f)}catch{}}}}return t}Cr.exports=Tr});var Er=Q(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.default=un;function un(t){return t.displayName||t.name||(typeof t=="string"&&t.length>0?t:"Unknown")}});import{TeknifyClient as Fo}from"@tnf-dev/js";import{createContext as Wo,useMemo as Uo}from"react";var vr={components:{NotificationHeader:{notifications:"Notifications"},Empty:{noNotifications:"No notifications"},Loader:{loading:"Loading..."},NotificationItem:{markAsRead:"Mark as read"}}};function gr(t){var r,n,e="";if(typeof t=="string"||typeof t=="number")e+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(r=0;r<i;r++)t[r]&&(n=gr(t[r]))&&(e&&(e+=" "),e+=n)}else for(n in t)t[n]&&(e&&(e+=" "),e+=n);return e}function Gt(){for(var t,r,n=0,e="",i=arguments.length;n<i;n++)(t=arguments[n])&&(r=gr(t))&&(e&&(e+=" "),e+=r);return e}var yr=Gt;function g(){return g=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var e in n)({}).hasOwnProperty.call(n,e)&&(t[e]=n[e])}return t},g.apply(null,arguments)}function ee(t,r){if(t==null)return{};var n={};for(var e in t)if({}.hasOwnProperty.call(t,e)){if(r.indexOf(e)!==-1)continue;n[e]=t[e]}return n}var Ro=Ce(Ie());import yo,{createContext as bo,useRef as xo,useContext as Ct,useMemo as Et,useEffect as It,useLayoutEffect as So,useDebugValue as Nt,forwardRef as Us,createElement as wo}from"react";import _,{createContext as ln}from"react";var an=!0;function sn(t,r){if(!an){if(t)return;var n="Warning: "+r;typeof console<"u"&&console.warn(n);try{throw Error(n)}catch{}}}var Me=sn;var Nr=Ce(Ie()),ia=Ce(Er());function ce(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function de(){return de=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])}return t},de.apply(this,arguments)}function fn(t,r){t.prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r}function C(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function cn(t){var r=function(n){fn(e,n);function e(){for(var o,a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return o=n.call.apply(n,[this].concat(s))||this,ce(C(C(o)),"cachedTheme",void 0),ce(C(C(o)),"lastOuterTheme",void 0),ce(C(C(o)),"lastTheme",void 0),ce(C(C(o)),"renderProvider",function(f){var c=o.props.children;return _.createElement(t.Provider,{value:o.getTheme(f)},c)}),o}var i=e.prototype;return i.getTheme=function(a){if(this.props.theme!==this.lastTheme||a!==this.lastOuterTheme||!this.cachedTheme)if(this.lastOuterTheme=a,this.lastTheme=this.props.theme,typeof this.lastTheme=="function"){var s=this.props.theme;this.cachedTheme=s(a)}else{var l=this.props.theme;this.cachedTheme=a?de({},a,l):l}return this.cachedTheme},i.render=function(){var a=this.props.children;return a?_.createElement(t.Consumer,null,this.renderProvider):null},e}(_.Component);return r}function dn(t){return function(n){var e=_.forwardRef(function(i,o){return _.createElement(t.Consumer,null,function(a){return _.createElement(n,de({theme:a,ref:o},i))})});return(0,Nr.default)(e,n),e}}function hn(t){var r=function(){var e=_.useContext(t);return e};return r}function Ar(t){return{context:t,withTheme:dn(t),useTheme:hn(t),ThemeProvider:cn(t)}}var De=ln(),Le=Ar(De),mn=Le.withTheme,pn=Le.ThemeProvider,vn=Le.useTheme;var jr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gn=(typeof window>"u"?"undefined":jr(window))==="object"&&(typeof document>"u"?"undefined":jr(document))==="object"&&document.nodeType===9,O=gn;function I(t){"@babel/helpers - typeof";return I=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},I(t)}function _r(t,r){if(I(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var e=n.call(t,r||"default");if(I(e)!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function Ir(t){var r=_r(t,"string");return I(r)=="symbol"?r:r+""}function Mr(t,r){for(var n=0;n<r.length;n++){var e=r[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,Ir(e.key),e)}}function he(t,r,n){return r&&Mr(t.prototype,r),n&&Mr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function me(t,r){return me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,e){return n.__proto__=e,n},me(t,r)}function $e(t,r){t.prototype=Object.create(r.prototype),t.prototype.constructor=t,me(t,r)}function ze(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var yn={}.constructor;function Ue(t){if(t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(Ue);if(t.constructor!==yn)return t;var r={};for(var n in t)r[n]=Ue(t[n]);return r}function D(t,r,n){t===void 0&&(t="unnamed");var e=n.jss,i=Ue(r),o=e.plugins.onCreateRule(t,i,n);return o||(t[0],null)}var Vr=function(r,n){for(var e="",i=0;i<r.length&&r[i]!=="!important";i++)e&&(e+=n),e+=r[i];return e},E=function(r){if(!Array.isArray(r))return r;var n="";if(Array.isArray(r[0]))for(var e=0;e<r.length&&r[e]!=="!important";e++)n&&(n+=", "),n+=Vr(r[e]," ");else n=Vr(r,", ");return r[r.length-1]==="!important"&&(n+=" !important"),n};function L(t){return t&&t.format===!1?{linebreak:"",space:""}:{linebreak:`
2
+ var zt=Object.create;var pr=Object.defineProperty;var Ft=Object.getOwnPropertyDescriptor;var Wt=Object.getOwnPropertyNames;var Ut=Object.getPrototypeOf,Jt=Object.prototype.hasOwnProperty;var Q=(t,r)=>()=>(r||t((r={exports:{}}).exports,r),r.exports);var qt=(t,r,n,e)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of Wt(r))!Jt.call(t,i)&&i!==n&&pr(t,i,{get:()=>r[i],enumerable:!(e=Ft(r,i))||e.enumerable});return t};var Ce=(t,r,n)=>(n=t!=null?zt(Ut(t)):{},qt(r||!t||!t.__esModule?pr(n,"default",{value:t,enumerable:!0}):n,t));var xr=Q(p=>{"use strict";var S=typeof Symbol=="function"&&Symbol.for,Ee=S?Symbol.for("react.element"):60103,Ne=S?Symbol.for("react.portal"):60106,re=S?Symbol.for("react.fragment"):60107,te=S?Symbol.for("react.strict_mode"):60108,ne=S?Symbol.for("react.profiler"):60114,ie=S?Symbol.for("react.provider"):60109,oe=S?Symbol.for("react.context"):60110,Ae=S?Symbol.for("react.async_mode"):60111,ae=S?Symbol.for("react.concurrent_mode"):60111,se=S?Symbol.for("react.forward_ref"):60112,ue=S?Symbol.for("react.suspense"):60113,Ht=S?Symbol.for("react.suspense_list"):60120,le=S?Symbol.for("react.memo"):60115,fe=S?Symbol.for("react.lazy"):60116,Kt=S?Symbol.for("react.block"):60121,Bt=S?Symbol.for("react.fundamental"):60117,Yt=S?Symbol.for("react.responder"):60118,Xt=S?Symbol.for("react.scope"):60119;function R(t){if(typeof t=="object"&&t!==null){var r=t.$$typeof;switch(r){case Ee:switch(t=t.type,t){case Ae:case ae:case re:case ne:case te:case ue:return t;default:switch(t=t&&t.$$typeof,t){case oe:case se:case fe:case le:case ie:return t;default:return r}}case Ne:return r}}}function br(t){return R(t)===ae}p.AsyncMode=Ae;p.ConcurrentMode=ae;p.ContextConsumer=oe;p.ContextProvider=ie;p.Element=Ee;p.ForwardRef=se;p.Fragment=re;p.Lazy=fe;p.Memo=le;p.Portal=Ne;p.Profiler=ne;p.StrictMode=te;p.Suspense=ue;p.isAsyncMode=function(t){return br(t)||R(t)===Ae};p.isConcurrentMode=br;p.isContextConsumer=function(t){return R(t)===oe};p.isContextProvider=function(t){return R(t)===ie};p.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===Ee};p.isForwardRef=function(t){return R(t)===se};p.isFragment=function(t){return R(t)===re};p.isLazy=function(t){return R(t)===fe};p.isMemo=function(t){return R(t)===le};p.isPortal=function(t){return R(t)===Ne};p.isProfiler=function(t){return R(t)===ne};p.isStrictMode=function(t){return R(t)===te};p.isSuspense=function(t){return R(t)===ue};p.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===re||t===ae||t===ne||t===te||t===ue||t===Ht||typeof t=="object"&&t!==null&&(t.$$typeof===fe||t.$$typeof===le||t.$$typeof===ie||t.$$typeof===oe||t.$$typeof===se||t.$$typeof===Bt||t.$$typeof===Yt||t.$$typeof===Xt||t.$$typeof===Kt)};p.typeOf=R});var wr=Q((Qo,Sr)=>{"use strict";Sr.exports=xr()});var Ie=Q((ea,Cr)=>{"use strict";var je=wr(),Zt={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Qt={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},en={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Or={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},_e={};_e[je.ForwardRef]=en;_e[je.Memo]=Or;function Rr(t){return je.isMemo(t)?Or:_e[t.$$typeof]||Zt}var rn=Object.defineProperty,tn=Object.getOwnPropertyNames,Pr=Object.getOwnPropertySymbols,nn=Object.getOwnPropertyDescriptor,on=Object.getPrototypeOf,kr=Object.prototype;function Tr(t,r,n){if(typeof r!="string"){if(kr){var e=on(r);e&&e!==kr&&Tr(t,e,n)}var i=tn(r);Pr&&(i=i.concat(Pr(r)));for(var o=Rr(t),a=Rr(r),s=0;s<i.length;++s){var l=i[s];if(!Qt[l]&&!(n&&n[l])&&!(a&&a[l])&&!(o&&o[l])){var f=nn(r,l);try{rn(t,l,f)}catch{}}}}return t}Cr.exports=Tr});var Er=Q(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.default=un;function un(t){return t.displayName||t.name||(typeof t=="string"&&t.length>0?t:"Unknown")}});import{TeknifyClient as Fo}from"@tnf-dev/js";import{createContext as Wo,useMemo as Uo}from"react";var vr={components:{NotificationHeader:{notifications:"Notifications",readAll:"Read all"},Empty:{noNotifications:"No notifications"},Loader:{loading:"Loading..."},NotificationItem:{markAsRead:"Mark as read"}}};function gr(t){var r,n,e="";if(typeof t=="string"||typeof t=="number")e+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(r=0;r<i;r++)t[r]&&(n=gr(t[r]))&&(e&&(e+=" "),e+=n)}else for(n in t)t[n]&&(e&&(e+=" "),e+=n);return e}function Gt(){for(var t,r,n=0,e="",i=arguments.length;n<i;n++)(t=arguments[n])&&(r=gr(t))&&(e&&(e+=" "),e+=r);return e}var yr=Gt;function g(){return g=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var e in n)({}).hasOwnProperty.call(n,e)&&(t[e]=n[e])}return t},g.apply(null,arguments)}function ee(t,r){if(t==null)return{};var n={};for(var e in t)if({}.hasOwnProperty.call(t,e)){if(r.indexOf(e)!==-1)continue;n[e]=t[e]}return n}var Ro=Ce(Ie());import yo,{createContext as bo,useRef as xo,useContext as Ct,useMemo as Et,useEffect as It,useLayoutEffect as So,useDebugValue as Nt,forwardRef as Us,createElement as wo}from"react";import _,{createContext as ln}from"react";var an=!0;function sn(t,r){if(!an){if(t)return;var n="Warning: "+r;typeof console<"u"&&console.warn(n);try{throw Error(n)}catch{}}}var Me=sn;var Nr=Ce(Ie()),ia=Ce(Er());function ce(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function de(){return de=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])}return t},de.apply(this,arguments)}function fn(t,r){t.prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r}function C(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function cn(t){var r=function(n){fn(e,n);function e(){for(var o,a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return o=n.call.apply(n,[this].concat(s))||this,ce(C(C(o)),"cachedTheme",void 0),ce(C(C(o)),"lastOuterTheme",void 0),ce(C(C(o)),"lastTheme",void 0),ce(C(C(o)),"renderProvider",function(f){var c=o.props.children;return _.createElement(t.Provider,{value:o.getTheme(f)},c)}),o}var i=e.prototype;return i.getTheme=function(a){if(this.props.theme!==this.lastTheme||a!==this.lastOuterTheme||!this.cachedTheme)if(this.lastOuterTheme=a,this.lastTheme=this.props.theme,typeof this.lastTheme=="function"){var s=this.props.theme;this.cachedTheme=s(a)}else{var l=this.props.theme;this.cachedTheme=a?de({},a,l):l}return this.cachedTheme},i.render=function(){var a=this.props.children;return a?_.createElement(t.Consumer,null,this.renderProvider):null},e}(_.Component);return r}function dn(t){return function(n){var e=_.forwardRef(function(i,o){return _.createElement(t.Consumer,null,function(a){return _.createElement(n,de({theme:a,ref:o},i))})});return(0,Nr.default)(e,n),e}}function hn(t){var r=function(){var e=_.useContext(t);return e};return r}function Ar(t){return{context:t,withTheme:dn(t),useTheme:hn(t),ThemeProvider:cn(t)}}var De=ln(),Le=Ar(De),mn=Le.withTheme,pn=Le.ThemeProvider,vn=Le.useTheme;var jr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gn=(typeof window>"u"?"undefined":jr(window))==="object"&&(typeof document>"u"?"undefined":jr(document))==="object"&&document.nodeType===9,O=gn;function I(t){"@babel/helpers - typeof";return I=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},I(t)}function _r(t,r){if(I(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var e=n.call(t,r||"default");if(I(e)!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function Ir(t){var r=_r(t,"string");return I(r)=="symbol"?r:r+""}function Mr(t,r){for(var n=0;n<r.length;n++){var e=r[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,Ir(e.key),e)}}function he(t,r,n){return r&&Mr(t.prototype,r),n&&Mr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function me(t,r){return me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,e){return n.__proto__=e,n},me(t,r)}function $e(t,r){t.prototype=Object.create(r.prototype),t.prototype.constructor=t,me(t,r)}function ze(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var yn={}.constructor;function Ue(t){if(t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(Ue);if(t.constructor!==yn)return t;var r={};for(var n in t)r[n]=Ue(t[n]);return r}function D(t,r,n){t===void 0&&(t="unnamed");var e=n.jss,i=Ue(r),o=e.plugins.onCreateRule(t,i,n);return o||(t[0],null)}var Vr=function(r,n){for(var e="",i=0;i<r.length&&r[i]!=="!important";i++)e&&(e+=n),e+=r[i];return e},E=function(r){if(!Array.isArray(r))return r;var n="";if(Array.isArray(r[0]))for(var e=0;e<r.length&&r[e]!=="!important";e++)n&&(n+=", "),n+=Vr(r[e]," ");else n=Vr(r,", ");return r[r.length-1]==="!important"&&(n+=" !important"),n};function L(t){return t&&t.format===!1?{linebreak:"",space:""}:{linebreak:`
3
3
  `,space:" "}}function W(t,r){for(var n="",e=0;e<r;e++)n+=" ";return n+t}function J(t,r,n){n===void 0&&(n={});var e="";if(!r)return e;var i=n,o=i.indent,a=o===void 0?0:o,s=r.fallbacks;n.format===!1&&(a=-1/0);var l=L(n),f=l.linebreak,c=l.space;if(t&&a++,s)if(Array.isArray(s))for(var d=0;d<s.length;d++){var b=s[d];for(var v in b){var y=b[v];y!=null&&(e&&(e+=f),e+=W(v+":"+c+E(y)+";",a))}}else for(var m in s){var w=s[m];w!=null&&(e&&(e+=f),e+=W(m+":"+c+E(w)+";",a))}for(var k in r){var x=r[k];x!=null&&k!=="fallbacks"&&(e&&(e+=f),e+=W(k+":"+c+E(x)+";",a))}return!e&&!n.allowEmpty||!t?e:(a--,e&&(e=""+f+e+f),W(""+t+c+"{"+e,a)+W("}",a))}var bn=/([[\].#*$><+~=|^:(),"'`\s])/g,Dr=typeof CSS<"u"&&CSS.escape,Ye=function(t){return Dr?Dr(t):t.replace(bn,"\\$1")},Jr=function(){function t(n,e,i){this.type="style",this.isProcessed=!1;var o=i.sheet,a=i.Renderer;this.key=n,this.options=i,this.style=e,o?this.renderer=o.renderer:a&&(this.renderer=new a)}var r=t.prototype;return r.prop=function(e,i,o){if(i===void 0)return this.style[e];var a=o?o.force:!1;if(!a&&this.style[e]===i)return this;var s=i;(!o||o.process!==!1)&&(s=this.options.jss.plugins.onChangeValue(i,e,this));var l=s==null||s===!1,f=e in this.style;if(l&&!f&&!a)return this;var c=l&&f;if(c?delete this.style[e]:this.style[e]=s,this.renderable&&this.renderer)return c?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,s),this;var d=this.options.sheet;return d&&d.attached,this},t}(),Je=function(t){$e(r,t);function r(e,i,o){var a;a=t.call(this,e,i,o)||this;var s=o.selector,l=o.scoped,f=o.sheet,c=o.generateId;return s?a.selectorText=s:l!==!1&&(a.id=c(ze(ze(a)),f),a.selectorText="."+Ye(a.id)),a}var n=r.prototype;return n.applyTo=function(i){var o=this.renderer;if(o){var a=this.toJSON();for(var s in a)o.setProperty(i,s,a[s])}return this},n.toJSON=function(){var i={};for(var o in this.style){var a=this.style[o];typeof a!="object"?i[o]=a:Array.isArray(a)&&(i[o]=E(a))}return i},n.toString=function(i){var o=this.options.sheet,a=o?o.options.link:!1,s=a?g({},i,{allowEmpty:!0}):i;return J(this.selectorText,this.style,s)},he(r,[{key:"selector",set:function(i){if(i!==this.selectorText){this.selectorText=i;var o=this.renderer,a=this.renderable;if(!(!a||!o)){var s=o.setSelector(a,i);s||o.replaceRule(a,this)}}},get:function(){return this.selectorText}}]),r}(Jr),xn={onCreateRule:function(r,n,e){return r[0]==="@"||e.parent&&e.parent.type==="keyframes"?null:new Je(r,n,e)}},Fe={indent:1,children:!0},Sn=/@([\w-]+)/,wn=function(){function t(n,e,i){this.type="conditional",this.isProcessed=!1,this.key=n;var o=n.match(Sn);this.at=o?o[1]:"unknown",this.query=i.name||"@"+this.at,this.options=i,this.rules=new q(g({},i,{parent:this}));for(var a in e)this.rules.add(a,e[a]);this.rules.process()}var r=t.prototype;return r.getRule=function(e){return this.rules.get(e)},r.indexOf=function(e){return this.rules.indexOf(e)},r.addRule=function(e,i,o){var a=this.rules.add(e,i,o);return a?(this.options.jss.plugins.onProcessRule(a),a):null},r.replaceRule=function(e,i,o){var a=this.rules.replace(e,i,o);return a&&this.options.jss.plugins.onProcessRule(a),a},r.toString=function(e){e===void 0&&(e=Fe);var i=L(e),o=i.linebreak;if(e.indent==null&&(e.indent=Fe.indent),e.children==null&&(e.children=Fe.children),e.children===!1)return this.query+" {}";var a=this.rules.toString(e);return a?this.query+" {"+o+a+o+"}":""},t}(),Rn=/@container|@media|@supports\s+/,Pn={onCreateRule:function(r,n,e){return Rn.test(r)?new wn(r,n,e):null}},We={indent:1,children:!0},kn=/@keyframes\s+([\w-]+)/,qe=function(){function t(n,e,i){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var o=n.match(kn);o&&o[1]?this.name=o[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=i;var a=i.scoped,s=i.sheet,l=i.generateId;this.id=a===!1?this.name:Ye(l(this,s)),this.rules=new q(g({},i,{parent:this}));for(var f in e)this.rules.add(f,e[f],g({},i,{parent:this}));this.rules.process()}var r=t.prototype;return r.toString=function(e){e===void 0&&(e=We);var i=L(e),o=i.linebreak;if(e.indent==null&&(e.indent=We.indent),e.children==null&&(e.children=We.children),e.children===!1)return this.at+" "+this.id+" {}";var a=this.rules.toString(e);return a&&(a=""+o+a+o),this.at+" "+this.id+" {"+a+"}"},t}(),On=/@keyframes\s+/,Tn=/\$([\w-]+)/g,Ge=function(r,n){return typeof r=="string"?r.replace(Tn,function(e,i){return i in n?n[i]:e}):r},Lr=function(r,n,e){var i=r[n],o=Ge(i,e);o!==i&&(r[n]=o)},Cn={onCreateRule:function(r,n,e){return typeof r=="string"&&On.test(r)?new qe(r,n,e):null},onProcessStyle:function(r,n,e){return n.type!=="style"||!e||("animation-name"in r&&Lr(r,"animation-name",e.keyframes),"animation"in r&&Lr(r,"animation",e.keyframes)),r},onChangeValue:function(r,n,e){var i=e.options.sheet;if(!i)return r;switch(n){case"animation":return Ge(r,i.keyframes);case"animation-name":return Ge(r,i.keyframes);default:return r}}},En=function(t){$e(r,t);function r(){return t.apply(this,arguments)||this}var n=r.prototype;return n.toString=function(i){var o=this.options.sheet,a=o?o.options.link:!1,s=a?g({},i,{allowEmpty:!0}):i;return J(this.key,this.style,s)},r}(Jr),Nn={onCreateRule:function(r,n,e){return e.parent&&e.parent.type==="keyframes"?new En(r,n,e):null}},An=function(){function t(n,e,i){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=n,this.style=e,this.options=i}var r=t.prototype;return r.toString=function(e){var i=L(e),o=i.linebreak;if(Array.isArray(this.style)){for(var a="",s=0;s<this.style.length;s++)a+=J(this.at,this.style[s]),this.style[s+1]&&(a+=o);return a}return J(this.at,this.style,e)},t}(),jn=/@font-face/,_n={onCreateRule:function(r,n,e){return jn.test(r)?new An(r,n,e):null}},In=function(){function t(n,e,i){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=n,this.style=e,this.options=i}var r=t.prototype;return r.toString=function(e){return J(this.key,this.style,e)},t}(),Mn={onCreateRule:function(r,n,e){return r==="@viewport"||r==="@-ms-viewport"?new In(r,n,e):null}},Vn=function(){function t(n,e,i){this.type="simple",this.isProcessed=!1,this.key=n,this.value=e,this.options=i}var r=t.prototype;return r.toString=function(e){if(Array.isArray(this.value)){for(var i="",o=0;o<this.value.length;o++)i+=this.key+" "+this.value[o]+";",this.value[o+1]&&(i+=`
4
4
  `);return i}return this.key+" "+this.value+";"},t}(),Dn={"@charset":!0,"@import":!0,"@namespace":!0},Ln={onCreateRule:function(r,n,e){return r in Dn?new Vn(r,n,e):null}},$r=[xn,Pn,Cn,Nn,_n,Mn,Ln],$n={process:!0},zr={force:!0,process:!0},q=function(){function t(n){this.map={},this.raw={},this.index=[],this.counter=0,this.options=n,this.classes=n.classes,this.keyframes=n.keyframes}var r=t.prototype;return r.add=function(e,i,o){var a=this.options,s=a.parent,l=a.sheet,f=a.jss,c=a.Renderer,d=a.generateId,b=a.scoped,v=g({classes:this.classes,parent:s,sheet:l,jss:f,Renderer:c,generateId:d,scoped:b,name:e,keyframes:this.keyframes,selector:void 0},o),y=e;e in this.raw&&(y=e+"-d"+this.counter++),this.raw[y]=i,y in this.classes&&(v.selector="."+Ye(this.classes[y]));var m=D(y,i,v);if(!m)return null;this.register(m);var w=v.index===void 0?this.index.length:v.index;return this.index.splice(w,0,m),m},r.replace=function(e,i,o){var a=this.get(e),s=this.index.indexOf(a);a&&this.remove(a);var l=o;return s!==-1&&(l=g({},o,{index:s})),this.add(e,i,l)},r.get=function(e){return this.map[e]},r.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.index.indexOf(e),1)},r.indexOf=function(e){return this.index.indexOf(e)},r.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},r.register=function(e){this.map[e.key]=e,e instanceof Je?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof qe&&this.keyframes&&(this.keyframes[e.name]=e.id)},r.unregister=function(e){delete this.map[e.key],e instanceof Je?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof qe&&delete this.keyframes[e.name]},r.update=function(){var e,i,o;if(typeof(arguments.length<=0?void 0:arguments[0])=="string"?(e=arguments.length<=0?void 0:arguments[0],i=arguments.length<=1?void 0:arguments[1],o=arguments.length<=2?void 0:arguments[2]):(i=arguments.length<=0?void 0:arguments[0],o=arguments.length<=1?void 0:arguments[1],e=null),e)this.updateOne(this.get(e),i,o);else for(var a=0;a<this.index.length;a++)this.updateOne(this.index[a],i,o)},r.updateOne=function(e,i,o){o===void 0&&(o=$n);var a=this.options,s=a.jss.plugins,l=a.sheet;if(e.rules instanceof t){e.rules.update(i,o);return}var f=e.style;if(s.onUpdate(i,e,l,o),o.process&&f&&f!==e.style){s.onProcessStyle(e.style,e,l);for(var c in e.style){var d=e.style[c],b=f[c];d!==b&&e.prop(c,d,zr)}for(var v in f){var y=e.style[v],m=f[v];y==null&&y!==m&&e.prop(v,null,zr)}}},r.toString=function(e){for(var i="",o=this.options.sheet,a=o?o.options.link:!1,s=L(e),l=s.linebreak,f=0;f<this.index.length;f++){var c=this.index[f],d=c.toString(e);!d&&!a||(i&&(i+=l),i+=d)}return i},t}(),qr=function(){function t(n,e){this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=g({},e,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),e.Renderer&&(this.renderer=new e.Renderer(this)),this.rules=new q(this.options);for(var i in n)this.rules.add(i,n[i]);this.rules.process()}var r=t.prototype;return r.attach=function(){return this.attached?this:(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy(),this)},r.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},r.addRule=function(e,i,o){var a=this.queue;this.attached&&!a&&(this.queue=[]);var s=this.rules.add(e,i,o);return s?(this.options.jss.plugins.onProcessRule(s),this.attached?(this.deployed&&(a?a.push(s):(this.insertRule(s),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0))),s):(this.deployed=!1,s)):null},r.replaceRule=function(e,i,o){var a=this.rules.get(e);if(!a)return this.addRule(e,i,o);var s=this.rules.replace(e,i,o);return s&&this.options.jss.plugins.onProcessRule(s),this.attached?(this.deployed&&this.renderer&&(s?a.renderable&&this.renderer.replaceRule(a.renderable,s):this.renderer.deleteRule(a)),s):(this.deployed=!1,s)},r.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},r.addRules=function(e,i){var o=[];for(var a in e){var s=this.addRule(a,e[a],i);s&&o.push(s)}return o},r.getRule=function(e){return this.rules.get(e)},r.deleteRule=function(e){var i=typeof e=="object"?e:this.rules.get(e);return!i||this.attached&&!i.renderable?!1:(this.rules.remove(i),this.attached&&i.renderable&&this.renderer?this.renderer.deleteRule(i.renderable):!0)},r.indexOf=function(e){return this.rules.indexOf(e)},r.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},r.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},r.updateOne=function(e,i,o){return this.rules.updateOne(e,i,o),this},r.toString=function(e){return this.rules.toString(e)},t}(),zn=function(){function t(){this.plugins={internal:[],external:[]},this.registry={}}var r=t.prototype;return r.onCreateRule=function(e,i,o){for(var a=0;a<this.registry.onCreateRule.length;a++){var s=this.registry.onCreateRule[a](e,i,o);if(s)return s}return null},r.onProcessRule=function(e){if(!e.isProcessed){for(var i=e.options.sheet,o=0;o<this.registry.onProcessRule.length;o++)this.registry.onProcessRule[o](e,i);e.style&&this.onProcessStyle(e.style,e,i),e.isProcessed=!0}},r.onProcessStyle=function(e,i,o){for(var a=0;a<this.registry.onProcessStyle.length;a++)i.style=this.registry.onProcessStyle[a](i.style,i,o)},r.onProcessSheet=function(e){for(var i=0;i<this.registry.onProcessSheet.length;i++)this.registry.onProcessSheet[i](e)},r.onUpdate=function(e,i,o,a){for(var s=0;s<this.registry.onUpdate.length;s++)this.registry.onUpdate[s](e,i,o,a)},r.onChangeValue=function(e,i,o){for(var a=e,s=0;s<this.registry.onChangeValue.length;s++)a=this.registry.onChangeValue[s](a,i,o);return a},r.use=function(e,i){i===void 0&&(i={queue:"external"});var o=this.plugins[i.queue];o.indexOf(e)===-1&&(o.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce(function(a,s){for(var l in s)l in a&&a[l].push(s[l]);return a},{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},t}(),Fn=function(){function t(){this.registry=[]}var r=t.prototype;return r.add=function(e){var i=this.registry,o=e.options.index;if(i.indexOf(e)===-1){if(i.length===0||o>=this.index){i.push(e);return}for(var a=0;a<i.length;a++)if(i[a].options.index>o){i.splice(a,0,e);return}}},r.reset=function(){this.registry=[]},r.remove=function(e){var i=this.registry.indexOf(e);this.registry.splice(i,1)},r.toString=function(e){for(var i=e===void 0?{}:e,o=i.attached,a=ee(i,["attached"]),s=L(a),l=s.linebreak,f="",c=0;c<this.registry.length;c++){var d=this.registry[c];o!=null&&d.attached!==o||(f&&(f+=l),f+=d.toString(a))}return f},he(t,[{key:"index",get:function(){return this.registry.length===0?0:this.registry[this.registry.length-1].options.index}}]),t}(),U=new Fn,He=typeof globalThis<"u"?globalThis:typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")(),Ke="2f1acc6c3a606b082e5eef5e54414ffb";He[Ke]==null&&(He[Ke]=0);var Fr=He[Ke]++,Wn=1e10,Be=function(r){r===void 0&&(r={});var n=0,e=function(o,a){n+=1,n>Wn;var s="",l="";return a&&(a.options.classNamePrefix&&(l=a.options.classNamePrefix),a.options.jss.id!=null&&(s=String(a.options.jss.id))),r.minify?""+(l||"c")+Fr+s+n:l+o.key+"-"+Fr+(s?"-"+s:"")+"-"+n};return e},Gr=function(r){var n;return function(){return n||(n=r()),n}},Un=function(r,n){try{return r.attributeStyleMap?r.attributeStyleMap.get(n):r.style.getPropertyValue(n)}catch{return""}},Jn=function(r,n,e){try{var i=e;if(Array.isArray(e)&&(i=E(e)),r.attributeStyleMap)r.attributeStyleMap.set(n,i);else{var o=i?i.indexOf("!important"):-1,a=o>-1?i.substr(0,o-1):i;r.style.setProperty(n,a,o>-1?"important":"")}}catch{return!1}return!0},qn=function(r,n){try{r.attributeStyleMap?r.attributeStyleMap.delete(n):r.style.removeProperty(n)}catch{}},Gn=function(r,n){return r.selectorText=n,r.selectorText===n},Hr=Gr(function(){return document.querySelector("head")});function Hn(t,r){for(var n=0;n<t.length;n++){var e=t[n];if(e.attached&&e.options.index>r.index&&e.options.insertionPoint===r.insertionPoint)return e}return null}function Kn(t,r){for(var n=t.length-1;n>=0;n--){var e=t[n];if(e.attached&&e.options.insertionPoint===r.insertionPoint)return e}return null}function Bn(t){for(var r=Hr(),n=0;n<r.childNodes.length;n++){var e=r.childNodes[n];if(e.nodeType===8&&e.nodeValue.trim()===t)return e}return null}function Yn(t){var r=U.registry;if(r.length>0){var n=Hn(r,t);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=Kn(r,t),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var e=t.insertionPoint;if(e&&typeof e=="string"){var i=Bn(e);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}function Xn(t,r){var n=r.insertionPoint,e=Yn(r);if(e!==!1&&e.parent){e.parent.insertBefore(t,e.node);return}if(n&&typeof n.nodeType=="number"){var i=n,o=i.parentNode;o&&o.insertBefore(t,i.nextSibling);return}Hr().appendChild(t)}var Zn=Gr(function(){var t=document.querySelector('meta[property="csp-nonce"]');return t?t.getAttribute("content"):null}),Wr=function(r,n,e){try{"insertRule"in r?r.insertRule(n,e):"appendRule"in r&&r.appendRule(n)}catch{return!1}return r.cssRules[e]},Ur=function(r,n){var e=r.cssRules.length;return n===void 0||n>e?e:n},Qn=function(){var r=document.createElement("style");return r.textContent=`
5
5
  `,r},ei=function(){function t(n){this.getPropertyValue=Un,this.setProperty=Jn,this.removeProperty=qn,this.setSelector=Gn,this.hasInsertedRules=!1,this.cssRules=[],n&&U.add(n),this.sheet=n;var e=this.sheet?this.sheet.options:{},i=e.media,o=e.meta,a=e.element;this.element=a||Qn(),this.element.setAttribute("data-jss",""),i&&this.element.setAttribute("media",i),o&&this.element.setAttribute("data-meta",o);var s=Zn();s&&this.element.setAttribute("nonce",s)}var r=t.prototype;return r.attach=function(){if(!(this.element.parentNode||!this.sheet)){Xn(this.element,this.sheet.options);var e=!!(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},r.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent=`
@@ -1,2 +1,2 @@
1
1
  "use client"
2
- import{useCallback as k,useContext as v,useEffect as d,useState as o}from"react";import{TeknifyClient as w}from"@tnf-dev/js";import{createContext as R,useMemo as W}from"react";import{jsx as H}from"react/jsx-runtime";var P=R({applicationId:"",subscriberId:""});var q=()=>{let{client:n}=v(P),[h,a]=o([]),[u,F]=o(!1),[_,M]=o(null),[l,C]=o(!1),[L,y]=o(!0),[T,x]=o(!0),[m,p]=o(),[E,g]=o(0),f=k(async e=>{try{a(i=>i.map(r=>r._id===e?{...r,isRead:!0}:r)),await n.notification.markAsRead(e)}catch{a(r=>r.map(t=>t._id===e?{...t,isRead:!1}:t))}},[]),c=k(async()=>{if(!(l||u))try{C(!0);let e=await n.notification.getNotifications({...m?{cursor:m}:{}});a(i=>[...i,...e.data.filter(r=>!i.find(t=>t._id===r._id)).map(r=>({...r,markAsRead:()=>f(r._id)}))]),x(!!e.pagination.continueCursor),p(e.pagination.continueCursor),g(e.unread)}catch{}finally{C(!1),y(!1)}},[l,m,f,u,n]);d(()=>{c()},[]),d(()=>{p(void 0)},[n]),d(()=>{let e=(i,{counts:r})=>{g(r.unread),a(t=>[...i.filter(s=>{let N=t.findIndex(A=>A._id===s._id);return N!==-1?(t[N]={...s,markAsRead:()=>f(s._id)},!1):!0}).map(s=>({...s,markAsRead:()=>f(s._id)})),...t])};return n.notification.on(e),()=>{n.notification.off(e)}},[f,n]);let I=k(()=>{c()},[c]);return d(()=>{a([]),x(!0),p(void 0),y(!0),c()},[n]),{notifications:h,isLoading:l,isFirstLoad:L,isError:u,error:_,hasMore:T,unread:E,fetchMore:I}};export{q as useNotifications};
2
+ import{useCallback as f,useContext as F,useEffect as u,useState as i}from"react";import{TeknifyClient as S}from"@tnf-dev/js";import{createContext as v,useMemo as D}from"react";import{jsx as K}from"react/jsx-runtime";var P=v({applicationId:"",subscriberId:""});var z=()=>{let{client:r}=F(P),[h,s]=i([]),[l,M]=i(!1),[A,w]=i(null),[m,C]=i(!1),[_,y]=i(!0),[L,x]=i(!0),[p,k]=i(),[R,g]=i(0),c=f(async e=>{try{s(n=>n.map(t=>t._id===e?{...t,isRead:!0}:t)),await r.notification.markAsRead(e)}catch{s(t=>t.map(o=>o._id===e?{...o,isRead:!1}:o))}},[]),T=f(async()=>{await r.notification.markAllAsRead(),s(e=>e.map(n=>({...n,isRead:!0})))},[]),d=f(async()=>{if(!(m||l))try{C(!0);let e=await r.notification.getNotifications({...p?{cursor:p}:{}});s(n=>[...n,...e.data.filter(t=>!n.find(o=>o._id===t._id)).map(t=>({...t,markAsRead:()=>c(t._id)}))]),x(!!e.pagination.continueCursor),k(e.pagination.continueCursor),g(e.unread)}catch{}finally{C(!1),y(!1)}},[m,p,c,l,r]);u(()=>{d()},[]),u(()=>{k(void 0)},[r]),u(()=>{let e=(n,{counts:t})=>{g(t.unread),s(o=>[...n.filter(a=>{let N=o.findIndex(I=>I._id===a._id);return N!==-1?(o[N]={...a,markAsRead:()=>c(a._id)},!1):!0}).map(a=>({...a,markAsRead:()=>c(a._id)})),...o])};return r.notification.on(e),()=>{r.notification.off(e)}},[c,r]);let E=f(()=>{d()},[d]);return u(()=>{s([]),x(!0),k(void 0),y(!0),d()},[r]),{notifications:h,isLoading:m,isFirstLoad:_,isError:l,error:A,hasMore:L,unread:R,fetchMore:E,markAllAsRead:T}};export{z as useNotifications};
@@ -10,6 +10,7 @@ declare const useNotifications: () => {
10
10
  hasMore: boolean;
11
11
  unread: number;
12
12
  fetchMore: () => void;
13
+ markAllAsRead: () => Promise<void>;
13
14
  };
14
15
 
15
16
  export { useNotifications };
@@ -1,2 +1,2 @@
1
1
  "use client"
2
- import{useCallback as k,useContext as v,useEffect as f,useState as o}from"react";import{TeknifyClient as w}from"@tnf-dev/js";import{createContext as R,useMemo as W}from"react";import{jsx as H}from"react/jsx-runtime";var P=R({applicationId:"",subscriberId:""});var q=()=>{let{client:n}=v(P),[h,a]=o([]),[u,F]=o(!1),[_,M]=o(null),[l,C]=o(!1),[L,y]=o(!0),[T,x]=o(!0),[m,p]=o(),[E,g]=o(0),c=k(async e=>{try{a(i=>i.map(t=>t._id===e?{...t,isRead:!0}:t)),await n.notification.markAsRead(e)}catch{a(t=>t.map(r=>r._id===e?{...r,isRead:!1}:r))}},[]),d=k(async()=>{if(!(l||u))try{C(!0);let e=await n.notification.getNotifications({...m?{cursor:m}:{}});a(i=>[...i,...e.data.filter(t=>!i.find(r=>r._id===t._id)).map(t=>({...t,markAsRead:()=>c(t._id)}))]),x(!!e.pagination.continueCursor),p(e.pagination.continueCursor),g(e.unread)}catch{}finally{C(!1),y(!1)}},[l,m,c,u,n]);f(()=>{d()},[]),f(()=>{p(void 0)},[n]),f(()=>{let e=(i,{counts:t})=>{g(t.unread),a(r=>[...i.filter(s=>{let N=r.findIndex(A=>A._id===s._id);return N!==-1?(r[N]={...s,markAsRead:()=>c(s._id)},!1):!0}).map(s=>({...s,markAsRead:()=>c(s._id)})),...r])};return n.notification.on(e),()=>{n.notification.off(e)}},[c,n]);let I=k(()=>{d()},[d]);return f(()=>{a([]),x(!0),p(void 0),y(!0),d()},[n]),{notifications:h,isLoading:l,isFirstLoad:L,isError:u,error:_,hasMore:T,unread:E,fetchMore:I}};export{q as useNotifications};
2
+ import{useCallback as f,useContext as F,useEffect as u,useState as i}from"react";import{TeknifyClient as S}from"@tnf-dev/js";import{createContext as v,useMemo as D}from"react";import{jsx as K}from"react/jsx-runtime";var P=v({applicationId:"",subscriberId:""});var z=()=>{let{client:r}=F(P),[h,s]=i([]),[l,M]=i(!1),[A,w]=i(null),[m,C]=i(!1),[_,y]=i(!0),[L,x]=i(!0),[k,p]=i(),[R,g]=i(0),c=f(async e=>{try{s(n=>n.map(t=>t._id===e?{...t,isRead:!0}:t)),await r.notification.markAsRead(e)}catch{s(t=>t.map(o=>o._id===e?{...o,isRead:!1}:o))}},[]),T=f(async()=>{await r.notification.markAllAsRead(),s(e=>e.map(n=>({...n,isRead:!0})))},[]),d=f(async()=>{if(!(m||l))try{C(!0);let e=await r.notification.getNotifications({...k?{cursor:k}:{}});s(n=>[...n,...e.data.filter(t=>!n.find(o=>o._id===t._id)).map(t=>({...t,markAsRead:()=>c(t._id)}))]),x(!!e.pagination.continueCursor),p(e.pagination.continueCursor),g(e.unread)}catch{}finally{C(!1),y(!1)}},[m,k,c,l,r]);u(()=>{d()},[]),u(()=>{p(void 0)},[r]),u(()=>{let e=(n,{counts:t})=>{g(t.unread),s(o=>[...n.filter(a=>{let N=o.findIndex(I=>I._id===a._id);return N!==-1?(o[N]={...a,markAsRead:()=>c(a._id)},!1):!0}).map(a=>({...a,markAsRead:()=>c(a._id)})),...o])};return r.notification.on(e),()=>{r.notification.off(e)}},[c,r]);let E=f(()=>{d()},[d]);return u(()=>{s([]),x(!0),p(void 0),y(!0),d()},[r]),{notifications:h,isLoading:m,isFirstLoad:_,isError:l,error:A,hasMore:L,unread:R,fetchMore:E,markAllAsRead:T}};export{z as useNotifications};
package/dist/esm/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  "use client"
2
- var kn=Object.create;var Bt=Object.defineProperty;var Cn=Object.getOwnPropertyDescriptor;var Nn=Object.getOwnPropertyNames;var On=Object.getPrototypeOf,Tn=Object.prototype.hasOwnProperty;var ue=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var En=(r,e,n,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Nn(e))!Tn.call(r,i)&&i!==n&&Bt(r,i,{get:()=>e[i],enumerable:!(t=Cn(e,i))||t.enumerable});return r};var ze=(r,e,n)=>(n=r!=null?kn(On(r)):{},En(e||!r||!r.__esModule?Bt(n,"default",{value:r,enumerable:!0}):n,r));var Ht=ue(b=>{"use strict";var O=typeof Symbol=="function"&&Symbol.for,Be=O?Symbol.for("react.element"):60103,$e=O?Symbol.for("react.portal"):60106,de=O?Symbol.for("react.fragment"):60107,he=O?Symbol.for("react.strict_mode"):60108,pe=O?Symbol.for("react.profiler"):60114,me=O?Symbol.for("react.provider"):60109,ve=O?Symbol.for("react.context"):60110,Ue=O?Symbol.for("react.async_mode"):60111,ge=O?Symbol.for("react.concurrent_mode"):60111,ye=O?Symbol.for("react.forward_ref"):60112,be=O?Symbol.for("react.suspense"):60113,An=O?Symbol.for("react.suspense_list"):60120,xe=O?Symbol.for("react.memo"):60115,Se=O?Symbol.for("react.lazy"):60116,_n=O?Symbol.for("react.block"):60121,jn=O?Symbol.for("react.fundamental"):60117,Mn=O?Symbol.for("react.responder"):60118,Fn=O?Symbol.for("react.scope"):60119;function I(r){if(typeof r=="object"&&r!==null){var e=r.$$typeof;switch(e){case Be:switch(r=r.type,r){case Ue:case ge:case de:case pe:case he:case be:return r;default:switch(r=r&&r.$$typeof,r){case ve:case ye:case Se:case xe:case me:return r;default:return e}}case $e:return e}}}function Ut(r){return I(r)===ge}b.AsyncMode=Ue;b.ConcurrentMode=ge;b.ContextConsumer=ve;b.ContextProvider=me;b.Element=Be;b.ForwardRef=ye;b.Fragment=de;b.Lazy=Se;b.Memo=xe;b.Portal=$e;b.Profiler=pe;b.StrictMode=he;b.Suspense=be;b.isAsyncMode=function(r){return Ut(r)||I(r)===Ue};b.isConcurrentMode=Ut;b.isContextConsumer=function(r){return I(r)===ve};b.isContextProvider=function(r){return I(r)===me};b.isElement=function(r){return typeof r=="object"&&r!==null&&r.$$typeof===Be};b.isForwardRef=function(r){return I(r)===ye};b.isFragment=function(r){return I(r)===de};b.isLazy=function(r){return I(r)===Se};b.isMemo=function(r){return I(r)===xe};b.isPortal=function(r){return I(r)===$e};b.isProfiler=function(r){return I(r)===pe};b.isStrictMode=function(r){return I(r)===he};b.isSuspense=function(r){return I(r)===be};b.isValidElementType=function(r){return typeof r=="string"||typeof r=="function"||r===de||r===ge||r===pe||r===he||r===be||r===An||typeof r=="object"&&r!==null&&(r.$$typeof===Se||r.$$typeof===xe||r.$$typeof===me||r.$$typeof===ve||r.$$typeof===ye||r.$$typeof===jn||r.$$typeof===Mn||r.$$typeof===Fn||r.$$typeof===_n)};b.typeOf=I});var Jt=ue((xs,Gt)=>{"use strict";Gt.exports=Ht()});var Je=ue((Ss,Qt)=>{"use strict";var He=Jt(),Ln={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Vn={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Dn={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Yt={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ge={};Ge[He.ForwardRef]=Dn;Ge[He.Memo]=Yt;function qt(r){return He.isMemo(r)?Yt:Ge[r.$$typeof]||Ln}var Wn=Object.defineProperty,zn=Object.getOwnPropertyNames,Kt=Object.getOwnPropertySymbols,Bn=Object.getOwnPropertyDescriptor,$n=Object.getPrototypeOf,Xt=Object.prototype;function Zt(r,e,n){if(typeof e!="string"){if(Xt){var t=$n(e);t&&t!==Xt&&Zt(r,t,n)}var i=zn(e);Kt&&(i=i.concat(Kt(e)));for(var o=qt(r),a=qt(e),s=0;s<i.length;++s){var f=i[s];if(!Vn[f]&&!(n&&n[f])&&!(a&&a[f])&&!(o&&o[f])){var u=Bn(e,f);try{Wn(r,f,u)}catch{}}}}return r}Qt.exports=Zt});var er=ue(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.default=Gn;function Gn(r){return r.displayName||r.name||(typeof r=="string"&&r.length>0?r:"Unknown")}});function $t(r){var e,n,t="";if(typeof r=="string"||typeof r=="number")t+=r;else if(typeof r=="object")if(Array.isArray(r)){var i=r.length;for(e=0;e<i;e++)r[e]&&(n=$t(r[e]))&&(t&&(t+=" "),t+=n)}else for(n in r)r[n]&&(t&&(t+=" "),t+=n);return t}function In(){for(var r,e,n=0,t="",i=arguments.length;n<i;n++)(r=arguments[n])&&(e=$t(r))&&(t&&(t+=" "),t+=e);return t}var g=In;import{useMemo as dn}from"react";function S(){return S=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var t in n)({}).hasOwnProperty.call(n,t)&&(r[t]=n[t])}return r},S.apply(null,arguments)}function ce(r,e){if(r==null)return{};var n={};for(var t in r)if({}.hasOwnProperty.call(r,t)){if(e.indexOf(t)!==-1)continue;n[t]=r[t]}return n}var sa=ze(Je());import ra,{createContext as na,useRef as ia,useContext as Qr,useMemo as en,useEffect as an,useLayoutEffect as oa,useDebugValue as tn,forwardRef as cf,createElement as aa}from"react";import U,{createContext as Jn}from"react";var Un=!0;function Hn(r,e){if(!Un){if(r)return;var n="Warning: "+e;typeof console<"u"&&console.warn(n);try{throw Error(n)}catch{}}}var qe=Hn;var tr=ze(Je()),ks=ze(er());function Pe(r,e,n){return e in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function we(){return we=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=n[t])}return r},we.apply(this,arguments)}function qn(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.__proto__=e}function L(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Kn(r){var e=function(n){qn(t,n);function t(){for(var o,a=arguments.length,s=new Array(a),f=0;f<a;f++)s[f]=arguments[f];return o=n.call.apply(n,[this].concat(s))||this,Pe(L(L(o)),"cachedTheme",void 0),Pe(L(L(o)),"lastOuterTheme",void 0),Pe(L(L(o)),"lastTheme",void 0),Pe(L(L(o)),"renderProvider",function(u){var c=o.props.children;return U.createElement(r.Provider,{value:o.getTheme(u)},c)}),o}var i=t.prototype;return i.getTheme=function(a){if(this.props.theme!==this.lastTheme||a!==this.lastOuterTheme||!this.cachedTheme)if(this.lastOuterTheme=a,this.lastTheme=this.props.theme,typeof this.lastTheme=="function"){var s=this.props.theme;this.cachedTheme=s(a)}else{var f=this.props.theme;this.cachedTheme=a?we({},a,f):f}return this.cachedTheme},i.render=function(){var a=this.props.children;return a?U.createElement(r.Consumer,null,this.renderProvider):null},t}(U.Component);return e}function Xn(r){return function(n){var t=U.forwardRef(function(i,o){return U.createElement(r.Consumer,null,function(a){return U.createElement(n,we({theme:a,ref:o},i))})});return(0,tr.default)(t,n),t}}function Yn(r){var e=function(){var t=U.useContext(r);return t};return e}function rr(r){return{context:r,withTheme:Xn(r),useTheme:Yn(r),ThemeProvider:Kn(r)}}var Xe=Jn(),Ye=rr(Xe),Zn=Ye.withTheme,Qn=Ye.ThemeProvider,ei=Ye.useTheme;var nr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ti=(typeof window>"u"?"undefined":nr(window))==="object"&&(typeof document>"u"?"undefined":nr(document))==="object"&&document.nodeType===9,j=ti;function H(r){"@babel/helpers - typeof";return H=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},H(r)}function ir(r,e){if(H(r)!="object"||!r)return r;var n=r[Symbol.toPrimitive];if(n!==void 0){var t=n.call(r,e||"default");if(H(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function or(r){var e=ir(r,"string");return H(e)=="symbol"?e:e+""}function ar(r,e){for(var n=0;n<e.length;n++){var t=e[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,or(t.key),t)}}function Re(r,e,n){return e&&ar(r.prototype,e),n&&ar(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}function ke(r,e){return ke=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,t){return n.__proto__=t,n},ke(r,e)}function Ze(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,ke(r,e)}function Qe(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}var ri={}.constructor;function rt(r){if(r==null||typeof r!="object")return r;if(Array.isArray(r))return r.map(rt);if(r.constructor!==ri)return r;var e={};for(var n in r)e[n]=rt(r[n]);return e}function K(r,e,n){r===void 0&&(r="unnamed");var t=n.jss,i=rt(e),o=t.plugins.onCreateRule(r,i,n);return o||(r[0],null)}var sr=function(e,n){for(var t="",i=0;i<e.length&&e[i]!=="!important";i++)t&&(t+=n),t+=e[i];return t},V=function(e){if(!Array.isArray(e))return e;var n="";if(Array.isArray(e[0]))for(var t=0;t<e.length&&e[t]!=="!important";t++)n&&(n+=", "),n+=sr(e[t]," ");else n=sr(e,", ");return e[e.length-1]==="!important"&&(n+=" !important"),n};function X(r){return r&&r.format===!1?{linebreak:"",space:""}:{linebreak:`
3
- `,space:" "}}function ee(r,e){for(var n="",t=0;t<e;t++)n+=" ";return n+r}function re(r,e,n){n===void 0&&(n={});var t="";if(!e)return t;var i=n,o=i.indent,a=o===void 0?0:o,s=e.fallbacks;n.format===!1&&(a=-1/0);var f=X(n),u=f.linebreak,c=f.space;if(r&&a++,s)if(Array.isArray(s))for(var d=0;d<s.length;d++){var p=s[d];for(var m in p){var y=p[m];y!=null&&(t&&(t+=u),t+=ee(m+":"+c+V(y)+";",a))}}else for(var v in s){var R=s[v];R!=null&&(t&&(t+=u),t+=ee(v+":"+c+V(R)+";",a))}for(var C in e){var x=e[C];x!=null&&C!=="fallbacks"&&(t&&(t+=u),t+=ee(C+":"+c+V(x)+";",a))}return!t&&!n.allowEmpty||!r?t:(a--,t&&(t=""+u+t+u),ee(""+r+c+"{"+t,a)+ee("}",a))}var ni=/([[\].#*$><+~=|^:(),"'`\s])/g,lr=typeof CSS<"u"&&CSS.escape,ft=function(r){return lr?lr(r):r.replace(ni,"\\$1")},mr=function(){function r(n,t,i){this.type="style",this.isProcessed=!1;var o=i.sheet,a=i.Renderer;this.key=n,this.options=i,this.style=t,o?this.renderer=o.renderer:a&&(this.renderer=new a)}var e=r.prototype;return e.prop=function(t,i,o){if(i===void 0)return this.style[t];var a=o?o.force:!1;if(!a&&this.style[t]===i)return this;var s=i;(!o||o.process!==!1)&&(s=this.options.jss.plugins.onChangeValue(i,t,this));var f=s==null||s===!1,u=t in this.style;if(f&&!u&&!a)return this;var c=f&&u;if(c?delete this.style[t]:this.style[t]=s,this.renderable&&this.renderer)return c?this.renderer.removeProperty(this.renderable,t):this.renderer.setProperty(this.renderable,t,s),this;var d=this.options.sheet;return d&&d.attached,this},r}(),nt=function(r){Ze(e,r);function e(t,i,o){var a;a=r.call(this,t,i,o)||this;var s=o.selector,f=o.scoped,u=o.sheet,c=o.generateId;return s?a.selectorText=s:f!==!1&&(a.id=c(Qe(Qe(a)),u),a.selectorText="."+ft(a.id)),a}var n=e.prototype;return n.applyTo=function(i){var o=this.renderer;if(o){var a=this.toJSON();for(var s in a)o.setProperty(i,s,a[s])}return this},n.toJSON=function(){var i={};for(var o in this.style){var a=this.style[o];typeof a!="object"?i[o]=a:Array.isArray(a)&&(i[o]=V(a))}return i},n.toString=function(i){var o=this.options.sheet,a=o?o.options.link:!1,s=a?S({},i,{allowEmpty:!0}):i;return re(this.selectorText,this.style,s)},Re(e,[{key:"selector",set:function(i){if(i!==this.selectorText){this.selectorText=i;var o=this.renderer,a=this.renderable;if(!(!a||!o)){var s=o.setSelector(a,i);s||o.replaceRule(a,this)}}},get:function(){return this.selectorText}}]),e}(mr),ii={onCreateRule:function(e,n,t){return e[0]==="@"||t.parent&&t.parent.type==="keyframes"?null:new nt(e,n,t)}},et={indent:1,children:!0},oi=/@([\w-]+)/,ai=function(){function r(n,t,i){this.type="conditional",this.isProcessed=!1,this.key=n;var o=n.match(oi);this.at=o?o[1]:"unknown",this.query=i.name||"@"+this.at,this.options=i,this.rules=new ne(S({},i,{parent:this}));for(var a in t)this.rules.add(a,t[a]);this.rules.process()}var e=r.prototype;return e.getRule=function(t){return this.rules.get(t)},e.indexOf=function(t){return this.rules.indexOf(t)},e.addRule=function(t,i,o){var a=this.rules.add(t,i,o);return a?(this.options.jss.plugins.onProcessRule(a),a):null},e.replaceRule=function(t,i,o){var a=this.rules.replace(t,i,o);return a&&this.options.jss.plugins.onProcessRule(a),a},e.toString=function(t){t===void 0&&(t=et);var i=X(t),o=i.linebreak;if(t.indent==null&&(t.indent=et.indent),t.children==null&&(t.children=et.children),t.children===!1)return this.query+" {}";var a=this.rules.toString(t);return a?this.query+" {"+o+a+o+"}":""},r}(),si=/@container|@media|@supports\s+/,li={onCreateRule:function(e,n,t){return si.test(e)?new ai(e,n,t):null}},tt={indent:1,children:!0},fi=/@keyframes\s+([\w-]+)/,it=function(){function r(n,t,i){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var o=n.match(fi);o&&o[1]?this.name=o[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=i;var a=i.scoped,s=i.sheet,f=i.generateId;this.id=a===!1?this.name:ft(f(this,s)),this.rules=new ne(S({},i,{parent:this}));for(var u in t)this.rules.add(u,t[u],S({},i,{parent:this}));this.rules.process()}var e=r.prototype;return e.toString=function(t){t===void 0&&(t=tt);var i=X(t),o=i.linebreak;if(t.indent==null&&(t.indent=tt.indent),t.children==null&&(t.children=tt.children),t.children===!1)return this.at+" "+this.id+" {}";var a=this.rules.toString(t);return a&&(a=""+o+a+o),this.at+" "+this.id+" {"+a+"}"},r}(),ui=/@keyframes\s+/,ci=/\$([\w-]+)/g,ot=function(e,n){return typeof e=="string"?e.replace(ci,function(t,i){return i in n?n[i]:t}):e},fr=function(e,n,t){var i=e[n],o=ot(i,t);o!==i&&(e[n]=o)},di={onCreateRule:function(e,n,t){return typeof e=="string"&&ui.test(e)?new it(e,n,t):null},onProcessStyle:function(e,n,t){return n.type!=="style"||!t||("animation-name"in e&&fr(e,"animation-name",t.keyframes),"animation"in e&&fr(e,"animation",t.keyframes)),e},onChangeValue:function(e,n,t){var i=t.options.sheet;if(!i)return e;switch(n){case"animation":return ot(e,i.keyframes);case"animation-name":return ot(e,i.keyframes);default:return e}}},hi=function(r){Ze(e,r);function e(){return r.apply(this,arguments)||this}var n=e.prototype;return n.toString=function(i){var o=this.options.sheet,a=o?o.options.link:!1,s=a?S({},i,{allowEmpty:!0}):i;return re(this.key,this.style,s)},e}(mr),pi={onCreateRule:function(e,n,t){return t.parent&&t.parent.type==="keyframes"?new hi(e,n,t):null}},mi=function(){function r(n,t,i){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=n,this.style=t,this.options=i}var e=r.prototype;return e.toString=function(t){var i=X(t),o=i.linebreak;if(Array.isArray(this.style)){for(var a="",s=0;s<this.style.length;s++)a+=re(this.at,this.style[s]),this.style[s+1]&&(a+=o);return a}return re(this.at,this.style,t)},r}(),vi=/@font-face/,gi={onCreateRule:function(e,n,t){return vi.test(e)?new mi(e,n,t):null}},yi=function(){function r(n,t,i){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=n,this.style=t,this.options=i}var e=r.prototype;return e.toString=function(t){return re(this.key,this.style,t)},r}(),bi={onCreateRule:function(e,n,t){return e==="@viewport"||e==="@-ms-viewport"?new yi(e,n,t):null}},xi=function(){function r(n,t,i){this.type="simple",this.isProcessed=!1,this.key=n,this.value=t,this.options=i}var e=r.prototype;return e.toString=function(t){if(Array.isArray(this.value)){for(var i="",o=0;o<this.value.length;o++)i+=this.key+" "+this.value[o]+";",this.value[o+1]&&(i+=`
4
- `);return i}return this.key+" "+this.value+";"},r}(),Si={"@charset":!0,"@import":!0,"@namespace":!0},Pi={onCreateRule:function(e,n,t){return e in Si?new xi(e,n,t):null}},ur=[ii,li,di,pi,gi,bi,Pi],wi={process:!0},cr={force:!0,process:!0},ne=function(){function r(n){this.map={},this.raw={},this.index=[],this.counter=0,this.options=n,this.classes=n.classes,this.keyframes=n.keyframes}var e=r.prototype;return e.add=function(t,i,o){var a=this.options,s=a.parent,f=a.sheet,u=a.jss,c=a.Renderer,d=a.generateId,p=a.scoped,m=S({classes:this.classes,parent:s,sheet:f,jss:u,Renderer:c,generateId:d,scoped:p,name:t,keyframes:this.keyframes,selector:void 0},o),y=t;t in this.raw&&(y=t+"-d"+this.counter++),this.raw[y]=i,y in this.classes&&(m.selector="."+ft(this.classes[y]));var v=K(y,i,m);if(!v)return null;this.register(v);var R=m.index===void 0?this.index.length:m.index;return this.index.splice(R,0,v),v},e.replace=function(t,i,o){var a=this.get(t),s=this.index.indexOf(a);a&&this.remove(a);var f=o;return s!==-1&&(f=S({},o,{index:s})),this.add(t,i,f)},e.get=function(t){return this.map[t]},e.remove=function(t){this.unregister(t),delete this.raw[t.key],this.index.splice(this.index.indexOf(t),1)},e.indexOf=function(t){return this.index.indexOf(t)},e.process=function(){var t=this.options.jss.plugins;this.index.slice(0).forEach(t.onProcessRule,t)},e.register=function(t){this.map[t.key]=t,t instanceof nt?(this.map[t.selector]=t,t.id&&(this.classes[t.key]=t.id)):t instanceof it&&this.keyframes&&(this.keyframes[t.name]=t.id)},e.unregister=function(t){delete this.map[t.key],t instanceof nt?(delete this.map[t.selector],delete this.classes[t.key]):t instanceof it&&delete this.keyframes[t.name]},e.update=function(){var t,i,o;if(typeof(arguments.length<=0?void 0:arguments[0])=="string"?(t=arguments.length<=0?void 0:arguments[0],i=arguments.length<=1?void 0:arguments[1],o=arguments.length<=2?void 0:arguments[2]):(i=arguments.length<=0?void 0:arguments[0],o=arguments.length<=1?void 0:arguments[1],t=null),t)this.updateOne(this.get(t),i,o);else for(var a=0;a<this.index.length;a++)this.updateOne(this.index[a],i,o)},e.updateOne=function(t,i,o){o===void 0&&(o=wi);var a=this.options,s=a.jss.plugins,f=a.sheet;if(t.rules instanceof r){t.rules.update(i,o);return}var u=t.style;if(s.onUpdate(i,t,f,o),o.process&&u&&u!==t.style){s.onProcessStyle(t.style,t,f);for(var c in t.style){var d=t.style[c],p=u[c];d!==p&&t.prop(c,d,cr)}for(var m in u){var y=t.style[m],v=u[m];y==null&&y!==v&&t.prop(m,null,cr)}}},e.toString=function(t){for(var i="",o=this.options.sheet,a=o?o.options.link:!1,s=X(t),f=s.linebreak,u=0;u<this.index.length;u++){var c=this.index[u],d=c.toString(t);!d&&!a||(i&&(i+=f),i+=d)}return i},r}(),vr=function(){function r(n,t){this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=S({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new ne(this.options);for(var i in n)this.rules.add(i,n[i]);this.rules.process()}var e=r.prototype;return e.attach=function(){return this.attached?this:(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy(),this)},e.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},e.addRule=function(t,i,o){var a=this.queue;this.attached&&!a&&(this.queue=[]);var s=this.rules.add(t,i,o);return s?(this.options.jss.plugins.onProcessRule(s),this.attached?(this.deployed&&(a?a.push(s):(this.insertRule(s),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0))),s):(this.deployed=!1,s)):null},e.replaceRule=function(t,i,o){var a=this.rules.get(t);if(!a)return this.addRule(t,i,o);var s=this.rules.replace(t,i,o);return s&&this.options.jss.plugins.onProcessRule(s),this.attached?(this.deployed&&this.renderer&&(s?a.renderable&&this.renderer.replaceRule(a.renderable,s):this.renderer.deleteRule(a)),s):(this.deployed=!1,s)},e.insertRule=function(t){this.renderer&&this.renderer.insertRule(t)},e.addRules=function(t,i){var o=[];for(var a in t){var s=this.addRule(a,t[a],i);s&&o.push(s)}return o},e.getRule=function(t){return this.rules.get(t)},e.deleteRule=function(t){var i=typeof t=="object"?t:this.rules.get(t);return!i||this.attached&&!i.renderable?!1:(this.rules.remove(i),this.attached&&i.renderable&&this.renderer?this.renderer.deleteRule(i.renderable):!0)},e.indexOf=function(t){return this.rules.indexOf(t)},e.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},e.update=function(){var t;return(t=this.rules).update.apply(t,arguments),this},e.updateOne=function(t,i,o){return this.rules.updateOne(t,i,o),this},e.toString=function(t){return this.rules.toString(t)},r}(),Ri=function(){function r(){this.plugins={internal:[],external:[]},this.registry={}}var e=r.prototype;return e.onCreateRule=function(t,i,o){for(var a=0;a<this.registry.onCreateRule.length;a++){var s=this.registry.onCreateRule[a](t,i,o);if(s)return s}return null},e.onProcessRule=function(t){if(!t.isProcessed){for(var i=t.options.sheet,o=0;o<this.registry.onProcessRule.length;o++)this.registry.onProcessRule[o](t,i);t.style&&this.onProcessStyle(t.style,t,i),t.isProcessed=!0}},e.onProcessStyle=function(t,i,o){for(var a=0;a<this.registry.onProcessStyle.length;a++)i.style=this.registry.onProcessStyle[a](i.style,i,o)},e.onProcessSheet=function(t){for(var i=0;i<this.registry.onProcessSheet.length;i++)this.registry.onProcessSheet[i](t)},e.onUpdate=function(t,i,o,a){for(var s=0;s<this.registry.onUpdate.length;s++)this.registry.onUpdate[s](t,i,o,a)},e.onChangeValue=function(t,i,o){for(var a=t,s=0;s<this.registry.onChangeValue.length;s++)a=this.registry.onChangeValue[s](a,i,o);return a},e.use=function(t,i){i===void 0&&(i={queue:"external"});var o=this.plugins[i.queue];o.indexOf(t)===-1&&(o.push(t),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce(function(a,s){for(var f in s)f in a&&a[f].push(s[f]);return a},{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},r}(),ki=function(){function r(){this.registry=[]}var e=r.prototype;return e.add=function(t){var i=this.registry,o=t.options.index;if(i.indexOf(t)===-1){if(i.length===0||o>=this.index){i.push(t);return}for(var a=0;a<i.length;a++)if(i[a].options.index>o){i.splice(a,0,t);return}}},e.reset=function(){this.registry=[]},e.remove=function(t){var i=this.registry.indexOf(t);this.registry.splice(i,1)},e.toString=function(t){for(var i=t===void 0?{}:t,o=i.attached,a=ce(i,["attached"]),s=X(a),f=s.linebreak,u="",c=0;c<this.registry.length;c++){var d=this.registry[c];o!=null&&d.attached!==o||(u&&(u+=f),u+=d.toString(a))}return u},Re(r,[{key:"index",get:function(){return this.registry.length===0?0:this.registry[this.registry.length-1].options.index}}]),r}(),te=new ki,at=typeof globalThis<"u"?globalThis:typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")(),st="2f1acc6c3a606b082e5eef5e54414ffb";at[st]==null&&(at[st]=0);var dr=at[st]++,Ci=1e10,lt=function(e){e===void 0&&(e={});var n=0,t=function(o,a){n+=1,n>Ci;var s="",f="";return a&&(a.options.classNamePrefix&&(f=a.options.classNamePrefix),a.options.jss.id!=null&&(s=String(a.options.jss.id))),e.minify?""+(f||"c")+dr+s+n:f+o.key+"-"+dr+(s?"-"+s:"")+"-"+n};return t},gr=function(e){var n;return function(){return n||(n=e()),n}},Ni=function(e,n){try{return e.attributeStyleMap?e.attributeStyleMap.get(n):e.style.getPropertyValue(n)}catch{return""}},Oi=function(e,n,t){try{var i=t;if(Array.isArray(t)&&(i=V(t)),e.attributeStyleMap)e.attributeStyleMap.set(n,i);else{var o=i?i.indexOf("!important"):-1,a=o>-1?i.substr(0,o-1):i;e.style.setProperty(n,a,o>-1?"important":"")}}catch{return!1}return!0},Ti=function(e,n){try{e.attributeStyleMap?e.attributeStyleMap.delete(n):e.style.removeProperty(n)}catch{}},Ei=function(e,n){return e.selectorText=n,e.selectorText===n},yr=gr(function(){return document.querySelector("head")});function Ii(r,e){for(var n=0;n<r.length;n++){var t=r[n];if(t.attached&&t.options.index>e.index&&t.options.insertionPoint===e.insertionPoint)return t}return null}function Ai(r,e){for(var n=r.length-1;n>=0;n--){var t=r[n];if(t.attached&&t.options.insertionPoint===e.insertionPoint)return t}return null}function _i(r){for(var e=yr(),n=0;n<e.childNodes.length;n++){var t=e.childNodes[n];if(t.nodeType===8&&t.nodeValue.trim()===r)return t}return null}function ji(r){var e=te.registry;if(e.length>0){var n=Ii(e,r);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=Ai(e,r),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var t=r.insertionPoint;if(t&&typeof t=="string"){var i=_i(t);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}function Mi(r,e){var n=e.insertionPoint,t=ji(e);if(t!==!1&&t.parent){t.parent.insertBefore(r,t.node);return}if(n&&typeof n.nodeType=="number"){var i=n,o=i.parentNode;o&&o.insertBefore(r,i.nextSibling);return}yr().appendChild(r)}var Fi=gr(function(){var r=document.querySelector('meta[property="csp-nonce"]');return r?r.getAttribute("content"):null}),hr=function(e,n,t){try{"insertRule"in e?e.insertRule(n,t):"appendRule"in e&&e.appendRule(n)}catch{return!1}return e.cssRules[t]},pr=function(e,n){var t=e.cssRules.length;return n===void 0||n>t?t:n},Li=function(){var e=document.createElement("style");return e.textContent=`
5
- `,e},Vi=function(){function r(n){this.getPropertyValue=Ni,this.setProperty=Oi,this.removeProperty=Ti,this.setSelector=Ei,this.hasInsertedRules=!1,this.cssRules=[],n&&te.add(n),this.sheet=n;var t=this.sheet?this.sheet.options:{},i=t.media,o=t.meta,a=t.element;this.element=a||Li(),this.element.setAttribute("data-jss",""),i&&this.element.setAttribute("media",i),o&&this.element.setAttribute("data-meta",o);var s=Fi();s&&this.element.setAttribute("nonce",s)}var e=r.prototype;return e.attach=function(){if(!(this.element.parentNode||!this.sheet)){Mi(this.element,this.sheet.options);var t=!!(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&t&&(this.hasInsertedRules=!1,this.deploy())}},e.detach=function(){if(this.sheet){var t=this.element.parentNode;t&&t.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent=`
2
+ var Cn=Object.create;var Ut=Object.defineProperty;var Nn=Object.getOwnPropertyDescriptor;var On=Object.getOwnPropertyNames;var Tn=Object.getPrototypeOf,En=Object.prototype.hasOwnProperty;var ce=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var An=(r,e,n,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of On(e))!En.call(r,i)&&i!==n&&Ut(r,i,{get:()=>e[i],enumerable:!(t=Nn(e,i))||t.enumerable});return r};var $e=(r,e,n)=>(n=r!=null?Cn(Tn(r)):{},An(e||!r||!r.__esModule?Ut(n,"default",{value:r,enumerable:!0}):n,r));var Jt=ce(b=>{"use strict";var T=typeof Symbol=="function"&&Symbol.for,Ue=T?Symbol.for("react.element"):60103,He=T?Symbol.for("react.portal"):60106,he=T?Symbol.for("react.fragment"):60107,pe=T?Symbol.for("react.strict_mode"):60108,me=T?Symbol.for("react.profiler"):60114,ve=T?Symbol.for("react.provider"):60109,ge=T?Symbol.for("react.context"):60110,Ge=T?Symbol.for("react.async_mode"):60111,ye=T?Symbol.for("react.concurrent_mode"):60111,be=T?Symbol.for("react.forward_ref"):60112,xe=T?Symbol.for("react.suspense"):60113,_n=T?Symbol.for("react.suspense_list"):60120,Se=T?Symbol.for("react.memo"):60115,Pe=T?Symbol.for("react.lazy"):60116,jn=T?Symbol.for("react.block"):60121,Mn=T?Symbol.for("react.fundamental"):60117,Fn=T?Symbol.for("react.responder"):60118,Ln=T?Symbol.for("react.scope"):60119;function A(r){if(typeof r=="object"&&r!==null){var e=r.$$typeof;switch(e){case Ue:switch(r=r.type,r){case Ge:case ye:case he:case me:case pe:case xe:return r;default:switch(r=r&&r.$$typeof,r){case ge:case be:case Pe:case Se:case ve:return r;default:return e}}case He:return e}}}function Gt(r){return A(r)===ye}b.AsyncMode=Ge;b.ConcurrentMode=ye;b.ContextConsumer=ge;b.ContextProvider=ve;b.Element=Ue;b.ForwardRef=be;b.Fragment=he;b.Lazy=Pe;b.Memo=Se;b.Portal=He;b.Profiler=me;b.StrictMode=pe;b.Suspense=xe;b.isAsyncMode=function(r){return Gt(r)||A(r)===Ge};b.isConcurrentMode=Gt;b.isContextConsumer=function(r){return A(r)===ge};b.isContextProvider=function(r){return A(r)===ve};b.isElement=function(r){return typeof r=="object"&&r!==null&&r.$$typeof===Ue};b.isForwardRef=function(r){return A(r)===be};b.isFragment=function(r){return A(r)===he};b.isLazy=function(r){return A(r)===Pe};b.isMemo=function(r){return A(r)===Se};b.isPortal=function(r){return A(r)===He};b.isProfiler=function(r){return A(r)===me};b.isStrictMode=function(r){return A(r)===pe};b.isSuspense=function(r){return A(r)===xe};b.isValidElementType=function(r){return typeof r=="string"||typeof r=="function"||r===he||r===ye||r===me||r===pe||r===xe||r===_n||typeof r=="object"&&r!==null&&(r.$$typeof===Pe||r.$$typeof===Se||r.$$typeof===ve||r.$$typeof===ge||r.$$typeof===be||r.$$typeof===Mn||r.$$typeof===Fn||r.$$typeof===Ln||r.$$typeof===jn)};b.typeOf=A});var Kt=ce((Ss,qt)=>{"use strict";qt.exports=Jt()});var Ke=ce((Ps,tr)=>{"use strict";var Je=Kt(),Vn={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Dn={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Wn={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Qt={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},qe={};qe[Je.ForwardRef]=Wn;qe[Je.Memo]=Qt;function Xt(r){return Je.isMemo(r)?Qt:qe[r.$$typeof]||Vn}var Bn=Object.defineProperty,zn=Object.getOwnPropertyNames,Yt=Object.getOwnPropertySymbols,$n=Object.getOwnPropertyDescriptor,Un=Object.getPrototypeOf,Zt=Object.prototype;function er(r,e,n){if(typeof e!="string"){if(Zt){var t=Un(e);t&&t!==Zt&&er(r,t,n)}var i=zn(e);Yt&&(i=i.concat(Yt(e)));for(var o=Xt(r),a=Xt(e),s=0;s<i.length;++s){var f=i[s];if(!Dn[f]&&!(n&&n[f])&&!(a&&a[f])&&!(o&&o[f])){var u=$n(e,f);try{Bn(r,f,u)}catch{}}}}return r}tr.exports=er});var rr=ce(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.default=Jn;function Jn(r){return r.displayName||r.name||(typeof r=="string"&&r.length>0?r:"Unknown")}});function Ht(r){var e,n,t="";if(typeof r=="string"||typeof r=="number")t+=r;else if(typeof r=="object")if(Array.isArray(r)){var i=r.length;for(e=0;e<i;e++)r[e]&&(n=Ht(r[e]))&&(t&&(t+=" "),t+=n)}else for(n in r)r[n]&&(t&&(t+=" "),t+=n);return t}function In(){for(var r,e,n=0,t="",i=arguments.length;n<i;n++)(r=arguments[n])&&(e=Ht(r))&&(t&&(t+=" "),t+=e);return t}var g=In;import{useMemo as pn}from"react";function x(){return x=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var t in n)({}).hasOwnProperty.call(n,t)&&(r[t]=n[t])}return r},x.apply(null,arguments)}function de(r,e){if(r==null)return{};var n={};for(var t in r)if({}.hasOwnProperty.call(r,t)){if(e.indexOf(t)!==-1)continue;n[t]=r[t]}return n}var la=$e(Ke());import na,{createContext as ia,useRef as oa,useContext as tn,useMemo as rn,useEffect as ln,useLayoutEffect as aa,useDebugValue as nn,forwardRef as df,createElement as sa}from"react";import H,{createContext as qn}from"react";var Hn=!0;function Gn(r,e){if(!Hn){if(r)return;var n="Warning: "+e;typeof console<"u"&&console.warn(n);try{throw Error(n)}catch{}}}var Xe=Gn;var nr=$e(Ke()),Cs=$e(rr());function we(r,e,n){return e in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function Re(){return Re=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=n[t])}return r},Re.apply(this,arguments)}function Kn(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.__proto__=e}function D(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Xn(r){var e=function(n){Kn(t,n);function t(){for(var o,a=arguments.length,s=new Array(a),f=0;f<a;f++)s[f]=arguments[f];return o=n.call.apply(n,[this].concat(s))||this,we(D(D(o)),"cachedTheme",void 0),we(D(D(o)),"lastOuterTheme",void 0),we(D(D(o)),"lastTheme",void 0),we(D(D(o)),"renderProvider",function(u){var c=o.props.children;return H.createElement(r.Provider,{value:o.getTheme(u)},c)}),o}var i=t.prototype;return i.getTheme=function(a){if(this.props.theme!==this.lastTheme||a!==this.lastOuterTheme||!this.cachedTheme)if(this.lastOuterTheme=a,this.lastTheme=this.props.theme,typeof this.lastTheme=="function"){var s=this.props.theme;this.cachedTheme=s(a)}else{var f=this.props.theme;this.cachedTheme=a?Re({},a,f):f}return this.cachedTheme},i.render=function(){var a=this.props.children;return a?H.createElement(r.Consumer,null,this.renderProvider):null},t}(H.Component);return e}function Yn(r){return function(n){var t=H.forwardRef(function(i,o){return H.createElement(r.Consumer,null,function(a){return H.createElement(n,Re({theme:a,ref:o},i))})});return(0,nr.default)(t,n),t}}function Zn(r){var e=function(){var t=H.useContext(r);return t};return e}function ir(r){return{context:r,withTheme:Yn(r),useTheme:Zn(r),ThemeProvider:Xn(r)}}var Ze=qn(),Qe=ir(Ze),Qn=Qe.withTheme,ei=Qe.ThemeProvider,ti=Qe.useTheme;var or=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ri=(typeof window>"u"?"undefined":or(window))==="object"&&(typeof document>"u"?"undefined":or(document))==="object"&&document.nodeType===9,M=ri;function G(r){"@babel/helpers - typeof";return G=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(r)}function ar(r,e){if(G(r)!="object"||!r)return r;var n=r[Symbol.toPrimitive];if(n!==void 0){var t=n.call(r,e||"default");if(G(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function sr(r){var e=ar(r,"string");return G(e)=="symbol"?e:e+""}function lr(r,e){for(var n=0;n<e.length;n++){var t=e[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,sr(t.key),t)}}function ke(r,e,n){return e&&lr(r.prototype,e),n&&lr(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}function Ce(r,e){return Ce=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,t){return n.__proto__=t,n},Ce(r,e)}function et(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,Ce(r,e)}function tt(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}var ni={}.constructor;function it(r){if(r==null||typeof r!="object")return r;if(Array.isArray(r))return r.map(it);if(r.constructor!==ni)return r;var e={};for(var n in r)e[n]=it(r[n]);return e}function X(r,e,n){r===void 0&&(r="unnamed");var t=n.jss,i=it(e),o=t.plugins.onCreateRule(r,i,n);return o||(r[0],null)}var fr=function(e,n){for(var t="",i=0;i<e.length&&e[i]!=="!important";i++)t&&(t+=n),t+=e[i];return t},W=function(e){if(!Array.isArray(e))return e;var n="";if(Array.isArray(e[0]))for(var t=0;t<e.length&&e[t]!=="!important";t++)n&&(n+=", "),n+=fr(e[t]," ");else n=fr(e,", ");return e[e.length-1]==="!important"&&(n+=" !important"),n};function Y(r){return r&&r.format===!1?{linebreak:"",space:""}:{linebreak:`
3
+ `,space:" "}}function te(r,e){for(var n="",t=0;t<e;t++)n+=" ";return n+r}function ne(r,e,n){n===void 0&&(n={});var t="";if(!e)return t;var i=n,o=i.indent,a=o===void 0?0:o,s=e.fallbacks;n.format===!1&&(a=-1/0);var f=Y(n),u=f.linebreak,c=f.space;if(r&&a++,s)if(Array.isArray(s))for(var d=0;d<s.length;d++){var p=s[d];for(var m in p){var y=p[m];y!=null&&(t&&(t+=u),t+=te(m+":"+c+W(y)+";",a))}}else for(var v in s){var R=s[v];R!=null&&(t&&(t+=u),t+=te(v+":"+c+W(R)+";",a))}for(var C in e){var P=e[C];P!=null&&C!=="fallbacks"&&(t&&(t+=u),t+=te(C+":"+c+W(P)+";",a))}return!t&&!n.allowEmpty||!r?t:(a--,t&&(t=""+u+t+u),te(""+r+c+"{"+t,a)+te("}",a))}var ii=/([[\].#*$><+~=|^:(),"'`\s])/g,ur=typeof CSS<"u"&&CSS.escape,ct=function(r){return ur?ur(r):r.replace(ii,"\\$1")},gr=function(){function r(n,t,i){this.type="style",this.isProcessed=!1;var o=i.sheet,a=i.Renderer;this.key=n,this.options=i,this.style=t,o?this.renderer=o.renderer:a&&(this.renderer=new a)}var e=r.prototype;return e.prop=function(t,i,o){if(i===void 0)return this.style[t];var a=o?o.force:!1;if(!a&&this.style[t]===i)return this;var s=i;(!o||o.process!==!1)&&(s=this.options.jss.plugins.onChangeValue(i,t,this));var f=s==null||s===!1,u=t in this.style;if(f&&!u&&!a)return this;var c=f&&u;if(c?delete this.style[t]:this.style[t]=s,this.renderable&&this.renderer)return c?this.renderer.removeProperty(this.renderable,t):this.renderer.setProperty(this.renderable,t,s),this;var d=this.options.sheet;return d&&d.attached,this},r}(),ot=function(r){et(e,r);function e(t,i,o){var a;a=r.call(this,t,i,o)||this;var s=o.selector,f=o.scoped,u=o.sheet,c=o.generateId;return s?a.selectorText=s:f!==!1&&(a.id=c(tt(tt(a)),u),a.selectorText="."+ct(a.id)),a}var n=e.prototype;return n.applyTo=function(i){var o=this.renderer;if(o){var a=this.toJSON();for(var s in a)o.setProperty(i,s,a[s])}return this},n.toJSON=function(){var i={};for(var o in this.style){var a=this.style[o];typeof a!="object"?i[o]=a:Array.isArray(a)&&(i[o]=W(a))}return i},n.toString=function(i){var o=this.options.sheet,a=o?o.options.link:!1,s=a?x({},i,{allowEmpty:!0}):i;return ne(this.selectorText,this.style,s)},ke(e,[{key:"selector",set:function(i){if(i!==this.selectorText){this.selectorText=i;var o=this.renderer,a=this.renderable;if(!(!a||!o)){var s=o.setSelector(a,i);s||o.replaceRule(a,this)}}},get:function(){return this.selectorText}}]),e}(gr),oi={onCreateRule:function(e,n,t){return e[0]==="@"||t.parent&&t.parent.type==="keyframes"?null:new ot(e,n,t)}},rt={indent:1,children:!0},ai=/@([\w-]+)/,si=function(){function r(n,t,i){this.type="conditional",this.isProcessed=!1,this.key=n;var o=n.match(ai);this.at=o?o[1]:"unknown",this.query=i.name||"@"+this.at,this.options=i,this.rules=new ie(x({},i,{parent:this}));for(var a in t)this.rules.add(a,t[a]);this.rules.process()}var e=r.prototype;return e.getRule=function(t){return this.rules.get(t)},e.indexOf=function(t){return this.rules.indexOf(t)},e.addRule=function(t,i,o){var a=this.rules.add(t,i,o);return a?(this.options.jss.plugins.onProcessRule(a),a):null},e.replaceRule=function(t,i,o){var a=this.rules.replace(t,i,o);return a&&this.options.jss.plugins.onProcessRule(a),a},e.toString=function(t){t===void 0&&(t=rt);var i=Y(t),o=i.linebreak;if(t.indent==null&&(t.indent=rt.indent),t.children==null&&(t.children=rt.children),t.children===!1)return this.query+" {}";var a=this.rules.toString(t);return a?this.query+" {"+o+a+o+"}":""},r}(),li=/@container|@media|@supports\s+/,fi={onCreateRule:function(e,n,t){return li.test(e)?new si(e,n,t):null}},nt={indent:1,children:!0},ui=/@keyframes\s+([\w-]+)/,at=function(){function r(n,t,i){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var o=n.match(ui);o&&o[1]?this.name=o[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=i;var a=i.scoped,s=i.sheet,f=i.generateId;this.id=a===!1?this.name:ct(f(this,s)),this.rules=new ie(x({},i,{parent:this}));for(var u in t)this.rules.add(u,t[u],x({},i,{parent:this}));this.rules.process()}var e=r.prototype;return e.toString=function(t){t===void 0&&(t=nt);var i=Y(t),o=i.linebreak;if(t.indent==null&&(t.indent=nt.indent),t.children==null&&(t.children=nt.children),t.children===!1)return this.at+" "+this.id+" {}";var a=this.rules.toString(t);return a&&(a=""+o+a+o),this.at+" "+this.id+" {"+a+"}"},r}(),ci=/@keyframes\s+/,di=/\$([\w-]+)/g,st=function(e,n){return typeof e=="string"?e.replace(di,function(t,i){return i in n?n[i]:t}):e},cr=function(e,n,t){var i=e[n],o=st(i,t);o!==i&&(e[n]=o)},hi={onCreateRule:function(e,n,t){return typeof e=="string"&&ci.test(e)?new at(e,n,t):null},onProcessStyle:function(e,n,t){return n.type!=="style"||!t||("animation-name"in e&&cr(e,"animation-name",t.keyframes),"animation"in e&&cr(e,"animation",t.keyframes)),e},onChangeValue:function(e,n,t){var i=t.options.sheet;if(!i)return e;switch(n){case"animation":return st(e,i.keyframes);case"animation-name":return st(e,i.keyframes);default:return e}}},pi=function(r){et(e,r);function e(){return r.apply(this,arguments)||this}var n=e.prototype;return n.toString=function(i){var o=this.options.sheet,a=o?o.options.link:!1,s=a?x({},i,{allowEmpty:!0}):i;return ne(this.key,this.style,s)},e}(gr),mi={onCreateRule:function(e,n,t){return t.parent&&t.parent.type==="keyframes"?new pi(e,n,t):null}},vi=function(){function r(n,t,i){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=n,this.style=t,this.options=i}var e=r.prototype;return e.toString=function(t){var i=Y(t),o=i.linebreak;if(Array.isArray(this.style)){for(var a="",s=0;s<this.style.length;s++)a+=ne(this.at,this.style[s]),this.style[s+1]&&(a+=o);return a}return ne(this.at,this.style,t)},r}(),gi=/@font-face/,yi={onCreateRule:function(e,n,t){return gi.test(e)?new vi(e,n,t):null}},bi=function(){function r(n,t,i){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=n,this.style=t,this.options=i}var e=r.prototype;return e.toString=function(t){return ne(this.key,this.style,t)},r}(),xi={onCreateRule:function(e,n,t){return e==="@viewport"||e==="@-ms-viewport"?new bi(e,n,t):null}},Si=function(){function r(n,t,i){this.type="simple",this.isProcessed=!1,this.key=n,this.value=t,this.options=i}var e=r.prototype;return e.toString=function(t){if(Array.isArray(this.value)){for(var i="",o=0;o<this.value.length;o++)i+=this.key+" "+this.value[o]+";",this.value[o+1]&&(i+=`
4
+ `);return i}return this.key+" "+this.value+";"},r}(),Pi={"@charset":!0,"@import":!0,"@namespace":!0},wi={onCreateRule:function(e,n,t){return e in Pi?new Si(e,n,t):null}},dr=[oi,fi,hi,mi,yi,xi,wi],Ri={process:!0},hr={force:!0,process:!0},ie=function(){function r(n){this.map={},this.raw={},this.index=[],this.counter=0,this.options=n,this.classes=n.classes,this.keyframes=n.keyframes}var e=r.prototype;return e.add=function(t,i,o){var a=this.options,s=a.parent,f=a.sheet,u=a.jss,c=a.Renderer,d=a.generateId,p=a.scoped,m=x({classes:this.classes,parent:s,sheet:f,jss:u,Renderer:c,generateId:d,scoped:p,name:t,keyframes:this.keyframes,selector:void 0},o),y=t;t in this.raw&&(y=t+"-d"+this.counter++),this.raw[y]=i,y in this.classes&&(m.selector="."+ct(this.classes[y]));var v=X(y,i,m);if(!v)return null;this.register(v);var R=m.index===void 0?this.index.length:m.index;return this.index.splice(R,0,v),v},e.replace=function(t,i,o){var a=this.get(t),s=this.index.indexOf(a);a&&this.remove(a);var f=o;return s!==-1&&(f=x({},o,{index:s})),this.add(t,i,f)},e.get=function(t){return this.map[t]},e.remove=function(t){this.unregister(t),delete this.raw[t.key],this.index.splice(this.index.indexOf(t),1)},e.indexOf=function(t){return this.index.indexOf(t)},e.process=function(){var t=this.options.jss.plugins;this.index.slice(0).forEach(t.onProcessRule,t)},e.register=function(t){this.map[t.key]=t,t instanceof ot?(this.map[t.selector]=t,t.id&&(this.classes[t.key]=t.id)):t instanceof at&&this.keyframes&&(this.keyframes[t.name]=t.id)},e.unregister=function(t){delete this.map[t.key],t instanceof ot?(delete this.map[t.selector],delete this.classes[t.key]):t instanceof at&&delete this.keyframes[t.name]},e.update=function(){var t,i,o;if(typeof(arguments.length<=0?void 0:arguments[0])=="string"?(t=arguments.length<=0?void 0:arguments[0],i=arguments.length<=1?void 0:arguments[1],o=arguments.length<=2?void 0:arguments[2]):(i=arguments.length<=0?void 0:arguments[0],o=arguments.length<=1?void 0:arguments[1],t=null),t)this.updateOne(this.get(t),i,o);else for(var a=0;a<this.index.length;a++)this.updateOne(this.index[a],i,o)},e.updateOne=function(t,i,o){o===void 0&&(o=Ri);var a=this.options,s=a.jss.plugins,f=a.sheet;if(t.rules instanceof r){t.rules.update(i,o);return}var u=t.style;if(s.onUpdate(i,t,f,o),o.process&&u&&u!==t.style){s.onProcessStyle(t.style,t,f);for(var c in t.style){var d=t.style[c],p=u[c];d!==p&&t.prop(c,d,hr)}for(var m in u){var y=t.style[m],v=u[m];y==null&&y!==v&&t.prop(m,null,hr)}}},e.toString=function(t){for(var i="",o=this.options.sheet,a=o?o.options.link:!1,s=Y(t),f=s.linebreak,u=0;u<this.index.length;u++){var c=this.index[u],d=c.toString(t);!d&&!a||(i&&(i+=f),i+=d)}return i},r}(),yr=function(){function r(n,t){this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=x({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new ie(this.options);for(var i in n)this.rules.add(i,n[i]);this.rules.process()}var e=r.prototype;return e.attach=function(){return this.attached?this:(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy(),this)},e.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},e.addRule=function(t,i,o){var a=this.queue;this.attached&&!a&&(this.queue=[]);var s=this.rules.add(t,i,o);return s?(this.options.jss.plugins.onProcessRule(s),this.attached?(this.deployed&&(a?a.push(s):(this.insertRule(s),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0))),s):(this.deployed=!1,s)):null},e.replaceRule=function(t,i,o){var a=this.rules.get(t);if(!a)return this.addRule(t,i,o);var s=this.rules.replace(t,i,o);return s&&this.options.jss.plugins.onProcessRule(s),this.attached?(this.deployed&&this.renderer&&(s?a.renderable&&this.renderer.replaceRule(a.renderable,s):this.renderer.deleteRule(a)),s):(this.deployed=!1,s)},e.insertRule=function(t){this.renderer&&this.renderer.insertRule(t)},e.addRules=function(t,i){var o=[];for(var a in t){var s=this.addRule(a,t[a],i);s&&o.push(s)}return o},e.getRule=function(t){return this.rules.get(t)},e.deleteRule=function(t){var i=typeof t=="object"?t:this.rules.get(t);return!i||this.attached&&!i.renderable?!1:(this.rules.remove(i),this.attached&&i.renderable&&this.renderer?this.renderer.deleteRule(i.renderable):!0)},e.indexOf=function(t){return this.rules.indexOf(t)},e.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},e.update=function(){var t;return(t=this.rules).update.apply(t,arguments),this},e.updateOne=function(t,i,o){return this.rules.updateOne(t,i,o),this},e.toString=function(t){return this.rules.toString(t)},r}(),ki=function(){function r(){this.plugins={internal:[],external:[]},this.registry={}}var e=r.prototype;return e.onCreateRule=function(t,i,o){for(var a=0;a<this.registry.onCreateRule.length;a++){var s=this.registry.onCreateRule[a](t,i,o);if(s)return s}return null},e.onProcessRule=function(t){if(!t.isProcessed){for(var i=t.options.sheet,o=0;o<this.registry.onProcessRule.length;o++)this.registry.onProcessRule[o](t,i);t.style&&this.onProcessStyle(t.style,t,i),t.isProcessed=!0}},e.onProcessStyle=function(t,i,o){for(var a=0;a<this.registry.onProcessStyle.length;a++)i.style=this.registry.onProcessStyle[a](i.style,i,o)},e.onProcessSheet=function(t){for(var i=0;i<this.registry.onProcessSheet.length;i++)this.registry.onProcessSheet[i](t)},e.onUpdate=function(t,i,o,a){for(var s=0;s<this.registry.onUpdate.length;s++)this.registry.onUpdate[s](t,i,o,a)},e.onChangeValue=function(t,i,o){for(var a=t,s=0;s<this.registry.onChangeValue.length;s++)a=this.registry.onChangeValue[s](a,i,o);return a},e.use=function(t,i){i===void 0&&(i={queue:"external"});var o=this.plugins[i.queue];o.indexOf(t)===-1&&(o.push(t),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce(function(a,s){for(var f in s)f in a&&a[f].push(s[f]);return a},{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},r}(),Ci=function(){function r(){this.registry=[]}var e=r.prototype;return e.add=function(t){var i=this.registry,o=t.options.index;if(i.indexOf(t)===-1){if(i.length===0||o>=this.index){i.push(t);return}for(var a=0;a<i.length;a++)if(i[a].options.index>o){i.splice(a,0,t);return}}},e.reset=function(){this.registry=[]},e.remove=function(t){var i=this.registry.indexOf(t);this.registry.splice(i,1)},e.toString=function(t){for(var i=t===void 0?{}:t,o=i.attached,a=de(i,["attached"]),s=Y(a),f=s.linebreak,u="",c=0;c<this.registry.length;c++){var d=this.registry[c];o!=null&&d.attached!==o||(u&&(u+=f),u+=d.toString(a))}return u},ke(r,[{key:"index",get:function(){return this.registry.length===0?0:this.registry[this.registry.length-1].options.index}}]),r}(),re=new Ci,lt=typeof globalThis<"u"?globalThis:typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")(),ft="2f1acc6c3a606b082e5eef5e54414ffb";lt[ft]==null&&(lt[ft]=0);var pr=lt[ft]++,Ni=1e10,ut=function(e){e===void 0&&(e={});var n=0,t=function(o,a){n+=1,n>Ni;var s="",f="";return a&&(a.options.classNamePrefix&&(f=a.options.classNamePrefix),a.options.jss.id!=null&&(s=String(a.options.jss.id))),e.minify?""+(f||"c")+pr+s+n:f+o.key+"-"+pr+(s?"-"+s:"")+"-"+n};return t},br=function(e){var n;return function(){return n||(n=e()),n}},Oi=function(e,n){try{return e.attributeStyleMap?e.attributeStyleMap.get(n):e.style.getPropertyValue(n)}catch{return""}},Ti=function(e,n,t){try{var i=t;if(Array.isArray(t)&&(i=W(t)),e.attributeStyleMap)e.attributeStyleMap.set(n,i);else{var o=i?i.indexOf("!important"):-1,a=o>-1?i.substr(0,o-1):i;e.style.setProperty(n,a,o>-1?"important":"")}}catch{return!1}return!0},Ei=function(e,n){try{e.attributeStyleMap?e.attributeStyleMap.delete(n):e.style.removeProperty(n)}catch{}},Ai=function(e,n){return e.selectorText=n,e.selectorText===n},xr=br(function(){return document.querySelector("head")});function Ii(r,e){for(var n=0;n<r.length;n++){var t=r[n];if(t.attached&&t.options.index>e.index&&t.options.insertionPoint===e.insertionPoint)return t}return null}function _i(r,e){for(var n=r.length-1;n>=0;n--){var t=r[n];if(t.attached&&t.options.insertionPoint===e.insertionPoint)return t}return null}function ji(r){for(var e=xr(),n=0;n<e.childNodes.length;n++){var t=e.childNodes[n];if(t.nodeType===8&&t.nodeValue.trim()===r)return t}return null}function Mi(r){var e=re.registry;if(e.length>0){var n=Ii(e,r);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=_i(e,r),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var t=r.insertionPoint;if(t&&typeof t=="string"){var i=ji(t);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}function Fi(r,e){var n=e.insertionPoint,t=Mi(e);if(t!==!1&&t.parent){t.parent.insertBefore(r,t.node);return}if(n&&typeof n.nodeType=="number"){var i=n,o=i.parentNode;o&&o.insertBefore(r,i.nextSibling);return}xr().appendChild(r)}var Li=br(function(){var r=document.querySelector('meta[property="csp-nonce"]');return r?r.getAttribute("content"):null}),mr=function(e,n,t){try{"insertRule"in e?e.insertRule(n,t):"appendRule"in e&&e.appendRule(n)}catch{return!1}return e.cssRules[t]},vr=function(e,n){var t=e.cssRules.length;return n===void 0||n>t?t:n},Vi=function(){var e=document.createElement("style");return e.textContent=`
5
+ `,e},Di=function(){function r(n){this.getPropertyValue=Oi,this.setProperty=Ti,this.removeProperty=Ei,this.setSelector=Ai,this.hasInsertedRules=!1,this.cssRules=[],n&&re.add(n),this.sheet=n;var t=this.sheet?this.sheet.options:{},i=t.media,o=t.meta,a=t.element;this.element=a||Vi(),this.element.setAttribute("data-jss",""),i&&this.element.setAttribute("media",i),o&&this.element.setAttribute("data-meta",o);var s=Li();s&&this.element.setAttribute("nonce",s)}var e=r.prototype;return e.attach=function(){if(!(this.element.parentNode||!this.sheet)){Fi(this.element,this.sheet.options);var t=!!(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&t&&(this.hasInsertedRules=!1,this.deploy())}},e.detach=function(){if(this.sheet){var t=this.element.parentNode;t&&t.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent=`
6
6
  `)}},e.deploy=function(){var t=this.sheet;if(t){if(t.options.link){this.insertRules(t.rules);return}this.element.textContent=`
7
7
  `+t.toString()+`
8
- `}},e.insertRules=function(t,i){for(var o=0;o<t.index.length;o++)this.insertRule(t.index[o],o,i)},e.insertRule=function(t,i,o){if(o===void 0&&(o=this.element.sheet),t.rules){var a=t,s=o;if(t.type==="conditional"||t.type==="keyframes"){var f=pr(o,i);if(s=hr(o,a.toString({children:!1}),f),s===!1)return!1;this.refCssRule(t,f,s)}return this.insertRules(a.rules,s),s}var u=t.toString();if(!u)return!1;var c=pr(o,i),d=hr(o,u,c);return d===!1?!1:(this.hasInsertedRules=!0,this.refCssRule(t,c,d),d)},e.refCssRule=function(t,i,o){t.renderable=o,t.options.parent instanceof vr&&this.cssRules.splice(i,0,o)},e.deleteRule=function(t){var i=this.element.sheet,o=this.indexOf(t);return o===-1?!1:(i.deleteRule(o),this.cssRules.splice(o,1),!0)},e.indexOf=function(t){return this.cssRules.indexOf(t)},e.replaceRule=function(t,i){var o=this.indexOf(t);return o===-1?!1:(this.element.sheet.deleteRule(o),this.cssRules.splice(o,1),this.insertRule(i,o))},e.getRules=function(){return this.element.sheet.cssRules},r}(),Di=0,Wi=function(){function r(n){this.id=Di++,this.version="10.10.0",this.plugins=new Ri,this.options={id:{minify:!1},createGenerateId:lt,Renderer:j?Vi:null,plugins:[]},this.generateId=lt({minify:!1});for(var t=0;t<ur.length;t++)this.plugins.use(ur[t],{queue:"internal"});this.setup(n)}var e=r.prototype;return e.setup=function(t){return t===void 0&&(t={}),t.createGenerateId&&(this.options.createGenerateId=t.createGenerateId),t.id&&(this.options.id=S({},this.options.id,t.id)),(t.createGenerateId||t.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),t.insertionPoint!=null&&(this.options.insertionPoint=t.insertionPoint),"Renderer"in t&&(this.options.Renderer=t.Renderer),t.plugins&&this.use.apply(this,t.plugins),this},e.createStyleSheet=function(t,i){i===void 0&&(i={});var o=i,a=o.index;typeof a!="number"&&(a=te.index===0?0:te.index+1);var s=new vr(t,S({},i,{jss:this,generateId:i.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:a}));return this.plugins.onProcessSheet(s),s},e.removeStyleSheet=function(t){return t.detach(),te.remove(t),this},e.createRule=function(t,i,o){if(i===void 0&&(i={}),o===void 0&&(o={}),typeof t=="object")return this.createRule(void 0,t,i);var a=S({},o,{name:t,jss:this,Renderer:this.options.Renderer});a.generateId||(a.generateId=this.generateId),a.classes||(a.classes={}),a.keyframes||(a.keyframes={});var s=K(t,i,a);return s&&this.plugins.onProcessRule(s),s},e.use=function(){for(var t=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return o.forEach(function(s){t.plugins.use(s)}),this},r}(),ie=function(e){return new Wi(e)},ut=function(){function r(){this.length=0,this.sheets=new WeakMap}var e=r.prototype;return e.get=function(t){var i=this.sheets.get(t);return i&&i.sheet},e.add=function(t,i){this.sheets.has(t)||(this.length++,this.sheets.set(t,{sheet:i,refs:0}))},e.manage=function(t){var i=this.sheets.get(t);if(i)return i.refs===0&&i.sheet.attach(),i.refs++,i.sheet;qe(!1,"[JSS] SheetsManager: can't find sheet to manage")},e.unmanage=function(t){var i=this.sheets.get(t);i?i.refs>0&&(i.refs--,i.refs===0&&i.sheet.detach()):qe(!1,"SheetsManager: can't find sheet to unmanage")},Re(r,[{key:"size",get:function(){return this.length}}]),r}(),Ce=typeof CSS=="object"&&CSS!=null&&"number"in CSS;function ct(r){var e=null;for(var n in r){var t=r[n],i=typeof t;if(i==="function")e||(e={}),e[n]=t;else if(i==="object"&&t!==null&&!Array.isArray(t)){var o=ct(t);o&&(e||(e={}),e[n]=o)}}return e}var qs=ie();var br=Date.now(),dt="fnValues"+br,ht="fnStyle"+ ++br,zi=function(){return{onCreateRule:function(n,t,i){if(typeof t!="function")return null;var o=K(n,{},i);return o[ht]=t,o},onProcessStyle:function(n,t){if(dt in t||ht in t)return n;var i={};for(var o in n){var a=n[o];typeof a=="function"&&(delete n[o],i[o]=a)}return t[dt]=i,n},onUpdate:function(n,t,i,o){var a=t,s=a[ht];if(s&&(a.style=s(n)||{},0))for(var f in a.style);var u=a[dt];if(u)for(var c in u)a.prop(c,u[c](n),o)}}},xr=zi;function pt(r){var e,n=r.Symbol;return typeof n=="function"?n.observable?e=n.observable:(e=n("observable"),n.observable=e):e="@@observable",e}var Y;typeof self<"u"?Y=self:typeof window<"u"?Y=window:typeof global<"u"?Y=global:typeof module<"u"?Y=module:Y=Function("return this")();var Bi=pt(Y),mt=Bi;var Sr=function(e){return e&&e[mt]&&e===e[mt]()},$i=function(e){return{onCreateRule:function(t,i,o){if(!Sr(i))return null;var a=i,s=K(t,{},o);return a.subscribe(function(f){for(var u in f)s.prop(u,f[u],e)}),s},onProcessRule:function(t){if(!(t&&t.type!=="style")){var i=t,o=i.style,a=function(c){var d=o[c];if(!Sr(d))return"continue";delete o[c],d.subscribe({next:function(m){i.prop(c,m,e)}})};for(var s in o)var f=a(s)}}}},Pr=$i;var Ui=/;\n/,Hi=function(e){for(var n={},t=e.split(Ui),i=0;i<t.length;i++){var o=(t[i]||"").trim();if(o){var a=o.indexOf(":");if(a!==-1){var s=o.substr(0,a).trim(),f=o.substr(a+1).trim();n[s]=f}}}return n},Gi=function(e){typeof e.style=="string"&&(e.style=Hi(e.style))};function Ji(){return{onProcessRule:Gi}}var wr=Ji;var D="@global",vt="@global ",qi=function(){function r(n,t,i){this.type="global",this.at=D,this.isProcessed=!1,this.key=n,this.options=i,this.rules=new ne(S({},i,{parent:this}));for(var o in t)this.rules.add(o,t[o]);this.rules.process()}var e=r.prototype;return e.getRule=function(t){return this.rules.get(t)},e.addRule=function(t,i,o){var a=this.rules.add(t,i,o);return a&&this.options.jss.plugins.onProcessRule(a),a},e.replaceRule=function(t,i,o){var a=this.rules.replace(t,i,o);return a&&this.options.jss.plugins.onProcessRule(a),a},e.indexOf=function(t){return this.rules.indexOf(t)},e.toString=function(t){return this.rules.toString(t)},r}(),Ki=function(){function r(n,t,i){this.type="global",this.at=D,this.isProcessed=!1,this.key=n,this.options=i;var o=n.substr(vt.length);this.rule=i.jss.createRule(o,t,S({},i,{parent:this}))}var e=r.prototype;return e.toString=function(t){return this.rule?this.rule.toString(t):""},r}(),Xi=/\s*,\s*/g;function Rr(r,e){for(var n=r.split(Xi),t="",i=0;i<n.length;i++)t+=e+" "+n[i].trim(),n[i+1]&&(t+=", ");return t}function Yi(r,e){var n=r.options,t=r.style,i=t?t[D]:null;if(i){for(var o in i)e.addRule(o,i[o],S({},n,{selector:Rr(o,r.selector)}));delete t[D]}}function Zi(r,e){var n=r.options,t=r.style;for(var i in t)if(!(i[0]!=="@"||i.substr(0,D.length)!==D)){var o=Rr(i.substr(D.length),r.selector);e.addRule(o,t[i],S({},n,{selector:o})),delete t[i]}}function Qi(){function r(n,t,i){if(!n)return null;if(n===D)return new qi(n,t,i);if(n[0]==="@"&&n.substr(0,vt.length)===vt)return new Ki(n,t,i);var o=i.parent;return o&&(o.type==="global"||o.options.parent&&o.options.parent.type==="global")&&(i.scoped=!1),!i.selector&&i.scoped===!1&&(i.selector=n),null}function e(n,t){n.type!=="style"||!t||(Yi(n,t),Zi(n,t))}return{onCreateRule:r,onProcessRule:e}}var kr=Qi;var Ne=function(e){return e&&typeof e=="object"&&!Array.isArray(e)},gt="extendCurrValue"+Date.now();function eo(r,e,n,t){var i=typeof r.extend;if(i==="string"){if(!n)return;var o=n.getRule(r.extend);if(!o||o===e)return;var a=o.options.parent;if(a){var s=a.rules.raw[r.extend];G(s,e,n,t)}return}if(Array.isArray(r.extend)){for(var f=0;f<r.extend.length;f++){var u=r.extend[f],c=typeof u=="string"?S({},r,{extend:u}):r.extend[f];G(c,e,n,t)}return}for(var d in r.extend){if(d==="extend"){G(r.extend.extend,e,n,t);continue}if(Ne(r.extend[d])){d in t||(t[d]={}),G(r.extend[d],e,n,t[d]);continue}t[d]=r.extend[d]}}function to(r,e,n,t){for(var i in r)if(i!=="extend"){if(Ne(t[i])&&Ne(r[i])){G(r[i],e,n,t[i]);continue}if(Ne(r[i])){t[i]=G(r[i],e,n);continue}t[i]=r[i]}}function G(r,e,n,t){return t===void 0&&(t={}),eo(r,e,n,t),to(r,e,n,t),t}function ro(){function r(n,t,i){return"extend"in n?G(n,t,i):n}function e(n,t,i){if(t!=="extend")return n;if(n==null||n===!1){for(var o in i[gt])i.prop(o,null);return i[gt]=null,null}if(typeof n=="object"){for(var a in n)i.prop(a,n[a]);i[gt]=n}return null}return{onProcessStyle:r,onChangeValue:e}}var Cr=ro;var Nr=/\s*,\s*/g,no=/&/g,io=/\$([\w-]+)/g;function oo(){function r(i,o){return function(a,s){var f=i.getRule(s)||o&&o.getRule(s);return f?f.selector:s}}function e(i,o){for(var a=o.split(Nr),s=i.split(Nr),f="",u=0;u<a.length;u++)for(var c=a[u],d=0;d<s.length;d++){var p=s[d];f&&(f+=", "),f+=p.indexOf("&")!==-1?p.replace(no,c):c+" "+p}return f}function n(i,o,a){if(a)return S({},a,{index:a.index+1});var s=i.options.nestingLevel;s=s===void 0?1:s+1;var f=S({},i.options,{nestingLevel:s,index:o.indexOf(i)+1});return delete f.name,f}function t(i,o,a){if(o.type!=="style")return i;var s=o,f=s.options.parent,u,c;for(var d in i){var p=d.indexOf("&")!==-1,m=d[0]==="@";if(!(!p&&!m)){if(u=n(s,f,u),p){var y=e(d,s.selector);c||(c=r(f,a)),y=y.replace(io,c);var v=s.key+"-"+d;"replaceRule"in f?f.replaceRule(v,i[d],S({},u,{selector:y})):f.addRule(v,i[d],S({},u,{selector:y}))}else m&&f.addRule(d,{},u).addRule(s.key,i[d],{selector:s.selector});delete i[d]}}return i}return{onProcessStyle:t}}var Or=oo;function yt(r,e){if(!e)return!0;if(Array.isArray(e)){for(var n=0;n<e.length;n++){var t=yt(r,e[n]);if(!t)return!1}return!0}if(e.indexOf(" ")>-1)return yt(r,e.split(" "));var i=r.options.parent;if(e[0]==="$"){var o=i.getRule(e.substr(1));return!o||o===r?!1:(i.classes[r.key]+=" "+i.classes[o.key],!0)}return i.classes[r.key]+=" "+e,!0}function ao(){function r(e,n){return"composes"in e&&(yt(n,e.composes),delete e.composes),e}return{onProcessStyle:r}}var Tr=ao;var so=/[A-Z]/g,lo=/^ms-/,bt={};function fo(r){return"-"+r.toLowerCase()}function uo(r){if(bt.hasOwnProperty(r))return bt[r];var e=r.replace(so,fo);return bt[r]=lo.test(e)?"-"+e:e}var xt=uo;function Oe(r){var e={};for(var n in r){var t=n.indexOf("--")===0?n:xt(n);e[t]=r[n]}return r.fallbacks&&(Array.isArray(r.fallbacks)?e.fallbacks=r.fallbacks.map(Oe):e.fallbacks=Oe(r.fallbacks)),e}function co(){function r(n){if(Array.isArray(n)){for(var t=0;t<n.length;t++)n[t]=Oe(n[t]);return n}return Oe(n)}function e(n,t,i){if(t.indexOf("--")===0)return n;var o=xt(t);return t===o?n:(i.prop(o,n),null)}return{onProcessStyle:r,onChangeValue:e}}var Er=co;var l=Ce&&CSS?CSS.px:"px",Te=Ce&&CSS?CSS.ms:"ms",Z=Ce&&CSS?CSS.percent:"%",ho={"animation-delay":Te,"animation-duration":Te,"background-position":l,"background-position-x":l,"background-position-y":l,"background-size":l,border:l,"border-bottom":l,"border-bottom-left-radius":l,"border-bottom-right-radius":l,"border-bottom-width":l,"border-left":l,"border-left-width":l,"border-radius":l,"border-right":l,"border-right-width":l,"border-top":l,"border-top-left-radius":l,"border-top-right-radius":l,"border-top-width":l,"border-width":l,"border-block":l,"border-block-end":l,"border-block-end-width":l,"border-block-start":l,"border-block-start-width":l,"border-block-width":l,"border-inline":l,"border-inline-end":l,"border-inline-end-width":l,"border-inline-start":l,"border-inline-start-width":l,"border-inline-width":l,"border-start-start-radius":l,"border-start-end-radius":l,"border-end-start-radius":l,"border-end-end-radius":l,margin:l,"margin-bottom":l,"margin-left":l,"margin-right":l,"margin-top":l,"margin-block":l,"margin-block-end":l,"margin-block-start":l,"margin-inline":l,"margin-inline-end":l,"margin-inline-start":l,padding:l,"padding-bottom":l,"padding-left":l,"padding-right":l,"padding-top":l,"padding-block":l,"padding-block-end":l,"padding-block-start":l,"padding-inline":l,"padding-inline-end":l,"padding-inline-start":l,"mask-position-x":l,"mask-position-y":l,"mask-size":l,height:l,width:l,"min-height":l,"max-height":l,"min-width":l,"max-width":l,bottom:l,left:l,top:l,right:l,inset:l,"inset-block":l,"inset-block-end":l,"inset-block-start":l,"inset-inline":l,"inset-inline-end":l,"inset-inline-start":l,"box-shadow":l,"text-shadow":l,"column-gap":l,"column-rule":l,"column-rule-width":l,"column-width":l,"font-size":l,"font-size-delta":l,"letter-spacing":l,"text-decoration-thickness":l,"text-indent":l,"text-stroke":l,"text-stroke-width":l,"word-spacing":l,motion:l,"motion-offset":l,outline:l,"outline-offset":l,"outline-width":l,perspective:l,"perspective-origin-x":Z,"perspective-origin-y":Z,"transform-origin":Z,"transform-origin-x":Z,"transform-origin-y":Z,"transform-origin-z":Z,"transition-delay":Te,"transition-duration":Te,"vertical-align":l,"flex-basis":l,"shape-margin":l,size:l,gap:l,grid:l,"grid-gap":l,"row-gap":l,"grid-row-gap":l,"grid-column-gap":l,"grid-template-rows":l,"grid-template-columns":l,"grid-auto-rows":l,"grid-auto-columns":l,"box-shadow-x":l,"box-shadow-y":l,"box-shadow-blur":l,"box-shadow-spread":l,"font-line-height":l,"text-shadow-x":l,"text-shadow-y":l,"text-shadow-blur":l};function Ir(r){var e=/(-[a-z])/g,n=function(a){return a[1].toUpperCase()},t={};for(var i in r)t[i]=r[i],t[i.replace(e,n)]=r[i];return t}var po=Ir(ho);function oe(r,e,n){if(e==null)return e;if(Array.isArray(e))for(var t=0;t<e.length;t++)e[t]=oe(r,e[t],n);else if(typeof e=="object")if(r==="fallbacks")for(var i in e)e[i]=oe(i,e[i],n);else for(var o in e)e[o]=oe(r+"-"+o,e[o],n);else if(typeof e=="number"&&isNaN(e)===!1){var a=n[r]||po[r];return a&&!(e===0&&a===l)?typeof a=="function"?a(e).toString():""+e+a:e.toString()}return e}function mo(r){r===void 0&&(r={});var e=Ir(r);function n(i,o){if(o.type!=="style")return i;for(var a in i)i[a]=oe(a,i[a],e);return i}function t(i,o){return oe(o,i,e)}return{onProcessStyle:n,onChangeValue:t}}var Ar=mo;var vo={"background-size":!0,"background-position":!0,border:!0,"border-bottom":!0,"border-left":!0,"border-top":!0,"border-right":!0,"border-radius":!0,"border-image":!0,"border-width":!0,"border-style":!0,"border-color":!0,"box-shadow":!0,flex:!0,margin:!0,padding:!0,outline:!0,"transform-origin":!0,transform:!0,transition:!0},go={position:!0,size:!0},Ee={padding:{top:0,right:0,bottom:0,left:0},margin:{top:0,right:0,bottom:0,left:0},background:{attachment:null,color:null,image:null,position:null,repeat:null},border:{width:null,style:null,color:null},"border-top":{width:null,style:null,color:null},"border-right":{width:null,style:null,color:null},"border-bottom":{width:null,style:null,color:null},"border-left":{width:null,style:null,color:null},outline:{width:null,style:null,color:null},"list-style":{type:null,position:null,image:null},transition:{property:null,duration:null,"timing-function":null,timingFunction:null,delay:null},animation:{name:null,duration:null,"timing-function":null,timingFunction:null,delay:null,"iteration-count":null,iterationCount:null,direction:null,"fill-mode":null,fillMode:null,"play-state":null,playState:null},"box-shadow":{x:0,y:0,blur:0,spread:0,color:null,inset:null},"text-shadow":{x:0,y:0,blur:null,color:null}},St={border:{radius:"border-radius",image:"border-image",width:"border-width",style:"border-style",color:"border-color"},"border-bottom":{width:"border-bottom-width",style:"border-bottom-style",color:"border-bottom-color"},"border-top":{width:"border-top-width",style:"border-top-style",color:"border-top-color"},"border-left":{width:"border-left-width",style:"border-left-style",color:"border-left-color"},"border-right":{width:"border-right-width",style:"border-right-style",color:"border-right-color"},background:{size:"background-size",image:"background-image"},font:{style:"font-style",variant:"font-variant",weight:"font-weight",stretch:"font-stretch",size:"font-size",family:"font-family",lineHeight:"line-height","line-height":"line-height"},flex:{grow:"flex-grow",basis:"flex-basis",direction:"flex-direction",wrap:"flex-wrap",flow:"flex-flow",shrink:"flex-shrink"},align:{self:"align-self",items:"align-items",content:"align-content"},grid:{"template-columns":"grid-template-columns",templateColumns:"grid-template-columns","template-rows":"grid-template-rows",templateRows:"grid-template-rows","template-areas":"grid-template-areas",templateAreas:"grid-template-areas",template:"grid-template","auto-columns":"grid-auto-columns",autoColumns:"grid-auto-columns","auto-rows":"grid-auto-rows",autoRows:"grid-auto-rows","auto-flow":"grid-auto-flow",autoFlow:"grid-auto-flow",row:"grid-row",column:"grid-column","row-start":"grid-row-start",rowStart:"grid-row-start","row-end":"grid-row-end",rowEnd:"grid-row-end","column-start":"grid-column-start",columnStart:"grid-column-start","column-end":"grid-column-end",columnEnd:"grid-column-end",area:"grid-area",gap:"grid-gap","row-gap":"grid-row-gap",rowGap:"grid-row-gap","column-gap":"grid-column-gap",columnGap:"grid-column-gap"}};function yo(r,e,n){return r.map(function(t){return jr(t,e,n,!1,!0)})}function _r(r,e,n,t){return n[e]==null?r:r.length===0?[]:Array.isArray(r[0])?_r(r[0],e,n,t):typeof r[0]=="object"?yo(r,e,t):[r]}function jr(r,e,n,t,i){if(!(Ee[e]||St[e]))return[];var o=[];if(St[e]&&(r=bo(r,n,St[e],t)),Object.keys(r).length)for(var a in Ee[e]){if(r[a]){Array.isArray(r[a])?o.push(go[a]===null?r[a]:r[a].join(" ")):o.push(r[a]);continue}Ee[e][a]!=null&&o.push(Ee[e][a])}return!o.length||i?o:[o]}function bo(r,e,n,t){for(var i in n){var o=n[i];if(typeof r[i]<"u"&&(t||!e.prop(o))){var a,s=ae((a={},a[o]=r[i],a),e)[o];t?e.style.fallbacks[o]=s:e.style[o]=s}delete r[i]}return r}function ae(r,e,n){for(var t in r){var i=r[t];if(Array.isArray(i)){if(!Array.isArray(i[0])){if(t==="fallbacks"){for(var o=0;o<r.fallbacks.length;o++)r.fallbacks[o]=ae(r.fallbacks[o],e,!0);continue}r[t]=_r(i,t,vo,e),r[t].length||delete r[t]}}else if(typeof i=="object"){if(t==="fallbacks"){r.fallbacks=ae(r.fallbacks,e,!0);continue}r[t]=jr(i,t,e,n),r[t].length||delete r[t]}else r[t]===""&&delete r[t]}return r}function xo(){function r(e,n){if(!e||n.type!=="style")return e;if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=ae(e[t],n);return e}return ae(e,n)}return{onProcessStyle:r}}var Mr=xo;function se(r,e){(e==null||e>r.length)&&(e=r.length);for(var n=0,t=Array(e);n<e;n++)t[n]=r[n];return t}function Fr(r){if(Array.isArray(r))return se(r)}function Lr(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function Vr(r,e){if(r){if(typeof r=="string")return se(r,e);var n={}.toString.call(r).slice(8,-1);return n==="Object"&&r.constructor&&(n=r.constructor.name),n==="Map"||n==="Set"?Array.from(r):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?se(r,e):void 0}}function Dr(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
9
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wr(r){return Fr(r)||Lr(r)||Vr(r)||Dr()}var le="",Pt="",Ur="",Hr="",So=j&&"ontouchstart"in document.documentElement;if(j){Ie={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},zr=document.createElement("p"),Ae=zr.style,Br="Transform";for(_e in Ie)if(_e+Br in Ae){le=_e,Pt=Ie[_e];break}le==="Webkit"&&"msHyphens"in Ae&&(le="ms",Pt=Ie.ms,Hr="edge"),le==="Webkit"&&"-apple-trailing-word"in Ae&&(Ur="apple")}var Ie,zr,Ae,Br,_e,h={js:le,css:Pt,vendor:Ur,browser:Hr,isTouch:So};function Gr(r){return r[1]==="-"||h.js==="ms"?r:"@"+h.css+"keyframes"+r.substr(10)}var Po={noPrefill:["appearance"],supportedProperty:function(e){return e!=="appearance"?!1:h.js==="ms"?"-webkit-"+e:h.css+e}},wo={noPrefill:["color-adjust"],supportedProperty:function(e){return e!=="color-adjust"?!1:h.js==="Webkit"?h.css+"print-"+e:e}},Ro=/[-\s]+(.)?/g;function ko(r,e){return e?e.toUpperCase():""}function wt(r){return r.replace(Ro,ko)}function z(r){return wt("-"+r)}var Co={noPrefill:["mask"],supportedProperty:function(e,n){if(!/^mask/.test(e))return!1;if(h.js==="Webkit"){var t="mask-image";if(wt(t)in n)return e;if(h.js+z(t)in n)return h.css+e}return e}},No={noPrefill:["text-orientation"],supportedProperty:function(e){return e!=="text-orientation"?!1:h.vendor==="apple"&&!h.isTouch?h.css+e:e}},Oo={noPrefill:["transform"],supportedProperty:function(e,n,t){return e!=="transform"?!1:t.transform?e:h.css+e}},To={noPrefill:["transition"],supportedProperty:function(e,n,t){return e!=="transition"?!1:t.transition?e:h.css+e}},Eo={noPrefill:["writing-mode"],supportedProperty:function(e){return e!=="writing-mode"?!1:h.js==="Webkit"||h.js==="ms"&&h.browser!=="edge"?h.css+e:e}},Io={noPrefill:["user-select"],supportedProperty:function(e){return e!=="user-select"?!1:h.js==="Moz"||h.js==="ms"||h.vendor==="apple"?h.css+e:e}},Ao={supportedProperty:function(e,n){if(!/^break-/.test(e))return!1;if(h.js==="Webkit"){var t="WebkitColumn"+z(e);return t in n?h.css+"column-"+e:!1}if(h.js==="Moz"){var i="page"+z(e);return i in n?"page-"+e:!1}return!1}},_o={supportedProperty:function(e,n){if(!/^(border|margin|padding)-inline/.test(e))return!1;if(h.js==="Moz")return e;var t=e.replace("-inline","");return h.js+z(t)in n?h.css+t:!1}},jo={supportedProperty:function(e,n){return wt(e)in n?e:!1}},Mo={supportedProperty:function(e,n){var t=z(e);return e[0]==="-"||e[0]==="-"&&e[1]==="-"?e:h.js+t in n?h.css+e:h.js!=="Webkit"&&"Webkit"+t in n?"-webkit-"+e:!1}},Fo={supportedProperty:function(e){return e.substring(0,11)!=="scroll-snap"?!1:h.js==="ms"?""+h.css+e:e}},Lo={supportedProperty:function(e){return e!=="overscroll-behavior"?!1:h.js==="ms"?h.css+"scroll-chaining":e}},Vo={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},Do={supportedProperty:function(e,n){var t=Vo[e];return t&&h.js+z(t)in n?h.css+t:!1}},Jr={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},Wo=Object.keys(Jr),zo=function(e){return h.css+e},Bo={supportedProperty:function(e,n,t){var i=t.multiple;if(Wo.indexOf(e)>-1){var o=Jr[e];if(!Array.isArray(o))return h.js+z(o)in n?h.css+o:!1;if(!i)return!1;for(var a=0;a<o.length;a++)if(!(h.js+z(o[0])in n))return!1;return o.map(zo)}return!1}},qr=[Po,wo,Co,No,Oo,To,Eo,Io,Ao,_o,jo,Mo,Fo,Lo,Do,Bo],$r=qr.filter(function(r){return r.supportedProperty}).map(function(r){return r.supportedProperty}),$o=qr.filter(function(r){return r.noPrefill}).reduce(function(r,e){return r.push.apply(r,Wr(e.noPrefill)),r},[]),fe,J={};if(j){fe=document.createElement("p"),je=window.getComputedStyle(document.documentElement,"");for(Me in je)isNaN(Me)||(J[je[Me]]=je[Me]);$o.forEach(function(r){return delete J[r]})}var je,Me;function Fe(r,e){if(e===void 0&&(e={}),!fe)return r;if(J[r]!=null)return J[r];(r==="transition"||r==="transform")&&(e[r]=r in fe.style);for(var n=0;n<$r.length&&(J[r]=$r[n](r,fe.style,e),!J[r]);n++);try{fe.style[r]=""}catch{return!1}return J[r]}var Q={},Uo={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},Ho=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g,W;function Go(r,e,n){if(e==="var")return"var";if(e==="all")return"all";if(n==="all")return", all";var t=e?Fe(e):", "+Fe(n);return t||e||n}j&&(W=document.createElement("p"));function Rt(r,e){var n=e;if(!W||r==="content")return e;if(typeof n!="string"||!isNaN(parseInt(n,10)))return n;var t=r+n;if(Q[t]!=null)return Q[t];try{W.style[r]=n}catch{return Q[t]=!1,!1}if(Uo[r])n=n.replace(Ho,Go);else if(W.style[r]===""&&(n=h.css+n,n==="-ms-flex"&&(W.style[r]="-ms-flexbox"),W.style[r]=n,W.style[r]===""))return Q[t]=!1,!1;return W.style[r]="",Q[t]=n,Q[t]}function Jo(){function r(i){if(i.type==="keyframes"){var o=i;o.at=Gr(o.at)}}function e(i){for(var o in i){var a=i[o];if(o==="fallbacks"&&Array.isArray(a)){i[o]=a.map(e);continue}var s=!1,f=Fe(o);f&&f!==o&&(s=!0);var u=!1,c=Rt(f,V(a));c&&c!==a&&(u=!0),(s||u)&&(s&&delete i[o],i[f||o]=c||a)}return i}function n(i,o){return o.type!=="style"?i:e(i)}function t(i,o){return Rt(o,V(i))||i}return{onProcessRule:r,onProcessStyle:n,onChangeValue:t}}var Kr=Jo;function qo(){var r=function(n,t){return n.length===t.length?n>t?1:-1:n.length-t.length};return{onProcessStyle:function(n,t){if(t.type!=="style")return n;for(var i={},o=Object.keys(n).sort(r),a=0;a<o.length;a++)i[o[a]]=n[o[a]];return i}}}var Xr=qo;var Ko=function(e){return e===void 0&&(e={}),{plugins:[xr(),Pr(e.observable),wr(),kr(),Cr(),Or(),Tr(),Er(),Ar(e.defaultUnit),Mr(),Kr(),Xr()]}},Le=Ko;function Xo(r){var e={};return function(n){return e[n]===void 0&&(e[n]=r(n)),e[n]}}var Yr=Xo;var Yo=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|default|defer|dir|disabled|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|itemProp|itemScope|itemType|itemID|itemRef|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,ef=Yr(function(r){return Yo.test(r)||r.charCodeAt(0)===111&&r.charCodeAt(1)===110&&r.charCodeAt(2)<91});var Zo=1e4,Qo=ie(Le()),ea=function(e){e===void 0&&(e=Qo);var n=new Map,t=0,i,o=function(){return(!i||i.rules.index.length>Zo)&&(i=e.createStyleSheet().attach()),i};function a(){var s=arguments,f=JSON.stringify(s),u=n.get(f);if(u)return u.className;var c=[];for(var d in s){var p=s[d];if(!Array.isArray(p)){c.push(p);continue}for(var m=0;m<p.length;m++)c.push(p[m])}for(var y={},v=[],R=0;R<c.length;R++){var C=c[R];if(C){var x=C;if(typeof C=="string"){var T=n.get(C);T&&(T.labels.length&&v.push.apply(v,T.labels),x=T.style)}x.label&&v.indexOf(x.label)===-1&&v.push(x.label),Object.assign(y,x)}}delete y.label;var k=v.length===0?"css":v.join("-"),P=k+"-"+t++;o().addRule(P,y);var E=o().classes[P],A={style:y,labels:v,className:E};return n.set(f,A),n.set(E,A),E}return a.getSheet=o,a},ta=ea(),Zr=ta;var la=Number.MIN_SAFE_INTEGER||-1e9,fa=function(){return la++},ua=na({classNamePrefix:"",disableStylesGeneration:!1,isSSR:!j}),rn=new Map,Ct=function(e,n){var t=e.managers;if(t)return t[n]||(t[n]=new ut),t[n];var i=rn.get(n);return i||(i=new ut,rn.set(n,i)),i},nn=function(e){var n=e.sheet,t=e.context,i=e.index,o=e.theme;if(n){var a=Ct(t,i);a.manage(o),t.registry&&t.registry.add(n)}},ca=function(e){if(e.sheet){var n=Ct(e.context,e.index);n.unmanage(e.theme)}},da=ie(Le()),sn=new WeakMap,ln=function(e){return sn.get(e)},ha=function(e,n){sn.set(e,n)},pa=function(e){var n=e.styles;return typeof n!="function"?n:n(e.theme)};function ma(r,e){var n;r.context.id&&r.context.id.minify!=null&&(n=r.context.id.minify);var t=r.context.classNamePrefix||"";r.name&&!n&&(t+=r.name.replace(/\s/g,"-")+"-");var i="";return r.name&&(i=r.name+", "),i+=typeof r.styles=="function"?"Themed":"Unthemed",S({},r.sheetOptions,{index:r.index,meta:i,classNamePrefix:t,link:e,generateId:r.sheetOptions&&r.sheetOptions.generateId?r.sheetOptions.generateId:r.context.generateId})}var va=function(e){if(!e.context.disableStylesGeneration){var n=Ct(e.context,e.index),t=n.get(e.theme);if(t)return t;var i=e.context.jss||da,o=pa(e),a=ct(o),s=i.createStyleSheet(o,ma(e,a!==null));return ha(s,{dynamicStyles:a,styles:o}),n.add(e.theme,s),s}},ga=function(e,n){for(var t in n)e.deleteRule(n[t])},ya=function(e,n,t){for(var i in t)n.updateOne(t[i],e)},ba=function(e,n){var t=ln(e);if(t){var i={};for(var o in t.dynamicStyles)for(var a=e.rules.index.length,s=e.addRule(o,t.dynamicStyles[o]),f=a;f<e.rules.index.length;f++){var u=e.rules.index[f];e.updateOne(u,n),i[s===u?o:u.key]=u}return i}},xa=function(e,n){if(!n)return e.classes;var t=ln(e);if(!t)return e.classes;var i={};for(var o in t.styles)i[o]=e.classes[o],o in n&&(i[o]+=" "+e.classes[n[o].key]);return i};function on(r){return r?an:ra.useInsertionEffect||oa}var kt={},w=function(e,n){n===void 0&&(n={});var t=n,i=t.index,o=i===void 0?fa():i,a=t.theming,s=t.name,f=ce(t,["index","theming","name"]),u=a&&a.context||Xe,c=function(m){return typeof e=="function"&&(m||Qr(u))||kt},d={};return function(m){var y=ia(!0),v=Qr(ua),R=c(m&&m.theme),C=en(function(){var P=va({context:v,styles:e,name:s,theme:R,index:o,sheetOptions:f});return P&&v.isSSR&&nn({index:o,context:v,sheet:P,theme:R}),[P,P?ba(P,m):null]},[v,R]),x=C[0],T=C[1];on(v.isSSR)(function(){x&&T&&!y.current&&ya(m,x,T)},[m]),on(v.isSSR)(function(){return x&&nn({index:o,context:v,sheet:x,theme:R}),function(){x&&(ca({index:o,context:v,sheet:x,theme:R}),T&&ga(x,T))}},[x]);var k=en(function(){return x&&T?xa(x,T):d},[x,T]);return tn(k),tn(R===kt?"No theme":R),an(function(){y.current=!1}),k}};var bf=Symbol("react-jss-styled");var Sa=function(e){return e===void 0&&(e=Zr),function(t,i){var o=arguments;if(i&&i.css){var a=e(i.css),s=Object.assign({},i);s.className=i.className?i.className+" "+a:a,delete s.css,o[1]=s}return aa.apply(void 0,o)}},xf=Sa();var N="teknify";import{jsx as fn}from"react/jsx-runtime";var Pa=r=>fn("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"size-6",...r,children:fn("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z"})}),Nt=Pa;import{jsx as un}from"react/jsx-runtime";var wa=r=>un("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"size-6",...r,children:un("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0"})}),Ot=wa;import{jsx as cn}from"react/jsx-runtime";var Ra=r=>cn("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"size-6",...r,children:cn("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})}),Tt=Ra;import{jsx as hn,jsxs as Na}from"react/jsx-runtime";var ka=w({button:r=>({width:40,height:40,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",backgroundColor:"#fff",border:"none",cursor:"pointer",transition:"all 0.2s ease-in-out",position:"relative","&:hover":{backgroundColor:"#f5f5f5"},...r.active&&{backgroundColor:"#f1f1f1"}}),badge:{position:"absolute",top:0,right:0,padding:"2px 6px",height:18,minWidth:18,backgroundColor:"red",display:"flex",justifyContent:"center",alignItems:"center",borderRadius:100,color:"#fff",fontSize:10,visibility:"hidden",opacity:0,transition:"all 0.2s ease-in-out",scale:.8,userSelect:"none"},badgeOpen:{visibility:"visible",opacity:1,scale:1}},{name:N}),Ca=({className:r,counts:e,active:n,...t})=>{let i=ka({counts:e,active:n}),o=dn(()=>e<=99?`${e}`:"99+",[e]),a=dn(()=>e>0,[e]);return Na("button",{...t,className:`${i.button} ${r}`,children:[hn(Ot,{width:24,height:24}),hn("div",{className:g(i.badge,a&&i.badgeOpen),children:o})]})},Et=Ca;import{jsx as Ea}from"react/jsx-runtime";var Oa=w({button:r=>({textDecoration:"none",background:`var(--${r.variant}-color)`,borderRadius:"var(--border-radius)",color:r.variant==="tertiary"?"#000":"#fff",fontWeight:500,border:"none",cursor:"pointer",fontSize:12,...r.icon?{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"}:{minWidth:100,padding:"8px 12px"},"&:hover":{background:`var(--${r.variant}-color-darker)`}})},{name:N}),Ta=({className:r,variant:e="tertiary",icon:n=!1,...t})=>{let i=Oa({variant:e,icon:n});return Ea("button",{...t,className:g(i.button,r)})},B=Ta;import{useContext as Da}from"react";import{TeknifyClient as ja}from"@tnf-dev/js";import{createContext as Ma,useMemo as Fa}from"react";var pn={components:{NotificationHeader:{notifications:"Notifications"},Empty:{noNotifications:"No notifications"},Loader:{loading:"Loading..."},NotificationItem:{markAsRead:"Mark as read"}}};import{jsx as _a}from"react/jsx-runtime";var Ia=w({styleProvider:{fontFamily:"inherit, sans-serif",fontSize:13,"--background-color":"#f1f1f1","--card-background-color":"#fff","--primary-color":"#000088","--secondary-color":"#00C16E","--tertiary-color":"#f6f6f6","--primary-color-darker":"#000066","--secondary-color-darker":"#009955","--border-radius":"12px","& *::-webkit-scrollbar":{width:8,height:8},"& *::-webkit-scrollbar-thumb":{borderRadius:10,background:"#0003"}}}),Aa=({children:r})=>{let e=Ia();return _a("div",{className:g(e.styleProvider),children:r})},mn=Aa;import{jsx as vn}from"react/jsx-runtime";var M=Ma({applicationId:"",subscriberId:""}),La=({applicationId:r,subscriberId:e,children:n,language:t,baseUrl:i,locale:o,socketUrl:a})=>{let s=Fa(()=>({applicationId:r,subscriberId:e,client:new ja({applicationId:r,subscriberId:e,language:t,baseUrl:i,socketUrl:a}),locale:{...pn,...o}}),[r,e,t,i,a,o]);return vn(M.Provider,{value:s,children:vn(mn,{children:n})})},Va=La;import{jsx as Ba}from"react/jsx-runtime";var Wa=w({empty:{textAlign:"center",padding:"20px 0"}},{name:N}),za=()=>{let r=Wa(),{locale:e}=Da(M);return Ba("div",{className:g(r.empty),children:e.components.Empty.noNotifications})},It=za;import{jsx as Ha}from"react/jsx-runtime";var $a=w({error:{padding:10}}),Ua=({message:r})=>{let e=$a();return Ha("div",{className:g(e.error),children:r})},At=Ua;import{useCallback as us,useState as Pn}from"react";import cs from"react-infinite-scroller";import{useCallback as _t,useContext as Ga,useEffect as Ve,useState as $}from"react";var gn=()=>{let{client:r}=Ga(M),[e,n]=$([]),[t,i]=$(!1),[o,a]=$(null),[s,f]=$(!1),[u,c]=$(!0),[d,p]=$(!0),[m,y]=$(),[v,R]=$(0),C=_t(async k=>{try{n(P=>P.map(E=>E._id===k?{...E,isRead:!0}:E)),await r.notification.markAsRead(k)}catch{n(E=>E.map(A=>A._id===k?{...A,isRead:!1}:A))}},[]),x=_t(async()=>{if(!(s||t))try{f(!0);let k=await r.notification.getNotifications({...m?{cursor:m}:{}});n(P=>[...P,...k.data.filter(E=>!P.find(A=>A._id===E._id)).map(E=>({...E,markAsRead:()=>C(E._id)}))]),p(!!k.pagination.continueCursor),y(k.pagination.continueCursor),R(k.unread)}catch{}finally{f(!1),c(!1)}},[s,m,C,t,r]);Ve(()=>{x()},[]),Ve(()=>{y(void 0)},[r]),Ve(()=>{let k=(P,{counts:E})=>{R(E.unread),n(A=>[...P.filter(q=>{let zt=A.findIndex(Rn=>Rn._id===q._id);return zt!==-1?(A[zt]={...q,markAsRead:()=>C(q._id)},!1):!0}).map(q=>({...q,markAsRead:()=>C(q._id)})),...A])};return r.notification.on(k),()=>{r.notification.off(k)}},[C,r]);let T=_t(()=>{x()},[x]);return Ve(()=>{n([]),p(!0),y(void 0),c(!0),x()},[r]),{notifications:e,isLoading:s,isFirstLoad:u,isError:t,error:o,hasMore:d,unread:v,fetchMore:T}};import{useContext as Ja}from"react";import{jsx as Xa}from"react/jsx-runtime";var qa=w({loader:{textAlign:"center",padding:"20px 0"}}),Ka=()=>{let r=qa(),{locale:e}=Ja(M);return Xa("div",{className:g(r.loader),children:e.components.Loader.loading})},jt=Ka;import{useContext as Ya}from"react";import{jsx as yn,jsxs as es}from"react/jsx-runtime";var Za=w({notificationHeader:{padding:"10px 15px",borderBottom:"1px solid #0001",display:"flex",justifyContent:"space-between",background:"var(--card-background-color)",borderRadius:"5px 5px 0 0",height:36,alignItems:"center"},notificationHeaderTitle:{fontSize:15,fontWeight:600,flex:1}},{name:N}),Qa=()=>{let r=Za(),{locale:e}=Ya(M);return es("div",{className:g(r.notificationHeader),children:[yn("h2",{className:g(r.notificationHeaderTitle),children:e.components.NotificationHeader.notifications}),yn("div",{})]})},Mt=Qa;import is from"sanitize-html";import{jsx as De,jsxs as ns}from"react/jsx-runtime";var ts=w({actions:{position:"absolute",top:5,right:5,display:"flex",gap:5,padding:0,background:"#fafafa",borderRadius:5},button:{background:"transparent","&:hover":{background:"#fafafa"}}},{name:N}),rs=({notification:r})=>{let e=ts();return ns("div",{className:g(e.actions,`${N}-actions`),children:[!r.isRead&&De(B,{icon:!0,onClick:r.markAsRead,className:g(e.button),children:De(Tt,{width:12,height:12})}),De(B,{icon:!0,className:g(e.button),children:De(Nt,{width:12,height:12})})]})},bn=rs;import{jsx as F,jsxs as Ft}from"react/jsx-runtime";var os=w({notificationItem:{padding:"10px 15px",display:"flex",flexWrap:"wrap",columnGap:10,flexDirection:"column",margin:10,background:"var(--card-background-color)",borderRadius:10,border:"1px solid #ddd",position:"relative",[`& .${N}-actions`]:{visibility:"hidden",opacity:0,transition:"0.3s ease-in-out"},[`&:hover .${N}-actions`]:{visibility:"visible",opacity:1}},notificationItemImage:{width:24,height:24,objectFit:"cover"},notificationItemTitle:{fontSize:14,fontWeight:600,paddingBottom:5,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},notificationItemBody:{fontSize:14,lineClamp:2,overflow:"hidden",textOverflow:"ellipsis"},notificationItemActions:{display:"flex",gap:8,marginTop:10,alignItems:"center",justifyContent:"flex-end",width:"100%"},unreadDot:{width:7,height:7,borderRadius:100,background:"var(--primary-color)",position:"relative","&::before":{content:'""',position:"absolute",top:-3,left:-3,width:"calc(100% + 6px)",height:"calc(100% + 6px)",borderRadius:100,background:"var(--primary-color)",opacity:.2}}},{name:N}),as=({notification:r})=>{let e=os();return Ft("div",{className:g(e.notificationItem),children:[Ft("div",{style:{display:"flex",gap:10,width:"100%"},children:[F("div",{children:r.icon&&F("img",{src:r.icon,alt:r.title,width:32,height:32,className:g(e.notificationItemImage)})}),Ft("div",{style:{flex:1,overflow:"hidden"},children:[F("h3",{className:g(e.notificationItemTitle),children:r.title}),F("div",{dangerouslySetInnerHTML:{__html:is(r.message)},className:g(e.notificationItemBody)})]}),!r.isRead&&F("div",{className:g(e.unreadDot)})]}),F("div",{className:g(e.notificationItemActions),children:r.actionButtons?.map(n=>F("a",{href:n.href,target:n.target,children:F(B,{variant:"secondary",children:n.label})},n.href))}),F(bn,{notification:r})]})},Lt=as;import{useEffect as xn,useMemo as Vt,useState as Sn}from"react";import{jsx as fs}from"react/jsx-runtime";var ss=w({popover:{width:"100%",height:"100%",maxWidth:400,maxHeight:500,boxShadow:"0 10px 40px #0001",position:"fixed",background:"#fff",borderRadius:10,visibility:"hidden",opacity:0,scale:.8,transition:"all 0.3s",backgroundColor:"var(--background-color)",border:"1px solid var(--card-background-color)"},popoverOpen:{top:0,left:0,visibility:"visible",opacity:1,scale:1}},{name:N}),ls=({open:r,anchorElement:e,onClose:n,children:t})=>{let i=ss(),[o,a]=Sn(null),[s,f]=Sn(typeof window>"u"?0:window.innerWidth),u=Vt(()=>{if(!e)return 0;let p=e.getBoundingClientRect();return p.top+p.height+20},[e,s]),c=Vt(()=>e?e.getBoundingClientRect().left+10:0,[e,s]),d=Vt(()=>{if(!o||!e)return!0;let p=e.getBoundingClientRect(),m=o.getBoundingClientRect();return p.left+m.width>s},[o,e,s]);return xn(()=>{let p=()=>{r&&n?.()};return window.addEventListener("click",p),()=>{window.removeEventListener("click",p)}},[r]),xn(()=>{let p=()=>{f(window.innerWidth)};return window.addEventListener("resize",p),()=>{window.removeEventListener("resize",p)}},[]),fs("div",{className:g(i.popover,r&&i.popoverOpen),style:{top:u,left:c,...d?{transform:"translateX(calc(-100% + 20px))"}:{}},ref:a,onClick:p=>{p.stopPropagation()},children:t})},Dt=ls;import{Fragment as We,jsx as _,jsxs as Wt}from"react/jsx-runtime";var ds=w({inboxContent:{height:"100%",display:"flex",flexDirection:"column"},inboxContentList:{flex:1,overflowY:"auto"}},{name:N}),hs={Bell:Et,Button:B,NotificationHeader:Mt,Empty:It,Loader:jt,NotificationItem:Lt,NotificationPopover:Dt,NotificationError:At},ps=({components:r})=>{let[e,n]=Pn(null),[t,i]=Pn(!1),{Bell:o,Empty:a,Loader:s,NotificationHeader:f,NotificationItem:u,NotificationPopover:c,NotificationError:d}={...hs,...r},p=us(()=>{i(P=>!P)},[]),{notifications:m,unread:y,isFirstLoad:v,hasMore:R,fetchMore:C,isError:x,error:T}=gn(),k=ds();return Wt(We,{children:[_(o,{onClick:P=>{P.stopPropagation(),p()},ref:n,active:t,counts:y}),_(c,{open:t,anchorElement:e,onClose:p,children:Wt("div",{className:g(k.inboxContent),children:[_(f,{}),_("div",{className:g(k.inboxContentList),children:Wt(cs,{loadMore:C,hasMore:R&&!x,loader:_(s,{},0),useWindow:!1,children:[v?_(We,{}):_(We,{children:m.length?_(We,{children:m.map(P=>_(u,{notification:P},P._id))}):_(a,{})}),x&&_(d,{message:T?.message})]})})]})})]})},wn=ps;export{Et as Bell,B as Button,It as Empty,wn as Inbox,jt as Loader,At as NotificationError,Mt as NotificationHeader,Lt as NotificationItem,Dt as NotificationPopover,M as TeknifyContext,wn as TeknifyInbox,Va as TeknifyProvider,gn as useNotifications};
8
+ `}},e.insertRules=function(t,i){for(var o=0;o<t.index.length;o++)this.insertRule(t.index[o],o,i)},e.insertRule=function(t,i,o){if(o===void 0&&(o=this.element.sheet),t.rules){var a=t,s=o;if(t.type==="conditional"||t.type==="keyframes"){var f=vr(o,i);if(s=mr(o,a.toString({children:!1}),f),s===!1)return!1;this.refCssRule(t,f,s)}return this.insertRules(a.rules,s),s}var u=t.toString();if(!u)return!1;var c=vr(o,i),d=mr(o,u,c);return d===!1?!1:(this.hasInsertedRules=!0,this.refCssRule(t,c,d),d)},e.refCssRule=function(t,i,o){t.renderable=o,t.options.parent instanceof yr&&this.cssRules.splice(i,0,o)},e.deleteRule=function(t){var i=this.element.sheet,o=this.indexOf(t);return o===-1?!1:(i.deleteRule(o),this.cssRules.splice(o,1),!0)},e.indexOf=function(t){return this.cssRules.indexOf(t)},e.replaceRule=function(t,i){var o=this.indexOf(t);return o===-1?!1:(this.element.sheet.deleteRule(o),this.cssRules.splice(o,1),this.insertRule(i,o))},e.getRules=function(){return this.element.sheet.cssRules},r}(),Wi=0,Bi=function(){function r(n){this.id=Wi++,this.version="10.10.0",this.plugins=new ki,this.options={id:{minify:!1},createGenerateId:ut,Renderer:M?Di:null,plugins:[]},this.generateId=ut({minify:!1});for(var t=0;t<dr.length;t++)this.plugins.use(dr[t],{queue:"internal"});this.setup(n)}var e=r.prototype;return e.setup=function(t){return t===void 0&&(t={}),t.createGenerateId&&(this.options.createGenerateId=t.createGenerateId),t.id&&(this.options.id=x({},this.options.id,t.id)),(t.createGenerateId||t.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),t.insertionPoint!=null&&(this.options.insertionPoint=t.insertionPoint),"Renderer"in t&&(this.options.Renderer=t.Renderer),t.plugins&&this.use.apply(this,t.plugins),this},e.createStyleSheet=function(t,i){i===void 0&&(i={});var o=i,a=o.index;typeof a!="number"&&(a=re.index===0?0:re.index+1);var s=new yr(t,x({},i,{jss:this,generateId:i.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:a}));return this.plugins.onProcessSheet(s),s},e.removeStyleSheet=function(t){return t.detach(),re.remove(t),this},e.createRule=function(t,i,o){if(i===void 0&&(i={}),o===void 0&&(o={}),typeof t=="object")return this.createRule(void 0,t,i);var a=x({},o,{name:t,jss:this,Renderer:this.options.Renderer});a.generateId||(a.generateId=this.generateId),a.classes||(a.classes={}),a.keyframes||(a.keyframes={});var s=X(t,i,a);return s&&this.plugins.onProcessRule(s),s},e.use=function(){for(var t=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return o.forEach(function(s){t.plugins.use(s)}),this},r}(),oe=function(e){return new Bi(e)},dt=function(){function r(){this.length=0,this.sheets=new WeakMap}var e=r.prototype;return e.get=function(t){var i=this.sheets.get(t);return i&&i.sheet},e.add=function(t,i){this.sheets.has(t)||(this.length++,this.sheets.set(t,{sheet:i,refs:0}))},e.manage=function(t){var i=this.sheets.get(t);if(i)return i.refs===0&&i.sheet.attach(),i.refs++,i.sheet;Xe(!1,"[JSS] SheetsManager: can't find sheet to manage")},e.unmanage=function(t){var i=this.sheets.get(t);i?i.refs>0&&(i.refs--,i.refs===0&&i.sheet.detach()):Xe(!1,"SheetsManager: can't find sheet to unmanage")},ke(r,[{key:"size",get:function(){return this.length}}]),r}(),Ne=typeof CSS=="object"&&CSS!=null&&"number"in CSS;function ht(r){var e=null;for(var n in r){var t=r[n],i=typeof t;if(i==="function")e||(e={}),e[n]=t;else if(i==="object"&&t!==null&&!Array.isArray(t)){var o=ht(t);o&&(e||(e={}),e[n]=o)}}return e}var Ks=oe();var Sr=Date.now(),pt="fnValues"+Sr,mt="fnStyle"+ ++Sr,zi=function(){return{onCreateRule:function(n,t,i){if(typeof t!="function")return null;var o=X(n,{},i);return o[mt]=t,o},onProcessStyle:function(n,t){if(pt in t||mt in t)return n;var i={};for(var o in n){var a=n[o];typeof a=="function"&&(delete n[o],i[o]=a)}return t[pt]=i,n},onUpdate:function(n,t,i,o){var a=t,s=a[mt];if(s&&(a.style=s(n)||{},0))for(var f in a.style);var u=a[pt];if(u)for(var c in u)a.prop(c,u[c](n),o)}}},Pr=zi;function vt(r){var e,n=r.Symbol;return typeof n=="function"?n.observable?e=n.observable:(e=n("observable"),n.observable=e):e="@@observable",e}var Z;typeof self<"u"?Z=self:typeof window<"u"?Z=window:typeof global<"u"?Z=global:typeof module<"u"?Z=module:Z=Function("return this")();var $i=vt(Z),gt=$i;var wr=function(e){return e&&e[gt]&&e===e[gt]()},Ui=function(e){return{onCreateRule:function(t,i,o){if(!wr(i))return null;var a=i,s=X(t,{},o);return a.subscribe(function(f){for(var u in f)s.prop(u,f[u],e)}),s},onProcessRule:function(t){if(!(t&&t.type!=="style")){var i=t,o=i.style,a=function(c){var d=o[c];if(!wr(d))return"continue";delete o[c],d.subscribe({next:function(m){i.prop(c,m,e)}})};for(var s in o)var f=a(s)}}}},Rr=Ui;var Hi=/;\n/,Gi=function(e){for(var n={},t=e.split(Hi),i=0;i<t.length;i++){var o=(t[i]||"").trim();if(o){var a=o.indexOf(":");if(a!==-1){var s=o.substr(0,a).trim(),f=o.substr(a+1).trim();n[s]=f}}}return n},Ji=function(e){typeof e.style=="string"&&(e.style=Gi(e.style))};function qi(){return{onProcessRule:Ji}}var kr=qi;var B="@global",yt="@global ",Ki=function(){function r(n,t,i){this.type="global",this.at=B,this.isProcessed=!1,this.key=n,this.options=i,this.rules=new ie(x({},i,{parent:this}));for(var o in t)this.rules.add(o,t[o]);this.rules.process()}var e=r.prototype;return e.getRule=function(t){return this.rules.get(t)},e.addRule=function(t,i,o){var a=this.rules.add(t,i,o);return a&&this.options.jss.plugins.onProcessRule(a),a},e.replaceRule=function(t,i,o){var a=this.rules.replace(t,i,o);return a&&this.options.jss.plugins.onProcessRule(a),a},e.indexOf=function(t){return this.rules.indexOf(t)},e.toString=function(t){return this.rules.toString(t)},r}(),Xi=function(){function r(n,t,i){this.type="global",this.at=B,this.isProcessed=!1,this.key=n,this.options=i;var o=n.substr(yt.length);this.rule=i.jss.createRule(o,t,x({},i,{parent:this}))}var e=r.prototype;return e.toString=function(t){return this.rule?this.rule.toString(t):""},r}(),Yi=/\s*,\s*/g;function Cr(r,e){for(var n=r.split(Yi),t="",i=0;i<n.length;i++)t+=e+" "+n[i].trim(),n[i+1]&&(t+=", ");return t}function Zi(r,e){var n=r.options,t=r.style,i=t?t[B]:null;if(i){for(var o in i)e.addRule(o,i[o],x({},n,{selector:Cr(o,r.selector)}));delete t[B]}}function Qi(r,e){var n=r.options,t=r.style;for(var i in t)if(!(i[0]!=="@"||i.substr(0,B.length)!==B)){var o=Cr(i.substr(B.length),r.selector);e.addRule(o,t[i],x({},n,{selector:o})),delete t[i]}}function eo(){function r(n,t,i){if(!n)return null;if(n===B)return new Ki(n,t,i);if(n[0]==="@"&&n.substr(0,yt.length)===yt)return new Xi(n,t,i);var o=i.parent;return o&&(o.type==="global"||o.options.parent&&o.options.parent.type==="global")&&(i.scoped=!1),!i.selector&&i.scoped===!1&&(i.selector=n),null}function e(n,t){n.type!=="style"||!t||(Zi(n,t),Qi(n,t))}return{onCreateRule:r,onProcessRule:e}}var Nr=eo;var Oe=function(e){return e&&typeof e=="object"&&!Array.isArray(e)},bt="extendCurrValue"+Date.now();function to(r,e,n,t){var i=typeof r.extend;if(i==="string"){if(!n)return;var o=n.getRule(r.extend);if(!o||o===e)return;var a=o.options.parent;if(a){var s=a.rules.raw[r.extend];J(s,e,n,t)}return}if(Array.isArray(r.extend)){for(var f=0;f<r.extend.length;f++){var u=r.extend[f],c=typeof u=="string"?x({},r,{extend:u}):r.extend[f];J(c,e,n,t)}return}for(var d in r.extend){if(d==="extend"){J(r.extend.extend,e,n,t);continue}if(Oe(r.extend[d])){d in t||(t[d]={}),J(r.extend[d],e,n,t[d]);continue}t[d]=r.extend[d]}}function ro(r,e,n,t){for(var i in r)if(i!=="extend"){if(Oe(t[i])&&Oe(r[i])){J(r[i],e,n,t[i]);continue}if(Oe(r[i])){t[i]=J(r[i],e,n);continue}t[i]=r[i]}}function J(r,e,n,t){return t===void 0&&(t={}),to(r,e,n,t),ro(r,e,n,t),t}function no(){function r(n,t,i){return"extend"in n?J(n,t,i):n}function e(n,t,i){if(t!=="extend")return n;if(n==null||n===!1){for(var o in i[bt])i.prop(o,null);return i[bt]=null,null}if(typeof n=="object"){for(var a in n)i.prop(a,n[a]);i[bt]=n}return null}return{onProcessStyle:r,onChangeValue:e}}var Or=no;var Tr=/\s*,\s*/g,io=/&/g,oo=/\$([\w-]+)/g;function ao(){function r(i,o){return function(a,s){var f=i.getRule(s)||o&&o.getRule(s);return f?f.selector:s}}function e(i,o){for(var a=o.split(Tr),s=i.split(Tr),f="",u=0;u<a.length;u++)for(var c=a[u],d=0;d<s.length;d++){var p=s[d];f&&(f+=", "),f+=p.indexOf("&")!==-1?p.replace(io,c):c+" "+p}return f}function n(i,o,a){if(a)return x({},a,{index:a.index+1});var s=i.options.nestingLevel;s=s===void 0?1:s+1;var f=x({},i.options,{nestingLevel:s,index:o.indexOf(i)+1});return delete f.name,f}function t(i,o,a){if(o.type!=="style")return i;var s=o,f=s.options.parent,u,c;for(var d in i){var p=d.indexOf("&")!==-1,m=d[0]==="@";if(!(!p&&!m)){if(u=n(s,f,u),p){var y=e(d,s.selector);c||(c=r(f,a)),y=y.replace(oo,c);var v=s.key+"-"+d;"replaceRule"in f?f.replaceRule(v,i[d],x({},u,{selector:y})):f.addRule(v,i[d],x({},u,{selector:y}))}else m&&f.addRule(d,{},u).addRule(s.key,i[d],{selector:s.selector});delete i[d]}}return i}return{onProcessStyle:t}}var Er=ao;function xt(r,e){if(!e)return!0;if(Array.isArray(e)){for(var n=0;n<e.length;n++){var t=xt(r,e[n]);if(!t)return!1}return!0}if(e.indexOf(" ")>-1)return xt(r,e.split(" "));var i=r.options.parent;if(e[0]==="$"){var o=i.getRule(e.substr(1));return!o||o===r?!1:(i.classes[r.key]+=" "+i.classes[o.key],!0)}return i.classes[r.key]+=" "+e,!0}function so(){function r(e,n){return"composes"in e&&(xt(n,e.composes),delete e.composes),e}return{onProcessStyle:r}}var Ar=so;var lo=/[A-Z]/g,fo=/^ms-/,St={};function uo(r){return"-"+r.toLowerCase()}function co(r){if(St.hasOwnProperty(r))return St[r];var e=r.replace(lo,uo);return St[r]=fo.test(e)?"-"+e:e}var Pt=co;function Te(r){var e={};for(var n in r){var t=n.indexOf("--")===0?n:Pt(n);e[t]=r[n]}return r.fallbacks&&(Array.isArray(r.fallbacks)?e.fallbacks=r.fallbacks.map(Te):e.fallbacks=Te(r.fallbacks)),e}function ho(){function r(n){if(Array.isArray(n)){for(var t=0;t<n.length;t++)n[t]=Te(n[t]);return n}return Te(n)}function e(n,t,i){if(t.indexOf("--")===0)return n;var o=Pt(t);return t===o?n:(i.prop(o,n),null)}return{onProcessStyle:r,onChangeValue:e}}var Ir=ho;var l=Ne&&CSS?CSS.px:"px",Ee=Ne&&CSS?CSS.ms:"ms",Q=Ne&&CSS?CSS.percent:"%",po={"animation-delay":Ee,"animation-duration":Ee,"background-position":l,"background-position-x":l,"background-position-y":l,"background-size":l,border:l,"border-bottom":l,"border-bottom-left-radius":l,"border-bottom-right-radius":l,"border-bottom-width":l,"border-left":l,"border-left-width":l,"border-radius":l,"border-right":l,"border-right-width":l,"border-top":l,"border-top-left-radius":l,"border-top-right-radius":l,"border-top-width":l,"border-width":l,"border-block":l,"border-block-end":l,"border-block-end-width":l,"border-block-start":l,"border-block-start-width":l,"border-block-width":l,"border-inline":l,"border-inline-end":l,"border-inline-end-width":l,"border-inline-start":l,"border-inline-start-width":l,"border-inline-width":l,"border-start-start-radius":l,"border-start-end-radius":l,"border-end-start-radius":l,"border-end-end-radius":l,margin:l,"margin-bottom":l,"margin-left":l,"margin-right":l,"margin-top":l,"margin-block":l,"margin-block-end":l,"margin-block-start":l,"margin-inline":l,"margin-inline-end":l,"margin-inline-start":l,padding:l,"padding-bottom":l,"padding-left":l,"padding-right":l,"padding-top":l,"padding-block":l,"padding-block-end":l,"padding-block-start":l,"padding-inline":l,"padding-inline-end":l,"padding-inline-start":l,"mask-position-x":l,"mask-position-y":l,"mask-size":l,height:l,width:l,"min-height":l,"max-height":l,"min-width":l,"max-width":l,bottom:l,left:l,top:l,right:l,inset:l,"inset-block":l,"inset-block-end":l,"inset-block-start":l,"inset-inline":l,"inset-inline-end":l,"inset-inline-start":l,"box-shadow":l,"text-shadow":l,"column-gap":l,"column-rule":l,"column-rule-width":l,"column-width":l,"font-size":l,"font-size-delta":l,"letter-spacing":l,"text-decoration-thickness":l,"text-indent":l,"text-stroke":l,"text-stroke-width":l,"word-spacing":l,motion:l,"motion-offset":l,outline:l,"outline-offset":l,"outline-width":l,perspective:l,"perspective-origin-x":Q,"perspective-origin-y":Q,"transform-origin":Q,"transform-origin-x":Q,"transform-origin-y":Q,"transform-origin-z":Q,"transition-delay":Ee,"transition-duration":Ee,"vertical-align":l,"flex-basis":l,"shape-margin":l,size:l,gap:l,grid:l,"grid-gap":l,"row-gap":l,"grid-row-gap":l,"grid-column-gap":l,"grid-template-rows":l,"grid-template-columns":l,"grid-auto-rows":l,"grid-auto-columns":l,"box-shadow-x":l,"box-shadow-y":l,"box-shadow-blur":l,"box-shadow-spread":l,"font-line-height":l,"text-shadow-x":l,"text-shadow-y":l,"text-shadow-blur":l};function _r(r){var e=/(-[a-z])/g,n=function(a){return a[1].toUpperCase()},t={};for(var i in r)t[i]=r[i],t[i.replace(e,n)]=r[i];return t}var mo=_r(po);function ae(r,e,n){if(e==null)return e;if(Array.isArray(e))for(var t=0;t<e.length;t++)e[t]=ae(r,e[t],n);else if(typeof e=="object")if(r==="fallbacks")for(var i in e)e[i]=ae(i,e[i],n);else for(var o in e)e[o]=ae(r+"-"+o,e[o],n);else if(typeof e=="number"&&isNaN(e)===!1){var a=n[r]||mo[r];return a&&!(e===0&&a===l)?typeof a=="function"?a(e).toString():""+e+a:e.toString()}return e}function vo(r){r===void 0&&(r={});var e=_r(r);function n(i,o){if(o.type!=="style")return i;for(var a in i)i[a]=ae(a,i[a],e);return i}function t(i,o){return ae(o,i,e)}return{onProcessStyle:n,onChangeValue:t}}var jr=vo;var go={"background-size":!0,"background-position":!0,border:!0,"border-bottom":!0,"border-left":!0,"border-top":!0,"border-right":!0,"border-radius":!0,"border-image":!0,"border-width":!0,"border-style":!0,"border-color":!0,"box-shadow":!0,flex:!0,margin:!0,padding:!0,outline:!0,"transform-origin":!0,transform:!0,transition:!0},yo={position:!0,size:!0},Ae={padding:{top:0,right:0,bottom:0,left:0},margin:{top:0,right:0,bottom:0,left:0},background:{attachment:null,color:null,image:null,position:null,repeat:null},border:{width:null,style:null,color:null},"border-top":{width:null,style:null,color:null},"border-right":{width:null,style:null,color:null},"border-bottom":{width:null,style:null,color:null},"border-left":{width:null,style:null,color:null},outline:{width:null,style:null,color:null},"list-style":{type:null,position:null,image:null},transition:{property:null,duration:null,"timing-function":null,timingFunction:null,delay:null},animation:{name:null,duration:null,"timing-function":null,timingFunction:null,delay:null,"iteration-count":null,iterationCount:null,direction:null,"fill-mode":null,fillMode:null,"play-state":null,playState:null},"box-shadow":{x:0,y:0,blur:0,spread:0,color:null,inset:null},"text-shadow":{x:0,y:0,blur:null,color:null}},wt={border:{radius:"border-radius",image:"border-image",width:"border-width",style:"border-style",color:"border-color"},"border-bottom":{width:"border-bottom-width",style:"border-bottom-style",color:"border-bottom-color"},"border-top":{width:"border-top-width",style:"border-top-style",color:"border-top-color"},"border-left":{width:"border-left-width",style:"border-left-style",color:"border-left-color"},"border-right":{width:"border-right-width",style:"border-right-style",color:"border-right-color"},background:{size:"background-size",image:"background-image"},font:{style:"font-style",variant:"font-variant",weight:"font-weight",stretch:"font-stretch",size:"font-size",family:"font-family",lineHeight:"line-height","line-height":"line-height"},flex:{grow:"flex-grow",basis:"flex-basis",direction:"flex-direction",wrap:"flex-wrap",flow:"flex-flow",shrink:"flex-shrink"},align:{self:"align-self",items:"align-items",content:"align-content"},grid:{"template-columns":"grid-template-columns",templateColumns:"grid-template-columns","template-rows":"grid-template-rows",templateRows:"grid-template-rows","template-areas":"grid-template-areas",templateAreas:"grid-template-areas",template:"grid-template","auto-columns":"grid-auto-columns",autoColumns:"grid-auto-columns","auto-rows":"grid-auto-rows",autoRows:"grid-auto-rows","auto-flow":"grid-auto-flow",autoFlow:"grid-auto-flow",row:"grid-row",column:"grid-column","row-start":"grid-row-start",rowStart:"grid-row-start","row-end":"grid-row-end",rowEnd:"grid-row-end","column-start":"grid-column-start",columnStart:"grid-column-start","column-end":"grid-column-end",columnEnd:"grid-column-end",area:"grid-area",gap:"grid-gap","row-gap":"grid-row-gap",rowGap:"grid-row-gap","column-gap":"grid-column-gap",columnGap:"grid-column-gap"}};function bo(r,e,n){return r.map(function(t){return Fr(t,e,n,!1,!0)})}function Mr(r,e,n,t){return n[e]==null?r:r.length===0?[]:Array.isArray(r[0])?Mr(r[0],e,n,t):typeof r[0]=="object"?bo(r,e,t):[r]}function Fr(r,e,n,t,i){if(!(Ae[e]||wt[e]))return[];var o=[];if(wt[e]&&(r=xo(r,n,wt[e],t)),Object.keys(r).length)for(var a in Ae[e]){if(r[a]){Array.isArray(r[a])?o.push(yo[a]===null?r[a]:r[a].join(" ")):o.push(r[a]);continue}Ae[e][a]!=null&&o.push(Ae[e][a])}return!o.length||i?o:[o]}function xo(r,e,n,t){for(var i in n){var o=n[i];if(typeof r[i]<"u"&&(t||!e.prop(o))){var a,s=se((a={},a[o]=r[i],a),e)[o];t?e.style.fallbacks[o]=s:e.style[o]=s}delete r[i]}return r}function se(r,e,n){for(var t in r){var i=r[t];if(Array.isArray(i)){if(!Array.isArray(i[0])){if(t==="fallbacks"){for(var o=0;o<r.fallbacks.length;o++)r.fallbacks[o]=se(r.fallbacks[o],e,!0);continue}r[t]=Mr(i,t,go,e),r[t].length||delete r[t]}}else if(typeof i=="object"){if(t==="fallbacks"){r.fallbacks=se(r.fallbacks,e,!0);continue}r[t]=Fr(i,t,e,n),r[t].length||delete r[t]}else r[t]===""&&delete r[t]}return r}function So(){function r(e,n){if(!e||n.type!=="style")return e;if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=se(e[t],n);return e}return se(e,n)}return{onProcessStyle:r}}var Lr=So;function le(r,e){(e==null||e>r.length)&&(e=r.length);for(var n=0,t=Array(e);n<e;n++)t[n]=r[n];return t}function Vr(r){if(Array.isArray(r))return le(r)}function Dr(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function Wr(r,e){if(r){if(typeof r=="string")return le(r,e);var n={}.toString.call(r).slice(8,-1);return n==="Object"&&r.constructor&&(n=r.constructor.name),n==="Map"||n==="Set"?Array.from(r):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?le(r,e):void 0}}function Br(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
9
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zr(r){return Vr(r)||Dr(r)||Wr(r)||Br()}var fe="",Rt="",Gr="",Jr="",Po=M&&"ontouchstart"in document.documentElement;if(M){Ie={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},$r=document.createElement("p"),_e=$r.style,Ur="Transform";for(je in Ie)if(je+Ur in _e){fe=je,Rt=Ie[je];break}fe==="Webkit"&&"msHyphens"in _e&&(fe="ms",Rt=Ie.ms,Jr="edge"),fe==="Webkit"&&"-apple-trailing-word"in _e&&(Gr="apple")}var Ie,$r,_e,Ur,je,h={js:fe,css:Rt,vendor:Gr,browser:Jr,isTouch:Po};function qr(r){return r[1]==="-"||h.js==="ms"?r:"@"+h.css+"keyframes"+r.substr(10)}var wo={noPrefill:["appearance"],supportedProperty:function(e){return e!=="appearance"?!1:h.js==="ms"?"-webkit-"+e:h.css+e}},Ro={noPrefill:["color-adjust"],supportedProperty:function(e){return e!=="color-adjust"?!1:h.js==="Webkit"?h.css+"print-"+e:e}},ko=/[-\s]+(.)?/g;function Co(r,e){return e?e.toUpperCase():""}function kt(r){return r.replace(ko,Co)}function $(r){return kt("-"+r)}var No={noPrefill:["mask"],supportedProperty:function(e,n){if(!/^mask/.test(e))return!1;if(h.js==="Webkit"){var t="mask-image";if(kt(t)in n)return e;if(h.js+$(t)in n)return h.css+e}return e}},Oo={noPrefill:["text-orientation"],supportedProperty:function(e){return e!=="text-orientation"?!1:h.vendor==="apple"&&!h.isTouch?h.css+e:e}},To={noPrefill:["transform"],supportedProperty:function(e,n,t){return e!=="transform"?!1:t.transform?e:h.css+e}},Eo={noPrefill:["transition"],supportedProperty:function(e,n,t){return e!=="transition"?!1:t.transition?e:h.css+e}},Ao={noPrefill:["writing-mode"],supportedProperty:function(e){return e!=="writing-mode"?!1:h.js==="Webkit"||h.js==="ms"&&h.browser!=="edge"?h.css+e:e}},Io={noPrefill:["user-select"],supportedProperty:function(e){return e!=="user-select"?!1:h.js==="Moz"||h.js==="ms"||h.vendor==="apple"?h.css+e:e}},_o={supportedProperty:function(e,n){if(!/^break-/.test(e))return!1;if(h.js==="Webkit"){var t="WebkitColumn"+$(e);return t in n?h.css+"column-"+e:!1}if(h.js==="Moz"){var i="page"+$(e);return i in n?"page-"+e:!1}return!1}},jo={supportedProperty:function(e,n){if(!/^(border|margin|padding)-inline/.test(e))return!1;if(h.js==="Moz")return e;var t=e.replace("-inline","");return h.js+$(t)in n?h.css+t:!1}},Mo={supportedProperty:function(e,n){return kt(e)in n?e:!1}},Fo={supportedProperty:function(e,n){var t=$(e);return e[0]==="-"||e[0]==="-"&&e[1]==="-"?e:h.js+t in n?h.css+e:h.js!=="Webkit"&&"Webkit"+t in n?"-webkit-"+e:!1}},Lo={supportedProperty:function(e){return e.substring(0,11)!=="scroll-snap"?!1:h.js==="ms"?""+h.css+e:e}},Vo={supportedProperty:function(e){return e!=="overscroll-behavior"?!1:h.js==="ms"?h.css+"scroll-chaining":e}},Do={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},Wo={supportedProperty:function(e,n){var t=Do[e];return t&&h.js+$(t)in n?h.css+t:!1}},Kr={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},Bo=Object.keys(Kr),zo=function(e){return h.css+e},$o={supportedProperty:function(e,n,t){var i=t.multiple;if(Bo.indexOf(e)>-1){var o=Kr[e];if(!Array.isArray(o))return h.js+$(o)in n?h.css+o:!1;if(!i)return!1;for(var a=0;a<o.length;a++)if(!(h.js+$(o[0])in n))return!1;return o.map(zo)}return!1}},Xr=[wo,Ro,No,Oo,To,Eo,Ao,Io,_o,jo,Mo,Fo,Lo,Vo,Wo,$o],Hr=Xr.filter(function(r){return r.supportedProperty}).map(function(r){return r.supportedProperty}),Uo=Xr.filter(function(r){return r.noPrefill}).reduce(function(r,e){return r.push.apply(r,zr(e.noPrefill)),r},[]),ue,q={};if(M){ue=document.createElement("p"),Me=window.getComputedStyle(document.documentElement,"");for(Fe in Me)isNaN(Fe)||(q[Me[Fe]]=Me[Fe]);Uo.forEach(function(r){return delete q[r]})}var Me,Fe;function Le(r,e){if(e===void 0&&(e={}),!ue)return r;if(q[r]!=null)return q[r];(r==="transition"||r==="transform")&&(e[r]=r in ue.style);for(var n=0;n<Hr.length&&(q[r]=Hr[n](r,ue.style,e),!q[r]);n++);try{ue.style[r]=""}catch{return!1}return q[r]}var ee={},Ho={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},Go=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g,z;function Jo(r,e,n){if(e==="var")return"var";if(e==="all")return"all";if(n==="all")return", all";var t=e?Le(e):", "+Le(n);return t||e||n}M&&(z=document.createElement("p"));function Ct(r,e){var n=e;if(!z||r==="content")return e;if(typeof n!="string"||!isNaN(parseInt(n,10)))return n;var t=r+n;if(ee[t]!=null)return ee[t];try{z.style[r]=n}catch{return ee[t]=!1,!1}if(Ho[r])n=n.replace(Go,Jo);else if(z.style[r]===""&&(n=h.css+n,n==="-ms-flex"&&(z.style[r]="-ms-flexbox"),z.style[r]=n,z.style[r]===""))return ee[t]=!1,!1;return z.style[r]="",ee[t]=n,ee[t]}function qo(){function r(i){if(i.type==="keyframes"){var o=i;o.at=qr(o.at)}}function e(i){for(var o in i){var a=i[o];if(o==="fallbacks"&&Array.isArray(a)){i[o]=a.map(e);continue}var s=!1,f=Le(o);f&&f!==o&&(s=!0);var u=!1,c=Ct(f,W(a));c&&c!==a&&(u=!0),(s||u)&&(s&&delete i[o],i[f||o]=c||a)}return i}function n(i,o){return o.type!=="style"?i:e(i)}function t(i,o){return Ct(o,W(i))||i}return{onProcessRule:r,onProcessStyle:n,onChangeValue:t}}var Yr=qo;function Ko(){var r=function(n,t){return n.length===t.length?n>t?1:-1:n.length-t.length};return{onProcessStyle:function(n,t){if(t.type!=="style")return n;for(var i={},o=Object.keys(n).sort(r),a=0;a<o.length;a++)i[o[a]]=n[o[a]];return i}}}var Zr=Ko;var Xo=function(e){return e===void 0&&(e={}),{plugins:[Pr(),Rr(e.observable),kr(),Nr(),Or(),Er(),Ar(),Ir(),jr(e.defaultUnit),Lr(),Yr(),Zr()]}},Ve=Xo;function Yo(r){var e={};return function(n){return e[n]===void 0&&(e[n]=r(n)),e[n]}}var Qr=Yo;var Zo=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|default|defer|dir|disabled|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|itemProp|itemScope|itemType|itemID|itemRef|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,tf=Qr(function(r){return Zo.test(r)||r.charCodeAt(0)===111&&r.charCodeAt(1)===110&&r.charCodeAt(2)<91});var Qo=1e4,ea=oe(Ve()),ta=function(e){e===void 0&&(e=ea);var n=new Map,t=0,i,o=function(){return(!i||i.rules.index.length>Qo)&&(i=e.createStyleSheet().attach()),i};function a(){var s=arguments,f=JSON.stringify(s),u=n.get(f);if(u)return u.className;var c=[];for(var d in s){var p=s[d];if(!Array.isArray(p)){c.push(p);continue}for(var m=0;m<p.length;m++)c.push(p[m])}for(var y={},v=[],R=0;R<c.length;R++){var C=c[R];if(C){var P=C;if(typeof C=="string"){var N=n.get(C);N&&(N.labels.length&&v.push.apply(v,N.labels),P=N.style)}P.label&&v.indexOf(P.label)===-1&&v.push(P.label),Object.assign(y,P)}}delete y.label;var V=v.length===0?"css":v.join("-"),S=V+"-"+t++;o().addRule(S,y);var k=o().classes[S],E={style:y,labels:v,className:k};return n.set(f,E),n.set(k,E),k}return a.getSheet=o,a},ra=ta(),en=ra;var fa=Number.MIN_SAFE_INTEGER||-1e9,ua=function(){return fa++},ca=ia({classNamePrefix:"",disableStylesGeneration:!1,isSSR:!M}),on=new Map,Ot=function(e,n){var t=e.managers;if(t)return t[n]||(t[n]=new dt),t[n];var i=on.get(n);return i||(i=new dt,on.set(n,i)),i},an=function(e){var n=e.sheet,t=e.context,i=e.index,o=e.theme;if(n){var a=Ot(t,i);a.manage(o),t.registry&&t.registry.add(n)}},da=function(e){if(e.sheet){var n=Ot(e.context,e.index);n.unmanage(e.theme)}},ha=oe(Ve()),fn=new WeakMap,un=function(e){return fn.get(e)},pa=function(e,n){fn.set(e,n)},ma=function(e){var n=e.styles;return typeof n!="function"?n:n(e.theme)};function va(r,e){var n;r.context.id&&r.context.id.minify!=null&&(n=r.context.id.minify);var t=r.context.classNamePrefix||"";r.name&&!n&&(t+=r.name.replace(/\s/g,"-")+"-");var i="";return r.name&&(i=r.name+", "),i+=typeof r.styles=="function"?"Themed":"Unthemed",x({},r.sheetOptions,{index:r.index,meta:i,classNamePrefix:t,link:e,generateId:r.sheetOptions&&r.sheetOptions.generateId?r.sheetOptions.generateId:r.context.generateId})}var ga=function(e){if(!e.context.disableStylesGeneration){var n=Ot(e.context,e.index),t=n.get(e.theme);if(t)return t;var i=e.context.jss||ha,o=ma(e),a=ht(o),s=i.createStyleSheet(o,va(e,a!==null));return pa(s,{dynamicStyles:a,styles:o}),n.add(e.theme,s),s}},ya=function(e,n){for(var t in n)e.deleteRule(n[t])},ba=function(e,n,t){for(var i in t)n.updateOne(t[i],e)},xa=function(e,n){var t=un(e);if(t){var i={};for(var o in t.dynamicStyles)for(var a=e.rules.index.length,s=e.addRule(o,t.dynamicStyles[o]),f=a;f<e.rules.index.length;f++){var u=e.rules.index[f];e.updateOne(u,n),i[s===u?o:u.key]=u}return i}},Sa=function(e,n){if(!n)return e.classes;var t=un(e);if(!t)return e.classes;var i={};for(var o in t.styles)i[o]=e.classes[o],o in n&&(i[o]+=" "+e.classes[n[o].key]);return i};function sn(r){return r?ln:na.useInsertionEffect||aa}var Nt={},w=function(e,n){n===void 0&&(n={});var t=n,i=t.index,o=i===void 0?ua():i,a=t.theming,s=t.name,f=de(t,["index","theming","name"]),u=a&&a.context||Ze,c=function(m){return typeof e=="function"&&(m||tn(u))||Nt},d={};return function(m){var y=oa(!0),v=tn(ca),R=c(m&&m.theme),C=rn(function(){var S=ga({context:v,styles:e,name:s,theme:R,index:o,sheetOptions:f});return S&&v.isSSR&&an({index:o,context:v,sheet:S,theme:R}),[S,S?xa(S,m):null]},[v,R]),P=C[0],N=C[1];sn(v.isSSR)(function(){P&&N&&!y.current&&ba(m,P,N)},[m]),sn(v.isSSR)(function(){return P&&an({index:o,context:v,sheet:P,theme:R}),function(){P&&(da({index:o,context:v,sheet:P,theme:R}),N&&ya(P,N))}},[P]);var V=rn(function(){return P&&N?Sa(P,N):d},[P,N]);return nn(V),nn(R===Nt?"No theme":R),ln(function(){y.current=!1}),V}};var xf=Symbol("react-jss-styled");var Pa=function(e){return e===void 0&&(e=en),function(t,i){var o=arguments;if(i&&i.css){var a=e(i.css),s=Object.assign({},i);s.className=i.className?i.className+" "+a:a,delete s.css,o[1]=s}return sa.apply(void 0,o)}},Sf=Pa();var O="teknify";import{jsx as cn}from"react/jsx-runtime";var wa=r=>cn("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"size-6",...r,children:cn("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z"})}),Tt=wa;import{jsx as dn}from"react/jsx-runtime";var Ra=r=>dn("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"size-6",...r,children:dn("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0"})}),Et=Ra;import{jsx as hn}from"react/jsx-runtime";var ka=r=>hn("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"size-6",...r,children:hn("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})}),At=ka;import{jsx as mn,jsxs as Oa}from"react/jsx-runtime";var Ca=w({button:r=>({width:40,height:40,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",backgroundColor:"#fff",border:"none",cursor:"pointer",transition:"all 0.2s ease-in-out",position:"relative","&:hover":{backgroundColor:"#f5f5f5"},...r.active&&{backgroundColor:"#f1f1f1"}}),badge:{position:"absolute",top:0,right:0,padding:"2px 6px",height:18,minWidth:18,backgroundColor:"red",display:"flex",justifyContent:"center",alignItems:"center",borderRadius:100,color:"#fff",fontSize:10,visibility:"hidden",opacity:0,transition:"all 0.2s ease-in-out",scale:.8,userSelect:"none"},badgeOpen:{visibility:"visible",opacity:1,scale:1}},{name:O}),Na=({className:r,counts:e,active:n,...t})=>{let i=Ca({counts:e,active:n}),o=pn(()=>e<=99?`${e}`:"99+",[e]),a=pn(()=>e>0,[e]);return Oa("button",{...t,className:`${i.button} ${r}`,children:[mn(Et,{width:24,height:24}),mn("div",{className:g(i.badge,a&&i.badgeOpen),children:o})]})},It=Na;import{jsx as Aa}from"react/jsx-runtime";var Ta=w({button:r=>({textDecoration:"none",background:`var(--${r.variant}-color)`,borderRadius:"var(--border-radius)",color:r.variant==="tertiary"?"#000":"#fff",fontWeight:500,border:"none",cursor:"pointer",fontSize:12,...r.icon?{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"}:{minWidth:100,padding:"8px 12px"},"&:hover":{background:`var(--${r.variant}-color-darker)`}})},{name:O}),Ea=({className:r,variant:e="tertiary",icon:n=!1,...t})=>{let i=Ta({variant:e,icon:n});return Aa("button",{...t,className:g(i.button,r)})},_=Ea;import{useContext as Wa}from"react";import{TeknifyClient as Ma}from"@tnf-dev/js";import{createContext as Fa,useMemo as La}from"react";var vn={components:{NotificationHeader:{notifications:"Notifications",readAll:"Read all"},Empty:{noNotifications:"No notifications"},Loader:{loading:"Loading..."},NotificationItem:{markAsRead:"Mark as read"}}};import{jsx as ja}from"react/jsx-runtime";var Ia=w({styleProvider:{fontFamily:"inherit, sans-serif",fontSize:13,"--background-color":"#f1f1f1","--card-background-color":"#fff","--primary-color":"#000088","--secondary-color":"#00C16E","--tertiary-color":"#f6f6f6","--primary-color-darker":"#000066","--secondary-color-darker":"#009955","--border-radius":"12px","& *::-webkit-scrollbar":{width:8,height:8},"& *::-webkit-scrollbar-thumb":{borderRadius:10,background:"#0003"}}}),_a=({children:r})=>{let e=Ia();return ja("div",{className:g(e.styleProvider),children:r})},gn=_a;import{jsx as yn}from"react/jsx-runtime";var F=Fa({applicationId:"",subscriberId:""}),Va=({applicationId:r,subscriberId:e,children:n,language:t,baseUrl:i,locale:o,socketUrl:a})=>{let s=La(()=>({applicationId:r,subscriberId:e,client:new Ma({applicationId:r,subscriberId:e,language:t,baseUrl:i,socketUrl:a}),locale:{...vn,...o}}),[r,e,t,i,a,o]);return yn(F.Provider,{value:s,children:yn(gn,{children:n})})},Da=Va;import{jsx as $a}from"react/jsx-runtime";var Ba=w({empty:{textAlign:"center",padding:"20px 0"}},{name:O}),za=()=>{let r=Ba(),{locale:e}=Wa(F);return $a("div",{className:g(r.empty),children:e.components.Empty.noNotifications})},_t=za;import{jsx as Ga}from"react/jsx-runtime";var Ua=w({error:{padding:10}}),Ha=({message:r})=>{let e=Ua();return Ga("div",{className:g(e.error),children:r})},jt=Ha;import{useCallback as cs,useState as wn}from"react";import ds from"react-infinite-scroller";import{useCallback as De,useContext as Ja,useEffect as We,useState as U}from"react";var bn=()=>{let{client:r}=Ja(F),[e,n]=U([]),[t,i]=U(!1),[o,a]=U(null),[s,f]=U(!1),[u,c]=U(!0),[d,p]=U(!0),[m,y]=U(),[v,R]=U(0),C=De(async S=>{try{n(k=>k.map(E=>E._id===S?{...E,isRead:!0}:E)),await r.notification.markAsRead(S)}catch{n(E=>E.map(j=>j._id===S?{...j,isRead:!1}:j))}},[]),P=De(async()=>{await r.notification.markAllAsRead(),n(S=>S.map(k=>({...k,isRead:!0})))},[]),N=De(async()=>{if(!(s||t))try{f(!0);let S=await r.notification.getNotifications({...m?{cursor:m}:{}});n(k=>[...k,...S.data.filter(E=>!k.find(j=>j._id===E._id)).map(E=>({...E,markAsRead:()=>C(E._id)}))]),p(!!S.pagination.continueCursor),y(S.pagination.continueCursor),R(S.unread)}catch{}finally{f(!1),c(!1)}},[s,m,C,t,r]);We(()=>{N()},[]),We(()=>{y(void 0)},[r]),We(()=>{let S=(k,{counts:E})=>{R(E.unread),n(j=>[...k.filter(K=>{let $t=j.findIndex(kn=>kn._id===K._id);return $t!==-1?(j[$t]={...K,markAsRead:()=>C(K._id)},!1):!0}).map(K=>({...K,markAsRead:()=>C(K._id)})),...j])};return r.notification.on(S),()=>{r.notification.off(S)}},[C,r]);let V=De(()=>{N()},[N]);return We(()=>{n([]),p(!0),y(void 0),c(!0),N()},[r]),{notifications:e,isLoading:s,isFirstLoad:u,isError:t,error:o,hasMore:d,unread:v,fetchMore:V,markAllAsRead:P}};import{useContext as qa}from"react";import{jsx as Ya}from"react/jsx-runtime";var Ka=w({loader:{textAlign:"center",padding:"20px 0"}}),Xa=()=>{let r=Ka(),{locale:e}=qa(F);return Ya("div",{className:g(r.loader),children:e.components.Loader.loading})},Mt=Xa;import{useContext as Za}from"react";import{jsx as Ft,jsxs as ts}from"react/jsx-runtime";var Qa=w({notificationHeader:{padding:"10px 15px",borderBottom:"1px solid #0001",display:"flex",justifyContent:"space-between",background:"var(--card-background-color)",borderRadius:"5px 5px 0 0",height:36,alignItems:"center"},notificationHeaderTitle:{fontSize:15,fontWeight:600,flex:1}},{name:O}),es=({markAllAsRead:r})=>{let e=Qa(),{locale:n}=Za(F);return ts("div",{className:g(e.notificationHeader),children:[Ft("h2",{className:g(e.notificationHeaderTitle),children:n.components.NotificationHeader.notifications}),Ft("div",{children:Ft(_,{onClick:r,children:n.components.NotificationHeader.readAll})})]})},Lt=es;import os from"sanitize-html";import{jsx as Be,jsxs as is}from"react/jsx-runtime";var rs=w({actions:{position:"absolute",top:5,right:5,display:"flex",gap:5,padding:0,background:"#fafafa",borderRadius:5},button:{background:"transparent","&:hover":{background:"#fafafa"}}},{name:O}),ns=({notification:r})=>{let e=rs();return is("div",{className:g(e.actions,`${O}-actions`),children:[!r.isRead&&Be(_,{icon:!0,onClick:r.markAsRead,className:g(e.button),children:Be(At,{width:12,height:12})}),Be(_,{icon:!0,className:g(e.button),children:Be(Tt,{width:12,height:12})})]})},xn=ns;import{jsx as L,jsxs as Vt}from"react/jsx-runtime";var as=w({notificationItem:{padding:"10px 15px",display:"flex",flexWrap:"wrap",columnGap:10,flexDirection:"column",margin:10,background:"var(--card-background-color)",borderRadius:10,border:"1px solid #ddd",position:"relative",[`& .${O}-actions`]:{visibility:"hidden",opacity:0,transition:"0.3s ease-in-out"},[`&:hover .${O}-actions`]:{visibility:"visible",opacity:1}},notificationItemImage:{width:24,height:24,objectFit:"cover"},notificationItemTitle:{fontSize:14,fontWeight:600,paddingBottom:5,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},notificationItemBody:{fontSize:14,lineClamp:2,overflow:"hidden",textOverflow:"ellipsis"},notificationItemActions:{display:"flex",gap:8,marginTop:10,alignItems:"center",justifyContent:"flex-end",width:"100%"},unreadDot:{width:7,height:7,borderRadius:100,background:"var(--primary-color)",position:"relative","&::before":{content:'""',position:"absolute",top:-3,left:-3,width:"calc(100% + 6px)",height:"calc(100% + 6px)",borderRadius:100,background:"var(--primary-color)",opacity:.2}}},{name:O}),ss=({notification:r})=>{let e=as();return Vt("div",{className:g(e.notificationItem),children:[Vt("div",{style:{display:"flex",gap:10,width:"100%"},children:[L("div",{children:r.icon&&L("img",{src:r.icon,alt:r.title,width:32,height:32,className:g(e.notificationItemImage)})}),Vt("div",{style:{flex:1,overflow:"hidden"},children:[L("h3",{className:g(e.notificationItemTitle),children:r.title}),L("div",{dangerouslySetInnerHTML:{__html:os(r.message)},className:g(e.notificationItemBody)})]}),!r.isRead&&L("div",{className:g(e.unreadDot)})]}),L("div",{className:g(e.notificationItemActions),children:r.actionButtons?.map(n=>L("a",{href:n.href,target:n.target,children:L(_,{variant:"secondary",children:n.label})},n.href))}),L(xn,{notification:r})]})},Dt=ss;import{useEffect as Sn,useMemo as Wt,useState as Pn}from"react";import{jsx as us}from"react/jsx-runtime";var ls=w({popover:{width:"100%",height:"100%",maxWidth:400,maxHeight:500,boxShadow:"0 10px 40px #0001",position:"fixed",background:"#fff",borderRadius:10,visibility:"hidden",opacity:0,scale:.8,transition:"all 0.3s",backgroundColor:"var(--background-color)",border:"1px solid var(--card-background-color)"},popoverOpen:{top:0,left:0,visibility:"visible",opacity:1,scale:1}},{name:O}),fs=({open:r,anchorElement:e,onClose:n,children:t})=>{let i=ls(),[o,a]=Pn(null),[s,f]=Pn(typeof window>"u"?0:window.innerWidth),u=Wt(()=>{if(!e)return 0;let p=e.getBoundingClientRect();return p.top+p.height+20},[e,s]),c=Wt(()=>e?e.getBoundingClientRect().left+10:0,[e,s]),d=Wt(()=>{if(!o||!e)return!0;let p=e.getBoundingClientRect(),m=o.getBoundingClientRect();return p.left+m.width>s},[o,e,s]);return Sn(()=>{let p=()=>{r&&n?.()};return window.addEventListener("click",p),()=>{window.removeEventListener("click",p)}},[r]),Sn(()=>{let p=()=>{f(window.innerWidth)};return window.addEventListener("resize",p),()=>{window.removeEventListener("resize",p)}},[]),us("div",{className:g(i.popover,r&&i.popoverOpen),style:{top:u,left:c,...d?{transform:"translateX(calc(-100% + 20px))"}:{}},ref:a,onClick:p=>{p.stopPropagation()},children:t})},Bt=fs;import{Fragment as ze,jsx as I,jsxs as zt}from"react/jsx-runtime";var hs=w({inboxContent:{height:"100%",display:"flex",flexDirection:"column"},inboxContentList:{flex:1,overflowY:"auto"}},{name:O}),ps={Bell:It,Button:_,NotificationHeader:Lt,Empty:_t,Loader:Mt,NotificationItem:Dt,NotificationPopover:Bt,NotificationError:jt},ms=({components:r})=>{let[e,n]=wn(null),[t,i]=wn(!1),{Bell:o,Empty:a,Loader:s,NotificationHeader:f,NotificationItem:u,NotificationPopover:c,NotificationError:d}={...ps,...r},p=cs(()=>{i(k=>!k)},[]),{notifications:m,unread:y,isFirstLoad:v,hasMore:R,fetchMore:C,isError:P,error:N,markAllAsRead:V}=bn(),S=hs();return zt(ze,{children:[I(o,{onClick:k=>{k.stopPropagation(),p()},ref:n,active:t,counts:y}),I(c,{open:t,anchorElement:e,onClose:p,children:zt("div",{className:g(S.inboxContent),children:[I(f,{markAllAsRead:V}),I("div",{className:g(S.inboxContentList),children:zt(ds,{loadMore:C,hasMore:R&&!P,loader:I(s,{},0),useWindow:!1,children:[v?I(ze,{}):I(ze,{children:m.length?I(ze,{children:m.map(k=>I(u,{notification:k},k._id))}):I(a,{})}),P&&I(d,{message:N?.message})]})})]})})]})},Rn=ms;export{It as Bell,_ as Button,_t as Empty,Rn as Inbox,Mt as Loader,jt as NotificationError,Lt as NotificationHeader,Dt as NotificationItem,Bt as NotificationPopover,F as TeknifyContext,Rn as TeknifyInbox,Da as TeknifyProvider,bn as useNotifications};
10
10
  /*! Bundled license information:
11
11
 
12
12
  react-is/cjs/react-is.production.min.js:
@@ -1,2 +1,2 @@
1
1
  "use client"
2
- var o={components:{NotificationHeader:{notifications:"Notifications"},Empty:{noNotifications:"No notifications"},Loader:{loading:"Loading..."},NotificationItem:{markAsRead:"Mark as read"}}};export{o as TEKNIFY_DEFAULT_LOCALE};
2
+ var o={components:{NotificationHeader:{notifications:"Notifications",readAll:"Read all"},Empty:{noNotifications:"No notifications"},Loader:{loading:"Loading..."},NotificationItem:{markAsRead:"Mark as read"}}};export{o as TEKNIFY_DEFAULT_LOCALE};
@@ -1,2 +1,2 @@
1
1
  "use client"
2
- var o={components:{NotificationHeader:{notifications:"Notifications"},Empty:{noNotifications:"No notifications"},Loader:{loading:"Loading..."},NotificationItem:{markAsRead:"Mark as read"}}};export{o as TEKNIFY_DEFAULT_LOCALE};
2
+ var o={components:{NotificationHeader:{notifications:"Notifications",readAll:"Read all"},Empty:{noNotifications:"No notifications"},Loader:{loading:"Loading..."},NotificationItem:{markAsRead:"Mark as read"}}};export{o as TEKNIFY_DEFAULT_LOCALE};
@@ -2,6 +2,7 @@ interface TeknifyLocale {
2
2
  components: {
3
3
  NotificationHeader: {
4
4
  notifications: string;
5
+ readAll: string;
5
6
  };
6
7
  Empty: {
7
8
  noNotifications: string;
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  ]
14
14
  },
15
15
  "dependencies": {
16
- "@tnf-dev/js": "1.0.1-20",
16
+ "@tnf-dev/js": "1.0.1-22",
17
17
  "react": "^19.1.0",
18
18
  "react-dom": "^19.1.0",
19
19
  "react-infinite-scroller": "^1.2.6",
@@ -87,5 +87,5 @@
87
87
  "sideEffects": false,
88
88
  "type": "module",
89
89
  "types": "./dist/esm/index.d.ts",
90
- "version": "1.0.1-20"
90
+ "version": "1.0.1-22"
91
91
  }