@ukpc-lib/react 0.2.50 → 0.3.1

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.
Files changed (26) hide show
  1. package/dist/components/GlobalMenu/components/MenuItem.d.ts +4 -0
  2. package/dist/components/Topbar/index.d.ts +1 -0
  3. package/dist/components/index.cjs +2 -2
  4. package/dist/components/index.js +27 -27
  5. package/dist/index.css +1 -1
  6. package/dist/{index.module-d95d516c.js → index.module-16bdfef5.js} +372 -369
  7. package/dist/{index.module-d584a693.cjs → index.module-5fdb50ba.cjs} +28 -28
  8. package/dist/share/index.cjs +1 -1
  9. package/dist/share/index.js +2 -2
  10. package/package.json +1 -1
  11. package/web-components-bundle/access-denied/index.cjs +1 -1
  12. package/web-components-bundle/access-denied/index.js +1 -1
  13. package/web-components-bundle/global-menu/index.cjs +1 -1
  14. package/web-components-bundle/global-menu/index.js +1 -1
  15. package/web-components-bundle/global-topbar/index.cjs +1 -1
  16. package/web-components-bundle/global-topbar/index.js +2 -2
  17. package/web-components-bundle/has-permission/index.cjs +1 -1
  18. package/web-components-bundle/has-permission/index.js +2 -2
  19. package/web-components-bundle/{index-b1536310.js → index-4173d527.js} +7 -8
  20. package/web-components-bundle/{index-80b585a5.cjs → index-6c123355.cjs} +4 -4
  21. package/web-components-bundle/{index-c085e37e.cjs → index-813b234d.cjs} +15 -15
  22. package/web-components-bundle/{index-98a255d7.js → index-a716cadc.js} +503 -499
  23. package/dist/web-components/global-menu.d.ts +0 -1
  24. package/dist/web-components/global-topbar.d.ts +0 -1
  25. package/dist/web-components/has-permission.d.ts +0 -1
  26. package/dist/web-components/index.d.ts +0 -2
@@ -1,4 +1,4 @@
1
- "use strict";const D=require("./react-to-web-component-5d347552.cjs"),ce=require("./index-c085e37e.cjs"),Iu=require("./index-5627e1e9.cjs");function zg(e){var t,r,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=zg(e[t]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}function Zn(){for(var e,t,r=0,s="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=zg(e))&&(s&&(s+=" "),s+=t);return s}function ww({primaryColor:e="#009d4f"}){return D.jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",children:[D.jsxRuntimeExports.jsx("path",{d:"M8.5 19.5H8C4 19.5 2 18.5 2 13.5V8.5C2 4.5 4 2.5 8 2.5H16C20 2.5 22 4.5 22 8.5V13.5C22 17.5 20 19.5 16 19.5H15.5C15.19 19.5 14.89 19.65 14.7 19.9L13.2 21.9C12.54 22.78 11.46 22.78 10.8 21.9L9.3 19.9C9.14 19.68 8.77 19.5 8.5 19.5Z",stroke:e,"stroke-width":"1.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),D.jsxRuntimeExports.jsx("path",{d:"M15.9965 11.5H16.0054",stroke:e,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),D.jsxRuntimeExports.jsx("path",{d:"M11.9955 11.5H12.0045",stroke:e,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),D.jsxRuntimeExports.jsx("path",{d:"M7.99451 11.5H8.00349",stroke:e,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]})}const Sw=e=>{const{tabs:t}=e,r=s=>{e.setCurrentTab(s.target.id)};return D.jsxRuntimeExports.jsxs("div",{className:"tab-container",children:[D.jsxRuntimeExports.jsx("div",{style:{display:"flex",width:"100%",height:"50px",borderBottom:`1px solid ${ce.color.grey200}`},className:"tab-container__title",children:t.map((s,o)=>D.jsxRuntimeExports.jsx("button",{id:s.id,disabled:e.currentTab===`${s.id}`,onClick:r,className:`tab-title ${e.currentTab===`${s.id}`?"is-active":""}`,children:s.tabTitle},o))}),D.jsxRuntimeExports.jsx("div",{className:"tab-content",children:t.map((s,o)=>D.jsxRuntimeExports.jsx("div",{children:e.currentTab===`${s.id}`&&D.jsxRuntimeExports.jsx("div",{children:s.children})},o))})]})};//! moment.js
1
+ "use strict";const D=require("./react-to-web-component-5d347552.cjs"),ce=require("./index-813b234d.cjs"),Iu=require("./index-5627e1e9.cjs");function zg(e){var t,r,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=zg(e[t]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}function Zn(){for(var e,t,r=0,s="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=zg(e))&&(s&&(s+=" "),s+=t);return s}function ww({primaryColor:e="#009d4f"}){return D.jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",children:[D.jsxRuntimeExports.jsx("path",{d:"M8.5 19.5H8C4 19.5 2 18.5 2 13.5V8.5C2 4.5 4 2.5 8 2.5H16C20 2.5 22 4.5 22 8.5V13.5C22 17.5 20 19.5 16 19.5H15.5C15.19 19.5 14.89 19.65 14.7 19.9L13.2 21.9C12.54 22.78 11.46 22.78 10.8 21.9L9.3 19.9C9.14 19.68 8.77 19.5 8.5 19.5Z",stroke:e,"stroke-width":"1.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),D.jsxRuntimeExports.jsx("path",{d:"M15.9965 11.5H16.0054",stroke:e,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),D.jsxRuntimeExports.jsx("path",{d:"M11.9955 11.5H12.0045",stroke:e,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),D.jsxRuntimeExports.jsx("path",{d:"M7.99451 11.5H8.00349",stroke:e,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]})}const Sw=e=>{const{tabs:t}=e,r=s=>{e.setCurrentTab(s.target.id)};return D.jsxRuntimeExports.jsxs("div",{className:"tab-container",children:[D.jsxRuntimeExports.jsx("div",{style:{display:"flex",width:"100%",height:"50px",borderBottom:`1px solid ${ce.color.grey200}`},className:"tab-container__title",children:t.map((s,o)=>D.jsxRuntimeExports.jsx("button",{id:s.id,disabled:e.currentTab===`${s.id}`,onClick:r,className:`tab-title ${e.currentTab===`${s.id}`?"is-active":""}`,children:s.tabTitle},o))}),D.jsxRuntimeExports.jsx("div",{className:"tab-content",children:t.map((s,o)=>D.jsxRuntimeExports.jsx("div",{children:e.currentTab===`${s.id}`&&D.jsxRuntimeExports.jsx("div",{children:s.children})},o))})]})};//! moment.js
2
2
  //! version : 2.30.1
3
3
  //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
4
4
  //! license : MIT
@@ -7,7 +7,7 @@ var Vg;function ae(){return Vg.apply(null,arguments)}function kw(e){Vg=e}functio
7
7
  [`+c+"] ";for(h in arguments[0])Ge(arguments[0],h)&&(o+=h+": "+arguments[0][h]+", ");o=o.slice(0,-2)}else o=arguments[c];s.push(o)}Kg(e+`
8
8
  Arguments: `+Array.prototype.slice.call(s).join("")+`
9
9
  `+new Error().stack),r=!1}return t.apply(this,arguments)},t)}var Vp={};function Zg(e,t){ae.deprecationHandler!=null&&ae.deprecationHandler(e,t),Vp[e]||(Kg(t),Vp[e]=!0)}ae.suppressDeprecationWarnings=!1;ae.deprecationHandler=null;function Yr(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function Dw(e){var t,r;for(r in e)Ge(e,r)&&(t=e[r],Yr(t)?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Af(e,t){var r=ji({},e),s;for(s in t)Ge(t,s)&&(hs(e[s])&&hs(t[s])?(r[s]={},ji(r[s],e[s]),ji(r[s],t[s])):t[s]!=null?r[s]=t[s]:delete r[s]);for(s in e)Ge(e,s)&&!Ge(t,s)&&hs(e[s])&&(r[s]=ji({},r[s]));return r}function td(e){e!=null&&this.set(e)}var If;Object.keys?If=Object.keys:If=function(e){var t,r=[];for(t in e)Ge(e,t)&&r.push(t);return r};var Ew={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function Tw(e,t,r){var s=this._calendar[e]||this._calendar.sameElse;return Yr(s)?s.call(t,r):s}function $r(e,t,r){var s=""+Math.abs(e),o=t-s.length,c=e>=0;return(c?r?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+s}var nd=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Du=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,hf={},Vs={};function be(e,t,r,s){var o=s;typeof s=="string"&&(o=function(){return this[s]()}),e&&(Vs[e]=o),t&&(Vs[t[0]]=function(){return $r(o.apply(this,arguments),t[1],t[2])}),r&&(Vs[r]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function Mw(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Rw(e){var t=e.match(nd),r,s;for(r=0,s=t.length;r<s;r++)Vs[t[r]]?t[r]=Vs[t[r]]:t[r]=Mw(t[r]);return function(o){var c="",h;for(h=0;h<s;h++)c+=Yr(t[h])?t[h].call(o,e):t[h];return c}}function Ou(e,t){return e.isValid()?(t=Xg(t,e.localeData()),hf[t]=hf[t]||Rw(t),hf[t](e)):e.localeData().invalidDate()}function Xg(e,t){var r=5;function s(o){return t.longDateFormat(o)||o}for(Du.lastIndex=0;r>=0&&Du.test(e);)e=e.replace(Du,s),Du.lastIndex=0,r-=1;return e}var Aw={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Iw(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(nd).map(function(s){return s==="MMMM"||s==="MM"||s==="DD"||s==="dddd"?s.slice(1):s}).join(""),this._longDateFormat[e])}var Ow="Invalid date";function Pw(){return this._invalidDate}var Nw="%d",Lw=/\d{1,2}/;function jw(e){return this._ordinal.replace("%d",e)}var $w={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Fw(e,t,r,s){var o=this._relativeTime[r];return Yr(o)?o(e,t,r,s):o.replace(/%d/i,e)}function Yw(e,t){var r=this._relativeTime[e>0?"future":"past"];return Yr(r)?r(t):r.replace(/%s/i,t)}var Gp={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function nr(e){return typeof e=="string"?Gp[e]||Gp[e.toLowerCase()]:void 0}function rd(e){var t={},r,s;for(s in e)Ge(e,s)&&(r=nr(s),r&&(t[r]=e[s]));return t}var Ww={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Bw(e){var t=[],r;for(r in e)Ge(e,r)&&t.push({unit:r,priority:Ww[r]});return t.sort(function(s,o){return s.priority-o.priority}),t}var Jg=/\d/,Nn=/\d\d/,Qg=/\d{3}/,id=/\d{4}/,Qu=/[+-]?\d{6}/,ct=/\d\d?/,em=/\d\d\d\d?/,tm=/\d\d\d\d\d\d?/,el=/\d{1,3}/,sd=/\d{1,4}/,tl=/[+-]?\d{1,6}/,Qs=/\d+/,nl=/[+-]?\d+/,Hw=/Z|[+-]\d\d:?\d\d/gi,rl=/Z|[+-]\d\d(?::?\d\d)?/gi,Uw=/[+-]?\d+(\.\d{1,3})?/,uo=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ea=/^[1-9]\d?/,ad=/^([1-9]\d|\d)/,Wu;Wu={};function pe(e,t,r){Wu[e]=Yr(t)?t:function(s,o){return s&&r?r:t}}function qw(e,t){return Ge(Wu,e)?Wu[e](t._strict,t._locale):new RegExp(zw(e))}function zw(e){return fi(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,r,s,o,c){return r||s||o||c}))}function fi(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Jn(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Be(e){var t=+e,r=0;return t!==0&&isFinite(t)&&(r=Jn(t)),r}var Of={};function st(e,t){var r,s=t,o;for(typeof e=="string"&&(e=[e]),pi(t)&&(s=function(c,h){h[t]=Be(c)}),o=e.length,r=0;r<o;r++)Of[e[r]]=s}function lo(e,t){st(e,function(r,s,o,c){o._w=o._w||{},t(r,o._w,o,c)})}function Vw(e,t,r){t!=null&&Ge(Of,e)&&Of[e](t,r._a,r,e)}function il(e){return e%4===0&&e%100!==0||e%400===0}var tn=0,li=1,Pr=2,Pt=3,gr=4,ci=5,cs=6,Gw=7,Kw=8;be("Y",0,0,function(){var e=this.year();return e<=9999?$r(e,4):"+"+e});be(0,["YY",2],0,function(){return this.year()%100});be(0,["YYYY",4],0,"year");be(0,["YYYYY",5],0,"year");be(0,["YYYYYY",6,!0],0,"year");pe("Y",nl);pe("YY",ct,Nn);pe("YYYY",sd,id);pe("YYYYY",tl,Qu);pe("YYYYYY",tl,Qu);st(["YYYYY","YYYYYY"],tn);st("YYYY",function(e,t){t[tn]=e.length===2?ae.parseTwoDigitYear(e):Be(e)});st("YY",function(e,t){t[tn]=ae.parseTwoDigitYear(e)});st("Y",function(e,t){t[tn]=parseInt(e,10)});function Va(e){return il(e)?366:365}ae.parseTwoDigitYear=function(e){return Be(e)+(Be(e)>68?1900:2e3)};var nm=ta("FullYear",!0);function Zw(){return il(this.year())}function ta(e,t){return function(r){return r!=null?(rm(this,e,r),ae.updateOffset(this,t),this):Ka(this,e)}}function Ka(e,t){if(!e.isValid())return NaN;var r=e._d,s=e._isUTC;switch(t){case"Milliseconds":return s?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return s?r.getUTCSeconds():r.getSeconds();case"Minutes":return s?r.getUTCMinutes():r.getMinutes();case"Hours":return s?r.getUTCHours():r.getHours();case"Date":return s?r.getUTCDate():r.getDate();case"Day":return s?r.getUTCDay():r.getDay();case"Month":return s?r.getUTCMonth():r.getMonth();case"FullYear":return s?r.getUTCFullYear():r.getFullYear();default:return NaN}}function rm(e,t,r){var s,o,c,h,x;if(!(!e.isValid()||isNaN(r))){switch(s=e._d,o=e._isUTC,t){case"Milliseconds":return void(o?s.setUTCMilliseconds(r):s.setMilliseconds(r));case"Seconds":return void(o?s.setUTCSeconds(r):s.setSeconds(r));case"Minutes":return void(o?s.setUTCMinutes(r):s.setMinutes(r));case"Hours":return void(o?s.setUTCHours(r):s.setHours(r));case"Date":return void(o?s.setUTCDate(r):s.setDate(r));case"FullYear":break;default:return}c=r,h=e.month(),x=e.date(),x=x===29&&h===1&&!il(c)?28:x,o?s.setUTCFullYear(c,h,x):s.setFullYear(c,h,x)}}function Xw(e){return e=nr(e),Yr(this[e])?this[e]():this}function Jw(e,t){if(typeof e=="object"){e=rd(e);var r=Bw(e),s,o=r.length;for(s=0;s<o;s++)this[r[s].unit](e[r[s].unit])}else if(e=nr(e),Yr(this[e]))return this[e](t);return this}function Qw(e,t){return(e%t+t)%t}var kt;Array.prototype.indexOf?kt=Array.prototype.indexOf:kt=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function od(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=Qw(t,12);return e+=(t-r)/12,r===1?il(e)?29:28:31-r%7%2}be("M",["MM",2],"Mo",function(){return this.month()+1});be("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});be("MMMM",0,0,function(e){return this.localeData().months(this,e)});pe("M",ct,ea);pe("MM",ct,Nn);pe("MMM",function(e,t){return t.monthsShortRegex(e)});pe("MMMM",function(e,t){return t.monthsRegex(e)});st(["M","MM"],function(e,t){t[li]=Be(e)-1});st(["MMM","MMMM"],function(e,t,r,s){var o=r._locale.monthsParse(e,s,r._strict);o!=null?t[li]=o:Ie(r).invalidMonth=e});var eS="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),im="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),sm=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,tS=uo,nS=uo;function rS(e,t){return e?mr(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||sm).test(t)?"format":"standalone"][e.month()]:mr(this._months)?this._months:this._months.standalone}function iS(e,t){return e?mr(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[sm.test(t)?"format":"standalone"][e.month()]:mr(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function sS(e,t,r){var s,o,c,h=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)c=Fr([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(c,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(c,"").toLocaleLowerCase();return r?t==="MMM"?(o=kt.call(this._shortMonthsParse,h),o!==-1?o:null):(o=kt.call(this._longMonthsParse,h),o!==-1?o:null):t==="MMM"?(o=kt.call(this._shortMonthsParse,h),o!==-1?o:(o=kt.call(this._longMonthsParse,h),o!==-1?o:null)):(o=kt.call(this._longMonthsParse,h),o!==-1?o:(o=kt.call(this._shortMonthsParse,h),o!==-1?o:null))}function aS(e,t,r){var s,o,c;if(this._monthsParseExact)return sS.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(o=Fr([2e3,s]),r&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),!r&&!this._monthsParse[s]&&(c="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[s]=new RegExp(c.replace(".",""),"i")),r&&t==="MMMM"&&this._longMonthsParse[s].test(e))return s;if(r&&t==="MMM"&&this._shortMonthsParse[s].test(e))return s;if(!r&&this._monthsParse[s].test(e))return s}}function am(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=Be(t);else if(t=e.localeData().monthsParse(t),!pi(t))return e}var r=t,s=e.date();return s=s<29?s:Math.min(s,od(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,s):e._d.setMonth(r,s),e}function om(e){return e!=null?(am(this,e),ae.updateOffset(this,!0),this):Ka(this,"Month")}function oS(){return od(this.year(),this.month())}function uS(e){return this._monthsParseExact?(Ge(this,"_monthsRegex")||um.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(Ge(this,"_monthsShortRegex")||(this._monthsShortRegex=tS),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function lS(e){return this._monthsParseExact?(Ge(this,"_monthsRegex")||um.call(this),e?this._monthsStrictRegex:this._monthsRegex):(Ge(this,"_monthsRegex")||(this._monthsRegex=nS),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function um(){function e(S,E){return E.length-S.length}var t=[],r=[],s=[],o,c,h,x;for(o=0;o<12;o++)c=Fr([2e3,o]),h=fi(this.monthsShort(c,"")),x=fi(this.months(c,"")),t.push(h),r.push(x),s.push(x),s.push(h);t.sort(e),r.sort(e),s.sort(e),this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function cS(e,t,r,s,o,c,h){var x;return e<100&&e>=0?(x=new Date(e+400,t,r,s,o,c,h),isFinite(x.getFullYear())&&x.setFullYear(e)):x=new Date(e,t,r,s,o,c,h),x}function Za(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Bu(e,t,r){var s=7+t-r,o=(7+Za(e,0,s).getUTCDay()-t)%7;return-o+s-1}function lm(e,t,r,s,o){var c=(7+r-s)%7,h=Bu(e,s,o),x=1+7*(t-1)+c+h,S,E;return x<=0?(S=e-1,E=Va(S)+x):x>Va(e)?(S=e+1,E=x-Va(e)):(S=e,E=x),{year:S,dayOfYear:E}}function Xa(e,t,r){var s=Bu(e.year(),t,r),o=Math.floor((e.dayOfYear()-s-1)/7)+1,c,h;return o<1?(h=e.year()-1,c=o+di(h,t,r)):o>di(e.year(),t,r)?(c=o-di(e.year(),t,r),h=e.year()+1):(h=e.year(),c=o),{week:c,year:h}}function di(e,t,r){var s=Bu(e,t,r),o=Bu(e+1,t,r);return(Va(e)-s+o)/7}be("w",["ww",2],"wo","week");be("W",["WW",2],"Wo","isoWeek");pe("w",ct,ea);pe("ww",ct,Nn);pe("W",ct,ea);pe("WW",ct,Nn);lo(["w","ww","W","WW"],function(e,t,r,s){t[s.substr(0,1)]=Be(e)});function fS(e){return Xa(e,this._week.dow,this._week.doy).week}var dS={dow:0,doy:6};function hS(){return this._week.dow}function pS(){return this._week.doy}function gS(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function mS(e){var t=Xa(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}be("d",0,"do","day");be("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});be("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});be("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});be("e",0,0,"weekday");be("E",0,0,"isoWeekday");pe("d",ct);pe("e",ct);pe("E",ct);pe("dd",function(e,t){return t.weekdaysMinRegex(e)});pe("ddd",function(e,t){return t.weekdaysShortRegex(e)});pe("dddd",function(e,t){return t.weekdaysRegex(e)});lo(["dd","ddd","dddd"],function(e,t,r,s){var o=r._locale.weekdaysParse(e,s,r._strict);o!=null?t.d=o:Ie(r).invalidWeekday=e});lo(["d","e","E"],function(e,t,r,s){t[s]=Be(e)});function yS(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function vS(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function ud(e,t){return e.slice(t,7).concat(e.slice(0,t))}var bS="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),cm="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),xS="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),_S=uo,wS=uo,SS=uo;function kS(e,t){var r=mr(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?ud(r,this._week.dow):e?r[e.day()]:r}function CS(e){return e===!0?ud(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function DS(e){return e===!0?ud(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function ES(e,t,r){var s,o,c,h=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)c=Fr([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(c,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(c,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(c,"").toLocaleLowerCase();return r?t==="dddd"?(o=kt.call(this._weekdaysParse,h),o!==-1?o:null):t==="ddd"?(o=kt.call(this._shortWeekdaysParse,h),o!==-1?o:null):(o=kt.call(this._minWeekdaysParse,h),o!==-1?o:null):t==="dddd"?(o=kt.call(this._weekdaysParse,h),o!==-1||(o=kt.call(this._shortWeekdaysParse,h),o!==-1)?o:(o=kt.call(this._minWeekdaysParse,h),o!==-1?o:null)):t==="ddd"?(o=kt.call(this._shortWeekdaysParse,h),o!==-1||(o=kt.call(this._weekdaysParse,h),o!==-1)?o:(o=kt.call(this._minWeekdaysParse,h),o!==-1?o:null)):(o=kt.call(this._minWeekdaysParse,h),o!==-1||(o=kt.call(this._weekdaysParse,h),o!==-1)?o:(o=kt.call(this._shortWeekdaysParse,h),o!==-1?o:null))}function TS(e,t,r){var s,o,c;if(this._weekdaysParseExact)return ES.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(o=Fr([2e3,1]).day(s),r&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(c="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[s]=new RegExp(c.replace(".",""),"i")),r&&t==="dddd"&&this._fullWeekdaysParse[s].test(e))return s;if(r&&t==="ddd"&&this._shortWeekdaysParse[s].test(e))return s;if(r&&t==="dd"&&this._minWeekdaysParse[s].test(e))return s;if(!r&&this._weekdaysParse[s].test(e))return s}}function MS(e){if(!this.isValid())return e!=null?this:NaN;var t=Ka(this,"Day");return e!=null?(e=yS(e,this.localeData()),this.add(e-t,"d")):t}function RS(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function AS(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=vS(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function IS(e){return this._weekdaysParseExact?(Ge(this,"_weekdaysRegex")||ld.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(Ge(this,"_weekdaysRegex")||(this._weekdaysRegex=_S),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function OS(e){return this._weekdaysParseExact?(Ge(this,"_weekdaysRegex")||ld.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Ge(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=wS),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function PS(e){return this._weekdaysParseExact?(Ge(this,"_weekdaysRegex")||ld.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Ge(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=SS),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function ld(){function e(A,Y){return Y.length-A.length}var t=[],r=[],s=[],o=[],c,h,x,S,E;for(c=0;c<7;c++)h=Fr([2e3,1]).day(c),x=fi(this.weekdaysMin(h,"")),S=fi(this.weekdaysShort(h,"")),E=fi(this.weekdays(h,"")),t.push(x),r.push(S),s.push(E),o.push(x),o.push(S),o.push(E);t.sort(e),r.sort(e),s.sort(e),o.sort(e),this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function cd(){return this.hours()%12||12}function NS(){return this.hours()||24}be("H",["HH",2],0,"hour");be("h",["hh",2],0,cd);be("k",["kk",2],0,NS);be("hmm",0,0,function(){return""+cd.apply(this)+$r(this.minutes(),2)});be("hmmss",0,0,function(){return""+cd.apply(this)+$r(this.minutes(),2)+$r(this.seconds(),2)});be("Hmm",0,0,function(){return""+this.hours()+$r(this.minutes(),2)});be("Hmmss",0,0,function(){return""+this.hours()+$r(this.minutes(),2)+$r(this.seconds(),2)});function fm(e,t){be(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}fm("a",!0);fm("A",!1);function dm(e,t){return t._meridiemParse}pe("a",dm);pe("A",dm);pe("H",ct,ad);pe("h",ct,ea);pe("k",ct,ea);pe("HH",ct,Nn);pe("hh",ct,Nn);pe("kk",ct,Nn);pe("hmm",em);pe("hmmss",tm);pe("Hmm",em);pe("Hmmss",tm);st(["H","HH"],Pt);st(["k","kk"],function(e,t,r){var s=Be(e);t[Pt]=s===24?0:s});st(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e});st(["h","hh"],function(e,t,r){t[Pt]=Be(e),Ie(r).bigHour=!0});st("hmm",function(e,t,r){var s=e.length-2;t[Pt]=Be(e.substr(0,s)),t[gr]=Be(e.substr(s)),Ie(r).bigHour=!0});st("hmmss",function(e,t,r){var s=e.length-4,o=e.length-2;t[Pt]=Be(e.substr(0,s)),t[gr]=Be(e.substr(s,2)),t[ci]=Be(e.substr(o)),Ie(r).bigHour=!0});st("Hmm",function(e,t,r){var s=e.length-2;t[Pt]=Be(e.substr(0,s)),t[gr]=Be(e.substr(s))});st("Hmmss",function(e,t,r){var s=e.length-4,o=e.length-2;t[Pt]=Be(e.substr(0,s)),t[gr]=Be(e.substr(s,2)),t[ci]=Be(e.substr(o))});function LS(e){return(e+"").toLowerCase().charAt(0)==="p"}var jS=/[ap]\.?m?\.?/i,$S=ta("Hours",!0);function FS(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var hm={calendar:Ew,longDateFormat:Aw,invalidDate:Ow,ordinal:Nw,dayOfMonthOrdinalParse:Lw,relativeTime:$w,months:eS,monthsShort:im,week:dS,weekdays:bS,weekdaysMin:xS,weekdaysShort:cm,meridiemParse:jS},ht={},Ha={},Ja;function YS(e,t){var r,s=Math.min(e.length,t.length);for(r=0;r<s;r+=1)if(e[r]!==t[r])return r;return s}function Kp(e){return e&&e.toLowerCase().replace("_","-")}function WS(e){for(var t=0,r,s,o,c;t<e.length;){for(c=Kp(e[t]).split("-"),r=c.length,s=Kp(e[t+1]),s=s?s.split("-"):null;r>0;){if(o=sl(c.slice(0,r).join("-")),o)return o;if(s&&s.length>=r&&YS(c,s)>=r-1)break;r--}t++}return Ja}function BS(e){return!!(e&&e.match("^[^/\\\\]*$"))}function sl(e){var t=null,r;if(ht[e]===void 0&&typeof module<"u"&&module&&module.exports&&BS(e))try{t=Ja._abbr,r=require,r("./locale/"+e),Fi(t)}catch{ht[e]=null}return ht[e]}function Fi(e,t){var r;return e&&(wn(t)?r=mi(e):r=fd(e,t),r?Ja=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Ja._abbr}function fd(e,t){if(t!==null){var r,s=hm;if(t.abbr=e,ht[e]!=null)Zg("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=ht[e]._config;else if(t.parentLocale!=null)if(ht[t.parentLocale]!=null)s=ht[t.parentLocale]._config;else if(r=sl(t.parentLocale),r!=null)s=r._config;else return Ha[t.parentLocale]||(Ha[t.parentLocale]=[]),Ha[t.parentLocale].push({name:e,config:t}),null;return ht[e]=new td(Af(s,t)),Ha[e]&&Ha[e].forEach(function(o){fd(o.name,o.config)}),Fi(e),ht[e]}else return delete ht[e],null}function HS(e,t){if(t!=null){var r,s,o=hm;ht[e]!=null&&ht[e].parentLocale!=null?ht[e].set(Af(ht[e]._config,t)):(s=sl(e),s!=null&&(o=s._config),t=Af(o,t),s==null&&(t.abbr=e),r=new td(t),r.parentLocale=ht[e],ht[e]=r),Fi(e)}else ht[e]!=null&&(ht[e].parentLocale!=null?(ht[e]=ht[e].parentLocale,e===Fi()&&Fi(e)):ht[e]!=null&&delete ht[e]);return ht[e]}function mi(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Ja;if(!mr(e)){if(t=sl(e),t)return t;e=[e]}return WS(e)}function US(){return If(ht)}function dd(e){var t,r=e._a;return r&&Ie(e).overflow===-2&&(t=r[li]<0||r[li]>11?li:r[Pr]<1||r[Pr]>od(r[tn],r[li])?Pr:r[Pt]<0||r[Pt]>24||r[Pt]===24&&(r[gr]!==0||r[ci]!==0||r[cs]!==0)?Pt:r[gr]<0||r[gr]>59?gr:r[ci]<0||r[ci]>59?ci:r[cs]<0||r[cs]>999?cs:-1,Ie(e)._overflowDayOfYear&&(t<tn||t>Pr)&&(t=Pr),Ie(e)._overflowWeeks&&t===-1&&(t=Gw),Ie(e)._overflowWeekday&&t===-1&&(t=Kw),Ie(e).overflow=t),e}var qS=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,zS=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,VS=/Z|[+-]\d\d(?::?\d\d)?/,Eu=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],pf=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],GS=/^\/?Date\((-?\d+)/i,KS=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,ZS={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function pm(e){var t,r,s=e._i,o=qS.exec(s)||zS.exec(s),c,h,x,S,E=Eu.length,A=pf.length;if(o){for(Ie(e).iso=!0,t=0,r=E;t<r;t++)if(Eu[t][1].exec(o[1])){h=Eu[t][0],c=Eu[t][2]!==!1;break}if(h==null){e._isValid=!1;return}if(o[3]){for(t=0,r=A;t<r;t++)if(pf[t][1].exec(o[3])){x=(o[2]||" ")+pf[t][0];break}if(x==null){e._isValid=!1;return}}if(!c&&x!=null){e._isValid=!1;return}if(o[4])if(VS.exec(o[4]))S="Z";else{e._isValid=!1;return}e._f=h+(x||"")+(S||""),pd(e)}else e._isValid=!1}function XS(e,t,r,s,o,c){var h=[JS(e),im.indexOf(t),parseInt(r,10),parseInt(s,10),parseInt(o,10)];return c&&h.push(parseInt(c,10)),h}function JS(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function QS(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function ek(e,t,r){if(e){var s=cm.indexOf(e),o=new Date(t[0],t[1],t[2]).getDay();if(s!==o)return Ie(r).weekdayMismatch=!0,r._isValid=!1,!1}return!0}function tk(e,t,r){if(e)return ZS[e];if(t)return 0;var s=parseInt(r,10),o=s%100,c=(s-o)/100;return c*60+o}function gm(e){var t=KS.exec(QS(e._i)),r;if(t){if(r=XS(t[4],t[3],t[2],t[5],t[6],t[7]),!ek(t[1],r,e))return;e._a=r,e._tzm=tk(t[8],t[9],t[10]),e._d=Za.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),Ie(e).rfc2822=!0}else e._isValid=!1}function nk(e){var t=GS.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(pm(e),e._isValid===!1)delete e._isValid;else return;if(gm(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:ae.createFromInputFallback(e)}ae.createFromInputFallback=tr("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function qs(e,t,r){return e??t??r}function rk(e){var t=new Date(ae.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function hd(e){var t,r,s=[],o,c,h;if(!e._d){for(o=rk(e),e._w&&e._a[Pr]==null&&e._a[li]==null&&ik(e),e._dayOfYear!=null&&(h=qs(e._a[tn],o[tn]),(e._dayOfYear>Va(h)||e._dayOfYear===0)&&(Ie(e)._overflowDayOfYear=!0),r=Za(h,0,e._dayOfYear),e._a[li]=r.getUTCMonth(),e._a[Pr]=r.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=s[t]=o[t];for(;t<7;t++)e._a[t]=s[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Pt]===24&&e._a[gr]===0&&e._a[ci]===0&&e._a[cs]===0&&(e._nextDay=!0,e._a[Pt]=0),e._d=(e._useUTC?Za:cS).apply(null,s),c=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Pt]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==c&&(Ie(e).weekdayMismatch=!0)}}function ik(e){var t,r,s,o,c,h,x,S,E;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(c=1,h=4,r=qs(t.GG,e._a[tn],Xa(lt(),1,4).year),s=qs(t.W,1),o=qs(t.E,1),(o<1||o>7)&&(S=!0)):(c=e._locale._week.dow,h=e._locale._week.doy,E=Xa(lt(),c,h),r=qs(t.gg,e._a[tn],E.year),s=qs(t.w,E.week),t.d!=null?(o=t.d,(o<0||o>6)&&(S=!0)):t.e!=null?(o=t.e+c,(t.e<0||t.e>6)&&(S=!0)):o=c),s<1||s>di(r,c,h)?Ie(e)._overflowWeeks=!0:S!=null?Ie(e)._overflowWeekday=!0:(x=lm(r,s,o,c,h),e._a[tn]=x.year,e._dayOfYear=x.dayOfYear)}ae.ISO_8601=function(){};ae.RFC_2822=function(){};function pd(e){if(e._f===ae.ISO_8601){pm(e);return}if(e._f===ae.RFC_2822){gm(e);return}e._a=[],Ie(e).empty=!0;var t=""+e._i,r,s,o,c,h,x=t.length,S=0,E,A;for(o=Xg(e._f,e._locale).match(nd)||[],A=o.length,r=0;r<A;r++)c=o[r],s=(t.match(qw(c,e))||[])[0],s&&(h=t.substr(0,t.indexOf(s)),h.length>0&&Ie(e).unusedInput.push(h),t=t.slice(t.indexOf(s)+s.length),S+=s.length),Vs[c]?(s?Ie(e).empty=!1:Ie(e).unusedTokens.push(c),Vw(c,s,e)):e._strict&&!s&&Ie(e).unusedTokens.push(c);Ie(e).charsLeftOver=x-S,t.length>0&&Ie(e).unusedInput.push(t),e._a[Pt]<=12&&Ie(e).bigHour===!0&&e._a[Pt]>0&&(Ie(e).bigHour=void 0),Ie(e).parsedDateParts=e._a.slice(0),Ie(e).meridiem=e._meridiem,e._a[Pt]=sk(e._locale,e._a[Pt],e._meridiem),E=Ie(e).era,E!==null&&(e._a[tn]=e._locale.erasConvertYear(E,e._a[tn])),hd(e),dd(e)}function sk(e,t,r){var s;return r==null?t:e.meridiemHour!=null?e.meridiemHour(t,r):(e.isPM!=null&&(s=e.isPM(r),s&&t<12&&(t+=12),!s&&t===12&&(t=0)),t)}function ak(e){var t,r,s,o,c,h,x=!1,S=e._f.length;if(S===0){Ie(e).invalidFormat=!0,e._d=new Date(NaN);return}for(o=0;o<S;o++)c=0,h=!1,t=ed({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[o],pd(t),Qf(t)&&(h=!0),c+=Ie(t).charsLeftOver,c+=Ie(t).unusedTokens.length*10,Ie(t).score=c,x?c<s&&(s=c,r=t):(s==null||c<s||h)&&(s=c,r=t,h&&(x=!0));ji(e,r||t)}function ok(e){if(!e._d){var t=rd(e._i),r=t.day===void 0?t.date:t.day;e._a=Gg([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],function(s){return s&&parseInt(s,10)}),hd(e)}}function uk(e){var t=new oo(dd(mm(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function mm(e){var t=e._i,r=e._f;return e._locale=e._locale||mi(e._l),t===null||r===void 0&&t===""?Ju({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),yr(t)?new oo(dd(t)):(ao(t)?e._d=t:mr(r)?ak(e):r?pd(e):lk(e),Qf(e)||(e._d=null),e))}function lk(e){var t=e._i;wn(t)?e._d=new Date(ae.now()):ao(t)?e._d=new Date(t.valueOf()):typeof t=="string"?nk(e):mr(t)?(e._a=Gg(t.slice(0),function(r){return parseInt(r,10)}),hd(e)):hs(t)?ok(e):pi(t)?e._d=new Date(t):ae.createFromInputFallback(e)}function ym(e,t,r,s,o){var c={};return(t===!0||t===!1)&&(s=t,t=void 0),(r===!0||r===!1)&&(s=r,r=void 0),(hs(e)&&Jf(e)||mr(e)&&e.length===0)&&(e=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=o,c._l=r,c._i=e,c._f=t,c._strict=s,uk(c)}function lt(e,t,r,s){return ym(e,t,r,s,!1)}var ck=tr("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=lt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:Ju()}),fk=tr("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=lt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:Ju()});function vm(e,t){var r,s;if(t.length===1&&mr(t[0])&&(t=t[0]),!t.length)return lt();for(r=t[0],s=1;s<t.length;++s)(!t[s].isValid()||t[s][e](r))&&(r=t[s]);return r}function dk(){var e=[].slice.call(arguments,0);return vm("isBefore",e)}function hk(){var e=[].slice.call(arguments,0);return vm("isAfter",e)}var pk=function(){return Date.now?Date.now():+new Date},Ua=["year","quarter","month","week","day","hour","minute","second","millisecond"];function gk(e){var t,r=!1,s,o=Ua.length;for(t in e)if(Ge(e,t)&&!(kt.call(Ua,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(s=0;s<o;++s)if(e[Ua[s]]){if(r)return!1;parseFloat(e[Ua[s]])!==Be(e[Ua[s]])&&(r=!0)}return!0}function mk(){return this._isValid}function yk(){return vr(NaN)}function al(e){var t=rd(e),r=t.year||0,s=t.quarter||0,o=t.month||0,c=t.week||t.isoWeek||0,h=t.day||0,x=t.hour||0,S=t.minute||0,E=t.second||0,A=t.millisecond||0;this._isValid=gk(t),this._milliseconds=+A+E*1e3+S*6e4+x*1e3*60*60,this._days=+h+c*7,this._months=+o+s*3+r*12,this._data={},this._locale=mi(),this._bubble()}function Pu(e){return e instanceof al}function Pf(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function vk(e,t,r){var s=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),c=0,h;for(h=0;h<s;h++)(r&&e[h]!==t[h]||!r&&Be(e[h])!==Be(t[h]))&&c++;return c+o}function bm(e,t){be(e,0,0,function(){var r=this.utcOffset(),s="+";return r<0&&(r=-r,s="-"),s+$r(~~(r/60),2)+t+$r(~~r%60,2)})}bm("Z",":");bm("ZZ","");pe("Z",rl);pe("ZZ",rl);st(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=gd(rl,e)});var bk=/([\+\-]|\d\d)/gi;function gd(e,t){var r=(t||"").match(e),s,o,c;return r===null?null:(s=r[r.length-1]||[],o=(s+"").match(bk)||["-",0,0],c=+(o[1]*60)+Be(o[2]),c===0?0:o[0]==="+"?c:-c)}function md(e,t){var r,s;return t._isUTC?(r=t.clone(),s=(yr(e)||ao(e)?e.valueOf():lt(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+s),ae.updateOffset(r,!1),r):lt(e).local()}function Nf(e){return-Math.round(e._d.getTimezoneOffset())}ae.updateOffset=function(){};function xk(e,t,r){var s=this._offset||0,o;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=gd(rl,e),e===null)return this}else Math.abs(e)<16&&!r&&(e=e*60);return!this._isUTC&&t&&(o=Nf(this)),this._offset=e,this._isUTC=!0,o!=null&&this.add(o,"m"),s!==e&&(!t||this._changeInProgress?wm(this,vr(e-s,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,ae.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?s:Nf(this)}function _k(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function wk(e){return this.utcOffset(0,e)}function Sk(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Nf(this),"m")),this}function kk(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=gd(Hw,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function Ck(e){return this.isValid()?(e=e?lt(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function Dk(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ek(){if(!wn(this._isDSTShifted))return this._isDSTShifted;var e={},t;return ed(e,this),e=mm(e),e._a?(t=e._isUTC?Fr(e._a):lt(e._a),this._isDSTShifted=this.isValid()&&vk(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Tk(){return this.isValid()?!this._isUTC:!1}function Mk(){return this.isValid()?this._isUTC:!1}function xm(){return this.isValid()?this._isUTC&&this._offset===0:!1}var Rk=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Ak=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function vr(e,t){var r=e,s=null,o,c,h;return Pu(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:pi(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(s=Rk.exec(e))?(o=s[1]==="-"?-1:1,r={y:0,d:Be(s[Pr])*o,h:Be(s[Pt])*o,m:Be(s[gr])*o,s:Be(s[ci])*o,ms:Be(Pf(s[cs]*1e3))*o}):(s=Ak.exec(e))?(o=s[1]==="-"?-1:1,r={y:os(s[2],o),M:os(s[3],o),w:os(s[4],o),d:os(s[5],o),h:os(s[6],o),m:os(s[7],o),s:os(s[8],o)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(h=Ik(lt(r.from),lt(r.to)),r={},r.ms=h.milliseconds,r.M=h.months),c=new al(r),Pu(e)&&Ge(e,"_locale")&&(c._locale=e._locale),Pu(e)&&Ge(e,"_isValid")&&(c._isValid=e._isValid),c}vr.fn=al.prototype;vr.invalid=yk;function os(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function Zp(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function Ik(e,t){var r;return e.isValid()&&t.isValid()?(t=md(t,e),e.isBefore(t)?r=Zp(e,t):(r=Zp(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function _m(e,t){return function(r,s){var o,c;return s!==null&&!isNaN(+s)&&(Zg(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),c=r,r=s,s=c),o=vr(r,s),wm(this,o,e),this}}function wm(e,t,r,s){var o=t._milliseconds,c=Pf(t._days),h=Pf(t._months);e.isValid()&&(s=s??!0,h&&am(e,Ka(e,"Month")+h*r),c&&rm(e,"Date",Ka(e,"Date")+c*r),o&&e._d.setTime(e._d.valueOf()+o*r),s&&ae.updateOffset(e,c||h))}var Ok=_m(1,"add"),Pk=_m(-1,"subtract");function Sm(e){return typeof e=="string"||e instanceof String}function Nk(e){return yr(e)||ao(e)||Sm(e)||pi(e)||jk(e)||Lk(e)||e===null||e===void 0}function Lk(e){var t=hs(e)&&!Jf(e),r=!1,s=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],o,c,h=s.length;for(o=0;o<h;o+=1)c=s[o],r=r||Ge(e,c);return t&&r}function jk(e){var t=mr(e),r=!1;return t&&(r=e.filter(function(s){return!pi(s)&&Sm(e)}).length===0),t&&r}function $k(e){var t=hs(e)&&!Jf(e),r=!1,s=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],o,c;for(o=0;o<s.length;o+=1)c=s[o],r=r||Ge(e,c);return t&&r}function Fk(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function Yk(e,t){arguments.length===1&&(arguments[0]?Nk(arguments[0])?(e=arguments[0],t=void 0):$k(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||lt(),s=md(r,this).startOf("day"),o=ae.calendarFormat(this,s)||"sameElse",c=t&&(Yr(t[o])?t[o].call(this,r):t[o]);return this.format(c||this.localeData().calendar(o,this,lt(r)))}function Wk(){return new oo(this)}function Bk(e,t){var r=yr(e)?e:lt(e);return this.isValid()&&r.isValid()?(t=nr(t)||"millisecond",t==="millisecond"?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf()):!1}function Hk(e,t){var r=yr(e)?e:lt(e);return this.isValid()&&r.isValid()?(t=nr(t)||"millisecond",t==="millisecond"?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf()):!1}function Uk(e,t,r,s){var o=yr(e)?e:lt(e),c=yr(t)?t:lt(t);return this.isValid()&&o.isValid()&&c.isValid()?(s=s||"()",(s[0]==="("?this.isAfter(o,r):!this.isBefore(o,r))&&(s[1]===")"?this.isBefore(c,r):!this.isAfter(c,r))):!1}function qk(e,t){var r=yr(e)?e:lt(e),s;return this.isValid()&&r.isValid()?(t=nr(t)||"millisecond",t==="millisecond"?this.valueOf()===r.valueOf():(s=r.valueOf(),this.clone().startOf(t).valueOf()<=s&&s<=this.clone().endOf(t).valueOf())):!1}function zk(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Vk(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Gk(e,t,r){var s,o,c;if(!this.isValid())return NaN;if(s=md(e,this),!s.isValid())return NaN;switch(o=(s.utcOffset()-this.utcOffset())*6e4,t=nr(t),t){case"year":c=Nu(this,s)/12;break;case"month":c=Nu(this,s);break;case"quarter":c=Nu(this,s)/3;break;case"second":c=(this-s)/1e3;break;case"minute":c=(this-s)/6e4;break;case"hour":c=(this-s)/36e5;break;case"day":c=(this-s-o)/864e5;break;case"week":c=(this-s-o)/6048e5;break;default:c=this-s}return r?c:Jn(c)}function Nu(e,t){if(e.date()<t.date())return-Nu(t,e);var r=(t.year()-e.year())*12+(t.month()-e.month()),s=e.clone().add(r,"months"),o,c;return t-s<0?(o=e.clone().add(r-1,"months"),c=(t-s)/(s-o)):(o=e.clone().add(r+1,"months"),c=(t-s)/(o-s)),-(r+c)||0}ae.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";ae.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Kk(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Zk(e){if(!this.isValid())return null;var t=e!==!0,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?Ou(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Yr(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Ou(r,"Z")):Ou(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Xk(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,s,o,c;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',s=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o="-MM-DD[T]HH:mm:ss.SSS",c=t+'[")]',this.format(r+s+o+c)}function Jk(e){e||(e=this.isUtc()?ae.defaultFormatUtc:ae.defaultFormat);var t=Ou(this,e);return this.localeData().postformat(t)}function Qk(e,t){return this.isValid()&&(yr(e)&&e.isValid()||lt(e).isValid())?vr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function eC(e){return this.from(lt(),e)}function tC(e,t){return this.isValid()&&(yr(e)&&e.isValid()||lt(e).isValid())?vr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function nC(e){return this.to(lt(),e)}function km(e){var t;return e===void 0?this._locale._abbr:(t=mi(e),t!=null&&(this._locale=t),this)}var Cm=tr("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Dm(){return this._locale}var Hu=1e3,Gs=60*Hu,Uu=60*Gs,Em=(365*400+97)*24*Uu;function Ks(e,t){return(e%t+t)%t}function Tm(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-Em:new Date(e,t,r).valueOf()}function Mm(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-Em:Date.UTC(e,t,r)}function rC(e){var t,r;if(e=nr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?Mm:Tm,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Ks(t+(this._isUTC?0:this.utcOffset()*Gs),Uu);break;case"minute":t=this._d.valueOf(),t-=Ks(t,Gs);break;case"second":t=this._d.valueOf(),t-=Ks(t,Hu);break}return this._d.setTime(t),ae.updateOffset(this,!0),this}function iC(e){var t,r;if(e=nr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?Mm:Tm,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Uu-Ks(t+(this._isUTC?0:this.utcOffset()*Gs),Uu)-1;break;case"minute":t=this._d.valueOf(),t+=Gs-Ks(t,Gs)-1;break;case"second":t=this._d.valueOf(),t+=Hu-Ks(t,Hu)-1;break}return this._d.setTime(t),ae.updateOffset(this,!0),this}function sC(){return this._d.valueOf()-(this._offset||0)*6e4}function aC(){return Math.floor(this.valueOf()/1e3)}function oC(){return new Date(this.valueOf())}function uC(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function lC(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function cC(){return this.isValid()?this.toISOString():null}function fC(){return Qf(this)}function dC(){return ji({},Ie(this))}function hC(){return Ie(this).overflow}function pC(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}be("N",0,0,"eraAbbr");be("NN",0,0,"eraAbbr");be("NNN",0,0,"eraAbbr");be("NNNN",0,0,"eraName");be("NNNNN",0,0,"eraNarrow");be("y",["y",1],"yo","eraYear");be("y",["yy",2],0,"eraYear");be("y",["yyy",3],0,"eraYear");be("y",["yyyy",4],0,"eraYear");pe("N",yd);pe("NN",yd);pe("NNN",yd);pe("NNNN",CC);pe("NNNNN",DC);st(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,s){var o=r._locale.erasParse(e,s,r._strict);o?Ie(r).era=o:Ie(r).invalidEra=e});pe("y",Qs);pe("yy",Qs);pe("yyy",Qs);pe("yyyy",Qs);pe("yo",EC);st(["y","yy","yyy","yyyy"],tn);st(["yo"],function(e,t,r,s){var o;r._locale._eraYearOrdinalRegex&&(o=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[tn]=r._locale.eraYearOrdinalParse(e,o):t[tn]=parseInt(e,10)});function gC(e,t){var r,s,o,c=this._eras||mi("en")._eras;for(r=0,s=c.length;r<s;++r){switch(typeof c[r].since){case"string":o=ae(c[r].since).startOf("day"),c[r].since=o.valueOf();break}switch(typeof c[r].until){case"undefined":c[r].until=1/0;break;case"string":o=ae(c[r].until).startOf("day").valueOf(),c[r].until=o.valueOf();break}}return c}function mC(e,t,r){var s,o,c=this.eras(),h,x,S;for(e=e.toUpperCase(),s=0,o=c.length;s<o;++s)if(h=c[s].name.toUpperCase(),x=c[s].abbr.toUpperCase(),S=c[s].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(x===e)return c[s];break;case"NNNN":if(h===e)return c[s];break;case"NNNNN":if(S===e)return c[s];break}else if([h,x,S].indexOf(e)>=0)return c[s]}function yC(e,t){var r=e.since<=e.until?1:-1;return t===void 0?ae(e.since).year():ae(e.since).year()+(t-e.offset)*r}function vC(){var e,t,r,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),s[e].since<=r&&r<=s[e].until||s[e].until<=r&&r<=s[e].since)return s[e].name;return""}function bC(){var e,t,r,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),s[e].since<=r&&r<=s[e].until||s[e].until<=r&&r<=s[e].since)return s[e].narrow;return""}function xC(){var e,t,r,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),s[e].since<=r&&r<=s[e].until||s[e].until<=r&&r<=s[e].since)return s[e].abbr;return""}function _C(){var e,t,r,s,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(r=o[e].since<=o[e].until?1:-1,s=this.clone().startOf("day").valueOf(),o[e].since<=s&&s<=o[e].until||o[e].until<=s&&s<=o[e].since)return(this.year()-ae(o[e].since).year())*r+o[e].offset;return this.year()}function wC(e){return Ge(this,"_erasNameRegex")||vd.call(this),e?this._erasNameRegex:this._erasRegex}function SC(e){return Ge(this,"_erasAbbrRegex")||vd.call(this),e?this._erasAbbrRegex:this._erasRegex}function kC(e){return Ge(this,"_erasNarrowRegex")||vd.call(this),e?this._erasNarrowRegex:this._erasRegex}function yd(e,t){return t.erasAbbrRegex(e)}function CC(e,t){return t.erasNameRegex(e)}function DC(e,t){return t.erasNarrowRegex(e)}function EC(e,t){return t._eraYearOrdinalRegex||Qs}function vd(){var e=[],t=[],r=[],s=[],o,c,h,x,S,E=this.eras();for(o=0,c=E.length;o<c;++o)h=fi(E[o].name),x=fi(E[o].abbr),S=fi(E[o].narrow),t.push(h),e.push(x),r.push(S),s.push(h),s.push(x),s.push(S);this._erasRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}be(0,["gg",2],0,function(){return this.weekYear()%100});be(0,["GG",2],0,function(){return this.isoWeekYear()%100});function ol(e,t){be(0,[e,e.length],0,t)}ol("gggg","weekYear");ol("ggggg","weekYear");ol("GGGG","isoWeekYear");ol("GGGGG","isoWeekYear");pe("G",nl);pe("g",nl);pe("GG",ct,Nn);pe("gg",ct,Nn);pe("GGGG",sd,id);pe("gggg",sd,id);pe("GGGGG",tl,Qu);pe("ggggg",tl,Qu);lo(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,s){t[s.substr(0,2)]=Be(e)});lo(["gg","GG"],function(e,t,r,s){t[s]=ae.parseTwoDigitYear(e)});function TC(e){return Rm.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function MC(e){return Rm.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function RC(){return di(this.year(),1,4)}function AC(){return di(this.isoWeekYear(),1,4)}function IC(){var e=this.localeData()._week;return di(this.year(),e.dow,e.doy)}function OC(){var e=this.localeData()._week;return di(this.weekYear(),e.dow,e.doy)}function Rm(e,t,r,s,o){var c;return e==null?Xa(this,s,o).year:(c=di(e,s,o),t>c&&(t=c),PC.call(this,e,t,r,s,o))}function PC(e,t,r,s,o){var c=lm(e,t,r,s,o),h=Za(c.year,0,c.dayOfYear);return this.year(h.getUTCFullYear()),this.month(h.getUTCMonth()),this.date(h.getUTCDate()),this}be("Q",0,"Qo","quarter");pe("Q",Jg);st("Q",function(e,t){t[li]=(Be(e)-1)*3});function NC(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}be("D",["DD",2],"Do","date");pe("D",ct,ea);pe("DD",ct,Nn);pe("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});st(["D","DD"],Pr);st("Do",function(e,t){t[Pr]=Be(e.match(ct)[0])});var Am=ta("Date",!0);be("DDD",["DDDD",3],"DDDo","dayOfYear");pe("DDD",el);pe("DDDD",Qg);st(["DDD","DDDD"],function(e,t,r){r._dayOfYear=Be(e)});function LC(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}be("m",["mm",2],0,"minute");pe("m",ct,ad);pe("mm",ct,Nn);st(["m","mm"],gr);var jC=ta("Minutes",!1);be("s",["ss",2],0,"second");pe("s",ct,ad);pe("ss",ct,Nn);st(["s","ss"],ci);var $C=ta("Seconds",!1);be("S",0,0,function(){return~~(this.millisecond()/100)});be(0,["SS",2],0,function(){return~~(this.millisecond()/10)});be(0,["SSS",3],0,"millisecond");be(0,["SSSS",4],0,function(){return this.millisecond()*10});be(0,["SSSSS",5],0,function(){return this.millisecond()*100});be(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});be(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});be(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});be(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});pe("S",el,Jg);pe("SS",el,Nn);pe("SSS",el,Qg);var $i,Im;for($i="SSSS";$i.length<=9;$i+="S")pe($i,Qs);function FC(e,t){t[cs]=Be(("0."+e)*1e3)}for($i="S";$i.length<=9;$i+="S")st($i,FC);Im=ta("Milliseconds",!1);be("z",0,0,"zoneAbbr");be("zz",0,0,"zoneName");function YC(){return this._isUTC?"UTC":""}function WC(){return this._isUTC?"Coordinated Universal Time":""}var ne=oo.prototype;ne.add=Ok;ne.calendar=Yk;ne.clone=Wk;ne.diff=Gk;ne.endOf=iC;ne.format=Jk;ne.from=Qk;ne.fromNow=eC;ne.to=tC;ne.toNow=nC;ne.get=Xw;ne.invalidAt=hC;ne.isAfter=Bk;ne.isBefore=Hk;ne.isBetween=Uk;ne.isSame=qk;ne.isSameOrAfter=zk;ne.isSameOrBefore=Vk;ne.isValid=fC;ne.lang=Cm;ne.locale=km;ne.localeData=Dm;ne.max=fk;ne.min=ck;ne.parsingFlags=dC;ne.set=Jw;ne.startOf=rC;ne.subtract=Pk;ne.toArray=uC;ne.toObject=lC;ne.toDate=oC;ne.toISOString=Zk;ne.inspect=Xk;typeof Symbol<"u"&&Symbol.for!=null&&(ne[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});ne.toJSON=cC;ne.toString=Kk;ne.unix=aC;ne.valueOf=sC;ne.creationData=pC;ne.eraName=vC;ne.eraNarrow=bC;ne.eraAbbr=xC;ne.eraYear=_C;ne.year=nm;ne.isLeapYear=Zw;ne.weekYear=TC;ne.isoWeekYear=MC;ne.quarter=ne.quarters=NC;ne.month=om;ne.daysInMonth=oS;ne.week=ne.weeks=gS;ne.isoWeek=ne.isoWeeks=mS;ne.weeksInYear=IC;ne.weeksInWeekYear=OC;ne.isoWeeksInYear=RC;ne.isoWeeksInISOWeekYear=AC;ne.date=Am;ne.day=ne.days=MS;ne.weekday=RS;ne.isoWeekday=AS;ne.dayOfYear=LC;ne.hour=ne.hours=$S;ne.minute=ne.minutes=jC;ne.second=ne.seconds=$C;ne.millisecond=ne.milliseconds=Im;ne.utcOffset=xk;ne.utc=wk;ne.local=Sk;ne.parseZone=kk;ne.hasAlignedHourOffset=Ck;ne.isDST=Dk;ne.isLocal=Tk;ne.isUtcOffset=Mk;ne.isUtc=xm;ne.isUTC=xm;ne.zoneAbbr=YC;ne.zoneName=WC;ne.dates=tr("dates accessor is deprecated. Use date instead.",Am);ne.months=tr("months accessor is deprecated. Use month instead",om);ne.years=tr("years accessor is deprecated. Use year instead",nm);ne.zone=tr("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",_k);ne.isDSTShifted=tr("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Ek);function BC(e){return lt(e*1e3)}function HC(){return lt.apply(null,arguments).parseZone()}function Om(e){return e}var Ke=td.prototype;Ke.calendar=Tw;Ke.longDateFormat=Iw;Ke.invalidDate=Pw;Ke.ordinal=jw;Ke.preparse=Om;Ke.postformat=Om;Ke.relativeTime=Fw;Ke.pastFuture=Yw;Ke.set=Dw;Ke.eras=gC;Ke.erasParse=mC;Ke.erasConvertYear=yC;Ke.erasAbbrRegex=SC;Ke.erasNameRegex=wC;Ke.erasNarrowRegex=kC;Ke.months=rS;Ke.monthsShort=iS;Ke.monthsParse=aS;Ke.monthsRegex=lS;Ke.monthsShortRegex=uS;Ke.week=fS;Ke.firstDayOfYear=pS;Ke.firstDayOfWeek=hS;Ke.weekdays=kS;Ke.weekdaysMin=DS;Ke.weekdaysShort=CS;Ke.weekdaysParse=TS;Ke.weekdaysRegex=IS;Ke.weekdaysShortRegex=OS;Ke.weekdaysMinRegex=PS;Ke.isPM=LS;Ke.meridiem=FS;function qu(e,t,r,s){var o=mi(),c=Fr().set(s,t);return o[r](c,e)}function Pm(e,t,r){if(pi(e)&&(t=e,e=void 0),e=e||"",t!=null)return qu(e,t,r,"month");var s,o=[];for(s=0;s<12;s++)o[s]=qu(e,s,r,"month");return o}function bd(e,t,r,s){typeof e=="boolean"?(pi(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,pi(t)&&(r=t,t=void 0),t=t||"");var o=mi(),c=e?o._week.dow:0,h,x=[];if(r!=null)return qu(t,(r+c)%7,s,"day");for(h=0;h<7;h++)x[h]=qu(t,(h+c)%7,s,"day");return x}function UC(e,t){return Pm(e,t,"months")}function qC(e,t){return Pm(e,t,"monthsShort")}function zC(e,t,r){return bd(e,t,r,"weekdays")}function VC(e,t,r){return bd(e,t,r,"weekdaysShort")}function GC(e,t,r){return bd(e,t,r,"weekdaysMin")}Fi("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,r=Be(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}});ae.lang=tr("moment.lang is deprecated. Use moment.locale instead.",Fi);ae.langData=tr("moment.langData is deprecated. Use moment.localeData instead.",mi);var ai=Math.abs;function KC(){var e=this._data;return this._milliseconds=ai(this._milliseconds),this._days=ai(this._days),this._months=ai(this._months),e.milliseconds=ai(e.milliseconds),e.seconds=ai(e.seconds),e.minutes=ai(e.minutes),e.hours=ai(e.hours),e.months=ai(e.months),e.years=ai(e.years),this}function Nm(e,t,r,s){var o=vr(t,r);return e._milliseconds+=s*o._milliseconds,e._days+=s*o._days,e._months+=s*o._months,e._bubble()}function ZC(e,t){return Nm(this,e,t,1)}function XC(e,t){return Nm(this,e,t,-1)}function Xp(e){return e<0?Math.floor(e):Math.ceil(e)}function JC(){var e=this._milliseconds,t=this._days,r=this._months,s=this._data,o,c,h,x,S;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=Xp(Lf(r)+t)*864e5,t=0,r=0),s.milliseconds=e%1e3,o=Jn(e/1e3),s.seconds=o%60,c=Jn(o/60),s.minutes=c%60,h=Jn(c/60),s.hours=h%24,t+=Jn(h/24),S=Jn(Lm(t)),r+=S,t-=Xp(Lf(S)),x=Jn(r/12),r%=12,s.days=t,s.months=r,s.years=x,this}function Lm(e){return e*4800/146097}function Lf(e){return e*146097/4800}function QC(e){if(!this.isValid())return NaN;var t,r,s=this._milliseconds;if(e=nr(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+s/864e5,r=this._months+Lm(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Lf(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return t*24+s/36e5;case"minute":return t*1440+s/6e4;case"second":return t*86400+s/1e3;case"millisecond":return Math.floor(t*864e5)+s;default:throw new Error("Unknown unit "+e)}}function yi(e){return function(){return this.as(e)}}var jm=yi("ms"),eD=yi("s"),tD=yi("m"),nD=yi("h"),rD=yi("d"),iD=yi("w"),sD=yi("M"),aD=yi("Q"),oD=yi("y"),uD=jm;function lD(){return vr(this)}function cD(e){return e=nr(e),this.isValid()?this[e+"s"]():NaN}function bs(e){return function(){return this.isValid()?this._data[e]:NaN}}var fD=bs("milliseconds"),dD=bs("seconds"),hD=bs("minutes"),pD=bs("hours"),gD=bs("days"),mD=bs("months"),yD=bs("years");function vD(){return Jn(this.days()/7)}var oi=Math.round,zs={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function bD(e,t,r,s,o){return o.relativeTime(t||1,!!r,e,s)}function xD(e,t,r,s){var o=vr(e).abs(),c=oi(o.as("s")),h=oi(o.as("m")),x=oi(o.as("h")),S=oi(o.as("d")),E=oi(o.as("M")),A=oi(o.as("w")),Y=oi(o.as("y")),$=c<=r.ss&&["s",c]||c<r.s&&["ss",c]||h<=1&&["m"]||h<r.m&&["mm",h]||x<=1&&["h"]||x<r.h&&["hh",x]||S<=1&&["d"]||S<r.d&&["dd",S];return r.w!=null&&($=$||A<=1&&["w"]||A<r.w&&["ww",A]),$=$||E<=1&&["M"]||E<r.M&&["MM",E]||Y<=1&&["y"]||["yy",Y],$[2]=t,$[3]=+e>0,$[4]=s,bD.apply(null,$)}function _D(e){return e===void 0?oi:typeof e=="function"?(oi=e,!0):!1}function wD(e,t){return zs[e]===void 0?!1:t===void 0?zs[e]:(zs[e]=t,e==="s"&&(zs.ss=t-1),!0)}function SD(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,s=zs,o,c;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(s=Object.assign({},zs,t),t.s!=null&&t.ss==null&&(s.ss=t.s-1)),o=this.localeData(),c=xD(this,!r,s,o),r&&(c=o.pastFuture(+this,c)),o.postformat(c)}var gf=Math.abs;function Fs(e){return(e>0)-(e<0)||+e}function ul(){if(!this.isValid())return this.localeData().invalidDate();var e=gf(this._milliseconds)/1e3,t=gf(this._days),r=gf(this._months),s,o,c,h,x=this.asSeconds(),S,E,A,Y;return x?(s=Jn(e/60),o=Jn(s/60),e%=60,s%=60,c=Jn(r/12),r%=12,h=e?e.toFixed(3).replace(/\.?0+$/,""):"",S=x<0?"-":"",E=Fs(this._months)!==Fs(x)?"-":"",A=Fs(this._days)!==Fs(x)?"-":"",Y=Fs(this._milliseconds)!==Fs(x)?"-":"",S+"P"+(c?E+c+"Y":"")+(r?E+r+"M":"")+(t?A+t+"D":"")+(o||s||e?"T":"")+(o?Y+o+"H":"")+(s?Y+s+"M":"")+(e?Y+h+"S":"")):"P0D"}var qe=al.prototype;qe.isValid=mk;qe.abs=KC;qe.add=ZC;qe.subtract=XC;qe.as=QC;qe.asMilliseconds=jm;qe.asSeconds=eD;qe.asMinutes=tD;qe.asHours=nD;qe.asDays=rD;qe.asWeeks=iD;qe.asMonths=sD;qe.asQuarters=aD;qe.asYears=oD;qe.valueOf=uD;qe._bubble=JC;qe.clone=lD;qe.get=cD;qe.milliseconds=fD;qe.seconds=dD;qe.minutes=hD;qe.hours=pD;qe.days=gD;qe.weeks=vD;qe.months=mD;qe.years=yD;qe.humanize=SD;qe.toISOString=ul;qe.toString=ul;qe.toJSON=ul;qe.locale=km;qe.localeData=Dm;qe.toIsoString=tr("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ul);qe.lang=Cm;be("X",0,0,"unix");be("x",0,0,"valueOf");pe("x",nl);pe("X",Uw);st("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)});st("x",function(e,t,r){r._d=new Date(Be(e))});//! moment.js
10
- ae.version="2.30.1";kw(lt);ae.fn=ne;ae.min=dk;ae.max=hk;ae.now=pk;ae.utc=Fr;ae.unix=BC;ae.months=UC;ae.isDate=ao;ae.locale=Fi;ae.invalid=Ju;ae.duration=vr;ae.isMoment=yr;ae.weekdays=zC;ae.parseZone=HC;ae.localeData=mi;ae.isDuration=Pu;ae.monthsShort=qC;ae.weekdaysMin=GC;ae.defineLocale=fd;ae.updateLocale=HS;ae.locales=US;ae.weekdaysShort=VC;ae.normalizeUnits=nr;ae.relativeTimeRounding=_D;ae.relativeTimeThreshold=wD;ae.calendarFormat=Fk;ae.prototype=ne;ae.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const kD=Object.freeze(Object.defineProperty({__proto__:null,default:ae},Symbol.toStringTag,{value:"Module"})),xd=({baseUrl:e,notiPath:t,setNotiData:r})=>async()=>{const c=e+(t||"/notification-management/api/v1/notifications"),h=await ce.axios.get(c,{params:{filter:{notificationFilterType:"all"}},withCredentials:!0}),x=await ce.axios.get(c,{params:{filter:{notificationFilterType:"unread"}},withCredentials:!0});Promise.all([h,x]).then(S=>{var E,A,Y,$;console.log("result: "+S),r({all:{rows:(E=S[0].data)==null?void 0:E.rows,total:(A=S[0].data)==null?void 0:A.total},unread:{rows:(Y=S[1].data)==null?void 0:Y.rows,total:($=S[1].data)==null?void 0:$.total}})})},Bi=D.reactExports.createContext({}),CD=({children:e})=>{const[t,r]=D.reactExports.useState(!0),[s,o]=D.reactExports.useState({all:{rows:[],total:0},unread:{rows:[],total:0}}),c=()=>{r(!t)},h=()=>{r(!0)};return D.jsxRuntimeExports.jsx(Bi.Provider,{value:{isOpen:t,toggleOpen:c,setShowModalFalse:h,notidata:s,setNotiData:o},children:e})},DD=({notification:e,baseUrl:t,notiPath:r,markAllAsReadState:s})=>{const[o,c]=D.reactExports.useState({id:e.id,isRead:e.isRead}),h=o.isRead===!1?"unread":"read",{setNotiData:x}=D.reactExports.useContext(Bi),S=xd({baseUrl:t,notiPath:r,setNotiData:x}),E=async($,z)=>{var U,j;try{const ee=r||`/notification-management/api/v1/notifications/${$}`,H=t+ee;await ce.axios.put(H,{isRead:z},{withCredentials:!0})}catch(ee){c({id:e.id,isRead:e.isRead}),ce.pushError(((j=(U=ee.response)==null?void 0:U.data)==null?void 0:j.errorMessage)||"Have error when get notification list")}await S()},A=($,z)=>{console.log("specificNotificationID",$);const U=!z;c(j=>({...j,isRead:U})),console.log("newIsReadState",U),E($,U)};D.reactExports.useEffect(()=>{c(s?$=>({...$,isRead:!0}):{id:e.id,isRead:e.isRead})},[s,e.id,e.isRead]);const Y=$=>{const z=ae(),U=ae($),j=z.diff(U,"days"),ee=z.diff(U,"minutes"),H=z.diff(U,"months"),me=z.diff(U,"years");if(console.log("diffInMonths",H),ee<1)return"Just now";if(j===0){if(ee<=60)return`${ee} minute${ee>1?"s":""} ago`;const ge=Math.floor(ee/60);return console.log("diffIhours",ge),`${ge} hour${ge>1?"s":""} ago`}if(j===1)return"Yesterday";if(j>=2&&j<7)return`${j} days ago`;if(j<30){const ge=Math.floor(j/7);return`${ge} week${ge>1?"s":""} ago`}return H===0||H===1?"1 month ago":H<12?`${H} months ago`:me===0||me===1?"1 year ago":"Over 1 year ago"};return D.jsxRuntimeExports.jsxs("div",{className:"notitification-item__container",onClick:()=>A(e.id,e.isRead),children:[D.jsxRuntimeExports.jsx("div",{className:"notification-item__image-container",children:D.jsxRuntimeExports.jsx("img",{src:e==null?void 0:e.userAvatarUrl,onError:({currentTarget:$})=>{$.onerror=null,$.src="https://ukpcsaprod.blob.core.windows.net/account/logo.png"},alt:e.userName})}),D.jsxRuntimeExports.jsxs("div",{className:"notification-item__content",children:[D.jsxRuntimeExports.jsx("p",{className:"notification-item__user-name",children:e.userName}),D.jsxRuntimeExports.jsxs("p",{children:[`${e.message} `,D.jsxRuntimeExports.jsx("span",{children:e==null?void 0:e.context})]})]}),D.jsxRuntimeExports.jsx("div",{className:"notification-item__time",children:D.jsxRuntimeExports.jsx("p",{children:Y(e.createdAt)})}),D.jsxRuntimeExports.jsx("button",{className:`${h} notification-item__read-at`,"aria-label":"Mark as read"})]})},Jp=({notidata:e,baseUrl:t,notiPath:r})=>{const[s,o]=D.reactExports.useState(!1);console.log(s);const{setNotiData:c}=D.reactExports.useContext(Bi),h=xd({baseUrl:t,notiPath:r,setNotiData:c}),x=async()=>{var E,A;try{const $=t+(r||"/notification-management/api/v1/notifications");await ce.axios.put($,{withCredentials:!0})}catch(Y){console.log(Y),o(!1),ce.pushError(((A=(E=Y.response)==null?void 0:E.data)==null?void 0:A.errorMessage)||"Have error when get notification list")}await h(),o(!1)},S=()=>{o(!0),x()};return D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsx("div",{className:"mark-all-read",children:D.jsxRuntimeExports.jsx("button",{onClick:S,children:"Mark all as read"})}),D.jsxRuntimeExports.jsx("div",{className:"notification-items__wrapper",children:D.jsxRuntimeExports.jsx("div",{className:"notification-items__content",children:Object.values(e).map((E,A)=>D.jsxRuntimeExports.jsx(DD,{notification:E,baseUrl:t,notiPath:r,markAllAsReadState:s},A))})})]})},ED=({baseUrl:e,notiPath:t})=>{var x,S,E,A;const{setShowModalFalse:r}=D.reactExports.useContext(Bi),{notidata:s}=D.reactExports.useContext(Bi);console.log(s);const[o,c]=D.reactExports.useState("all"),h=[{id:"all",tabTitle:`All (${((x=s==null?void 0:s.all)==null?void 0:x.total)||0})`,children:D.jsxRuntimeExports.jsx(Jp,{notidata:((S=s==null?void 0:s.all)==null?void 0:S.rows)||[],baseUrl:e,notiPath:t})},{id:"unread",tabTitle:`Unread (${((E=s==null?void 0:s.unread)==null?void 0:E.total)||0})`,children:D.jsxRuntimeExports.jsx(Jp,{notidata:((A=s==null?void 0:s.unread)==null?void 0:A.rows)||[],baseUrl:e,notiPath:t})}];return D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{children:D.jsxRuntimeExports.jsx("div",{style:{position:"absolute",backgroundColor:"#fff",width:"550px",height:"90vh",right:"100px",top:"100%",padding:"32px",boxShadow:"10px 0px 20px #999",borderRadius:"0 0 8px 8px",overflow:"hidden"},children:D.jsxRuntimeExports.jsxs("div",{className:"list-content",children:[D.jsxRuntimeExports.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[D.jsxRuntimeExports.jsx("h3",{style:{fontSize:"24px",fontWeight:"500"},className:"list-title",children:"Notifications"}),D.jsxRuntimeExports.jsx("button",{onClick:r,children:D.jsxRuntimeExports.jsx("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:D.jsxRuntimeExports.jsx("path",{d:"M7.05086 6.13616C6.66033 5.74563 6.02717 5.74563 5.63664 6.13616C5.24612 6.52668 5.24612 7.15984 5.63664 7.55037L10.5864 12.5001L5.63664 17.4499C5.24612 17.8404 5.24612 18.4736 5.63664 18.8641C6.02717 19.2546 6.66033 19.2546 7.05086 18.8641L12.0006 13.9143L16.9504 18.8641C17.3409 19.2546 17.974 19.2546 18.3646 18.8641C18.7551 18.4736 18.7551 17.8404 18.3646 17.4499L13.4148 12.5001L18.3646 7.55037C18.7551 7.15984 18.7551 6.52668 18.3646 6.13616C17.974 5.74563 17.3409 5.74563 16.9504 6.13616L12.0006 11.0859L7.05086 6.13616Z",fill:"#85858A"})})})]}),D.jsxRuntimeExports.jsx(Sw,{tabs:h,setCurrentTab:c,currentTab:o})]})})})};const TD={black:"#000",white:"#fff"},Qa=TD,MD={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Ys=MD,RD={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Ws=RD,AD={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Bs=AD,ID={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Hs=ID,OD={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Us=OD,PD={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},qa=PD,ND={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},LD=ND;function eo(e){let t="https://mui.com/production-error/?code="+e;for(let r=1;r<arguments.length;r+=1)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}const jD=Object.freeze(Object.defineProperty({__proto__:null,default:eo},Symbol.toStringTag,{value:"Module"})),$m="$$material";function Fm(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var $D=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|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|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|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|loading|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|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|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)-.*))$/,FD=Fm(function(e){return $D.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function YD(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function WD(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var BD=function(){function e(r){var s=this;this._insertTag=function(o){var c;s.tags.length===0?s.insertionPoint?c=s.insertionPoint.nextSibling:s.prepend?c=s.container.firstChild:c=s.before:c=s.tags[s.tags.length-1].nextSibling,s.container.insertBefore(o,c),s.tags.push(o)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(s){s.forEach(this._insertTag)},t.insert=function(s){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(WD(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var c=YD(o);try{c.insertRule(s,c.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(s));this.ctr++},t.flush=function(){this.tags.forEach(function(s){return s.parentNode&&s.parentNode.removeChild(s)}),this.tags=[],this.ctr=0},e}(),en="-ms-",zu="-moz-",Ze="-webkit-",Ym="comm",_d="rule",wd="decl",HD="@import",Wm="@keyframes",UD="@layer",qD=Math.abs,ll=String.fromCharCode,zD=Object.assign;function VD(e,t){return qt(e,0)^45?(((t<<2^qt(e,0))<<2^qt(e,1))<<2^qt(e,2))<<2^qt(e,3):0}function Bm(e){return e.trim()}function GD(e,t){return(e=t.exec(e))?e[0]:e}function Xe(e,t,r){return e.replace(t,r)}function jf(e,t){return e.indexOf(t)}function qt(e,t){return e.charCodeAt(t)|0}function to(e,t,r){return e.slice(t,r)}function Ir(e){return e.length}function Sd(e){return e.length}function Tu(e,t){return t.push(e),e}function KD(e,t){return e.map(t).join("")}var cl=1,Js=1,Hm=0,Sn=0,Et=0,na="";function fl(e,t,r,s,o,c,h){return{value:e,root:t,parent:r,type:s,props:o,children:c,line:cl,column:Js,length:h,return:""}}function za(e,t){return zD(fl("",null,null,"",null,null,0),e,{length:-e.length},t)}function ZD(){return Et}function XD(){return Et=Sn>0?qt(na,--Sn):0,Js--,Et===10&&(Js=1,cl--),Et}function Pn(){return Et=Sn<Hm?qt(na,Sn++):0,Js++,Et===10&&(Js=1,cl++),Et}function Nr(){return qt(na,Sn)}function Lu(){return Sn}function co(e,t){return to(na,e,t)}function no(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Um(e){return cl=Js=1,Hm=Ir(na=e),Sn=0,[]}function qm(e){return na="",e}function ju(e){return Bm(co(Sn-1,$f(e===91?e+2:e===40?e+1:e)))}function JD(e){for(;(Et=Nr())&&Et<33;)Pn();return no(e)>2||no(Et)>3?"":" "}function QD(e,t){for(;--t&&Pn()&&!(Et<48||Et>102||Et>57&&Et<65||Et>70&&Et<97););return co(e,Lu()+(t<6&&Nr()==32&&Pn()==32))}function $f(e){for(;Pn();)switch(Et){case e:return Sn;case 34:case 39:e!==34&&e!==39&&$f(Et);break;case 40:e===41&&$f(e);break;case 92:Pn();break}return Sn}function eE(e,t){for(;Pn()&&e+Et!==47+10;)if(e+Et===42+42&&Nr()===47)break;return"/*"+co(t,Sn-1)+"*"+ll(e===47?e:Pn())}function tE(e){for(;!no(Nr());)Pn();return co(e,Sn)}function nE(e){return qm($u("",null,null,null,[""],e=Um(e),0,[0],e))}function $u(e,t,r,s,o,c,h,x,S){for(var E=0,A=0,Y=h,$=0,z=0,U=0,j=1,ee=1,H=1,me=0,ge="",ve=o,re=c,ie=s,d=ge;ee;)switch(U=me,me=Pn()){case 40:if(U!=108&&qt(d,Y-1)==58){jf(d+=Xe(ju(me),"&","&\f"),"&\f")!=-1&&(H=-1);break}case 34:case 39:case 91:d+=ju(me);break;case 9:case 10:case 13:case 32:d+=JD(U);break;case 92:d+=QD(Lu()-1,7);continue;case 47:switch(Nr()){case 42:case 47:Tu(rE(eE(Pn(),Lu()),t,r),S);break;default:d+="/"}break;case 123*j:x[E++]=Ir(d)*H;case 125*j:case 59:case 0:switch(me){case 0:case 125:ee=0;case 59+A:H==-1&&(d=Xe(d,/\f/g,"")),z>0&&Ir(d)-Y&&Tu(z>32?eg(d+";",s,r,Y-1):eg(Xe(d," ","")+";",s,r,Y-2),S);break;case 59:d+=";";default:if(Tu(ie=Qp(d,t,r,E,A,o,x,ge,ve=[],re=[],Y),c),me===123)if(A===0)$u(d,t,ie,ie,ve,c,Y,x,re);else switch($===99&&qt(d,3)===110?100:$){case 100:case 108:case 109:case 115:$u(e,ie,ie,s&&Tu(Qp(e,ie,ie,0,0,o,x,ge,o,ve=[],Y),re),o,re,Y,x,s?ve:re);break;default:$u(d,ie,ie,ie,[""],re,0,x,re)}}E=A=z=0,j=H=1,ge=d="",Y=h;break;case 58:Y=1+Ir(d),z=U;default:if(j<1){if(me==123)--j;else if(me==125&&j++==0&&XD()==125)continue}switch(d+=ll(me),me*j){case 38:H=A>0?1:(d+="\f",-1);break;case 44:x[E++]=(Ir(d)-1)*H,H=1;break;case 64:Nr()===45&&(d+=ju(Pn())),$=Nr(),A=Y=Ir(ge=d+=tE(Lu())),me++;break;case 45:U===45&&Ir(d)==2&&(j=0)}}return c}function Qp(e,t,r,s,o,c,h,x,S,E,A){for(var Y=o-1,$=o===0?c:[""],z=Sd($),U=0,j=0,ee=0;U<s;++U)for(var H=0,me=to(e,Y+1,Y=qD(j=h[U])),ge=e;H<z;++H)(ge=Bm(j>0?$[H]+" "+me:Xe(me,/&\f/g,$[H])))&&(S[ee++]=ge);return fl(e,t,r,o===0?_d:x,S,E,A)}function rE(e,t,r){return fl(e,t,r,Ym,ll(ZD()),to(e,2,-2),0)}function eg(e,t,r,s){return fl(e,t,r,wd,to(e,0,s),to(e,s+1,-1),s)}function Zs(e,t){for(var r="",s=Sd(e),o=0;o<s;o++)r+=t(e[o],o,e,t)||"";return r}function iE(e,t,r,s){switch(e.type){case UD:if(e.children.length)break;case HD:case wd:return e.return=e.return||e.value;case Ym:return"";case Wm:return e.return=e.value+"{"+Zs(e.children,s)+"}";case _d:e.value=e.props.join(",")}return Ir(r=Zs(e.children,s))?e.return=e.value+"{"+r+"}":""}function sE(e){var t=Sd(e);return function(r,s,o,c){for(var h="",x=0;x<t;x++)h+=e[x](r,s,o,c)||"";return h}}function aE(e){return function(t){t.root||(t=t.return)&&e(t)}}var oE=function(t,r,s){for(var o=0,c=0;o=c,c=Nr(),o===38&&c===12&&(r[s]=1),!no(c);)Pn();return co(t,Sn)},uE=function(t,r){var s=-1,o=44;do switch(no(o)){case 0:o===38&&Nr()===12&&(r[s]=1),t[s]+=oE(Sn-1,r,s);break;case 2:t[s]+=ju(o);break;case 4:if(o===44){t[++s]=Nr()===58?"&\f":"",r[s]=t[s].length;break}default:t[s]+=ll(o)}while(o=Pn());return t},lE=function(t,r){return qm(uE(Um(t),r))},tg=new WeakMap,cE=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,s=t.parent,o=t.column===s.column&&t.line===s.line;s.type!=="rule";)if(s=s.parent,!s)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!tg.get(s))&&!o){tg.set(t,!0);for(var c=[],h=lE(r,c),x=s.props,S=0,E=0;S<h.length;S++)for(var A=0;A<x.length;A++,E++)t.props[E]=c[S]?h[S].replace(/&\f/g,x[A]):x[A]+" "+h[S]}}},fE=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function zm(e,t){switch(VD(e,t)){case 5103:return Ze+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Ze+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ze+e+zu+e+en+e+e;case 6828:case 4268:return Ze+e+en+e+e;case 6165:return Ze+e+en+"flex-"+e+e;case 5187:return Ze+e+Xe(e,/(\w+).+(:[^]+)/,Ze+"box-$1$2"+en+"flex-$1$2")+e;case 5443:return Ze+e+en+"flex-item-"+Xe(e,/flex-|-self/,"")+e;case 4675:return Ze+e+en+"flex-line-pack"+Xe(e,/align-content|flex-|-self/,"")+e;case 5548:return Ze+e+en+Xe(e,"shrink","negative")+e;case 5292:return Ze+e+en+Xe(e,"basis","preferred-size")+e;case 6060:return Ze+"box-"+Xe(e,"-grow","")+Ze+e+en+Xe(e,"grow","positive")+e;case 4554:return Ze+Xe(e,/([^-])(transform)/g,"$1"+Ze+"$2")+e;case 6187:return Xe(Xe(Xe(e,/(zoom-|grab)/,Ze+"$1"),/(image-set)/,Ze+"$1"),e,"")+e;case 5495:case 3959:return Xe(e,/(image-set\([^]*)/,Ze+"$1$`$1");case 4968:return Xe(Xe(e,/(.+:)(flex-)?(.*)/,Ze+"box-pack:$3"+en+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ze+e+e;case 4095:case 3583:case 4068:case 2532:return Xe(e,/(.+)-inline(.+)/,Ze+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ir(e)-1-t>6)switch(qt(e,t+1)){case 109:if(qt(e,t+4)!==45)break;case 102:return Xe(e,/(.+:)(.+)-([^]+)/,"$1"+Ze+"$2-$3$1"+zu+(qt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~jf(e,"stretch")?zm(Xe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(qt(e,t+1)!==115)break;case 6444:switch(qt(e,Ir(e)-3-(~jf(e,"!important")&&10))){case 107:return Xe(e,":",":"+Ze)+e;case 101:return Xe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ze+(qt(e,14)===45?"inline-":"")+"box$3$1"+Ze+"$2$3$1"+en+"$2box$3")+e}break;case 5936:switch(qt(e,t+11)){case 114:return Ze+e+en+Xe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ze+e+en+Xe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ze+e+en+Xe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ze+e+en+e+e}return e}var dE=function(t,r,s,o){if(t.length>-1&&!t.return)switch(t.type){case wd:t.return=zm(t.value,t.length);break;case Wm:return Zs([za(t,{value:Xe(t.value,"@","@"+Ze)})],o);case _d:if(t.length)return KD(t.props,function(c){switch(GD(c,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Zs([za(t,{props:[Xe(c,/:(read-\w+)/,":"+zu+"$1")]})],o);case"::placeholder":return Zs([za(t,{props:[Xe(c,/:(plac\w+)/,":"+Ze+"input-$1")]}),za(t,{props:[Xe(c,/:(plac\w+)/,":"+zu+"$1")]}),za(t,{props:[Xe(c,/:(plac\w+)/,en+"input-$1")]})],o)}return""})}},hE=[dE],Vm=function(t){var r=t.key;if(r==="css"){var s=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(s,function(j){var ee=j.getAttribute("data-emotion");ee.indexOf(" ")!==-1&&(document.head.appendChild(j),j.setAttribute("data-s",""))})}var o=t.stylisPlugins||hE,c={},h,x=[];h=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(j){for(var ee=j.getAttribute("data-emotion").split(" "),H=1;H<ee.length;H++)c[ee[H]]=!0;x.push(j)});var S,E=[cE,fE];{var A,Y=[iE,aE(function(j){A.insert(j)})],$=sE(E.concat(o,Y)),z=function(ee){return Zs(nE(ee),$)};S=function(ee,H,me,ge){A=me,z(ee?ee+"{"+H.styles+"}":H.styles),ge&&(U.inserted[H.name]=!0)}}var U={key:r,sheet:new BD({key:r,container:h,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:c,registered:{},insert:S};return U.sheet.hydrate(x),U},Gm={exports:{}},nt={};/** @license React v16.13.1
10
+ ae.version="2.30.1";kw(lt);ae.fn=ne;ae.min=dk;ae.max=hk;ae.now=pk;ae.utc=Fr;ae.unix=BC;ae.months=UC;ae.isDate=ao;ae.locale=Fi;ae.invalid=Ju;ae.duration=vr;ae.isMoment=yr;ae.weekdays=zC;ae.parseZone=HC;ae.localeData=mi;ae.isDuration=Pu;ae.monthsShort=qC;ae.weekdaysMin=GC;ae.defineLocale=fd;ae.updateLocale=HS;ae.locales=US;ae.weekdaysShort=VC;ae.normalizeUnits=nr;ae.relativeTimeRounding=_D;ae.relativeTimeThreshold=wD;ae.calendarFormat=Fk;ae.prototype=ne;ae.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const kD=Object.freeze(Object.defineProperty({__proto__:null,default:ae},Symbol.toStringTag,{value:"Module"})),xd=({baseUrl:e,notiPath:t,setNotiData:r})=>async()=>{const c=e+(t||"/notification-management/api/v1/notifications"),h=await ce.axios.get(c,{params:{filter:{notificationFilterType:"all"}},withCredentials:!0}),x=await ce.axios.get(c,{params:{filter:{notificationFilterType:"unread"}},withCredentials:!0});Promise.all([h,x]).then(S=>{var E,A,Y,$;console.log("result: "+S),r({all:{rows:(E=S[0].data)==null?void 0:E.rows,total:(A=S[0].data)==null?void 0:A.total},unread:{rows:(Y=S[1].data)==null?void 0:Y.rows,total:($=S[1].data)==null?void 0:$.total}})})},Bi=D.reactExports.createContext({}),CD=({children:e})=>{const[t,r]=D.reactExports.useState(!0),[s,o]=D.reactExports.useState({all:{rows:[],total:0},unread:{rows:[],total:0}}),c=()=>{r(!t)},h=()=>{r(!0)};return D.jsxRuntimeExports.jsx(Bi.Provider,{value:{isOpen:t,toggleOpen:c,setShowModalFalse:h,notidata:s,setNotiData:o},children:e})},DD=({notification:e,baseUrl:t,notiPath:r,markAllAsReadState:s})=>{const[o,c]=D.reactExports.useState({id:e.id,isRead:e.isRead}),h=o.isRead===!1?"unread":"read",{setNotiData:x}=D.reactExports.useContext(Bi),S=xd({baseUrl:t,notiPath:r,setNotiData:x}),E=async($,z)=>{var U,j;try{const ee=r||`/notification-management/api/v1/notifications/${$}`,H=t+ee;await ce.axios.put(H,{isRead:z},{withCredentials:!0})}catch(ee){c({id:e.id,isRead:e.isRead}),ce.pushError(((j=(U=ee.response)==null?void 0:U.data)==null?void 0:j.errorMessage)||"Have error when get notification list")}await S()},A=($,z)=>{console.log("specificNotificationID",$);const U=!z;c(j=>({...j,isRead:U})),console.log("newIsReadState",U),E($,U)};D.reactExports.useEffect(()=>{c(s?$=>({...$,isRead:!0}):{id:e.id,isRead:e.isRead})},[s,e.id,e.isRead]);const Y=$=>{const z=ae(),U=ae($),j=z.diff(U,"days"),ee=z.diff(U,"minutes"),H=z.diff(U,"months"),me=z.diff(U,"years");if(console.log("diffInMonths",H),ee<1)return"Just now";if(j===0){if(ee<=60)return`${ee} minute${ee>1?"s":""} ago`;const ge=Math.floor(ee/60);return console.log("diffIhours",ge),`${ge} hour${ge>1?"s":""} ago`}if(j===1)return"Yesterday";if(j>=2&&j<7)return`${j} days ago`;if(j<30){const ge=Math.floor(j/7);return`${ge} week${ge>1?"s":""} ago`}return H===0||H===1?"1 month ago":H<12?`${H} months ago`:me===0||me===1?"1 year ago":"Over 1 year ago"};return D.jsxRuntimeExports.jsxs("div",{className:"notitification-item__container",onClick:()=>A(e.id,e.isRead),children:[D.jsxRuntimeExports.jsx("div",{className:"notification-item__image-container",children:D.jsxRuntimeExports.jsx("img",{src:e==null?void 0:e.userAvatarUrl,onError:({currentTarget:$})=>{$.onerror=null,$.src="https://ukpcsaprod.blob.core.windows.net/account/logo.png"},alt:e.userName})}),D.jsxRuntimeExports.jsxs("div",{className:"notification-item__content",children:[D.jsxRuntimeExports.jsx("p",{className:"notification-item__user-name",children:e.userName}),D.jsxRuntimeExports.jsxs("p",{children:[`${e.message} `,D.jsxRuntimeExports.jsx("span",{children:e==null?void 0:e.context})]})]}),D.jsxRuntimeExports.jsx("div",{className:"notification-item__time",children:D.jsxRuntimeExports.jsx("p",{children:Y(e.createdAt)})}),D.jsxRuntimeExports.jsx("button",{className:`${h} notification-item__read-at`,"aria-label":"Mark as read"})]})},Jp=({notidata:e,baseUrl:t,notiPath:r})=>{const[s,o]=D.reactExports.useState(!1);console.log(s);const{setNotiData:c}=D.reactExports.useContext(Bi),h=xd({baseUrl:t,notiPath:r,setNotiData:c}),x=async()=>{var E,A;try{const $=t+(r||"/notification-management/api/v1/notifications");await ce.axios.put($,{withCredentials:!0})}catch(Y){console.log(Y),o(!1),ce.pushError(((A=(E=Y.response)==null?void 0:E.data)==null?void 0:A.errorMessage)||"Have error when get notification list")}await h(),o(!1)},S=()=>{o(!0),x()};return D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsx("div",{className:"mark-all-read",children:D.jsxRuntimeExports.jsx("button",{onClick:S,children:"Mark all as read"})}),D.jsxRuntimeExports.jsx("div",{className:"notification-items__wrapper",children:D.jsxRuntimeExports.jsx("div",{className:"notification-items__content",children:Object.values(e).map((E,A)=>D.jsxRuntimeExports.jsx(DD,{notification:E,baseUrl:t,notiPath:r,markAllAsReadState:s},A))})})]})},ED=({baseUrl:e,notiPath:t})=>{var x,S,E,A;const{setShowModalFalse:r}=D.reactExports.useContext(Bi),{notidata:s}=D.reactExports.useContext(Bi);console.log(s);const[o,c]=D.reactExports.useState("all"),h=[{id:"all",tabTitle:`All (${((x=s==null?void 0:s.all)==null?void 0:x.total)||0})`,children:D.jsxRuntimeExports.jsx(Jp,{notidata:((S=s==null?void 0:s.all)==null?void 0:S.rows)||[],baseUrl:e,notiPath:t})},{id:"unread",tabTitle:`Unread (${((E=s==null?void 0:s.unread)==null?void 0:E.total)||0})`,children:D.jsxRuntimeExports.jsx(Jp,{notidata:((A=s==null?void 0:s.unread)==null?void 0:A.rows)||[],baseUrl:e,notiPath:t})}];return D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{children:D.jsxRuntimeExports.jsx("div",{style:{position:"absolute",backgroundColor:"#fff",width:"550px",height:"90vh",right:"100px",top:"100%",padding:"32px",boxShadow:"10px 0px 20px #999",borderRadius:"0 0 8px 8px",overflow:"hidden"},children:D.jsxRuntimeExports.jsxs("div",{className:"list-content",children:[D.jsxRuntimeExports.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[D.jsxRuntimeExports.jsx("h3",{style:{fontSize:"24px",fontWeight:"500"},className:"list-title",children:"Notifications"}),D.jsxRuntimeExports.jsx("button",{onClick:r,children:D.jsxRuntimeExports.jsx("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:D.jsxRuntimeExports.jsx("path",{d:"M7.05086 6.13616C6.66033 5.74563 6.02717 5.74563 5.63664 6.13616C5.24612 6.52668 5.24612 7.15984 5.63664 7.55037L10.5864 12.5001L5.63664 17.4499C5.24612 17.8404 5.24612 18.4736 5.63664 18.8641C6.02717 19.2546 6.66033 19.2546 7.05086 18.8641L12.0006 13.9143L16.9504 18.8641C17.3409 19.2546 17.974 19.2546 18.3646 18.8641C18.7551 18.4736 18.7551 17.8404 18.3646 17.4499L13.4148 12.5001L18.3646 7.55037C18.7551 7.15984 18.7551 6.52668 18.3646 6.13616C17.974 5.74563 17.3409 5.74563 16.9504 6.13616L12.0006 11.0859L7.05086 6.13616Z",fill:"#85858A"})})})]}),D.jsxRuntimeExports.jsx(Sw,{tabs:h,setCurrentTab:c,currentTab:o})]})})})},TD={black:"#000",white:"#fff"},Qa=TD,MD={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Ys=MD,RD={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Ws=RD,AD={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Bs=AD,ID={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Hs=ID,OD={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Us=OD,PD={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},qa=PD,ND={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},LD=ND;function eo(e){let t="https://mui.com/production-error/?code="+e;for(let r=1;r<arguments.length;r+=1)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}const jD=Object.freeze(Object.defineProperty({__proto__:null,default:eo},Symbol.toStringTag,{value:"Module"})),$m="$$material";function Fm(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var $D=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|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|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|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|loading|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|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|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)-.*))$/,FD=Fm(function(e){return $D.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function YD(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function WD(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var BD=function(){function e(r){var s=this;this._insertTag=function(o){var c;s.tags.length===0?s.insertionPoint?c=s.insertionPoint.nextSibling:s.prepend?c=s.container.firstChild:c=s.before:c=s.tags[s.tags.length-1].nextSibling,s.container.insertBefore(o,c),s.tags.push(o)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(s){s.forEach(this._insertTag)},t.insert=function(s){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(WD(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var c=YD(o);try{c.insertRule(s,c.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(s));this.ctr++},t.flush=function(){this.tags.forEach(function(s){return s.parentNode&&s.parentNode.removeChild(s)}),this.tags=[],this.ctr=0},e}(),en="-ms-",zu="-moz-",Ze="-webkit-",Ym="comm",_d="rule",wd="decl",HD="@import",Wm="@keyframes",UD="@layer",qD=Math.abs,ll=String.fromCharCode,zD=Object.assign;function VD(e,t){return qt(e,0)^45?(((t<<2^qt(e,0))<<2^qt(e,1))<<2^qt(e,2))<<2^qt(e,3):0}function Bm(e){return e.trim()}function GD(e,t){return(e=t.exec(e))?e[0]:e}function Xe(e,t,r){return e.replace(t,r)}function jf(e,t){return e.indexOf(t)}function qt(e,t){return e.charCodeAt(t)|0}function to(e,t,r){return e.slice(t,r)}function Ir(e){return e.length}function Sd(e){return e.length}function Tu(e,t){return t.push(e),e}function KD(e,t){return e.map(t).join("")}var cl=1,Js=1,Hm=0,Sn=0,Et=0,na="";function fl(e,t,r,s,o,c,h){return{value:e,root:t,parent:r,type:s,props:o,children:c,line:cl,column:Js,length:h,return:""}}function za(e,t){return zD(fl("",null,null,"",null,null,0),e,{length:-e.length},t)}function ZD(){return Et}function XD(){return Et=Sn>0?qt(na,--Sn):0,Js--,Et===10&&(Js=1,cl--),Et}function Pn(){return Et=Sn<Hm?qt(na,Sn++):0,Js++,Et===10&&(Js=1,cl++),Et}function Nr(){return qt(na,Sn)}function Lu(){return Sn}function co(e,t){return to(na,e,t)}function no(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Um(e){return cl=Js=1,Hm=Ir(na=e),Sn=0,[]}function qm(e){return na="",e}function ju(e){return Bm(co(Sn-1,$f(e===91?e+2:e===40?e+1:e)))}function JD(e){for(;(Et=Nr())&&Et<33;)Pn();return no(e)>2||no(Et)>3?"":" "}function QD(e,t){for(;--t&&Pn()&&!(Et<48||Et>102||Et>57&&Et<65||Et>70&&Et<97););return co(e,Lu()+(t<6&&Nr()==32&&Pn()==32))}function $f(e){for(;Pn();)switch(Et){case e:return Sn;case 34:case 39:e!==34&&e!==39&&$f(Et);break;case 40:e===41&&$f(e);break;case 92:Pn();break}return Sn}function eE(e,t){for(;Pn()&&e+Et!==47+10;)if(e+Et===42+42&&Nr()===47)break;return"/*"+co(t,Sn-1)+"*"+ll(e===47?e:Pn())}function tE(e){for(;!no(Nr());)Pn();return co(e,Sn)}function nE(e){return qm($u("",null,null,null,[""],e=Um(e),0,[0],e))}function $u(e,t,r,s,o,c,h,x,S){for(var E=0,A=0,Y=h,$=0,z=0,U=0,j=1,ee=1,H=1,me=0,ge="",ve=o,re=c,ie=s,d=ge;ee;)switch(U=me,me=Pn()){case 40:if(U!=108&&qt(d,Y-1)==58){jf(d+=Xe(ju(me),"&","&\f"),"&\f")!=-1&&(H=-1);break}case 34:case 39:case 91:d+=ju(me);break;case 9:case 10:case 13:case 32:d+=JD(U);break;case 92:d+=QD(Lu()-1,7);continue;case 47:switch(Nr()){case 42:case 47:Tu(rE(eE(Pn(),Lu()),t,r),S);break;default:d+="/"}break;case 123*j:x[E++]=Ir(d)*H;case 125*j:case 59:case 0:switch(me){case 0:case 125:ee=0;case 59+A:H==-1&&(d=Xe(d,/\f/g,"")),z>0&&Ir(d)-Y&&Tu(z>32?eg(d+";",s,r,Y-1):eg(Xe(d," ","")+";",s,r,Y-2),S);break;case 59:d+=";";default:if(Tu(ie=Qp(d,t,r,E,A,o,x,ge,ve=[],re=[],Y),c),me===123)if(A===0)$u(d,t,ie,ie,ve,c,Y,x,re);else switch($===99&&qt(d,3)===110?100:$){case 100:case 108:case 109:case 115:$u(e,ie,ie,s&&Tu(Qp(e,ie,ie,0,0,o,x,ge,o,ve=[],Y),re),o,re,Y,x,s?ve:re);break;default:$u(d,ie,ie,ie,[""],re,0,x,re)}}E=A=z=0,j=H=1,ge=d="",Y=h;break;case 58:Y=1+Ir(d),z=U;default:if(j<1){if(me==123)--j;else if(me==125&&j++==0&&XD()==125)continue}switch(d+=ll(me),me*j){case 38:H=A>0?1:(d+="\f",-1);break;case 44:x[E++]=(Ir(d)-1)*H,H=1;break;case 64:Nr()===45&&(d+=ju(Pn())),$=Nr(),A=Y=Ir(ge=d+=tE(Lu())),me++;break;case 45:U===45&&Ir(d)==2&&(j=0)}}return c}function Qp(e,t,r,s,o,c,h,x,S,E,A){for(var Y=o-1,$=o===0?c:[""],z=Sd($),U=0,j=0,ee=0;U<s;++U)for(var H=0,me=to(e,Y+1,Y=qD(j=h[U])),ge=e;H<z;++H)(ge=Bm(j>0?$[H]+" "+me:Xe(me,/&\f/g,$[H])))&&(S[ee++]=ge);return fl(e,t,r,o===0?_d:x,S,E,A)}function rE(e,t,r){return fl(e,t,r,Ym,ll(ZD()),to(e,2,-2),0)}function eg(e,t,r,s){return fl(e,t,r,wd,to(e,0,s),to(e,s+1,-1),s)}function Zs(e,t){for(var r="",s=Sd(e),o=0;o<s;o++)r+=t(e[o],o,e,t)||"";return r}function iE(e,t,r,s){switch(e.type){case UD:if(e.children.length)break;case HD:case wd:return e.return=e.return||e.value;case Ym:return"";case Wm:return e.return=e.value+"{"+Zs(e.children,s)+"}";case _d:e.value=e.props.join(",")}return Ir(r=Zs(e.children,s))?e.return=e.value+"{"+r+"}":""}function sE(e){var t=Sd(e);return function(r,s,o,c){for(var h="",x=0;x<t;x++)h+=e[x](r,s,o,c)||"";return h}}function aE(e){return function(t){t.root||(t=t.return)&&e(t)}}var oE=function(t,r,s){for(var o=0,c=0;o=c,c=Nr(),o===38&&c===12&&(r[s]=1),!no(c);)Pn();return co(t,Sn)},uE=function(t,r){var s=-1,o=44;do switch(no(o)){case 0:o===38&&Nr()===12&&(r[s]=1),t[s]+=oE(Sn-1,r,s);break;case 2:t[s]+=ju(o);break;case 4:if(o===44){t[++s]=Nr()===58?"&\f":"",r[s]=t[s].length;break}default:t[s]+=ll(o)}while(o=Pn());return t},lE=function(t,r){return qm(uE(Um(t),r))},tg=new WeakMap,cE=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,s=t.parent,o=t.column===s.column&&t.line===s.line;s.type!=="rule";)if(s=s.parent,!s)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!tg.get(s))&&!o){tg.set(t,!0);for(var c=[],h=lE(r,c),x=s.props,S=0,E=0;S<h.length;S++)for(var A=0;A<x.length;A++,E++)t.props[E]=c[S]?h[S].replace(/&\f/g,x[A]):x[A]+" "+h[S]}}},fE=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function zm(e,t){switch(VD(e,t)){case 5103:return Ze+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Ze+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ze+e+zu+e+en+e+e;case 6828:case 4268:return Ze+e+en+e+e;case 6165:return Ze+e+en+"flex-"+e+e;case 5187:return Ze+e+Xe(e,/(\w+).+(:[^]+)/,Ze+"box-$1$2"+en+"flex-$1$2")+e;case 5443:return Ze+e+en+"flex-item-"+Xe(e,/flex-|-self/,"")+e;case 4675:return Ze+e+en+"flex-line-pack"+Xe(e,/align-content|flex-|-self/,"")+e;case 5548:return Ze+e+en+Xe(e,"shrink","negative")+e;case 5292:return Ze+e+en+Xe(e,"basis","preferred-size")+e;case 6060:return Ze+"box-"+Xe(e,"-grow","")+Ze+e+en+Xe(e,"grow","positive")+e;case 4554:return Ze+Xe(e,/([^-])(transform)/g,"$1"+Ze+"$2")+e;case 6187:return Xe(Xe(Xe(e,/(zoom-|grab)/,Ze+"$1"),/(image-set)/,Ze+"$1"),e,"")+e;case 5495:case 3959:return Xe(e,/(image-set\([^]*)/,Ze+"$1$`$1");case 4968:return Xe(Xe(e,/(.+:)(flex-)?(.*)/,Ze+"box-pack:$3"+en+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ze+e+e;case 4095:case 3583:case 4068:case 2532:return Xe(e,/(.+)-inline(.+)/,Ze+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ir(e)-1-t>6)switch(qt(e,t+1)){case 109:if(qt(e,t+4)!==45)break;case 102:return Xe(e,/(.+:)(.+)-([^]+)/,"$1"+Ze+"$2-$3$1"+zu+(qt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~jf(e,"stretch")?zm(Xe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(qt(e,t+1)!==115)break;case 6444:switch(qt(e,Ir(e)-3-(~jf(e,"!important")&&10))){case 107:return Xe(e,":",":"+Ze)+e;case 101:return Xe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ze+(qt(e,14)===45?"inline-":"")+"box$3$1"+Ze+"$2$3$1"+en+"$2box$3")+e}break;case 5936:switch(qt(e,t+11)){case 114:return Ze+e+en+Xe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ze+e+en+Xe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ze+e+en+Xe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ze+e+en+e+e}return e}var dE=function(t,r,s,o){if(t.length>-1&&!t.return)switch(t.type){case wd:t.return=zm(t.value,t.length);break;case Wm:return Zs([za(t,{value:Xe(t.value,"@","@"+Ze)})],o);case _d:if(t.length)return KD(t.props,function(c){switch(GD(c,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Zs([za(t,{props:[Xe(c,/:(read-\w+)/,":"+zu+"$1")]})],o);case"::placeholder":return Zs([za(t,{props:[Xe(c,/:(plac\w+)/,":"+Ze+"input-$1")]}),za(t,{props:[Xe(c,/:(plac\w+)/,":"+zu+"$1")]}),za(t,{props:[Xe(c,/:(plac\w+)/,en+"input-$1")]})],o)}return""})}},hE=[dE],Vm=function(t){var r=t.key;if(r==="css"){var s=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(s,function(j){var ee=j.getAttribute("data-emotion");ee.indexOf(" ")!==-1&&(document.head.appendChild(j),j.setAttribute("data-s",""))})}var o=t.stylisPlugins||hE,c={},h,x=[];h=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(j){for(var ee=j.getAttribute("data-emotion").split(" "),H=1;H<ee.length;H++)c[ee[H]]=!0;x.push(j)});var S,E=[cE,fE];{var A,Y=[iE,aE(function(j){A.insert(j)})],$=sE(E.concat(o,Y)),z=function(ee){return Zs(nE(ee),$)};S=function(ee,H,me,ge){A=me,z(ee?ee+"{"+H.styles+"}":H.styles),ge&&(U.inserted[H.name]=!0)}}var U={key:r,sheet:new BD({key:r,container:h,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:c,registered:{},insert:S};return U.sheet.hydrate(x),U},Gm={exports:{}},nt={};/** @license React v16.13.1
11
11
  * react-is.production.min.js
12
12
  *
13
13
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -1058,9 +1058,9 @@ function print() { __p += __j.call(arguments, '') }
1058
1058
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1059
1059
  * See the License for the specific language governing permissions and
1060
1060
  * limitations under the License.
1061
- */function py(e=zA()){return DO().then(t=>{if(!t)throw nn.create("unsupported-browser")},t=>{throw nn.create("indexed-db-unsupported")}),qd(Hd(e),"messaging").getImmediate()}async function TO(e,t){return e=Hd(e),hy(e,t)}function MO(e,t){return e=Hd(e),EO(e,t)}CO();const gy=e=>{"serviceWorker"in navigator&&navigator.serviceWorker.register(e.path).then(function(t){console.log("Registration successful, scope is:",t.scope),console.log("initialize service worker props ",e);const r=py(zd({apiKey:e.apiKey,authDomain:e.authDomain,projectId:e.projectId,storageBucket:e.storageBucket,messagingSenderId:e.messagingSenderId,appId:e.appId,measurementId:e.measurementId}));TO(r,{serviceWorkerRegistration:t,vapidKey:e.vapidKey}).then(async s=>{var o,c;if(s){console.log("current token for client: ",s);try{const h="/notification-management/api/v1/notifications/registrations",x=e.baseUrl+h;await ce.axios.post(x,{deviceToken:s},{withCredentials:!0})}catch(h){console.log(h),ce.pushError(((c=(o=h.response)==null?void 0:o.data)==null?void 0:c.errorMessage)||"Have error when get notification list")}}else console.log("No registration token available. Request permission to generate one.")}).catch(s=>{console.log("An error occurred while retrieving token. ",s)})}).catch(function(t){console.log("Service worker registration failed, error:",t)})},RO=e=>{const t=new BroadcastChannel("my-channel");t.onmessage=r=>{console.log("Broadcast chanel message",r),r&&e(s=>({...s,unread:{...s.unread,total:s.unread.total+1}}))}},AO=e=>new Promise(t=>{const r=py(zd({apiKey:e.apiKey,authDomain:e.authDomain,projectId:e.projectId,storageBucket:e.storageBucket,messagingSenderId:e.messagingSenderId,appId:e.appId,measurementId:e.measurementId}));MO(r,s=>{console.log("payload",s),t(s)})}),us={"subscription-diaglog":"_subscription-diaglog_1gvmm_2","subscription-container":"_subscription-container_1gvmm_15","subscription-title":"_subscription-title_1gvmm_25","subscription-text":"_subscription-text_1gvmm_34","subscription-btn__container":"_subscription-btn__container_1gvmm_38","btn-success":"_btn-success_1gvmm_44","btn-cancel":"_btn-cancel_1gvmm_45"},IO=["granted","denied"],OO=e=>{const[t,r]=D.reactExports.useState(!1),s=()=>{Notification.requestPermission(function(c){c==="granted"&&gy(e),IO.includes(c)&&r(!0)})},o=()=>{r(!0)};return D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{children:t?"":D.jsxRuntimeExports.jsx("div",{className:us["subscription-diaglog"],children:D.jsxRuntimeExports.jsxs("div",{className:us["subscription-container"],children:[D.jsxRuntimeExports.jsx("h4",{className:us["subscription-title"],children:"Notification"}),D.jsxRuntimeExports.jsx("p",{className:us["subscription-text"],children:"Choice to receive notifications for the most recent updates. You have the flexibility to disable them whenever you prefer."}),D.jsxRuntimeExports.jsxs("div",{className:us["subscription-btn__container"],children:[D.jsxRuntimeExports.jsx("button",{className:us["btn-cancel"],onClick:o,children:"Not now"}),D.jsxRuntimeExports.jsx("button",{className:us["btn-success"],onClick:s,children:"Turn on"})]})]})})})},Au={"notification-massage_container":"_notification-massage_container_ql4az_1","notification-name":"_notification-name_ql4az_18","notification-message_service":"_notification-message_service_ql4az_23","notification-message_button-close":"_notification-message_button-close_ql4az_27"},PO=e=>{const[t,r]=D.reactExports.useState({userName:"",message:"",context:""});console.log(t);const{setNotiData:s}=D.reactExports.useContext(Bi);function o(){return D.jsxRuntimeExports.jsx("div",{className:Au["notification-massage_container"],children:D.jsxRuntimeExports.jsxs("div",{className:Au["notification-massage_content"],children:[D.jsxRuntimeExports.jsx("h6",{className:Au["notification-name"],children:t==null?void 0:t.userName}),D.jsxRuntimeExports.jsxs("div",{className:Au["notification-message_service"],children:[D.jsxRuntimeExports.jsxs("span",{children:[`${t==null?void 0:t.message} `," "]}),D.jsxRuntimeExports.jsx("span",{children:t==null?void 0:t.context})]})]})})}return D.reactExports.useEffect(()=>{t&&Notification.permission==="granted"&&(t.userName||t.message||t.context)&&ce.notify(D.jsxRuntimeExports.jsx(o,{}))},[t]),D.reactExports.useEffect(()=>{Notification.permission==="granted"&&gy(e)},[Notification.permission]),D.reactExports.useEffect(()=>{RO(s)},[]),AO(e).then(c=>{var h,x,S;console.log("aaa",c),r({userName:(h=c==null?void 0:c.data)==null?void 0:h.userName,message:(x=c==null?void 0:c.data)==null?void 0:x.message,context:(S=c==null?void 0:c.data)==null?void 0:S.context}),s(E=>{var A;return{...E,unread:{...E.unread,total:((A=E.unread)==null?void 0:A.total)+1}}})}).catch(c=>console.log("failed: ",c)),D.jsxRuntimeExports.jsx("div",{children:"Notification"in window&&Notification.permission==="default"?D.jsxRuntimeExports.jsx(OO,{...e}):""})};function nh({childrenClass:e,action:t,childrenOpenClass:r}){const s=document.querySelector("#topbar-wrapper"),o=s==null?void 0:s.shadowRoot,c=o==null?void 0:o.querySelector(`.${e}`),h=o==null?void 0:o.querySelector(`.${r}`),x=o==null?void 0:o.querySelector("nav"),S=E=>{x==null||x.addEventListener("click",function(A){if(r&&h&&h.contains(A.target)){if(c&&!c.contains(A.target))return}else c&&!c.contains(A.target)&&t()}),s&&!s.contains(E.target)&&t()};document.addEventListener("click",S,!0)}function NO({primaryColor:e="#009d4f",baseUrl:t,notiPath:r}){var A,Y;const{isOpen:s,toggleOpen:o,setShowModalFalse:c}=D.reactExports.useContext(Bi),{notidata:h,setNotiData:x}=D.reactExports.useContext(Bi),S=xd({baseUrl:t,notiPath:r,setNotiData:x}),E=async()=>{var $,z;try{await S()}catch(U){ce.pushError(((z=($=U.response)==null?void 0:$.data)==null?void 0:z.errorMessage)||"Have error when get notification list")}};return D.reactExports.useEffect(()=>{E()},[s]),D.reactExports.useEffect(()=>{nh({childrenClass:"noti-container",childrenOpenClass:"noti-list-container",action(){c()}})}),D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsxs("div",{className:"noti-container",style:{position:"relative"},children:[D.jsxRuntimeExports.jsxs("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:o,style:{cursor:"pointer"},children:[D.jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.7968 17.4705C16.5901 17.4705 18.8076 16.8556 19.0218 14.3874C19.0218 11.921 17.4757 12.0796 17.4757 9.05334C17.4757 6.68952 15.2352 4 11.7968 4C8.35833 4 6.1178 6.68952 6.1178 9.05334C6.1178 12.0796 4.57178 11.921 4.57178 14.3874C4.78679 16.8649 7.00428 17.4705 11.7968 17.4705Z",stroke:e,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),D.jsxRuntimeExports.jsx("path",{d:"M13.8274 20.0286C12.6679 21.3161 10.8591 21.3313 9.68848 20.0286",stroke:e,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),(h==null?void 0:h.unread)&&(h==null?void 0:h.unread.total)!=0&&D.jsxRuntimeExports.jsx("span",{style:{position:"absolute",top:"-9px",right:"-6px",background:`${ce.color.dangerDark}`,width:"20px",height:"20px",border:"1px solid #fff",borderRadius:"50%",color:"#fff",fontSize:"12px",display:"flex",alignItems:"center",justifyContent:"center"},className:"notification-badge",children:((A=h==null?void 0:h.unread)==null?void 0:A.total)>9?"9+":`${(Y=h==null?void 0:h.unread)==null?void 0:Y.total}`})]}),D.jsxRuntimeExports.jsx("div",{className:"noti-list-container",children:!s&&D.jsxRuntimeExports.jsx(ED,{baseUrl:t,notiPath:r})})]})}const LO=`.avatar-dropdown-item{padding:.5rem;font-size:.875rem;line-height:1.25rem;cursor:pointer;border-radius:.25rem}.avartarDropdownMenu{background-color:#fff;padding:.5rem;width:13rem;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);position:absolute;left:-10rem;top:3.2rem}.avartarDropdownMenu ul{list-style:none;padding-inline-start:0;margin-block-end:0}.navbar{position:fixed;display:flex;z-index:30;background:#292929;top:0;width:100%;padding-left:2.5rem;height:64px}.navbar-container{display:flex;flex-direction:row;align-items:center;width:100%;justify-content:space-between}.logo-container{padding:16px 0;height:100%}.right-side-container{display:flex;flex-direction:row;align-items:center;text-align:center;margin-right:2.5rem;gap:1rem}.userContainer{display:flex;align-items:center;gap:.5rem}.languageDropdown{height:100%;padding:0 8px;display:flex;flex-direction:row;gap:8px;border-radius:3px;align-items:center;justify-content:center;height:41px;background-color:#ffffff1a;cursor:pointer;transition:background-color .2s ease-in-out}.languageDropdown:hover{background-color:#fff3}.userFullName{color:#fff;font-weight:400;font-size:.875rem;line-height:1.25rem}.userAvatar{width:2.5rem;height:2.5rem;cursor:pointer;-o-object-fit:cover;object-fit:cover;border-radius:9999px;border:2px solid #FFFFFF}#userAvatarNull{width:2.5rem;height:2.5rem;background:#DDDDDD;border-radius:100%;color:#fff;font-size:20px;font-weight:400;display:flex;align-items:center;justify-content:center}.relative{position:relative}.cursor-pointer{cursor:pointer}
1061
+ */function py(e=zA()){return DO().then(t=>{if(!t)throw nn.create("unsupported-browser")},t=>{throw nn.create("indexed-db-unsupported")}),qd(Hd(e),"messaging").getImmediate()}async function TO(e,t){return e=Hd(e),hy(e,t)}function MO(e,t){return e=Hd(e),EO(e,t)}CO();const gy=e=>{"serviceWorker"in navigator&&navigator.serviceWorker.register(e.path).then(function(t){console.log("Registration successful, scope is:",t.scope),console.log("initialize service worker props ",e);const r=py(zd({apiKey:e.apiKey,authDomain:e.authDomain,projectId:e.projectId,storageBucket:e.storageBucket,messagingSenderId:e.messagingSenderId,appId:e.appId,measurementId:e.measurementId}));TO(r,{serviceWorkerRegistration:t,vapidKey:e.vapidKey}).then(async s=>{var o,c;if(s){console.log("current token for client: ",s);try{const h="/notification-management/api/v1/notifications/registrations",x=e.baseUrl+h;await ce.axios.post(x,{deviceToken:s},{withCredentials:!0})}catch(h){console.log(h),ce.pushError(((c=(o=h.response)==null?void 0:o.data)==null?void 0:c.errorMessage)||"Have error when get notification list")}}else console.log("No registration token available. Request permission to generate one.")}).catch(s=>{console.log("An error occurred while retrieving token. ",s)})}).catch(function(t){console.log("Service worker registration failed, error:",t)})},RO=e=>{const t=new BroadcastChannel("my-channel");t.onmessage=r=>{console.log("Broadcast chanel message",r),r&&e(s=>({...s,unread:{...s.unread,total:s.unread.total+1}}))}},AO=e=>new Promise(t=>{const r=py(zd({apiKey:e.apiKey,authDomain:e.authDomain,projectId:e.projectId,storageBucket:e.storageBucket,messagingSenderId:e.messagingSenderId,appId:e.appId,measurementId:e.measurementId}));MO(r,s=>{console.log("payload",s),t(s)})}),us={"subscription-diaglog":"_subscription-diaglog_1gvmm_2","subscription-container":"_subscription-container_1gvmm_15","subscription-title":"_subscription-title_1gvmm_25","subscription-text":"_subscription-text_1gvmm_34","subscription-btn__container":"_subscription-btn__container_1gvmm_38","btn-success":"_btn-success_1gvmm_44","btn-cancel":"_btn-cancel_1gvmm_45"},IO=["granted","denied"],OO=e=>{const[t,r]=D.reactExports.useState(!1),s=()=>{Notification.requestPermission(function(c){c==="granted"&&gy(e),IO.includes(c)&&r(!0)})},o=()=>{r(!0)};return D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{children:t?"":D.jsxRuntimeExports.jsx("div",{className:us["subscription-diaglog"],children:D.jsxRuntimeExports.jsxs("div",{className:us["subscription-container"],children:[D.jsxRuntimeExports.jsx("h4",{className:us["subscription-title"],children:"Notification"}),D.jsxRuntimeExports.jsx("p",{className:us["subscription-text"],children:"Choice to receive notifications for the most recent updates. You have the flexibility to disable them whenever you prefer."}),D.jsxRuntimeExports.jsxs("div",{className:us["subscription-btn__container"],children:[D.jsxRuntimeExports.jsx("button",{className:us["btn-cancel"],onClick:o,children:"Not now"}),D.jsxRuntimeExports.jsx("button",{className:us["btn-success"],onClick:s,children:"Turn on"})]})]})})})},Au={"notification-massage_container":"_notification-massage_container_ql4az_1","notification-name":"_notification-name_ql4az_18","notification-message_service":"_notification-message_service_ql4az_23","notification-message_button-close":"_notification-message_button-close_ql4az_27"},PO=e=>{const[t,r]=D.reactExports.useState({userName:"",message:"",context:""});console.log(t);const{setNotiData:s}=D.reactExports.useContext(Bi);function o(){return D.jsxRuntimeExports.jsx("div",{className:Au["notification-massage_container"],children:D.jsxRuntimeExports.jsxs("div",{className:Au["notification-massage_content"],children:[D.jsxRuntimeExports.jsx("h6",{className:Au["notification-name"],children:t==null?void 0:t.userName}),D.jsxRuntimeExports.jsxs("div",{className:Au["notification-message_service"],children:[D.jsxRuntimeExports.jsxs("span",{children:[`${t==null?void 0:t.message} `," "]}),D.jsxRuntimeExports.jsx("span",{children:t==null?void 0:t.context})]})]})})}return D.reactExports.useEffect(()=>{t&&Notification.permission==="granted"&&(t.userName||t.message||t.context)&&ce.notify(D.jsxRuntimeExports.jsx(o,{}))},[t]),D.reactExports.useEffect(()=>{Notification.permission==="granted"&&gy(e)},[Notification.permission]),D.reactExports.useEffect(()=>{RO(s)},[]),AO(e).then(c=>{var h,x,S;console.log("aaa",c),r({userName:(h=c==null?void 0:c.data)==null?void 0:h.userName,message:(x=c==null?void 0:c.data)==null?void 0:x.message,context:(S=c==null?void 0:c.data)==null?void 0:S.context}),s(E=>{var A;return{...E,unread:{...E.unread,total:((A=E.unread)==null?void 0:A.total)+1}}})}).catch(c=>console.log("failed: ",c)),D.jsxRuntimeExports.jsx("div",{children:"Notification"in window&&Notification.permission==="default"?D.jsxRuntimeExports.jsx(OO,{...e}):""})};function nh({childrenClass:e,action:t,childrenOpenClass:r}){const s=document.querySelector("#topbar-wrapper"),o=s==null?void 0:s.shadowRoot,c=o==null?void 0:o.querySelector(`.${e}`),h=o==null?void 0:o.querySelector(`.${r}`),x=o==null?void 0:o.querySelector("nav"),S=E=>{x==null||x.addEventListener("click",function(A){if(r&&h&&h.contains(A.target)){if(c&&!c.contains(A.target))return}else c&&!c.contains(A.target)&&t()}),s&&!s.contains(E.target)&&t()};document.addEventListener("click",S,!0)}function NO({primaryColor:e="#009d4f",baseUrl:t,notiPath:r}){var A,Y;const{isOpen:s,toggleOpen:o,setShowModalFalse:c}=D.reactExports.useContext(Bi),{notidata:h,setNotiData:x}=D.reactExports.useContext(Bi),S=xd({baseUrl:t,notiPath:r,setNotiData:x}),E=async()=>{var $,z;try{await S()}catch(U){ce.pushError(((z=($=U.response)==null?void 0:$.data)==null?void 0:z.errorMessage)||"Have error when get notification list")}};return D.reactExports.useEffect(()=>{E()},[s]),D.reactExports.useEffect(()=>{nh({childrenClass:"noti-container",childrenOpenClass:"noti-list-container",action(){c()}})}),D.jsxRuntimeExports.jsxs("div",{children:[D.jsxRuntimeExports.jsxs("div",{className:"noti-container",style:{position:"relative"},children:[D.jsxRuntimeExports.jsxs("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:o,style:{cursor:"pointer"},children:[D.jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.7968 17.4705C16.5901 17.4705 18.8076 16.8556 19.0218 14.3874C19.0218 11.921 17.4757 12.0796 17.4757 9.05334C17.4757 6.68952 15.2352 4 11.7968 4C8.35833 4 6.1178 6.68952 6.1178 9.05334C6.1178 12.0796 4.57178 11.921 4.57178 14.3874C4.78679 16.8649 7.00428 17.4705 11.7968 17.4705Z",stroke:e,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),D.jsxRuntimeExports.jsx("path",{d:"M13.8274 20.0286C12.6679 21.3161 10.8591 21.3313 9.68848 20.0286",stroke:e,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),(h==null?void 0:h.unread)&&(h==null?void 0:h.unread.total)!=0&&D.jsxRuntimeExports.jsx("span",{style:{position:"absolute",top:"-9px",right:"-6px",background:`${ce.color.dangerDark}`,width:"20px",height:"20px",border:"1px solid #fff",borderRadius:"50%",color:"#fff",fontSize:"12px",display:"flex",alignItems:"center",justifyContent:"center"},className:"notification-badge",children:((A=h==null?void 0:h.unread)==null?void 0:A.total)>9?"9+":`${(Y=h==null?void 0:h.unread)==null?void 0:Y.total}`})]}),D.jsxRuntimeExports.jsx("div",{className:"noti-list-container",children:!s&&D.jsxRuntimeExports.jsx(ED,{baseUrl:t,notiPath:r})})]})}const LO=`.avatar-dropdown-item{padding:.5rem;font-size:.875rem;line-height:1.25rem;cursor:pointer;border-radius:.25rem}.avartarDropdownMenu{background-color:#fff;padding:.5rem;width:13rem;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);position:absolute;left:-10rem;top:3.2rem}.avartarDropdownMenu ul{list-style:none;padding-inline-start:0;margin-block-end:0}.navbar{position:fixed;display:flex;z-index:30;background:#292929;top:0;width:100%;padding-left:2.5rem;height:64px}.navbar-container{display:flex;flex-direction:row;align-items:center;width:100%;justify-content:space-between}.logo-container{height:100%;display:flex;align-items:center}.right-side-container{display:flex;flex-direction:row;align-items:center;text-align:center;margin-right:2.5rem;gap:1rem}.userContainer{display:flex;align-items:center;gap:.5rem}.languageDropdown{height:100%;padding:0 8px;display:flex;flex-direction:row;gap:8px;border-radius:3px;align-items:center;justify-content:center;height:41px;background-color:#ffffff1a;cursor:pointer;transition:background-color .2s ease-in-out}.languageDropdown:hover{background-color:#fff3}.userFullName{color:#fff;font-weight:400;font-size:.875rem;line-height:1.25rem}.userAvatar{width:2.5rem;height:2.5rem;cursor:pointer;-o-object-fit:cover;object-fit:cover;border-radius:9999px;border:2px solid #FFFFFF}#userAvatarNull{width:2.5rem;height:2.5rem;background:#DDDDDD;border-radius:100%;color:#fff;font-size:20px;font-weight:400;display:flex;align-items:center;justify-content:center}.relative{position:relative}.cursor-pointer{cursor:pointer}
1062
1062
  `,jO=`.tab-title{min-width:90px;padding:5px 16px;font-size:14px;font-weight:500;color:#c5c5c5;transition:all .3s ease-in-out;position:relative}.tab-title.is-active{color:#2e7d32}.tab-title.is-active:before{transition:all .3s ease-in-out;position:absolute;content:"";width:100%;height:100%;top:0;left:0;border-bottom:2px solid #2E7D32}.tab-content{padding:16px 0}
1063
1063
  `,$O=`:root{--textPrimary: #292929;--textWhite: #fff;--primary500: #2E7D32;--grey100: #FAFAFA;--gray200: #EEEEEE;--gray600: #85858A;--link: #007BFF }.list-content{overflow-y:auto;overflow-x:hidden}.mark-all-read{text-align:right;color:#007bff;margin-bottom:12px;font-size:12px}.notification-items__wrapper{overflow:hidden}.notification-items__content{height:calc(100vh - 275px);overflow-x:hidden;overflow-y:auto;color:#292929}.notitification-item__container{display:flex;align-items:center;justify-content:space-between;padding:16px;border-bottom:#FAFAFA 1px solid;text-align:left;font-size:12px;position:relative;z-index:10;cursor:pointer;border-radius:4px;margin-bottom:8px}.notitification-item__container:hover{background-color:#fafafa}.notification-item__image-container{width:40px;height:40px;display:flex;justify-content:center;align-items:center;border-radius:50%;overflow:hidden;margin-right:16px}.notification-item__image-container img{width:100%;height:100%;text-align:center;-o-object-fit:cover;object-fit:cover;color:transparent;text-indent:10000px}.notification-item__context-link{color:#007bff}.notification-item__content{width:60%;padding-right:16px}.notification-item__user-name{margin-bottom:2px;font-size:14px}.notification-item__time{margin-right:15px;text-align:right}.notification-item__read-at{border-width:2px;border-style:solid;border-radius:50%;width:10px;height:10px;display:block;position:relative}.notification-item__read-at:before{position:absolute;top:-30px;right:0;width:91px;background-color:#85858a;color:#fff;border-radius:4px;font-size:10px;text-align:center;padding:4px;opacity:0;visibility:hidden;transition:all .3s cubic-bezier(.39,.575,.565,1)}.notification-item__read-at:hover:before{opacity:1;visibility:visible}.notification-item__read-at.read:before{content:"Mark as unread"}.notification-item__read-at.unread:before{content:"Mark as read"}.notification-item__read-at.read{border-color:#eee}.notification-item__read-at.unread{border-color:#2e7d32;background-color:#2e7d32}
1064
1064
  `,FO=`._notification-massage_container_ql4az_1{background:#fff;padding:0 64px 0 84px;border-radius:8px;font-family:TT Firs Neue Trl,sans-serif}._notification-massage_container_ql4az_1:before{position:absolute;content:"";width:48px;height:48px;background:url(https://ukpcsaprod.blob.core.windows.net/saas/notification-icon.svg) no-repeat center/100%;top:12px;left:24px}._notification-name_ql4az_18{font-weight:500;font-size:14px}._notification-message_service_ql4az_23{font-size:12px}._notification-message_button-close_ql4az_27{position:absolute;top:12px;right:24px;width:24px;height:24px}
1065
1065
  `,YO=`._subscription-diaglog_1gvmm_2{position:fixed;width:100vw;height:100vh;top:0;left:0;background-color:#0006;z-index:10000;display:flex;align-items:center;justify-content:center}._subscription-container_1gvmm_15{width:610px;height:222px;border-radius:8px;padding:32px 24px 40px;background:#fff;color:#292929}._subscription-title_1gvmm_25{font-size:20px;font-weight:500;text-align:center;color:#292929}._subscription-title_1gvmm_25,._subscription-text_1gvmm_34{margin-bottom:24px}._subscription-btn__container_1gvmm_38{display:flex;justify-content:space-between;align-items:center}._btn-success_1gvmm_44,._btn-cancel_1gvmm_45{width:150px;height:40px;display:flex;align-items:center;justify-content:center;padding:8px;color:#292929;border-radius:1px}._btn-cancel_1gvmm_45{background-color:#ddd}._btn-success_1gvmm_44{background-color:#93d500}
1066
- `;function WO(e){return D.jsxRuntimeExports.jsxs("svg",{width:"34",height:"25",viewBox:"0 0 34 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[D.jsxRuntimeExports.jsxs("g",{"clip-path":"url(#clip0_16865_28134)",children:[D.jsxRuntimeExports.jsx("rect",{y:"0.5",width:"34",height:"24",rx:"3",fill:"#1A47B8"}),D.jsxRuntimeExports.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.61691 0.5H0V4.5L30.3635 24.5L34 24.5V20.5L3.61691 0.5Z",fill:"white"}),D.jsxRuntimeExports.jsx("path",{d:"M1.20635 0.5L34 22.1567V24.5H32.8219L0 2.82089V0.5H1.20635Z",fill:"#F93939"}),D.jsxRuntimeExports.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M30.7619 0.5H34V4.5C34 4.5 12.9683 17.8249 3.2381 24.5H0V20.5L30.7619 0.5Z",fill:"white"}),D.jsxRuntimeExports.jsx("path",{d:"M34 0.5H32.9019L0 22.1753V24.5H1.20635L34 2.83842V0.5Z",fill:"#F93939"}),D.jsxRuntimeExports.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.3648 0.5H21.6635V7.90291H34V17.0922H21.6635V24.5H12.3648V17.0922H0V7.90291H12.3648V0.5Z",fill:"white"}),D.jsxRuntimeExports.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.3158 0.5H19.6842V9.73077H34V15.2692H19.6842V24.5H14.3158V15.2692H0V9.73077H14.3158V0.5Z",fill:"#F93939"})]}),D.jsxRuntimeExports.jsx("defs",{children:D.jsxRuntimeExports.jsx("clipPath",{id:"clip0_16865_28134",children:D.jsxRuntimeExports.jsx("rect",{y:"0.5",width:"34",height:"24",rx:"3",fill:"white"})})})]})}function BO(e){return D.jsxRuntimeExports.jsxs("svg",{width:"34",height:"24",viewBox:"0 0 34 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[D.jsxRuntimeExports.jsxs("g",{"clip-path":"url(#clip0_16886_62505)",children:[D.jsxRuntimeExports.jsx("rect",{width:"34",height:"24",rx:"3",fill:"#F93939"}),D.jsxRuntimeExports.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0 16H34V24H0V16Z",fill:"#FFDA2C"}),D.jsxRuntimeExports.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0 0H34V8H0V0Z",fill:"#151515"})]}),D.jsxRuntimeExports.jsx("defs",{children:D.jsxRuntimeExports.jsx("clipPath",{id:"clip0_16886_62505",children:D.jsxRuntimeExports.jsx("rect",{width:"34",height:"24",rx:"3",fill:"white"})})})]})}function my({logo:e,user:t,baseUrl:r,notiPath:s,style:o,classNames:c="",customColors:h,notiprops:x}){const S=e||"/public/assets/icons/logo-header.png",E={...o,color:(h==null?void 0:h.color)||"black",backgroundColor:(h==null?void 0:h.bgColor)||"black"},[A,Y]=D.reactExports.useState(!1),$=()=>{window.location.href=`${r}/authentication/logout?callbackUrl=${window.location.href}`};return D.jsxRuntimeExports.jsxs(ce.ShadowDomWrapper,{styles:[LO,jO,$O,FO,YO],style:{zIndex:1202},id:"topbar-wrapper",children:[D.jsxRuntimeExports.jsx("nav",{className:`navbar ${c}`,style:h?E:o,children:D.jsxRuntimeExports.jsxs("div",{className:"navbar-container",children:[D.jsxRuntimeExports.jsx("div",{className:"logo-container",children:D.jsxRuntimeExports.jsx("img",{src:S,alt:"logo-header"})}),D.jsxRuntimeExports.jsxs("div",{className:"right-side-container",children:[D.jsxRuntimeExports.jsx("span",{children:D.jsxRuntimeExports.jsxs(CD,{children:[D.jsxRuntimeExports.jsx(PO,{baseUrl:x.baseUrl,path:x.path,apiKey:x.apiKey,authDomain:x.authDomain,projectId:x.projectId,storageBucket:x.storageBucket,messagingSenderId:x.messagingSenderId,appId:x.appId,measurementId:x.measurementId,vapidKey:x.vapidKey}),D.jsxRuntimeExports.jsx(NO,{primaryColor:h==null?void 0:h.primaryColor,baseUrl:r,notiPath:s})]})}),D.jsxRuntimeExports.jsx("span",{className:"cursor-pointer",children:D.jsxRuntimeExports.jsx(ww,{primaryColor:h==null?void 0:h.primaryColor})}),D.jsxRuntimeExports.jsx(HO,{primaryColor:h==null?void 0:h.primaryColor}),D.jsxRuntimeExports.jsxs("div",{className:"userContainer",children:[D.jsxRuntimeExports.jsx(UO,{primaryColor:h==null?void 0:h.primaryColor,avatarUrl:t==null?void 0:t.avatarUrl,userName:t==null?void 0:t.firstName,setShowConfirmModal:Y}),D.jsxRuntimeExports.jsx("p",{className:"userFullName",children:`${(t==null?void 0:t.firstName)||"Unknown"} ${(t==null?void 0:t.lastName)||"User"}`})]})]})]})}),D.jsxRuntimeExports.jsx(ce.LogoutConfirmModal,{isOpen:A,onClose:()=>Y(!1),onConfirm:$})]})}function HO({primaryColor:e="#009d4f"}){var Y;const t=[{value:Iu.Language.en,element:D.jsxRuntimeExports.jsx(WO,{})},{value:Iu.Language.de,element:D.jsxRuntimeExports.jsx(BO,{})}],[r,s]=D.reactExports.useState(!1),[o,c]=D.reactExports.useState(new Array(t.length).fill(!1)),h={width:"100px",padding:"8px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"background-color 0.2s ease-in-out"},{language:x,setLanguage:S}=AR();D.reactExports.useEffect(()=>{nh({childrenClass:"languageDropdown",action(){s(!1)}})},[]);const E=$=>{c(z=>z.map((U,j)=>j===$))},A=$=>{c(z=>z.map((U,j)=>!1))};return D.jsxRuntimeExports.jsxs("div",{className:"languageDropdownContainer",style:{position:"relative"},children:[D.jsxRuntimeExports.jsxs("div",{className:"languageDropdown",onClick:()=>{s(!r)},children:[(Y=t.find($=>$.value==x))==null?void 0:Y.element,D.jsxRuntimeExports.jsx("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:D.jsxRuntimeExports.jsx("path",{d:"M4.42724 7.92678L7.82372 11.3232C7.92135 11.4209 8.07964 11.4209 8.17727 11.3232L11.5737 7.92678C11.7312 7.76928 11.6197 7.5 11.3969 7.5H4.60402C4.38129 7.5 4.26975 7.76929 4.42724 7.92678Z",fill:"#85858A"})})]}),D.jsxRuntimeExports.jsx("div",{className:"dropdownListLanguage",style:{display:r?"block":"none",position:"absolute",top:"53px",right:"0px",padding:"8px",boxShadow:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)",backgroundColor:"#fafafa"},children:t.filter($=>$.value!==x).map(($,z)=>D.jsxRuntimeExports.jsx("div",{className:"languageItem",style:{...h,backgroundColor:o[z]?e:"transparent"},onMouseEnter:()=>E(z),onMouseLeave:()=>A(z),onClick:()=>{S($.value),localStorage.setItem("language",$.value),Iu.instance.changeLanguage($.value),s(!1),A(z)},children:$.element}))})]})}function UO({avatarUrl:e,userName:t,setShowConfirmModal:r,primaryColor:s="#009d4f"}){const[o,c]=D.reactExports.useState(!1),h=D.reactExports.useRef(null),x=D.reactExports.useRef(null),[S,E]=D.reactExports.useState(!1),[A,Y]=D.reactExports.useState(!1),$={backgroundColor:S?s:"transparent"},z={backgroundColor:A?s:"transparent"};return D.reactExports.useEffect(()=>{nh({childrenClass:"userAvatar",action(){c(!1)}})},[]),D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{children:D.jsxRuntimeExports.jsxs("div",{style:{position:"relative"},children:[e?D.jsxRuntimeExports.jsx("img",{onClick:()=>c(!o),ref:h,alt:"user avatar",className:"userAvatar",src:e}):D.jsxRuntimeExports.jsx("div",{onClick:()=>c(!o),ref:h,className:"userAvatar",id:"userAvatarNull",children:(t==null?void 0:t.charAt(0))??""}),D.jsxRuntimeExports.jsx("div",{style:{display:o?"block":"none"},className:"avartarDropdownMenu",ref:x,children:D.jsxRuntimeExports.jsxs("ul",{children:[D.jsxRuntimeExports.jsx("li",{onMouseEnter:()=>Y(!0),onMouseLeave:()=>Y(!1),style:z,className:"avatar-dropdown-item",children:"Profile"}),D.jsxRuntimeExports.jsx("li",{onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),style:$,onClick:()=>r(!0),className:"avatar-dropdown-item",children:"Logout"})]})})]})})}{const e=D.s(my,{props:{logo:"string",user:"json",baseUrl:"string",notiPath:"string",classNames:"string",style:"json",customColors:"json",notiprops:"json"},shadow:"open"});customElements.define("global-topbar",e)}exports.HasPermission=A0;exports.TopBar=my;exports.getUseHasPermission=R0;
1066
+ `;function WO(e){return D.jsxRuntimeExports.jsxs("svg",{width:"34",height:"25",viewBox:"0 0 34 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[D.jsxRuntimeExports.jsxs("g",{"clip-path":"url(#clip0_16865_28134)",children:[D.jsxRuntimeExports.jsx("rect",{y:"0.5",width:"34",height:"24",rx:"3",fill:"#1A47B8"}),D.jsxRuntimeExports.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.61691 0.5H0V4.5L30.3635 24.5L34 24.5V20.5L3.61691 0.5Z",fill:"white"}),D.jsxRuntimeExports.jsx("path",{d:"M1.20635 0.5L34 22.1567V24.5H32.8219L0 2.82089V0.5H1.20635Z",fill:"#F93939"}),D.jsxRuntimeExports.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M30.7619 0.5H34V4.5C34 4.5 12.9683 17.8249 3.2381 24.5H0V20.5L30.7619 0.5Z",fill:"white"}),D.jsxRuntimeExports.jsx("path",{d:"M34 0.5H32.9019L0 22.1753V24.5H1.20635L34 2.83842V0.5Z",fill:"#F93939"}),D.jsxRuntimeExports.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.3648 0.5H21.6635V7.90291H34V17.0922H21.6635V24.5H12.3648V17.0922H0V7.90291H12.3648V0.5Z",fill:"white"}),D.jsxRuntimeExports.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.3158 0.5H19.6842V9.73077H34V15.2692H19.6842V24.5H14.3158V15.2692H0V9.73077H14.3158V0.5Z",fill:"#F93939"})]}),D.jsxRuntimeExports.jsx("defs",{children:D.jsxRuntimeExports.jsx("clipPath",{id:"clip0_16865_28134",children:D.jsxRuntimeExports.jsx("rect",{y:"0.5",width:"34",height:"24",rx:"3",fill:"white"})})})]})}function BO(e){return D.jsxRuntimeExports.jsxs("svg",{width:"34",height:"24",viewBox:"0 0 34 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[D.jsxRuntimeExports.jsxs("g",{"clip-path":"url(#clip0_16886_62505)",children:[D.jsxRuntimeExports.jsx("rect",{width:"34",height:"24",rx:"3",fill:"#F93939"}),D.jsxRuntimeExports.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0 16H34V24H0V16Z",fill:"#FFDA2C"}),D.jsxRuntimeExports.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0 0H34V8H0V0Z",fill:"#151515"})]}),D.jsxRuntimeExports.jsx("defs",{children:D.jsxRuntimeExports.jsx("clipPath",{id:"clip0_16886_62505",children:D.jsxRuntimeExports.jsx("rect",{width:"34",height:"24",rx:"3",fill:"white"})})})]})}function my({logo:e,user:t,baseUrl:r,notiPath:s,style:o,classNames:c="",customColors:h,notiprops:x}){const S=e||"/public/assets/icons/logo-header.png",E={...o,color:(h==null?void 0:h.color)||"black",backgroundColor:(h==null?void 0:h.bgColor)||"black"},[A,Y]=D.reactExports.useState(!1),$=()=>{window.location.href=`${r}/authentication/logout?callbackUrl=${window.location.href}`};return D.jsxRuntimeExports.jsxs(ce.ShadowDomWrapper,{styles:[LO,jO,$O,FO,YO],style:{zIndex:1202},id:"topbar-wrapper",children:[D.jsxRuntimeExports.jsx("nav",{className:`navbar ${c}`,style:h?E:o,children:D.jsxRuntimeExports.jsxs("div",{className:"navbar-container",children:[D.jsxRuntimeExports.jsx("div",{className:"logo-container",children:D.jsxRuntimeExports.jsx("img",{src:S,alt:"logo-header",style:{height:"40px"}})}),D.jsxRuntimeExports.jsxs("div",{className:"right-side-container",children:[D.jsxRuntimeExports.jsx("span",{children:D.jsxRuntimeExports.jsxs(CD,{children:[D.jsxRuntimeExports.jsx(PO,{baseUrl:x.baseUrl,path:x.path,apiKey:x.apiKey,authDomain:x.authDomain,projectId:x.projectId,storageBucket:x.storageBucket,messagingSenderId:x.messagingSenderId,appId:x.appId,measurementId:x.measurementId,vapidKey:x.vapidKey}),D.jsxRuntimeExports.jsx(NO,{primaryColor:h==null?void 0:h.primaryColor,baseUrl:r,notiPath:s})]})}),D.jsxRuntimeExports.jsx("span",{className:"cursor-pointer",children:D.jsxRuntimeExports.jsx(ww,{primaryColor:h==null?void 0:h.primaryColor})}),D.jsxRuntimeExports.jsx(HO,{primaryColor:h==null?void 0:h.primaryColor}),D.jsxRuntimeExports.jsxs("div",{className:"userContainer",children:[D.jsxRuntimeExports.jsx(UO,{primaryColor:h==null?void 0:h.primaryColor,avatarUrl:t==null?void 0:t.avatarUrl,userName:t==null?void 0:t.firstName,setShowConfirmModal:Y}),D.jsxRuntimeExports.jsx("p",{className:"userFullName",style:{color:h==null?void 0:h.headerTextColor},children:`${(t==null?void 0:t.firstName)||"Unknown"} ${(t==null?void 0:t.lastName)||"User"}`})]})]})]})}),D.jsxRuntimeExports.jsx(ce.LogoutConfirmModal,{isOpen:A,onClose:()=>Y(!1),onConfirm:$})]})}function HO({primaryColor:e="#009d4f"}){var Y;const t=[{value:Iu.Language.en,element:D.jsxRuntimeExports.jsx(WO,{})},{value:Iu.Language.de,element:D.jsxRuntimeExports.jsx(BO,{})}],[r,s]=D.reactExports.useState(!1),[o,c]=D.reactExports.useState(new Array(t.length).fill(!1)),h={width:"100px",padding:"8px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"background-color 0.2s ease-in-out"},{language:x,setLanguage:S}=AR();D.reactExports.useEffect(()=>{nh({childrenClass:"languageDropdown",action(){s(!1)}})},[]);const E=$=>{c(z=>z.map((U,j)=>j===$))},A=$=>{c(z=>z.map((U,j)=>!1))};return D.jsxRuntimeExports.jsxs("div",{className:"languageDropdownContainer",style:{position:"relative"},children:[D.jsxRuntimeExports.jsxs("div",{className:"languageDropdown",onClick:()=>{s(!r)},children:[(Y=t.find($=>$.value==x))==null?void 0:Y.element,D.jsxRuntimeExports.jsx("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:D.jsxRuntimeExports.jsx("path",{d:"M4.42724 7.92678L7.82372 11.3232C7.92135 11.4209 8.07964 11.4209 8.17727 11.3232L11.5737 7.92678C11.7312 7.76928 11.6197 7.5 11.3969 7.5H4.60402C4.38129 7.5 4.26975 7.76929 4.42724 7.92678Z",fill:"#85858A"})})]}),D.jsxRuntimeExports.jsx("div",{className:"dropdownListLanguage",style:{display:r?"block":"none",position:"absolute",top:"53px",right:"0px",padding:"8px",boxShadow:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)",backgroundColor:"#fafafa"},children:t.filter($=>$.value!==x).map(($,z)=>D.jsxRuntimeExports.jsx("div",{className:"languageItem",style:{...h,backgroundColor:o[z]?e:"transparent"},onMouseEnter:()=>E(z),onMouseLeave:()=>A(z),onClick:()=>{S($.value),localStorage.setItem("language",$.value),Iu.instance.changeLanguage($.value),s(!1),A(z)},children:$.element}))})]})}function UO({avatarUrl:e,userName:t,setShowConfirmModal:r,primaryColor:s="#919eab14"}){const[o,c]=D.reactExports.useState(!1),h=D.reactExports.useRef(null),x=D.reactExports.useRef(null),[S,E]=D.reactExports.useState(!1),[A,Y]=D.reactExports.useState(!1),$={backgroundColor:S?s:"transparent"},z={backgroundColor:A?"#919eab14":"transparent"};return D.reactExports.useEffect(()=>{nh({childrenClass:"userAvatar",action(){c(!1)}})},[]),D.jsxRuntimeExports.jsx(D.jsxRuntimeExports.Fragment,{children:D.jsxRuntimeExports.jsxs("div",{style:{position:"relative"},children:[e?D.jsxRuntimeExports.jsx("img",{onClick:()=>c(!o),ref:h,alt:"user avatar",className:"userAvatar",src:e}):D.jsxRuntimeExports.jsx("div",{onClick:()=>c(!o),ref:h,className:"userAvatar",id:"userAvatarNull",children:(t==null?void 0:t.charAt(0))??""}),D.jsxRuntimeExports.jsx("div",{style:{display:o?"block":"none"},className:"avartarDropdownMenu",ref:x,children:D.jsxRuntimeExports.jsxs("ul",{children:[D.jsxRuntimeExports.jsx("li",{onMouseEnter:()=>Y(!0),onMouseLeave:()=>Y(!1),style:z,className:"avatar-dropdown-item",children:"Profile"}),D.jsxRuntimeExports.jsx("li",{onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),style:$,onClick:()=>r(!0),className:"avatar-dropdown-item",children:"Logout"})]})})]})})}{const e=D.s(my,{props:{logo:"string",user:"json",baseUrl:"string",notiPath:"string",classNames:"string",style:"json",customColors:"json",notiprops:"json"},shadow:"open"});customElements.define("global-topbar",e)}exports.HasPermission=A0;exports.TopBar=my;exports.getUseHasPermission=R0;