@ctlyst.id/utils 1.1.0 → 1.1.2
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.js +2 -1
- package/dist/index.mjs +3848 -263
- package/dist/types/hooks/index.d.ts +2 -1
- package/dist/types/hooks/use-number-formatter/index.d.ts +2 -0
- package/dist/types/hooks/use-number-formatter/use-number-formatter.d.ts +9 -0
- package/dist/types/hooks/use-voucher-tnc/get-applies-to.d.ts +2 -0
- package/dist/types/hooks/use-voucher-tnc/get-period.d.ts +2 -0
- package/dist/types/hooks/use-voucher-tnc/index.d.ts +2 -0
- package/dist/types/hooks/use-voucher-tnc/use-voucher-method-terms.d.ts +2 -0
- package/dist/types/hooks/use-voucher-tnc/use-voucher-tnc.d.ts +3 -0
- package/dist/types/hooks/use-voucher-tnc/use-voucher-tnc.types.d.ts +42 -0
- package/package.json +4 -3
- package/dist/types/hooks/use-currency-formatter/index.d.ts +0 -2
- package/dist/types/hooks/use-currency-formatter/use-currency-formatter.d.ts +0 -9
package/dist/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),B=n=>n!=null&&typeof n=="object"&&"nodeType"in n&&n.nodeType===Node.ELEMENT_NODE,C=n=>B(n)?n.ownerDocument??document:document,w=(n,t)=>{var o;const e=n.target;return n.button>0||e&&!C(e).contains(e)?!1:!((o=t.current)!=null&&o.contains(e))},O=()=>!!(typeof window<"u"&&window.document&&window.document.createElement),M=O(),k=(n,t=[])=>{const e=l.useRef(n);return l.useEffect(()=>{e.current=n}),l.useCallback((...o)=>{var a;return(a=e.current)==null?void 0:a.call(e,...o)},t)},E=k;var $=function(){var n=document.getSelection();if(!n.rangeCount)return function(){};for(var t=document.activeElement,e=[],o=0;o<n.rangeCount;o++)e.push(n.getRangeAt(o));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return n.removeAllRanges(),function(){n.type==="Caret"&&n.removeAllRanges(),n.rangeCount||e.forEach(function(a){n.addRange(a)}),t&&t.focus()}},A=$,S={"text/plain":"Text","text/html":"Url",default:"Text"},I="Copy to clipboard: #{key}, Enter";function V(n){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return n.replace(/#{\s*key\s*}/g,t)}function U(n,t){var e,o,a,s,c,r,i=!1;t||(t={}),e=t.debug||!1;try{a=A(),s=document.createRange(),c=document.getSelection(),r=document.createElement("span"),r.textContent=n,r.ariaHidden="true",r.style.all="unset",r.style.position="fixed",r.style.top=0,r.style.clip="rect(0, 0, 0, 0)",r.style.whiteSpace="pre",r.style.webkitUserSelect="text",r.style.MozUserSelect="text",r.style.msUserSelect="text",r.style.userSelect="text",r.addEventListener("copy",function(u){if(u.stopPropagation(),t.format)if(u.preventDefault(),typeof u.clipboardData>"u"){e&&console.warn("unable to use e.clipboardData"),e&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var f=S[t.format]||S.default;window.clipboardData.setData(f,n)}else u.clipboardData.clearData(),u.clipboardData.setData(t.format,n);t.onCopy&&(u.preventDefault(),t.onCopy(u.clipboardData))}),document.body.appendChild(r),s.selectNodeContents(r),c.addRange(s);var d=document.execCommand("copy");if(!d)throw new Error("copy command was unsuccessful");i=!0}catch(u){e&&console.error("unable to copy using execCommand: ",u),e&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",n),t.onCopy&&t.onCopy(window.clipboardData),i=!0}catch(f){e&&console.error("unable to copy using clipboardData: ",f),e&&console.error("falling back to prompt"),o=V("message"in t?t.message:I),window.prompt(o,n)}}finally{c&&(typeof c.removeRange=="function"?c.removeRange(s):c.removeAllRanges()),r&&document.body.removeChild(r),a()}return i}var F=U;const W=({value:n="",optionsOrTimeout:t={}}={})=>{const[e,o]=l.useState(!1),[a,s]=l.useState(n);l.useEffect(()=>s(n),[n]);const{timeout:c=1500,...r}=typeof t=="number"?{timeout:t}:t,i=l.useCallback(()=>{const d=F(a,r);o(d)},[a,r]);return l.useEffect(()=>{let d=null;return e&&(d=window.setTimeout(()=>{o(!1)},c)),()=>{d&&window.clearTimeout(d)}},[c,e]),{value:a,setValue:s,onCopy:i,hasCopied:e}},z=W,H=({value:n,thousandSeparator:t=".",decimalLength:e,decimalSeparator:o=",",code:a=""})=>{const c=(r=>{const i=r.toString().split("."),d=i[0].replace(/\B(?=(\d{3})+(?!\d))/g,t);let u="";return e!==void 0?i.length>1&&e>0?u=o+i[1].padEnd(e,"0").slice(0,e):e>0&&(u=o+"0".repeat(e)):i.length>1&&(u=o+i[1]),d+u})(n);return a?a+c:c},Q=H,j=({value:n,delay:t=500})=>{const[e,o]=l.useState(n);return l.useEffect(()=>{const a=setTimeout(()=>o(n),t||500);return()=>{clearTimeout(a)}},[n,t]),e},q=j;var K=process.env.NODE_ENV==="production",D="Invariant failed";function L(n,t){if(!n){if(K)throw new Error(D);var e=typeof t=="function"?t():t,o=e?"".concat(D,": ").concat(e):D;throw new Error(o)}}var b=function(t){var e=t.top,o=t.right,a=t.bottom,s=t.left,c=o-s,r=a-e,i={top:e,right:o,bottom:a,left:s,width:c,height:r,x:s,y:e,center:{x:(o+s)/2,y:(a+e)/2}};return i},X=function(t,e){return{top:t.top-e.top,left:t.left-e.left,bottom:t.bottom+e.bottom,right:t.right+e.right}},R=function(t,e){return{top:t.top+e.top,left:t.left+e.left,bottom:t.bottom-e.bottom,right:t.right-e.right}},y={top:0,right:0,bottom:0,left:0},G=function(t){var e=t.borderBox,o=t.margin,a=o===void 0?y:o,s=t.border,c=s===void 0?y:s,r=t.padding,i=r===void 0?y:r,d=b(X(e,a)),u=b(R(e,c)),f=b(R(u,i));return{marginBox:d,borderBox:b(e),paddingBox:u,contentBox:f,margin:a,border:c,padding:i}},m=function(t){var e=t.slice(0,-2),o=t.slice(-2);if(o!=="px")return 0;var a=Number(e);return isNaN(a)&&(process.env.NODE_ENV!=="production"?L(!1,"Could not parse value [raw: "+t+", without suffix: "+e+"]"):L(!1)),a},J=function(t,e){var o={top:m(e.marginTop),right:m(e.marginRight),bottom:m(e.marginBottom),left:m(e.marginLeft)},a={top:m(e.paddingTop),right:m(e.paddingRight),bottom:m(e.paddingBottom),left:m(e.paddingLeft)},s={top:m(e.borderTopWidth),right:m(e.borderRightWidth),bottom:m(e.borderBottomWidth),left:m(e.borderLeftWidth)};return G({borderBox:t,margin:o,padding:a,border:s})},Y=function(t){var e=t.getBoundingClientRect(),o=window.getComputedStyle(t);return J(e,o)};const Z=M?l.useLayoutEffect:l.useEffect,T=Z,_=(n,t)=>{const[e,o]=l.useState(null),a=l.useRef();return T(()=>{const s=()=>{const c=n.current;c&&(a.current=requestAnimationFrame(()=>{const r=Y(c);o(r)}))};return s(),t&&(window.addEventListener("resize",s),window.addEventListener("scroll",s)),()=>{t&&(window.removeEventListener("resize",s),window.removeEventListener("scroll",s)),a.current&&cancelAnimationFrame(a.current)}},[t]),e},ee=_,te=({onClose:n,onOpen:t,isOpen:e,defaultIsOpen:o,id:a}={})=>{const[s,c]=l.useState(o||!1),r=e!==void 0?e:s,i=e!==void 0,d=l.useId(),u=a??`disclosure-${d}`,f=E(t),v=E(n),p=l.useCallback(()=>{i||c(!1),v==null||v()},[i,v]),h=l.useCallback(()=>{i||c(!0),f==null||f()},[i,f]),x=l.useCallback(()=>{r?p():h()},[r,h,p]);return{onClose:p,onOpen:h,onToggle:x,getButtonProps:({onClick:g,...P}={})=>({...P,"aria-expanded":r,"aria-controls":u,onClick(N){g==null||g(N),x()}}),getDisclosureProps:({...g}={})=>({...g,hidden:!r,id:u}),isOpen:r}},ne=te,oe=(n,t={})=>{const{ssr:e=!0,fallback:o}=t,a=Array.isArray(n)?n:[n];let s=Array.isArray(o)?o:[o];s=s.filter(i=>i!=null);const[c,r]=l.useState(()=>a.map((i,d)=>({media:i,matches:e?!!s[d]:window.matchMedia(i).matches})));return l.useEffect(()=>{const i=window;r(a.map(f=>({media:f,matches:i.matchMedia(f).matches})));const d=a.map(f=>i.matchMedia(f)),u=f=>{r(v=>v.slice().map(p=>p.media===f.media?{...p,matches:f.matches}:p))};return d.forEach(f=>{f.addEventListener("change",u)}),()=>{d.forEach(f=>{f.removeEventListener("change",u)})}},[window]),c.map(i=>i.matches)},re=oe,ae=()=>{const[n,t]=l.useState(navigator.onLine);return l.useEffect(()=>{const e=()=>t(navigator.onLine);return window.addEventListener("online",e),window.addEventListener("offline",e),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",e)}},[]),{isOnline:n,isOffline:!n}},se=ae,ie=({enabled:n=!0,ref:t,handler:e})=>{const o=E(e),s=l.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}).current;l.useEffect(()=>{if(!n)return;const c=u=>{w(u,t)&&(s.isPointerDown=!0)},r=u=>{if(s.ignoreEmulatedMouseEvents){s.ignoreEmulatedMouseEvents=!1;return}s.isPointerDown&&e&&w(u,t)&&(s.isPointerDown=!1,o(u))},i=u=>{s.ignoreEmulatedMouseEvents=!0,e&&s.isPointerDown&&w(u,t)&&(s.isPointerDown=!1,o(u))},d=C(t.current);return d.addEventListener("mousedown",c,!0),d.addEventListener("mouseup",r,!0),d.addEventListener("touchstart",c,!0),d.addEventListener("touchend",i,!0),()=>{d.removeEventListener("mousedown",c,!0),d.removeEventListener("mouseup",r,!0),d.removeEventListener("touchstart",c,!0),d.removeEventListener("touchend",i,!0)}},[e,t,o,s,n])},ue=ie;exports.canUseDOM=O;exports.getOwnerDocument=C;exports.isBrowser=M;exports.isElement=B;exports.isValidEvent=w;exports.useCallbackRef=E;exports.useClipboard=z;exports.useCurrencyFormatter=Q;exports.useDebounce=q;exports.useDimensions=ee;exports.useDisclosure=ne;exports.useMediaQuery=re;exports.useOnlineStatus=se;exports.useOutsideClick=ue;exports.useSafeLayoutEffect=T;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react"),tt=o=>o!=null&&typeof o=="object"&&"nodeType"in o&&o.nodeType===Node.ELEMENT_NODE,Ne=o=>tt(o)?o.ownerDocument??document:document,be=(o,a)=>{var r;const t=o.target;return o.button>0||t&&!Ne(t).contains(t)?!1:!((r=a.current)!=null&&r.contains(t))},rt=()=>!!(typeof window<"u"&&window.document&&window.document.createElement),at=rt(),Dt=(o,a=[])=>{const t=P.useRef(o);return P.useEffect(()=>{t.current=o}),P.useCallback((...r)=>{var e;return(e=t.current)==null?void 0:e.call(t,...r)},a)},Te=Dt;var Mt=function(){var o=document.getSelection();if(!o.rangeCount)return function(){};for(var a=document.activeElement,t=[],r=0;r<o.rangeCount;r++)t.push(o.getRangeAt(r));switch(a.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":a.blur();break;default:a=null;break}return o.removeAllRanges(),function(){o.type==="Caret"&&o.removeAllRanges(),o.rangeCount||t.forEach(function(e){o.addRange(e)}),a&&a.focus()}},Pt=Mt,Be={"text/plain":"Text","text/html":"Url",default:"Text"},kt="Copy to clipboard: #{key}, Enter";function Ct(o){var a=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return o.replace(/#{\s*key\s*}/g,a)}function xt(o,a){var t,r,e,i,n,u,s=!1;a||(a={}),t=a.debug||!1;try{e=Pt(),i=document.createRange(),n=document.getSelection(),u=document.createElement("span"),u.textContent=o,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",function(d){if(d.stopPropagation(),a.format)if(d.preventDefault(),typeof d.clipboardData>"u"){t&&console.warn("unable to use e.clipboardData"),t&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var m=Be[a.format]||Be.default;window.clipboardData.setData(m,o)}else d.clipboardData.clearData(),d.clipboardData.setData(a.format,o);a.onCopy&&(d.preventDefault(),a.onCopy(d.clipboardData))}),document.body.appendChild(u),i.selectNodeContents(u),n.addRange(i);var l=document.execCommand("copy");if(!l)throw new Error("copy command was unsuccessful");s=!0}catch(d){t&&console.error("unable to copy using execCommand: ",d),t&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(a.format||"text",o),a.onCopy&&a.onCopy(window.clipboardData),s=!0}catch(m){t&&console.error("unable to copy using clipboardData: ",m),t&&console.error("falling back to prompt"),r=Ct("message"in a?a.message:kt),window.prompt(r,o)}}finally{n&&(typeof n.removeRange=="function"?n.removeRange(i):n.removeAllRanges()),u&&document.body.removeChild(u),e()}return s}var Ot=xt;const Et=({value:o="",optionsOrTimeout:a={}}={})=>{const[t,r]=P.useState(!1),[e,i]=P.useState(o);P.useEffect(()=>i(o),[o]);const{timeout:n=1500,...u}=typeof a=="number"?{timeout:a}:a,s=P.useCallback(()=>{const l=Ot(e,u);r(l)},[e,u]);return P.useEffect(()=>{let l=null;return t&&(l=window.setTimeout(()=>{r(!1)},n)),()=>{l&&window.clearTimeout(l)}},[n,t]),{value:e,setValue:i,onCopy:s,hasCopied:t}},Ut=Et,$t=({value:o,delay:a=500})=>{const[t,r]=P.useState(o);return P.useEffect(()=>{const e=setTimeout(()=>r(o),a||500);return()=>{clearTimeout(e)}},[o,a]),t},Wt=$t;var Yt=process.env.NODE_ENV==="production",Ee="Invariant failed";function je(o,a){if(!o){if(Yt)throw new Error(Ee);var t=typeof a=="function"?a():a,r=t?"".concat(Ee,": ").concat(t):Ee;throw new Error(r)}}var ye=function(a){var t=a.top,r=a.right,e=a.bottom,i=a.left,n=r-i,u=e-t,s={top:t,right:r,bottom:e,left:i,width:n,height:u,x:i,y:t,center:{x:(r+i)/2,y:(e+t)/2}};return s},Nt=function(a,t){return{top:a.top-t.top,left:a.left-t.left,bottom:a.bottom+t.bottom,right:a.right+t.right}},Ve=function(a,t){return{top:a.top+t.top,left:a.left+t.left,bottom:a.bottom-t.bottom,right:a.right-t.right}},Ue={top:0,right:0,bottom:0,left:0},_t=function(a){var t=a.borderBox,r=a.margin,e=r===void 0?Ue:r,i=a.border,n=i===void 0?Ue:i,u=a.padding,s=u===void 0?Ue:u,l=ye(Nt(t,e)),d=ye(Ve(t,n)),m=ye(Ve(d,s));return{marginBox:l,borderBox:ye(t),paddingBox:d,contentBox:m,margin:e,border:n,padding:s}},F=function(a){var t=a.slice(0,-2),r=a.slice(-2);if(r!=="px")return 0;var e=Number(t);return isNaN(e)&&(process.env.NODE_ENV!=="production"?je(!1,"Could not parse value [raw: "+a+", without suffix: "+t+"]"):je(!1)),e},At=function(a,t){var r={top:F(t.marginTop),right:F(t.marginRight),bottom:F(t.marginBottom),left:F(t.marginLeft)},e={top:F(t.paddingTop),right:F(t.paddingRight),bottom:F(t.paddingBottom),left:F(t.paddingLeft)},i={top:F(t.borderTopWidth),right:F(t.borderRightWidth),bottom:F(t.borderBottomWidth),left:F(t.borderLeftWidth)};return _t({borderBox:a,margin:r,padding:e,border:i})},St=function(a){var t=a.getBoundingClientRect(),r=window.getComputedStyle(a);return At(t,r)};const Lt=at?P.useLayoutEffect:P.useEffect,nt=Lt,Rt=(o,a)=>{const[t,r]=P.useState(null),e=P.useRef();return nt(()=>{const i=()=>{const n=o.current;n&&(e.current=requestAnimationFrame(()=>{const u=St(n);r(u)}))};return i(),a&&(window.addEventListener("resize",i),window.addEventListener("scroll",i)),()=>{a&&(window.removeEventListener("resize",i),window.removeEventListener("scroll",i)),e.current&&cancelAnimationFrame(e.current)}},[a]),t},Ht=Rt,It=({onClose:o,onOpen:a,isOpen:t,defaultIsOpen:r,id:e}={})=>{const[i,n]=P.useState(r||!1),u=t!==void 0?t:i,s=t!==void 0,l=P.useId(),d=e??`disclosure-${l}`,m=Te(a),h=Te(o),v=P.useCallback(()=>{s||n(!1),h==null||h()},[s,h]),D=P.useCallback(()=>{s||n(!0),m==null||m()},[s,m]),$=P.useCallback(()=>{u?v():D()},[u,D,v]);return{onClose:v,onOpen:D,onToggle:$,getButtonProps:({onClick:Y,...H}={})=>({...H,"aria-expanded":u,"aria-controls":d,onClick(I){Y==null||Y(I),$()}}),getDisclosureProps:({...Y}={})=>({...Y,hidden:!u,id:d}),isOpen:u}},qt=It,Ft=(o,a={})=>{const{ssr:t=!0,fallback:r}=a,e=Array.isArray(o)?o:[o];let i=Array.isArray(r)?r:[r];i=i.filter(s=>s!=null);const[n,u]=P.useState(()=>e.map((s,l)=>({media:s,matches:t?!!i[l]:window.matchMedia(s).matches})));return P.useEffect(()=>{const s=window;u(e.map(m=>({media:m,matches:s.matchMedia(m).matches})));const l=e.map(m=>s.matchMedia(m)),d=m=>{u(h=>h.slice().map(v=>v.media===m.media?{...v,matches:m.matches}:v))};return l.forEach(m=>{m.addEventListener("change",d)}),()=>{l.forEach(m=>{m.removeEventListener("change",d)})}},[window]),n.map(s=>s.matches)},Qt=Ft,Bt=({value:o,thousandSeparator:a=".",decimalLength:t,decimalSeparator:r=",",prefix:e=""})=>{const n=(u=>{const s=u.toString().split("."),l=s[0].replace(/\B(?=(\d{3})+(?!\d))/g,a);let d="";return t!==void 0?s.length>1&&t>0?d=r+s[1].padEnd(t,"0").slice(0,t):t>0&&(d=r+"0".repeat(t)):s.length>1&&(d=r+s[1]),l+d})(o);return n.charAt(0)==="-"?n.replace(/^-/g,`-${e}`):`${e}${n}`},ue=Bt,jt=()=>{const[o,a]=P.useState(navigator.onLine);return P.useEffect(()=>{const t=()=>a(navigator.onLine);return window.addEventListener("online",t),window.addEventListener("offline",t),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",t)}},[]),{isOnline:o,isOffline:!o}},Vt=jt,Xt=({enabled:o=!0,ref:a,handler:t})=>{const r=Te(t),i=P.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}).current;P.useEffect(()=>{if(!o)return;const n=d=>{be(d,a)&&(i.isPointerDown=!0)},u=d=>{if(i.ignoreEmulatedMouseEvents){i.ignoreEmulatedMouseEvents=!1;return}i.isPointerDown&&t&&be(d,a)&&(i.isPointerDown=!1,r(d))},s=d=>{i.ignoreEmulatedMouseEvents=!0,t&&i.isPointerDown&&be(d,a)&&(i.isPointerDown=!1,r(d))},l=Ne(a.current);return l.addEventListener("mousedown",n,!0),l.addEventListener("mouseup",u,!0),l.addEventListener("touchstart",n,!0),l.addEventListener("touchend",s,!0),()=>{l.removeEventListener("mousedown",n,!0),l.removeEventListener("mouseup",u,!0),l.removeEventListener("touchstart",n,!0),l.removeEventListener("touchend",s,!0)}},[t,a,r,i,o])},Gt=Xt;var B=(o=>(o.product="Product",o.order="Order",o.gift="Gift",o.freeShipping="Free Shipping",o.freeInsurance="Free Insurance",o.bundling="Bundling",o))(B||{}),De=(o=>(o.percentage="percentage",o.amount="amount",o))(De||{});function Kt(o){let a="";const{type:t,collections:r=[],brands:e=[],eligibilityType:i}=o;return t===B.product&&(r.length>0?a=`Voucher hanya berlaku untuk collection ${r.map(n=>n.name).join(", ")}.`:e.length>0?a=`Voucher hanya berlaku untuk produk brand ${e.map(n=>n.name).join(", ")}.`:i==="selected_products"&&(a="Voucher hanya berlaku untuk produk tertentu.")),a}function J(o){return J=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},J(o)}function L(o){if(o===null||o===!0||o===!1)return NaN;var a=Number(o);return isNaN(a)?a:a<0?Math.ceil(a):Math.floor(a)}function E(o,a){if(a.length<o)throw new TypeError(o+" argument"+(o>1?"s":"")+" required, but only "+a.length+" present")}function A(o){E(1,arguments);var a=Object.prototype.toString.call(o);return o instanceof Date||J(o)==="object"&&a==="[object Date]"?new Date(o.getTime()):typeof o=="number"||a==="[object Number]"?new Date(o):((typeof o=="string"||a==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Jt(o,a){E(2,arguments);var t=A(o).getTime(),r=L(a);return new Date(t+r)}var zt={};function ce(){return zt}function it(o){var a=new Date(Date.UTC(o.getFullYear(),o.getMonth(),o.getDate(),o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds()));return a.setUTCFullYear(o.getFullYear()),o.getTime()-a.getTime()}var Zt=6e4,er=36e5,tr=1e3;function rr(o){return E(1,arguments),o instanceof Date||J(o)==="object"&&Object.prototype.toString.call(o)==="[object Date]"}function $e(o){if(E(1,arguments),!rr(o)&&typeof o!="number")return!1;var a=A(o);return!isNaN(Number(a))}function ot(o,a){E(2,arguments);var t=L(a);return Jt(o,-t)}var ar=864e5;function nr(o){E(1,arguments);var a=A(o),t=a.getTime();a.setUTCMonth(0,1),a.setUTCHours(0,0,0,0);var r=a.getTime(),e=t-r;return Math.floor(e/ar)+1}function le(o){E(1,arguments);var a=1,t=A(o),r=t.getUTCDay(),e=(r<a?7:0)+r-a;return t.setUTCDate(t.getUTCDate()-e),t.setUTCHours(0,0,0,0),t}function ut(o){E(1,arguments);var a=A(o),t=a.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(t+1,0,4),r.setUTCHours(0,0,0,0);var e=le(r),i=new Date(0);i.setUTCFullYear(t,0,4),i.setUTCHours(0,0,0,0);var n=le(i);return a.getTime()>=e.getTime()?t+1:a.getTime()>=n.getTime()?t:t-1}function ir(o){E(1,arguments);var a=ut(o),t=new Date(0);t.setUTCFullYear(a,0,4),t.setUTCHours(0,0,0,0);var r=le(t);return r}var or=6048e5;function st(o){E(1,arguments);var a=A(o),t=le(a).getTime()-ir(a).getTime();return Math.round(t/or)+1}function ie(o,a){var t,r,e,i,n,u,s,l;E(1,arguments);var d=ce(),m=L((t=(r=(e=(i=a==null?void 0:a.weekStartsOn)!==null&&i!==void 0?i:a==null||(n=a.locale)===null||n===void 0||(u=n.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&e!==void 0?e:d.weekStartsOn)!==null&&r!==void 0?r:(s=d.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&t!==void 0?t:0);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=A(o),v=h.getUTCDay(),D=(v<m?7:0)+v-m;return h.setUTCDate(h.getUTCDate()-D),h.setUTCHours(0,0,0,0),h}function _e(o,a){var t,r,e,i,n,u,s,l;E(1,arguments);var d=A(o),m=d.getUTCFullYear(),h=ce(),v=L((t=(r=(e=(i=a==null?void 0:a.firstWeekContainsDate)!==null&&i!==void 0?i:a==null||(n=a.locale)===null||n===void 0||(u=n.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&e!==void 0?e:h.firstWeekContainsDate)!==null&&r!==void 0?r:(s=h.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&t!==void 0?t:1);if(!(v>=1&&v<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var D=new Date(0);D.setUTCFullYear(m+1,0,v),D.setUTCHours(0,0,0,0);var $=ie(D,a),W=new Date(0);W.setUTCFullYear(m,0,v),W.setUTCHours(0,0,0,0);var U=ie(W,a);return d.getTime()>=$.getTime()?m+1:d.getTime()>=U.getTime()?m:m-1}function ur(o,a){var t,r,e,i,n,u,s,l;E(1,arguments);var d=ce(),m=L((t=(r=(e=(i=a==null?void 0:a.firstWeekContainsDate)!==null&&i!==void 0?i:a==null||(n=a.locale)===null||n===void 0||(u=n.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&e!==void 0?e:d.firstWeekContainsDate)!==null&&r!==void 0?r:(s=d.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&t!==void 0?t:1),h=_e(o,a),v=new Date(0);v.setUTCFullYear(h,0,m),v.setUTCHours(0,0,0,0);var D=ie(v,a);return D}var sr=6048e5;function lt(o,a){E(1,arguments);var t=A(o),r=ie(t,a).getTime()-ur(t,a).getTime();return Math.round(r/sr)+1}function T(o,a){for(var t=o<0?"-":"",r=Math.abs(o).toString();r.length<a;)r="0"+r;return t+r}var lr={y:function(a,t){var r=a.getUTCFullYear(),e=r>0?r:1-r;return T(t==="yy"?e%100:e,t.length)},M:function(a,t){var r=a.getUTCMonth();return t==="M"?String(r+1):T(r+1,2)},d:function(a,t){return T(a.getUTCDate(),t.length)},a:function(a,t){var r=a.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(a,t){return T(a.getUTCHours()%12||12,t.length)},H:function(a,t){return T(a.getUTCHours(),t.length)},m:function(a,t){return T(a.getUTCMinutes(),t.length)},s:function(a,t){return T(a.getUTCSeconds(),t.length)},S:function(a,t){var r=t.length,e=a.getUTCMilliseconds(),i=Math.floor(e*Math.pow(10,r-3));return T(i,t.length)}};const ee=lr;var oe={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},cr={G:function(a,t,r){var e=a.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(e,{width:"abbreviated"});case"GGGGG":return r.era(e,{width:"narrow"});case"GGGG":default:return r.era(e,{width:"wide"})}},y:function(a,t,r){if(t==="yo"){var e=a.getUTCFullYear(),i=e>0?e:1-e;return r.ordinalNumber(i,{unit:"year"})}return ee.y(a,t)},Y:function(a,t,r,e){var i=_e(a,e),n=i>0?i:1-i;if(t==="YY"){var u=n%100;return T(u,2)}return t==="Yo"?r.ordinalNumber(n,{unit:"year"}):T(n,t.length)},R:function(a,t){var r=ut(a);return T(r,t.length)},u:function(a,t){var r=a.getUTCFullYear();return T(r,t.length)},Q:function(a,t,r){var e=Math.ceil((a.getUTCMonth()+1)/3);switch(t){case"Q":return String(e);case"QQ":return T(e,2);case"Qo":return r.ordinalNumber(e,{unit:"quarter"});case"QQQ":return r.quarter(e,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(e,{width:"wide",context:"formatting"})}},q:function(a,t,r){var e=Math.ceil((a.getUTCMonth()+1)/3);switch(t){case"q":return String(e);case"qq":return T(e,2);case"qo":return r.ordinalNumber(e,{unit:"quarter"});case"qqq":return r.quarter(e,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(e,{width:"wide",context:"standalone"})}},M:function(a,t,r){var e=a.getUTCMonth();switch(t){case"M":case"MM":return ee.M(a,t);case"Mo":return r.ordinalNumber(e+1,{unit:"month"});case"MMM":return r.month(e,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(e,{width:"wide",context:"formatting"})}},L:function(a,t,r){var e=a.getUTCMonth();switch(t){case"L":return String(e+1);case"LL":return T(e+1,2);case"Lo":return r.ordinalNumber(e+1,{unit:"month"});case"LLL":return r.month(e,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(e,{width:"wide",context:"standalone"})}},w:function(a,t,r,e){var i=lt(a,e);return t==="wo"?r.ordinalNumber(i,{unit:"week"}):T(i,t.length)},I:function(a,t,r){var e=st(a);return t==="Io"?r.ordinalNumber(e,{unit:"week"}):T(e,t.length)},d:function(a,t,r){return t==="do"?r.ordinalNumber(a.getUTCDate(),{unit:"date"}):ee.d(a,t)},D:function(a,t,r){var e=nr(a);return t==="Do"?r.ordinalNumber(e,{unit:"dayOfYear"}):T(e,t.length)},E:function(a,t,r){var e=a.getUTCDay();switch(t){case"E":case"EE":case"EEE":return r.day(e,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(e,{width:"short",context:"formatting"});case"EEEE":default:return r.day(e,{width:"wide",context:"formatting"})}},e:function(a,t,r,e){var i=a.getUTCDay(),n=(i-e.weekStartsOn+8)%7||7;switch(t){case"e":return String(n);case"ee":return T(n,2);case"eo":return r.ordinalNumber(n,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(a,t,r,e){var i=a.getUTCDay(),n=(i-e.weekStartsOn+8)%7||7;switch(t){case"c":return String(n);case"cc":return T(n,t.length);case"co":return r.ordinalNumber(n,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(a,t,r){var e=a.getUTCDay(),i=e===0?7:e;switch(t){case"i":return String(i);case"ii":return T(i,t.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(e,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(e,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(e,{width:"short",context:"formatting"});case"iiii":default:return r.day(e,{width:"wide",context:"formatting"})}},a:function(a,t,r){var e=a.getUTCHours(),i=e/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(a,t,r){var e=a.getUTCHours(),i;switch(e===12?i=oe.noon:e===0?i=oe.midnight:i=e/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(a,t,r){var e=a.getUTCHours(),i;switch(e>=17?i=oe.evening:e>=12?i=oe.afternoon:e>=4?i=oe.morning:i=oe.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(a,t,r){if(t==="ho"){var e=a.getUTCHours()%12;return e===0&&(e=12),r.ordinalNumber(e,{unit:"hour"})}return ee.h(a,t)},H:function(a,t,r){return t==="Ho"?r.ordinalNumber(a.getUTCHours(),{unit:"hour"}):ee.H(a,t)},K:function(a,t,r){var e=a.getUTCHours()%12;return t==="Ko"?r.ordinalNumber(e,{unit:"hour"}):T(e,t.length)},k:function(a,t,r){var e=a.getUTCHours();return e===0&&(e=24),t==="ko"?r.ordinalNumber(e,{unit:"hour"}):T(e,t.length)},m:function(a,t,r){return t==="mo"?r.ordinalNumber(a.getUTCMinutes(),{unit:"minute"}):ee.m(a,t)},s:function(a,t,r){return t==="so"?r.ordinalNumber(a.getUTCSeconds(),{unit:"second"}):ee.s(a,t)},S:function(a,t){return ee.S(a,t)},X:function(a,t,r,e){var i=e._originalDate||a,n=i.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return Ge(n);case"XXXX":case"XX":return ne(n);case"XXXXX":case"XXX":default:return ne(n,":")}},x:function(a,t,r,e){var i=e._originalDate||a,n=i.getTimezoneOffset();switch(t){case"x":return Ge(n);case"xxxx":case"xx":return ne(n);case"xxxxx":case"xxx":default:return ne(n,":")}},O:function(a,t,r,e){var i=e._originalDate||a,n=i.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Xe(n,":");case"OOOO":default:return"GMT"+ne(n,":")}},z:function(a,t,r,e){var i=e._originalDate||a,n=i.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Xe(n,":");case"zzzz":default:return"GMT"+ne(n,":")}},t:function(a,t,r,e){var i=e._originalDate||a,n=Math.floor(i.getTime()/1e3);return T(n,t.length)},T:function(a,t,r,e){var i=e._originalDate||a,n=i.getTime();return T(n,t.length)}};function Xe(o,a){var t=o>0?"-":"+",r=Math.abs(o),e=Math.floor(r/60),i=r%60;if(i===0)return t+String(e);var n=a||"";return t+String(e)+n+T(i,2)}function Ge(o,a){if(o%60===0){var t=o>0?"-":"+";return t+T(Math.abs(o)/60,2)}return ne(o,a)}function ne(o,a){var t=a||"",r=o>0?"-":"+",e=Math.abs(o),i=T(Math.floor(e/60),2),n=T(e%60,2);return r+i+t+n}const dr=cr;var Ke=function(a,t){switch(a){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},ct=function(a,t){switch(a){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},fr=function(a,t){var r=a.match(/(P+)(p+)?/)||[],e=r[1],i=r[2];if(!i)return Ke(a,t);var n;switch(e){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;case"PPPP":default:n=t.dateTime({width:"full"});break}return n.replace("{{date}}",Ke(e,t)).replace("{{time}}",ct(i,t))},mr={p:ct,P:fr};const We=mr;var vr=["D","DD"],hr=["YY","YYYY"];function dt(o){return vr.indexOf(o)!==-1}function ft(o){return hr.indexOf(o)!==-1}function Me(o,a,t){if(o==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(a,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(o==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(a,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(o==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(a,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(o==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(a,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var gr={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},wr=function(a,t,r){var e,i=gr[a];return typeof i=="string"?e=i:t===1?e=i.one:e=i.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+e:e+" ago":e};const pr=wr;function se(o){return function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=a.width?String(a.width):o.defaultWidth,r=o.formats[t]||o.formats[o.defaultWidth];return r}}var yr={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},br={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Tr={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Dr={date:se({formats:yr,defaultWidth:"full"}),time:se({formats:br,defaultWidth:"full"}),dateTime:se({formats:Tr,defaultWidth:"full"})};const Mr=Dr;var Pr={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},kr=function(a,t,r,e){return Pr[a]};const Cr=kr;function j(o){return function(a,t){var r=t!=null&&t.context?String(t.context):"standalone",e;if(r==="formatting"&&o.formattingValues){var i=o.defaultFormattingWidth||o.defaultWidth,n=t!=null&&t.width?String(t.width):i;e=o.formattingValues[n]||o.formattingValues[i]}else{var u=o.defaultWidth,s=t!=null&&t.width?String(t.width):o.defaultWidth;e=o.values[s]||o.values[u]}var l=o.argumentCallback?o.argumentCallback(a):a;return e[l]}}var xr={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Or={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Er={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Ur={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},$r={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Wr={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Yr=function(a,t){var r=Number(a),e=r%100;if(e>20||e<10)switch(e%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},Nr={ordinalNumber:Yr,era:j({values:xr,defaultWidth:"wide"}),quarter:j({values:Or,defaultWidth:"wide",argumentCallback:function(a){return a-1}}),month:j({values:Er,defaultWidth:"wide"}),day:j({values:Ur,defaultWidth:"wide"}),dayPeriod:j({values:$r,defaultWidth:"wide",formattingValues:Wr,defaultFormattingWidth:"wide"})};const _r=Nr;function V(o){return function(a){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.width,e=r&&o.matchPatterns[r]||o.matchPatterns[o.defaultMatchWidth],i=a.match(e);if(!i)return null;var n=i[0],u=r&&o.parsePatterns[r]||o.parsePatterns[o.defaultParseWidth],s=Array.isArray(u)?Sr(u,function(m){return m.test(n)}):Ar(u,function(m){return m.test(n)}),l;l=o.valueCallback?o.valueCallback(s):s,l=t.valueCallback?t.valueCallback(l):l;var d=a.slice(n.length);return{value:l,rest:d}}}function Ar(o,a){for(var t in o)if(o.hasOwnProperty(t)&&a(o[t]))return t}function Sr(o,a){for(var t=0;t<o.length;t++)if(a(o[t]))return t}function mt(o){return function(a){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=a.match(o.matchPattern);if(!r)return null;var e=r[0],i=a.match(o.parsePattern);if(!i)return null;var n=o.valueCallback?o.valueCallback(i[0]):i[0];n=t.valueCallback?t.valueCallback(n):n;var u=a.slice(e.length);return{value:n,rest:u}}}var Lr=/^(\d+)(th|st|nd|rd)?/i,Rr=/\d+/i,Hr={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ir={any:[/^b/i,/^(a|c)/i]},qr={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Fr={any:[/1/i,/2/i,/3/i,/4/i]},Qr={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Br={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},jr={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Vr={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Xr={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Gr={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Kr={ordinalNumber:mt({matchPattern:Lr,parsePattern:Rr,valueCallback:function(a){return parseInt(a,10)}}),era:V({matchPatterns:Hr,defaultMatchWidth:"wide",parsePatterns:Ir,defaultParseWidth:"any"}),quarter:V({matchPatterns:qr,defaultMatchWidth:"wide",parsePatterns:Fr,defaultParseWidth:"any",valueCallback:function(a){return a+1}}),month:V({matchPatterns:Qr,defaultMatchWidth:"wide",parsePatterns:Br,defaultParseWidth:"any"}),day:V({matchPatterns:jr,defaultMatchWidth:"wide",parsePatterns:Vr,defaultParseWidth:"any"}),dayPeriod:V({matchPatterns:Xr,defaultMatchWidth:"any",parsePatterns:Gr,defaultParseWidth:"any"})};const Jr=Kr;var zr={code:"en-US",formatDistance:pr,formatLong:Mr,formatRelative:Cr,localize:_r,match:Jr,options:{weekStartsOn:0,firstWeekContainsDate:1}};const vt=zr;var Zr=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ea=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ta=/^'([^]*?)'?$/,ra=/''/g,aa=/[a-zA-Z]/;function te(o,a,t){var r,e,i,n,u,s,l,d,m,h,v,D,$,W,U,Y,H,I;E(2,arguments);var de=String(a),S=ce(),Q=(r=(e=t==null?void 0:t.locale)!==null&&e!==void 0?e:S.locale)!==null&&r!==void 0?r:vt,K=L((i=(n=(u=(s=t==null?void 0:t.firstWeekContainsDate)!==null&&s!==void 0?s:t==null||(l=t.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&u!==void 0?u:S.firstWeekContainsDate)!==null&&n!==void 0?n:(m=S.locale)===null||m===void 0||(h=m.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(K>=1&&K<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var z=L((v=(D=($=(W=t==null?void 0:t.weekStartsOn)!==null&&W!==void 0?W:t==null||(U=t.locale)===null||U===void 0||(Y=U.options)===null||Y===void 0?void 0:Y.weekStartsOn)!==null&&$!==void 0?$:S.weekStartsOn)!==null&&D!==void 0?D:(H=S.locale)===null||H===void 0||(I=H.options)===null||I===void 0?void 0:I.weekStartsOn)!==null&&v!==void 0?v:0);if(!(z>=0&&z<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!Q.localize)throw new RangeError("locale must contain localize property");if(!Q.formatLong)throw new RangeError("locale must contain formatLong property");var Z=A(o);if(!$e(Z))throw new RangeError("Invalid time value");var fe=it(Z),me=ot(Z,fe),ve={firstWeekContainsDate:K,weekStartsOn:z,locale:Q,_originalDate:Z},Ce=de.match(ea).map(function(_){var R=_[0];if(R==="p"||R==="P"){var ae=We[R];return ae(_,Q.formatLong)}return _}).join("").match(Zr).map(function(_){if(_==="''")return"'";var R=_[0];if(R==="'")return na(_);var ae=dr[R];if(ae)return!(t!=null&&t.useAdditionalWeekYearTokens)&&ft(_)&&Me(_,a,String(o)),!(t!=null&&t.useAdditionalDayOfYearTokens)&&dt(_)&&Me(_,a,String(o)),ae(me,_,Q.localize,ve);if(R.match(aa))throw new RangeError("Format string contains an unescaped latin alphabet character `"+R+"`");return _}).join("");return Ce}function na(o){var a=o.match(ta);return a?a[1].replace(ra,"'"):o}function ia(o,a){if(o==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var t in a)Object.prototype.hasOwnProperty.call(a,t)&&(o[t]=a[t]);return o}function Je(o,a){(a==null||a>o.length)&&(a=o.length);for(var t=0,r=new Array(a);t<a;t++)r[t]=o[t];return r}function oa(o,a){if(o){if(typeof o=="string")return Je(o,a);var t=Object.prototype.toString.call(o).slice(8,-1);if(t==="Object"&&o.constructor&&(t=o.constructor.name),t==="Map"||t==="Set")return Array.from(o);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Je(o,a)}}function ze(o,a){var t=typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(!t){if(Array.isArray(o)||(t=oa(o))||a&&o&&typeof o.length=="number"){t&&(o=t);var r=0,e=function(){};return{s:e,n:function(){return r>=o.length?{done:!0}:{done:!1,value:o[r++]}},e:function(l){throw l},f:e}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,n=!1,u;return{s:function(){t=t.call(o)},n:function(){var l=t.next();return i=l.done,l},e:function(l){n=!0,u=l},f:function(){try{!i&&t.return!=null&&t.return()}finally{if(n)throw u}}}}function f(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}function Ye(o,a){return Ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,e){return r.__proto__=e,r},Ye(o,a)}function p(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),a&&Ye(o,a)}function Pe(o){return Pe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Pe(o)}function ua(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function sa(o,a){if(a&&(J(a)==="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f(o)}function y(o){var a=ua();return function(){var r=Pe(o),e;if(a){var i=Pe(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return sa(this,e)}}function g(o,a){if(!(o instanceof a))throw new TypeError("Cannot call a class as a function")}function la(o,a){if(J(o)!=="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,a||"default");if(J(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(o)}function ht(o){var a=la(o,"string");return J(a)==="symbol"?a:String(a)}function Ze(o,a){for(var t=0;t<a.length;t++){var r=a[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(o,ht(r.key),r)}}function w(o,a,t){return a&&Ze(o.prototype,a),t&&Ze(o,t),Object.defineProperty(o,"prototype",{writable:!1}),o}function c(o,a,t){return a=ht(a),a in o?Object.defineProperty(o,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[a]=t,o}var ca=10,gt=function(){function o(){g(this,o),c(this,"priority",void 0),c(this,"subPriority",0)}return w(o,[{key:"validate",value:function(t,r){return!0}}]),o}(),da=function(o){p(t,o);var a=y(t);function t(r,e,i,n,u){var s;return g(this,t),s=a.call(this),s.value=r,s.validateValue=e,s.setValue=i,s.priority=n,u&&(s.subPriority=u),s}return w(t,[{key:"validate",value:function(e,i){return this.validateValue(e,this.value,i)}},{key:"set",value:function(e,i,n){return this.setValue(e,i,this.value,n)}}]),t}(gt),fa=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",ca),c(f(r),"subPriority",-1),r}return w(t,[{key:"set",value:function(e,i){if(i.timestampIsSet)return e;var n=new Date(0);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}}]),t}(gt),b=function(){function o(){g(this,o),c(this,"incompatibleTokens",void 0),c(this,"priority",void 0),c(this,"subPriority",void 0)}return w(o,[{key:"run",value:function(t,r,e,i){var n=this.parse(t,r,e,i);return n?{setter:new da(n.value,this.validate,this.set,this.priority,this.subPriority),rest:n.rest}:null}},{key:"validate",value:function(t,r,e){return!0}}]),o}(),ma=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",140),c(f(r),"incompatibleTokens",["R","u","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});case"GGGG":default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}},{key:"set",value:function(e,i,n){return i.era=n,e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e}}]),t}(b),x={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},X={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function O(o,a){return o&&{value:a(o.value),rest:o.rest}}function k(o,a){var t=a.match(o);return t?{value:parseInt(t[0],10),rest:a.slice(t[0].length)}:null}function G(o,a){var t=a.match(o);if(!t)return null;if(t[0]==="Z")return{value:0,rest:a.slice(1)};var r=t[1]==="+"?1:-1,e=t[2]?parseInt(t[2],10):0,i=t[3]?parseInt(t[3],10):0,n=t[5]?parseInt(t[5],10):0;return{value:r*(e*er+i*Zt+n*tr),rest:a.slice(t[0].length)}}function wt(o){return k(x.anyDigitsSigned,o)}function C(o,a){switch(o){case 1:return k(x.singleDigit,a);case 2:return k(x.twoDigits,a);case 3:return k(x.threeDigits,a);case 4:return k(x.fourDigits,a);default:return k(new RegExp("^\\d{1,"+o+"}"),a)}}function ke(o,a){switch(o){case 1:return k(x.singleDigitSigned,a);case 2:return k(x.twoDigitsSigned,a);case 3:return k(x.threeDigitsSigned,a);case 4:return k(x.fourDigitsSigned,a);default:return k(new RegExp("^-?\\d{1,"+o+"}"),a)}}function Ae(o){switch(o){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function pt(o,a){var t=a>0,r=t?a:1-a,e;if(r<=50)e=o||100;else{var i=r+50,n=Math.floor(i/100)*100,u=o>=i%100;e=o+n-(u?100:0)}return t?e:1-e}function yt(o){return o%400===0||o%4===0&&o%100!==0}var va=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",130),c(f(r),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){var u=function(l){return{year:l,isTwoDigitYear:i==="yy"}};switch(i){case"y":return O(C(4,e),u);case"yo":return O(n.ordinalNumber(e,{unit:"year"}),u);default:return O(C(i.length,e),u)}}},{key:"validate",value:function(e,i){return i.isTwoDigitYear||i.year>0}},{key:"set",value:function(e,i,n){var u=e.getUTCFullYear();if(n.isTwoDigitYear){var s=pt(n.year,u);return e.setUTCFullYear(s,0,1),e.setUTCHours(0,0,0,0),e}var l=!("era"in i)||i.era===1?n.year:1-n.year;return e.setUTCFullYear(l,0,1),e.setUTCHours(0,0,0,0),e}}]),t}(b),ha=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",130),c(f(r),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){var u=function(l){return{year:l,isTwoDigitYear:i==="YY"}};switch(i){case"Y":return O(C(4,e),u);case"Yo":return O(n.ordinalNumber(e,{unit:"year"}),u);default:return O(C(i.length,e),u)}}},{key:"validate",value:function(e,i){return i.isTwoDigitYear||i.year>0}},{key:"set",value:function(e,i,n,u){var s=_e(e,u);if(n.isTwoDigitYear){var l=pt(n.year,s);return e.setUTCFullYear(l,0,u.firstWeekContainsDate),e.setUTCHours(0,0,0,0),ie(e,u)}var d=!("era"in i)||i.era===1?n.year:1-n.year;return e.setUTCFullYear(d,0,u.firstWeekContainsDate),e.setUTCHours(0,0,0,0),ie(e,u)}}]),t}(b),ga=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",130),c(f(r),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),r}return w(t,[{key:"parse",value:function(e,i){return ke(i==="R"?4:i.length,e)}},{key:"set",value:function(e,i,n){var u=new Date(0);return u.setUTCFullYear(n,0,4),u.setUTCHours(0,0,0,0),le(u)}}]),t}(b),wa=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",130),c(f(r),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),r}return w(t,[{key:"parse",value:function(e,i){return ke(i==="u"?4:i.length,e)}},{key:"set",value:function(e,i,n){return e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e}}]),t}(b),pa=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",120),c(f(r),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"Q":case"QQ":return C(i.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,i){return i>=1&&i<=4}},{key:"set",value:function(e,i,n){return e.setUTCMonth((n-1)*3,1),e.setUTCHours(0,0,0,0),e}}]),t}(b),ya=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",120),c(f(r),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"q":case"qq":return C(i.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,i){return i>=1&&i<=4}},{key:"set",value:function(e,i,n){return e.setUTCMonth((n-1)*3,1),e.setUTCHours(0,0,0,0),e}}]),t}(b),ba=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),c(f(r),"priority",110),r}return w(t,[{key:"parse",value:function(e,i,n){var u=function(l){return l-1};switch(i){case"M":return O(k(x.month,e),u);case"MM":return O(C(2,e),u);case"Mo":return O(n.ordinalNumber(e,{unit:"month"}),u);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,i){return i>=0&&i<=11}},{key:"set",value:function(e,i,n){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e}}]),t}(b),Ta=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",110),c(f(r),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){var u=function(l){return l-1};switch(i){case"L":return O(k(x.month,e),u);case"LL":return O(C(2,e),u);case"Lo":return O(n.ordinalNumber(e,{unit:"month"}),u);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,i){return i>=0&&i<=11}},{key:"set",value:function(e,i,n){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e}}]),t}(b);function Da(o,a,t){E(2,arguments);var r=A(o),e=L(a),i=lt(r,t)-e;return r.setUTCDate(r.getUTCDate()-i*7),r}var Ma=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",100),c(f(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"w":return k(x.week,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return C(i.length,e)}}},{key:"validate",value:function(e,i){return i>=1&&i<=53}},{key:"set",value:function(e,i,n,u){return ie(Da(e,n,u),u)}}]),t}(b);function Pa(o,a){E(2,arguments);var t=A(o),r=L(a),e=st(t)-r;return t.setUTCDate(t.getUTCDate()-e*7),t}var ka=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",100),c(f(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"I":return k(x.week,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return C(i.length,e)}}},{key:"validate",value:function(e,i){return i>=1&&i<=53}},{key:"set",value:function(e,i,n){return le(Pa(e,n))}}]),t}(b),Ca=[31,28,31,30,31,30,31,31,30,31,30,31],xa=[31,29,31,30,31,30,31,31,30,31,30,31],Oa=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",90),c(f(r),"subPriority",1),c(f(r),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"d":return k(x.date,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return C(i.length,e)}}},{key:"validate",value:function(e,i){var n=e.getUTCFullYear(),u=yt(n),s=e.getUTCMonth();return u?i>=1&&i<=xa[s]:i>=1&&i<=Ca[s]}},{key:"set",value:function(e,i,n){return e.setUTCDate(n),e.setUTCHours(0,0,0,0),e}}]),t}(b),Ea=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",90),c(f(r),"subpriority",1),c(f(r),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"D":case"DD":return k(x.dayOfYear,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return C(i.length,e)}}},{key:"validate",value:function(e,i){var n=e.getUTCFullYear(),u=yt(n);return u?i>=1&&i<=366:i>=1&&i<=365}},{key:"set",value:function(e,i,n){return e.setUTCMonth(0,n),e.setUTCHours(0,0,0,0),e}}]),t}(b);function Se(o,a,t){var r,e,i,n,u,s,l,d;E(2,arguments);var m=ce(),h=L((r=(e=(i=(n=t==null?void 0:t.weekStartsOn)!==null&&n!==void 0?n:t==null||(u=t.locale)===null||u===void 0||(s=u.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:m.weekStartsOn)!==null&&e!==void 0?e:(l=m.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&r!==void 0?r:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var v=A(o),D=L(a),$=v.getUTCDay(),W=D%7,U=(W+7)%7,Y=(U<h?7:0)+D-$;return v.setUTCDate(v.getUTCDate()+Y),v}var Ua=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",90),c(f(r),"incompatibleTokens",["D","i","e","c","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,i){return i>=0&&i<=6}},{key:"set",value:function(e,i,n,u){return e=Se(e,n,u),e.setUTCHours(0,0,0,0),e}}]),t}(b),$a=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",90),c(f(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n,u){var s=function(d){var m=Math.floor((d-1)/7)*7;return(d+u.weekStartsOn+6)%7+m};switch(i){case"e":case"ee":return O(C(i.length,e),s);case"eo":return O(n.ordinalNumber(e,{unit:"day"}),s);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,i){return i>=0&&i<=6}},{key:"set",value:function(e,i,n,u){return e=Se(e,n,u),e.setUTCHours(0,0,0,0),e}}]),t}(b),Wa=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",90),c(f(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n,u){var s=function(d){var m=Math.floor((d-1)/7)*7;return(d+u.weekStartsOn+6)%7+m};switch(i){case"c":case"cc":return O(C(i.length,e),s);case"co":return O(n.ordinalNumber(e,{unit:"day"}),s);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,i){return i>=0&&i<=6}},{key:"set",value:function(e,i,n,u){return e=Se(e,n,u),e.setUTCHours(0,0,0,0),e}}]),t}(b);function Ya(o,a){E(2,arguments);var t=L(a);t%7===0&&(t=t-7);var r=1,e=A(o),i=e.getUTCDay(),n=t%7,u=(n+7)%7,s=(u<r?7:0)+t-i;return e.setUTCDate(e.getUTCDate()+s),e}var Na=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",90),c(f(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){var u=function(l){return l===0?7:l};switch(i){case"i":case"ii":return C(i.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return O(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),u);case"iiiii":return O(n.day(e,{width:"narrow",context:"formatting"}),u);case"iiiiii":return O(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),u);case"iiii":default:return O(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),u)}}},{key:"validate",value:function(e,i){return i>=1&&i<=7}},{key:"set",value:function(e,i,n){return e=Ya(e,n),e.setUTCHours(0,0,0,0),e}}]),t}(b),_a=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",80),c(f(r),"incompatibleTokens",["b","B","H","k","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,i,n){return e.setUTCHours(Ae(n),0,0,0),e}}]),t}(b),Aa=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",80),c(f(r),"incompatibleTokens",["a","B","H","k","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,i,n){return e.setUTCHours(Ae(n),0,0,0),e}}]),t}(b),Sa=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",80),c(f(r),"incompatibleTokens",["a","b","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,i,n){return e.setUTCHours(Ae(n),0,0,0),e}}]),t}(b),La=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",70),c(f(r),"incompatibleTokens",["H","K","k","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"h":return k(x.hour12h,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return C(i.length,e)}}},{key:"validate",value:function(e,i){return i>=1&&i<=12}},{key:"set",value:function(e,i,n){var u=e.getUTCHours()>=12;return u&&n<12?e.setUTCHours(n+12,0,0,0):!u&&n===12?e.setUTCHours(0,0,0,0):e.setUTCHours(n,0,0,0),e}}]),t}(b),Ra=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",70),c(f(r),"incompatibleTokens",["a","b","h","K","k","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"H":return k(x.hour23h,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return C(i.length,e)}}},{key:"validate",value:function(e,i){return i>=0&&i<=23}},{key:"set",value:function(e,i,n){return e.setUTCHours(n,0,0,0),e}}]),t}(b),Ha=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",70),c(f(r),"incompatibleTokens",["h","H","k","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"K":return k(x.hour11h,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return C(i.length,e)}}},{key:"validate",value:function(e,i){return i>=0&&i<=11}},{key:"set",value:function(e,i,n){var u=e.getUTCHours()>=12;return u&&n<12?e.setUTCHours(n+12,0,0,0):e.setUTCHours(n,0,0,0),e}}]),t}(b),Ia=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",70),c(f(r),"incompatibleTokens",["a","b","h","H","K","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"k":return k(x.hour24h,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return C(i.length,e)}}},{key:"validate",value:function(e,i){return i>=1&&i<=24}},{key:"set",value:function(e,i,n){var u=n<=24?n%24:n;return e.setUTCHours(u,0,0,0),e}}]),t}(b),qa=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",60),c(f(r),"incompatibleTokens",["t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"m":return k(x.minute,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return C(i.length,e)}}},{key:"validate",value:function(e,i){return i>=0&&i<=59}},{key:"set",value:function(e,i,n){return e.setUTCMinutes(n,0,0),e}}]),t}(b),Fa=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",50),c(f(r),"incompatibleTokens",["t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"s":return k(x.second,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return C(i.length,e)}}},{key:"validate",value:function(e,i){return i>=0&&i<=59}},{key:"set",value:function(e,i,n){return e.setUTCSeconds(n,0),e}}]),t}(b),Qa=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",30),c(f(r),"incompatibleTokens",["t","T"]),r}return w(t,[{key:"parse",value:function(e,i){var n=function(s){return Math.floor(s*Math.pow(10,-i.length+3))};return O(C(i.length,e),n)}},{key:"set",value:function(e,i,n){return e.setUTCMilliseconds(n),e}}]),t}(b),Ba=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",10),c(f(r),"incompatibleTokens",["t","T","x"]),r}return w(t,[{key:"parse",value:function(e,i){switch(i){case"X":return G(X.basicOptionalMinutes,e);case"XX":return G(X.basic,e);case"XXXX":return G(X.basicOptionalSeconds,e);case"XXXXX":return G(X.extendedOptionalSeconds,e);case"XXX":default:return G(X.extended,e)}}},{key:"set",value:function(e,i,n){return i.timestampIsSet?e:new Date(e.getTime()-n)}}]),t}(b),ja=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",10),c(f(r),"incompatibleTokens",["t","T","X"]),r}return w(t,[{key:"parse",value:function(e,i){switch(i){case"x":return G(X.basicOptionalMinutes,e);case"xx":return G(X.basic,e);case"xxxx":return G(X.basicOptionalSeconds,e);case"xxxxx":return G(X.extendedOptionalSeconds,e);case"xxx":default:return G(X.extended,e)}}},{key:"set",value:function(e,i,n){return i.timestampIsSet?e:new Date(e.getTime()-n)}}]),t}(b),Va=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",40),c(f(r),"incompatibleTokens","*"),r}return w(t,[{key:"parse",value:function(e){return wt(e)}},{key:"set",value:function(e,i,n){return[new Date(n*1e3),{timestampIsSet:!0}]}}]),t}(b),Xa=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",20),c(f(r),"incompatibleTokens","*"),r}return w(t,[{key:"parse",value:function(e){return wt(e)}},{key:"set",value:function(e,i,n){return[new Date(n),{timestampIsSet:!0}]}}]),t}(b),Ga={G:new ma,y:new va,Y:new ha,R:new ga,u:new wa,Q:new pa,q:new ya,M:new ba,L:new Ta,w:new Ma,I:new ka,d:new Oa,D:new Ea,E:new Ua,e:new $a,c:new Wa,i:new Na,a:new _a,b:new Aa,B:new Sa,h:new La,H:new Ra,K:new Ha,k:new Ia,m:new qa,s:new Fa,S:new Qa,X:new Ba,x:new ja,t:new Va,T:new Xa},Ka=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ja=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,za=/^'([^]*?)'?$/,Za=/''/g,en=/\S/,tn=/[a-zA-Z]/;function et(o,a,t,r){var e,i,n,u,s,l,d,m,h,v,D,$,W,U,Y,H,I,de;E(3,arguments);var S=String(o),Q=String(a),K=ce(),z=(e=(i=r==null?void 0:r.locale)!==null&&i!==void 0?i:K.locale)!==null&&e!==void 0?e:vt;if(!z.match)throw new RangeError("locale must contain match property");var Z=L((n=(u=(s=(l=r==null?void 0:r.firstWeekContainsDate)!==null&&l!==void 0?l:r==null||(d=r.locale)===null||d===void 0||(m=d.options)===null||m===void 0?void 0:m.firstWeekContainsDate)!==null&&s!==void 0?s:K.firstWeekContainsDate)!==null&&u!==void 0?u:(h=K.locale)===null||h===void 0||(v=h.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&n!==void 0?n:1);if(!(Z>=1&&Z<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var fe=L((D=($=(W=(U=r==null?void 0:r.weekStartsOn)!==null&&U!==void 0?U:r==null||(Y=r.locale)===null||Y===void 0||(H=Y.options)===null||H===void 0?void 0:H.weekStartsOn)!==null&&W!==void 0?W:K.weekStartsOn)!==null&&$!==void 0?$:(I=K.locale)===null||I===void 0||(de=I.options)===null||de===void 0?void 0:de.weekStartsOn)!==null&&D!==void 0?D:0);if(!(fe>=0&&fe<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(Q==="")return S===""?A(t):new Date(NaN);var me={firstWeekContainsDate:Z,weekStartsOn:fe,locale:z},ve=[new fa],Ce=Q.match(Ja).map(function(N){var M=N[0];if(M in We){var q=We[M];return q(N,z.formatLong)}return N}).join("").match(Ka),_=[],R=ze(Ce),ae;try{var bt=function(){var M=ae.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&ft(M)&&Me(M,Q,o),!(r!=null&&r.useAdditionalDayOfYearTokens)&&dt(M)&&Me(M,Q,o);var q=M[0],pe=Ga[q];if(pe){var qe=pe.incompatibleTokens;if(Array.isArray(qe)){var Fe=_.find(function(Qe){return qe.includes(Qe.token)||Qe.token===q});if(Fe)throw new RangeError("The format string mustn't contain `".concat(Fe.fullToken,"` and `").concat(M,"` at the same time"))}else if(pe.incompatibleTokens==="*"&&_.length>0)throw new RangeError("The format string mustn't contain `".concat(M,"` and any other token at the same time"));_.push({token:q,fullToken:M});var Oe=pe.run(S,M,z.match,me);if(!Oe)return{v:new Date(NaN)};ve.push(Oe.setter),S=Oe.rest}else{if(q.match(tn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+q+"`");if(M==="''"?M="'":q==="'"&&(M=rn(M)),S.indexOf(M)===0)S=S.slice(M.length);else return{v:new Date(NaN)}}};for(R.s();!(ae=R.n()).done;){var Le=bt();if(J(Le)==="object")return Le.v}}catch(N){R.e(N)}finally{R.f()}if(S.length>0&&en.test(S))return new Date(NaN);var Tt=ve.map(function(N){return N.priority}).sort(function(N,M){return M-N}).filter(function(N,M,q){return q.indexOf(N)===M}).map(function(N){return ve.filter(function(M){return M.priority===N}).sort(function(M,q){return q.subPriority-M.subPriority})}).map(function(N){return N[0]}),xe=A(t);if(isNaN(xe.getTime()))return new Date(NaN);var he=ot(xe,it(xe)),Re={},ge=ze(Tt),He;try{for(ge.s();!(He=ge.n()).done;){var Ie=He.value;if(!Ie.validate(he,me))return new Date(NaN);var we=Ie.set(he,Re,me);Array.isArray(we)?(he=we[0],ia(Re,we[1])):he=we}}catch(N){ge.e(N)}finally{ge.f()}return he}function rn(o){return o.match(za)[1].replace(Za,"'")}var an={lessThanXSeconds:{one:"kurang dari 1 detik",other:"kurang dari {{count}} detik"},xSeconds:{one:"1 detik",other:"{{count}} detik"},halfAMinute:"setengah menit",lessThanXMinutes:{one:"kurang dari 1 menit",other:"kurang dari {{count}} menit"},xMinutes:{one:"1 menit",other:"{{count}} menit"},aboutXHours:{one:"sekitar 1 jam",other:"sekitar {{count}} jam"},xHours:{one:"1 jam",other:"{{count}} jam"},xDays:{one:"1 hari",other:"{{count}} hari"},aboutXWeeks:{one:"sekitar 1 minggu",other:"sekitar {{count}} minggu"},xWeeks:{one:"1 minggu",other:"{{count}} minggu"},aboutXMonths:{one:"sekitar 1 bulan",other:"sekitar {{count}} bulan"},xMonths:{one:"1 bulan",other:"{{count}} bulan"},aboutXYears:{one:"sekitar 1 tahun",other:"sekitar {{count}} tahun"},xYears:{one:"1 tahun",other:"{{count}} tahun"},overXYears:{one:"lebih dari 1 tahun",other:"lebih dari {{count}} tahun"},almostXYears:{one:"hampir 1 tahun",other:"hampir {{count}} tahun"}},nn=function(a,t,r){var e,i=an[a];return typeof i=="string"?e=i:t===1?e=i.one:e=i.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"dalam waktu "+e:e+" yang lalu":e};const on=nn;var un={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"d/M/yyyy"},sn={full:"HH.mm.ss",long:"HH.mm.ss",medium:"HH.mm",short:"HH.mm"},ln={full:"{{date}} 'pukul' {{time}}",long:"{{date}} 'pukul' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},cn={date:se({formats:un,defaultWidth:"full"}),time:se({formats:sn,defaultWidth:"full"}),dateTime:se({formats:ln,defaultWidth:"full"})};const dn=cn;var fn={lastWeek:"eeee 'lalu pukul' p",yesterday:"'Kemarin pukul' p",today:"'Hari ini pukul' p",tomorrow:"'Besok pukul' p",nextWeek:"eeee 'pukul' p",other:"P"},mn=function(a,t,r,e){return fn[a]};const vn=mn;var hn={narrow:["SM","M"],abbreviated:["SM","M"],wide:["Sebelum Masehi","Masehi"]},gn={narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["Kuartal ke-1","Kuartal ke-2","Kuartal ke-3","Kuartal ke-4"]},wn={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agt","Sep","Okt","Nov","Des"],wide:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"]},pn={narrow:["M","S","S","R","K","J","S"],short:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],abbreviated:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],wide:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"]},yn={narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},bn={narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},Tn=function(a,t){var r=Number(a);return"ke-"+r},Dn={ordinalNumber:Tn,era:j({values:hn,defaultWidth:"wide"}),quarter:j({values:gn,defaultWidth:"wide",argumentCallback:function(a){return a-1}}),month:j({values:wn,defaultWidth:"wide"}),day:j({values:pn,defaultWidth:"wide"}),dayPeriod:j({values:yn,defaultWidth:"wide",formattingValues:bn,defaultFormattingWidth:"wide"})};const Mn=Dn;var Pn=/^ke-(\d+)?/i,kn=/\d+/i,Cn={narrow:/^(sm|m)/i,abbreviated:/^(s\.?\s?m\.?|s\.?\s?e\.?\s?u\.?|m\.?|e\.?\s?u\.?)/i,wide:/^(sebelum masehi|sebelum era umum|masehi|era umum)/i},xn={any:[/^s/i,/^(m|e)/i]},On={narrow:/^[1234]/i,abbreviated:/^K-?\s[1234]/i,wide:/^Kuartal ke-?\s?[1234]/i},En={any:[/1/i,/2/i,/3/i,/4/i]},Un={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|mei|jun|jul|agt|sep|okt|nov|des)/i,wide:/^(januari|februari|maret|april|mei|juni|juli|agustus|september|oktober|november|desember)/i},$n={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^ma/i,/^ap/i,/^me/i,/^jun/i,/^jul/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},Wn={narrow:/^[srkjm]/i,short:/^(min|sen|sel|rab|kam|jum|sab)/i,abbreviated:/^(min|sen|sel|rab|kam|jum|sab)/i,wide:/^(minggu|senin|selasa|rabu|kamis|jumat|sabtu)/i},Yn={narrow:[/^m/i,/^s/i,/^s/i,/^r/i,/^k/i,/^j/i,/^s/i],any:[/^m/i,/^sen/i,/^sel/i,/^r/i,/^k/i,/^j/i,/^sa/i]},Nn={narrow:/^(a|p|tengah m|tengah h|(di(\swaktu)?) (pagi|siang|sore|malam))/i,any:/^([ap]\.?\s?m\.?|tengah malam|tengah hari|(di(\swaktu)?) (pagi|siang|sore|malam))/i},_n={any:{am:/^a/i,pm:/^pm/i,midnight:/^tengah m/i,noon:/^tengah h/i,morning:/pagi/i,afternoon:/siang/i,evening:/sore/i,night:/malam/i}},An={ordinalNumber:mt({matchPattern:Pn,parsePattern:kn,valueCallback:function(a){return parseInt(a,10)}}),era:V({matchPatterns:Cn,defaultMatchWidth:"wide",parsePatterns:xn,defaultParseWidth:"any"}),quarter:V({matchPatterns:On,defaultMatchWidth:"wide",parsePatterns:En,defaultParseWidth:"any",valueCallback:function(a){return a+1}}),month:V({matchPatterns:Un,defaultMatchWidth:"wide",parsePatterns:$n,defaultParseWidth:"any"}),day:V({matchPatterns:Wn,defaultMatchWidth:"wide",parsePatterns:Yn,defaultParseWidth:"any"}),dayPeriod:V({matchPatterns:Nn,defaultMatchWidth:"any",parsePatterns:_n,defaultParseWidth:"any"})};const Sn=An;var Ln={code:"id",formatDistance:on,formatLong:dn,formatRelative:vn,localize:Mn,match:Sn,options:{weekStartsOn:1,firstWeekContainsDate:1}};const re=Ln;function Rn(o){let a="";const{dateStart:t,dateEnd:r}=o,e=$e(et(t,"yyyy-MM-dd HH:mm",new Date)),i=$e(et(r,"yyyy-MM-dd HH:mm",new Date));if(e&&i){const n=t.split(" "),u=n[0].split("-"),s=u[0],l=u[1],d=r.split(" "),m=d[0].split("-"),h=m[0],v=m[1];n[0]===d[0]?a=`Voucher hanya berlaku di tanggal ${te(new Date(t),"d MMM yyyy",{locale:re})}.`:s!==h?a=`Voucher berlaku dari ${te(new Date(t),"d MMM yyyy",{locale:re})} - ${te(new Date(r),"d MMM yyyy",{locale:re})}.`:s===h&&(l===v?a=`Voucher berlaku dari ${te(new Date(t),"d",{locale:re})} - ${te(new Date(r),"d MMM yyyy",{locale:re})}.`:a=`Voucher berlaku dari ${te(new Date(t),"d MMM",{locale:re})} - ${te(new Date(r),"d MMM yyyy",{locale:re})}.`)}else e&&!i&&(a=`Voucher berlaku dari ${te(new Date(t),"d MMM yyyy",{locale:re})}.`);return a}function Hn(o){let a="";const{type:t,discountType:r,discountValue:e,isCheckedMaxFee:i,maxDiscountAmount:n,transactionTerms:u,termsMinTotalAmount:s,termsMinQty:l,limitFee:d}=o,m=U=>typeof U=="number"?U:Number.isNaN(Number(U))?0:Number(U),h=ue({value:m(n),prefix:"Rp"}),v=ue({value:m(e),prefix:"Rp"}),D=ue({value:m(d),prefix:"Rp"}),$=ue({value:m(s),prefix:"Rp"}),W=ue({value:m(l)});switch(t===B.product||t===B.order||t===B.gift?r===De.percentage&&t!==B.gift?(a=`Diskon ${e||0}%`,i&&(a+=` (hingga ${h})`)):r===De.amount&&t!==B.gift?a=`Potongan ${v}`:a=`Potongan ${D}`:t===B.freeShipping?(a="Shipping fee ditanggung oleh voilà.id",i&&(a+=` (hingga ${D})`)):t===B.freeInsurance&&(a="Insurance fee ditanggung oleh voilà.id",i&&(a+=` (hingga ${D})`)),u){case 0:a+=" tanpa minimum pembelian.";break;case 1:a+=` dengan min. pembelian ${$}.`;break;case 2:a+=` dengan min. pembelian ${l?W:0} item.`;break;default:a+=""}return a}const In=o=>{const a=[],{dateEnd:t,dateStart:r,type:e,discountType:i,discountValue:n,isCheckedMaxFee:u,maxDiscountAmount:s,transactionTerms:l,termsMinTotalAmount:d,termsMinQty:m,limitFee:h,collections:v,brands:D,eligibilityType:$,isOneTimeUsage:W,quota:U}=o,Y=Rn({dateStart:r,dateEnd:t}),H=Kt({type:e,collections:v,brands:D,eligibilityType:$}),I=Hn({type:e,discountType:i,discountValue:n,isCheckedMaxFee:u,maxDiscountAmount:s,transactionTerms:l,termsMinTotalAmount:d,termsMinQty:m,limitFee:h});return Y&&a.push(Y),I&&a.push(I),H&&a.push(H),W&&a.push("Voucher hanya dapat digunakan 1x per member selama masa berlaku."),U>0&&a.push("Kuota voucher terbatas."),a},qn=In;exports.DiscountType=De;exports.VoucherType=B;exports.canUseDOM=rt;exports.getOwnerDocument=Ne;exports.isBrowser=at;exports.isElement=tt;exports.isValidEvent=be;exports.useCallbackRef=Te;exports.useClipboard=Ut;exports.useDebounce=Wt;exports.useDimensions=Ht;exports.useDisclosure=qt;exports.useMediaQuery=Qt;exports.useNumberFormatter=ue;exports.useOnlineStatus=Vt;exports.useOutsideClick=Gt;exports.useSafeLayoutEffect=nt;exports.useVoucherTnc=qn;
|