PageSourceSearch

https://eknepal.com/static/js/41.a32485f3.chunk.js

js eknepal.com collected 2026-10-01 14:24:37 UTC 45,816 bytes, 2 lines download raw bytes

1(this["webpackJsonpmedia-alliance-app"]=this["webpackJsonpmedia-alliance-app"]||[]).push([[41,3,11],{511:function(e,t,n){"use strict";n.r(t);var a=n(1),r=n(551),i=n(585),c=n(570),s=n(15),o=n(183),l=n(21),d=n(19),u=n(20),b=n(16);const j=e=>Object(u.a)("json").delete(d.a.goldSilver.goldorsilverById.replace("{id}",e));var f=n(788),m=n(182);function h(e,t){return Object(l.useQuery)(["fetchGoldAndSilver",e],()=>(e=>{const t=Object(m.a)(e),n=d.a.goldSilver.base+"?"+t;return Object(u.a)().get(n)})(e),t)}var O=n(8),p=n(18),v=n(2);var x=()=>{var e;const t=Object(O.useHistory)(),{userPermissionList:n}=Object(p.a)(e=>e),[d,u]=Object(a.useState)([]),[m,x]=Object(a.useState)([]),[g,E]=Object(a.useState)(!1);let y=[{key:"id",name:"SN"},{key:"date",name:"Date"},{key:"gold_hallmark_rate",name:"Gold Hallmark (10gm)"},{key:"gold_tejabi_rate",name:"Gold Tajabi (10gm)"},{key:"silver_rate",name:"Silver (10gm)"}],k=[{key:"id",name:"SN"},{key:"date",name:"Date"},{key:"gold_hallmark_rate",name:"Gold Hallmark (10gm)"},{key:"gold_tejabi_rate",name:"Gold Tajabi (10gm)"},{key:"silver_rate",name:"Silver (10gm)"},{key:"action",name:"Action"}];Object(a.useEffect)(()=>{const e=n.map(e=>e.name);x(e);let t=e.includes("gold-silver-add-edit")||e.includes("gold-silver-delete")?k:y;u(t)},[n]);let C={page:1,page_size:15,orderBy:"id",order:o.d.DESCENDING};const[N,w]=Object(a.useState)(C),[S,D]=Object(a.useState)({title:"",description:"",id:""}),{isLoading:_,data:R}=h(N),{mutate:L,status:T}=function(){const e=Object(l.useQueryClient)();return Object(l.useMutation)(j,{onSuccess:()=>{e.invalidateQueries("fetchGoldAndSilver"),b.b.success("Gold and Silver data has been deleted successfully")},onError:e=>{console.log(e),b.b.error("Unfortunately, deletition of gold and silver data was not successful.")}})}(),{mutate:$}=Object(f.a)(),[M,A]=Object(a.useState)([]),[F,P]=Object(a.useState)({date_from:"",date_to:""});Object(a.useEffect)(()=>{R&&A([...R.payload])},[R]);return Object(v.jsx)(r.a,{children:Object(v.jsxs)("div",{children:[Object(v.jsx)(i.a,{show:g,modalDetail:S,handleClose:()=>E(!1),handleSuccess:e=>{E(!1),L(e.id)}}),Object(v.jsx)("div",{className:"body flex-grow-1 px-3",children:Object(v.jsx)(c.a,{payload:M,columns:d,handleAdd:m.includes("gold-silver-add-edit")?()=>{t.push(s.a.admin.home.goldSilver.add)}:null,handleEdit:m.includes("gold-silver-add-edit")?e=>{t.push(s.a.admin.home.goldSilver.edit.replace("{id}",e))}:null,handleSearch:(e,t)=>{const n=`${(a=new Date(e.target.value)).getFullYear()}-${("0"+(a.getMonth()+1)).slice(-2)}-${("0"+a.getDate()).slice(-2)}`;var a;const r={...N,[t]:n};P(e=>({...e,[t]:n})),w(r)},handleDelete:m.includes("gold-silver-delete")?e=>{E(!0),D({title:"Delete Gold and Silver",description:"Are you sure you want to delete ?",id:{id:e}})}:null,handleStatus:m.includes("gold-silver-status")?(e,t)=>{$(t)}:null,handleDetail:m.includes("gold-silver-detail")?e=>{t.push(s.a.admin.home.goldSilver.detail.replace("{id}",e))}:null,paginationData:null===R||void 0===R||null===(e=R.meta_data)||void 0===e?void 0:e.pagination,handleChangePage:e=>{const t={...N,page:e,page_size:null===N||void 0===N?void 0:N.page_size};w(t)},date:!0,searchDate:F,handleCancleSearch:()=>{P(e=>({...e,date_from:"",date_to:""})),w(C)}})})]})})};t.default=x},547:function(e,t,n){"use strict";t.a=!("undefined"===typeof window||!window.document||!window.document.createElement)},548:function(e,t,n){"use strict";function a(e){return e&&e.ownerDocument||document}n.d(t,"a",function(){return a})},549:function(e,t,n){"use strict";var a=n(548);function r(e,t){return function(e){var t=Object(a.a)(e);return t&&t.defaultView||window}(e).getComputedStyle(e,t)}var i=/([A-Z])/g;var c=/^ms-/;function s(e){return function(e){return e.replace(i,"-$1").toLowerCase()}(e).replace(c,"-ms-")}var o=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;t.a=function(e,t){var n="",a="";if("string"===typeof t)return e.style.getPropertyValue(s(t))||r(e).getPropertyValue(s(t));Object.keys(t).forEach(function(r){var i=t[r];i||0===i?!function(e){return!(!e||!o.test(e))}(r)?n+=s(r)+": "+i+";":a+=r+"("+i+") ":e.style.removeProperty(s(r))}),a&&(n+="transform: "+a+";"),e.style.cssText+=";"+n}},550:function(e,t,n){"use strict";n.d(t,"a",function(){return l}),n.d(t,"b",function(){return d});var a=n(1);n(2);const r=["xxl","xl","lg","md","sm","xs"],i="xs",c=a.createContext({prefixes:{},breakpoints:r,minBreakpoint:i}),{Consumer:s,Provider:o}=c;function l(e,t){const{prefixes:n}=Object(a.useContext)(c);return e||n[t]||t}function d(){const{dir:e}=Object(a.useContext)(c);return"rtl"===e}},551:function(e,t,n){"use strict";n(565);var a=n(564),r=n(1),i=n(183),c=n(189),s=n(16),o=n(562),l=n(552),d=n(18),u=n(2);const b=Object(r.lazy)(()=>Promise.resolve().then(n.bind(null,34)));t.a=e=>{let{children:t,isSubmitting:n=!1}=e;const{updatePermissionList:j,updateUserPermissionList:f,permissionList:m,userPermissionList:h,roleList:O}=Object(d.a)(e=>e),{data:p}=Object(o.a)(),v=m.filter(e=>Object.values(O).includes(e.id)),x=i.c.navbar.filter(e=>v.some(t=>t.name===e.value)),{mutate:g}=Object(l.a)();return Object(r.useEffect)(()=>{let e;return e=setTimeout(()=>{g(),s.b.warn("Session has expired.")},5e6),()=>{clearTimeout(e)}},[]),Object(r.useEffect)(()=>
1{if(p){c.a.filter(e=>p.payload.some(t=>t.name===e.value));f(v),j(p.payload)}},[p],[h]),Object(u.jsxs)("div",{children:[Object(u.jsx)(a.d,{items:[...x,...i.c.compulsoryNavBar]}),Object(u.jsxs)("div",{className:"wrapper d-flex flex-column min-vh-100 bg-light",children:[Object(u.jsx)(a.c,{}),Object(u.jsx)(r.Suspense,{fallback:Object(u.jsx)(b,{}),children:Object(u.jsx)("div",{className:"body flex-grow-1 px-3",children:t})}),Object(u.jsx)(a.b,{})]})]})}},552:function(e,t,n){"use strict";n.d(t,"a",function(){return d});var a=n(8),r=n(21),i=n(15),c=n(29),s=n(20),o=n(19);const l=()=>{const e=o.a.logout.base;return Object(s.a)().post(e)};function d(){const e=Object(a.useHistory)(),t=Object(r.useQueryClient)();return Object(r.useMutation)(l,{onSuccess:()=>{t.clear(),c.a(),e.push(i.a.admin.auth.login)}})}},553:function(e,t,n){"use strict";n.d(t,"a",function(){return i});var a=n(1),r=n(581);function i(e){const t=Object(r.a)(e);return Object(a.useCallback)(function(){return t.current&&t.current(...arguments)},[t])}},556:function(e,t,n){"use strict";var a=n(557),r=n(558);t.a=function(e,t,n,i){return Object(a.a)(e,t,n,i),function(){Object(r.a)(e,t,n,i)}}},557:function(e,t,n){"use strict";var a=n(547),r=!1,i=!1;try{var c={get passive(){return r=!0},get once(){return i=r=!0}};a.a&&(window.addEventListener("test",c,c),window.removeEventListener("test",c,!0))}catch(s){}t.a=function(e,t,n,a){if(a&&"boolean"!==typeof a&&!i){var c=a.once,s=a.capture,o=n;!i&&c&&(o=n.__once||function e(a){this.removeEventListener(t,e,s),n.call(this,a)},n.__once=o),e.addEventListener(t,o,r?a:s)}e.addEventListener(t,n,a)}},558:function(e,t,n){"use strict";t.a=function(e,t,n,a){var r=a&&"boolean"!==typeof a?a.capture:a;e.removeEventListener(t,n,r),n.__once&&e.removeEventListener(t,n.__once,r)}},559:function(e,t,n){"use strict";var a=n(1);const r=e=>e&&"function"!==typeof e?t=>{e.current=t}:e;t.a=function(e,t){return Object(a.useMemo)(()=>function(e,t){const n=r(e),a=r(t);return e=>{n&&n(e),a&&a(e)}}(e,t),[e,t])}},560:function(e,t,n){"use strict";n.d(t,"a",function(){return i});const{format:a,parseISO:r}=n(583);function i(e){if(!e)return"N/A";{const n=r(e,"MM-dd-yy",new Date);var t=a(n,"MMM  dd, yyyy")}return t}},561:function(e,t,n){"use strict";n.d(t,"a",function(){return i});var a=n(1);var r=function(e){const t=Object(a.useRef)(e);return Object(a.useEffect)(()=>{t.current=e},[e]),t};function i(e){const t=r(e);return Object(a.useCallback)(function(){return t.current&&t.current(...arguments)},[t])}},562:function(e,t,n){"use strict";n.d(t,"a",function(){return o});var a=n(21),r=n(182),i=n(19),c=n(20);const s=e=>{const t=Object(r.a)(e),n=i.a.permissions.base+"?"+t;return Object(c.a)().get(n)};function o(){return Object(a.useQuery)(["fetchPermission"],()=>s())}},564:function(e,t,n){"use strict";n.d(t,"a",function(){return d}),n.d(t,"b",function(){return b}),n.d(t,"c",function(){return g}),n.d(t,"d",function(){return N}),n.d(t,"e",function(){return w});var a=n(1),r=n.n(a),i=n(8),c=n(187),s=n(17),o=n(2);const l=()=>{const e=Object(i.useLocation)().pathname,t=(e,t,n)=>{const a=n.find(t=>t.path===e),r=n.find(e=>e.path===t);return(null===a||void 0===a?void 0:a.name)||(null===r||void 0===r?void 0:r.name)},n=(e=>{const n=[];return e.split("/").reduce((e,a,r,i)=>{const s=`${e}/${a}`,o=`${e}/:id`;if(r>=3){const e=c.a.find(e=>e.path===o);(null===e||void 0===e?void 0:e.name)&&n.pop()}return n.push({pathname:s,name:t(s,o,c.a),active:r+1===i.length}),s}),n})(e);return Object(o.jsxs)(s.b,{className:"m-0 ms-0",children:[Object(o.jsx)(s.c,{href:"/ekadmin",children:"Dashboard"}),n.map((e,t)=>Object(a.createElement)(s.c,{...e.active?{active:!0}:{href:e.pathname},key:t},"Dashboard"!==e.name&&e.name))]})};var d=r.a.memo(l);const u=()=>Object(o.jsxs)(s.j,{children:[Object(o.jsxs)("div",{children:[Object(o.jsx)("a",{href:"https://media.eknepal.com",target:"_blank",rel:"noopener noreferrer",children:"Media Alliance Nepal"}),Object(o.jsx)("span",{className:"ms-1",children:"\xa9 2021 "})]}),Object(o.jsxs)("div",{className:"ms-auto",children:[Object(o.jsx)("span",{className:"me-1",children:"Powered by"}
1),Object(o.jsx)("a",{href:"https://soanitech.com",target:"_blank",rel:"noopener noreferrer",children:"SoAni Tech"})]})]});var b=r.a.memo(u),j=n(30),f=n(552),m=n(1015),h=n(1016),O=n(1017),p=n(1018),v=n(1019),x=n(18);var g=()=>{const{changeSliderState:e,sliderValue:t}=Object(x.a)(e=>e),{mutate:n}=Object(f.a)();return Object(o.jsxs)(s.q,{position:"sticky",className:"mb-4 app-header",children:[Object(o.jsxs)(s.i,{fluid:!0,children:[Object(o.jsx)(s.u,{className:"ps-1",onClick:()=>e(!t),children:Object(o.jsx)(j.a,{icon:m.a,size:"lg"})}),Object(o.jsx)(s.r,{className:"mx-auto d-md-none",to:"/"}),Object(o.jsxs)(s.t,{children:[Object(o.jsx)(s.z,{children:Object(o.jsx)(s.A,{href:"#",children:Object(o.jsx)(j.a,{icon:h.a,size:"lg"})})}),Object(o.jsx)(s.z,{children:Object(o.jsx)(s.A,{href:"#",children:Object(o.jsx)(j.a,{icon:O.a,size:"lg"})})}),Object(o.jsx)(s.z,{children:Object(o.jsx)(s.A,{href:"#",children:Object(o.jsx)(j.a,{icon:p.a,size:"lg"})})}),Object(o.jsx)(s.z,{children:Object(o.jsx)(s.A,{onClick:()=>{n()},style:{cursor:"pointer"},children:Object(o.jsx)(j.a,{icon:v.a,size:"lg"})})})]})]}),Object(o.jsx)(s.s,{}),Object(o.jsx)(s.i,{fluid:!0,children:Object(o.jsx)(d,{})})]})},E=n(25);const y=e=>{let{items:t}=e;Object(i.useLocation)();const n=(e,t)=>{const{component:n,name:r,badge:i,icon:c,childrens:l,...d}=e,u=n;return Object(a.createElement)(u,{...d.to&&!d.items&&{component:E.c,activeClassName:"active"},key:t,...d},((e,t,n)=>Object(o.jsxs)(o.Fragment,{children:[t&&t,e&&e,n&&Object(o.jsx)(s.a,{color:n.color,className:"ms-auto",children:n.text})]}))(r,c,i))};return Object(o.jsx)(r.a.Fragment,{children:t&&t.map((e,t)=>((e,t)=>(null===e||void 0===e?void 0:e.childrens)?Object(o.jsx)(s.H,{children:Object(o.jsx)(s.y,{toggler:e.name,className:"side-group-items",children:null===e||void 0===e?void 0:e.childrens.map((e,t)=>n(e,t))})},`sb-${t}`):n(e,t))(e,t))})};var k=n(592);n(591);const C=e=>{let{items:t}=e;const{changeSliderState:n,sliderValue:a}=Object(x.a)(e=>e);return Object(o.jsxs)(s.F,{position:"fixed",unfoldable:!a,visible:a,className:"-show",onVisibleChange:e=>{n(e)},children:[Object(o.jsx)(s.G,{className:"d-none d-md-flex",to:"/"}),Object(o.jsx)(s.H,{children:Object(o.jsx)(k.a,{children:Object(o.jsx)(y,{items:t})})}),Object(o.jsx)(s.I,{className:"d-none d-lg-flex",onClick:()=>n(!a)})]})};var N=r.a.memo(C);var w=e=>{let{handleFileChange:t,handleUploadClick:n,buttonPosition:a="bottom",renderButtons:r}=e;return Object(o.jsxs)("div",{className:"upload-file-container",children:[Object(o.jsx)("div",{className:"drop-container",children:Object(o.jsx)("input",{type:"file",onChange:t,required:!0})}),Object(o.jsxs)("div",{className:"button-wrapper",children:[Object(o.jsx)("button",{className:"upload-btn",onClick:n,children:"Upload"}),r&&r()]})]})}},565:function(e,t,n){},567:function(e,t,n){"use strict";var a=n(12),r=n.n(a),i=n(557),c=n(547),s=n(548),o=n(558),l=n(571),d=n(572),u=n(561),b=n(559),j=n(584),f=n(549),m=n(556);function h(e,t,n){void 0===n&&(n=5);var a=!1,r=setTimeout(function(){a||function(e,t,n,a){if(void 0===n&&(n=!1),void 0===a&&(a=!0),e){var r=document.createEvent("HTMLEvents");r.initEvent(t,n,a),e.dispatchEvent(r)}}(e,"transitionend",!0)},t+n),i=Object(m.a)(e,"transitionend",function(){a=!0},{once:!0});return function(){clearTimeout(r),i()}}function O(e,t,n,a){null==n&&(n=function(e){var t=Object(f.a)(e,"transitionDuration")||"",n=-1===t.indexOf("ms")?1e3:1;return parseFloat(t)*n}(e)||0);var r=h(e,n,a),i=Object(m.a)(e,"transitionend",t);return function(){r(),i()}}var p=n(1),v=n.n(p);function x(e){void 0===e&&(e=Object(s.a)());try{var t=e.activeElement;return t&&t.nodeName?t:null}catch(n){return e.body}}var g=n(569),E=n(27),y=n.n(E),k=n(579);function C(e){const t=function(e){const t=Object(p.useRef)(e);return t.current=e,t}(e);Object(p.useEffect)(()=>()=>t.current(),[])}var N=n(580),w=n(553);const S=`data-rr-ui-${"modal-open"}`;var D=class{constructor(){let{ownerDocument:e,handleContainerOverflow:t=!0,isRTL:n=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.handleContainerOverflow=t,this.isRTL=n,this.modals=[],this.ownerDocument=e}getScrollbarWidth(){return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(e){}removeModalAttributes(e){}setContainerStyle(e){const t={overflow:"hidden"},n=this.isRTL?"paddingLeft":"paddingRight",a=this.getElement();e.style={overflow:a.style.overflow,[n]:a.style[n]},e.scrollBarWidth&&(t[n]=`${parseInt(Object(f.a)(a,n)||"0",10)+e.scrollBarWidth}px`),a.setAttribute(S,""),Object(f.a)(a,t)}
1reset(){[...this.modals].forEach(e=>this.remove(e))}removeContainerStyle(e){const t=this.getElement();t.removeAttribute(S),Object.assign(t.style,e.style)}add(e){let t=this.modals.indexOf(e);return-1!==t?t:(t=this.modals.length,this.modals.push(e),this.setModalAttributes(e),0!==t||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),t)}remove(e){const t=this.modals.indexOf(e);-1!==t&&(this.modals.splice(t,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(e))}isTopModal(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}};const _=Object(p.createContext)(c.a?window:void 0);_.Provider;function R(){return Object(p.useContext)(_)}const L=(e,t)=>c.a?null==e?(t||Object(s.a)()).body:("function"===typeof e&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;const T=e=>e&&"function"!==typeof e?t=>{e.current=t}:e;var $=function(e,t){return Object(p.useMemo)(()=>function(e,t){const n=T(e),a=T(t);return e=>{n&&n(e),a&&a(e)}}(e,t),[e,t])},M=n(582);function A(e){if(!e||"function"===typeof e)return null;const{major:t}=function(){const e=p.version.split(".");return{major:+e[0],minor:+e[1],patch:+e[2]}}();return t>=19?e.props.ref:e.ref}var F=function(e){let{children:t,in:n,onExited:a,mountOnEnter:r,unmountOnExit:i}=e;const c=Object(p.useRef)(null),s=Object(p.useRef)(n),o=Object(w.a)(a);Object(p.useEffect)(()=>{n?s.current=!0:o(c.current)},[n,o]);const l=$(c,A(t)),d=Object(p.cloneElement)(t,{ref:l});return n?d:i||!s.current&&r?null:d};const P=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"];var B=n(2);const H=["component"];var z=p.forwardRef((e,t)=>{let{component:n}=e;const a=function(e){let{onEnter:t,onEntering:n,onEntered:a,onExit:r,onExiting:i,onExited:c,addEndListener:s,children:o}=e,l=function(e,t){if(null==e)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.indexOf(a)>=0)continue;n[a]=e[a]}return n}(e,P);const d=Object(p.useRef)(null),u=$(d,A(o)),b=e=>t=>{e&&d.current&&e(d.current,t)},j=Object(p.useCallback)(b(t),[t]),f=Object(p.useCallback)(b(n),[n]),m=Object(p.useCallback)(b(a),[a]),h=Object(p.useCallback)(b(r),[r]),O=Object(p.useCallback)(b(i),[i]),v=Object(p.useCallback)(b(c),[c]),x=Object(p.useCallback)(b(s),[s]);return Object.assign({},l,{nodeRef:d},t&&{onEnter:j},n&&{onEntering:f},a&&{onEntered:m},r&&{onExit:h},i&&{onExiting:O},c&&{onExited:v},s&&{addEndListener:x},{children:"function"===typeof o?(e,t)=>o(e,Object.assign({},t,{ref:u})):Object(p.cloneElement)(o,{ref:u})})}(function(e,t){if(null==e)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.indexOf(a)>=0)continue;n[a]=e[a]}return n}(e,H));return Object(B.jsx)(n,Object.assign({ref:t},a))});function I(e){let{children:t,in:n,onExited:a,onEntered:r,transition:i}=e;const[c,s]=Object(p.useState)(!n);n&&c&&s(!1);const o=function(e){let{in:t,onTransition:n}=e;const a=Object(p.useRef)(null),r=Object(p.useRef)(!0),i=Object(w.a)(n);return Object(M.a)(()=>{if(!a.current)return;let e=!1;return i({in:t,element:a.current,initial:r.current,isStale:()=>e}),()=>{e=!0}},[t,i]),Object(M.a)(()=>(r.current=!1,()=>{r.current=!0}),[]),a}({in:!!n,onTransition:e=>{Promise.resolve(i(e)).then(()=>{e.isStale()||(e.in?null==r||r(e.element,e.initial):(s(!0),null==a||a(e.element)))},t=>{throw e.in||s(!0),t})}}),l=$(o,A(t));return c&&!n?null:Object(p.cloneElement)(t,{ref:l})}function U(e,t,n){return e?Object(B.jsx)(z,Object.assign({},n,{component:e})):t?Object(B.jsx)(I,Object.assign({},n,{transition:t})):Object(B.jsx)(F,Object.assign({},n))}const W=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];let G;function V(e){const t=R(),n=e||function(e){return G||(G=new D({ownerDocument:null==e?void 0:e.document})),G}(t),a=Object(p.useRef)({dialog:null,backdrop:null});return Object.assign(a.current,{add:()=>n.add(a.current),remove:()=>n.remove(a.current),isTopModal:()=>n.isTopModal(a.current),setDialogRef:Object(p.useCallback)(e=>{a.current.dialog=e},[]),setBackdropRef:Object(p.useCallback)(e=>{a.current.backdrop=e},[])})}const K=Object(p.forwardRef)((e,t)=>{let{show:n=!1,role:a="dialog",className:r,style:i,children:s,backdrop:o=!0,keyboard:l=!0,onBackdropClick:d,onEscapeKeyDown:u,transition:b,runTransition:j,backdropTransition:f,runBackdropTransition:h,autoFocus:O=!0,enforceFocus:v=!0,restoreFocus:E=!0,restoreFocusOptions:S,renderDialog:D,renderBackdrop:_=e=>Object(B.jsx)("div",Object.assign({},e)),manager:T,container:$,onShow:M,onHide:A=()=>{},onExit:F,onExited:P,onExiting:H,onEnter:z,onEntering:I,onEntered:G}=e,K=function(e,t){if(null==e)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.indexOf(a)>=0)continue;n[a]=e[a]}return n}(e,W);const Q=R(),X=function(e,t){const n=R(),[a,r]=Object(p.useState)(()=>L(e,null==n?void 0:n.document));if(!a){const t=L(e);t&&r(t)}return Object(p.useEffect)(()=>{t&&a&&t(a)},[t,a]),Object(p.useEffect)(()=>{const t=L(e);t!==a&&r(t)},[e,a]),a}($),Y=V(T),q=Object(k.a)(),J=Object(N.a)(n),[Z,ee]=Object(p.useState)(!n),te=Object(p.useRef)(null);Object(p.useImperativeHandle)(t,()=>Y,[Y]),c.a&&!J&&n&&(te.current=x(null==Q?void 0:Q.document)),n&&Z&&ee(!1);const ne=Object(w.a)(()=>
1{if(Y.add(),oe.current=Object(m.a)(document,"keydown",ce),se.current=Object(m.a)(document,"focus",()=>setTimeout(re),!0),M&&M(),O){var e,t;const n=x(null!=(e=null==(t=Y.dialog)?void 0:t.ownerDocument)?e:null==Q?void 0:Q.document);Y.dialog&&n&&!Object(g.a)(Y.dialog,n)&&(te.current=n,Y.dialog.focus())}}),ae=Object(w.a)(()=>{var e;(Y.remove(),null==oe.current||oe.current(),null==se.current||se.current(),E)&&(null==(e=te.current)||null==e.focus||e.focus(S),te.current=null)});Object(p.useEffect)(()=>{n&&X&&ne()},[n,X,ne]),Object(p.useEffect)(()=>{Z&&ae()},[Z,ae]),C(()=>{ae()});const re=Object(w.a)(()=>{if(!v||!q()||!Y.isTopModal())return;const e=x(null==Q?void 0:Q.document);Y.dialog&&e&&!Object(g.a)(Y.dialog,e)&&Y.dialog.focus()}),ie=Object(w.a)(e=>{e.target===e.currentTarget&&(null==d||d(e),!0===o&&A())}),ce=Object(w.a)(e=>{l&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&Y.isTopModal()&&(null==u||u(e),e.defaultPrevented||A())}),se=Object(p.useRef)(),oe=Object(p.useRef)();if(!X)return null;const le=Object.assign({role:a,ref:Y.setDialogRef,"aria-modal":"dialog"===a||void 0},K,{style:i,className:r,tabIndex:-1});let de=D?D(le):Object(B.jsx)("div",Object.assign({},le,{children:p.cloneElement(s,{role:"document"})}));de=U(b,j,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:F,onExiting:H,onExited:function(){ee(!0),null==P||P(...arguments)},onEnter:z,onEntering:I,onEntered:G,children:de});let ue=null;return o&&(ue=_({ref:Y.setBackdropRef,onClick:ie}),ue=U(f,h,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:ue})),Object(B.jsx)(B.Fragment,{children:y.a.createPortal(Object(B.jsxs)(B.Fragment,{children:[ue,de]}),X)})});K.displayName="Modal";var Q=Object.assign(K,{Manager:D}),X=n(576),Y=n(574),q=n(575);const J=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Z=".sticky-top",ee=".navbar-toggler";class te extends D{adjustAndStore(e,t,n){const a=t.style[e];t.dataset[e]=a,Object(f.a)(t,{[e]:`${parseFloat(Object(f.a)(t,e))+n}px`})}restore(e,t){const n=t.dataset[e];void 0!==n&&(delete t.dataset[e],Object(f.a)(t,{[e]:n}))}setContainerStyle(e){super.setContainerStyle(e);const t=this.getElement();if(Object(X.a)(t,"modal-open"),!e.scrollBarWidth)return;const n=this.isRTL?"paddingLeft":"paddingRight",a=this.isRTL?"marginLeft":"marginRight";Object(Y.a)(t,J).forEach(t=>this.adjustAndStore(n,t,e.scrollBarWidth)),Object(Y.a)(t,Z).forEach(t=>this.adjustAndStore(a,t,-e.scrollBarWidth)),Object(Y.a)(t,ee).forEach(t=>this.adjustAndStore(a,t,e.scrollBarWidth))}removeContainerStyle(e){super.removeContainerStyle(e);const t=this.getElement();Object(q.a)(t,"modal-open");const n=this.isRTL?"paddingLeft":"paddingRight",a=this.isRTL?"marginLeft":"marginRight";Object(Y.a)(t,J).forEach(e=>this.restore(n,e)),Object(Y.a)(t,Z).forEach(e=>this.restore(a,e)),Object(Y.a)(t,ee).forEach(e=>this.restore(a,e))}}let ne;var ae=n(61),re=n(26),ie=!1,ce=n(573),se="unmounted",oe="exited",le="entering",de="entered",ue="exiting",be=function(e){function t(t,n){var a;a=e.call(this,t,n)||this;var r,i=n&&!n.isMounting?t.enter:t.appear;return a.appearStatus=null,t.in?i?(r=oe,a.appearStatus=le):r=de:r=t.unmountOnExit||t.mountOnEnter?se:oe,a.state={status:r},a.nextCallback=null,a}Object(re.a)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===se?{status:oe}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==le&&n!==de&&(t=le):n!==le&&n!==de||(t=ue)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,a=this.props.timeout;return e=t=n=a,null!=a&&"number"!==typeof a&&(e=a.exit,t=a.enter,n=void 0!==a.appear?a.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===le){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:y.a.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===oe&&this.setState({status:se})},n.performEnter=function(e){var t=this,n=this.props.enter,a=this.context?this.context.
1isMounting:e,r=this.props.nodeRef?[a]:[y.a.findDOMNode(this),a],i=r[0],c=r[1],s=this.getTimeouts(),o=a?s.appear:s.enter;!e&&!n||ie?this.safeSetState({status:de},function(){t.props.onEntered(i)}):(this.props.onEnter(i,c),this.safeSetState({status:le},function(){t.props.onEntering(i,c),t.onTransitionEnd(o,function(){t.safeSetState({status:de},function(){t.props.onEntered(i,c)})})}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),a=this.props.nodeRef?void 0:y.a.findDOMNode(this);t&&!ie?(this.props.onExit(a),this.safeSetState({status:ue},function(){e.props.onExiting(a),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:oe},function(){e.props.onExited(a)})})})):this.safeSetState({status:oe},function(){e.props.onExited(a)})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(a){n&&(n=!1,t.nextCallback=null,e(a))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:y.a.findDOMNode(this),a=null==e&&!this.props.addEndListener;if(n&&!a){if(this.props.addEndListener){var r=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=r[0],c=r[1];this.props.addEndListener(i,c)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===se)return null;var t=this.props,n=t.children,a=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,Object(ae.a)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return v.a.createElement(ce.a.Provider,{value:null},"function"===typeof n?n(e,a):v.a.cloneElement(v.a.Children.only(n),a))},t}(v.a.Component);function je(){}be.contextType=ce.a,be.propTypes={},be.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:je,onEntering:je,onEntered:je,onExit:je,onExiting:je,onExited:je},be.UNMOUNTED=se,be.EXITED=oe,be.ENTERING=le,be.ENTERED=de,be.EXITING=ue;var fe=be;function me(e,t){const n=Object(f.a)(e,t)||"",a=-1===n.indexOf("ms")?1e3:1;return parseFloat(n)*a}function he(e,t){const n=me(e,"transitionDuration"),a=me(e,"transitionDelay"),r=O(e,n=>{n.target===e&&(r(),t(n))},n+a)}var Oe=v.a.forwardRef((e,t)=>{let{onEnter:n,onEntering:a,onEntered:r,onExit:i,onExiting:c,onExited:s,addEndListener:o,children:l,childRef:d,...u}=e;const j=Object(p.useRef)(null),f=Object(b.a)(j,d),m=e=>{var t;f((t=e)&&"setState"in t?y.a.findDOMNode(t):null!=t?t:null)},h=e=>t=>{e&&j.current&&e(j.current,t)},O=Object(p.useCallback)(h(n),[n]),x=Object(p.useCallback)(h(a),[a]),g=Object(p.useCallback)(h(r),[r]),E=Object(p.useCallback)(h(i),[i]),k=Object(p.useCallback)(h(c),[c]),C=Object(p.useCallback)(h(s),[s]),N=Object(p.useCallback)(h(o),[o]);return Object(B.jsx)(fe,{ref:t,...u,onEnter:O,onEntered:g,onEntering:x,onExit:E,onExited:C,onExiting:k,addEndListener:N,nodeRef:j,children:"function"===typeof l?(e,t)=>l(e,{...t,ref:m}):v.a.cloneElement(l,{ref:m})})});const pe={[le]:"show",[de]:"show"},ve=p.forwardRef((e,t)=>{let{className:n,children:a,transitionClasses:i={},onEnter:c,...s}=e;const o={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...s},l=Object(p.useCallback)((e,t)=>{!function(e){e.offsetHeight}(e),null==c||c(e,t)},[c]);return Object(B.jsx)(Oe,{ref:t,addEndListener:he,...o,onEnter:l,childRef:a.ref,children:(e,t)=>p.cloneElement(a,{...t,className:r()("fade",n,a.props.className,pe[e],i[e])})})});ve.displayName="Fade";var xe=ve,ge=/-(.)/g;var Ee=n(550);const ye=e=>{return e[0].toUpperCase()+(t=e,t.replace(ge,function(e,t){return t.toUpperCase()})).slice(1);var t};function ke(e){let{displayName:t=ye(e),Component:n,defaultProps:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=p.forwardRef((t,i)=>{let{className:c,bsPrefix:s,as:o=n||"div",...l}=t;const d={...a,...l},u=Object(Ee.a)(s,e);return Object(B.jsx)(o,{ref:i,className:r()(c,u),...d})});return i.displayName=t,i}var Ce=ke("modal-body");var Ne=p.createContext({onHide(){}});const we=p.forwardRef((e,t)=>
1{let{bsPrefix:n,className:a,contentClassName:i,centered:c,size:s,fullscreen:o,children:l,scrollable:d,...u}=e;n=Object(Ee.a)(n,"modal");const b=`${n}-dialog`,j="string"===typeof o?`${n}-fullscreen-${o}`:`${n}-fullscreen`;return Object(B.jsx)("div",{...u,ref:t,className:r()(b,a,s&&`${n}-${s}`,c&&`${b}-centered`,d&&`${b}-scrollable`,o&&j),children:Object(B.jsx)("div",{className:r()(`${n}-content`,i),children:l})})});we.displayName="ModalDialog";var Se=we,De=ke("modal-footer"),_e=n(9),Re=n.n(_e);const Le={"aria-label":Re.a.string,onClick:Re.a.func,variant:Re.a.oneOf(["white"])},Te=p.forwardRef((e,t)=>{let{className:n,variant:a,"aria-label":i="Close",...c}=e;return Object(B.jsx)("button",{ref:t,type:"button",className:r()("btn-close",a&&`btn-close-${a}`,n),"aria-label":i,...c})});Te.displayName="CloseButton",Te.propTypes=Le;var $e=Te;var Me=p.forwardRef((e,t)=>{let{closeLabel:n="Close",closeVariant:a,closeButton:r=!1,onHide:i,children:c,...s}=e;const o=Object(p.useContext)(Ne),l=Object(u.a)(()=>{null==o||o.onHide(),null==i||i()});return Object(B.jsxs)("div",{ref:t,...s,children:[c,r&&Object(B.jsx)($e,{"aria-label":n,variant:a,onClick:l})]})});const Ae=p.forwardRef((e,t)=>{let{bsPrefix:n,className:a,closeLabel:i="Close",closeButton:c=!1,...s}=e;return n=Object(Ee.a)(n,"modal-header"),Object(B.jsx)(Me,{ref:t,...s,className:r()(a,n),closeLabel:i,closeButton:c})});Ae.displayName="ModalHeader";var Fe=Ae;var Pe,Be=ke("modal-title",{Component:(Pe="h4",p.forwardRef((e,t)=>Object(B.jsx)("div",{...e,ref:t,className:r()(e.className,Pe)})))});function He(e){return Object(B.jsx)(xe,{...e,timeout:null})}function ze(e){return Object(B.jsx)(xe,{...e,timeout:null})}const Ie=p.forwardRef((e,t)=>{let{bsPrefix:n,className:a,style:f,dialogClassName:m,contentClassName:h,children:v,dialogAs:x=Se,"aria-labelledby":g,"aria-describedby":E,"aria-label":y,show:k=!1,animation:C=!0,backdrop:N=!0,keyboard:w=!0,onEscapeKeyDown:S,onShow:D,onHide:_,container:R,autoFocus:L=!0,enforceFocus:T=!0,restoreFocus:$=!0,restoreFocusOptions:M,onEntered:A,onExit:F,onExiting:P,onEnter:H,onEntering:z,onExited:I,backdropClassName:U,manager:W,...G}=e;const[V,K]=Object(p.useState)({}),[X,Y]=Object(p.useState)(!1),q=Object(p.useRef)(!1),J=Object(p.useRef)(!1),Z=Object(p.useRef)(null),[ee,ae]=Object(d.a)(),re=Object(b.a)(t,ae),ie=Object(u.a)(_),ce=Object(Ee.b)();n=Object(Ee.a)(n,"modal");const se=Object(p.useMemo)(()=>({onHide:ie}),[ie]);function oe(){return W||(e={isRTL:ce},ne||(ne=new te(e)),ne);var e}function le(e){if(!c.a)return;const t=oe().getScrollbarWidth()>0,n=e.scrollHeight>Object(s.a)(e).documentElement.clientHeight;K({paddingRight:t&&!n?Object(l.a)():void 0,paddingLeft:!t&&n?Object(l.a)():void 0})}const de=Object(u.a)(()=>{ee&&le(ee.dialog)});Object(j.a)(()=>{Object(o.a)(window,"resize",de),null==Z.current||Z.current()});const ue=()=>{q.current=!0},be=e=>{q.current&&ee&&e.target===ee.dialog&&(J.current=!0),q.current=!1},je=()=>{Y(!0),Z.current=O(ee.dialog,()=>{Y(!1)})},fe=e=>{"static"!==N?J.current||e.target!==e.currentTarget?J.current=!1:null==_||_():(e=>{e.target===e.currentTarget&&je()})(e)},me=Object(p.useCallback)(e=>Object(B.jsx)("div",{...e,className:r()(`${n}-backdrop`,U,!C&&"show")}),[C,U,n]),he={...f,...V};he.display="block";return Object(B.jsx)(Ne.Provider,{value:se,children:Object(B.jsx)(Q,{show:k,ref:re,backdrop:N,container:R,keyboard:!0,autoFocus:L,enforceFocus:T,restoreFocus:$,restoreFocusOptions:M,onEscapeKeyDown:e=>{w?null==S||S(e):(e.preventDefault(),"static"===N&&je())},onShow:D,onHide:_,onEnter:(e,t)=>{e&&le(e),null==H||H(e,t)},onEntering:(e,t)=>{null==z||z(e,t),Object(i.a)(window,"resize",de)},onEntered:A,onExit:e=>{null==Z.current||Z.current(),null==F||F(e)},onExiting:P,onExited:e=>{e&&(e.style.display=""),null==I||I(e),Object(o.a)(window,"resize",de)},manager:oe(),transition:C?He:void 0,backdropTransition:C?ze:void 0,renderBackdrop:me,renderDialog:e=>Object(B.jsx)("div",{role:"dialog",...e,style:he,className:r()(a,n,X&&`${n}-static`,!C&&"show"),onClick:N?fe:void 0,onMouseUp:be,"aria-label":y,"aria-labelledby":g,"aria-describedby":E,children:Object(B.jsx)(x,{...G,onMouseDown:ue,className:m,contentClassName:h,children:v})})})})});Ie.displayName="Modal";t.a=Object.assign(Ie,{Body:Ce,Header:Fe,Title:Be,Footer:De,Dialog:Se,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150})},568:function(e,t,n){"use strict";var a=n(1),r=n(17),i=n(2);t.a=e=>{let{value:t,handleSwitch:n,id:c}=e;const[s,o]=Object(a.useState)(t);return Object(i.jsx)(r.o,{checked:s,id:"formSwitchCheckDefault",onChange:e=>{n(e.target.checked,c),o(e.target.checked)}})}},569:function(e,t,n){"use strict";function a(e,t){return e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):void 0}n.d(t,"a",function(){return a})},570:function(e,t,n){"use strict";var a=n(17),r=n(30);const i=["512 512","<polygon fill='var(--ci-primary-color, currentColor)' points='427.314 107.313 404.686 84.687 256 233.373 107.314 84.687 84.686 107.313 233.373 256 84.686 404.687 107.314 427.313 256 278.627 404.686 427.313 427.314 404.687 278.627 256 427.314 107.313' class='ci-primary'/>"],c=["512 512","<polygon fill='var(--ci-primary-color, currentColor)' points='440 240 272 240 272 72 240 72 240 240 72 240 72 272 240 272 240 440 272 440 272 272 440 272 440 240' class='ci-primary'/>"];var s=n(52),o=n(1),l=n(568),d=n(560),u=n(18);const b="...",j=(e,t)=>Array.from({length:t-e+1},(t,n)=>e+n);var f=e=>{let{totalCount:t,pageSize:n,siblingCount:a=1,currentPage:r}=e;return Object(o.useMemo)(()=>{const e=Math.ceil(t/n);if(a+5>=e)return j(1,e);const i=Math.max(r-a,1),c=Math.min(r+a,e),s=i>2,o=c<e-2,l=e;if(!s&&o){return[...j(1,3+2*a),b,e]}if(s&&!o){let t=j(e-(3+2*a)+1,e);return[1,b,...t]}if(s&&o){let e=j(i,c);return[1,b,...e,b,l]}},[t,n,a,r])},m=n(2);t.a=e=>{let{showDetail:t=!1,...n}=e;const{payload:o,columns:j,handleAdd:h,handleEdit:O,handleStatus:p,handleFeatured:v,handleBreaking:x,handleDelete:g,handleSearch:E,handleDetail:y,handlePopular:k,paginationData:C,handleChangePage:N,handleCancleSearch:w,date:S,searchDate:D,tableName:_,editWithDate:R,handleEditdate:L,handleSelectEditDate:T,deleteWithDate:$,handleDeleteDate:M,handleSelectDate:A,renderTableFilters:F,handleSortData:P,sortOrder:B,selectedKey:H,handlePageSize:z}=n,I=f({currentPage:null===C||void 0===C?void 0:C.current_page,totalCount:null===C||void 0===C?void 0:C.total,pageSize:15}),U=(new Date).toISOString().split("T")[0],{userId:W,roleId:G}=Object(u.a)(e=>e);return Object(m.jsx)(m.Fragment,{children:Object(m.jsxs)(a.i,{className:"overflow-hidden mt-4",children:[Object(m.jsx)("div",{className:"row d-flex justify-content-end",children:Object(m.jsxs)("div",{className:"col-md-12 d-flex justify-content-end",children:[E?S?Object(m.jsxs)("div",{className:"date-picker d-flex",children:[Object(m.jsxs)("div",{className:"date-input-label d-flex flex-column",children:[Object(m.jsx)("label",{htmlFor:"startDate",className:"table-date",children:"Start Date"}),Object(m.jsx)("input",{className:"custom-date-picker",id:"startDate",name:"startDate",type:"date",value:D.date_from,onChange:e=>E(e,"date_from")})]}),Object(m.jsxs)("div",{className:"date-input-label  d-flex flex-column",style:{marginLeft:"10px"},children:[Object(m.jsx)("label",{htmlFor:"endDate",className:"table-date",children:"End Date"}),Object(m.jsx)("input",{className:"custom-date-picker",id:"endDate",name:"endDate",type:"date",value:D.date_to,mindate:D.data_from,onChange:e=>E(e,"date_to")})]})]}):Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(a.l,{type:"text",placeholder:"Search",onChange:e=>E(e,"search"),style:{width:"50%"}}),F&&F({maxFilterDate:U})]}):Object(m.jsx)(m.Fragment,{}),S&&D.date_from&&D.date_to&&Object(m.jsx)("div",{className:"d-flex align-items-end justify-content-end",children:Object(m.jsx)("button",{type:"button",style:{margin:"0 10px"},className:"mr-2 btn btn-outline-secondary justify-content-between align-items-center",onClick:()=>w(),children:Object(m.jsx)(r.a,{icon:i})})}),A&&Object(m.jsx)("div",{className:"mx-2",children:Object(m.jsx)("input",{className:"custom-date-picker",id:"date",name:"date",type:"date",max:U,onChange:e=>A(e)})}
1),$&&Object(m.jsxs)("button",{type:"button",className:"btn btn-danger d-flex ml-2 justify-content-between align-items-center mx-2 ",onClick:()=>M(),children:["Delete",Object(m.jsx)(s.g,{className:"mx-1"})]}),R&&Object(m.jsxs)("button",{type:"button",className:"d-flex ml-2 btn btn-outline-secondary justify-content-between align-items-center mx-2 ",onClick:()=>L(),children:["Edit",Object(m.jsx)(s.l,{className:"mx-1"})]}),z&&Object(m.jsx)("div",{className:"d-flex mx-2",children:Object(m.jsxs)(a.n,{"aria-label":"Default select example",onChange:e=>z(e),children:[Object(m.jsx)("option",{children:"20"}),Object(m.jsx)("option",{value:"30",children:"30"}),Object(m.jsx)("option",{value:"40",children:"40"}),Object(m.jsx)("option",{value:"50",children:"50"})]})}),h&&Object(m.jsx)("div",{className:"d-flex align-items-end justify-content-end",children:Object(m.jsxs)("button",{type:"button",className:"btn btn-outline-secondary",style:{marginLeft:"10px"},onClick:()=>h(),children:["Add",Object(m.jsx)(r.a,{icon:c,size:"sm"})]})})]})}),Object(m.jsxs)(a.E,{className:"mt-3",children:[Object(m.jsxs)(a.J,{hover:!0,responsive:!0,bordered:!0,children:[Object(m.jsx)(a.M,{color:"light",children:Object(m.jsx)(a.O,{children:P?Array.isArray(j)&&j.length>0&&j.map((e,t)=>Object(m.jsx)(a.N,{scope:"col",onClick:()=>{P(e)},children:Object(m.jsxs)("div",{className:"d-flex flex-row ",style:!0===e.sortable?{cursor:"pointer"}:null,children:[Object(m.jsx)("div",{children:e.name}),H===e.key&&"ASC"===B&&!0===e.sortable&&Object(m.jsx)(s.a,{}),H===e.key&&"DSC"===B&&!0===e.sortable&&Object(m.jsx)(s.b,{})]})},t)):Array.isArray(j)&&j.length>0&&j.map((e,t)=>Object(m.jsx)(a.N,{scope:"col",children:e.name},t))})}),Object(m.jsx)(a.K,{children:Array.isArray(o)&&o.length>0?o.map((e,n)=>Object(m.jsx)(a.O,{children:j.map((r,i)=>{return"id"===r.key?Object(m.jsx)(a.L,{onClick:()=>t&&y(e.id),children:C?((null===C||void 0===C?void 0:C.current_page)-1)*(null===C||void 0===C?void 0:C.per_page)+n+1:n+1},`${i}_${n}`):"channel_icon"===r.key||"imageUrl"===r.key?Object(m.jsx)(a.L,{children:e.channel_icon||e.imageUrl?Object(m.jsx)(a.v,{rounded:!0,thumbnail:!0,width:50,height:40,src:e.channel_icon||e.imageUrl}):"No image to preview"},`${i}_${n}`):"image"===r.key?Object(m.jsx)(a.L,{onClick:()=>t&&y(e.id),children:e.image&&e.image.imageUrl||e.image?Object(m.jsx)(a.v,{rounded:!0,thumbnail:!0,width:250,height:250,src:e.image.imageUrl||e.image}):"No image to preview"},`${i}_${n}`):"total_days"===r.key?Object(m.jsx)(a.L,{onClick:()=>t&&y(e.id),children:Math.ceil(Math.abs(new Date(null===e||void 0===e||null===(c=e.image)||void 0===c?void 0:c.created_at)-new Date(null===e||void 0===e||null===(o=e.image)||void 0===o?void 0:o.updated_at))/864e5)},`${i}_${n}`):"created_at"===r.key||"updated_at"===r.key?Object(m.jsx)(a.L,{onClick:()=>t&&y(e.id),children:Object(d.a)(e[r.key])},`${i}_${n}`):"action"===r.key?Object(m.jsxs)(a.L,{children:["userTable"!==_&&"roleTable"!==_&&Object(m.jsxs)(m.Fragment,{children:[g&&Object(m.jsx)(s.g,{onClick:()=>g(e.id)}),O&&Object(m.jsx)(s.l,{onClick:()=>O(e.id),className:"mx-1"})]}),"userTable"===_&&e.id!==W&&Object(m.jsxs)(m.Fragment,{children:[g&&Object(m.jsx)(s.g,{onClick:()=>g(e.id)}),O&&Object(m.jsx)(s.l,{onClick:()=>O(e.id),className:"mx-1"})]}),"roleTable"===_&&e.id!==G&&1!==e.id&&Object(m.jsxs)(m.Fragment,{children:[g&&Object(m.jsx)(s.g,{onClick:()=>g(e.id)}),O&&Object(m.jsx)(s.l,{onClick:()=>O(e.id),className:"mx-1"})]})]},i):"link"===r.key||"live_stream_link"===r.key?Object(m.jsxs)(a.L,{children:[Object(m.jsxs)("a",{href:(null===e||void 0===e?void 0:e.link)||(null===e||void 0===e?void 0:e.live_stream_link),className:"text-break",children:[(null===e||void 0===e?void 0:e.link)&&((null===e||void 0===e?void 0:e.link)?null===e||void 0===e?void 0:e.link:"N/A"),(null===e||void 0===e?void 0:e.live_stream_link)&&((null===e||void 0===e?void 0:e.live_stream_link)?null===e||void 0===e?void 0:e.live_stream_link:"N/A")]}),(null===e||void 0===e?void 0:e.live_stream_link)||(null===e||void 0===e?void 0:e.link)?"":"N/A"]},`${i}_${n}`):"status"===r.key?Object(m.jsx)(a.L,{children:Object(m.jsx)(l.a,{handleSwitch:t=>p({id:e.id,status:t}),id:e.id,value:1===(null===e||void 0===e?void 0:e.status)})},`${i}_${n}`):"is_featured"===r.key?Object(m.jsx)(a.L,{children:Object(m.jsx)(l.a,{handleSwitch:v,id:e.id,value:1===e.is_featured})},`${i}_${n}`):"is_breaking_news"===r.key?Object(m.jsx)(a.L,{children:Object(m.jsx)(l.a,{handleSwitch:x,id:e.id,value:1===e.is_breaking_news})},`${i}_${n}`):"is_popular"===r.key?Object(m.jsx)(a.L,{children:Object(m.jsx)(l.a,{handleSwitch:k,id:e.id,value:1===e.is_popular})},`${i}_${n}`):"priority"===r.key?Object(m.jsx)(a.L,{onClick:()=>t&&y(e.id),className:"text-break",children:e[r.key]},`${i}_${n}`):Object(m.jsx)(a.L,{onClick:()=>t&&y(e.id),className:"text-break",children:e[r.key]||"n/a"},`${i}_${n}`);var c,o})},n)):Object(m.jsx)(a.O,{children:Object(m.jsx)(a.L,{colSpan:j.length,className:"text-center",children:"No data Found!"})})})]}),C&&Object(m.jsxs)(a.C,{align:"end","aria-label":"Page navigation example",children:[Object(m.jsx)(a.D,{disabled:1===(null===C||void 0===C?void 0:C.last_page),onClick:()=>N((null===C||void 0===C?void 0:C.current_page)-1),children:"Previous"}),I.map((e,t)=>e===b?Object(m.jsx)(a.D,{children:"\u2026"},t):Object(m.jsx)(a.D,{onClick:()=>N(e),className:e===C.current_page?"page-item-active":"",children:e},t)),Object(m.jsx)(a.D,{disabled:(null===C||void 0===C?void 0:C.last_page)===(null===C||void 0===C?void 0:C.current_page),onClick:()=>N((null===C||void 0===C?void 0:C.current_page)+1),children:"Next"})]})]})]})})}},571:function(e,t,n){"use strict";n.d(t,"a",function(){return i});var a,r=n(547);function i(e){if((!a&&0!==a||e)&&r.a){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),a=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return a}},572:function(e,t,n){"use strict";n.d(t,"a",function(){return r});var a=n(1);function r(){return Object(a.useState)(null)}},573:function(e,t,n){"use strict";var a=n(1),r=n.n(a);t.a=r.a.createContext(null)},574:function(e,t,n){"use strict";n.d(t,"a",function(){return r});var a=Function.prototype.bind.call(Function.prototype.call,[].slice);function r(e,t){return a(e.querySelectorAll(t))}},575:function(e,t,n){"use strict";
1function a(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function r(e,t){e.classList?e.classList.remove(t):"string"===typeof e.className?e.className=a(e.className,t):e.setAttribute("class",a(e.className&&e.className.baseVal||"",t))}n.d(t,"a",function(){return r})},576:function(e,t,n){"use strict";function a(e,t){e.classList?e.classList.add(t):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(e,t)||("string"===typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}n.d(t,"a",function(){return a})},579:function(e,t,n){"use strict";n.d(t,"a",function(){return r});var a=n(1);function r(){const e=Object(a.useRef)(!0),t=Object(a.useRef)(()=>e.current);return Object(a.useEffect)(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}},580:function(e,t,n){"use strict";n.d(t,"a",function(){return r});var a=n(1);function r(e){const t=Object(a.useRef)(null);return Object(a.useEffect)(()=>{t.current=e}),t.current}},581:function(e,t,n){"use strict";var a=n(1);t.a=function(e){const t=Object(a.useRef)(e);return Object(a.useEffect)(()=>{t.current=e},[e]),t}},582:function(e,t,n){"use strict";(function(e){var a=n(1);const r="undefined"!==typeof e&&e.navigator&&"ReactNative"===e.navigator.product,i="undefined"!==typeof document;t.a=i||r?a.useLayoutEffect:a.useEffect}).call(this,n(115))},584:function(e,t,n){"use strict";n.d(t,"a",function(){return r});var a=n(1);function r(e){const t=function(e){const t=Object(a.useRef)(e);return t.current=e,t}(e);Object(a.useEffect)(()=>()=>t.current(),[])}},585:function(e,t,n){"use strict";n.d(t,"a",function(){return i});n(1);var a=n(567),r=n(2);const i=e=>{let{modalDetail:t,show:n,handleClose:i,handleSuccess:c}=e;return Object(r.jsxs)(a.a,{show:n,centered:!0,onHide:i,children:[Object(r.jsx)(a.a.Header,{closeButton:!0,children:Object(r.jsx)("h4",{className:"confirmation--title",children:null===t||void 0===t?void 0:t.title})}),Object(r.jsxs)(a.a.Body,{children:[Object(r.jsx)("div",{className:"confirmation--description",children:null===t||void 0===t?void 0:t.description}),Object(r.jsxs)("div",{className:"btn--wrapper",children:[Object(r.jsx)("button",{type:"button",className:"btn btn-success",onClick:()=>c(t.id),children:"Yes"}),Object(r.jsx)("button",{type:"button",className:"btn btn-danger",onClick:()=>i(),children:"Cancel"})]})]})]})}},788:function(e,t,n){"use strict";n.d(t,"a",function(){return s});var a=n(19),r=n(20),i=n(21);const c=e=>{let{...t}=e;if(t.id){const e=a.a.goldSilver.base;return Object(r.a)("json").put(e,t)}};function s(){return Object(i.useMutation)(c)}}}]);
2//# sourceMappingURL=41.a32485f3.chunk.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.