@3sc/common-component 0.0.6 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.js +16 -18
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.css +2 -13
- package/dist/index.css.map +1 -0
- package/dist/index.esm.mjs +2 -0
- package/dist/index.esm.mjs.map +1 -0
- package/dist/index.js +2 -15
- package/dist/index.js.map +1 -0
- package/dist/index.modern.js +2 -0
- package/dist/index.modern.js.map +1 -0
- package/dist/index.modern.mjs +2 -0
- package/dist/index.modern.mjs.map +1 -0
- package/dist/index.module.js +2 -0
- package/dist/index.module.js.map +1 -0
- package/dist/index.umd.js +2 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/modules/common-component +2 -0
- package/dist/modules/common-component.cjs +2 -0
- package/dist/modules/common-component.cjs.map +1 -0
- package/dist/modules/common-component.css +2 -0
- package/dist/modules/common-component.css.map +1 -0
- package/dist/modules/common-component.map +1 -0
- package/dist/modules/common-component.modern.js +2 -0
- package/dist/modules/common-component.modern.js.map +1 -0
- package/dist/modules/common-component.umd.js +2 -0
- package/dist/modules/common-component.umd.js.map +1 -0
- package/package.json +6 -7
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("@mui/material"),require("@mui/icons-material/NotificationsOutlined"),require("@mui/material/Badge"),require("@mui/material/styles"),require("@mui/icons-material/Refresh"),require("@mui/icons-material/Close"),require("@mui/material/colors"),require("axios"),require("@mui/icons-material/Search"),require("@mui/material/Pagination"),require("react-select")):"function"==typeof define&&define.amd?define(["exports","react","@mui/material","@mui/icons-material/NotificationsOutlined","@mui/material/Badge","@mui/material/styles","@mui/icons-material/Refresh","@mui/icons-material/Close","@mui/material/colors","axios","@mui/icons-material/Search","@mui/material/Pagination","react-select"],t):t((e||self).commonComponent={},e.react,e.material,e.NotificationsOutlinedIcon,e.Badge,e.styles,e.RefreshIcon,e.CloseIcon,e.colors,e.axios,e.SearchIcon,e.Pagination,e.reactSelect)}(this,function(e,t,n,r,o,i,a,c,u,s,l,f,p){function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var y=/*#__PURE__*/d(r),m=/*#__PURE__*/d(o),v=/*#__PURE__*/d(a),g=/*#__PURE__*/d(c),b=/*#__PURE__*/d(s),S=/*#__PURE__*/d(l),w=/*#__PURE__*/d(f),O=/*#__PURE__*/d(p),R="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function C(e){var t={exports:{}};return e(t,t.exports),t.exports}var E,j,A=function(e){return e&&e.Math===Math&&e},T=A("object"==typeof globalThis&&globalThis)||A("object"==typeof window&&window)||A("object"==typeof self&&self)||A("object"==typeof R&&R)||A("object"==typeof R&&R)||function(){return this}()||Function("return this")(),x={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},P="object"==typeof document&&document.all,N=void 0===P&&void 0!==P?function(e){return"function"==typeof e||e===P}:function(e){return"function"==typeof e},I=function(e){return"object"==typeof e?null!==e:N(e)},k=T.document,_=I(k)&&I(k.createElement),D=function(e){return _?k.createElement(e):{}},M=D("span").classList,L=M&&M.constructor&&M.constructor.prototype,F=L===Object.prototype?void 0:L,B=function(e){try{return!!e()}catch(e){return!0}},$=!B(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),U=Function.prototype,V=U.call,z=$&&U.bind.bind(V,V),G=$?z:function(e){return function(){return V.apply(e,arguments)}},W=G({}.toString),q=G("".slice),K=function(e){return q(W(e),8,-1)},H=Object,J=G("".split),Y=B(function(){return!H("z").propertyIsEnumerable(0)})?function(e){return"String"===K(e)?J(e,""):H(e)}:H,X=function(e){return null==e},Q=TypeError,Z=function(e){if(X(e))throw new Q("Can't call method on "+e);return e},ee=function(e){return Y(Z(e))},te=Object.defineProperty,ne=function(e,t){try{te(T,e,{value:t,configurable:!0,writable:!0})}catch(n){T[e]=t}return t},re="__core-js_shared__",oe=T[re]||ne(re,{}),ie=C(function(e){(e.exports=function(e,t){return oe[e]||(oe[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.35.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.35.0/LICENSE",source:"https://github.com/zloirock/core-js"})}),ae=Object,ce=function(e){return ae(Z(e))},ue=G({}.hasOwnProperty),se=Object.hasOwn||function(e,t){return ue(ce(e),t)},le=0,fe=Math.random(),pe=G(1..toString),de=function(e){return"Symbol("+(void 0===e?"":e)+")_"+pe(++le+fe,36)},he="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ye=T.process,me=T.Deno,ve=ye&&ye.versions||me&&me.version,ge=ve&&ve.v8;ge&&(j=(E=ge.split("."))[0]>0&&E[0]<4?1:+(E[0]+E[1])),!j&&he&&(!(E=he.match(/Edge\/(\d+)/))||E[1]>=74)&&(E=he.match(/Chrome\/(\d+)/))&&(j=+E[1]);var be,Se=j,we=T.String,Oe=!!Object.getOwnPropertySymbols&&!B(function(){var e=Symbol("symbol detection");return!we(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Se&&Se<41}),Re=Oe&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ce=T.Symbol,Ee=ie("wks"),je=Re?Ce.for||Ce:Ce&&Ce.withoutSetter||de,Ae=function(e){return se(Ee,e)||(Ee[e]=Oe&&se(Ce,e)?Ce[e]:je("Symbol."+e)),Ee[e]},Te=String,xe=TypeError,Pe=function(e){if(I(e))return e;throw new xe(Te(e)+" is not an object")},Ne=!B(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}),Ie=Ne&&B(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),ke=!Ne&&!B(function(){return 7!==Object.defineProperty(D("div"),"a",{get:function(){return 7}}).a}),_e=Function.prototype.call,De=$?_e.bind(_e):function(){return _e.apply(_e,arguments)},Me=function(e,t){return arguments.length<2?N(n=T[e])?n:void 0:T[e]&&T[e][t];var n},Le=G({}.isPrototypeOf),Fe=Object,Be=Re?function(e){return"symbol"==typeof e}:function(e){var t=Me("Symbol");return N(t)&&Le(t.prototype,Fe(e))},$e=String,Ue=function(e){try{return $e(e)}catch(e){return"Object"}},Ve=TypeError,ze=function(e){if(N(e))return e;throw new Ve(Ue(e)+" is not a function")},Ge=function(e,t){var n=e[t];return X(n)?void 0:ze(n)},We=TypeError,qe=TypeError,Ke=Ae("toPrimitive"),He=function(e){var t=function(e,t){if(!I(e)||Be(e))return e;var n,r=Ge(e,Ke);if(r){if(void 0===t&&(t="default"),n=De(r,e,t),!I(n)||Be(n))return n;throw new qe("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var n,r;if("string"===t&&N(n=e.toString)&&!I(r=De(n,e)))return r;if(N(n=e.valueOf)&&!I(r=De(n,e)))return r;if("string"!==t&&N(n=e.toString)&&!I(r=De(n,e)))return r;throw new We("Can't convert object to primitive value")}(e,t)}(e,"string");return Be(t)?t:t+""},Je=TypeError,Ye=Object.defineProperty,Xe=Object.getOwnPropertyDescriptor,Qe="enumerable",Ze="configurable",et="writable",tt={f:Ne?Ie?function(e,t,n){if(Pe(e),t=He(t),Pe(n),"function"==typeof e&&"prototype"===t&&"value"in n&&et in n&&!n[et]){var r=Xe(e,t);r&&r[et]&&(e[t]=n.value,n={configurable:Ze in n?n[Ze]:r[Ze],enumerable:Qe in n?n[Qe]:r[Qe],writable:!1})}return Ye(e,t,n)}:Ye:function(e,t,n){if(Pe(e),t=He(t),Pe(n),ke)try{return Ye(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new Je("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},nt=Math.ceil,rt=Math.floor,ot=Math.trunc||function(e){var t=+e;return(t>0?rt:nt)(t)},it=function(e){var t=+e;return t!=t||0===t?0:ot(t)},at=Math.max,ct=Math.min,ut=Math.min,st=function(e){return(t=e.length)>0?ut(it(t),9007199254740991):0;var t},lt=function(e){return function(t,n,r){var o,i=ee(t),a=st(i),c=function(e,t){var n=it(e);return n<0?at(n+t,0):ct(n,t)}(r,a);if(e&&n!=n){for(;a>c;)if((o=i[c++])!=o)return!0}else for(;a>c;c++)if((e||c in i)&&i[c]===n)return e||c||0;return!e&&-1}},ft={includes:lt(!0),indexOf:lt(!1)},pt={},dt=ft.indexOf,ht=G([].push),yt=function(e,t){var n,r=ee(e),o=0,i=[];for(n in r)!se(pt,n)&&se(r,n)&&ht(i,n);for(;t.length>o;)se(r,n=t[o++])&&(~dt(i,n)||ht(i,n));return i},mt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],vt=Object.keys||function(e){return yt(e,mt)},gt=Ne&&!Ie?Object.defineProperties:function(e,t){Pe(e);for(var n,r=ee(t),o=vt(t),i=o.length,a=0;i>a;)tt.f(e,n=o[a++],r[n]);return e},bt={f:gt},St=Me("document","documentElement"),wt=ie("keys"),Ot=function(e){return wt[e]||(wt[e]=de(e))},Rt="prototype",Ct="script",Et=Ot("IE_PROTO"),jt=function(){},At=function(e){return"<"+Ct+">"+e+"</"+Ct+">"},Tt=function(e){e.write(At("")),e.close();var t=e.parentWindow.Object;return e=null,t},xt=function(){try{be=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;xt="undefined"!=typeof document?document.domain&&be?Tt(be):(t=D("iframe"),n="java"+Ct+":",t.style.display="none",St.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(At("document.F=Object")),e.close(),e.F):Tt(be);for(var r=mt.length;r--;)delete xt[Rt][mt[r]];return xt()};pt[Et]=!0;var Pt=Object.create||function(e,t){var n;return null!==e?(jt[Rt]=Pe(e),n=new jt,jt[Rt]=null,n[Et]=e):n=xt(),void 0===t?n:bt.f(n,t)},Nt=tt.f,It=Ae("unscopables"),kt=Array.prototype;void 0===kt[It]&&Nt(kt,It,{configurable:!0,value:Pt(null)});var _t,Dt,Mt,Lt=function(e){kt[It][e]=!0},Ft={},Bt=T.WeakMap,$t=N(Bt)&&/native code/.test(String(Bt)),Ut=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Vt=Ne?function(e,t,n){return tt.f(e,t,Ut(1,n))}:function(e,t,n){return e[t]=n,e},zt="Object already initialized",Gt=T.TypeError;if($t||oe.state){var Wt=oe.state||(oe.state=new(0,T.WeakMap));Wt.get=Wt.get,Wt.has=Wt.has,Wt.set=Wt.set,_t=function(e,t){if(Wt.has(e))throw new Gt(zt);return t.facade=e,Wt.set(e,t),t},Dt=function(e){return Wt.get(e)||{}},Mt=function(e){return Wt.has(e)}}else{var qt=Ot("state");pt[qt]=!0,_t=function(e,t){if(se(e,qt))throw new Gt(zt);return t.facade=e,Vt(e,qt,t),t},Dt=function(e){return se(e,qt)?e[qt]:{}},Mt=function(e){return se(e,qt)}}var Kt={set:_t,get:Dt,has:Mt,enforce:function(e){return Mt(e)?Dt(e):_t(e,{})},getterFor:function(e){return function(t){var n;if(!I(t)||(n=Dt(t)).type!==e)throw new Gt("Incompatible receiver, "+e+" required");return n}}},Ht={}.propertyIsEnumerable,Jt=Object.getOwnPropertyDescriptor,Yt=Jt&&!Ht.call({1:2},1)?function(e){var t=Jt(this,e);return!!t&&t.enumerable}:Ht,Xt={f:Yt},Qt=Object.getOwnPropertyDescriptor,Zt={f:Ne?Qt:function(e,t){if(e=ee(e),t=He(t),ke)try{return Qt(e,t)}catch(e){}if(se(e,t))return Ut(!De(Xt.f,e,t),e[t])}},en=Function.prototype,tn=Ne&&Object.getOwnPropertyDescriptor,nn=se(en,"name"),rn={EXISTS:nn,PROPER:nn&&"something"===function(){}.name,CONFIGURABLE:nn&&(!Ne||Ne&&tn(en,"name").configurable)},on=G(Function.toString);N(oe.inspectSource)||(oe.inspectSource=function(e){return on(e)});var an,cn,un,sn=oe.inspectSource,ln=C(function(e){var t=rn.CONFIGURABLE,n=Kt.enforce,r=Kt.get,o=String,i=Object.defineProperty,a=G("".slice),c=G("".replace),u=G([].join),s=Ne&&!B(function(){return 8!==i(function(){},"length",{value:8}).length}),l=String(String).split("String"),f=e.exports=function(e,r,f){"Symbol("===a(o(r),0,7)&&(r="["+c(o(r),/^Symbol\(([^)]*)\)/,"$1")+"]"),f&&f.getter&&(r="get "+r),f&&f.setter&&(r="set "+r),(!se(e,"name")||t&&e.name!==r)&&(Ne?i(e,"name",{value:r,configurable:!0}):e.name=r),s&&f&&se(f,"arity")&&e.length!==f.arity&&i(e,"length",{value:f.arity});try{f&&se(f,"constructor")&&f.constructor?Ne&&i(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var p=n(e);return se(p,"source")||(p.source=u(l,"string"==typeof r?r:"")),e};Function.prototype.toString=f(function(){return N(this)&&r(this).source||sn(this)},"toString")}),fn=function(e,t,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:t;if(N(n)&&ln(n,i,r),r.global)o?e[t]=n:ne(t,n);else{try{r.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=n:tt.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},pn=mt.concat("length","prototype"),dn={f:Object.getOwnPropertyNames||function(e){return yt(e,pn)}},hn={f:Object.getOwnPropertySymbols},yn=G([].concat),mn=Me("Reflect","ownKeys")||function(e){var t=dn.f(Pe(e)),n=hn.f;return n?yn(t,n(e)):t},vn=function(e,t,n){for(var r=mn(t),o=tt.f,i=Zt.f,a=0;a<r.length;a++){var c=r[a];se(e,c)||n&&se(n,c)||o(e,c,i(t,c))}},gn=/#|\.prototype\./,bn=function(e,t){var n=wn[Sn(e)];return n===Rn||n!==On&&(N(t)?B(t):!!t)},Sn=bn.normalize=function(e){return String(e).replace(gn,".").toLowerCase()},wn=bn.data={},On=bn.NATIVE="N",Rn=bn.POLYFILL="P",Cn=bn,En=Zt.f,jn=function(e,t){var n,r,o,i,a,c=e.target,u=e.global,s=e.stat;if(n=u?T:s?T[c]||ne(c,{}):(T[c]||{}).prototype)for(r in t){if(i=t[r],o=e.dontCallGetSet?(a=En(n,r))&&a.value:n[r],!Cn(u?r:c+(s?".":"#")+r,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;vn(i,o)}(e.sham||o&&o.sham)&&Vt(i,"sham",!0),fn(n,r,i,e)}},An=!B(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Tn=Ot("IE_PROTO"),xn=Object,Pn=xn.prototype,Nn=An?xn.getPrototypeOf:function(e){var t=ce(e);if(se(t,Tn))return t[Tn];var n=t.constructor;return N(n)&&t instanceof n?n.prototype:t instanceof xn?Pn:null},In=Ae("iterator"),kn=!1;[].keys&&("next"in(un=[].keys())?(cn=Nn(Nn(un)))!==Object.prototype&&(an=cn):kn=!0);var _n=!I(an)||B(function(){var e={};return an[In].call(e)!==e});_n&&(an={}),N(an[In])||fn(an,In,function(){return this});var Dn={IteratorPrototype:an,BUGGY_SAFARI_ITERATORS:kn},Mn=tt.f,Ln=Ae("toStringTag"),Fn=function(e,t,n){e&&!n&&(e=e.prototype),e&&!se(e,Ln)&&Mn(e,Ln,{configurable:!0,value:t})},Bn=Dn.IteratorPrototype,$n=function(){return this},Un=String,Vn=TypeError,zn=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=function(e,t,n){try{return G(ze(Object.getOwnPropertyDescriptor(e,"__proto__").set))}catch(e){}}(Object.prototype))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Pe(n),function(e){if(function(e){return I(e)||null===e}(e))return e;throw new Vn("Can't set "+Un(e)+" as a prototype")}(r),t?e(n,r):n.__proto__=r,n}}():void 0),Gn=rn.PROPER,Wn=rn.CONFIGURABLE,qn=Dn.IteratorPrototype,Kn=Dn.BUGGY_SAFARI_ITERATORS,Hn=Ae("iterator"),Jn="keys",Yn="values",Xn="entries",Qn=function(){return this},Zn=function(e,t){return{value:e,done:t}},er=tt.f,tr="Array Iterator",nr=Kt.set,rr=Kt.getterFor(tr),or=function(e,t,n,r,o,i,a){!function(e,t,n,r){var o=t+" Iterator";e.prototype=Pt(Bn,{next:Ut(1,function(){var e=rr(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,Zn(void 0,!0);switch(e.kind){case"keys":return Zn(n,!1);case"values":return Zn(t[n],!1)}return Zn([n,t[n]],!1)})}),Fn(e,o,!1),Ft[o]=$n}(n,t);var c,u,s,l=function(e){if(e===o&&y)return y;if(!Kn&&e&&e in d)return d[e];switch(e){case Jn:case Yn:case Xn:return function(){return new n(this,e)}}return function(){return new n(this)}},f=t+" Iterator",p=!1,d=e.prototype,h=d[Hn]||d["@@iterator"]||o&&d[o],y=!Kn&&h||l(o),m=d.entries||h;if(m&&(c=Nn(m.call(new e)))!==Object.prototype&&c.next&&(Nn(c)!==qn&&(zn?zn(c,qn):N(c[Hn])||fn(c,Hn,Qn)),Fn(c,f,!0)),Gn&&h&&h.name!==Yn&&(Wn?Vt(d,"name",Yn):(p=!0,y=function(){return De(h,this)})),o)if(void(u={values:l(Yn),keys:l(Jn),entries:l(Xn)}))for(s in u)(Kn||p||!(s in d))&&fn(d,s,u[s]);else jn({target:t,proto:!0,forced:Kn||p},u);return d[Hn]!==y&&fn(d,Hn,y,{name:o}),Ft[t]=y,u}(Array,"Array",function(e,t){nr(this,{type:tr,target:ee(e),index:0,kind:t})},0,"values"),ir=Ft.Arguments=Ft.Array;if(Lt("keys"),Lt("values"),Lt("entries"),Ne&&"values"!==ir.name)try{er(ir,"name",{value:"values"})}catch(e){}var ar=Ae("iterator"),cr=or.values,ur=function(e,t){if(e){if(e[ar]!==cr)try{Vt(e,ar,cr)}catch(t){e[ar]=cr}if(Fn(e,t,!0),x[t])for(var n in or)if(e[n]!==or[n])try{Vt(e,n,or[n])}catch(t){e[n]=or[n]}}};for(var sr in x)ur(T[sr]&&T[sr].prototype,sr);ur(F,"DOMTokenList");var lr="process"===K(T.process),fr=Ae("species"),pr=TypeError,dr={};dr[Ae("toStringTag")]="z";var hr="[object z]"===String(dr),yr=Ae("toStringTag"),mr=Object,vr="Arguments"===K(function(){return arguments}()),gr=hr?K:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=mr(e),yr))?n:vr?K(t):"Object"===(r=K(t))&&N(t.callee)?"Arguments":r},br=function(){},Sr=[],wr=Me("Reflect","construct"),Or=/^\s*(?:class|function)\b/,Rr=G(Or.exec),Cr=!Or.test(br),Er=function(e){if(!N(e))return!1;try{return wr(br,Sr,e),!0}catch(e){return!1}},jr=function(e){if(!N(e))return!1;switch(gr(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Cr||!!Rr(Or,sn(e))}catch(e){return!0}};jr.sham=!0;var Ar,Tr,xr,Pr,Nr=!wr||B(function(){var e;return Er(Er.call)||!Er(Object)||!Er(function(){e=!0})||e})?jr:Er,Ir=TypeError,kr=Ae("species"),_r=Function.prototype,Dr=_r.apply,Mr=_r.call,Lr="object"==typeof Reflect&&Reflect.apply||($?Mr.bind(Dr):function(){return Mr.apply(Dr,arguments)}),Fr=function(e){if("Function"===K(e))return G(e)},Br=Fr(Fr.bind),$r=function(e,t){return ze(e),void 0===t?e:$?Br(e,t):function(){return e.apply(t,arguments)}},Ur=G([].slice),Vr=TypeError,zr=/(?:ipad|iphone|ipod).*applewebkit/i.test(he),Gr=T.setImmediate,Wr=T.clearImmediate,qr=T.process,Kr=T.Dispatch,Hr=T.Function,Jr=T.MessageChannel,Yr=T.String,Xr=0,Qr={},Zr="onreadystatechange";B(function(){Ar=T.location});var eo=function(e){if(se(Qr,e)){var t=Qr[e];delete Qr[e],t()}},to=function(e){return function(){eo(e)}},no=function(e){eo(e.data)},ro=function(e){T.postMessage(Yr(e),Ar.protocol+"//"+Ar.host)};Gr&&Wr||(Gr=function(e){!function(e,t){if(e<1)throw new Vr("Not enough arguments")}(arguments.length);var t=N(e)?e:Hr(e),n=Ur(arguments,1);return Qr[++Xr]=function(){Lr(t,void 0,n)},Tr(Xr),Xr},Wr=function(e){delete Qr[e]},lr?Tr=function(e){qr.nextTick(to(e))}:Kr&&Kr.now?Tr=function(e){Kr.now(to(e))}:Jr&&!zr?(Pr=(xr=new Jr).port2,xr.port1.onmessage=no,Tr=$r(Pr.postMessage,Pr)):T.addEventListener&&N(T.postMessage)&&!T.importScripts&&Ar&&"file:"!==Ar.protocol&&!B(ro)?(Tr=ro,T.addEventListener("message",no,!1)):Tr=Zr in D("script")?function(e){St.appendChild(D("script"))[Zr]=function(){St.removeChild(this),eo(e)}}:function(e){setTimeout(to(e),0)});var oo={set:Gr,clear:Wr},io=Object.getOwnPropertyDescriptor,ao=function(){this.head=null,this.tail=null};ao.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var co,uo,so,lo,fo,po=ao,ho=/ipad|iphone|ipod/i.test(he)&&"undefined"!=typeof Pebble,yo=/web0s(?!.*chrome)/i.test(he),mo=oo.set,vo=T.MutationObserver||T.WebKitMutationObserver,go=T.document,bo=T.process,So=T.Promise,wo=function(e){if(!Ne)return T[e];var t=io(T,e);return t&&t.value}("queueMicrotask");if(!wo){var Oo=new po,Ro=function(){var e,t;for(lr&&(e=bo.domain)&&e.exit();t=Oo.get();)try{t()}catch(e){throw Oo.head&&co(),e}e&&e.enter()};zr||lr||yo||!vo||!go?!ho&&So&&So.resolve?((lo=So.resolve(void 0)).constructor=So,fo=$r(lo.then,lo),co=function(){fo(Ro)}):lr?co=function(){bo.nextTick(Ro)}:(mo=$r(mo,T),co=function(){mo(Ro)}):(uo=!0,so=go.createTextNode(""),new vo(Ro).observe(so,{characterData:!0}),co=function(){so.data=uo=!uo}),wo=function(e){Oo.head||co(),Oo.add(e)}}var Co,Eo,jo,Ao,To,xo,Po,No=wo,Io=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},ko=T.Promise,_o="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Do=!_o&&!lr&&"object"==typeof window&&"object"==typeof document,Mo=Ae("species"),Lo=!1,Fo=N(T.PromiseRejectionEvent),Bo=Cn("Promise",function(){var e=sn(ko),t=e!==String(ko);if(!t&&66===Se)return!0;if(!Se||Se<51||!/native code/.test(e)){var n=new ko(function(e){e(1)}),r=function(e){e(function(){},function(){})};if((n.constructor={})[Mo]=r,!(Lo=n.then(function(){})instanceof r))return!0}return!t&&(Do||_o)&&!Fo}),$o={CONSTRUCTOR:Bo,REJECTION_EVENT:Fo,SUBCLASSING:Lo},Uo=TypeError,Vo=function(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw new Uo("Bad Promise constructor");t=e,n=r}),this.resolve=ze(t),this.reject=ze(n)},zo={f:function(e){return new Vo(e)}},Go=oo.set,Wo="Promise",qo=$o.CONSTRUCTOR,Ko=$o.REJECTION_EVENT,Ho=$o.SUBCLASSING,Jo=Kt.getterFor(Wo),Yo=Kt.set,Xo=ko&&ko.prototype,Qo=ko,Zo=Xo,ei=T.TypeError,ti=T.document,ni=T.process,ri=zo.f,oi=ri,ii=!!(ti&&ti.createEvent&&T.dispatchEvent),ai="unhandledrejection",ci=function(e){var t;return!(!I(e)||!N(t=e.then))&&t},ui=function(e,t){var n,r,o,i=t.value,a=1===t.state,c=a?e.ok:e.fail,u=e.resolve,s=e.reject,l=e.domain;try{c?(a||(2===t.rejection&&di(t),t.rejection=1),!0===c?n=i:(l&&l.enter(),n=c(i),l&&(l.exit(),o=!0)),n===e.promise?s(new ei("Promise-chain cycle")):(r=ci(n))?De(r,n,u,s):u(n)):s(i)}catch(e){l&&!o&&l.exit(),s(e)}},si=function(e,t){e.notified||(e.notified=!0,No(function(){for(var n,r=e.reactions;n=r.get();)ui(n,e);e.notified=!1,t&&!e.rejection&&fi(e)}))},li=function(e,t,n){var r,o;ii?((r=ti.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),T.dispatchEvent(r)):r={promise:t,reason:n},!Ko&&(o=T["on"+e])?o(r):e===ai&&function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}}("Unhandled promise rejection",n)},fi=function(e){De(Go,T,function(){var t,n=e.facade,r=e.value;if(pi(e)&&(t=Io(function(){lr?ni.emit("unhandledRejection",r,n):li(ai,n,r)}),e.rejection=lr||pi(e)?2:1,t.error))throw t.value})},pi=function(e){return 1!==e.rejection&&!e.parent},di=function(e){De(Go,T,function(){var t=e.facade;lr?ni.emit("rejectionHandled",t):li("rejectionhandled",t,e.value)})},hi=function(e,t,n){return function(r){e(t,r,n)}},yi=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,si(e,!0))},mi=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw new ei("Promise can't be resolved itself");var r=ci(t);r?No(function(){var n={done:!1};try{De(r,t,hi(mi,n,e),hi(yi,n,e))}catch(t){yi(n,t,e)}}):(e.value=t,e.state=1,si(e,!1))}catch(t){yi({done:!1},t,e)}}};if(qo&&(Qo=function(e){!function(e,t){if(Le(t,e))return e;throw new pr("Incorrect invocation")}(this,Zo),ze(e),De(Co,this);var t=Jo(this);try{e(hi(mi,t),hi(yi,t))}catch(e){yi(t,e)}},(Co=function(e){Yo(this,{type:Wo,done:!1,notified:!1,parent:!1,reactions:new po,rejection:!1,state:0,value:void 0})}).prototype=fn(Zo=Qo.prototype,"then",function(e,t){var n,r,o,i=Jo(this),a=ri((n=Qo,void 0===(o=Pe(this).constructor)||X(r=Pe(o)[kr])?n:function(e){if(Nr(e))return e;throw new Ir(Ue(e)+" is not a constructor")}(r)));return i.parent=!0,a.ok=!N(e)||e,a.fail=N(t)&&t,a.domain=lr?ni.domain:void 0,0===i.state?i.reactions.add(a):No(function(){ui(a,i)}),a.promise}),Eo=function(){var e=new Co,t=Jo(e);this.promise=e,this.resolve=hi(mi,t),this.reject=hi(yi,t)},zo.f=ri=function(e){return e===Qo||void 0===e?new Eo(e):oi(e)},N(ko)&&Xo!==Object.prototype)){jo=Xo.then,Ho||fn(Xo,"then",function(e,t){var n=this;return new Qo(function(e,t){De(jo,n,e,t)}).then(e,t)},{unsafe:!0});try{delete Xo.constructor}catch(e){}zn&&zn(Xo,Zo)}jn({global:!0,constructor:!0,wrap:!0,forced:qo},{Promise:Qo}),Fn(Qo,Wo,!1),Po=Me(Wo),Ne&&Po&&!Po[fr]&&(Ao=Po,To=fr,(xo={configurable:!0,get:function(){return this}}).get&&ln(xo.get,To,{getter:!0}),xo.set&&ln(xo.set,To,{setter:!0}),tt.f(Ao,To,xo));var vi=Ae("iterator"),gi=Array.prototype,bi=Ae("iterator"),Si=function(e){if(!X(e))return Ge(e,bi)||Ge(e,"@@iterator")||Ft[gr(e)]},wi=TypeError,Oi=function(e,t,n){var r,o;Pe(e);try{if(!(r=Ge(e,"return"))){if("throw"===t)throw n;return n}r=De(r,e)}catch(e){o=!0,r=e}if("throw"===t)throw n;if(o)throw r;return Pe(r),n},Ri=TypeError,Ci=function(e,t){this.stopped=e,this.result=t},Ei=Ci.prototype,ji=function(e,t,n){var r,o,i,a,c,u,s,l,f=!(!n||!n.AS_ENTRIES),p=!(!n||!n.IS_RECORD),d=!(!n||!n.IS_ITERATOR),h=!(!n||!n.INTERRUPTED),y=$r(t,n&&n.that),m=function(e){return r&&Oi(r,"normal",e),new Ci(!0,e)},v=function(e){return f?(Pe(e),h?y(e[0],e[1],m):y(e[0],e[1])):h?y(e,m):y(e)};if(p)r=e.iterator;else if(d)r=e;else{if(!(o=Si(e)))throw new Ri(Ue(e)+" is not iterable");if(void 0!==(l=o)&&(Ft.Array===l||gi[vi]===l)){for(i=0,a=st(e);a>i;i++)if((c=v(e[i]))&&Le(Ei,c))return c;return new Ci(!1)}r=function(e,t){var n=arguments.length<2?Si(e):t;if(ze(n))return Pe(De(n,e));throw new wi(Ue(e)+" is not iterable")}(e,o)}for(u=p?e.next:r.next;!(s=De(u,r)).done;){try{c=v(s.value)}catch(e){Oi(r,"throw",e)}if("object"==typeof c&&c&&Le(Ei,c))return c}return new Ci(!1)},Ai=Ae("iterator"),Ti=!1;try{var xi=0,Pi={next:function(){return{done:!!xi++}},return:function(){Ti=!0}};Pi[Ai]=function(){return this},Array.from(Pi,function(){throw 2})}catch(e){}var Ni=$o.CONSTRUCTOR||!function(e,t){try{if(!Ti)return!1}catch(e){return!1}var n=!1;try{var r={};r[Ai]=function(){return{next:function(){return{done:n=!0}}}},ko.all(r).then(void 0,function(){})}catch(e){}return n}();jn({target:"Promise",stat:!0,forced:Ni},{all:function(e){var t=this,n=zo.f(t),r=n.resolve,o=n.reject,i=Io(function(){var n=ze(t.resolve),i=[],a=0,c=1;ji(e,function(e){var u=a++,s=!1;c++,De(n,t,e).then(function(e){s||(s=!0,i[u]=e,--c||r(i))},o)}),--c||r(i)});return i.error&&o(i.value),n.promise}});var Ii=ko&&ko.prototype;if(jn({target:"Promise",proto:!0,forced:$o.CONSTRUCTOR,real:!0},{catch:function(e){return this.then(void 0,e)}}),N(ko)){var ki=Me("Promise").prototype.catch;Ii.catch!==ki&&fn(Ii,"catch",ki,{unsafe:!0})}jn({target:"Promise",stat:!0,forced:Ni},{race:function(e){var t=this,n=zo.f(t),r=n.reject,o=Io(function(){var o=ze(t.resolve);ji(e,function(e){De(o,t,e).then(n.resolve,r)})});return o.error&&r(o.value),n.promise}}),jn({target:"Promise",stat:!0,forced:$o.CONSTRUCTOR},{reject:function(e){var t=zo.f(this);return(0,t.reject)(e),t.promise}}),jn({target:"Promise",stat:!0,forced:$o.CONSTRUCTOR},{resolve:function(e){return function(e,t){if(Pe(e),I(t)&&t.constructor===e)return t;var n=zo.f(e);return(0,n.resolve)(t),n.promise}(this,e)}});var _i=ft.includes,Di=B(function(){return!Array(1).includes()});jn({target:"Array",proto:!0,forced:Di},{includes:function(e){return _i(this,e,arguments.length>1?arguments[1]:void 0)}}),Lt("includes");var Mi=Ae("match"),Li=TypeError,Fi=String,Bi=function(e){if("Symbol"===gr(e))throw new TypeError("Cannot convert a Symbol value to a string");return Fi(e)},$i=Ae("match"),Ui=G("".indexOf);jn({target:"String",proto:!0,forced:!function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[$i]=!1,"/./"[e](t)}catch(e){}}return!1}("includes")},{includes:function(e){return!!~Ui(Bi(Z(this)),Bi(function(e){if(function(e){var t;return I(e)&&(void 0!==(t=e[Mi])?!!t:"RegExp"===K(e))}(e))throw new Li("The method doesn't accept regular expressions");return e}(e)),arguments.length>1?arguments[1]:void 0)}});var Vi=Object.assign,zi=Object.defineProperty,Gi=G([].concat),Wi=!Vi||B(function(){if(Ne&&1!==Vi({b:1},Vi(zi({},"a",{enumerable:!0,get:function(){zi(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol("assign detection"),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!==Vi({},e)[n]||vt(Vi({},t)).join("")!==r})?function(e,t){for(var n=ce(e),r=arguments.length,o=1,i=hn.f,a=Xt.f;r>o;)for(var c,u=Y(arguments[o++]),s=i?Gi(vt(u),i(u)):vt(u),l=s.length,f=0;l>f;)c=s[f++],Ne&&!De(a,u,c)||(n[c]=u[c]);return n}:Vi;function qi(){return qi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qi.apply(this,arguments)}function Ki(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}jn({target:"Object",stat:!0,arity:2,forced:Object.assign!==Wi},{assign:Wi});const Hi=["count","handleClick"],Ji=e=>{let{count:t,handleClick:r}=e,o=Ki(e,Hi);return h(n.IconButton,{onClick:r},h(m.default,qi({},o,{badgeContent:t,overlap:"circular",color:"primary",fontSize:"1.5rem"}),h(y.default,{sx:Object.assign({fontSize:"2.5rem"},t>0?{color:"primary.main"}:{color:"secondary.main"})})))},Yi={BEARER:"Bearer",TENANT_ID:"tenant_id",BU_ID:"bu_id",SNOP_ID:"snop_id"},Xi="refresh",Qi="close",Zi=[{label:"Show 10 Rows",value:10},{label:"Show 20 Rows",value:20},{label:"Show 30 Rows",value:30}],ea={"SKU Name":"sku_name",Node:"node","Channel Name":"channel_name"},ta=Object.values(ea),na=["message","sub_type"],ra=e=>Object.assign({},e,{borderRadius:2,colors:Object.assign({},e.colors,{primary25:"#F2F2F2",primary:"#E94F1C"})}),oa=["title","subTitle","children","onRefresh","onClose","loading","handleShowAll","handleMarkAllAsRead","isMarkAllAsRead","width","headerIconType","isDialogActionShow","className"],ia=i.styled(n.Dialog)(e=>{let{theme:t}=e;return{"& .MuiPaper-root":{borderRadius:8,border:"1px solid "+u.grey[50],boxShadow:t.shadows[5]},"& .MuiDialogContent-root":{padding:t.spacing(1)},"& .MuiDialogActions-root":{padding:t.spacing(.2)+" "+t.spacing(.5)+"}"}}}),aa=e=>{let{title:t,subTitle:r,children:o,onRefresh:i,onClose:a,loading:c,handleShowAll:u,handleMarkAllAsRead:s,isMarkAllAsRead:l,headerIconType:f,isDialogActionShow:p,className:d}=e,y=Ki(e,oa);return h(ia,qi({maxWidth:"md",onClose:a},y,{className:["notification-dialog",d].join(" ")}),h(n.DialogTitle,{sx:{p:1,display:"flex"}},h(n.Box,{sx:{gap:1,display:"flex"}},h(n.Box,null,h(n.Typography,{variant:"h6",className:"title"},t),r&&h(n.Typography,{variant:"h6",className:"title sub-title"},r)),(()=>{switch(f){case Xi:return h(n.IconButton,{disabled:c,"aria-label":"close",sx:{position:"absolute",right:8,top:8,color:"primary.main"},onClick:i},h(v.default,{fontSize:"medium"}));case Qi:return h(n.IconButton,{"aria-label":"close",sx:{position:"absolute",right:8,top:8,color:"primary.main"},onClick:a},h(g.default,{fontSize:"medium"}));default:return null}})())),o,p&&h(n.DialogActions,{className:"dialog-action"},h(n.Button,{onClick:u,className:"view-all"},"Show all"),l.boo&&h(n.Button,{className:"view-all",onClick:s},"Mark all as read")))},ca={LOADING:"LOADING",SUCCESS:"SUCCESS",ERROR:"ERROR",MARK_ALL_AS_READ:"MARK_ALL_AS_READ"},ua={SWR:"Something went wrong!",UNHANDLED:"Unhandled action type: ",INVALID:"Invalid action type: ",INVALID_ACTION:"Invalid action type: ",NRF:"Not record found!"},sa=/*#__PURE__*/t.createContext(null),la=/*#__PURE__*/t.createContext(null);function fa(e){let{children:n}=e;const[r,o]=t.useReducer(pa,da);return h(sa.Provider,{value:r},h(la.Provider,{value:o},n))}function pa(e,t){switch(t.type){case ca.LOADING:return Object.assign({},e,{loading:t.loading});case ca.SUCCESS:return Object.assign({},e,{data:t.data});case ca.MARK_ALL_AS_READ:return Object.assign({},e,{isMarkAllAsRead:t.isMarkAllAsRead});case ca.ERROR:return Object.assign({},e,{error:t.error});default:throw new Error(ua.UNHANDLED+": "+t)}}const da={loading:!1,data:[],error:"",isMarkAllAsRead:{count:0,boo:!1}};var ha=TypeError,ya=function(e,t){if(!delete e[t])throw new ha("Cannot delete property "+Ue(t)+" of "+Ue(e))},ma=Math.floor,va=function(e,t){var n=e.length;if(n<8)for(var r,o,i=1;i<n;){for(o=i,r=e[i];o&&t(e[o-1],r)>0;)e[o]=e[--o];o!==i++&&(e[o]=r)}else for(var a=ma(n/2),c=va(Ur(e,0,a),t),u=va(Ur(e,a),t),s=c.length,l=u.length,f=0,p=0;f<s||p<l;)e[f+p]=f<s&&p<l?t(c[f],u[p])<=0?c[f++]:u[p++]:f<s?c[f++]:u[p++];return e},ga=va,ba=he.match(/firefox\/(\d+)/i),Sa=!!ba&&+ba[1],wa=/MSIE|Trident/.test(he),Oa=he.match(/AppleWebKit\/(\d+)\./),Ra=!!Oa&&+Oa[1],Ca=[],Ea=G(Ca.sort),ja=G(Ca.push),Aa=B(function(){Ca.sort(void 0)}),Ta=B(function(){Ca.sort(null)}),xa=function(e,t){var n=[].sort;return!!n&&B(function(){n.call(null,function(){return 1},1)})}(),Pa=!B(function(){if(Se)return Se<70;if(!(Sa&&Sa>3)){if(wa)return!0;if(Ra)return Ra<603;var e,t,n,r,o="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)Ca.push({k:t+r,v:n})}for(Ca.sort(function(e,t){return t.v-e.v}),r=0;r<Ca.length;r++)t=Ca[r].k.charAt(0),o.charAt(o.length-1)!==t&&(o+=t);return"DGBEFHACIJK"!==o}});jn({target:"Array",proto:!0,forced:Aa||!Ta||!xa||!Pa},{sort:function(e){void 0!==e&&ze(e);var t=ce(this);if(Pa)return void 0===e?Ea(t):Ea(t,e);var n,r,o=[],i=st(t);for(r=0;r<i;r++)r in t&&ja(o,t[r]);for(ga(o,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:Bi(t)>Bi(n)?1:-1}}(e)),n=st(o),r=0;r<n;)t[r]=o[r++];for(;r<i;)ya(t,r++);return t}});var Na,Ia="\t\n\v\f\r \u2028\u2029\ufeff",ka=G("".replace),_a=RegExp("^["+Ia+"]+"),Da=RegExp("(^|[^"+Ia+"])["+Ia+"]+$"),Ma=function(e){return function(t){var n=Bi(Z(t));return 1&e&&(n=ka(n,_a,"")),2&e&&(n=ka(n,Da,"$1")),n}},La={start:Ma(1),end:Ma(2),trim:Ma(3)},Fa=rn.PROPER,Ba=La.trim;jn({target:"String",proto:!0,forced:(Na="trim",B(function(){return!!Ia[Na]()||"
"!=="
"[Na]()||Fa&&Ia[Na].name!==Na}))},{trim:function(){return Ba(this)}});const $a=e=>{const t=localStorage.getItem(e);return t?JSON.parse(t):""},Ua=e=>new Date(e).toLocaleString("en-US",{year:"numeric",month:"long",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}),Va=e=>{const t=e.sort((e,t)=>e.isRead===t.isRead?0:t.isRead?-1:1).slice(0,9);return t},za=(e,t,n)=>e.filter(e=>t.some(t=>e[t].toLowerCase().includes(n.trim().toLowerCase()))),Ga=(e,t,n)=>e.slice((t-1)*n,t*n),Wa=$a("user"),qa=$a("snop"),Ka={TOKEN:$a("token"),BU_IDS:null==Wa?void 0:Wa.business_unit_id,TENANT_IDS:null==Wa?void 0:Wa.tenant_id,SNOP_IDS:null==qa?void 0:qa.snop_id},Ha=b.default.create({baseURL:"https://scai-qa-api.3sc.ai",headers:{"Content-Type":"application/json",Authorization:Yi.BEARER+" "+Ka.TOKEN}});Ha.interceptors.request.use(function(e){return e},function(e){return Promise.reject(e)}),Ha.interceptors.response.use(function(e){return e},function(e){return Promise.reject(e)});const Ja="/notification";function Ya(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}const{TENANT_ID:Xa,BU_ID:Qa,SNOP_ID:Za}=Yi,{TENANT_IDS:ec,BU_IDS:tc,SNOP_IDS:nc}=Ka,rc=function(e){return Promise.resolve(Ya(function(){return Promise.resolve(Ha.put(Ja+"/v1?"+Xa+"="+ec+"&"+Qa+"="+tc+"&"+Za+"="+nc,e))},function(e){return e}))};var oc="function"==typeof Symbol&&Symbol.for,ic=oc?Symbol.for("react.element"):60103,ac=oc?Symbol.for("react.portal"):60106,cc=oc?Symbol.for("react.fragment"):60107,uc=oc?Symbol.for("react.strict_mode"):60108,sc=oc?Symbol.for("react.profiler"):60114,lc=oc?Symbol.for("react.provider"):60109,fc=oc?Symbol.for("react.context"):60110,pc=oc?Symbol.for("react.async_mode"):60111,dc=oc?Symbol.for("react.concurrent_mode"):60111,hc=oc?Symbol.for("react.forward_ref"):60112,yc=oc?Symbol.for("react.suspense"):60113,mc=oc?Symbol.for("react.suspense_list"):60120,vc=oc?Symbol.for("react.memo"):60115,gc=oc?Symbol.for("react.lazy"):60116,bc=oc?Symbol.for("react.block"):60121,Sc=oc?Symbol.for("react.fundamental"):60117,wc=oc?Symbol.for("react.responder"):60118,Oc=oc?Symbol.for("react.scope"):60119;function Rc(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case ic:switch(e=e.type){case pc:case dc:case cc:case sc:case uc:case yc:return e;default:switch(e=e&&e.$$typeof){case fc:case hc:case gc:case vc:case lc:return e;default:return t}}case ac:return t}}}function Cc(e){return Rc(e)===dc}var Ec={AsyncMode:pc,ConcurrentMode:dc,ContextConsumer:fc,ContextProvider:lc,Element:ic,ForwardRef:hc,Fragment:cc,Lazy:gc,Memo:vc,Portal:ac,Profiler:sc,StrictMode:uc,Suspense:yc,isAsyncMode:function(e){return Cc(e)||Rc(e)===pc},isConcurrentMode:Cc,isContextConsumer:function(e){return Rc(e)===fc},isContextProvider:function(e){return Rc(e)===lc},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===ic},isForwardRef:function(e){return Rc(e)===hc},isFragment:function(e){return Rc(e)===cc},isLazy:function(e){return Rc(e)===gc},isMemo:function(e){return Rc(e)===vc},isPortal:function(e){return Rc(e)===ac},isProfiler:function(e){return Rc(e)===sc},isStrictMode:function(e){return Rc(e)===uc},isSuspense:function(e){return Rc(e)===yc},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===cc||e===dc||e===sc||e===uc||e===yc||e===mc||"object"==typeof e&&null!==e&&(e.$$typeof===gc||e.$$typeof===vc||e.$$typeof===lc||e.$$typeof===fc||e.$$typeof===hc||e.$$typeof===Sc||e.$$typeof===wc||e.$$typeof===Oc||e.$$typeof===bc)},typeOf:Rc},jc=C(function(e,t){"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,n=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,s=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function S(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:var d=e.type;switch(d){case s:case l:case o:case a:case i:case p:return d;default:var m=d&&d.$$typeof;switch(m){case u:case f:case y:case h:case c:return m;default:return t}}case r:return t}}}var w=l,O=u,R=c,C=n,E=f,j=o,A=y,T=h,x=r,P=a,N=i,I=p,k=!1;function _(e){return S(e)===l}t.AsyncMode=s,t.ConcurrentMode=w,t.ContextConsumer=O,t.ContextProvider=R,t.Element=C,t.ForwardRef=E,t.Fragment=j,t.Lazy=A,t.Memo=T,t.Portal=x,t.Profiler=P,t.StrictMode=N,t.Suspense=I,t.isAsyncMode=function(e){return k||(k=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),_(e)||S(e)===s},t.isConcurrentMode=_,t.isContextConsumer=function(e){return S(e)===u},t.isContextProvider=function(e){return S(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return S(e)===f},t.isFragment=function(e){return S(e)===o},t.isLazy=function(e){return S(e)===y},t.isMemo=function(e){return S(e)===h},t.isPortal=function(e){return S(e)===r},t.isProfiler=function(e){return S(e)===a},t.isStrictMode=function(e){return S(e)===i},t.isSuspense=function(e){return S(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===l||e===a||e===i||e===p||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===h||e.$$typeof===c||e.$$typeof===u||e.$$typeof===f||e.$$typeof===v||e.$$typeof===g||e.$$typeof===b||e.$$typeof===m)},t.typeOf=S}()}),Ac=C(function(e){e.exports="production"===process.env.NODE_ENV?Ec:jc}),Tc=Object.getOwnPropertySymbols,xc=Object.prototype.hasOwnProperty,Pc=Object.prototype.propertyIsEnumerable,Nc=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,o=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),i=1;i<arguments.length;i++){for(var a in n=Object(arguments[i]))xc.call(n,a)&&(o[a]=n[a]);if(Tc){r=Tc(n);for(var c=0;c<r.length;c++)Pc.call(n,r[c])&&(o[r[c]]=n[r[c]])}}return o},Ic=Function.call.bind(Object.prototype.hasOwnProperty),kc="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",_c=Ic,Dc=function(){};if("production"!==process.env.NODE_ENV){var Mc=kc,Lc={},Fc=_c;Dc=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function Bc(e,t,n,r,o){if("production"!==process.env.NODE_ENV)for(var i in e)if(Fc(e,i)){var a;try{if("function"!=typeof e[i]){var c=Error((r||"React class")+": "+n+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw c.name="Invariant Violation",c}a=e[i](t,i,r,n,null,Mc)}catch(e){a=e}if(!a||a instanceof Error||Dc((r||"React class")+": type specification of "+n+" `"+i+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof a+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),a instanceof Error&&!(a.message in Lc)){Lc[a.message]=!0;var u=o?o():"";Dc("Failed "+n+" type: "+a.message+(null!=u?u:""))}}}Bc.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(Lc={})};var $c=Bc,Uc=function(){};function Vc(){return null}function zc(){}function Gc(){}"production"!==process.env.NODE_ENV&&(Uc=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),Gc.resetWarningCache=zc;var Wc=C(function(e){e.exports="production"!==process.env.NODE_ENV?function(e,t){var n="function"==typeof Symbol&&Symbol.iterator,r="<<anonymous>>",o={array:u("array"),bigint:u("bigint"),bool:u("boolean"),func:u("function"),number:u("number"),object:u("object"),string:u("string"),symbol:u("symbol"),any:c(Vc),arrayOf:function(e){return c(function(t,n,r,o,i){if("function"!=typeof e)return new a("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var c=t[n];if(!Array.isArray(c))return new a("Invalid "+o+" `"+i+"` of type `"+f(c)+"` supplied to `"+r+"`, expected an array.");for(var u=0;u<c.length;u++){var s=e(c,u,r,o,i+"["+u+"]",kc);if(s instanceof Error)return s}return null})},element:c(function(t,n,r,o,i){var c=t[n];return e(c)?null:new a("Invalid "+o+" `"+i+"` of type `"+f(c)+"` supplied to `"+r+"`, expected a single ReactElement.")}),elementType:c(function(e,t,n,r,o){var i=e[t];return Ac.isValidElementType(i)?null:new a("Invalid "+r+" `"+o+"` of type `"+f(i)+"` supplied to `"+n+"`, expected a single ReactElement type.")}),instanceOf:function(e){return c(function(t,n,o,i,c){return t[n]instanceof e?null:new a("Invalid "+i+" `"+c+"` of type `"+((u=t[n]).constructor&&u.constructor.name?u.constructor.name:r)+"` supplied to `"+o+"`, expected instance of `"+(e.name||r)+"`.");var u})},node:c(function(e,t,n,r,o){return l(e[t])?null:new a("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")}),objectOf:function(e){return c(function(t,n,r,o,i){if("function"!=typeof e)return new a("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var c=t[n],u=f(c);if("object"!==u)return new a("Invalid "+o+" `"+i+"` of type `"+u+"` supplied to `"+r+"`, expected an object.");for(var s in c)if(_c(c,s)){var l=e(c,s,r,o,i+"."+s,kc);if(l instanceof Error)return l}return null})},oneOf:function(e){return Array.isArray(e)?c(function(t,n,r,o,c){for(var u=t[n],s=0;s<e.length;s++)if(i(u,e[s]))return null;var l=JSON.stringify(e,function(e,t){return"symbol"===p(t)?String(t):t});return new a("Invalid "+o+" `"+c+"` of value `"+String(u)+"` supplied to `"+r+"`, expected one of "+l+".")}):("production"!==process.env.NODE_ENV&&Uc(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),Vc)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&Uc("Invalid argument supplied to oneOfType, expected an instance of array."),Vc;for(var t=0;t<e.length;t++){var n=e[t];if("function"!=typeof n)return Uc("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+d(n)+" at index "+t+"."),Vc}return c(function(t,n,r,o,i){for(var c=[],u=0;u<e.length;u++){var s=(0,e[u])(t,n,r,o,i,kc);if(null==s)return null;s.data&&_c(s.data,"expectedType")&&c.push(s.data.expectedType)}return new a("Invalid "+o+" `"+i+"` supplied to `"+r+"`"+(c.length>0?", expected one of type ["+c.join(", ")+"]":"")+".")})},shape:function(e){return c(function(t,n,r,o,i){var c=t[n],u=f(c);if("object"!==u)return new a("Invalid "+o+" `"+i+"` of type `"+u+"` supplied to `"+r+"`, expected `object`.");for(var l in e){var d=e[l];if("function"!=typeof d)return s(r,o,i,l,p(d));var h=d(c,l,r,o,i+"."+l,kc);if(h)return h}return null})},exact:function(e){return c(function(t,n,r,o,i){var c=t[n],u=f(c);if("object"!==u)return new a("Invalid "+o+" `"+i+"` of type `"+u+"` supplied to `"+r+"`, expected `object`.");var l=Nc({},t[n],e);for(var d in l){var h=e[d];if(_c(e,d)&&"function"!=typeof h)return s(r,o,i,d,p(h));if(!h)return new a("Invalid "+o+" `"+i+"` key `"+d+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var y=h(c,d,r,o,i+"."+d,kc);if(y)return y}return null})}};function i(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function a(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function c(e){if("production"!==process.env.NODE_ENV)var n={},o=0;function i(i,c,u,s,l,f,p){if(s=s||r,f=f||u,p!==kc){if(t){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var h=s+":"+u;!n[h]&&o<3&&(Uc("You are manually calling a React.PropTypes validation function for the `"+f+"` prop on `"+s+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),n[h]=!0,o++)}}return null==c[u]?i?new a(null===c[u]?"The "+l+" `"+f+"` is marked as required in `"+s+"`, but its value is `null`.":"The "+l+" `"+f+"` is marked as required in `"+s+"`, but its value is `undefined`."):null:e(c,u,s,l,f)}var c=i.bind(null,!1);return c.isRequired=i.bind(null,!0),c}function u(e){return c(function(t,n,r,o,i,c){var u=t[n];return f(u)!==e?new a("Invalid "+o+" `"+i+"` of type `"+p(u)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null})}function s(e,t,n,r,o){return new a((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function l(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(l);if(null===t||e(t))return!0;var r=function(e){var t=e&&(n&&e[n]||e["@@iterator"]);if("function"==typeof t)return t}(t);if(!r)return!1;var o,i=r.call(t);if(r!==t.entries){for(;!(o=i.next()).done;)if(!l(o.value))return!1}else for(;!(o=i.next()).done;){var a=o.value;if(a&&!l(a[1]))return!1}return!0;default:return!1}}function f(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function p(e){if(null==e)return""+e;var t=f(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function d(e){var t=p(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return a.prototype=Error.prototype,o.checkPropTypes=$c,o.resetWarningCache=$c.resetWarningCache,o.PropTypes=o,o}(Ac.isElement,!0):function(){function e(e,t,n,r,o,i){if(i!==kc){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Gc,resetWarningCache:zc};return n.PropTypes=n,n}()});const qc=e=>{let{type:t,title:r,subTitle:o,subType:i,isRead:a,handleShowDetails:c,handleRead:s,isCheckBox:l,isSubType:f,selectedAlert:p,id:d,handleCheckboxChange:y}=e;return h(n.Box,{className:"cards"},h(n.Stack,{display:"flex",flexDirection:"row",alignItems:"start",gap:1},t&&h(n.Badge,{color:t,variant:"dot",className:"badge"}),l&&h(n.Checkbox,{checked:!!p.includes(d),onChange:e=>y(e,d),disabled:a}),h(n.Typography,{variant:"h6",component:"span",className:["title-card",a&&"read"].join(" ")},r)),h(n.Stack,{display:"flex",justifyContent:"space-between",flexDirection:"row",alignItems:"start",gap:1},f&&h(n.Chip,{label:i,variant:"filled",size:"small",sx:{fontFamily:"Montserrat, sans-serif",fontWeight:"medium",color:"primary.main",ml:5}}),h(n.Typography,{variant:"body2",component:"div",className:["sub-title",a&&"read"].join(" ")},o)),h(n.Stack,{display:"flex",flexDirection:"row",justifyContent:"end",gap:1},h(n.Chip,{onClick:c,label:"Show Details",component:"button",variant:"filled",clickable:!0,size:"small",sx:{fontFamily:"Montserrat, sans-serif",fontWeight:"medium",color:u.blue[500]}}),!a&&h(n.Chip,{onClick:s,label:"Mark as Read",component:"button",variant:"filled",clickable:!0,size:"small",sx:{fontFamily:"Montserrat, sans-serif",fontWeight:"medium",color:"primary.main"}})))};qc.propTypes={type:Wc.string,title:Wc.string,subTitle:Wc.string,isRead:Wc.bool,handleShowDetails:Wc.func,handleRead:Wc.func};const Kc=e=>{let{data:t,handleRead:r,handleShowDetails:o}=e;return h(n.Box,null,t.map((e,t)=>h(qc,{key:t,type:"success",title:e.message,subTitle:Ua(e.createdAt),isRead:e.isRead,handleShowDetails:()=>o(e.id),handleRead:()=>r([e.id])})))};Kc.propTypes={data:Wc.array,handleRead:Wc.func,handleShowDetails:Wc.func};const Hc=["adornmentIcon"],Jc=i.styled(n.TextField)(e=>{let{theme:t}=e;return{"& .MuiInputBase-root":{height:"3.52rem"},"& .MuiFormLabel-root":{color:t.palette.input.border+" !important",fontSize:"1rem",marginTop:"0.4rem"},"& label.Mui-focused":{color:t.palette.input.color},"& .MuiInput-underline:after":{borderBottomColor:t.palette.input.border,borderBottomWidth:"0.1rem"},"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:t.palette.input.border,borderWidth:"0.1rem"},"&:hover fieldset":{borderColor:t.palette.input.border,borderWidth:"0.1rem"},"&.Mui-focused fieldset":{borderColor:t.palette.input.border,borderWidth:"0.1rem"}}}}),Yc=e=>{let{adornmentIcon:t}=e,n=Ki(e,Hc);return h(Jc,qi({},n,{InputProps:Object.assign({},t||{})}))},Xc=e=>{let{start:t,end:r,total:o}=e;return h(n.Box,{component:"h1",sx:{fontSize:"1.5rem",fontWeight:500}},t," - ",r," of ",o," logs")},Qc=e=>{let{page:t,rowPerPage:r,total:o,handleChangePage:i,isLogo:a,isMarkAllRead:c,selectedAlert:u,handleAllRead:s}=e;return h(Fragment,null,h(w.default,{count:Math.ceil(o/r),page:t,onChange:(e,t)=>{i(t)},sx:{margin:"1rem 0","& .MuiPaginationItem-root":{fontSize:"1.25rem","& .MuiSvgIcon-root":{fontSize:"2.2rem",color:"primary.main"}}},color:"primary",shape:"rounded",showFirstButton:!0,showLastButton:!0}),a&&h(Xc,{start:t*r-r+1,end:t*r>o?o:t*r,total:o}),c&&h(n.Button,{variant:"contained",className:"view-all",disabled:0===u.length,onClick:s},"Mark Read"))},Zc=["option","value","handleSelectChange"],eu=e=>{let{option:t,value:n,handleSelectChange:r}=e,o=Ki(e,Zc);return h(O.default,qi({},o,{options:t,value:n,className:"custom-select-container",onChange:r,theme:ra}))},tu=e=>{let{loading:r,isEmpty:o,data:i,handleShowDetails:a,handleRead:c,handleRefresh:u}=e;const[s,l]=t.useState(""),[f,p]=t.useState(1),[d,y]=t.useState(10),[m,g]=t.useState(0),[b,w]=t.useState([]),[O,R]=t.useState([]);t.useEffect(()=>{if(s){const e=za(i,na,s);return w(Ga(e,f,d)),void g(e.length)}w(Ga(i,f,d)),g(i.length)},[s,i,f,d]);const C=(e,t)=>{R(e.target.checked?e=>[...e,t]:e=>e.filter(e=>e!==t))};return h(Fragment,null,h(n.DialogContent,{dividers:!0,sx:{pt:"0 !important"}},h(n.Box,{sx:r||o?{display:"flex",justifyContent:"center",alignItems:"center",minHeight:320}:{}},r?h(n.CircularProgress,null):o?h(n.Typography,{className:"no-record"},ua.NRF):h(Fragment,null,h(n.Box,{className:"sticky-input-select"},h(n.Box,{sx:{display:"flex",gap:1}},h(Yc,{value:s,onChange:e=>{const t=e.target.value;t&&p(1),l(t)},label:"Search",focused:!0,adornmentIcon:{startAdornment:h(n.InputAdornment,{position:"start"},h(S.default,null))}}),h(eu,{value:{value:d,label:"Show "+d+" Rows"},option:Zi,handleSelectChange:e=>{p(1),y(e.value)}}),h(n.IconButton,{color:"primary",onClick:u},h(v.default,{fontSize:"medium"}))),h(Xc,{start:f*d-d+1,end:f*d>m?m:f*d,total:m})),0===b.length&&h(n.Typography,{className:"no-record"},ua.NRF),b.map((e,t)=>h(qc,{key:t,isCheckBox:!0,title:e.message,subTitle:Ua(e.createdAt),isRead:e.isRead,handleShowDetails:()=>a(e.id),handleRead:()=>c([e.id]),subType:e.sub_type,isSubType:!0,selectedAlert:O,id:e.id,handleCheckboxChange:C}))))),!(r||o)&&h(n.DialogActions,{sx:{justifyContent:"space-between",gap:1},className:"action-show-all-dialog"},h(Qc,{page:f,rowPerPage:d,total:m,handleChangePage:e=>{p(e)},isMarkAllRead:!0,selectedAlert:O,handleAllRead:()=>{c(O),R([])}})))},nu=e=>{let{sortKey:t,sortDir:n,column:r}=e;return h(Fragment,null,t===r?n?h("i",{className:"fa fa-arrow-down","aria-hidden":"true"}):h("i",{className:"fa fa-arrow-up","aria-hidden":"true"}):h(Fragment,null,h("i",{className:"fa fa-sort","aria-hidden":"true"})))},ru=e=>{var t;let{data:n,handleSort:r,sortDir:o,sortKey:i}=e;return h("table",{className:"table"},h("thead",null,h("tr",null,null==(t=Object.entries(ea))?void 0:t.map((e,t)=>{let[n,a]=e;return h("th",{key:t},h("span",{onClick:()=>r(a)},n,h(nu,{column:a,sortKey:i,sortDir:o})))}))),h("tbody",null,n.map((e,t)=>h("tr",{key:t},h("td",null,e.sku_name),h("td",null,e.node),h("td",null,e.channel_name)))))},ou=e=>{let{loading:r,isEmpty:o,data:i}=e;const[a,c]=t.useState(""),[u,s]=t.useState(1),[l,f]=t.useState(10),[p,d]=t.useState(0),[y,m]=t.useState([]),[v,g]=t.useState(!1),[b,w]=t.useState("");return t.useEffect(()=>{if(a||b){const e=za(i,ta,a);if(b){const t=((e,t,n)=>{const r=e.sort((e,r)=>"asc"===n?e[t].toLowerCase().localeCompare(r[t].toLowerCase()):r[t].toLowerCase().localeCompare(e[t].toLowerCase()));return r})(e,b,v?"asc":"desc");return m(Ga(t,u,l)),void d(t.length)}return m(Ga(e,u,l)),void d(e.length)}m(Ga(i,u,l)),d(i.length)},[a,i,u,l,v,b]),h(Fragment,null,h(n.DialogContent,{dividers:!0,sx:{pt:"0 !important"}},h(n.Box,{sx:r||o?{display:"flex",justifyContent:"center",alignItems:"center",minHeight:320}:{}},r?h(n.CircularProgress,null):o?h(n.Typography,{className:"no-record"},ua.NRF):h(Fragment,null,h(n.Box,{className:"sticky-input-select"},h(n.Box,{sx:{display:"flex",gap:1}},h(Yc,{value:a,onChange:e=>{const t=e.target.value;t&&s(1),c(t)},label:"Search",focused:!0,adornmentIcon:{startAdornment:h(n.InputAdornment,{position:"start"},h(S.default,null))}}),h(eu,{value:{value:l,label:"Show "+l+" Rows"},option:Zi,handleSelectChange:e=>{s(1),f(e.value)}}))),0===y.length?h(n.Typography,{className:"no-record"},ua.NRF):h(ru,{data:y,handleSort:e=>{g(!v),w(e)},sortDir:v,sortKey:b})))),!(r||o)&&h(n.DialogActions,{sx:{justifyContent:"space-between",gap:1},className:"action-show-all-dialog"},h(Qc,{page:u,rowPerPage:l,total:p,handleChangePage:e=>{s(e)},isLogo:!0})))};function iu(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}const au=()=>{const e=t.useContext(la),{loading:r,data:o,isMarkAllAsRead:i}=t.useContext(sa),[a,c]=t.useState(!1),[u,s]=t.useState(!1),[l,f]=t.useState(!1),[p,d]=t.useState({}),y=0===o.length,m=t.useCallback(function(){try{e({type:ca.LOADING,loading:!0}),e({type:ca.SUCCESS,data:[]}),e({type:ca.MARK_ALL_AS_READ,isMarkAllAsRead:{count:0,boo:!1}});const t=cu(function(){return iu(function(){return Promise.resolve(Promise.resolve(Ya(function(){return Promise.resolve(Ha.get(Ja+"/v1?"+Xa+"="+ec+"&"+Qa+"="+tc+"&"+Za+"="+nc))},function(e){return e}))).then(function(t){if(200===t.status){var n,r;e({type:ca.SUCCESS,data:(null==(n=t.data)||null==(n=n.responseData)?void 0:n.response)||[]});const o=(e=>{let t=0;for(let n=0;n<e.length;n++)e[n].isRead||t++;return t})((null==(r=t.data)||null==(r=r.responseData)?void 0:r.response)||[]);e({type:ca.MARK_ALL_AS_READ,isMarkAllAsRead:{count:o,boo:o>0}})}})},function(){e({type:ca.ERROR,error:ua.SWR})})},function(t,n){if(e({type:ca.LOADING,loading:!1}),t)throw n;return n});return Promise.resolve(t&&t.then?t.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},[e]);t.useEffect(()=>{m();const e=setInterval(()=>{m()},3e5);return()=>clearInterval(e)},[m]);const v=()=>{m()},g=e=>{const t=o.find(t=>t.id===e);d(t),f(!l)},b=function(t){try{if(0===t.length)return Promise.resolve();e({type:ca.LOADING,loading:!0});const n=cu(function(){return iu(function(){return Promise.resolve(rc(t)).then(function(n){if(200===n.status){let n=0;const r=o.map(e=>(e.isRead||n++,t.includes(e.id)?Object.assign({},e,{isRead:!0}):e));e({type:ca.MARK_ALL_AS_READ,isMarkAllAsRead:{count:n,boo:n>0}}),e({type:ca.SUCCESS,data:r})}})},function(){e({type:ca.ERROR,error:ua.SWR})})},function(t,n){if(e({type:ca.LOADING,loading:!1}),t)throw n;return n});return Promise.resolve(n&&n.then?n.then(function(){}):void 0)}catch(e){return Promise.reject(e)}};return h(n.Box,null,h(n.Box,{sx:{display:"flex",justifyContent:"center"}},h(Ji,{count:i.count,handleClick:()=>c(!a)})),h(aa,{title:"Alerts",open:a,loading:r,isMarkAllAsRead:i,onClose:()=>c(!a),onRefresh:v,handleShowAll:()=>{s(!u)},handleMarkAllAsRead:function(){try{const t=(e=>{const t=[];return e.forEach(e=>{e.isRead||t.push(e.id)}),t})(o);e({type:ca.LOADING,loading:!0});const n=cu(function(){return iu(function(){return Promise.resolve(rc(t)).then(function(t){if(200===t.status){const t=o.map(e=>Object.assign({},e,{isRead:!0}));e({type:ca.SUCCESS,data:t}),e({type:ca.MARK_ALL_AS_READ,isMarkAllAsRead:{count:0,boo:!1}})}})},function(){e({type:ca.ERROR,error:ua.SWR})})},function(t,n){if(e({type:ca.LOADING,loading:!1}),t)throw n;return n});return Promise.resolve(n&&n.then?n.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},headerIconType:Xi,isDialogActionShow:!0,className:"alert-dialog-main"},h(n.DialogContent,{dividers:!0},h(n.Box,{sx:r||y?{display:"flex",justifyContent:"center",alignItems:"center",height:320}:{height:320}},r?h(n.CircularProgress,null):y?h(n.Typography,{className:"no-record"},ua.NRF):h(Kc,{data:Va(o),handleRead:b,handleShowDetails:g})))),h(aa,{title:"Alerts",open:u,loading:r,onClose:()=>s(!u),onRefresh:v,headerIconType:Qi,className:"alert-dialog"},h(tu,{loading:r,isEmpty:y,data:o,handleRefresh:v,handleShowDetails:g,handleRead:b})),h(aa,{title:null==p?void 0:p.message,subTitle:null==p?void 0:p.remark,open:l,onClose:()=>f(!l),headerIconType:Qi,className:"alert-dialog"},h(ou,{loading:r,isEmpty:y,data:(null==p?void 0:p.notificationDetails)||[]})))};function cu(e,t){try{var n=e()}catch(e){return t(!0,e)}return n&&n.then?n.then(t.bind(null,!1),t.bind(null,!0)):t(!1,n)}const uu=n.createTheme({palette:{primary:{main:"#E94F1C"},secondary:{main:"#1D1D1B"},input:{color:"rgba(0, 0, 0, 0.87)",border:"#ACB2BA"}}});function su(e){let{children:t}=e;return h(n.ThemeProvider,{theme:uu},t)}e.Notification=()=>h(su,null,h(fa,null,h(au,null)))});
|
|
2
|
+
//# sourceMappingURL=index.umd.js.map
|