function e(e){e=window.fcAdmin.trans[e]||e;const t=Array.prototype.slice.call(arguments,1);if(0===t.length)return e;let a=0;return e=e.replace(/%(\d*)s|%d/g,(e,i)=>{if(i){const a=parseInt(i,10)-1;return a{const e=new Date,t=new Date;return t.setTime(t.getTime()-6048e5),[t,e]}},{text:e("This Month"),value:()=>{const e=new Date;return[new Date(e.getFullYear(),e.getMonth(),1),e]}},{text:e("Last month"),value:()=>{const e=new Date,t=new Date;return t.setTime(t.getTime()-2592e6),[t,e]}},{text:e("Last 3 months"),value:()=>{const e=new Date,t=new Date;return t.setTime(t.getTime()-7776e6),[t,e]}},{text:e("This quarter"),value:()=>{const e=new Date,t=Math.floor(e.getMonth()/3);return[new Date(e.getFullYear(),3*t,1),e]}},{text:e("Last quarter"),value:()=>{const e=new Date,t=Math.floor(e.getMonth()/3),a=new Date(e.getFullYear(),3*t-3,1),i=new Date(a.getFullYear(),a.getMonth()+3,0);return[a,i]}},{text:e("Year to Date"),value:()=>{const e=new Date;return[new Date((new Date).getFullYear(),0,1),e]}},{text:e("Last year"),value:()=>{const e=(new Date).getFullYear()-1;return[new Date(e,0,1),new Date(e,11,31)]}}];function o(){const e=new Date,t=new Date;t.setTime(t.getTime()-6048e5);const a=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`;return[a(t),a(e)]}const l=/^\d{4}-\d{2}-\d{2}$/;function u(e){if(!e||!Array.isArray(e)||e.length<2)return null;const t=e[0],a=e[1],i="string"==typeof t?t:t&&t.toISOString?t.toISOString().slice(0,10):null,n="string"==typeof a?a:a&&a.toISOString?a.toISOString().slice(0,10):null;return i&&n?{startStr:i,endStr:n}:null}function c(e,t){if(!e||"string"!=typeof e)return e;if(!l.test(e.trim()))return e;const a="undefined"!=typeof window&&window.dayjs;if(!a)return e;const i=u(t),n=a(e);if(!n.isValid())return e;if(!i)return n.format("MMM DD");const s=a(i.startStr);if(a(i.endStr).diff(s,"day")<=7)return n.format("dddd");const r=i.startStr.slice(0,4)===i.endStr.slice(0,4)&&function(e,t){const a="undefined"!=typeof window&&window.dayjs;if(!a)return!1;const i=a(e).year();return String(i)===t.startStr.slice(0,4)}(e,i);return r?n.format("MMM DD"):n.format("MMM DD, YYYY")}function d(e,t){if(!Array.isArray(e)||0===e.length)return e;const a="undefined"!=typeof window&&window.dayjs,i=u(t);if(!a||!i)return a?e.map(e=>{if(!e||!l.test(String(e).trim()))return e;const t=a(e);return t.isValid()?t.format("MMM DD"):e}):e;const n=a(i.startStr),s=a(i.endStr).diff(n,"day"),r=s<=7,o=s>7&&e.every(e=>l.test(String(e).trim())&&a(e).year().toString()===i.startStr.slice(0,4));return e.map(e=>{if(!e||"string"!=typeof e)return e;if(!l.test(e.trim()))return e;const t=a(e);return t.isValid()?r?t.format("dddd"):o?t.format("MMM DD"):t.format("MMM DD, YYYY"):e})}const p={disabledDate:e=>e.getTime()<=Date.now()-864e5,shortcuts:[{text:e("After 1 Hour"),value:()=>{const e=new Date;return e.setTime(e.getTime()+36e5),e}},{text:e("Tomorrow"),value:()=>{const e=new Date;return e.setTime(e.getTime()+864e5),e}},{text:e("After 2 Days"),value:()=>{const e=new Date;return e.setTime(e.getTime()+1728e5),e}},{text:e("After 1 Week"),value:()=>{const e=new Date;return e.setTime(e.getTime()+6048e5),e}}]},f={disabledDate:e=>e.getTime()<=Date.now()-864e5},v=function(e){if(!e)return"";let t=e;return t=t.indexOf("://")>-1?t.split("/")[2]:t.split("/")[0],t=t.split(":")[0],t},m=function(e){return[e.address_line_1,e.address_line_2,e.city,e.state,e.postal_code,e.country].filter(Boolean).join(", ")};export{e as $,i as a,d as b,f as c,r as d,n as e,c as f,o as g,p as h,s as i,a as j,v as k,m as l,t as s};