react-timezone-range-picker 0.1.2 → 0.1.4
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/AroundTimePanel/index.d.ts.map +1 -1
- package/dist/Footer/index.d.ts.map +1 -1
- package/dist/RelativeTimePanel/index.d.ts.map +1 -1
- package/dist/Sidebar/index.d.ts +1 -0
- package/dist/Sidebar/index.d.ts.map +1 -1
- package/dist/StartEndTimePanel/index.d.ts.map +1 -1
- package/dist/TimezonePanel/components/TimezoneList/index.d.ts.map +1 -1
- package/dist/TimezonePanel/index.d.ts.map +1 -1
- package/dist/TimezoneRangePicker/index.d.ts +1 -0
- package/dist/TimezoneRangePicker/index.d.ts.map +1 -1
- package/dist/index.cjs.js +12 -12
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +1310 -1202
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/util/dateTime.d.ts +6 -3
- package/dist/util/dateTime.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/AroundTimePanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAM3B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/AroundTimePanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAM3B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAOxC,UAAU,gBAAgB;IACxB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,QAAA,MAAM,eAAe,EAAE,EAAE,CAAC,gBAAgB,CAoGzC,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Footer/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Footer/index.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,MAAM,+CA4BlB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/RelativeTimePanel/index.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/RelativeTimePanel/index.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAGxC,UAAU,kBAAkB;IAC1B,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,iBAAiB,GAAI,aAAa,kBAAkB,4CA4EhE,CAAC"}
|
package/dist/Sidebar/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Sidebar/index.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,UAAU,QAAQ;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,gBAAgB,EAAE,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Sidebar/index.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,UAAU,QAAQ;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,gBAAgB,EAAE,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;IAClD,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,eAAO,MAAM,OAAO,EAAE,EAAE,CAAC,QAAQ,CAuDhC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/StartEndTimePanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAa3B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/StartEndTimePanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAa3B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAOxC,UAAU,kBAAkB;IAC1B,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,QAAA,MAAM,iBAAiB,EAAE,EAAE,CAAC,kBAAkB,CAmI7C,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/TimezonePanel/components/TimezoneList/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/TimezonePanel/components/TimezoneList/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAI3B,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,UAAU,aAAa;IACrB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,gBAAgB,EAAE,YAAY,GAAG,IAAI,CAAC;IACtC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,wBAAwB,CAAC,EAAE,CAAC,gBAAgB,EAAE,YAAY,KAAK,IAAI,CAAC;CACrE;AAED,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,aAAa,CAiD1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/TimezonePanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAA2C,MAAM,OAAO,CAAC;AASpE,OAAO,EAAgB,OAAO,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/TimezonePanel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAA2C,MAAM,OAAO,CAAC;AASpE,OAAO,EAAgB,OAAO,EAAE,MAAM,eAAe,CAAC;AActD,UAAU,cAAc;IACtB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC,cAAc,CA0HrC,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/TimezoneRangePicker/index.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/TimezoneRangePicker/index.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAKxC,oBAAY,KAAK;IACf,aAAa,kBAAkB;IAC/B,cAAc,wBAAwB;IACtC,WAAW,kBAAkB;IAC7B,QAAQ,cAAc;CACvB;AAmHD,QAAA,MAAM,0BAA0B,GAAI,OAAO,OAAO,4CAMjD,CAAC;AAEF,OAAO,EAAE,0BAA0B,IAAI,mBAAmB,EAAE,CAAC"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),D=require("@mantine/core"),re=require("@mantine/hooks"),ae=require("@mantine/dates");function Ce(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $e={exports:{}},fe={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var Ue;function Tt(){if(Ue)return fe;Ue=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,s,c){var o=null;if(c!==void 0&&(o=""+c),s.key!==void 0&&(o=""+s.key),"key"in s){c={};for(var u in s)u!=="key"&&(c[u]=s[u])}else c=s;return s=c.ref,{$$typeof:e,type:n,key:o,ref:s!==void 0?s:null,props:c}}return fe.Fragment=t,fe.jsx=r,fe.jsxs=r,fe}var me={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,50 +14,50 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var qe;function bt(){return qe||(qe=1,process.env.NODE_ENV!=="production"&&(function(){function e(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===z?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case v:return"Fragment";case S:return"Profiler";case h:return"StrictMode";case R:return"Suspense";case k:return"SuspenseList";case q:return"Activity"}if(typeof a=="object")switch(typeof a.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),a.$$typeof){case O:return"Portal";case Y:return(a.displayName||"Context")+".Provider";case C:return(a._context.displayName||"Context")+".Consumer";case N:var x=a.render;return a=a.displayName,a||(a=x.displayName||x.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case A:return x=a.displayName||null,x!==null?x:e(a.type)||"Memo";case L:x=a._payload,a=a._init;try{return e(a(x))}catch{}}return null}function t(a){return""+a}function r(a){try{t(a);var x=!1}catch{x=!0}if(x){x=console;var F=x.error,I=typeof Symbol=="function"&&Symbol.toStringTag&&a[Symbol.toStringTag]||a.constructor.name||"Object";return F.call(x,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",I),t(a)}}function n(a){if(a===v)return"<>";if(typeof a=="object"&&a!==null&&a.$$typeof===L)return"<...>";try{var x=e(a);return x?"<"+x+">":"<...>"}catch{return"<...>"}}function s(){var a=V.A;return a===null?null:a.getOwner()}function c(){return Error("react-stack-top-frame")}function o(a){if(X.call(a,"key")){var x=Object.getOwnPropertyDescriptor(a,"key").get;if(x&&x.isReactWarning)return!1}return a.key!==void 0}function u(a,x){function F(){b||(b=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",x))}F.isReactWarning=!0,Object.defineProperty(a,"key",{get:F,configurable:!0})}function i(){var a=e(this.type);return y[a]||(y[a]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),a=this.props.ref,a!==void 0?a:null}function d(a,x,F,I,U,H,G,T){return F=H.ref,a={$$typeof:j,type:a,key:x,props:H,_owner:U},(F!==void 0?F:null)!==null?Object.defineProperty(a,"ref",{enumerable:!1,get:i}):Object.defineProperty(a,"ref",{enumerable:!1,value:null}),a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(a,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(a,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:G}),Object.defineProperty(a,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:T}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a}function g(a,x,F,I,U,H,G,T){var M=x.children;if(M!==void 0)if(I)if(se(M)){for(I=0;I<M.length;I++)_(M[I]);Object.freeze&&Object.freeze(M)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else _(M);if(X.call(x,"key")){M=e(a);var W=Object.keys(x).filter(function(Z){return Z!=="key"});I=0<W.length?"{key: someKey, "+W.join(": ..., ")+": ...}":"{key: someKey}",P[M+I]||(W=0<W.length?"{"+W.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,I,
|
|
22
|
+
<%s key={someKey} {...props} />`,I,M,W,M),P[M+I]=!0)}if(M=null,F!==void 0&&(r(F),M=""+F),o(x)&&(r(x.key),M=""+x.key),"key"in x){F={};for(var K in x)K!=="key"&&(F[K]=x[K])}else F=x;return M&&u(F,typeof a=="function"?a.displayName||a.name||"Unknown":a),d(a,M,H,U,s(),F,G,T)}function _(a){typeof a=="object"&&a!==null&&a.$$typeof===j&&a._store&&(a._store.validated=1)}var $=m,j=Symbol.for("react.transitional.element"),O=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),Y=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),z=Symbol.for("react.client.reference"),V=$.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=Object.prototype.hasOwnProperty,se=Array.isArray,E=console.createTask?console.createTask:function(){return null};$={react_stack_bottom_frame:function(a){return a()}};var b,y={},w=$.react_stack_bottom_frame.bind($,c)(),p=E(n(c)),P={};me.Fragment=v,me.jsx=function(a,x,F,I,U){var H=1e4>V.recentlyCreatedOwnerStacks++;return g(a,x,F,!1,I,U,H?Error("react-stack-top-frame"):w,H?E(n(a)):p)},me.jsxs=function(a,x,F,I,U){var H=1e4>V.recentlyCreatedOwnerStacks++;return g(a,x,F,!0,I,U,H?Error("react-stack-top-frame"):w,H?E(n(a)):p)}})()),me}var He;function vt(){return He||(He=1,process.env.NODE_ENV==="production"?$e.exports=Tt():$e.exports=bt()),$e.exports}var l=vt();function xt(e,t){var r=m.useRef(!1),n=m.useRef(),s=m.useRef(e),c=m.useCallback(function(){return r.current},[]),o=m.useCallback(function(){r.current=!1,n.current&&clearTimeout(n.current),n.current=setTimeout(function(){r.current=!0,s.current()},t)},[t]),u=m.useCallback(function(){r.current=null,n.current&&clearTimeout(n.current)},[]);return m.useEffect(function(){s.current=e},[e]),m.useEffect(function(){return o(),u},[t]),[c,u,o]}function ct(e,t,r){r===void 0&&(r=[]);var n=xt(e,t),s=n[0],c=n[1],o=n[2];return m.useEffect(o,r),[s,c]}function ut(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=ut(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function lt(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=ut(e))&&(n&&(n+=" "),n+=t);return n}const gt="_row_550mo_1",he={row:gt,"row-dark":"_row-dark_550mo_5","row-light":"_row-light_550mo_12","row-selected-dark":"_row-selected-dark_550mo_19","row-selected-light":"_row-selected-light_550mo_27"},Ne=()=>{const{colorScheme:e}=D.useMantineColorScheme(),t=D.useMantineTheme();return{colorScheme:e,theme:t}},Be=({name:e,longName:t,currentTime:r,utcOffset:n,selectedTimezone:s,isBrowserTimezone:c=!1,handleTimezoneMouseClick:o=void 0})=>{const{colorScheme:u}=Ne(),i=re.useMediaQuery("(max-width: 48em)"),d=()=>{c||o({name:e,longName:t,utcOffset:n})};return l.jsxs(D.Flex,{direction:"column",className:lt(he.row,c?void 0:u==="dark"?he["row-dark"]:he["row-light"],s?.name===e?u==="dark"?he["row-selected-dark"]:he["row-selected-light"]:void 0),onClick:d,children:[l.jsxs(D.Flex,{justify:"space-between",gap:8,wrap:i?"wrap":"nowrap",children:[l.jsx(D.Text,{size:"sm",children:e}),l.jsxs(D.Text,{size:"sm",children:[r," • UTC",n]})]}),l.jsx(D.Text,{size:"sm",c:i?"dimmed":void 0,children:t})]})};/**
|
|
23
23
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
24
24
|
*
|
|
25
25
|
* This source code is licensed under the MIT license.
|
|
26
26
|
* See the LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/var
|
|
27
|
+
*/var St={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
|
|
28
28
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
29
29
|
*
|
|
30
30
|
* This source code is licensed under the MIT license.
|
|
31
31
|
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/const
|
|
32
|
+
*/const le=(e,t,r,n)=>{const s=m.forwardRef(({color:c="currentColor",size:o=24,stroke:u=2,title:i,className:d,children:g,..._},$)=>m.createElement("svg",{ref:$,...St[e],width:o,height:o,className:["tabler-icon",`tabler-icon-${t}`,d].join(" "),...e==="filled"?{fill:c}:{strokeWidth:u,stroke:c},..._},[i&&m.createElement("title",{key:"svg-title"},i),...n.map(([j,O])=>m.createElement(j,O)),...Array.isArray(g)?g:[g]]));return s.displayName=`${r}`,s};/**
|
|
33
33
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
34
34
|
*
|
|
35
35
|
* This source code is licensed under the MIT license.
|
|
36
36
|
* See the LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/const
|
|
37
|
+
*/const $t=[["path",{d:"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12z",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M11 15h1",key:"svg-4"}],["path",{d:"M12 15v3",key:"svg-5"}]],Ve=le("outline","calendar","Calendar",$t);/**
|
|
38
38
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
39
39
|
*
|
|
40
40
|
* This source code is licensed under the MIT license.
|
|
41
41
|
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/const
|
|
42
|
+
*/const Dt=[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]],Fe=le("outline","chevron-right","ChevronRight",Dt);/**
|
|
43
43
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
44
44
|
*
|
|
45
45
|
* This source code is licensed under the MIT license.
|
|
46
46
|
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
-
*/const
|
|
47
|
+
*/const kt=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 7v5l3 3",key:"svg-1"}]],Me=le("outline","clock","Clock",kt);/**
|
|
48
48
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
49
49
|
*
|
|
50
50
|
* This source code is licensed under the MIT license.
|
|
51
51
|
* See the LICENSE file in the root directory of this source tree.
|
|
52
|
-
*/const
|
|
52
|
+
*/const wt=[["path",{d:"M4 6h16",key:"svg-0"}],["path",{d:"M6 12h12",key:"svg-1"}],["path",{d:"M9 18h6",key:"svg-2"}]],jt=le("outline","filter-2","Filter2",wt);/**
|
|
53
53
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
54
54
|
*
|
|
55
55
|
* This source code is licensed under the MIT license.
|
|
56
56
|
* See the LICENSE file in the root directory of this source tree.
|
|
57
|
-
*/const
|
|
57
|
+
*/const _t=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M3.6 9h16.8",key:"svg-1"}],["path",{d:"M3.6 15h16.8",key:"svg-2"}],["path",{d:"M11.5 3a17 17 0 0 0 0 18",key:"svg-3"}],["path",{d:"M12.5 3a17 17 0 0 1 0 18",key:"svg-4"}]],Et=le("outline","world","World",_t);/**
|
|
58
58
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
59
59
|
*
|
|
60
60
|
* This source code is licensed under the MIT license.
|
|
61
61
|
* See the LICENSE file in the root directory of this source tree.
|
|
62
|
-
*/const kt=[["path",{d:"M16 2c.183 0 .355 .05 .502 .135l.033 .02c.28 .177 .465 .49 .465 .845v1h1a3 3 0 0 1 2.995 2.824l.005 .176v12a3 3 0 0 1 -2.824 2.995l-.176 .005h-12a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-12a3 3 0 0 1 2.824 -2.995l.176 -.005h1v-1a1 1 0 0 1 .514 -.874l.093 -.046l.066 -.025l.1 -.029l.107 -.019l.12 -.007q .083 0 .161 .013l.122 .029l.04 .012l.06 .023c.328 .135 .568 .44 .61 .806l.007 .117v1h6v-1a1 1 0 0 1 1 -1m3 7h-14v9.625c0 .705 .386 1.286 .883 1.366l.117 .009h12c.513 0 .936 -.53 .993 -1.215l.007 -.16z",key:"svg-0"}],["path",{d:"M9.015 13a1 1 0 0 1 -1 1a1.001 1.001 0 1 1 -.005 -2c.557 0 1.005 .448 1.005 1",key:"svg-1"}],["path",{d:"M13.015 13a1 1 0 0 1 -1 1a1.001 1.001 0 1 1 -.005 -2c.557 0 1.005 .448 1.005 1",key:"svg-2"}],["path",{d:"M17.02 13a1 1 0 0 1 -1 1a1.001 1.001 0 1 1 -.005 -2c.557 0 1.005 .448 1.005 1",key:"svg-3"}],["path",{d:"M12.02 15a1 1 0 0 1 0 2a1.001 1.001 0 1 1 -.005 -2z",key:"svg-4"}],["path",{d:"M9.015 16a1 1 0 0 1 -1 1a1.001 1.001 0 1 1 -.005 -2c.557 0 1.005 .448 1.005 1",key:"svg-5"}]],Dt=ae("filled","calendar-week-filled","CalendarWeekFilled",kt),jt=({searchText:e,setSearchText:t})=>l.jsx(w.Input,{placeholder:"Timezone search (Asia, Tokyo, +09:00, etc)",leftSection:l.jsx(xt,{stroke:2}),value:e,onChange:r=>t(r.currentTarget.value)});var De={exports:{}},wt=De.exports,We;function Et(){return We||(We=1,(function(e,t){(function(r,n){e.exports=n()})(wt,(function(){var r=1e3,n=6e4,s=36e5,i="millisecond",a="second",c="minute",u="hour",m="day",D="week",x="month",j="quarter",P="year",O="date",b="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,S=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(E){var v=["th","st","nd","rd"],h=E%100;return"["+E+(v[(h-20)%10]||v[h]||v[0])+"]"}},z=function(E,v,h){var k=String(E);return!k||k.length>=v?E:""+Array(v+1-k.length).join(h)+E},K={s:z,z:function(E){var v=-E.utcOffset(),h=Math.abs(v),k=Math.floor(h/60),T=h%60;return(v<=0?"+":"-")+z(k,2,"0")+":"+z(T,2,"0")},m:function E(v,h){if(v.date()<h.date())return-E(h,v);var k=12*(h.year()-v.year())+(h.month()-v.month()),T=v.clone().add(k,x),F=h-T<0,o=v.clone().add(k+(F?-1:1),x);return+(-(k+(h-T)/(F?T-o:o-T))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:x,y:P,w:D,d:m,D:O,h:u,m:c,s:a,ms:i,Q:j}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},Y="en",$={};$[Y]=C;var V="$isDayjsObject",L=function(E){return E instanceof Q||!(!E||!E[V])},N=function E(v,h,k){var T;if(!v)return Y;if(typeof v=="string"){var F=v.toLowerCase();$[F]&&(T=F),h&&($[F]=h,T=F);var o=v.split("-");if(!T&&o.length>1)return E(o[0])}else{var g=v.name;$[g]=v,T=g}return!k&&T&&(Y=T),T||!k&&Y},R=function(E,v){if(L(E))return E.clone();var h=typeof v=="object"?v:{};return h.date=E,h.args=arguments,new Q(h)},A=K;A.l=N,A.i=L,A.w=function(E,v){return R(E,{locale:v.$L,utc:v.$u,x:v.$x,$offset:v.$offset})};var Q=(function(){function E(h){this.$L=N(h.locale,null,!0),this.parse(h),this.$x=this.$x||h.x||{},this[V]=!0}var v=E.prototype;return v.parse=function(h){this.$d=(function(k){var T=k.date,F=k.utc;if(T===null)return new Date(NaN);if(A.u(T))return new Date;if(T instanceof Date)return new Date(T);if(typeof T=="string"&&!/Z$/i.test(T)){var o=T.match(y);if(o){var g=o[2]-1||0,M=(o[7]||"0").substring(0,3);return F?new Date(Date.UTC(o[1],g,o[3]||1,o[4]||0,o[5]||0,o[6]||0,M)):new Date(o[1],g,o[3]||1,o[4]||0,o[5]||0,o[6]||0,M)}}return new Date(T)})(h),this.init()},v.init=function(){var h=this.$d;this.$y=h.getFullYear(),this.$M=h.getMonth(),this.$D=h.getDate(),this.$W=h.getDay(),this.$H=h.getHours(),this.$m=h.getMinutes(),this.$s=h.getSeconds(),this.$ms=h.getMilliseconds()},v.$utils=function(){return A},v.isValid=function(){return this.$d.toString()!==b},v.isSame=function(h,k){var T=R(h);return this.startOf(k)<=T&&T<=this.endOf(k)},v.isAfter=function(h,k){return R(h)<this.startOf(k)},v.isBefore=function(h,k){return this.endOf(k)<R(h)},v.$g=function(h,k,T){return A.u(h)?this[k]:this.set(T,h)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(h,k){var T=this,F=!!A.u(k)||k,o=A.p(h),g=function(W,U){var Z=A.w(T.$u?Date.UTC(T.$y,U,W):new Date(T.$y,U,W),T);return F?Z:Z.endOf(m)},M=function(W,U){return A.w(T.toDate()[W].apply(T.toDate("s"),(F?[0,0,0,0]:[23,59,59,999]).slice(U)),T)},I=this.$W,q=this.$M,H=this.$D,X="set"+(this.$u?"UTC":"");switch(o){case P:return F?g(1,0):g(31,11);case x:return F?g(1,q):g(0,q+1);case D:var p=this.$locale().weekStart||0,_=(I<p?I+7:I)-p;return g(F?H-_:H+(6-_),q);case m:case O:return M(X+"Hours",0);case u:return M(X+"Minutes",1);case c:return M(X+"Seconds",2);case a:return M(X+"Milliseconds",3);default:return this.clone()}},v.endOf=function(h){return this.startOf(h,!1)},v.$set=function(h,k){var T,F=A.p(h),o="set"+(this.$u?"UTC":""),g=(T={},T[m]=o+"Date",T[O]=o+"Date",T[x]=o+"Month",T[P]=o+"FullYear",T[u]=o+"Hours",T[c]=o+"Minutes",T[a]=o+"Seconds",T[i]=o+"Milliseconds",T)[F],M=F===m?this.$D+(k-this.$W):k;if(F===x||F===P){var I=this.clone().set(O,1);I.$d[g](M),I.init(),this.$d=I.set(O,Math.min(this.$D,I.daysInMonth())).$d}else g&&this.$d[g](M);return this.init(),this},v.set=function(h,k){return this.clone().$set(h,k)},v.get=function(h){return this[A.p(h)]()},v.add=function(h,k){var T,F=this;h=Number(h);var o=A.p(k),g=function(q){var H=R(F);return A.w(H.date(H.date()+Math.round(q*h)),F)};if(o===x)return this.set(x,this.$M+h);if(o===P)return this.set(P,this.$y+h);if(o===m)return g(1);if(o===D)return g(7);var M=(T={},T[c]=n,T[u]=s,T[a]=r,T)[o]||1,I=this.$d.getTime()+h*M;return A.w(I,this)},v.subtract=function(h,k){return this.add(-1*h,k)},v.format=function(h){var k=this,T=this.$locale();if(!this.isValid())return T.invalidDate||b;var F=h||"YYYY-MM-DDTHH:mm:ssZ",o=A.z(this),g=this.$H,M=this.$m,I=this.$M,q=T.weekdays,H=T.months,X=T.meridiem,p=function(U,Z,ee,G){return U&&(U[Z]||U(k,F))||ee[Z].slice(0,G)},_=function(U){return A.s(g%12||12,U,"0")},W=X||function(U,Z,ee){var G=U<12?"AM":"PM";return ee?G.toLowerCase():G};return F.replace(S,(function(U,Z){return Z||(function(ee){switch(ee){case"YY":return String(k.$y).slice(-2);case"YYYY":return A.s(k.$y,4,"0");case"M":return I+1;case"MM":return A.s(I+1,2,"0");case"MMM":return p(T.monthsShort,I,H,3);case"MMMM":return p(H,I);case"D":return k.$D;case"DD":return A.s(k.$D,2,"0");case"d":return String(k.$W);case"dd":return p(T.weekdaysMin,k.$W,q,2);case"ddd":return p(T.weekdaysShort,k.$W,q,3);case"dddd":return q[k.$W];case"H":return String(g);case"HH":return A.s(g,2,"0");case"h":return _(1);case"hh":return _(2);case"a":return W(g,M,!0);case"A":return W(g,M,!1);case"m":return String(M);case"mm":return A.s(M,2,"0");case"s":return String(k.$s);case"ss":return A.s(k.$s,2,"0");case"SSS":return A.s(k.$ms,3,"0");case"Z":return o}return null})(U)||o.replace(":","")}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(h,k,T){var F,o=this,g=A.p(k),M=R(h),I=(M.utcOffset()-this.utcOffset())*n,q=this-M,H=function(){return A.m(o,M)};switch(g){case P:F=H()/12;break;case x:F=H();break;case j:F=H()/3;break;case D:F=(q-I)/6048e5;break;case m:F=(q-I)/864e5;break;case u:F=q/s;break;case c:F=q/n;break;case a:F=q/r;break;default:F=q}return T?F:A.a(F)},v.daysInMonth=function(){return this.endOf(x).$D},v.$locale=function(){return $[this.$L]},v.locale=function(h,k){if(!h)return this.$L;var T=this.clone(),F=N(h,k,!0);return F&&(T.$L=F),T},v.clone=function(){return A.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},E})(),re=Q.prototype;return R.prototype=re,[["$ms",i],["$s",a],["$m",c],["$H",u],["$W",m],["$M",x],["$y",P],["$D",O]].forEach((function(E){re[E[1]]=function(v){return this.$g(v,E[0],E[1])}})),R.extend=function(E,v){return E.$i||(E(v,Q,R),E.$i=!0),R},R.locale=N,R.isDayjs=L,R.unix=function(E){return R(1e3*E)},R.en=$[Y],R.Ls=$,R.p={},R}))})(De)),De.exports}var _t=Et();const d=_e(_t);var je={exports:{}},Ot=je.exports,qe;function Ct(){return qe||(qe=1,(function(e,t){(function(r,n){e.exports=n()})(Ot,(function(){var r="minute",n=/[+-]\d\d(?::?\d\d)?/g,s=/([+-]|\d\d)/g;return function(i,a,c){var u=a.prototype;c.utc=function(b){var y={date:b,utc:!0,args:arguments};return new a(y)},u.utc=function(b){var y=c(this.toDate(),{locale:this.$L,utc:!0});return b?y.add(this.utcOffset(),r):y},u.local=function(){return c(this.toDate(),{locale:this.$L,utc:!1})};var m=u.parse;u.parse=function(b){b.utc&&(this.$u=!0),this.$utils().u(b.$offset)||(this.$offset=b.$offset),m.call(this,b)};var D=u.init;u.init=function(){if(this.$u){var b=this.$d;this.$y=b.getUTCFullYear(),this.$M=b.getUTCMonth(),this.$D=b.getUTCDate(),this.$W=b.getUTCDay(),this.$H=b.getUTCHours(),this.$m=b.getUTCMinutes(),this.$s=b.getUTCSeconds(),this.$ms=b.getUTCMilliseconds()}else D.call(this)};var x=u.utcOffset;u.utcOffset=function(b,y){var S=this.$utils().u;if(S(b))return this.$u?0:S(this.$offset)?x.call(this):this.$offset;if(typeof b=="string"&&(b=(function(Y){Y===void 0&&(Y="");var $=Y.match(n);if(!$)return null;var V=(""+$[0]).match(s)||["-",0,0],L=V[0],N=60*+V[1]+ +V[2];return N===0?0:L==="+"?N:-N})(b),b===null))return this;var C=Math.abs(b)<=16?60*b:b;if(C===0)return this.utc(y);var z=this.clone();if(y)return z.$offset=C,z.$u=!1,z;var K=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(z=this.local().add(C+K,r)).$offset=C,z.$x.$localOffset=K,z};var j=u.format;u.format=function(b){var y=b||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return j.call(this,y)},u.valueOf=function(){var b=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*b},u.isUTC=function(){return!!this.$u},u.toISOString=function(){return this.toDate().toISOString()},u.toString=function(){return this.toDate().toUTCString()};var P=u.toDate;u.toDate=function(b){return b==="s"&&this.$offset?c(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():P.call(this)};var O=u.diff;u.diff=function(b,y,S){if(b&&this.$u===b.$u)return O.call(this,b,y,S);var C=this.local(),z=c(b).local();return O.call(C,z,y,S)}}}))})(je)),je.exports}var Mt=Ct();const Ft=_e(Mt);var we={exports:{}},Pt=we.exports,Ne;function Vt(){return Ne||(Ne=1,(function(e,t){(function(r,n){e.exports=n()})(Pt,(function(){var r={year:0,month:1,day:2,hour:3,minute:4,second:5},n={};return function(s,i,a){var c,u=function(j,P,O){O===void 0&&(O={});var b=new Date(j),y=(function(S,C){C===void 0&&(C={});var z=C.timeZoneName||"short",K=S+"|"+z,Y=n[K];return Y||(Y=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:S,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:z}),n[K]=Y),Y})(P,O);return y.formatToParts(b)},m=function(j,P){for(var O=u(j,P),b=[],y=0;y<O.length;y+=1){var S=O[y],C=S.type,z=S.value,K=r[C];K>=0&&(b[K]=parseInt(z,10))}var Y=b[3],$=Y===24?0:Y,V=b[0]+"-"+b[1]+"-"+b[2]+" "+$+":"+b[4]+":"+b[5]+":000",L=+j;return(a.utc(V).valueOf()-(L-=L%1e3))/6e4},D=i.prototype;D.tz=function(j,P){j===void 0&&(j=c);var O,b=this.utcOffset(),y=this.toDate(),S=y.toLocaleString("en-US",{timeZone:j}),C=Math.round((y-new Date(S))/1e3/60),z=15*-Math.round(y.getTimezoneOffset()/15)-C;if(!Number(z))O=this.utcOffset(0,P);else if(O=a(S,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(z,!0),P){var K=O.utcOffset();O=O.add(b-K,"minute")}return O.$x.$timezone=j,O},D.offsetName=function(j){var P=this.$x.$timezone||a.tz.guess(),O=u(this.valueOf(),P,{timeZoneName:j}).find((function(b){return b.type.toLowerCase()==="timezonename"}));return O&&O.value};var x=D.startOf;D.startOf=function(j,P){if(!this.$x||!this.$x.$timezone)return x.call(this,j,P);var O=a(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return x.call(O,j,P).tz(this.$x.$timezone,!0)},a.tz=function(j,P,O){var b=O&&P,y=O||P||c,S=m(+a(),y);if(typeof j!="string")return a(j).tz(y);var C=(function($,V,L){var N=$-60*V*1e3,R=m(N,L);if(V===R)return[N,V];var A=m(N-=60*(R-V)*1e3,L);return R===A?[N,R]:[$-60*Math.min(R,A)*1e3,Math.max(R,A)]})(a.utc(j,b).valueOf(),S,y),z=C[0],K=C[1],Y=a(z).utcOffset(K);return Y.$x.$timezone=y,Y},a.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},a.tz.setDefault=function(j){c=j}}}))})(we)),we.exports}var At=Vt();const It=_e(At),Lt=(e,t="en-US")=>new Intl.DateTimeFormat(t,{timeZone:e,timeZoneName:"long"}).formatToParts(new Date).find(r=>r.type==="timeZoneName")?.value||"",Rt=e=>{const t=e[0]==="-"?-1:1,[r,n]=e.slice(1).split(":").map(Number);return t*(r*60+n)};d.extend(Ft);d.extend(It);const zt=()=>Intl.supportedValuesOf("timeZone").map(t=>{const r=d().tz(t).format("Z");return{name:t,longName:Lt(t),currentTime:d().tz(t).format("h:mm A"),utcOffset:r,offsetMinutes:Rt(r)}}).sort((t,r)=>t.offsetMinutes-r.offsetMinutes),Yt={"list-container":"_list-container_jrnm0_5"},Le={"form-container":"_form-container_1xxf4_1"},st=f.createContext(void 0),ot=()=>{const e=f.useContext(st);if(!e)throw new Error("usePopoverContext must be used within a PopoverProvider");return e},Kt=({children:e})=>{const[t,r]=f.useState(!1),n=()=>{r(!1)};return l.jsx(st.Provider,{value:{popoverOpened:t,setPopoverOpened:r,closePopover:n},children:e})},Re=()=>{const{theme:e}=Ie(),{closePopover:t}=ot();return l.jsx(w.Flex,{justify:"flex-end",children:l.jsxs(w.Flex,{columnGap:16,children:[l.jsx(w.Button,{size:"xs",variant:"subtle",color:e.primaryColor,onClick:t,children:"Cancel"}),l.jsx(w.Button,{type:"submit",size:"xs",color:e.primaryColor,children:"Apply"})]})})},te="YYYY/MM/DD",Te="HH:mm:ss",fe=()=>d().format(Te),it=()=>d().format(te),Ut=e=>d().add(e,"day").format(te),Wt=e=>e&&d().tz(e).format("Z"),qt=e=>`${d(e.startDate).format(te)} ${e.startTime} - ${d(e.endDate).format(te)} ${e.endTime} (${Wt(e.timezone.name)})`,ne=(e,t,r,n)=>{const s=d(`${e} ${t}`).subtract(r,n);return{date:s.format(te),time:s.format(Te)}},se=(e,t,r,n)=>{const s=d(`${e} ${t}`).add(r,n);return{date:s.format(te),time:s.format(Te)}},he=(e,t,r)=>d.tz(`${e} ${t}`,`${te} ${Te}`,r).utc().toISOString(),ye=(e,t)=>{const r=d.utc(e).tz(t);return{date:r.format(te),time:r.format(Te)}},at=({tzRange:e})=>{const[t,r]=f.useState(e.timezone),[n,s]=f.useState([]),[i,a]=f.useState(""),c=f.useMemo(()=>zt(),[]);f.useEffect(()=>{s(c)},[]),tt(()=>{if(i===""){s(c);return}s(c.filter(x=>x.name.toLowerCase().includes(i.toLocaleLowerCase())||x.longName.toLowerCase().includes(i.toLocaleLowerCase())||x.currentTime.toLowerCase().includes(i.toLocaleLowerCase())||x.utcOffset.toLowerCase().includes(i.toLocaleLowerCase())))},250,[i]);const u=x=>{r(x)},m=x=>{if(x.preventDefault(),!t?.name||!e.timezone.name||!e.startDate||!e.startTime||!e.endDate||!e.endTime)return;const j=he(e.startDate,e.startTime,e.timezone.name),P=he(e.endDate,e.endTime,e.timezone.name),O=ye(j,t.name),b=ye(P,t.name);e.onApply({startDate:O.date,startTime:O.time,endDate:b.date,endTime:b.time,timezone:t||{name:null,longName:null,utcOffset:null}})},D=x=>x?d().tz(x).format("h:mm A"):"";return l.jsxs("form",{className:Le["form-container"],onSubmit:m,children:[l.jsxs(w.Flex,{direction:"column",style:{height:"calc(100% - 40px)"},children:[l.jsx(w.Box,{style:{width:"95%"},mx:"auto",children:l.jsx(jt,{searchText:i,setSearchText:a})}),l.jsxs(w.Box,{style:{overflowY:"scroll"},children:[l.jsx(w.Text,{fw:600,px:12,children:"My Location"}),l.jsx(w.Flex,{direction:"column",children:l.jsx(Ue,{isBrowserTimezone:!0,name:e.timezone?.name,longName:e.timezone?.longName,currentTime:D(e.timezone?.name),utcOffset:e.timezone?.utcOffset,selectedTimezone:t})}),l.jsx(w.Text,{fw:600,px:12,children:"Locations"}),l.jsx(w.Flex,{direction:"column",className:Yt["list-container"],children:n.map((x,j)=>l.jsx(Ue,{name:x.name,longName:x.longName,currentTime:x.currentTime,utcOffset:x.utcOffset,selectedTimezone:t,handleTimezoneMouseClick:u},j))})]})]}),l.jsx(w.Box,{px:12,children:l.jsx(Re,{})})]})},ge={"sidebar-container":"_sidebar-container_e18ka_1","sidebar-row":"_sidebar-row_e18ka_5"},He=e=>[{label:"Today",searchKey:"today",startTime:d().tz(e).startOf("day").format(),endTime:d().tz(e).endOf("day").format()},{label:"Tomorrow",searchKey:"tomorrow",startTime:d().tz(e).add(1,"day").startOf("day").format(),endTime:d().tz(e).add(1,"day").endOf("day").format()},{label:"Yesterday",searchKey:"yesterday",startTime:d().tz(e).subtract(1,"day").startOf("day").format(),endTime:d().tz(e).subtract(1,"day").endOf("day").format(),lineBreak:!0},{label:"Last 15 seconds",searchKey:"-15s",startTime:d().tz(e).subtract(15,"second").format(),endTime:d().tz(e).format()},{label:"Last 30 seconds",searchKey:"-30s",startTime:d().tz(e).subtract(30,"second").format(),endTime:d().tz(e).format()},{label:"Next 15 seconds",searchKey:"+15s",startTime:d().tz(e).format(),endTime:d().tz(e).add(15,"second").format()},{label:"Next 30 seconds",searchKey:"+30s",startTime:d().tz(e).format(),endTime:d().tz(e).add(30,"second").format(),lineBreak:!0},{label:"Last 5 minutes",searchKey:"-5m",startTime:d().tz(e).subtract(5,"minute").format(),endTime:d().tz(e).format()},{label:"Last 10 minutes",searchKey:"-10m",startTime:d().tz(e).subtract(10,"minute").format(),endTime:d().tz(e).format()},{label:"Last 15 minutes",searchKey:"-15m",startTime:d().tz(e).subtract(15,"minute").format(),endTime:d().tz(e).format()},{label:"Last 30 minutes",searchKey:"-30m",startTime:d().tz(e).subtract(30,"minute").format(),endTime:d().tz(e).format()},{label:"Last 45 minutes",searchKey:"-45m",startTime:d().tz(e).subtract(45,"minute").format(),endTime:d().tz(e).format()},{label:"Next 5 minutes",searchKey:"+5m",startTime:d().tz(e).format(),endTime:d().tz(e).add(5,"minute").format()},{label:"Next 10 minutes",searchKey:"+10m",startTime:d().tz(e).format(),endTime:d().tz(e).add(10,"minute").format()},{label:"Next 15 minutes",searchKey:"+15m",startTime:d().tz(e).format(),endTime:d().tz(e).add(15,"minute").format()},{label:"Next 30 minutes",searchKey:"+30m",startTime:d().tz(e).format(),endTime:d().tz(e).add(30,"minute").format()},{label:"Next 45 minutes",searchKey:"+45m",startTime:d().tz(e).format(),endTime:d().tz(e).add(45,"minute").format(),lineBreak:!0},{label:"Last 1 hour",searchKey:"-1h",startTime:d().tz(e).subtract(1,"hour").format(),endTime:d().tz(e).format()},{label:"Last 3 hours",searchKey:"-3h",startTime:d().tz(e).subtract(3,"hour").format(),endTime:d().tz(e).format()},{label:"Last 6 hours",searchKey:"-6h",startTime:d().tz(e).subtract(6,"hour").format(),endTime:d().tz(e).format()},{label:"Last 12 hours",searchKey:"-12h",startTime:d().tz(e).subtract(12,"hour").format(),endTime:d().tz(e).format()},{label:"Next 1 hour",searchKey:"+1h",startTime:d().tz(e).format(),endTime:d().tz(e).add(1,"hour").format()},{label:"Next 3 hours",searchKey:"+3h",startTime:d().tz(e).format(),endTime:d().tz(e).add(3,"hour").format()},{label:"Next 6 hours",searchKey:"+6h",startTime:d().tz(e).format(),endTime:d().tz(e).add(6,"hour").format()},{label:"Next 12 hours",searchKey:"+12h",startTime:d().tz(e).format(),endTime:d().tz(e).add(12,"hour").format(),lineBreak:!0},{label:"Last 1 day",searchKey:"-1d",startTime:d().tz(e).subtract(1,"day").format(),endTime:d().tz(e).format()},{label:"Last 2 days",searchKey:"-2d",startTime:d().tz(e).subtract(2,"day").format(),endTime:d().tz(e).format()},{label:"Last 7 days",searchKey:"-7d",startTime:d().tz(e).subtract(7,"day").format(),endTime:d().tz(e).format()},{label:"Last 14 days",searchKey:"-14d",startTime:d().tz(e).subtract(14,"day").format(),endTime:d().tz(e).format()},{label:"Last 30 days",searchKey:"-30d",startTime:d().tz(e).subtract(30,"day").format(),endTime:d().tz(e).format()},{label:"Next 1 day",searchKey:"+1d",startTime:d().tz(e).format(),endTime:d().tz(e).add(1,"day").format()},{label:"Next 2 days",searchKey:"+2d",startTime:d().tz(e).format(),endTime:d().tz(e).add(2,"day").format()},{label:"Next 7 days",searchKey:"+7d",startTime:d().tz(e).format(),endTime:d().tz(e).add(7,"day").format()},{label:"Next 14 days",searchKey:"+14d",startTime:d().tz(e).format(),endTime:d().tz(e).add(14,"day").format()},{label:"Next 30 days",searchKey:"+30d",startTime:d().tz(e).format(),endTime:d().tz(e).add(30,"day").format()}],xe={"relative-time-panel-container":"_relative-time-panel-container_jsk5z_1","time-row":"_time-row_jsk5z_6","time-row-dark":"_time-row-dark_jsk5z_10","time-row-light":"_time-row-light_jsk5z_16"},Nt=({tzRange:e})=>{const[t,r]=f.useState([]),[n,s]=f.useState(""),{colorScheme:i}=Ie();f.useEffect(()=>{if(e.timezone.name!==null){const c=He(e.timezone.name);r(c)}},[e.timezone]),tt(()=>{if(n===""){r(He(e.timezone.name));return}const c=t.filter(u=>u.searchKey.includes(n));r(c)},250,[n]);const a=c=>{const[u,m]=c.startTime.split("T"),[D,x]=c.endTime.split("T");e.onApply({startDate:u,startTime:m.slice(0,8),endDate:D,endTime:x.slice(0,8),timezone:e.timezone})};return l.jsxs(l.Fragment,{children:[l.jsx(w.Box,{style:{width:"90%"},mx:"auto",children:l.jsx(w.Input,{placeholder:"Relative time (15m, 1h, 1d, 1w)",value:n,onChange:c=>s(c.currentTarget.value)})}),l.jsx(w.Flex,{direction:"column",className:xe["relative-time-panel-container"],children:t.map(c=>l.jsxs(w.Flex,{align:"center",justify:"space-between",className:nt(i==="dark"?xe["time-row-dark"]:xe["time-row-light"],xe["time-row"]),py:4,px:12,mb:c.lineBreak?8:0,onClick:()=>a(c),children:[l.jsx(w.Text,{size:"sm",children:c.label}),l.jsx(w.Text,{size:"xs",c:"#5f6368",children:c.searchKey})]},c.label))})]})},Ht=({setSelectedPanel:e,tzRange:t})=>l.jsxs(w.Box,{className:ge["sidebar-container"],flex:1,children:[l.jsx(Nt,{tzRange:t}),l.jsxs(w.Flex,{direction:"column",rowGap:16,py:8,style:{borderTop:"1px solid #ddd"},children:[l.jsxs(w.Flex,{className:ge["sidebar-row"],justify:"space-between",align:"center",px:12,onClick:()=>e(me.START_END_TIME),children:[l.jsxs(w.Flex,{align:"center",children:[l.jsx(Dt,{stroke:1.5}),l.jsx(w.Text,{size:"sm",children:"Start and end times"})]}),l.jsx(Oe,{stroke:1.5})]}),l.jsxs(w.Flex,{className:ge["sidebar-row"],justify:"space-between",align:"center",px:12,onClick:()=>e(me.AROUND_TIME),children:[l.jsxs(w.Flex,{align:"center",children:[l.jsx(Ee,{stroke:1.5}),l.jsx(w.Text,{size:"sm",children:"Around a time"})]}),l.jsx(Oe,{stroke:1.5})]}),l.jsxs(w.Flex,{className:ge["sidebar-row"],justify:"space-between",align:"center",px:12,onClick:()=>e(me.TIMEZONE),children:[l.jsxs(w.Flex,{align:"center",children:[l.jsx($t,{stroke:1.5}),l.jsx(w.Text,{size:"sm",children:"Time zone"})]}),l.jsx(Oe,{stroke:1.5})]})]})]});var ct=(e=>(e.ThirtySeconds="± 30 seconds",e.OneMinute="± 1 minute",e.FifteenMinutes="± 15 minutes",e.ThirtyMinutes="± 30 minutes",e.OneHour="± 1 hour",e.OneDay="± 1 day",e))(ct||{});const Bt=["± 30 seconds","± 1 minute","± 15 minutes","± 30 minutes","± 1 hour","± 1 day"],Zt=(e,t,r)=>{switch(r){case"± 30 seconds":const n=ne(e,t,30,"second"),s=se(e,t,30,"second");return{startDate:n.date,startTime:n.time,endDate:s.date,endTime:s.time};case"± 1 minute":const i=ne(e,t,1,"minute"),a=se(e,t,1,"minute");return{startDate:i.date,startTime:i.time,endDate:a.date,endTime:a.time};case"± 15 minutes":const c=ne(e,t,15,"minute"),u=se(e,t,15,"minute");return{startDate:c.date,startTime:c.time,endDate:u.date,endTime:u.time};case"± 30 minutes":const m=ne(e,t,30,"minute"),D=se(e,t,30,"minute");return{startDate:m.date,startTime:m.time,endDate:D.date,endTime:D.time};case"± 1 hour":const x=ne(e,t,1,"hour"),j=se(e,t,1,"hour");return{startDate:x.date,startTime:x.time,endDate:j.date,endTime:j.time};case"± 1 day":const P=ne(e,t,1,"day"),O=se(e,t,1,"day");return{startDate:P.date,startTime:P.time,endDate:O.date,endTime:O.time};default:return{startDate:e,startTime:t,endDate:e,endTime:t}}};function Jt(e){if(!/^[0-9a-zA-Z-]+$/.test(e))throw new Error(`[@mantine/use-form] Form name "${e}" is invalid, it should contain only letters, numbers and dashes`)}const Gt=typeof window<"u"?f.useLayoutEffect:f.useEffect;function J(e,t){Gt(()=>{if(e)return window.addEventListener(e,t),()=>window.removeEventListener(e,t)},[e])}function Xt(e,t){e&&Jt(e),J(`mantine-form:${e}:set-field-value`,r=>t.setFieldValue(r.detail.path,r.detail.value)),J(`mantine-form:${e}:set-values`,r=>t.setValues(r.detail)),J(`mantine-form:${e}:set-initial-values`,r=>t.setInitialValues(r.detail)),J(`mantine-form:${e}:set-errors`,r=>t.setErrors(r.detail)),J(`mantine-form:${e}:set-field-error`,r=>t.setFieldError(r.detail.path,r.detail.error)),J(`mantine-form:${e}:clear-field-error`,r=>t.clearFieldError(r.detail)),J(`mantine-form:${e}:clear-errors`,t.clearErrors),J(`mantine-form:${e}:reset`,t.reset),J(`mantine-form:${e}:validate`,t.validate),J(`mantine-form:${e}:validate-field`,r=>t.validateField(r.detail)),J(`mantine-form:${e}:reorder-list-item`,r=>t.reorderListItem(r.detail.path,r.detail.payload)),J(`mantine-form:${e}:remove-list-item`,r=>t.removeListItem(r.detail.path,r.detail.index)),J(`mantine-form:${e}:insert-list-item`,r=>t.insertListItem(r.detail.path,r.detail.item,r.detail.index)),J(`mantine-form:${e}:set-dirty`,r=>t.setDirty(r.detail)),J(`mantine-form:${e}:set-touched`,r=>t.setTouched(r.detail)),J(`mantine-form:${e}:reset-dirty`,r=>t.resetDirty(r.detail)),J(`mantine-form:${e}:reset-touched`,t.resetTouched)}function Qt(e){return t=>{if(!t)e(t);else if(typeof t=="function")e(t);else if(typeof t=="object"&&"nativeEvent"in t){const{currentTarget:r}=t;r instanceof HTMLInputElement?r.type==="checkbox"?e(r.checked):e(r.value):(r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement)&&e(r.value)}else e(t)}}function Fe(e){return e===null||typeof e!="object"?{}:Object.keys(e).reduce((t,r)=>{const n=e[r];return n!=null&&n!==!1&&(t[r]=n),t},{})}function er(e){const[t,r]=f.useState(Fe(e)),n=f.useRef(t),s=f.useCallback(u=>{r(m=>{const D=Fe(typeof u=="function"?u(m):u);return n.current=D,D})},[]),i=f.useCallback(()=>s({}),[]),a=f.useCallback(u=>{n.current[u]!==void 0&&s(m=>{const D={...m};return delete D[u],D})},[t]),c=f.useCallback((u,m)=>{m==null||m===!1?a(u):n.current[u]!==m&&s(D=>({...D,[u]:m}))},[t]);return{errorsState:t,setErrors:s,clearErrors:i,setFieldError:c,clearFieldError:a}}function Pe(e,t){if(t===null||typeof t!="object")return{};const r={...t};return Object.keys(t).forEach(n=>{n.includes(`${String(e)}.`)&&delete r[n]}),r}function Be(e,t){const r=e.substring(t.length+1).split(".")[0];return parseInt(r,10)}function Ze(e,t,r,n){if(t===void 0)return r;const s=`${String(e)}`;let i=r;n===-1&&(i=Pe(`${s}.${t}`,i));const a={...i},c=new Set;return Object.entries(i).filter(([u])=>{if(!u.startsWith(`${s}.`))return!1;const m=Be(u,s);return Number.isNaN(m)?!1:m>=t}).forEach(([u,m])=>{const D=Be(u,s),x=u.replace(`${s}.${D}`,`${s}.${D+n}`);a[x]=m,c.add(x),c.has(u)||delete a[u]}),a}function tr(e,{from:t,to:r},n){const s=`${e}.${t}`,i=`${e}.${r}`,a={...n},c=new Set;return Object.keys(n).forEach(u=>{if(c.has(u))return;let m,D;if(u.startsWith(s)?(m=u,D=u.replace(s,i)):u.startsWith(i)&&(m=u.replace(i,s),D=u),m&&D){const x=a[m],j=a[D];j===void 0?delete a[m]:a[m]=j,x===void 0?delete a[D]:a[D]=x,c.add(m),c.add(D)}}),a}function Je(e,t,r){typeof r.value=="object"&&(r.value=ie(r.value)),!r.enumerable||r.get||r.set||!r.configurable||!r.writable||t==="__proto__"?Object.defineProperty(e,t,r):e[t]=r.value}function ie(e){if(typeof e!="object")return e;var t=0,r,n,s,i=Object.prototype.toString.call(e);if(i==="[object Object]"?s=Object.create(e.__proto__||null):i==="[object Array]"?s=Array(e.length):i==="[object Set]"?(s=new Set,e.forEach(function(a){s.add(ie(a))})):i==="[object Map]"?(s=new Map,e.forEach(function(a,c){s.set(ie(c),ie(a))})):i==="[object Date]"?s=new Date(+e):i==="[object RegExp]"?s=new RegExp(e.source,e.flags):i==="[object DataView]"?s=new e.constructor(ie(e.buffer)):i==="[object ArrayBuffer]"?s=e.slice(0):i.slice(-6)==="Array]"&&(s=new e.constructor(e)),s){for(n=Object.getOwnPropertySymbols(e);t<n.length;t++)Je(s,n[t],Object.getOwnPropertyDescriptor(e,n[t]));for(t=0,n=Object.getOwnPropertyNames(e);t<n.length;t++)Object.hasOwnProperty.call(s,r=n[t])&&s[r]===e[r]||Je(s,r,Object.getOwnPropertyDescriptor(e,r))}return s||e}function ut(e){return typeof e!="string"?[]:e.split(".")}function B(e,t){const r=ut(e);if(r.length===0||typeof t!="object"||t===null)return;let n=t[r[0]];for(let s=1;s<r.length&&n!=null;s+=1)n=n[r[s]];return n}function pe(e,t,r){const n=ut(e);if(n.length===0)return r;const s=ie(r);if(n.length===1)return s[n[0]]=t,s;let i=s[n[0]];for(let a=1;a<n.length-1;a+=1){if(i===void 0)return s;i=i[n[a]]}return i[n[n.length-1]]=t,s}function rr(e,{from:t,to:r},n){const s=B(e,n);if(!Array.isArray(s))return n;const i=[...s],a=s[t];return i.splice(t,1),i.splice(r,0,a),pe(e,i,n)}function nr(e,t,r,n){const s=B(e,n);if(!Array.isArray(s))return n;const i=[...s];return i.splice(typeof r=="number"?r:i.length,0,t),pe(e,i,n)}function sr(e,t,r){const n=B(e,r);return Array.isArray(n)?pe(e,n.filter((s,i)=>i!==t),r):r}function or(e,t,r,n){const s=B(e,n);if(!Array.isArray(s)||s.length<=r)return n;const i=[...s];return i[r]=t,pe(e,i,n)}function ir({$values:e,$errors:t,$status:r}){const n=f.useCallback((c,u)=>{r.clearFieldDirty(c),t.setErrors(m=>tr(c,u,m)),e.setValues({values:rr(c,u,e.refValues.current),updateState:!0})},[]),s=f.useCallback((c,u)=>{r.clearFieldDirty(c),t.setErrors(m=>Ze(c,u,m,-1)),e.setValues({values:sr(c,u,e.refValues.current),updateState:!0})},[]),i=f.useCallback((c,u,m)=>{r.clearFieldDirty(c),t.setErrors(D=>Ze(c,m,D,1)),e.setValues({values:nr(c,u,m,e.refValues.current),updateState:!0})},[]),a=f.useCallback((c,u,m)=>{r.clearFieldDirty(c),e.setValues({values:or(c,m,u,e.refValues.current),updateState:!0})},[]);return{reorderListItem:n,removeListItem:s,insertListItem:i,replaceListItem:a}}var Ce,Ge;function ar(){return Ge||(Ge=1,Ce=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,s,i;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[s]))return!1;for(s=n;s--!==0;){var a=i[s];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}),Ce}var cr=ar();const Se=_e(cr);function de(e,t){const r=Object.keys(e);if(typeof t=="string"){const n=r.filter(s=>s.startsWith(`${t}.`));return e[t]||n.some(s=>e[s])||!1}return r.some(n=>e[n])}function ur({initialDirty:e,initialTouched:t,mode:r,$values:n}){const[s,i]=f.useState(t),[a,c]=f.useState(e),u=f.useRef(t),m=f.useRef(e),D=f.useCallback($=>{const V=typeof $=="function"?$(u.current):$;u.current=V,r==="controlled"&&i(V)},[]),x=f.useCallback(($,V=!1)=>{const L=typeof $=="function"?$(m.current):$;m.current=L,(r==="controlled"||V)&&c(L)},[]),j=f.useCallback(()=>D({}),[]),P=f.useCallback($=>{const V=$?{...n.refValues.current,...$}:n.refValues.current;n.setValuesSnapshot(V),x({})},[]),O=f.useCallback(($,V)=>{D(L=>de(L,$)===V?L:{...L,[$]:V})},[]),b=f.useCallback(($,V,L)=>{x(N=>de(N,$)===V?N:{...N,[$]:V},L)},[]),y=f.useCallback(($,V)=>{const L=de(m.current,$),N=!Se(B($,n.getValuesSnapshot()),V),R=Pe($,m.current);R[$]=N,x(R,L!==N)},[]),S=f.useCallback($=>de(u.current,$),[]),C=f.useCallback($=>x(V=>{if(typeof $!="string")return V;const L=Pe($,V);return delete L[$],Se(L,V)?V:L}),[]),z=f.useCallback($=>{if($){const L=B($,m.current);if(typeof L=="boolean")return L;const N=B($,n.refValues.current),R=B($,n.valuesSnapshot.current);return!Se(N,R)}return Object.keys(m.current).length>0?de(m.current):!Se(n.refValues.current,n.valuesSnapshot.current)},[]),K=f.useCallback(()=>m.current,[]),Y=f.useCallback(()=>u.current,[]);return{touchedState:s,dirtyState:a,touchedRef:u,dirtyRef:m,setTouched:D,setDirty:x,resetDirty:P,resetTouched:j,isTouched:S,setFieldTouched:O,setFieldDirty:b,setTouchedState:i,setDirtyState:c,clearFieldDirty:C,isDirty:z,getDirty:K,getTouched:Y,setCalculatedFieldDirty:y}}function lr({initialValues:e,onValuesChange:t,mode:r}){const n=f.useRef(!1),[s,i]=f.useState(e||{}),a=f.useRef(s),c=f.useRef(s),u=f.useCallback(({values:y,subscribers:S,updateState:C=!0,mergeWithPreviousValues:z=!0})=>{const K=a.current,Y=y instanceof Function?y(a.current):y,$=z?{...K,...Y}:Y;a.current=$,C&&(i($),r==="uncontrolled"&&(a.current=$)),t?.($,K),S?.filter(Boolean).forEach(V=>V({updatedValues:$,previousValues:K}))},[t]),m=f.useCallback(y=>{const S=B(y.path,a.current),C=y.value instanceof Function?y.value(S):y.value;if(S!==C){const z=a.current,K=pe(y.path,C,a.current);u({values:K,updateState:y.updateState}),y.subscribers?.filter(Boolean).forEach(Y=>Y({path:y.path,updatedValues:K,previousValues:z}))}},[u]),D=f.useCallback(y=>{c.current=y},[]),x=f.useCallback((y,S)=>{n.current||(n.current=!0,u({values:y,updateState:r==="controlled"}),D(y),S())},[u]),j=f.useCallback(()=>{u({values:c.current,updateState:!0,mergeWithPreviousValues:!1})},[u]),P=f.useCallback(()=>a.current,[]),O=f.useCallback(()=>c.current,[]),b=f.useCallback((y,S)=>{const C=B(y,c.current);typeof C>"u"||m({path:y,value:C,updateState:r==="controlled",subscribers:S})},[m,r]);return{initialized:n,stateValues:s,refValues:a,valuesSnapshot:c,setValues:u,setFieldValue:m,resetValues:j,setValuesSnapshot:D,initialize:x,getValues:P,getValuesSnapshot:O,resetField:b}}function dr({$status:e,cascadeUpdates:t}){const r=f.useRef({}),n=f.useCallback((i,a)=>{f.useEffect(()=>(r.current[i]=r.current[i]||[],r.current[i].push(a),()=>{r.current[i]=r.current[i].filter(c=>c!==a)}),[a])},[]),s=f.useCallback(i=>{const a=r.current[i]?.map(c=>u=>c({previousValue:B(i,u.previousValues),value:B(i,u.updatedValues),touched:e.isTouched(i),dirty:e.isDirty(i)}))??[];if(t)for(const c in r.current)(c.startsWith(`${i}.`)||i.startsWith(`${c}.`))&&a.push(...r.current[c].map(u=>m=>u({previousValue:B(c,m.previousValues),value:B(c,m.updatedValues),touched:e.isTouched(c),dirty:e.isDirty(c)})));return a},[]);return{subscribers:r,watch:n,getFieldSubscribers:s}}function Xe(e,t){return e?`${e}-${t.toString()}`:t.toString()}const $e=Symbol("root-rule");function Qe(e){const t=Fe(e);return{hasErrors:Object.keys(t).length>0,errors:t}}function Ve(e,t,r="",n={}){return typeof e!="object"||e===null?n:Object.keys(e).reduce((s,i)=>{const a=e[i],c=`${r===""?"":`${r}.`}${i}`,u=B(c,t);let m=!1;return typeof a=="function"&&(s[c]=a(u,t,c)),typeof a=="object"&&Array.isArray(u)&&(m=!0,u.forEach((D,x)=>Ve(a,t,`${c}.${x}`,s)),$e in a&&(s[c]=a[$e](u,t,c))),typeof a=="object"&&typeof u=="object"&&u!==null&&(m||Ve(a,t,c,s),$e in a&&(s[c]=a[$e](u,t,c))),s},n)}function Ae(e,t){return Qe(typeof e=="function"?e(t):Ve(e,t))}function ke(e,t,r){if(typeof e!="string")return{hasError:!1,error:null};const n=Ae(t,r),s=Object.keys(n.errors).find(i=>e.split(".").every((a,c)=>a===i.split(".")[c]));return{hasError:!!s,error:s?n.errors[s]:null}}const fr="__MANTINE_FORM_INDEX__";function et(e,t){return t?typeof t=="boolean"?t:Array.isArray(t)?t.includes(e.replace(/[.][0-9]+/g,`.${fr}`)):!1:!1}function lt({name:e,mode:t="controlled",initialValues:r,initialErrors:n={},initialDirty:s={},initialTouched:i={},clearInputErrorOnChange:a=!0,validateInputOnChange:c=!1,validateInputOnBlur:u=!1,onValuesChange:m,transformValues:D=(y=>y),enhanceGetInputProps:x,validate:j,onSubmitPreventDefault:P="always",touchTrigger:O="change",cascadeUpdates:b=!1}={}){const y=er(n),S=lr({initialValues:r,onValuesChange:m,mode:t}),C=ur({initialDirty:s,initialTouched:i,$values:S,mode:t}),z=ir({$values:S,$errors:y,$status:C}),K=dr({$status:C,cascadeUpdates:b}),[Y,$]=f.useState(0),[V,L]=f.useState({}),[N,R]=f.useState(!1),A=f.useCallback(()=>{S.resetValues(),y.clearErrors(),C.resetDirty(),C.resetTouched(),t==="uncontrolled"&&$(p=>p+1)},[]),Q=f.useCallback(p=>{a&&y.clearErrors(),t==="uncontrolled"&&$(_=>_+1),Object.keys(K.subscribers.current).forEach(_=>{const W=B(_,S.refValues.current),U=B(_,p);W!==U&&K.getFieldSubscribers(_).forEach(Z=>Z({previousValues:p,updatedValues:S.refValues.current}))})},[a]),re=f.useCallback(p=>{const _=S.refValues.current;S.initialize(p,()=>t==="uncontrolled"&&$(W=>W+1)),Q(_)},[Q]),E=f.useCallback((p,_,W)=>{const U=et(p,c),Z=_ instanceof Function?_(B(p,S.refValues.current)):_;C.setCalculatedFieldDirty(p,Z),O==="change"&&C.setFieldTouched(p,!0),!U&&a&&y.clearFieldError(p),S.setFieldValue({path:p,value:_,updateState:t==="controlled",subscribers:[...K.getFieldSubscribers(p),U?ee=>{const G=ke(p,j,ee.updatedValues);G.hasError?y.setFieldError(p,G.error):y.clearFieldError(p)}:null,W?.forceUpdate!==!1&&t!=="controlled"?()=>L(ee=>({...ee,[p]:(ee[p]||0)+1})):null]})},[m,j]),v=f.useCallback(p=>{const _=S.refValues.current;S.setValues({values:p,updateState:t==="controlled"}),Q(_)},[m,Q]),h=f.useCallback(()=>{const p=Ae(j,S.refValues.current);return y.setErrors(p.errors),p},[j]),k=f.useCallback(p=>{const _=ke(p,j,S.refValues.current);return _.hasError?y.setFieldError(p,_.error):y.clearFieldError(p),_},[j]),T=(p,{type:_="input",withError:W=!0,withFocus:U=!0,...Z}={})=>{const G={onChange:Qt(be=>E(p,be,{forceUpdate:!1})),"data-path":Xe(e,p)};return W&&(G.error=y.errorsState[p]),_==="checkbox"?G[t==="controlled"?"checked":"defaultChecked"]=B(p,S.refValues.current):G[t==="controlled"?"value":"defaultValue"]=B(p,S.refValues.current),U&&(G.onFocus=()=>C.setFieldTouched(p,!0),G.onBlur=()=>{if(et(p,u)){const be=ke(p,j,S.refValues.current);be.hasError?y.setFieldError(p,be.error):y.clearFieldError(p)}}),Object.assign(G,x?.({inputProps:G,field:p,options:{type:_,withError:W,withFocus:U,...Z},form:X}))},F=(p,_)=>W=>{P==="always"&&W?.preventDefault();const U=h();if(U.hasErrors)P==="validation-failed"&&W?.preventDefault(),_?.(U.errors,S.refValues.current,W);else{const Z=p?.(D(S.refValues.current),W);Z instanceof Promise&&(R(!0),Z.finally(()=>R(!1)))}},o=p=>D(p||S.refValues.current),g=f.useCallback(p=>{p.preventDefault(),A()},[]),M=f.useCallback(p=>p?!ke(p,j,S.refValues.current).hasError:!Ae(j,S.refValues.current).hasErrors,[j]),I=p=>`${Y}-${String(p)}-${V[String(p)]||0}`,q=f.useCallback(p=>document.querySelector(`[data-path="${Xe(e,p)}"]`),[]),H=f.useCallback(p=>{S.resetField(p,[t!=="controlled"?()=>L(_=>({..._,[p]:(_[p]||0)+1})):null])},[S.resetField,t,L]),X={watch:K.watch,initialized:S.initialized.current,values:t==="uncontrolled"?S.refValues.current:S.stateValues,getValues:S.getValues,getInitialValues:S.getValuesSnapshot,setInitialValues:S.setValuesSnapshot,resetField:H,initialize:re,setValues:v,setFieldValue:E,submitting:N,setSubmitting:R,errors:y.errorsState,setErrors:y.setErrors,setFieldError:y.setFieldError,clearFieldError:y.clearFieldError,clearErrors:y.clearErrors,resetDirty:C.resetDirty,setTouched:C.setTouched,setDirty:C.setDirty,isTouched:C.isTouched,resetTouched:C.resetTouched,isDirty:C.isDirty,getTouched:C.getTouched,getDirty:C.getDirty,reorderListItem:z.reorderListItem,insertListItem:z.insertListItem,removeListItem:z.removeListItem,replaceListItem:z.replaceListItem,reset:A,validate:h,validateField:k,getInputProps:T,onSubmit:F,onReset:g,isValid:M,getTransformedValues:o,key:I,getInputNode:q};return Xt(e,X),X}const mr=({tzRange:e})=>{const t=lt({initialValues:{date:it(),time:fe(),duration:ct.OneDay},validate:{date:n=>n?null:"Date is required",time:n=>n?null:"Time is required",duration:n=>n?null:"Duration is required"}}),r=n=>{if(!e.timezone.name)return;const s=he(n.date,n.time,e.timezone.name),i=ye(s,e.timezone.name),{startDate:a,startTime:c,endDate:u,endTime:m}=Zt(i.date,i.time,n.duration);e.onApply({startDate:a,startTime:c,endDate:u,endTime:m,timezone:e.timezone})};return l.jsx(w.Flex,{direction:"column",flex:2,justify:"space-between",style:{height:"100%"},px:12,children:l.jsxs("form",{className:Le["form-container"],onSubmit:t.onSubmit(r),children:[l.jsxs(w.Box,{children:[l.jsx(w.Text,{fw:600,children:"Around a time"}),l.jsxs(w.Flex,{direction:"column",gap:8,mt:12,children:[l.jsx(oe.DatePickerInput,{label:"Pick date",placeholder:"Pick date",...t.getInputProps("date"),popoverProps:{withinPortal:!1},valueFormat:te,leftSection:l.jsx(Me,{stroke:1.5})},t.key("date")),l.jsx(oe.TimeInput,{label:"Pick time",placeholder:"Pick time",withSeconds:!0,...t.getInputProps("time"),leftSection:l.jsx(Ee,{stroke:1.5}),rightSection:l.jsx(w.Text,{style:{fontSize:12,fontStyle:"italic",textAlign:"right"},children:e.timezone?.longName}),rightSectionWidth:180,rightSectionProps:{style:{paddingRight:1}}},t.key("time")),l.jsx(w.Select,{label:"Duration",placeholder:"Pick value",data:Bt,...t.getInputProps("duration"),comboboxProps:{withinPortal:!1}},t.key("duration"))]})]}),l.jsx(Re,{})]})})},hr=({tzRange:e})=>{const t=lt({mode:"uncontrolled",initialValues:{startDate:it(),startTime:fe(),endDate:Ut(30),endTime:fe()},validate:{startDate:n=>n?null:"Start date is required",startTime:n=>n?null:"Start time is required",endDate:(n,s)=>{if(!n)return"End date is required";const i=d(`${s.startDate} ${s.startTime}`),a=d(`${n} ${s.endTime}`);return a.isAfter(i)||a.isSame(i)?null:"End time must be after start time"},endTime:(n,s)=>{if(!n)return"End time is required";const i=d(`${s.startDate} ${s.startTime}`),a=d(`${s.endDate} ${n}`);return a.isAfter(i)||a.isSame(i)?null:"End time must be after start time"}}}),r=n=>{if(!e.timezone.name)return;const s=he(n.startDate,n.startTime,e.timezone.name),i=he(n.endDate,n.endTime,e.timezone.name),a=ye(s,e.timezone.name),c=ye(i,e.timezone.name);e.onApply({startDate:a.date,startTime:a.time,endDate:c.date,endTime:c.time,timezone:e.timezone})};return l.jsx(w.Flex,{direction:"column",flex:2,style:{height:"100%"},px:12,children:l.jsxs("form",{className:Le["form-container"],onSubmit:t.onSubmit(r),children:[l.jsxs(w.Box,{children:[l.jsx(w.Text,{fw:600,children:"Start and end times"}),l.jsxs(w.Flex,{direction:"column",gap:8,mt:12,children:[l.jsx(oe.DatePickerInput,{label:"Start time",...t.getInputProps("startDate"),popoverProps:{withinPortal:!1},valueFormat:te,leftSection:l.jsx(Me,{stroke:1.5})},t.key("startDate")),l.jsx(oe.TimeInput,{withSeconds:!0,defaultValue:fe(),...t.getInputProps("startTime"),leftSection:l.jsx(Ee,{stroke:1.5}),rightSection:l.jsx(w.Text,{style:{fontSize:12,fontStyle:"italic"},children:e.timezone?.longName}),rightSectionWidth:180,rightSectionProps:{style:{paddingRight:1}}},t.key("startTime")),l.jsx(oe.DatePickerInput,{label:"End time",...t.getInputProps("endDate"),popoverProps:{withinPortal:!1},valueFormat:te,leftSection:l.jsx(Me,{stroke:1.5})},t.key("endDate")),l.jsx(oe.TimeInput,{withSeconds:!0,defaultValue:fe(),...t.getInputProps("endTime"),leftSection:l.jsx(Ee,{stroke:1.5}),rightSection:l.jsx(w.Text,{style:{fontSize:12,fontStyle:"italic"},children:e.timezone?.longName}),rightSectionWidth:180,rightSectionProps:{style:{paddingRight:1}}},t.key("endTime"))]})]}),l.jsx(Re,{})]})})};var me=(e=>(e.START_END_TIME="Start and end times",e.AROUND_TIME="Around a time",e.TIMEZONE="Time zone",e))(me||{});const yr=e=>{const[t,r]=f.useState("Start and end times"),{popoverOpened:n,setPopoverOpened:s}=ot(),i=()=>{switch(t){case"Start and end times":return l.jsx(hr,{tzRange:e});case"Around a time":return l.jsx(mr,{tzRange:e});case"Time zone":return l.jsx(at,{tzRange:e});default:return null}},a=()=>{s(u=>!u)},c=f.useMemo(()=>qt(e),[e.startDate,e.startTime,e.endDate,e.endTime,e.timezone]);return l.jsxs(w.Popover,{position:"bottom",shadow:"md",opened:n,onChange:s,children:[l.jsx(w.Popover.Target,{children:l.jsx(w.Button,{onClick:a,style:e.buttonStyle||{},children:c})}),l.jsx(w.Popover.Dropdown,{style:{width:700,height:400,padding:0},py:8,children:l.jsxs(w.Flex,{style:{height:"100%"},children:[l.jsx(Ht,{tzRange:e,setSelectedPanel:r}),i()]})})]})},Tr=e=>l.jsx(Kt,{children:l.jsx(yr,{...e})});exports.Panel=me;exports.TimezonePanel=at;exports.TimezoneRangePicker=Tr;
|
|
62
|
+
*/const Ot=[["path",{d:"M16 2c.183 0 .355 .05 .502 .135l.033 .02c.28 .177 .465 .49 .465 .845v1h1a3 3 0 0 1 2.995 2.824l.005 .176v12a3 3 0 0 1 -2.824 2.995l-.176 .005h-12a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-12a3 3 0 0 1 2.824 -2.995l.176 -.005h1v-1a1 1 0 0 1 .514 -.874l.093 -.046l.066 -.025l.1 -.029l.107 -.019l.12 -.007q .083 0 .161 .013l.122 .029l.04 .012l.06 .023c.328 .135 .568 .44 .61 .806l.007 .117v1h6v-1a1 1 0 0 1 1 -1m3 7h-14v9.625c0 .705 .386 1.286 .883 1.366l.117 .009h12c.513 0 .936 -.53 .993 -1.215l.007 -.16z",key:"svg-0"}],["path",{d:"M9.015 13a1 1 0 0 1 -1 1a1.001 1.001 0 1 1 -.005 -2c.557 0 1.005 .448 1.005 1",key:"svg-1"}],["path",{d:"M13.015 13a1 1 0 0 1 -1 1a1.001 1.001 0 1 1 -.005 -2c.557 0 1.005 .448 1.005 1",key:"svg-2"}],["path",{d:"M17.02 13a1 1 0 0 1 -1 1a1.001 1.001 0 1 1 -.005 -2c.557 0 1.005 .448 1.005 1",key:"svg-3"}],["path",{d:"M12.02 15a1 1 0 0 1 0 2a1.001 1.001 0 1 1 -.005 -2z",key:"svg-4"}],["path",{d:"M9.015 16a1 1 0 0 1 -1 1a1.001 1.001 0 1 1 -.005 -2c.557 0 1.005 .448 1.005 1",key:"svg-5"}]],Mt=le("filled","calendar-week-filled","CalendarWeekFilled",Ot),Ct=({searchText:e,setSearchText:t})=>l.jsx(D.Input,{placeholder:"Timezone search (Asia, Tokyo, +09:00, etc)",leftSection:l.jsx(jt,{stroke:2}),value:e,onChange:r=>t(r.currentTarget.value)});var _e={exports:{}},Ft=_e.exports,Ze;function Pt(){return Ze||(Ze=1,(function(e,t){(function(r,n){e.exports=n()})(Ft,(function(){var r=1e3,n=6e4,s=36e5,c="millisecond",o="second",u="minute",i="hour",d="day",g="week",_="month",$="quarter",j="year",O="date",v="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,S=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(E){var b=["th","st","nd","rd"],y=E%100;return"["+E+(b[(y-20)%10]||b[y]||b[0])+"]"}},Y=function(E,b,y){var w=String(E);return!w||w.length>=b?E:""+Array(b+1-w.length).join(y)+E},N={s:Y,z:function(E){var b=-E.utcOffset(),y=Math.abs(b),w=Math.floor(y/60),p=y%60;return(b<=0?"+":"-")+Y(w,2,"0")+":"+Y(p,2,"0")},m:function E(b,y){if(b.date()<y.date())return-E(y,b);var w=12*(y.year()-b.year())+(y.month()-b.month()),p=b.clone().add(w,_),P=y-p<0,a=b.clone().add(w+(P?-1:1),_);return+(-(w+(y-p)/(P?p-a:a-p))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:_,y:j,w:g,d,D:O,h:i,m:u,s:o,ms:c,Q:$}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},R="en",k={};k[R]=C;var A="$isDayjsObject",L=function(E){return E instanceof X||!(!E||!E[A])},q=function E(b,y,w){var p;if(!b)return R;if(typeof b=="string"){var P=b.toLowerCase();k[P]&&(p=P),y&&(k[P]=y,p=P);var a=b.split("-");if(!p&&a.length>1)return E(a[0])}else{var x=b.name;k[x]=b,p=x}return!w&&p&&(R=p),p||!w&&R},z=function(E,b){if(L(E))return E.clone();var y=typeof b=="object"?b:{};return y.date=E,y.args=arguments,new X(y)},V=N;V.l=q,V.i=L,V.w=function(E,b){return z(E,{locale:b.$L,utc:b.$u,x:b.$x,$offset:b.$offset})};var X=(function(){function E(y){this.$L=q(y.locale,null,!0),this.parse(y),this.$x=this.$x||y.x||{},this[A]=!0}var b=E.prototype;return b.parse=function(y){this.$d=(function(w){var p=w.date,P=w.utc;if(p===null)return new Date(NaN);if(V.u(p))return new Date;if(p instanceof Date)return new Date(p);if(typeof p=="string"&&!/Z$/i.test(p)){var a=p.match(h);if(a){var x=a[2]-1||0,F=(a[7]||"0").substring(0,3);return P?new Date(Date.UTC(a[1],x,a[3]||1,a[4]||0,a[5]||0,a[6]||0,F)):new Date(a[1],x,a[3]||1,a[4]||0,a[5]||0,a[6]||0,F)}}return new Date(p)})(y),this.init()},b.init=function(){var y=this.$d;this.$y=y.getFullYear(),this.$M=y.getMonth(),this.$D=y.getDate(),this.$W=y.getDay(),this.$H=y.getHours(),this.$m=y.getMinutes(),this.$s=y.getSeconds(),this.$ms=y.getMilliseconds()},b.$utils=function(){return V},b.isValid=function(){return this.$d.toString()!==v},b.isSame=function(y,w){var p=z(y);return this.startOf(w)<=p&&p<=this.endOf(w)},b.isAfter=function(y,w){return z(y)<this.startOf(w)},b.isBefore=function(y,w){return this.endOf(w)<z(y)},b.$g=function(y,w,p){return V.u(y)?this[w]:this.set(p,y)},b.unix=function(){return Math.floor(this.valueOf()/1e3)},b.valueOf=function(){return this.$d.getTime()},b.startOf=function(y,w){var p=this,P=!!V.u(w)||w,a=V.p(y),x=function(W,K){var Z=V.w(p.$u?Date.UTC(p.$y,K,W):new Date(p.$y,K,W),p);return P?Z:Z.endOf(d)},F=function(W,K){return V.w(p.toDate()[W].apply(p.toDate("s"),(P?[0,0,0,0]:[23,59,59,999]).slice(K)),p)},I=this.$W,U=this.$M,H=this.$D,G="set"+(this.$u?"UTC":"");switch(a){case j:return P?x(1,0):x(31,11);case _:return P?x(1,U):x(0,U+1);case g:var T=this.$locale().weekStart||0,M=(I<T?I+7:I)-T;return x(P?H-M:H+(6-M),U);case d:case O:return F(G+"Hours",0);case i:return F(G+"Minutes",1);case u:return F(G+"Seconds",2);case o:return F(G+"Milliseconds",3);default:return this.clone()}},b.endOf=function(y){return this.startOf(y,!1)},b.$set=function(y,w){var p,P=V.p(y),a="set"+(this.$u?"UTC":""),x=(p={},p[d]=a+"Date",p[O]=a+"Date",p[_]=a+"Month",p[j]=a+"FullYear",p[i]=a+"Hours",p[u]=a+"Minutes",p[o]=a+"Seconds",p[c]=a+"Milliseconds",p)[P],F=P===d?this.$D+(w-this.$W):w;if(P===_||P===j){var I=this.clone().set(O,1);I.$d[x](F),I.init(),this.$d=I.set(O,Math.min(this.$D,I.daysInMonth())).$d}else x&&this.$d[x](F);return this.init(),this},b.set=function(y,w){return this.clone().$set(y,w)},b.get=function(y){return this[V.p(y)]()},b.add=function(y,w){var p,P=this;y=Number(y);var a=V.p(w),x=function(U){var H=z(P);return V.w(H.date(H.date()+Math.round(U*y)),P)};if(a===_)return this.set(_,this.$M+y);if(a===j)return this.set(j,this.$y+y);if(a===d)return x(1);if(a===g)return x(7);var F=(p={},p[u]=n,p[i]=s,p[o]=r,p)[a]||1,I=this.$d.getTime()+y*F;return V.w(I,this)},b.subtract=function(y,w){return this.add(-1*y,w)},b.format=function(y){var w=this,p=this.$locale();if(!this.isValid())return p.invalidDate||v;var P=y||"YYYY-MM-DDTHH:mm:ssZ",a=V.z(this),x=this.$H,F=this.$m,I=this.$M,U=p.weekdays,H=p.months,G=p.meridiem,T=function(K,Z,te,Q){return K&&(K[Z]||K(w,P))||te[Z].slice(0,Q)},M=function(K){return V.s(x%12||12,K,"0")},W=G||function(K,Z,te){var Q=K<12?"AM":"PM";return te?Q.toLowerCase():Q};return P.replace(S,(function(K,Z){return Z||(function(te){switch(te){case"YY":return String(w.$y).slice(-2);case"YYYY":return V.s(w.$y,4,"0");case"M":return I+1;case"MM":return V.s(I+1,2,"0");case"MMM":return T(p.monthsShort,I,H,3);case"MMMM":return T(H,I);case"D":return w.$D;case"DD":return V.s(w.$D,2,"0");case"d":return String(w.$W);case"dd":return T(p.weekdaysMin,w.$W,U,2);case"ddd":return T(p.weekdaysShort,w.$W,U,3);case"dddd":return U[w.$W];case"H":return String(x);case"HH":return V.s(x,2,"0");case"h":return M(1);case"hh":return M(2);case"a":return W(x,F,!0);case"A":return W(x,F,!1);case"m":return String(F);case"mm":return V.s(F,2,"0");case"s":return String(w.$s);case"ss":return V.s(w.$s,2,"0");case"SSS":return V.s(w.$ms,3,"0");case"Z":return a}return null})(K)||a.replace(":","")}))},b.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},b.diff=function(y,w,p){var P,a=this,x=V.p(w),F=z(y),I=(F.utcOffset()-this.utcOffset())*n,U=this-F,H=function(){return V.m(a,F)};switch(x){case j:P=H()/12;break;case _:P=H();break;case $:P=H()/3;break;case g:P=(U-I)/6048e5;break;case d:P=(U-I)/864e5;break;case i:P=U/s;break;case u:P=U/n;break;case o:P=U/r;break;default:P=U}return p?P:V.a(P)},b.daysInMonth=function(){return this.endOf(_).$D},b.$locale=function(){return k[this.$L]},b.locale=function(y,w){if(!y)return this.$L;var p=this.clone(),P=q(y,w,!0);return P&&(p.$L=P),p},b.clone=function(){return V.w(this.$d,this)},b.toDate=function(){return new Date(this.valueOf())},b.toJSON=function(){return this.isValid()?this.toISOString():null},b.toISOString=function(){return this.$d.toISOString()},b.toString=function(){return this.$d.toUTCString()},E})(),se=X.prototype;return z.prototype=se,[["$ms",c],["$s",o],["$m",u],["$H",i],["$W",d],["$M",_],["$y",j],["$D",O]].forEach((function(E){se[E[1]]=function(b){return this.$g(b,E[0],E[1])}})),z.extend=function(E,b){return E.$i||(E(b,X,z),E.$i=!0),z},z.locale=q,z.isDayjs=L,z.unix=function(E){return z(1e3*E)},z.en=k[R],z.Ls=k,z.p={},z}))})(_e)),_e.exports}var At=Pt();const f=Ce(At);var Ee={exports:{}},Vt=Ee.exports,Je;function It(){return Je||(Je=1,(function(e,t){(function(r,n){e.exports=n()})(Vt,(function(){var r="minute",n=/[+-]\d\d(?::?\d\d)?/g,s=/([+-]|\d\d)/g;return function(c,o,u){var i=o.prototype;u.utc=function(v){var h={date:v,utc:!0,args:arguments};return new o(h)},i.utc=function(v){var h=u(this.toDate(),{locale:this.$L,utc:!0});return v?h.add(this.utcOffset(),r):h},i.local=function(){return u(this.toDate(),{locale:this.$L,utc:!1})};var d=i.parse;i.parse=function(v){v.utc&&(this.$u=!0),this.$utils().u(v.$offset)||(this.$offset=v.$offset),d.call(this,v)};var g=i.init;i.init=function(){if(this.$u){var v=this.$d;this.$y=v.getUTCFullYear(),this.$M=v.getUTCMonth(),this.$D=v.getUTCDate(),this.$W=v.getUTCDay(),this.$H=v.getUTCHours(),this.$m=v.getUTCMinutes(),this.$s=v.getUTCSeconds(),this.$ms=v.getUTCMilliseconds()}else g.call(this)};var _=i.utcOffset;i.utcOffset=function(v,h){var S=this.$utils().u;if(S(v))return this.$u?0:S(this.$offset)?_.call(this):this.$offset;if(typeof v=="string"&&(v=(function(R){R===void 0&&(R="");var k=R.match(n);if(!k)return null;var A=(""+k[0]).match(s)||["-",0,0],L=A[0],q=60*+A[1]+ +A[2];return q===0?0:L==="+"?q:-q})(v),v===null))return this;var C=Math.abs(v)<=16?60*v:v;if(C===0)return this.utc(h);var Y=this.clone();if(h)return Y.$offset=C,Y.$u=!1,Y;var N=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(Y=this.local().add(C+N,r)).$offset=C,Y.$x.$localOffset=N,Y};var $=i.format;i.format=function(v){var h=v||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return $.call(this,h)},i.valueOf=function(){var v=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*v},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var j=i.toDate;i.toDate=function(v){return v==="s"&&this.$offset?u(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():j.call(this)};var O=i.diff;i.diff=function(v,h,S){if(v&&this.$u===v.$u)return O.call(this,v,h,S);var C=this.local(),Y=u(v).local();return O.call(C,Y,h,S)}}}))})(Ee)),Ee.exports}var Lt=It();const zt=Ce(Lt);var Oe={exports:{}},Yt=Oe.exports,Qe;function Rt(){return Qe||(Qe=1,(function(e,t){(function(r,n){e.exports=n()})(Yt,(function(){var r={year:0,month:1,day:2,hour:3,minute:4,second:5},n={};return function(s,c,o){var u,i=function($,j,O){O===void 0&&(O={});var v=new Date($),h=(function(S,C){C===void 0&&(C={});var Y=C.timeZoneName||"short",N=S+"|"+Y,R=n[N];return R||(R=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:S,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:Y}),n[N]=R),R})(j,O);return h.formatToParts(v)},d=function($,j){for(var O=i($,j),v=[],h=0;h<O.length;h+=1){var S=O[h],C=S.type,Y=S.value,N=r[C];N>=0&&(v[N]=parseInt(Y,10))}var R=v[3],k=R===24?0:R,A=v[0]+"-"+v[1]+"-"+v[2]+" "+k+":"+v[4]+":"+v[5]+":000",L=+$;return(o.utc(A).valueOf()-(L-=L%1e3))/6e4},g=c.prototype;g.tz=function($,j){$===void 0&&($=u);var O,v=this.utcOffset(),h=this.toDate(),S=h.toLocaleString("en-US",{timeZone:$}),C=Math.round((h-new Date(S))/1e3/60),Y=15*-Math.round(h.getTimezoneOffset()/15)-C;if(!Number(Y))O=this.utcOffset(0,j);else if(O=o(S,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(Y,!0),j){var N=O.utcOffset();O=O.add(v-N,"minute")}return O.$x.$timezone=$,O},g.offsetName=function($){var j=this.$x.$timezone||o.tz.guess(),O=i(this.valueOf(),j,{timeZoneName:$}).find((function(v){return v.type.toLowerCase()==="timezonename"}));return O&&O.value};var _=g.startOf;g.startOf=function($,j){if(!this.$x||!this.$x.$timezone)return _.call(this,$,j);var O=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return _.call(O,$,j).tz(this.$x.$timezone,!0)},o.tz=function($,j,O){var v=O&&j,h=O||j||u,S=d(+o(),h);if(typeof $!="string")return o($).tz(h);var C=(function(k,A,L){var q=k-60*A*1e3,z=d(q,L);if(A===z)return[q,A];var V=d(q-=60*(z-A)*1e3,L);return z===V?[q,z]:[k-60*Math.min(z,V)*1e3,Math.max(z,V)]})(o.utc($,v).valueOf(),S,h),Y=C[0],N=C[1],R=o(Y).utcOffset(N);return R.$x.$timezone=h,R},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function($){u=$}}}))})(Oe)),Oe.exports}var Nt=Rt();const Kt=Ce(Nt),Wt=(e,t="en-US")=>new Intl.DateTimeFormat(t,{timeZone:e,timeZoneName:"long"}).formatToParts(new Date).find(r=>r.type==="timeZoneName")?.value||"",Ut=e=>{const t=e[0]==="-"?-1:1,[r,n]=e.slice(1).split(":").map(Number);return t*(r*60+n)};f.extend(zt);f.extend(Kt);const qt=()=>Intl.supportedValuesOf("timeZone").map(t=>{const r=f().tz(t).format("Z");return{name:t,longName:Wt(t),currentTime:f().tz(t).format("h:mm A"),utcOffset:r,offsetMinutes:Ut(r)}}).sort((t,r)=>t.offsetMinutes-r.offsetMinutes),De={"timezone-panel-container":"_timezone-panel-container_tykz4_1","search-container":"_search-container_tykz4_6","timezone-scroll-area":"_timezone-scroll-area_tykz4_15","list-container":"_list-container_tykz4_21"},Ke={"form-container":"_form-container_1xxf4_1"},dt=m.createContext(void 0),de=()=>{const e=m.useContext(dt);if(!e)throw new Error("usePopoverContext must be used within a PopoverProvider");return e},Ht=({children:e})=>{const[t,r]=m.useState(!1),n=()=>{r(!1)};return l.jsx(dt.Provider,{value:{popoverOpened:t,setPopoverOpened:r,closePopover:n},children:e})},We=()=>{const{theme:e}=Ne(),{closePopover:t}=de(),r=re.useMediaQuery("(max-width: 48em)"),n=re.useMediaQuery("(max-width: 64em)");return l.jsx(D.Flex,{justify:"flex-end",mt:12,pb:12,children:l.jsxs(D.Flex,{direction:r?"column":"row",gap:12,w:n?"100%":void 0,children:[l.jsx(D.Button,{size:"xs",variant:"subtle",color:e.primaryColor,onClick:t,fullWidth:n,children:"Cancel"}),l.jsx(D.Button,{type:"submit",size:"xs",color:e.primaryColor,fullWidth:n,children:"Apply"})]})})},ee="YYYY/MM/DD",ue="HH:mm:ss",Ie=e=>e.timezone.name?f().tz(e.timezone.name).format(ue):f().format(ue),ft=e=>e.timezone.name?f().tz(e.timezone.name).format(ee):f().format(ee),Bt=e=>f().add(e,"day").format(ee),Zt=e=>e&&f().tz(e).format("Z"),Pe=(e,t="desktop")=>{const r=e.startDate?f(e.startDate):null,n=e.endDate?f(e.endDate):null,s=Zt(e.timezone.name);return!r||!n||!e.startTime||!e.endTime?"Select range":t==="mobile"?r.isSame(n,"day")?`${r.format("MMM D")} · ${e.startTime}`:`${r.format("MMM D")}–${n.format("MMM D")}`:t==="tablet"?`${r.format("MMM D, HH:mm")} → ${n.format("MMM D, HH:mm")}${s?` (${s})`:""}`:`${r.format(ee)} ${e.startTime} - ${n.format(ee)} ${e.endTime}${s?` (${s})`:""}`},oe=(e,t,r,n)=>{const s=f(`${e} ${t}`).subtract(r,n);return{date:s.format(ee),time:s.format(ue)}},ie=(e,t,r,n)=>{const s=f(`${e} ${t}`).add(r,n);return{date:s.format(ee),time:s.format(ue)}},ve=(e,t,r)=>f.tz(`${e} ${t}`,`${ee} ${ue}`,r).utc().toISOString(),xe=(e,t)=>{const r=f.utc(e).tz(t);return{date:r.format(ee),time:r.format(ue)}},mt=({tzRange:e})=>{const[t,r]=m.useState(e.timezone),[n,s]=m.useState([]),[c,o]=m.useState(""),u=re.useMediaQuery("(max-width: 64em)"),{closePopover:i}=de(),d=m.useMemo(()=>qt(),[]);m.useEffect(()=>{s(d)},[]),ct(()=>{if(c===""){s(d);return}s(d.filter(j=>j.name.toLowerCase().includes(c.toLocaleLowerCase())||j.longName.toLowerCase().includes(c.toLocaleLowerCase())||j.currentTime.toLowerCase().includes(c.toLocaleLowerCase())||j.utcOffset.toLowerCase().includes(c.toLocaleLowerCase())))},250,[c]);const g=j=>{r(j)},_=j=>{if(j.preventDefault(),!t?.name||!e.timezone.name||!e.startDate||!e.startTime||!e.endDate||!e.endTime)return;const O=ve(e.startDate,e.startTime,e.timezone.name),v=ve(e.endDate,e.endTime,e.timezone.name),h=xe(O,t.name),S=xe(v,t.name);e.onApply({startDate:h.date,startTime:h.time,endDate:S.date,endTime:S.time,timezone:t||{name:null,longName:null,utcOffset:null}}),u&&i()},$=j=>j?f().tz(j).format("h:mm A"):"";return l.jsxs("form",{className:Ke["form-container"],onSubmit:_,children:[l.jsxs(D.Flex,{direction:"column",className:De["timezone-panel-container"],children:[l.jsx(D.Box,{className:De["search-container"],children:l.jsx(Ct,{searchText:c,setSearchText:o})}),l.jsxs(D.Box,{className:De["timezone-scroll-area"],children:[l.jsx(D.Text,{fw:600,px:12,children:"My Location"}),l.jsx(D.Flex,{direction:"column",children:l.jsx(Be,{isBrowserTimezone:!0,name:e.timezone?.name,longName:e.timezone?.longName,currentTime:$(e.timezone?.name),utcOffset:e.timezone?.utcOffset,selectedTimezone:t})}),l.jsx(D.Text,{fw:600,px:12,children:"Locations"}),l.jsx(D.Flex,{direction:"column",className:De["list-container"],children:n.map((j,O)=>l.jsx(Be,{name:j.name,longName:j.longName,currentTime:j.currentTime,utcOffset:j.utcOffset,selectedTimezone:t,handleTimezoneMouseClick:g},O))})]})]}),l.jsx(D.Box,{px:12,children:l.jsx(We,{})})]})},ye={"sidebar-container":"_sidebar-container_1cvpv_1","sidebar-mobile-relative":"_sidebar-mobile-relative_1cvpv_11","sidebar-row":"_sidebar-row_1cvpv_17"},Ge=e=>[{label:"Today",searchKey:"today",startTime:f().tz(e).startOf("day").format(),endTime:f().tz(e).endOf("day").format()},{label:"Tomorrow",searchKey:"tomorrow",startTime:f().tz(e).add(1,"day").startOf("day").format(),endTime:f().tz(e).add(1,"day").endOf("day").format()},{label:"Yesterday",searchKey:"yesterday",startTime:f().tz(e).subtract(1,"day").startOf("day").format(),endTime:f().tz(e).subtract(1,"day").endOf("day").format(),lineBreak:!0},{label:"Last 15 seconds",searchKey:"-15s",startTime:f().tz(e).subtract(15,"second").format(),endTime:f().tz(e).format()},{label:"Last 30 seconds",searchKey:"-30s",startTime:f().tz(e).subtract(30,"second").format(),endTime:f().tz(e).format()},{label:"Next 15 seconds",searchKey:"+15s",startTime:f().tz(e).format(),endTime:f().tz(e).add(15,"second").format()},{label:"Next 30 seconds",searchKey:"+30s",startTime:f().tz(e).format(),endTime:f().tz(e).add(30,"second").format(),lineBreak:!0},{label:"Last 5 minutes",searchKey:"-5m",startTime:f().tz(e).subtract(5,"minute").format(),endTime:f().tz(e).format()},{label:"Last 10 minutes",searchKey:"-10m",startTime:f().tz(e).subtract(10,"minute").format(),endTime:f().tz(e).format()},{label:"Last 15 minutes",searchKey:"-15m",startTime:f().tz(e).subtract(15,"minute").format(),endTime:f().tz(e).format()},{label:"Last 30 minutes",searchKey:"-30m",startTime:f().tz(e).subtract(30,"minute").format(),endTime:f().tz(e).format()},{label:"Last 45 minutes",searchKey:"-45m",startTime:f().tz(e).subtract(45,"minute").format(),endTime:f().tz(e).format()},{label:"Next 5 minutes",searchKey:"+5m",startTime:f().tz(e).format(),endTime:f().tz(e).add(5,"minute").format()},{label:"Next 10 minutes",searchKey:"+10m",startTime:f().tz(e).format(),endTime:f().tz(e).add(10,"minute").format()},{label:"Next 15 minutes",searchKey:"+15m",startTime:f().tz(e).format(),endTime:f().tz(e).add(15,"minute").format()},{label:"Next 30 minutes",searchKey:"+30m",startTime:f().tz(e).format(),endTime:f().tz(e).add(30,"minute").format()},{label:"Next 45 minutes",searchKey:"+45m",startTime:f().tz(e).format(),endTime:f().tz(e).add(45,"minute").format(),lineBreak:!0},{label:"Last 1 hour",searchKey:"-1h",startTime:f().tz(e).subtract(1,"hour").format(),endTime:f().tz(e).format()},{label:"Last 3 hours",searchKey:"-3h",startTime:f().tz(e).subtract(3,"hour").format(),endTime:f().tz(e).format()},{label:"Last 6 hours",searchKey:"-6h",startTime:f().tz(e).subtract(6,"hour").format(),endTime:f().tz(e).format()},{label:"Last 12 hours",searchKey:"-12h",startTime:f().tz(e).subtract(12,"hour").format(),endTime:f().tz(e).format()},{label:"Next 1 hour",searchKey:"+1h",startTime:f().tz(e).format(),endTime:f().tz(e).add(1,"hour").format()},{label:"Next 3 hours",searchKey:"+3h",startTime:f().tz(e).format(),endTime:f().tz(e).add(3,"hour").format()},{label:"Next 6 hours",searchKey:"+6h",startTime:f().tz(e).format(),endTime:f().tz(e).add(6,"hour").format()},{label:"Next 12 hours",searchKey:"+12h",startTime:f().tz(e).format(),endTime:f().tz(e).add(12,"hour").format(),lineBreak:!0},{label:"Last 1 day",searchKey:"-1d",startTime:f().tz(e).subtract(1,"day").format(),endTime:f().tz(e).format()},{label:"Last 2 days",searchKey:"-2d",startTime:f().tz(e).subtract(2,"day").format(),endTime:f().tz(e).format()},{label:"Last 7 days",searchKey:"-7d",startTime:f().tz(e).subtract(7,"day").format(),endTime:f().tz(e).format()},{label:"Last 14 days",searchKey:"-14d",startTime:f().tz(e).subtract(14,"day").format(),endTime:f().tz(e).format()},{label:"Last 30 days",searchKey:"-30d",startTime:f().tz(e).subtract(30,"day").format(),endTime:f().tz(e).format()},{label:"Next 1 day",searchKey:"+1d",startTime:f().tz(e).format(),endTime:f().tz(e).add(1,"day").format()},{label:"Next 2 days",searchKey:"+2d",startTime:f().tz(e).format(),endTime:f().tz(e).add(2,"day").format()},{label:"Next 7 days",searchKey:"+7d",startTime:f().tz(e).format(),endTime:f().tz(e).add(7,"day").format()},{label:"Next 14 days",searchKey:"+14d",startTime:f().tz(e).format(),endTime:f().tz(e).add(14,"day").format()},{label:"Next 30 days",searchKey:"+30d",startTime:f().tz(e).format(),endTime:f().tz(e).add(30,"day").format()}],pe={"relative-time-root":"_relative-time-root_emohw_1","relative-time-panel-container":"_relative-time-panel-container_emohw_9","time-row":"_time-row_emohw_16","time-row-dark":"_time-row-dark_emohw_20","time-row-light":"_time-row-light_emohw_26"},Xe=({tzRange:e})=>{const[t,r]=m.useState([]),[n,s]=m.useState(""),{colorScheme:c}=Ne(),{closePopover:o}=de();m.useEffect(()=>{if(e.timezone.name!==null){const i=Ge(e.timezone.name);r(i)}},[e.timezone]),ct(()=>{if(n===""){r(Ge(e.timezone.name));return}const i=t.filter(d=>d.searchKey.includes(n));r(i)},250,[n]);const u=i=>{const[d,g]=i.startTime.split("T"),[_,$]=i.endTime.split("T");e.onApply({startDate:d,startTime:g.slice(0,8),endDate:_,endTime:$.slice(0,8),timezone:e.timezone}),o()};return l.jsxs(D.Flex,{direction:"column",className:pe["relative-time-root"],children:[l.jsx(D.Box,{style:{width:"90%"},mx:"auto",children:l.jsx(D.Input,{placeholder:"Relative time (15m, 1h, 1d, 1w)",value:n,onChange:i=>s(i.currentTarget.value)})}),l.jsx(D.Flex,{direction:"column",className:pe["relative-time-panel-container"],children:t.map(i=>l.jsxs(D.Flex,{align:"center",justify:"space-between",className:lt(c==="dark"?pe["time-row-dark"]:pe["time-row-light"],pe["time-row"]),py:4,px:12,mb:i.lineBreak?8:0,onClick:()=>u(i),children:[l.jsx(D.Text,{size:"sm",children:i.label}),l.jsx(D.Text,{size:"xs",c:"#5f6368",children:i.searchKey})]},i.label))})]})},et=({setSelectedPanel:e,tzRange:t,mobileOnlyRelative:r=!1})=>r?l.jsx(D.Box,{className:ye["sidebar-mobile-relative"],children:l.jsx(Xe,{tzRange:t})}):l.jsxs(D.Box,{className:ye["sidebar-container"],flex:1,children:[l.jsx(Xe,{tzRange:t}),l.jsxs(D.Flex,{direction:"column",rowGap:16,py:8,style:{borderTop:"1px solid #ddd"},children:[l.jsxs(D.Flex,{className:ye["sidebar-row"],justify:"space-between",align:"center",px:12,onClick:()=>e(be.START_END_TIME),children:[l.jsxs(D.Flex,{align:"center",children:[l.jsx(Mt,{stroke:1.5}),l.jsx(D.Text,{size:"sm",children:"Start and end times"})]}),l.jsx(Fe,{stroke:1.5})]}),l.jsxs(D.Flex,{className:ye["sidebar-row"],justify:"space-between",align:"center",px:12,onClick:()=>e(be.AROUND_TIME),children:[l.jsxs(D.Flex,{align:"center",children:[l.jsx(Me,{stroke:1.5}),l.jsx(D.Text,{size:"sm",children:"Around a time"})]}),l.jsx(Fe,{stroke:1.5})]}),l.jsxs(D.Flex,{className:ye["sidebar-row"],justify:"space-between",align:"center",px:12,onClick:()=>e(be.TIMEZONE),children:[l.jsxs(D.Flex,{align:"center",children:[l.jsx(Et,{stroke:1.5}),l.jsx(D.Text,{size:"sm",children:"Time zone"})]}),l.jsx(Fe,{stroke:1.5})]})]})]});var ht=(e=>(e.ThirtySeconds="± 30 seconds",e.OneMinute="± 1 minute",e.FifteenMinutes="± 15 minutes",e.ThirtyMinutes="± 30 minutes",e.OneHour="± 1 hour",e.OneDay="± 1 day",e))(ht||{});const Jt=["± 30 seconds","± 1 minute","± 15 minutes","± 30 minutes","± 1 hour","± 1 day"],Qt=(e,t,r)=>{switch(r){case"± 30 seconds":const n=oe(e,t,30,"second"),s=ie(e,t,30,"second");return{startDate:n.date,startTime:n.time,endDate:s.date,endTime:s.time};case"± 1 minute":const c=oe(e,t,1,"minute"),o=ie(e,t,1,"minute");return{startDate:c.date,startTime:c.time,endDate:o.date,endTime:o.time};case"± 15 minutes":const u=oe(e,t,15,"minute"),i=ie(e,t,15,"minute");return{startDate:u.date,startTime:u.time,endDate:i.date,endTime:i.time};case"± 30 minutes":const d=oe(e,t,30,"minute"),g=ie(e,t,30,"minute");return{startDate:d.date,startTime:d.time,endDate:g.date,endTime:g.time};case"± 1 hour":const _=oe(e,t,1,"hour"),$=ie(e,t,1,"hour");return{startDate:_.date,startTime:_.time,endDate:$.date,endTime:$.time};case"± 1 day":const j=oe(e,t,1,"day"),O=ie(e,t,1,"day");return{startDate:j.date,startTime:j.time,endDate:O.date,endTime:O.time};default:return{startDate:e,startTime:t,endDate:e,endTime:t}}};function Gt(e){if(!/^[0-9a-zA-Z-]+$/.test(e))throw new Error(`[@mantine/use-form] Form name "${e}" is invalid, it should contain only letters, numbers and dashes`)}const Xt=typeof window<"u"?m.useLayoutEffect:m.useEffect;function J(e,t){Xt(()=>{if(e)return window.addEventListener(e,t),()=>window.removeEventListener(e,t)},[e])}function er(e,t){e&&Gt(e),J(`mantine-form:${e}:set-field-value`,r=>t.setFieldValue(r.detail.path,r.detail.value)),J(`mantine-form:${e}:set-values`,r=>t.setValues(r.detail)),J(`mantine-form:${e}:set-initial-values`,r=>t.setInitialValues(r.detail)),J(`mantine-form:${e}:set-errors`,r=>t.setErrors(r.detail)),J(`mantine-form:${e}:set-field-error`,r=>t.setFieldError(r.detail.path,r.detail.error)),J(`mantine-form:${e}:clear-field-error`,r=>t.clearFieldError(r.detail)),J(`mantine-form:${e}:clear-errors`,t.clearErrors),J(`mantine-form:${e}:reset`,t.reset),J(`mantine-form:${e}:validate`,t.validate),J(`mantine-form:${e}:validate-field`,r=>t.validateField(r.detail)),J(`mantine-form:${e}:reorder-list-item`,r=>t.reorderListItem(r.detail.path,r.detail.payload)),J(`mantine-form:${e}:remove-list-item`,r=>t.removeListItem(r.detail.path,r.detail.index)),J(`mantine-form:${e}:insert-list-item`,r=>t.insertListItem(r.detail.path,r.detail.item,r.detail.index)),J(`mantine-form:${e}:set-dirty`,r=>t.setDirty(r.detail)),J(`mantine-form:${e}:set-touched`,r=>t.setTouched(r.detail)),J(`mantine-form:${e}:reset-dirty`,r=>t.resetDirty(r.detail)),J(`mantine-form:${e}:reset-touched`,t.resetTouched)}function tr(e){return t=>{if(!t)e(t);else if(typeof t=="function")e(t);else if(typeof t=="object"&&"nativeEvent"in t){const{currentTarget:r}=t;r instanceof HTMLInputElement?r.type==="checkbox"?e(r.checked):e(r.value):(r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement)&&e(r.value)}else e(t)}}function Le(e){return e===null||typeof e!="object"?{}:Object.keys(e).reduce((t,r)=>{const n=e[r];return n!=null&&n!==!1&&(t[r]=n),t},{})}function rr(e){const[t,r]=m.useState(Le(e)),n=m.useRef(t),s=m.useCallback(i=>{r(d=>{const g=Le(typeof i=="function"?i(d):i);return n.current=g,g})},[]),c=m.useCallback(()=>s({}),[]),o=m.useCallback(i=>{n.current[i]!==void 0&&s(d=>{const g={...d};return delete g[i],g})},[t]),u=m.useCallback((i,d)=>{d==null||d===!1?o(i):n.current[i]!==d&&s(g=>({...g,[i]:d}))},[t]);return{errorsState:t,setErrors:s,clearErrors:c,setFieldError:u,clearFieldError:o}}function ze(e,t){if(t===null||typeof t!="object")return{};const r={...t};return Object.keys(t).forEach(n=>{n.includes(`${String(e)}.`)&&delete r[n]}),r}function tt(e,t){const r=e.substring(t.length+1).split(".")[0];return parseInt(r,10)}function rt(e,t,r,n){if(t===void 0)return r;const s=`${String(e)}`;let c=r;n===-1&&(c=ze(`${s}.${t}`,c));const o={...c},u=new Set;return Object.entries(c).filter(([i])=>{if(!i.startsWith(`${s}.`))return!1;const d=tt(i,s);return Number.isNaN(d)?!1:d>=t}).forEach(([i,d])=>{const g=tt(i,s),_=i.replace(`${s}.${g}`,`${s}.${g+n}`);o[_]=d,u.add(_),u.has(i)||delete o[i]}),o}function nr(e,{from:t,to:r},n){const s=`${e}.${t}`,c=`${e}.${r}`,o={...n},u=new Set;return Object.keys(n).forEach(i=>{if(u.has(i))return;let d,g;if(i.startsWith(s)?(d=i,g=i.replace(s,c)):i.startsWith(c)&&(d=i.replace(c,s),g=i),d&&g){const _=o[d],$=o[g];$===void 0?delete o[d]:o[d]=$,_===void 0?delete o[g]:o[g]=_,u.add(d),u.add(g)}}),o}function nt(e,t,r){typeof r.value=="object"&&(r.value=ce(r.value)),!r.enumerable||r.get||r.set||!r.configurable||!r.writable||t==="__proto__"?Object.defineProperty(e,t,r):e[t]=r.value}function ce(e){if(typeof e!="object")return e;var t=0,r,n,s,c=Object.prototype.toString.call(e);if(c==="[object Object]"?s=Object.create(e.__proto__||null):c==="[object Array]"?s=Array(e.length):c==="[object Set]"?(s=new Set,e.forEach(function(o){s.add(ce(o))})):c==="[object Map]"?(s=new Map,e.forEach(function(o,u){s.set(ce(u),ce(o))})):c==="[object Date]"?s=new Date(+e):c==="[object RegExp]"?s=new RegExp(e.source,e.flags):c==="[object DataView]"?s=new e.constructor(ce(e.buffer)):c==="[object ArrayBuffer]"?s=e.slice(0):c.slice(-6)==="Array]"&&(s=new e.constructor(e)),s){for(n=Object.getOwnPropertySymbols(e);t<n.length;t++)nt(s,n[t],Object.getOwnPropertyDescriptor(e,n[t]));for(t=0,n=Object.getOwnPropertyNames(e);t<n.length;t++)Object.hasOwnProperty.call(s,r=n[t])&&s[r]===e[r]||nt(s,r,Object.getOwnPropertyDescriptor(e,r))}return s||e}function yt(e){return typeof e!="string"?[]:e.split(".")}function B(e,t){const r=yt(e);if(r.length===0||typeof t!="object"||t===null)return;let n=t[r[0]];for(let s=1;s<r.length&&n!=null;s+=1)n=n[r[s]];return n}function ge(e,t,r){const n=yt(e);if(n.length===0)return r;const s=ce(r);if(n.length===1)return s[n[0]]=t,s;let c=s[n[0]];for(let o=1;o<n.length-1;o+=1){if(c===void 0)return s;c=c[n[o]]}return c[n[n.length-1]]=t,s}function sr(e,{from:t,to:r},n){const s=B(e,n);if(!Array.isArray(s))return n;const c=[...s],o=s[t];return c.splice(t,1),c.splice(r,0,o),ge(e,c,n)}function or(e,t,r,n){const s=B(e,n);if(!Array.isArray(s))return n;const c=[...s];return c.splice(typeof r=="number"?r:c.length,0,t),ge(e,c,n)}function ir(e,t,r){const n=B(e,r);return Array.isArray(n)?ge(e,n.filter((s,c)=>c!==t),r):r}function ar(e,t,r,n){const s=B(e,n);if(!Array.isArray(s)||s.length<=r)return n;const c=[...s];return c[r]=t,ge(e,c,n)}function cr({$values:e,$errors:t,$status:r}){const n=m.useCallback((u,i)=>{r.clearFieldDirty(u),t.setErrors(d=>nr(u,i,d)),e.setValues({values:sr(u,i,e.refValues.current),updateState:!0})},[]),s=m.useCallback((u,i)=>{r.clearFieldDirty(u),t.setErrors(d=>rt(u,i,d,-1)),e.setValues({values:ir(u,i,e.refValues.current),updateState:!0})},[]),c=m.useCallback((u,i,d)=>{r.clearFieldDirty(u),t.setErrors(g=>rt(u,d,g,1)),e.setValues({values:or(u,i,d,e.refValues.current),updateState:!0})},[]),o=m.useCallback((u,i,d)=>{r.clearFieldDirty(u),e.setValues({values:ar(u,d,i,e.refValues.current),updateState:!0})},[]);return{reorderListItem:n,removeListItem:s,insertListItem:c,replaceListItem:o}}var Ae,st;function ur(){return st||(st=1,Ae=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,s,c;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(c=Object.keys(t),n=c.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,c[s]))return!1;for(s=n;s--!==0;){var o=c[s];if(!e(t[o],r[o]))return!1}return!0}return t!==t&&r!==r}),Ae}var lr=ur();const ke=Ce(lr);function Te(e,t){const r=Object.keys(e);if(typeof t=="string"){const n=r.filter(s=>s.startsWith(`${t}.`));return e[t]||n.some(s=>e[s])||!1}return r.some(n=>e[n])}function dr({initialDirty:e,initialTouched:t,mode:r,$values:n}){const[s,c]=m.useState(t),[o,u]=m.useState(e),i=m.useRef(t),d=m.useRef(e),g=m.useCallback(k=>{const A=typeof k=="function"?k(i.current):k;i.current=A,r==="controlled"&&c(A)},[]),_=m.useCallback((k,A=!1)=>{const L=typeof k=="function"?k(d.current):k;d.current=L,(r==="controlled"||A)&&u(L)},[]),$=m.useCallback(()=>g({}),[]),j=m.useCallback(k=>{const A=k?{...n.refValues.current,...k}:n.refValues.current;n.setValuesSnapshot(A),_({})},[]),O=m.useCallback((k,A)=>{g(L=>Te(L,k)===A?L:{...L,[k]:A})},[]),v=m.useCallback((k,A,L)=>{_(q=>Te(q,k)===A?q:{...q,[k]:A},L)},[]),h=m.useCallback((k,A)=>{const L=Te(d.current,k),q=!ke(B(k,n.getValuesSnapshot()),A),z=ze(k,d.current);z[k]=q,_(z,L!==q)},[]),S=m.useCallback(k=>Te(i.current,k),[]),C=m.useCallback(k=>_(A=>{if(typeof k!="string")return A;const L=ze(k,A);return delete L[k],ke(L,A)?A:L}),[]),Y=m.useCallback(k=>{if(k){const L=B(k,d.current);if(typeof L=="boolean")return L;const q=B(k,n.refValues.current),z=B(k,n.valuesSnapshot.current);return!ke(q,z)}return Object.keys(d.current).length>0?Te(d.current):!ke(n.refValues.current,n.valuesSnapshot.current)},[]),N=m.useCallback(()=>d.current,[]),R=m.useCallback(()=>i.current,[]);return{touchedState:s,dirtyState:o,touchedRef:i,dirtyRef:d,setTouched:g,setDirty:_,resetDirty:j,resetTouched:$,isTouched:S,setFieldTouched:O,setFieldDirty:v,setTouchedState:c,setDirtyState:u,clearFieldDirty:C,isDirty:Y,getDirty:N,getTouched:R,setCalculatedFieldDirty:h}}function fr({initialValues:e,onValuesChange:t,mode:r}){const n=m.useRef(!1),[s,c]=m.useState(e||{}),o=m.useRef(s),u=m.useRef(s),i=m.useCallback(({values:h,subscribers:S,updateState:C=!0,mergeWithPreviousValues:Y=!0})=>{const N=o.current,R=h instanceof Function?h(o.current):h,k=Y?{...N,...R}:R;o.current=k,C&&(c(k),r==="uncontrolled"&&(o.current=k)),t?.(k,N),S?.filter(Boolean).forEach(A=>A({updatedValues:k,previousValues:N}))},[t]),d=m.useCallback(h=>{const S=B(h.path,o.current),C=h.value instanceof Function?h.value(S):h.value;if(S!==C){const Y=o.current,N=ge(h.path,C,o.current);i({values:N,updateState:h.updateState}),h.subscribers?.filter(Boolean).forEach(R=>R({path:h.path,updatedValues:N,previousValues:Y}))}},[i]),g=m.useCallback(h=>{u.current=h},[]),_=m.useCallback((h,S)=>{n.current||(n.current=!0,i({values:h,updateState:r==="controlled"}),g(h),S())},[i]),$=m.useCallback(()=>{i({values:u.current,updateState:!0,mergeWithPreviousValues:!1})},[i]),j=m.useCallback(()=>o.current,[]),O=m.useCallback(()=>u.current,[]),v=m.useCallback((h,S)=>{const C=B(h,u.current);typeof C>"u"||d({path:h,value:C,updateState:r==="controlled",subscribers:S})},[d,r]);return{initialized:n,stateValues:s,refValues:o,valuesSnapshot:u,setValues:i,setFieldValue:d,resetValues:$,setValuesSnapshot:g,initialize:_,getValues:j,getValuesSnapshot:O,resetField:v}}function mr({$status:e,cascadeUpdates:t}){const r=m.useRef({}),n=m.useCallback((c,o)=>{m.useEffect(()=>(r.current[c]=r.current[c]||[],r.current[c].push(o),()=>{r.current[c]=r.current[c].filter(u=>u!==o)}),[o])},[]),s=m.useCallback(c=>{const o=r.current[c]?.map(u=>i=>u({previousValue:B(c,i.previousValues),value:B(c,i.updatedValues),touched:e.isTouched(c),dirty:e.isDirty(c)}))??[];if(t)for(const u in r.current)(u.startsWith(`${c}.`)||c.startsWith(`${u}.`))&&o.push(...r.current[u].map(i=>d=>i({previousValue:B(u,d.previousValues),value:B(u,d.updatedValues),touched:e.isTouched(u),dirty:e.isDirty(u)})));return o},[]);return{subscribers:r,watch:n,getFieldSubscribers:s}}function ot(e,t){return e?`${e}-${t.toString()}`:t.toString()}const we=Symbol("root-rule");function it(e){const t=Le(e);return{hasErrors:Object.keys(t).length>0,errors:t}}function Ye(e,t,r="",n={}){return typeof e!="object"||e===null?n:Object.keys(e).reduce((s,c)=>{const o=e[c],u=`${r===""?"":`${r}.`}${c}`,i=B(u,t);let d=!1;return typeof o=="function"&&(s[u]=o(i,t,u)),typeof o=="object"&&Array.isArray(i)&&(d=!0,i.forEach((g,_)=>Ye(o,t,`${u}.${_}`,s)),we in o&&(s[u]=o[we](i,t,u))),typeof o=="object"&&typeof i=="object"&&i!==null&&(d||Ye(o,t,u,s),we in o&&(s[u]=o[we](i,t,u))),s},n)}function Re(e,t){return it(typeof e=="function"?e(t):Ye(e,t))}function je(e,t,r){if(typeof e!="string")return{hasError:!1,error:null};const n=Re(t,r),s=Object.keys(n.errors).find(c=>e.split(".").every((o,u)=>o===c.split(".")[u]));return{hasError:!!s,error:s?n.errors[s]:null}}const hr="__MANTINE_FORM_INDEX__";function at(e,t){return t?typeof t=="boolean"?t:Array.isArray(t)?t.includes(e.replace(/[.][0-9]+/g,`.${hr}`)):!1:!1}function pt({name:e,mode:t="controlled",initialValues:r,initialErrors:n={},initialDirty:s={},initialTouched:c={},clearInputErrorOnChange:o=!0,validateInputOnChange:u=!1,validateInputOnBlur:i=!1,onValuesChange:d,transformValues:g=(h=>h),enhanceGetInputProps:_,validate:$,onSubmitPreventDefault:j="always",touchTrigger:O="change",cascadeUpdates:v=!1}={}){const h=rr(n),S=fr({initialValues:r,onValuesChange:d,mode:t}),C=dr({initialDirty:s,initialTouched:c,$values:S,mode:t}),Y=cr({$values:S,$errors:h,$status:C}),N=mr({$status:C,cascadeUpdates:v}),[R,k]=m.useState(0),[A,L]=m.useState({}),[q,z]=m.useState(!1),V=m.useCallback(()=>{S.resetValues(),h.clearErrors(),C.resetDirty(),C.resetTouched(),t==="uncontrolled"&&k(T=>T+1)},[]),X=m.useCallback(T=>{o&&h.clearErrors(),t==="uncontrolled"&&k(M=>M+1),Object.keys(N.subscribers.current).forEach(M=>{const W=B(M,S.refValues.current),K=B(M,T);W!==K&&N.getFieldSubscribers(M).forEach(Z=>Z({previousValues:T,updatedValues:S.refValues.current}))})},[o]),se=m.useCallback(T=>{const M=S.refValues.current;S.initialize(T,()=>t==="uncontrolled"&&k(W=>W+1)),X(M)},[X]),E=m.useCallback((T,M,W)=>{const K=at(T,u),Z=M instanceof Function?M(B(T,S.refValues.current)):M;C.setCalculatedFieldDirty(T,Z),O==="change"&&C.setFieldTouched(T,!0),!K&&o&&h.clearFieldError(T),S.setFieldValue({path:T,value:M,updateState:t==="controlled",subscribers:[...N.getFieldSubscribers(T),K?te=>{const Q=je(T,$,te.updatedValues);Q.hasError?h.setFieldError(T,Q.error):h.clearFieldError(T)}:null,W?.forceUpdate!==!1&&t!=="controlled"?()=>L(te=>({...te,[T]:(te[T]||0)+1})):null]})},[d,$]),b=m.useCallback(T=>{const M=S.refValues.current;S.setValues({values:T,updateState:t==="controlled"}),X(M)},[d,X]),y=m.useCallback(()=>{const T=Re($,S.refValues.current);return h.setErrors(T.errors),T},[$]),w=m.useCallback(T=>{const M=je(T,$,S.refValues.current);return M.hasError?h.setFieldError(T,M.error):h.clearFieldError(T),M},[$]),p=(T,{type:M="input",withError:W=!0,withFocus:K=!0,...Z}={})=>{const Q={onChange:tr(Se=>E(T,Se,{forceUpdate:!1})),"data-path":ot(e,T)};return W&&(Q.error=h.errorsState[T]),M==="checkbox"?Q[t==="controlled"?"checked":"defaultChecked"]=B(T,S.refValues.current):Q[t==="controlled"?"value":"defaultValue"]=B(T,S.refValues.current),K&&(Q.onFocus=()=>C.setFieldTouched(T,!0),Q.onBlur=()=>{if(at(T,i)){const Se=je(T,$,S.refValues.current);Se.hasError?h.setFieldError(T,Se.error):h.clearFieldError(T)}}),Object.assign(Q,_?.({inputProps:Q,field:T,options:{type:M,withError:W,withFocus:K,...Z},form:G}))},P=(T,M)=>W=>{j==="always"&&W?.preventDefault();const K=y();if(K.hasErrors)j==="validation-failed"&&W?.preventDefault(),M?.(K.errors,S.refValues.current,W);else{const Z=T?.(g(S.refValues.current),W);Z instanceof Promise&&(z(!0),Z.finally(()=>z(!1)))}},a=T=>g(T||S.refValues.current),x=m.useCallback(T=>{T.preventDefault(),V()},[]),F=m.useCallback(T=>T?!je(T,$,S.refValues.current).hasError:!Re($,S.refValues.current).hasErrors,[$]),I=T=>`${R}-${String(T)}-${A[String(T)]||0}`,U=m.useCallback(T=>document.querySelector(`[data-path="${ot(e,T)}"]`),[]),H=m.useCallback(T=>{S.resetField(T,[t!=="controlled"?()=>L(M=>({...M,[T]:(M[T]||0)+1})):null])},[S.resetField,t,L]),G={watch:N.watch,initialized:S.initialized.current,values:t==="uncontrolled"?S.refValues.current:S.stateValues,getValues:S.getValues,getInitialValues:S.getValuesSnapshot,setInitialValues:S.setValuesSnapshot,resetField:H,initialize:se,setValues:b,setFieldValue:E,submitting:q,setSubmitting:z,errors:h.errorsState,setErrors:h.setErrors,setFieldError:h.setFieldError,clearFieldError:h.clearFieldError,clearErrors:h.clearErrors,resetDirty:C.resetDirty,setTouched:C.setTouched,setDirty:C.setDirty,isTouched:C.isTouched,resetTouched:C.resetTouched,isDirty:C.isDirty,getTouched:C.getTouched,getDirty:C.getDirty,reorderListItem:Y.reorderListItem,insertListItem:Y.insertListItem,removeListItem:Y.removeListItem,replaceListItem:Y.replaceListItem,reset:V,validate:y,validateField:w,getInputProps:p,onSubmit:P,onReset:x,isValid:F,getTransformedValues:a,key:I,getInputNode:U};return er(e,G),G}const yr=({tzRange:e})=>{const t=re.useMediaQuery("(max-width: 64em)"),{closePopover:r}=de(),n=e.timezone.utcOffset?`GMT${e.timezone.utcOffset}`:e.timezone?.longName,s=pt({initialValues:{date:e.startDate??ft(e),time:e.startTime??Ie(e),duration:ht.OneDay},validate:{date:o=>o?null:"Date is required",time:o=>o?null:"Time is required",duration:o=>o?null:"Duration is required"}}),c=o=>{if(!e.timezone.name)return;const u=ve(o.date,o.time,e.timezone.name),i=xe(u,e.timezone.name),{startDate:d,startTime:g,endDate:_,endTime:$}=Qt(i.date,i.time,o.duration);e.onApply({startDate:d,startTime:g,endDate:_,endTime:$,timezone:e.timezone}),t&&r()};return l.jsx(D.Flex,{direction:"column",flex:2,justify:"space-between",style:{height:"100%"},px:12,children:l.jsxs("form",{className:Ke["form-container"],onSubmit:s.onSubmit(c),children:[l.jsxs(D.Box,{children:[l.jsx(D.Text,{fw:600,children:"Around a time"}),l.jsxs(D.Flex,{direction:"column",gap:8,mt:12,children:[l.jsx(ae.DatePickerInput,{label:"Pick date",placeholder:"Pick date",...s.getInputProps("date"),popoverProps:{withinPortal:!1},valueFormat:ee,leftSection:l.jsx(Ve,{stroke:1.5})},s.key("date")),l.jsx(ae.TimeInput,{label:"Pick time",placeholder:"Pick time",withSeconds:!0,...s.getInputProps("time"),leftSection:l.jsx(Me,{stroke:1.5}),rightSection:t?void 0:l.jsx(D.Text,{style:{fontSize:12,fontStyle:"italic",textAlign:"right"},children:e.timezone?.longName}),rightSectionWidth:t?void 0:180,rightSectionProps:{style:{paddingRight:1}}},s.key("time")),t&&n?l.jsx(D.Text,{size:"xs",c:"dimmed",mt:-4,children:n}):null,l.jsx(D.Select,{label:"Duration",placeholder:"Pick value",data:Jt,...s.getInputProps("duration"),comboboxProps:{withinPortal:!1}},s.key("duration"))]})]}),l.jsx(We,{})]})})},pr=({tzRange:e})=>{const t=re.useMediaQuery("(max-width: 64em)"),{closePopover:r}=de(),n=e.timezone.utcOffset?`GMT${e.timezone.utcOffset}`:e.timezone?.longName,s=pt({mode:"uncontrolled",initialValues:{startDate:e.startDate??ft(e),startTime:e.startTime??Ie(e),endDate:e.endDate??Bt(30),endTime:e.endTime??Ie(e)},validate:{startDate:o=>o?null:"Start date is required",startTime:o=>o?null:"Start time is required",endDate:(o,u)=>{if(!o)return"End date is required";const i=f(`${u.startDate} ${u.startTime}`),d=f(`${o} ${u.endTime}`);return d.isAfter(i)||d.isSame(i)?null:"End time must be after start time"},endTime:(o,u)=>{if(!o)return"End time is required";const i=f(`${u.startDate} ${u.startTime}`),d=f(`${u.endDate} ${o}`);return d.isAfter(i)||d.isSame(i)?null:"End time must be after start time"}}}),c=o=>{if(!e.timezone.name)return;const u=ve(o.startDate,o.startTime,e.timezone.name),i=ve(o.endDate,o.endTime,e.timezone.name),d=xe(u,e.timezone.name),g=xe(i,e.timezone.name);e.onApply({startDate:d.date,startTime:d.time,endDate:g.date,endTime:g.time,timezone:e.timezone}),t&&r()};return l.jsx(D.Flex,{direction:"column",flex:2,style:{height:"100%"},px:12,children:l.jsxs("form",{className:Ke["form-container"],onSubmit:s.onSubmit(c),children:[l.jsxs(D.Box,{children:[l.jsx(D.Text,{fw:600,children:"Start and end times"}),l.jsxs(D.Flex,{direction:"column",gap:8,mt:12,children:[l.jsx(ae.DatePickerInput,{label:"Start time",...s.getInputProps("startDate"),popoverProps:{withinPortal:!1},valueFormat:ee,leftSection:l.jsx(Ve,{stroke:1.5})},s.key("startDate")),l.jsx(ae.TimeInput,{withSeconds:!0,...s.getInputProps("startTime"),leftSection:l.jsx(Me,{stroke:1.5}),rightSection:t?void 0:l.jsx(D.Text,{style:{fontSize:12,fontStyle:"italic"},children:e.timezone?.longName}),rightSectionWidth:t?void 0:180,rightSectionProps:{style:{paddingRight:1}}},s.key("startTime")),t&&n?l.jsx(D.Text,{size:"xs",c:"dimmed",mt:-4,children:n}):null,l.jsx(ae.DatePickerInput,{label:"End time",...s.getInputProps("endDate"),popoverProps:{withinPortal:!1},valueFormat:ee,leftSection:l.jsx(Ve,{stroke:1.5})},s.key("endDate")),l.jsx(ae.TimeInput,{withSeconds:!0,...s.getInputProps("endTime"),leftSection:l.jsx(Me,{stroke:1.5}),rightSection:t?void 0:l.jsx(D.Text,{style:{fontSize:12,fontStyle:"italic"},children:e.timezone?.longName}),rightSectionWidth:t?void 0:180,rightSectionProps:{style:{paddingRight:1}}},s.key("endTime")),t&&n?l.jsx(D.Text,{size:"xs",c:"dimmed",mt:-4,children:n}):null]})]}),l.jsx(We,{})]})})},ne={"trigger-button":"_trigger-button_1ds5p_1","picker-shell":"_picker-shell_1ds5p_18","mobile-layout":"_mobile-layout_1ds5p_22","mobile-nav":"_mobile-nav_1ds5p_29","mobile-content":"_mobile-content_1ds5p_33"};var be=(e=>(e.RELATIVE_TIME="Relative time",e.START_END_TIME="Start and end times",e.AROUND_TIME="Around a time",e.TIMEZONE="Time zone",e))(be||{});const Tr=e=>{const[t,r]=m.useState("Start and end times"),{popoverOpened:n,setPopoverOpened:s}=de(),c=re.useMediaQuery("(max-width: 48em)"),o=re.useMediaQuery("(max-width: 64em)");m.useEffect(()=>{!o&&t==="Relative time"&&r("Start and end times")},[o,t]);const u=()=>{switch(t){case"Relative time":return l.jsx(et,{tzRange:e,setSelectedPanel:r,mobileOnlyRelative:!0});case"Start and end times":return l.jsx(pr,{tzRange:e});case"Around a time":return l.jsx(yr,{tzRange:e});case"Time zone":return l.jsx(mt,{tzRange:e});default:return null}},i=()=>{s($=>!$)},d=m.useMemo(()=>Pe(e,"desktop"),[e.startDate,e.startTime,e.endDate,e.endTime,e.timezone]),g=m.useMemo(()=>c?Pe(e,"mobile"):o?Pe(e,"tablet"):d,[d,c,o,e]),_=o?l.jsxs("div",{className:ne["mobile-layout"],children:[l.jsx("div",{className:ne["mobile-nav"],children:l.jsx(D.SegmentedControl,{fullWidth:!0,value:t,onChange:$=>r($),data:[{label:"Quick",value:"Relative time"},{label:"Range",value:"Start and end times"},{label:"Around",value:"Around a time"},{label:"TZ",value:"Time zone"}]})}),l.jsx("div",{className:ne["mobile-content"],children:u()})]}):l.jsxs(D.Flex,{className:ne["picker-shell"],children:[l.jsx(et,{tzRange:e,setSelectedPanel:r}),u()]});return o?l.jsxs(l.Fragment,{children:[l.jsx(D.Button,{onClick:i,style:e.buttonStyle||{},className:ne["trigger-button"],title:d,children:g}),l.jsx(D.Drawer,{opened:n,onClose:()=>s(!1),size:"100%",padding:0,title:"Select time range",styles:{content:{display:"flex",flexDirection:"column"},body:{flex:1,overflow:"hidden",padding:0}},children:l.jsx("div",{className:ne["picker-shell"],children:_})})]}):l.jsxs(D.Popover,{position:"bottom",shadow:"md",opened:n,onChange:s,children:[l.jsx(D.Popover.Target,{children:l.jsx(D.Button,{onClick:i,style:e.buttonStyle||{},className:ne["trigger-button"],title:d,children:g})}),l.jsx(D.Popover.Dropdown,{style:{width:700,height:400,padding:0},py:8,children:_})]})},br=e=>l.jsx(Ht,{children:l.jsx(Tr,{...e})});exports.Panel=be;exports.TimezonePanel=mt;exports.TimezoneRangePicker=br;
|
|
63
63
|
//# sourceMappingURL=index.cjs.js.map
|