affiliate-front-shared 1.3.1 → 1.3.3

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/index.cjs CHANGED
@@ -846,7 +846,7 @@
846
846
  line-height: var(--typo-caption-lineHeight-medium, 1.125rem); /* 128.571% */
847
847
  letter-spacing: var(--typo-caption-spacing-medium, 0.00625rem);
848
848
  }
849
- `,Ct={"/reports/activity-report":1,"/reports/commission-report":2,"/reports/deposit-report":3,"/reports/media-report":4,"/reports/payments-report":5,"/reports/registation-report":6,"/affiliate-manager":7,"/end-user":8,"/marketing-tools":9,"/sub-affiliates":10,"/affiliate-users":14,"/country-group":11,"/email-constructor":15,"/roles":12,"/tags":13},dt=()=>{const{pathname:n}=ne.useLocation(),e=Object.keys(Ct).find(t=>n===t||n.startsWith(t+"/"));return e?Ct[e]:void 0};function Qt(n,e){return e.label.toLowerCase().includes(n.toLowerCase())||e.value==n}const Tn=({setisSettingPopupVisible:n,CustomFilters:e,tableAdditionalFields:t,createIsModal:r,exportButton:a,hasSelect:o,selectProps:s,GridPageTopLeftComponent:l,noNeedSidebarResponsiveButton:d})=>{const c=ne.useNavigate(),u=D(x=>x.filters),p=D(x=>x.hasCreateBtn),h=D(x=>x.setFilters),f=D(x=>x.setFilterItems),g=D(x=>x.setSortItems),[w,O]=S.useState(()=>{var x,b;try{const E=sessionStorage.getItem(`grid-filters:${window.location.pathname}`);return E?!!((b=(x=JSON.parse(E))==null?void 0:x.filters)!=null&&b.QuickSearch):!1}catch{return!1}}),[A,j]=S.useState(!1),{open:L}=ge(),[T,V]=S.useState(!1),{getMyFilters:B}=we(),_=dt(),[Y,I]=S.useState([]),$=D(x=>x.selectedConfig),v=D(x=>x.setSelectedConfig),R=D(x=>x.configsVersion);S.useEffect(()=>{_==null||!B||B(String(_)).then(x=>I(x.data??[]))},[_,R,B]);function M(x){const b=Y.find(F=>F.id===x);if(!b)return;const{filterItems:E,sortItems:z}=JSON.parse(b.value);f(E,!0),g(z),v({id:b.id,name:b.name})}const k=it(x=>{h({...u,QuickSearch:x.target.value})},500);function C(){n(!0)}function y(){r?L():c("new")}return i.jsxs(xn,{children:[!d&&i.jsx("button",{className:"icon sidebar",onClick:()=>j(!0),children:i.jsx(Ln,{})}),l&&l,i.jsxs("div",{className:"page-actions",children:[Y.length>0&&i.jsx(St,{showSearch:!0,placeholder:U("SavedConfiguration"),options:Y.map(x=>({value:x.id,label:x.name})),value:($==null?void 0:$.id)??null,filterOption:Qt,onChange:x=>x!=null?M(x):v(null)}),o&&s&&i.jsx("div",{children:i.jsx(St,{options:s.options,placeholder:s.placeholder,onChange:x=>{s.onChange(x??null)}})}),t&&t(T,V),w?i.jsx("input",{type:"text",placeholder:oe("QuickSearch"),defaultValue:(u==null?void 0:u.QuickSearch)??"",onChange:k}):i.jsx("button",{onClick:()=>O(!0),children:oe("Search")}),i.jsx(Xt,{}),i.jsx(ct,{CustomFilters:e,children:i.jsx(Ne,{})}),i.jsx("button",{className:"icon",onClick:C,children:i.jsx(Jt,{})}),a&&a,p&&i.jsx("button",{onClick:y,className:"create-btn",children:oe("Create")})]}),A&&i.jsx(Ut,{})]})},In=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M8.66665 7.3335H12.6666V8.66683H8.66665V12.6668H7.33331V8.66683H3.33331V7.3335H7.33331V3.3335H8.66665V7.3335Z",fill:"white"})),er=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M8 2C9.69989 2 11.2343 2.70742 12.3255 3.84245V2.42578H13.6589V6.11654H9.96875V4.7832H11.3796C10.5289 3.88969 9.32909 3.33333 8 3.33333C5.42286 3.33333 3.33333 5.42286 3.33333 8C3.33333 10.5771 5.42286 12.6667 8 12.6667C10.5771 12.6667 12.6667 10.5771 12.6667 8V7.33333H14V8C14 11.3135 11.3135 14 8 14C4.68648 14 2 11.3135 2 8C2 4.68648 4.68648 2 8 2Z",fill:"#131412"})),ue=class ue{static equals(e,t){const r=e??null,a=t??null;return r===a?!0:!r||!a?!1:r.getTime()===a.getTime()}static toMMddyyyy(e){const t=this.parseDate(e);if(!t)return null;const r=t.getMonth()+1,a=t.getDate(),o=t.getFullYear(),s=r<10?`0${r}`:`${r}`,l=a<10?`0${a}`:`${a}`;return`${s}/${l}/${o}`}static toLocal(e,t=!1,r=!1){const a=this.parseDate(e);return a?(t&&a.setHours(0,0,0,0),r&&a.setHours(23,59,59,999),this.utcToLocal(a)):null}static getDates(e,t){const r=new Array;let a=new Date(e.valueOf());for(;a<=t;)r.push(new Date(a)),a=this.addDays(a,1);return r}static dateOnly(e){const t=e.getFullYear(),r=e.getMonth()+1,a=e.getDate();return`${t}/${r}/${a}`}static dateWithDashes(e){const t=e.getFullYear(),r=e.getMonth()+1,a=e.getDate();return`${t}-${r}-${a}`}static today(){return this.dateOnly(new Date)}static toISODateString(e){const t=this.parseDate(e);if(!t)return null;const r=t.getFullYear(),a=t.getMonth()+1,o=t.getDate();return`${r}-${a<10?"0":""}${a}-${o<10?"0":""}${o}`}static toISODateStringWithTime(e){const t=this.parseDate(e);if(!t)return null;const r=t.getFullYear(),a=t.getMonth()+1,o=t.getDate(),s=t.getHours(),l=t.getMinutes(),d=`${s<10?"0":""}${s}:${l<10?"0":""}${l}`;return`${r}-${a<10?"0":""}${a}-${o<10?"0":""}${o} `+d}static monthDayYear(e){const t=this.parseDate(e);if(!t)return null;const a=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][t.getMonth()],o=t.getDate(),s=t.getFullYear();return`${a} ${o}, ${s}`}static withdrawalTableDateFormat(e){const t=this.parseDate(e);if(!t||isNaN(t.getTime()))return null;const r=e.getFullYear(),a=e.getMonth()+1,o=e.getDate(),s=`${r}/${a}/${o}`,l=t.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1});return`${s}, ${l}`}static getDateOnlyMonthAndNumber(e){if(!e)return"";const t=new Date(e);if(isNaN(t.getTime()))return"";const r=t.getDate(),o=t.getMonth();return`${r} ${o}`}static fromDateOrStringToTable(e){const t=this.parseDate(e);if(!t||isNaN(t.getTime()))return null;const r=t.toLocaleString("en-US",{month:"long",day:"numeric",year:"numeric"}),a=t.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1});return`${r}, ${a}`}static toISOTimeString(e){const t=ue.parseDate(e);if(!t)return null;const r=t.getHours(),a=t.getMinutes(),o=t.getSeconds();return`${r<10?"0":""}${r}:${a<10?"0":""}${a}:${o<10?"0":""}${o}`}static toTimeInput(e){const t=ue.parseDate(e);if(!t)return null;const r=t.getHours(),a=t.getMinutes();return`${r<10?"0":""}${r}:${a<10?"0":""}${a}`}static utcToLocal(e){const t=e instanceof Date?e:new Date(e);return new Date(t.getTime()+this._utcDiff)}static localToUtc(e){const t=e instanceof Date?e:new Date(e);return new Date(t.getTime()+this._utcDiff)}static addYears(e,t){if(!t)return e;const r=e;return r.setFullYear(e.getFullYear()+t),r}static addMonths(e,t){if(!t)return e;const r=e;return r.setMonth(r.getMonth()+t),r}static addDays(e,t){if(!t)return e;const r=e;return r.setDate(r.getDate()+t),r}static addHours(e,t){if(!t)return e;const r=new Date(e);return r.setHours(r.getHours()+t),r}static addMinutes(e,t){if(!t)return e;const r=new Date(e);return r.setMinutes(r.getMinutes()+t),r}static addSeconds(e,t){if(!t)return e;const r=e;return r.setSeconds(r.getSeconds()+t),r}static isToday(e){const t=new Date;return this.isSameDate(e,t)}static clone(e){return new Date(+e)}static isAnotherMonth(e,t){return t&&e.getMonth()!==t.getMonth()}static isWeekend(e){return e.getDay()===0||e.getDay()===6}static isSameDate(e,t){return t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}static getAge(e,t){if(e==null||e===""||e!==e)return null;const r=this.toDate(e),o=(t?t.getTime():Date.now())-r.getTime();return Math.floor(o/864e5/365.25)}static subtractMonths(e,t){const r=t<=e?t:e,a=t<=e?e:t,o=t<=e?1:-1;let s=(a.getFullYear()-r.getFullYear())*12;return s-=r.getMonth(),s+=a.getMonth(),s*o}static subtractDays(e,t){if(!t)return null;t=this.toDate(t);const r=t.getTime()-e.getTime();return Math.floor(r/864e5)}static subtractHours(e,t){if(!t)return null;t=this.toDate(t);const r=t.getTime()-e.getTime();return Math.floor(r%864e5/36e5)}static subtractMinutes(e,t){if(!t)return null;t=this.toDate(t);const r=t.getTime()-e.getTime();return Math.floor(r%864e5%36e5/6e4)}static parseDate(e){return typeof e>"u"||e==null||e===""?null:this.toDate(e)}static toDate(e){if(this.isDate(e))return e;if(typeof e=="number"&&!isNaN(e))return new Date(e);if(typeof e=="string"){e=e.trim();const r=parseFloat(e);if(!isNaN(e-r))return new Date(r);if(/^(\d{4}-\d{1,2}-\d{1,2})$/.test(e)){const[o,s,l]=e.split("-").map(d=>+d);return new Date(o,s-1,l)}let a;if(a=e.match(this.ISO8601_DATE_REGEX))return this.isoStringToDate(a)}const t=new Date(e);if(!this.isDate(t))throw new Error(`Unable to convert "${e}" into a date`);return t}static isoStringToDate(e){const t=new Date(0);let r=0,a=0;const o=e[8]?t.setUTCFullYear:t.setFullYear,s=e[8]?t.setUTCHours:t.setHours;e[9]&&(r=Number(e[9]+e[10]),a=Number(e[9]+e[11])),o.call(t,Number(e[1]),Number(e[2])-1,Number(e[3]));const l=Number(e[4]||0)-r,d=Number(e[5]||0)-a,c=Number(e[6]||0),u=Math.round(parseFloat("0."+(e[7]||0))*1e3);return s.call(t,l,d,c,u),t}static isDate(e){return e instanceof Date&&!isNaN(e.valueOf())}};Pe(ue,"getCommonDateRange",e=>{let t=new Date,r=new Date;switch(e){case"week":r.setDate(t.getDate()-7);break;case"month":r.setDate(t.getDate()-30);break;case"threeMonth":r.setMonth(t.getMonth()-3),r.setDate(1);break;case"sixMonth":r.setMonth(t.getMonth()-6),r.setDate(1);break;case"twelveMonth":r.setMonth(t.getMonth()-12),r.setDate(1);break;case"year":r.setMonth(0),r.setDate(1);break;case"all":t=null,r=null;break;case"custom":break;default:r.setDate(t.getDate()-7)}return{startDate:r?ue.toISODateString(r):null,endDate:t?ue.toISODateString(t):null}}),Pe(ue,"_utcDiff",-new Date().getTimezoneOffset()*6e4),Pe(ue,"ISO8601_DATE_REGEX",/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/);let ee=ue;const zn=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M12.471 4.47152L8.94238 8.00016L12.471 11.5288L11.5283 12.4715L7.99967 8.94287L4.47103 12.4715L3.52832 11.5288L7.05697 8.00016L3.52832 4.47152L4.47103 3.52881L7.99967 7.05745L11.5283 3.52881L12.471 4.47152Z",fill:"currentColor",fillOpacity:.75})),pt=m(zn)`
849
+ `,Ct={"/reports/activity-report":1,"/reports/commission-report":2,"/reports/deposit-report":3,"/reports/media-report":4,"/reports/payments-report":5,"/reports/registation-report":6,"/affiliate-manager":7,"/end-user":8,"/marketing-tools":9,"/sub-affiliates":10,"/affiliate-users":14,"/country-group":11,"/email-constructor":15,"/roles":12,"/tags":13},dt=()=>{const{pathname:n}=ne.useLocation(),e=Object.keys(Ct).find(t=>n===t||n.startsWith(t+"/"));return e?Ct[e]:void 0};function Qt(n,e){return e.label.toLowerCase().includes(n.toLowerCase())||e.value==n}const Tn=({setisSettingPopupVisible:n,CustomFilters:e,tableAdditionalFields:t,createIsModal:r,exportButton:a,hasSelect:o,selectProps:s,GridPageTopLeftComponent:l,noNeedSidebarResponsiveButton:d})=>{const c=ne.useNavigate(),u=D(x=>x.filters),p=D(x=>x.hasCreateBtn),h=D(x=>x.setFilters),f=D(x=>x.setFilterItems),g=D(x=>x.setSortItems),[w,O]=S.useState(()=>{var x,b;try{const E=sessionStorage.getItem(`grid-filters:${window.location.pathname}`);return E?!!((b=(x=JSON.parse(E))==null?void 0:x.filters)!=null&&b.QuickSearch):!1}catch{return!1}}),[A,j]=S.useState(!1),{open:L}=ge(),[T,V]=S.useState(!1),{getMyFilters:B}=we(),_=dt(),[Y,I]=S.useState([]),$=D(x=>x.selectedConfig),v=D(x=>x.setSelectedConfig),R=D(x=>x.configsVersion);S.useEffect(()=>{_==null||!B||B(String(_)).then(x=>I(x.data??[]))},[_,R,B]);function M(x){const b=Y.find(F=>F.id===x);if(!b)return;const{filterItems:E,sortItems:z}=JSON.parse(b.value);f(E,!0),g(z),v({id:b.id,name:b.name})}const k=it(x=>{h({...u,QuickSearch:x.target.value})},500);function C(){n(!0)}function y(){r?L():c("new")}return i.jsxs(xn,{children:[!d&&i.jsx("button",{className:"icon sidebar",onClick:()=>j(!0),children:i.jsx(Ln,{})}),l&&i.jsx(l,{}),i.jsxs("div",{className:"page-actions",children:[Y.length>0&&i.jsx(St,{showSearch:!0,placeholder:U("SavedConfiguration"),options:Y.map(x=>({value:x.id,label:x.name})),value:($==null?void 0:$.id)??null,filterOption:Qt,onChange:x=>x!=null?M(x):v(null)}),o&&s&&i.jsx("div",{children:i.jsx(St,{options:s.options,placeholder:s.placeholder,onChange:x=>{s.onChange(x??null)}})}),t&&t(T,V),w?i.jsx("input",{type:"text",placeholder:oe("QuickSearch"),defaultValue:(u==null?void 0:u.QuickSearch)??"",onChange:k}):i.jsx("button",{onClick:()=>O(!0),children:oe("Search")}),i.jsx(Xt,{}),i.jsx(ct,{CustomFilters:e,children:i.jsx(Ne,{})}),i.jsx("button",{className:"icon",onClick:C,children:i.jsx(Jt,{})}),a&&a,p&&i.jsx("button",{onClick:y,className:"create-btn",children:oe("Create")})]}),A&&i.jsx(Ut,{})]})},In=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M8.66665 7.3335H12.6666V8.66683H8.66665V12.6668H7.33331V8.66683H3.33331V7.3335H7.33331V3.3335H8.66665V7.3335Z",fill:"white"})),er=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M8 2C9.69989 2 11.2343 2.70742 12.3255 3.84245V2.42578H13.6589V6.11654H9.96875V4.7832H11.3796C10.5289 3.88969 9.32909 3.33333 8 3.33333C5.42286 3.33333 3.33333 5.42286 3.33333 8C3.33333 10.5771 5.42286 12.6667 8 12.6667C10.5771 12.6667 12.6667 10.5771 12.6667 8V7.33333H14V8C14 11.3135 11.3135 14 8 14C4.68648 14 2 11.3135 2 8C2 4.68648 4.68648 2 8 2Z",fill:"#131412"})),ue=class ue{static equals(e,t){const r=e??null,a=t??null;return r===a?!0:!r||!a?!1:r.getTime()===a.getTime()}static toMMddyyyy(e){const t=this.parseDate(e);if(!t)return null;const r=t.getMonth()+1,a=t.getDate(),o=t.getFullYear(),s=r<10?`0${r}`:`${r}`,l=a<10?`0${a}`:`${a}`;return`${s}/${l}/${o}`}static toLocal(e,t=!1,r=!1){const a=this.parseDate(e);return a?(t&&a.setHours(0,0,0,0),r&&a.setHours(23,59,59,999),this.utcToLocal(a)):null}static getDates(e,t){const r=new Array;let a=new Date(e.valueOf());for(;a<=t;)r.push(new Date(a)),a=this.addDays(a,1);return r}static dateOnly(e){const t=e.getFullYear(),r=e.getMonth()+1,a=e.getDate();return`${t}/${r}/${a}`}static dateWithDashes(e){const t=e.getFullYear(),r=e.getMonth()+1,a=e.getDate();return`${t}-${r}-${a}`}static today(){return this.dateOnly(new Date)}static toISODateString(e){const t=this.parseDate(e);if(!t)return null;const r=t.getFullYear(),a=t.getMonth()+1,o=t.getDate();return`${r}-${a<10?"0":""}${a}-${o<10?"0":""}${o}`}static toISODateStringWithTime(e){const t=this.parseDate(e);if(!t)return null;const r=t.getFullYear(),a=t.getMonth()+1,o=t.getDate(),s=t.getHours(),l=t.getMinutes(),d=`${s<10?"0":""}${s}:${l<10?"0":""}${l}`;return`${r}-${a<10?"0":""}${a}-${o<10?"0":""}${o} `+d}static monthDayYear(e){const t=this.parseDate(e);if(!t)return null;const a=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][t.getMonth()],o=t.getDate(),s=t.getFullYear();return`${a} ${o}, ${s}`}static withdrawalTableDateFormat(e){const t=this.parseDate(e);if(!t||isNaN(t.getTime()))return null;const r=e.getFullYear(),a=e.getMonth()+1,o=e.getDate(),s=`${r}/${a}/${o}`,l=t.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1});return`${s}, ${l}`}static getDateOnlyMonthAndNumber(e){if(!e)return"";const t=new Date(e);if(isNaN(t.getTime()))return"";const r=t.getDate(),o=t.getMonth();return`${r} ${o}`}static fromDateOrStringToTable(e){const t=this.parseDate(e);if(!t||isNaN(t.getTime()))return null;const r=t.toLocaleString("en-US",{month:"long",day:"numeric",year:"numeric"}),a=t.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1});return`${r}, ${a}`}static toISOTimeString(e){const t=ue.parseDate(e);if(!t)return null;const r=t.getHours(),a=t.getMinutes(),o=t.getSeconds();return`${r<10?"0":""}${r}:${a<10?"0":""}${a}:${o<10?"0":""}${o}`}static toTimeInput(e){const t=ue.parseDate(e);if(!t)return null;const r=t.getHours(),a=t.getMinutes();return`${r<10?"0":""}${r}:${a<10?"0":""}${a}`}static utcToLocal(e){const t=e instanceof Date?e:new Date(e);return new Date(t.getTime()+this._utcDiff)}static localToUtc(e){const t=e instanceof Date?e:new Date(e);return new Date(t.getTime()+this._utcDiff)}static addYears(e,t){if(!t)return e;const r=e;return r.setFullYear(e.getFullYear()+t),r}static addMonths(e,t){if(!t)return e;const r=e;return r.setMonth(r.getMonth()+t),r}static addDays(e,t){if(!t)return e;const r=e;return r.setDate(r.getDate()+t),r}static addHours(e,t){if(!t)return e;const r=new Date(e);return r.setHours(r.getHours()+t),r}static addMinutes(e,t){if(!t)return e;const r=new Date(e);return r.setMinutes(r.getMinutes()+t),r}static addSeconds(e,t){if(!t)return e;const r=e;return r.setSeconds(r.getSeconds()+t),r}static isToday(e){const t=new Date;return this.isSameDate(e,t)}static clone(e){return new Date(+e)}static isAnotherMonth(e,t){return t&&e.getMonth()!==t.getMonth()}static isWeekend(e){return e.getDay()===0||e.getDay()===6}static isSameDate(e,t){return t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}static getAge(e,t){if(e==null||e===""||e!==e)return null;const r=this.toDate(e),o=(t?t.getTime():Date.now())-r.getTime();return Math.floor(o/864e5/365.25)}static subtractMonths(e,t){const r=t<=e?t:e,a=t<=e?e:t,o=t<=e?1:-1;let s=(a.getFullYear()-r.getFullYear())*12;return s-=r.getMonth(),s+=a.getMonth(),s*o}static subtractDays(e,t){if(!t)return null;t=this.toDate(t);const r=t.getTime()-e.getTime();return Math.floor(r/864e5)}static subtractHours(e,t){if(!t)return null;t=this.toDate(t);const r=t.getTime()-e.getTime();return Math.floor(r%864e5/36e5)}static subtractMinutes(e,t){if(!t)return null;t=this.toDate(t);const r=t.getTime()-e.getTime();return Math.floor(r%864e5%36e5/6e4)}static parseDate(e){return typeof e>"u"||e==null||e===""?null:this.toDate(e)}static toDate(e){if(this.isDate(e))return e;if(typeof e=="number"&&!isNaN(e))return new Date(e);if(typeof e=="string"){e=e.trim();const r=parseFloat(e);if(!isNaN(e-r))return new Date(r);if(/^(\d{4}-\d{1,2}-\d{1,2})$/.test(e)){const[o,s,l]=e.split("-").map(d=>+d);return new Date(o,s-1,l)}let a;if(a=e.match(this.ISO8601_DATE_REGEX))return this.isoStringToDate(a)}const t=new Date(e);if(!this.isDate(t))throw new Error(`Unable to convert "${e}" into a date`);return t}static isoStringToDate(e){const t=new Date(0);let r=0,a=0;const o=e[8]?t.setUTCFullYear:t.setFullYear,s=e[8]?t.setUTCHours:t.setHours;e[9]&&(r=Number(e[9]+e[10]),a=Number(e[9]+e[11])),o.call(t,Number(e[1]),Number(e[2])-1,Number(e[3]));const l=Number(e[4]||0)-r,d=Number(e[5]||0)-a,c=Number(e[6]||0),u=Math.round(parseFloat("0."+(e[7]||0))*1e3);return s.call(t,l,d,c,u),t}static isDate(e){return e instanceof Date&&!isNaN(e.valueOf())}};Pe(ue,"getCommonDateRange",e=>{let t=new Date,r=new Date;switch(e){case"week":r.setDate(t.getDate()-7);break;case"month":r.setDate(t.getDate()-30);break;case"threeMonth":r.setMonth(t.getMonth()-3),r.setDate(1);break;case"sixMonth":r.setMonth(t.getMonth()-6),r.setDate(1);break;case"twelveMonth":r.setMonth(t.getMonth()-12),r.setDate(1);break;case"year":r.setMonth(0),r.setDate(1);break;case"all":t=null,r=null;break;case"custom":break;default:r.setDate(t.getDate()-7)}return{startDate:r?ue.toISODateString(r):null,endDate:t?ue.toISODateString(t):null}}),Pe(ue,"_utcDiff",-new Date().getTimezoneOffset()*6e4),Pe(ue,"ISO8601_DATE_REGEX",/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/);let ee=ue;const zn=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M12.471 4.47152L8.94238 8.00016L12.471 11.5288L11.5283 12.4715L7.99967 8.94287L4.47103 12.4715L3.52832 11.5288L7.05697 8.00016L3.52832 4.47152L4.47103 3.52881L7.99967 7.05745L11.5283 3.52881L12.471 4.47152Z",fill:"currentColor",fillOpacity:.75})),pt=m(zn)`
850
850
  width: 25px;
851
851
  height: 25px;
852
852
  cursor: pointer;