@okam/stack-ui 1.9.5 → 1.10.1
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/components/fields/Checkbox/Checkbox.interface.d.ts +1 -2
- package/index.js +5 -5
- package/index.mjs +448 -404
- package/package.json +3 -1
- package/theme/Checkbox/index.d.ts +1 -1
- package/theme/Radio/index.d.ts +63 -0
- package/theme/RadioGroup/index.d.ts +22 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import type { Noop
|
|
2
|
+
import type { Noop } from 'react-hook-form';
|
|
3
3
|
import type { TDefaultComponent } from '../../../types/components';
|
|
4
4
|
export interface TCheckboxProps extends TDefaultComponent {
|
|
5
5
|
id: string;
|
|
@@ -13,7 +13,6 @@ export interface TCheckboxProps extends TDefaultComponent {
|
|
|
13
13
|
value?: string;
|
|
14
14
|
onBlur?: Noop;
|
|
15
15
|
onChange?: (isSelected: boolean) => void;
|
|
16
|
-
inputRef?: RefCallBack;
|
|
17
16
|
icon?: React.ReactNode;
|
|
18
17
|
}
|
|
19
18
|
export interface TCheckboxLabelStyles {
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react"),a=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react"),a=require("react/jsx-runtime"),m=require("tailwind-variants"),_t=require("radash"),x=require("react-aria"),Vt=require("react-div-100vh"),Qt=require("@react-stately/overlays"),F=require("react-spring"),H=require("@react-aria/overlays"),_=require("@react-aria/focus"),rt=require("react-stately"),Wt=require("isomorphic-dompurify"),Gt=require("lodash.isequal"),fe=require("@react-aria/i18n"),Pe=require("lodash"),ae=require("react-hook-form"),Ht=require("@react-aria/checkbox"),zt=require("@react-aria/visually-hidden"),Kt=require("@react-stately/toggle"),Xt=require("react-i18next"),Te=require("@react-aria/datepicker"),nt=require("@react-stately/datepicker"),je=require("@react-aria/calendar"),Zt=require("@react-stately/calendar"),er=require("@react-aria/utils");function tr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const rr=tr(h),ot=e=>e;function nr(){const e=h.createContext(void 0);function t(){const r=h.useContext(e);return r===void 0?null:r}return[t,e.Provider]}const or={typography:()=>""},[st,sr]=nr();function at({children:e,brandTheme:t=or}){const r=h.useMemo(()=>({brandTheme:t}),[t]);return a.jsx(sr,{value:r,children:e})}const it=e=>({children:r})=>a.jsx(at,{brandTheme:e,children:r}),ar=m.tv({base:"[border-radius: 32px] p-1.5 focus:outline-none text-color-1-500",defaultVariants:{textAlign:"left",isOpen:!1},variants:{textAlign:{center:"text-center",left:"text-left"}}}),ir=m.tv({base:"grid overflow-hidden w-full items-center border-b-2 border-color-1-500 focus-ring-black",variants:{titleBold:{true:"font-bold"},textAlign:{center:"grid-cols-[3rem_1fr_3rem] pl-0 sm:pl-0",left:"grid-cols-[1fr_3rem]"}}}),lr=m.tv({base:"",defaultVariants:{textAlign:"left"},variants:{textAlign:{center:"justify-self-center col-start-2",left:"justify-self-start"}}}),cr=m.tv({base:"text-color-1-500 min-h-12 rotate-90 min-w-12 rounded-full flex items-center justify-center transition duration-500 transform ml-auto aspect-square",variants:{isOpen:{true:"-rotate-90",false:""}}}),ur=m.tv({base:"font-body text-inherit h-auto grid grid-rows-[0fr] transition-all duration-500",defaultVariants:{textAlign:"left",isOpen:!1},variants:{isOpen:{true:"pb-8 pt-3 grid-rows-[1fr]",false:""},textAlign:{center:"grid-cols-[3rem_1fr_3rem] px-6 text-center",left:"grid-cols-[1fr_3rem] text-left"}}}),dr=m.tv({base:"overflow-hidden",defaultVariants:{textAlign:"left"},variants:{textAlign:{center:"col-start-2",left:""}}}),fr=m.tv({base:"w-full bg-slate-100"}),lt=m.tv({base:"max-w-screen-lg mx-auto w-full",variants:{fullWidth:{true:"max-w-full col-span-full p-0"},spacing:{small:"mb-3",medium:"mb-6",large:"mb-8",none:"mb-0"}}}),hr=m.tv({extend:lt,base:"grid grid-cols-12 gap-6 px-4 col-span-full",variants:{fullWidth:{true:"max-w-full col-span-full p-0"}}}),mr=m.tv({base:"bg-slate-300 h-64 p-4 flex justify-start items-end",defaultVariants:{size:"small"},variants:{size:{small:"col-span-12 sm:col-span-6 md:col-span-4 lg:col-span-4",medium:"col-span-12 sm:col-span-12 md:col-span-8 lg:col-span-8",large:"lg:col-start-3 sm:col-start-1 sm:col-end-13 lg:col-end-11 md:col-start-3 md:col-end-11 col-start-1 col-end-13"}}}),Z=m.tv({base:`
|
|
2
2
|
flex
|
|
3
3
|
items-center
|
|
4
4
|
justify-center
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
text-white
|
|
40
40
|
pointer-events-none
|
|
41
41
|
!border-error
|
|
42
|
-
`},size:{default:"min-w-12 min-h-6",large:"min-w-36 min-h-18"},shape:{rounded:"rounded-md",circular:"rounded-full"}}}),br=
|
|
42
|
+
`},size:{default:"min-w-12 min-h-6",large:"min-w-36 min-h-18"},shape:{rounded:"rounded-md",circular:"rounded-full"}}}),br=m.tv({base:"inline-block text-gray-800"}),gr=m.tv({base:"flex items-center justify-between pb-4"}),pr=m.tv({base:"flex items-center gap-1"}),yr=m.tv({base:"active:bg-color-1-500 p-2 rounded-full active:text-color-1-100 hover:bg-color-1-200 focus-ring-black"}),xr=m.tv({base:"flex-1"}),$r=m.tv({base:"text-center"}),vr=m.tv({base:"py-0.5 relative",variants:{isFocusVisible:{true:"z-10",false:""}}}),wr=m.tv({base:"w-10 h-10 outline-none group",variants:{isSelected:{true:"",false:""},isInvalid:{true:"",fasle:""},isDisabled:{true:"disabled",false:""},isRoundedLeft:{true:"rounded-l-full",false:""},isRoundedRight:{true:"rounded-r-full",false:""}},compoundVariants:[{isSelected:!0,isInvalid:!0,class:"bg-red-300"},{isSelected:!0,isInvalid:!1,class:"bg-color-1-300"}]}),Dr=m.tv({base:"w-full h-full rounded-full flex items-center justify-center cursor-pointer",variants:{isSelected:{true:"",false:""},isInvalid:{true:"",fasle:""},isDisabled:{true:"",false:""},isFocusVisible:{true:"ring-2 group-focus:z-2 ring-violet-600 ring-offset-2",false:""},isSelectionStart:{true:"",false:""},isSelectionEnd:{true:"",false:""}},compoundVariants:[{isDisabled:!0,isInvalid:!1,class:"text-gray-400"},{isSelectionStart:!0,isSelectionEnd:!1,isInvalid:!0,class:"bg-red-600 text-white hover:bg-red-700"},{isSelectionStart:!0,isSelectionEnd:!0,isInvalid:!0,class:"bg-red-600 text-white hover:bg-red-700"},{isSelectionStart:!0,isSelectionEnd:!1,isInvalid:!1,class:"bg-color-1-400 text-white hover:bg-color-1-500"},{isSelectionStart:!0,isSelectionEnd:!0,isInvalid:!1,class:"bg-color-1-400 rounded-full text-white hover:bg-color-1-500"},{isSelectionStart:!1,isSelectionEnd:!0,isInvalid:!0,class:"bg-red-600 text-white hover:bg-red-700"},{isSelectionStart:!1,isSelectionEnd:!0,isInvalid:!1,class:"bg-color-1-400 text-white hover:bg-color-1-500"},{isSelected:!1,isDisabled:!1,class:"hover:bg-color-1-100"},{isSelected:!0,isDisabled:!1,isInvalid:!1,isSelectionStart:!1,isSelectionEnd:!1,class:"hover:bg-color-1-300"},{isSelected:!0,isDisabled:!1,isInvalid:!0,isSelectionStart:!1,isSelectionEnd:!1,class:"hover:bg-red-400"}]}),Cr=m.tv({base:"flex focus-ring-black"}),Mr=m.tv({base:"hover:cursor-pointer",variants:{color:{gray:"text-gray-300",black:"text-black"},isDisabled:{true:"text-gray-6"}},defaultVariants:{color:"black"}}),kr=m.tv({base:"w-6 h-6 mt-0.5 mr-2.5 rounded-full border-2 border-gray-2 shrink-0 hover:cursor-pointer flex items-center justify-center",variants:{isDisabled:{true:"border-gray-6"},isFocused:{true:"outline-black [outline-offset: 2px]"},isError:{true:"border-red-500"}}}),Pr=m.tv({base:"hidden w-4 h-4 bg-gray-300 rounded-full",variants:{selected:{true:"block text-white"}}}),Tr=m.tv({base:"text-white w-4 h-4 [&_svg]:w-4 [&_svg]:h-4"}),jr=m.tv({base:"relative inline-flex flex-col text-left"}),Sr=m.tv({base:"flex items-center border-2 border-color-1-500 rounded focus-ring-black"}),Rr=m.tv({base:"fixed inset-0"}),Ir=m.tv({base:"absolute top-full bg-white border border-gray-300 rounded-md shadow-lg mt-2 p-8 z-10"}),Ar=m.tv({base:"pr-1 flex gap-2",defaultVariants:{dateFieldShown:!0},variants:{dateFieldShown:{true:"",false:"hidden"}}}),Br=m.tv({base:"focus-ring-black"}),Er=m.tv({base:"text-color-1-500 bg-color-1-100 border-l-2 border-color-1-500 h-full py-2 px-2"}),Nr=m.tv({base:"text-color-1-500 font-bold px-2"}),R=m.tv({variants:{size:{h1:"text-5xl",h2:"text-4xl",h3:"text-3xl",h4:"text-2xl",h5:"text-xl",h6:"text-lg",leading:"text-md font-bold leading-normal",paragraph:"text-md inline",footnotes:"text-sm",xs:"text-xs"},font:{body:"font-body"},weight:{normal:"font-normal",light:"font-light",bold:"font-bold"},color:{gray:"text-gray-500",white:"text-white"},isError:{true:"text-sm text-error ml-8 py-3"},align:{center:"text-center",left:"text-left",right:"text-right"}},defaultVariants:{size:"paragraph",font:"body"}}),Fr=m.tv({base:"focus-ring-black"}),Lr=m.tv({base:" w-screen h-screen relative flex items-center m-auto justify-center"}),Or=m.tv({base:`
|
|
43
43
|
absolute
|
|
44
44
|
xl:top-10
|
|
45
45
|
xl:right-20
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
w-[2.5rem]
|
|
52
52
|
h-[2.5rem]
|
|
53
53
|
focus-ring-black
|
|
54
|
-
`}),qr=
|
|
54
|
+
`}),qr=m.tv({extend:R,base:"sr-only"}),Ur=m.tv({base:"text-black flex flex-row items-center hover:cursor-pointer focus-ring-black",variants:{isDisabled:{true:"text-gray-6"}}}),Yr=m.tv({base:"w-6 h-6 mt-0.5 mr-2.5 rounded-full border-2 border-gray-2 shrink-0 hover:cursor-pointer flex items-center justify-center",variants:{isDisabled:{true:"border-gray-6"},isFocused:{true:"outline-black [outline-offset: 2px]"}}}),Jr=m.tv({base:"hidden w-4 h-4 bg-gray-300 rounded-full",variants:{selected:{true:"block text-white"}}}),_r=m.tv({base:"block",variants:{isDisabled:{true:"opacity-60 pointer-events-none"}}}),Vr=m.tv({base:"flex flex-col gap-4 py-8"}),Qr=m.tv({base:"flex print:hidden relative",defaultVariants:{listDirection:"row"},variants:{listDirection:{row:"flex-row",column:"flex-col"}}}),Wr=m.tv({base:"relative z-20 !bg-color-1-500 hover:!bg-color-1-400 w-16 h-16 flex justify-center items-center active:!bg-color-1-400 rounded-full text-white focus-ring-black",variants:{isOpen:{true:"",false:""}}}),Gr=m.tv({base:"!bg-color-1-200 absolute opacity-0 invisible flex transition duration-300 items-center p-0 bg-primary-1 z-0 rounded-b-full rounded-t-full",defaultVariants:{listDirection:"row"},variants:{listDirection:{row:"flex-row pl-14 h-16 left-0",column:"flex-col [width:calc(100% + .5rem)] pt-14 w-16 top-0"},isOpen:{true:"opacity-100 visible",false:""}}}),Hr=m.tv({base:`
|
|
55
55
|
flex
|
|
56
56
|
items-center
|
|
57
57
|
justify-center
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
focus-ring-black
|
|
66
66
|
z-10
|
|
67
67
|
has-focus-ring:z-20
|
|
68
|
-
`,defaultVariants:{listDirection:"row"},variants:{listDirection:{row:"last:rounded-r-full h-full",column:"last:rounded-b-full"}}}),
|
|
68
|
+
`,defaultVariants:{listDirection:"row"},variants:{listDirection:{row:"last:rounded-r-full h-full",column:"last:rounded-b-full"}}}),zr=m.tv({base:"text-white"}),Kr=m.tv({base:""}),Xr=m.tv({base:"m-auto fixed right-0 top-0 bottom-0 w-full max-w-[512px] [&>div]:h-full"}),Zr=m.tv({base:"h-full w-full flex justify-end"}),en=m.tv({base:"bg-black h-full w-full overflow-y-auto"}),tn=m.tv({base:`
|
|
69
69
|
w-full
|
|
70
70
|
min-h-32
|
|
71
71
|
rounded-2xl
|
|
@@ -80,4 +80,4 @@
|
|
|
80
80
|
placeholder:text-gray-2
|
|
81
81
|
focus-ring-black
|
|
82
82
|
|
|
83
|
-
`,variants:{isError:{true:"border-red-500"}}}),Kr=ot({main:e=>fr(e),gridItem:e=>mr(e),grid:e=>hr(e),container:e=>lt(e),accordion:{container:e=>ar(e),button:e=>ir(e),title:e=>lr(e),icon:e=>cr(e),region:e=>ur(e),content:e=>dr(e)},calendar:{container:e=>br(e),header:e=>gr(e),navigationButtonsContainer:e=>pr(e),navigationButtons:e=>yr(e),table:e=>xr(e),dayLabel:e=>$r(e),cellContainer:e=>vr(e),cell:e=>wr(e),cellDate:e=>Dr(e)},datePicker:{container:e=>jr(e),button:e=>Sr(e),icon:e=>Er(e),dateField:e=>Ar(e),dateSegment:e=>Br(e),label:e=>Nr(e),calendarPopover:e=>Ir(e),calendarUnderlay:e=>Rr(e)},popover:{button:e=>Z(e),popover:()=>"border-2 text-black p-4 bg-gray-300"},typography:e=>L(e),button:e=>Z(e),sidePanel:{wrapper:e=>Wr(e),container:e=>Hr(e),innerContainer:e=>Gr(e)},lightBox:{wrapper:e=>Fr(e),container:e=>Lr(e),closeBtn:e=>Or(e),label:e=>qr(e)},shareButton:{icon:e=>Vr(e),button:e=>Yr(e),container:e=>Ur(e),linksList:e=>Jr(e),link:e=>_r(e),linkIcons:e=>Qr(e)},checkbox:{container:e=>Cr(e),label:e=>Mr(e),checkBox:e=>kr(e),checkMark:e=>Pr(e),checkMarkIcon:e=>Tr(e),errorMessage:e=>L(e)},select:{button:e=>Z(e),ul:e=>L({...e,className:"outline outline-2 outline-white outline-offset-2 p-2 my-4 rounded-md w-full flex flex-col gap-6"}),popover:e=>Z(e),errorMessage:e=>L({...e,size:"footnotes",isError:!0}),wrapper:()=>"flex flex-col gap-4 relative",container:()=>"flex flex-col gap-4",li:()=>"transition w-full hover:text-gray-300 focus-ring-white"},textarea:{wrapper:()=>"flex flex-col",container:()=>"flex items-center gap-4",label:()=>"text-gray-3 px-6",input:e=>zr(e),errorMessage:e=>L({...e,size:"footnotes",isError:!0})},textInput:{wrapper:()=>"flex flex-col rounded-md px-4 py-1 mb-3 m-0.5 border-2 aria-disabled:pointer-events-none aria-disabled:opacity-30 focus-ring-black",label:()=>"text-xs",container:()=>"flex items-center gap-4",input:()=>"",errorMessage:e=>L({...e,size:"footnotes",isError:!0})}}),Xr=h.memo(it(Kr)),b=(e,t={},r=null)=>{const n=st();if(n!=null&&e!=null){const{brandTheme:o}=n,s=_t.get(o,e);if(typeof s=="function"){const i=s?.(t);if(typeof i=="string")return i}}if(r)return r},T=({as:e="span",themeName:t="typography",tokens:r,customTheme:n,children:o,...s})=>{const i=b(t,r,n);return a.jsx(e,{...s,className:i,children:o})},Se=h.forwardRef((e,t)=>{const{as:r="span",tokens:n,themeName:o="typography",customTheme:s,children:i,...l}=e,c=b(o,n,s);return a.jsx(r,{...l,ref:t,className:c,children:i})}),ct=h.forwardRef((e,t)=>{const{as:r="a",handlePress:n,children:o,as:s,customTheme:i,tokens:l,themeName:c="button",...d}=e,u=t,{linkProps:y}=x.useLink({...e,elementType:s?.toString(),onPress:n},t??u),f=b(c,l,i);return a.jsx(x.FocusRing,{focusRingClass:"has-focus-ring",children:a.jsx(r,{ref:u,...y,...d,className:f,children:o})})}),ut=h.forwardRef((e,t)=>{const{as:r="button",handlePress:n,children:o,as:s,customTheme:i,tokens:l,themeName:c="button",isDisabled:d=!1,...u}=e,y=t,{buttonProps:f}=x.useButton({...e,isDisabled:d,elementType:s,onPress:n},t??y),g=b(c,l,i);return a.jsx(x.FocusRing,{within:!0,focusRingClass:"has-focus-ring",children:a.jsx(r,{ref:y,...f,...u,className:g,children:o})})}),V=h.forwardRef((e,t)=>{const{as:r}=e;return r==="a"?a.jsx(ct,{ref:t,...e}):a.jsx(ut,{ref:t,...e})}),Zr=e=>{const{as:t}=e,r=h.useRef(null);return t==="a"?a.jsx(ct,{ref:r,...e}):a.jsx(ut,{ref:r,...e})},Q=h.memo(Zr),en=(e,t)=>{const r=e[t];return r?typeof r=="function"?r():Promise.resolve(r):new Promise((n,o)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(o.bind(null,new Error("Unknown variable dynamic import: "+t)))})},tn=e=>a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:48,width:48,fill:"currentColor",...e}),dt=h.memo(tn),rn=Object.freeze(Object.defineProperty({__proto__:null,default:dt},Symbol.toStringTag,{value:"Module"})),nn=e=>{const{icon:t,...r}=e,n=h.useMemo(()=>h.lazy(()=>en(Object.assign({"../icons/ArrowDown.tsx":()=>Promise.resolve().then(()=>require("./ArrowDown-a6edacd9.js")),"../icons/ArrowLeft.tsx":()=>Promise.resolve().then(()=>require("./ArrowLeft-4eeead7e.js")),"../icons/ArrowRight.tsx":()=>Promise.resolve().then(()=>Cn),"../icons/BrandArrowRight.tsx":()=>Promise.resolve().then(()=>require("./BrandArrowRight-810d374a.js")),"../icons/Check.tsx":()=>Promise.resolve().then(()=>require("./Check-c61ded33.js")),"../icons/ChevronLeft.tsx":()=>Promise.resolve().then(()=>require("./ChevronLeft-3d464239.js")),"../icons/ChevronRight.tsx":()=>Promise.resolve().then(()=>require("./ChevronRight-5709c683.js")),"../icons/CloseBtn.tsx":()=>Promise.resolve().then(()=>require("./CloseBtn-e65fe8bd.js")),"../icons/Facebook.tsx":()=>Promise.resolve().then(()=>require("./Facebook-f2646126.js")),"../icons/FacebookColored.tsx":()=>Promise.resolve().then(()=>require("./FacebookColored-d986225c.js")),"../icons/FacebookRounded.tsx":()=>Promise.resolve().then(()=>require("./FacebookRounded-d75848d2.js")),"../icons/Globe.tsx":()=>Promise.resolve().then(()=>require("./Globe-cbe70168.js")),"../icons/IconFallback.tsx":()=>Promise.resolve().then(()=>rn),"../icons/Instagram.tsx":()=>Promise.resolve().then(()=>require("./Instagram-2f8ef20d.js")),"../icons/InstagramColored.tsx":()=>Promise.resolve().then(()=>require("./InstagramColored-6a2b2b7a.js")),"../icons/Link.tsx":()=>Promise.resolve().then(()=>require("./Link-db71325e.js")),"../icons/LinkedIn.tsx":()=>Promise.resolve().then(()=>require("./LinkedIn-4745de60.js")),"../icons/Mail.tsx":()=>Promise.resolve().then(()=>require("./Mail-a1aec200.js")),"../icons/Plus.tsx":()=>Promise.resolve().then(()=>require("./Plus-75849570.js")),"../icons/Share.tsx":()=>Promise.resolve().then(()=>require("./Share-608e1dd8.js")),"../icons/Twitter.tsx":()=>Promise.resolve().then(()=>require("./Twitter-1eb11c0c.js")),"../icons/TwitterColored.tsx":()=>Promise.resolve().then(()=>require("./TwitterColored-8b72aa64.js")),"../icons/Upload.tsx":()=>Promise.resolve().then(()=>require("./Upload-578304b2.js")),"../icons/X.tsx":()=>Promise.resolve().then(()=>require("./X-ed6c3d62.js")),"../icons/YouTube.tsx":()=>Promise.resolve().then(()=>require("./YouTube-5dbf2e75.js")),"../icons/YouTubeColored.tsx":()=>Promise.resolve().then(()=>require("./YouTubeColored-5baa4a6c.js"))}),`../icons/${t||"ArrowRight"}.tsx`)),[t]);return a.jsx(h.Suspense,{fallback:a.jsx(dt,{className:"overflow-visible pointer-events-none"}),children:a.jsx(n,{...r,className:"overflow-visible pointer-events-none",...e})})},j=e=>{const{icon:t,as:r="span",tokens:n,customTheme:o,themeName:s="icon",children:i,...l}=e,c=b(s,n,o);return typeof t!="string"?a.jsxs(r,{...l,className:c,children:[i,t]}):a.jsxs(r,{className:c,children:[i,a.jsx(nn,{icon:t,...l})]})},on=e=>{const{customTheme:t,themeName:r="accordion",id:n,tokens:o,title:s,ariaLabel:i,onClick:l,icon:c,children:d}=e,[u,y]=h.useState(!1),f=b(`${r}.container`,{...o,isOpen:u},t),g=b(`${r}.title`,{...o,isOpen:u},t),w=b(`${r}.icon`,{...o,isOpen:u},t),m=b(`${r}.region`,{...o,isOpen:u},t),$=b(`${r}.content`,{...o,isOpen:u},t);return a.jsxs("div",{className:f,id:`accordion-control-${n}`,"aria-label":i,"aria-expanded":u,"aria-controls":`accordion-content-${n}`,children:[a.jsxs(Q,{themeName:`${r}.button`,tokens:{...o,isOpen:u},handlePress:()=>{y(!u),l?.(u)},as:"button",id:`accordion-control-${n}`,"aria-label":i,children:[a.jsx("div",{className:g,children:s}),a.jsx("div",{className:w,children:a.jsx(j,{icon:c??"ArrowDown"})})]}),a.jsx("div",{className:m,role:"region",id:`accordion-content-${n}`,"aria-labelledby":`accordion-control-${n}`,children:a.jsx("div",{className:$,children:d})})]})},sn=e=>{const{sharingLinksList:t,id:r,isOpen:n,setIsOpen:o,onShare:s,themeName:i="shareButton",tokens:l,customTheme:c}=e,d=b(`${i}.linksList`,{...l,isOpen:n},c),u=x.useFocusManager(),y=f=>{f.key==="Escape"&&o(!1);const{listDirection:g}=l??{};g==="row"&&(f.key==="ArrowRight"&&(u.focusNext({wrap:!0}),f.preventDefault()),f.key==="ArrowLeft"&&(u.focusPrevious({wrap:!0}),f.preventDefault())),g==="column"&&(f.key==="ArrowDown"&&(u.focusNext({wrap:!0}),f.preventDefault()),f.key==="ArrowUp"&&(u.focusPrevious({wrap:!0}),f.preventDefault()))};return a.jsx("div",{className:d,id:r,role:"listbox",tabIndex:-1,onKeyDown:y,children:t?.map(f=>{const{ariaLabel:g,onClick:w,href:m,icon:$,key:v}=f;return a.jsx(Q,{themeName:`${i}.link`,tokens:{...l,isOpen:n},handlePress:()=>{s?.(v),w?.(v)},"aria-label":g,...m?{href:m,rel:"noopener noreferrer",target:"_blank",as:"a"}:{},role:"option",children:a.jsx(j,{themeName:`${i}.linkIcons`,icon:$})},v)})})},an=e=>{const{ariaLabel:t,icon:r,id:n,sharingLinksList:o,onShare:s,customTheme:i,themeName:l="shareButton",tokens:c,...d}=e,[u,y]=h.useState(!1),f=b(`${l}.container`,c,i),g=m=>{y(!u),!u&&setTimeout(()=>{m.target.parentElement?.lastChild?.firstChild?.focus()})},w=m=>{const $=m.currentTarget.firstChild,v=m.currentTarget.lastChild,M=v.firstChild,k=v.lastChild,{listDirection:D}=c??{};D==="row"&&(m.key==="ArrowRight"&&m.target===$&&(M?.focus(),m.preventDefault()),m.key==="ArrowLeft"&&m.target===$&&(k.focus(),m.preventDefault())),D==="column"&&(m.key==="ArrowDown"&&m.target===$&&(M?.focus(),m.preventDefault()),m.key==="ArrowUp"&&m.target===$&&(k.focus(),m.preventDefault())),m.key==="Escape"&&(y(!1),$?.focus()),document.activeElement===v&&$?.focus()};return a.jsx(x.FocusScope,{autoFocus:!0,restoreFocus:!0,contain:u,children:a.jsxs("div",{className:f,onKeyDown:w,children:[a.jsx(V,{themeName:`${l}.button`,tokens:{...c,isOpen:u},"aria-label":t,"aria-haspopup":"listbox","aria-expanded":u?"true":"false","aria-controls":"share-buttons",handlePress:g,...d,children:a.jsx(j,{themeName:`${l}.icon`,icon:r??"Share"})}),u&&a.jsx(sn,{id:n,sharingLinksList:o,onShare:s,isOpen:u,setIsOpen:y,themeName:l,customTheme:i,tokens:c})]})})};function ft(){const e=h.createContext(void 0);function t(){const r=h.useContext(e);if(r===void 0)throw new Error("useCtx must be inside a Provider");return r}return[t,e.Provider]}const ht=(e,t,r)=>{const n=Qt.useOverlayTriggerState({defaultOpen:e,onOpenChange:u=>t?.(u)}),o=h.useRef(null),s=h.useRef(null);h.useEffect(()=>{if(e){n.open();return}n.close()},[e]);const i=()=>{n.open()},l=()=>{n.close(),r?.()},{buttonProps:c}=x.useButton({elementType:"div",onPress:i},o),{buttonProps:d}=x.useButton({onPress:l},s);return{state:n,openButtonProps:c,closeButtonProps:d,handleOpen:i,handleClose:l,openButtonRef:o,closeButtonRef:s}},[mt,ln]=ft();function cn({children:e,defaultSelectedKey:t}){const{state:r,closeButtonProps:n,closeButtonRef:o,openButtonProps:s,openButtonRef:i}=ht(!1),l=h.useMemo(()=>({defaultSelectedKey:t,overlayState:r,buttonProps:{closeButtonProps:n,closeButtonRef:o,openButtonProps:s,openButtonRef:i}}),[r,t,n,s]);return a.jsx(ln,{value:l,children:e})}const un=({isVisible:e,children:t})=>N.useTransition(e,{from:{opacity:0,translateX:"100%"},enter:{opacity:1,translateX:"0%"},leave:{opacity:0,translateX:"25%"}})((n,o)=>o&&a.jsx(N.animated.div,{style:n,children:t})),dn="fixed",fn=({isVisible:e,children:t})=>N.useTransition(e,{from:{opacity:0,position:dn,left:0,top:0,zIndex:1e3,bottom:0,height:"100%",width:"100%"},enter:{opacity:1},leave:{opacity:0},config:N.config.stiff})((n,o)=>o&&a.jsx(N.animated.div,{style:n,children:t})),hn="fixed",mn=({isVisible:e,children:t})=>N.useTransition(e,{from:{opacity:0,scale:.75,position:hn,left:0,top:0,zIndex:1e3,bottom:0,height:"100%",width:"100%"},enter:{opacity:1,scale:1},leave:{opacity:0,scale:.75},config:N.config.stiff})((n,o)=>o&&a.jsx(N.animated.div,{style:n,children:t})),bn=e=>{const{children:t}=e,r=h.useRef(null),{overlayProps:n,underlayProps:o}=x.useOverlay(e,r),{modalProps:s}=x.useModal(),{dialogProps:i}=x.useDialog(e,r);return a.jsx("div",{...o,children:a.jsx(x.FocusRing,{focusRingClass:"has-focus-ring",within:!0,autoFocus:!0,children:a.jsx(x.FocusScope,{contain:!0,restoreFocus:!0,autoFocus:!0,children:a.jsx("div",{...n,...i,...s,ref:r,children:t})})})})},Re=e=>{const[t,r]=h.useState(!1),{children:n,state:o,onCloseCallBack:s,transitionComponent:i=mn}=e,l=h.useCallback(()=>{o.close(),s?.()},[o.close,s]);return h.useEffect(()=>{!o.isOpen&&t||r(!0)},[o.isOpen]),t?a.jsx(G.OverlayContainer,{children:a.jsx(i,{isVisible:o.isOpen,children:a.jsx(bn,{isOpen:o.isOpen,onClose:l,isDismissable:!0,children:n})})}):null},gn=e=>{const{children:t,closeBtnRender:r,themeName:n="sidePanel",tokens:o,customTheme:s}=e,i=b(`${n}.wrapper`,o,s),l=b(`${n}.container`,o,s),c=b(`${n}.innerContainer`,o,s),{overlayState:d}=mt();return a.jsx(Re,{state:d,transitionComponent:fn,children:a.jsxs(Vt,{className:i,children:[r&&r(),a.jsx(un,{isVisible:d.isOpen,children:a.jsx("div",{className:l,children:a.jsx("div",{className:c,children:t})})})]})})},pn=h.memo(gn),yn=e=>{const{children:t,thumbnailContent:r,isOpen:n,onOpenCallBack:o,onCloseCallBack:s,label:i,themeName:l="lightBox",tokens:c,customTheme:d}=e,{state:u,openButtonRef:y,openButtonProps:f,closeButtonProps:g,closeButtonRef:w}=ht(n,o,s),m=b(`${l}.container`,c,d);return a.jsxs("div",{children:[a.jsx(_.FocusRing,{focusRingClass:"has-focus-ring",within:!0,children:a.jsxs(V,{ref:y,themeName:`${l}.wrapper`,...f,...n?{tabIndex:-1}:{},children:[i&&a.jsx(T,{themeName:`${l}.label`,tokens:{size:"footnotes"},children:i}),r]})}),a.jsx(Re,{onCloseCallBack:s,state:u,children:a.jsxs("div",{children:[a.jsx(V,{themeName:`${l}.closeBtn`,type:"button",...g,ref:w,children:a.jsx(j,{icon:"CloseBtn"})}),a.jsx("div",{className:m,children:t})]})})]})},xn=({as:e="div",themeName:t="box",tokens:r,customTheme:n,children:o,className:s,...i})=>{const l=b(t,r,n);return a.jsx(e,{...i,className:l,children:o})},bt=h.forwardRef((e,t)=>{const{as:r="div",tokens:n,themeName:o="box",customTheme:s,children:i,...l}=e,c=b(o,n,s);return a.jsx(r,{...l,ref:t,className:c,children:i})}),$n=h.forwardRef((e,t)=>{const{isOpen:r,onClose:n,children:o,positionProps:s,themeName:i="popover",tokens:l,customTheme:c,...d}=e,{overlayProps:u}=x.useOverlay({isOpen:r,onClose:n,shouldCloseOnBlur:!1,isDismissable:!1},t),{modalProps:y}=x.useModal(),{dialogProps:f}=x.useDialog({},t),g=b(`${i}.popover`,l,c);return a.jsx(x.FocusScope,{autoFocus:!0,restoreFocus:!0,contain:!0,children:a.jsxs(bt,{customTheme:g,...x.mergeProps(u,y,f),ref:t,...s,...d,children:[h.Children.map(o,w=>a.jsx(x.FocusRing,{focusRingClass:"has-focus-ring",children:w})),a.jsx(x.DismissButton,{onDismiss:n})]})})});function vn(e){const{children:t,buttonProps:r,placement:n="right",offset:o=5,themeName:s="popover",tokens:i,customTheme:l}=e,c=rt.useOverlayTriggerState({}),d=h.useRef(null),u=h.useRef(null),{triggerProps:y,overlayProps:f}=x.useOverlayTrigger({type:"dialog"},c,d),{overlayProps:g}=x.useOverlayPosition({targetRef:d,overlayRef:u,placement:n,offset:o,isOpen:c.isOpen}),{onPress:w,...m}=y;return a.jsxs(a.Fragment,{children:[a.jsx(V,{themeName:`${s}.button`,handlePress:w,...r,...m,ref:d}),c.isOpen&&a.jsx(x.OverlayContainer,{children:a.jsx($n,{themeName:s,tokens:i,customTheme:l,...f,positionProps:g,ref:u,isOpen:c.isOpen,onClose:c.close,children:t})})]})}const wn=({content:e,themeName:t="wysiwyg",...r})=>a.jsx(T,{...r,themeName:t,dangerouslySetInnerHTML:{__html:Wt.sanitize(e,{ADD_TAGS:["iframe"],ADD_ATTR:["allow","allowfullscreen","frameborder","scrolling"]})}}),Dn=e=>a.jsxs("svg",{width:24,height:24,fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e,children:[a.jsx("g",{children:a.jsx("path",{d:"M23.92 12.38a1 1 0 0 0 0-.76 1 1 0 0 0-.21-.33l-8-8a1.003 1.003 0 1 0-1.42 1.42l6.3 6.29H1a1 1 0 1 0 0 2h19.59l-6.3 6.29a1 1 0 0 0 0 1.42 1.002 1.002 0 0 0 1.42 0l8-8c.091-.095.162-.207.21-.33Z"})}),a.jsx("defs",{children:a.jsx("clipPath",{children:a.jsx("path",{fill:"currentColor",d:"M0 0h24v24H0z"})})})]}),gt=h.memo(Dn,Ht),Cn=Object.freeze(Object.defineProperty({__proto__:null,default:gt},Symbol.toStringTag,{value:"Module"})),Mn=e=>{const{as:t="time",date:r,tokens:n,customTheme:o,dateFormatterOptions:s={month:"long",day:"numeric",year:"numeric"},themeName:i="typography",...l}=e,c=x.useIsSSR(),d=new Date(r),y=fe.useDateFormatter(s).format(d),f=b(i,n,o);return c||Pe.isEmpty(y)?null:a.jsx(t,{...l,dateTime:d.toISOString(),className:f,children:y})},kn=({item:e,state:t,themeName:r="li"})=>{const n=h.useRef(null),{optionProps:o,isFocusVisible:s}=x.useOption({key:e.key},t,n),i=b(r);return a.jsx(Se,{as:"li",...o,tokens:{className:`${i} ${s?"has-focus-ring":""}`},ref:n,children:e.rendered})},Pn=e=>{const t=h.useRef(null),{listBoxRef:r=t,state:n,themeName:o="option"}=e,{listBoxProps:s}=x.useListBox(e,n,r);return a.jsx(x.FocusScope,{autoFocus:!0,restoreFocus:!0,contain:!0,children:a.jsx(Se,{...s,ref:r,as:"ul",themeName:`${o}.ul`,children:[...n.collection].map(i=>a.jsx(kn,{themeName:`${o}.li`,item:i,state:n},i.key))})})},Tn=e=>{const t=h.useRef(null),{popoverRef:r=t,state:n,children:o,themeName:s="popover",...i}=e,{popoverProps:l,underlayProps:c}=x.usePopover({...e,popoverRef:r},n);return a.jsxs(x.Overlay,{children:[a.jsx("div",{...c,style:{position:"fixed",inset:0}}),a.jsxs(Se,{themeName:s,...i,...l,as:"div",ref:r,children:[a.jsx(x.DismissButton,{onDismiss:n.close}),o,a.jsx(x.DismissButton,{onDismiss:n.close})]})]})},pt=e=>{const{name:t,placeholderLabel:r,disabled:n,hookFormRef:o,isError:s=!1,errorMessage:i,themeName:l="select",tokens:c,customTheme:d,label:u,onSelectionChange:y,defaultValue:f,value:g,icon:w,...m}=e,$=h.useRef(null),v=rt.useSelectState({...m,selectedKey:g,defaultSelectedKey:f,onSelectionChange:y}),{triggerProps:M,menuProps:k,labelProps:D}=x.useSelect({...m},v,$),S=b(`${l}.wrapper`,c,d),F=b(`${l}.container`,c,d);return a.jsxs("div",{className:S,children:[u&&a.jsx(T,{...D,as:"label",themeName:`${l}.label`,children:u}),a.jsx(x.HiddenSelect,{...o,state:v,triggerRef:$,name:t,isDisabled:!0}),a.jsxs("div",{className:F,children:[a.jsxs(V,{...M,ref:$,disabled:n,themeName:`${l}.button`,tokens:{...c,intent:s?"error":"default"},children:[v.selectedItem?v.selectedItem.rendered:r,a.jsx(j,{icon:w??"ArrowDown"})]}),v.isOpen&&$.current&&a.jsx(Tn,{state:v,tokens:{width:`${$.current?.offsetWidth}`},triggerRef:$,placement:"bottom",themeName:`${l}.popover`,children:a.jsx(Pn,{...k,themeName:l,state:v})}),s&&a.jsx(T,{tokens:{...c,isError:s},themeName:`${l}.errorMessage`,children:i})]})]})},jn=e=>{const{name:t,required:r,children:n}=e,{register:o,formState:s}=ae.useFormContext(),l=ae.get(s.errors,t)?.message??void 0,{ref:c}=o(t,{required:r?"This is an error message":!1});return a.jsx(pt,{...e,isError:!Pe.isEmpty(l),errorMessage:l,hookFormRef:c,children:n})},Sn=e=>{const{id:t,label:r,isDisabled:n=!1,isError:o=!1,errorMessage:s,ariaLabel:i,icon:l,themeName:c="checkbox",tokens:d,customTheme:u}=e,y=Kt.useToggleState(e),f=h.useRef(null),{inputProps:g}=Gt.useCheckbox(e,y,f),{isSelected:w}=y,{focusProps:m,isFocusVisible:$}=_.useFocusRing(),v={...d,selected:w,isDisabled:n,isError:o,isFocusVisible:$},M=b(`${c}.container`,v,u),k=b(`${c}.checkBox`,v,u),D=b(`${c}.checkMark`,v,u),S=b(`${c}.checkMarkIcon`,v,u);return a.jsxs("div",{children:[a.jsx(_.FocusRing,{focusRingClass:"has-focus-ring",within:!0,children:a.jsxs("label",{className:M,htmlFor:t,"aria-label":i,"aria-disabled":n,children:[a.jsx(zt.VisuallyHidden,{children:a.jsx("input",{type:"checkbox",ref:f,"aria-labelledby":t,...g,...m})}),a.jsx("div",{className:k,"aria-checked":w,role:"checkbox","aria-labelledby":t,children:a.jsx("div",{className:D,children:l&&a.jsx(j,{icon:l,customTheme:S})})}),a.jsx(T,{themeName:`${c}.label`,tokens:v,children:r})]})}),o&&s&&a.jsx(T,{themeName:`${c}.errorMessage`,tokens:v,children:s})]})},Rn=e=>{const{id:t,label:r,name:n,placeholder:o,required:s,disabled:i=!1,errorMessage:l,ariaLabel:c,value:d,onBlur:u,onChange:y,fieldRef:f,themeName:g="textarea",tokens:w,customTheme:m}=e,$=h.useRef(null),{errorMessageProps:v,inputProps:M,labelProps:k}=x.useTextField(e,$),D={...w,isDisabled:i,isError:l!=null},S=b(`${g}.wrapper`,D,m),F=b(`${g}.input`,D,m),pe=b(`${g}.label`,D,m),ye=b(`${g}.container`,D,m);return a.jsxs("div",{children:[a.jsxs("div",{className:S,"aria-disabled":i,children:[r&&a.jsx("label",{className:pe,...k,children:r}),a.jsx("div",{className:ye,children:a.jsx(_.FocusRing,{focusRingClass:"has-focus-ring",children:a.jsx("textarea",{ref:H=>{f?.(H),$.current=H},className:F,placeholder:o,disabled:i,required:s,id:t,name:n,"aria-label":c,"aria-labelledby":t,value:d,onBlur:u,onChange:y,...M})})})]}),l&&a.jsx(T,{themeName:`${g}.errorMessage`,tokens:D,...v,children:l})]})},yt=e=>{const{id:t,label:r,required:n,disabled:o=!1,errorMessage:s,ariaLabel:i,value:l,onBlur:c,onChange:d,fieldRef:u,type:y="text",children:f,themeName:g="textInput",tokens:w,customTheme:m}=e,$=h.useRef(null),{errorMessageProps:v,inputProps:M,labelProps:k}=x.useTextField(e,$),D={...w,isDisabled:o,isError:s!=null},S=b(`${g}.wrapper`,D,m),F=b(`${g}.label`,D,m),pe=b(`${g}.input`,D,m),ye=b(`${g}.container`,D,m);return a.jsxs("div",{children:[a.jsx(_.FocusRing,{focusRingClass:"has-focus-ring",within:!0,children:a.jsxs("div",{"aria-disabled":o,className:S,children:[r&&a.jsx("label",{className:F,...k,children:r}),a.jsxs("div",{className:ye,children:[f,a.jsx("input",{...M,className:pe,disabled:o,required:n,ref:H=>{u?.(H),$.current=H},"aria-label":i,"aria-labelledby":t,value:l,onBlur:c,onChange:d,type:y})]})]})}),s&&a.jsx(T,{themeName:`${g}.errorMessage`,tokens:D,...v,children:s})]})},In=e=>{const{name:t,required:r,minLength:n=0,maxLength:o=99999999,validation:s}=e,{register:i,formState:l}=ae.useFormContext(),d=ae.get(l.errors,t)?.message??void 0,{t:u}=Xt.useTranslation("components"),{ref:y,...f}=i(t,{required:r?u("FORM.ERROR.REQUIRED")??"required":!1,minLength:{value:n,message:u("FORM.ERROR.MIN_LENGTH",{length:n})},maxLength:{value:o,message:u("FORM.ERROR.MAX_LENGTH",{length:n})},...s});return a.jsx(yt,{fieldRef:y,...f,...e,isError:!Pe.isEmpty(d),errorMessage:d})};function An(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function xt(e,t,r){An(e,t),t.set(e,r)}function R(e,t){return e-t*Math.floor(e/t)}const $t=1721426;function q(e,t,r,n){t=X(e,t);let o=t-1,s=-2;return r<=2?s=0:B(t)&&(s=-1),$t-1+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*r-362)/12+s+n)}function B(e){return e%4===0&&(e%100!==0||e%400===0)}function X(e,t){return e==="BC"?1-t:t}function he(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}const Bn={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class I{fromJulianDay(t){let r=t,n=r-$t,o=Math.floor(n/146097),s=R(n,146097),i=Math.floor(s/36524),l=R(s,36524),c=Math.floor(l/1461),d=R(l,1461),u=Math.floor(d/365),y=o*400+i*100+c*4+u+(i!==4&&u!==4?1:0),[f,g]=he(y),w=r-q(f,g,1,1),m=2;r<q(f,g,3,1)?m=0:B(g)&&(m=1);let $=Math.floor(((w+m)*12+373)/367),v=r-q(f,g,$,1)+1;return new C(f,g,$,v)}toJulianDay(t){return q(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return Bn[B(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return B(t.year)?366:365}getYearsInEra(t){return 9999}getEras(){return["BC","AD"]}isInverseEra(t){return t.era==="BC"}balanceDate(t){t.year<=0&&(t.era=t.era==="BC"?"AD":"BC",t.year=1-t.year)}constructor(){this.identifier="gregory"}}const En={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function Ne(e,t){return t=me(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function vt(e,t){let r=e.calendar.toJulianDay(e),n=Math.ceil(r+1-On(t))%7;return n<0&&(n+=7),n}function wt(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function Nn(e,t){return Fe(e)-Fe(t)}function Fe(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let xe=null;function Dt(){return xe==null&&(xe=new Intl.DateTimeFormat().resolvedOptions().timeZone),xe}function Fn(e){return e.subtract({days:e.day-1})}const Le=new Map;function Ln(e){if(Intl.Locale){let r=Le.get(e);return r||(r=new Intl.Locale(e).maximize().region,Le.set(e,r)),r}let t=e.split("-")[1];return t==="u"?null:t}function On(e){let t=Ln(e);return En[t]||0}function qn(e,t){let r=e.calendar.getDaysInMonth(e);return Math.ceil((vt(Fn(e),t)+r)/7)}function Oe(e){e=me(e,new I);let t=X(e.era,e.year);return Ct(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function Ct(e,t,r,n,o,s,i){let l=new Date;return l.setUTCHours(n,o,s,i),l.setUTCFullYear(e,t-1,r),l.getTime()}function qe(e,t){if(t==="UTC")return 0;if(e>0&&t===Dt())return new Date(e).getTimezoneOffset()*-6e4;let{year:r,month:n,day:o,hour:s,minute:i,second:l}=Mt(e,t);return Ct(r,n,o,s,i,l,0)-Math.floor(e/1e3)*1e3}const Ue=new Map;function Mt(e,t){let r=Ue.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Ue.set(t,r));let n=r.formatToParts(new Date(e)),o={};for(let s of n)s.type!=="literal"&&(o[s.type]=s.value);return{year:o.era==="BC"||o.era==="B"?-o.year+1:+o.year,month:+o.month,day:+o.day,hour:o.hour==="24"?0:+o.hour,minute:+o.minute,second:+o.second}}const Ye=864e5;function Un(e,t,r,n){return(r===n?[r]:[r,n]).filter(s=>Yn(e,t,s))}function Yn(e,t,r){let n=Mt(r,t);return e.year===n.year&&e.month===n.month&&e.day===n.day&&e.hour===n.hour&&e.minute===n.minute&&e.second===n.second}function Jn(e,t,r="compatible"){let n=Pt(e);if(t==="UTC")return Oe(n);if(t===Dt()&&r==="compatible"){n=me(n,new I);let c=new Date,d=X(n.era,n.year);return c.setFullYear(d,n.month-1,n.day),c.setHours(n.hour,n.minute,n.second,n.millisecond),c.getTime()}let o=Oe(n),s=qe(o-Ye,t),i=qe(o+Ye,t),l=Un(n,t,o-s,o-i);if(l.length===1)return l[0];if(l.length>1)switch(r){case"compatible":case"earlier":return l[0];case"later":return l[l.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(o-s,o-i);case"compatible":case"later":return Math.max(o-s,o-i);case"reject":throw new RangeError("No such absolute time found")}}function kt(e,t,r="compatible"){return new Date(Jn(e,t,r))}function Pt(e,t){let r=0,n=0,o=0,s=0;if("timeZone"in e)({hour:r,minute:n,second:o,millisecond:s}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:o,millisecond:s}=t),new ie(e.calendar,e.era,e.year,e.month,e.day,r,n,o,s)}function me(e,t){if(e.calendar.identifier===t.identifier)return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,W(n),n}function Ie(e,t){let r=e.copy(),n="hour"in r?Gn(r,t):0;we(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,De(r),Tt(r),r.day+=(t.weeks||0)*7,r.day+=t.days||0,r.day+=n,_n(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let o=r.calendar.getYearsInEra(r);if(r.year>o){var s,i;let c=(i=(s=r.calendar).isInverseEra)===null||i===void 0?void 0:i.call(s,r);r.year=o,r.month=c?1:r.calendar.getMonthsInYear(r),r.day=c?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let l=r.calendar.getMonthsInYear(r);return r.month>l&&(r.month=l,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function we(e,t){var r,n;!((n=(r=e.calendar).isInverseEra)===null||n===void 0)&&n.call(r,e)&&(t=-t),e.year+=t}function De(e){for(;e.month<1;)we(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,we(e,1)}function _n(e){for(;e.day<1;)e.month--,De(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,De(e)}function Tt(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function W(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),Tt(e)}function Vn(e){let t={};for(let r in e)typeof e[r]=="number"&&(t[r]=-e[r]);return t}function jt(e,t){return Ie(e,Vn(t))}function St(e,t){let r=e.copy();return t.era!=null&&(r.era=t.era),t.year!=null&&(r.year=t.year),t.month!=null&&(r.month=t.month),t.day!=null&&(r.day=t.day),W(r),r}function Qn(e,t){let r=e.copy();return t.hour!=null&&(r.hour=t.hour),t.minute!=null&&(r.minute=t.minute),t.second!=null&&(r.second=t.second),t.millisecond!=null&&(r.millisecond=t.millisecond),Hn(r),r}function Wn(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=ee(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=ee(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=ee(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=ee(e.hour,24),t}function Hn(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function ee(e,t){let r=e%t;return r<0&&(r+=t),r}function Gn(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,Wn(e)}function Rt(e,t,r,n){let o=e.copy();switch(t){case"era":{let l=e.calendar.getEras(),c=l.indexOf(e.era);if(c<0)throw new Error("Invalid era: "+e.era);c=E(c,r,0,l.length-1,n?.round),o.era=l[c],W(o);break}case"year":var s,i;!((i=(s=o.calendar).isInverseEra)===null||i===void 0)&&i.call(s,o)&&(r=-r),o.year=E(e.year,r,-1/0,9999,n?.round),o.year===-1/0&&(o.year=1),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,e);break;case"month":o.month=E(e.month,r,1,e.calendar.getMonthsInYear(e),n?.round);break;case"day":o.day=E(e.day,r,1,e.calendar.getDaysInMonth(e),n?.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(o),W(o),o}function zn(e,t,r,n){let o=e.copy();switch(t){case"hour":{let s=e.hour,i=0,l=23;if(n?.hourCycle===12){let c=s>=12;i=c?12:0,l=c?23:11}o.hour=E(s,r,i,l,n?.round);break}case"minute":o.minute=E(e.minute,r,0,59,n?.round);break;case"second":o.second=E(e.second,r,0,59,n?.round);break;case"millisecond":o.millisecond=E(e.millisecond,r,0,999,n?.round);break;default:throw new Error("Unsupported field "+t)}return o}function E(e,t,r,n,o=!1){if(o){e+=Math.sign(t),e<r&&(e=n);let s=Math.abs(t);t>0?e=Math.ceil(e/s)*s:e=Math.floor(e/s)*s,e>n&&(e=r)}else e+=t,e<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function Kn(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function It(e){let t=me(e,new I);return`${String(t.year).padStart(4,"0")}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function Xn(e){return`${It(e)}T${Kn(e)}`}function At(e){let t=typeof e[0]=="object"?e.shift():new I,r;if(typeof e[0]=="string")r=e.shift();else{let i=t.getEras();r=i[i.length-1]}let n=e.shift(),o=e.shift(),s=e.shift();return[t,r,n,o,s]}var Zn=new WeakMap;class C{copy(){return this.era?new C(this.calendar,this.era,this.year,this.month,this.day):new C(this.calendar,this.year,this.month,this.day)}add(t){return Ie(this,t)}subtract(t){return jt(this,t)}set(t){return St(this,t)}cycle(t,r,n){return Rt(this,t,r,n)}toDate(t){return kt(this,t)}toString(){return It(this)}compare(t){return wt(this,t)}constructor(...t){xt(this,Zn,{writable:!0,value:void 0});let[r,n,o,s,i]=At(t);this.calendar=r,this.era=n,this.year=o,this.month=s,this.day=i,W(this)}}var eo=new WeakMap;class ie{copy(){return this.era?new ie(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new ie(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return Ie(this,t)}subtract(t){return jt(this,t)}set(t){return St(Qn(this,t),t)}cycle(t,r,n){switch(t){case"era":case"year":case"month":case"day":return Rt(this,t,r,n);default:return zn(this,t,r,n)}}toDate(t,r){return kt(this,t,r)}toString(){return Xn(this)}compare(t){let r=wt(this,t);return r===0?Nn(this,Pt(t)):r}constructor(...t){xt(this,eo,{writable:!0,value:void 0});let[r,n,o,s,i]=At(t);this.calendar=r,this.era=n,this.year=o,this.month=s,this.day=i,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,W(this)}}const Y=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],to=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],ne=[1867,1911,1925,1988,2018],A=["meiji","taisho","showa","heisei","reiwa"];function Je(e){const t=Y.findIndex(([r,n,o])=>e.year<r||e.year===r&&e.month<n||e.year===r&&e.month===n&&e.day<o);return t===-1?Y.length-1:t===0?0:t-1}function $e(e){let t=ne[A.indexOf(e.era)];if(!t)throw new Error("Unknown era: "+e.era);return new C(e.year+t,e.month,e.day)}class ro extends I{fromJulianDay(t){let r=super.fromJulianDay(t),n=Je(r);return new C(this,A[n],r.year-ne[n],r.month,r.day)}toJulianDay(t){return super.toJulianDay($e(t))}balanceDate(t){let r=$e(t),n=Je(r);A[n]!==t.era&&(t.era=A[n],t.year=r.year-ne[n]),this.constrainDate(t)}constrainDate(t){let r=A.indexOf(t.era),n=to[r];if(n!=null){let[o,s,i]=n,l=o-ne[r];t.year=Math.max(1,Math.min(l,t.year)),t.year===l&&(t.month=Math.min(s,t.month),t.month===s&&(t.day=Math.min(i,t.day)))}if(t.year===1&&r>=0){let[,o,s]=Y[r];t.month=Math.max(o,t.month),t.month===o&&(t.day=Math.max(s,t.day))}}getEras(){return A}getYearsInEra(t){let r=A.indexOf(t.era),n=Y[r],o=Y[r+1];if(o==null)return 9999-n[0]+1;let s=o[0]-n[0];return(t.month<o[1]||t.month===o[1]&&t.day<o[2])&&s++,s}getDaysInMonth(t){return super.getDaysInMonth($e(t))}getMinimumMonthInYear(t){let r=_e(t);return r?r[1]:1}getMinimumDayInMonth(t){let r=_e(t);return r&&t.month===r[1]?r[2]:1}constructor(...t){super(...t),this.identifier="japanese"}}function _e(e){if(e.year===1){let t=A.indexOf(e.era);return Y[t]}}const Bt=-543;class no extends I{fromJulianDay(t){let r=super.fromJulianDay(t),n=X(r.era,r.year);return new C(this,n-Bt,r.month,r.day)}toJulianDay(t){return super.toJulianDay(Ve(t))}getEras(){return["BE"]}getDaysInMonth(t){return super.getDaysInMonth(Ve(t))}balanceDate(){}constructor(...t){super(...t),this.identifier="buddhist"}}function Ve(e){let[t,r]=he(e.year+Bt);return new C(t,r,e.month,e.day)}const le=1911;function Et(e){return e.era==="minguo"?e.year+le:1-e.year+le}function Qe(e){let t=e-le;return t>0?["minguo",t]:["before_minguo",1-t]}class oo extends I{fromJulianDay(t){let r=super.fromJulianDay(t),n=X(r.era,r.year),[o,s]=Qe(n);return new C(this,o,s,r.month,r.day)}toJulianDay(t){return super.toJulianDay(We(t))}getEras(){return["before_minguo","minguo"]}balanceDate(t){let[r,n]=Qe(Et(t));t.era=r,t.year=n}isInverseEra(t){return t.era==="before_minguo"}getDaysInMonth(t){return super.getDaysInMonth(We(t))}getYearsInEra(t){return t.era==="before_minguo"?9999:9999-le}constructor(...t){super(...t),this.identifier="roc"}}function We(e){let[t,r]=he(Et(e));return new C(t,r,e.month,e.day)}const so=1948321;function ao(e){let t=e>0?e-474:e-473,r=R(t,2820)+474;return R((r+38)*31,128)<31}function te(e,t,r){let n=e>0?e-474:e-473,o=R(n,2820)+474,s=t<=7?31*(t-1):30*(t-1)+6;return so-1+1029983*Math.floor(n/2820)+365*(o-1)+Math.floor((31*o-5)/128)+s+r}class io{fromJulianDay(t){let r=t-te(475,1,1),n=Math.floor(r/1029983),o=R(r,1029983),s=o===1029982?2820:Math.floor((128*o+46878)/46751),i=474+2820*n+s;i<=0&&i--;let l=t-te(i,1,1)+1,c=l<=186?Math.ceil(l/31):Math.ceil((l-6)/31),d=t-te(i,c,1)+1;return new C(this,i,c,d)}toJulianDay(t){return te(t.year,t.month,t.day)}getMonthsInYear(){return 12}getDaysInMonth(t){return t.month<=6?31:t.month<=11||ao(t.year)?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}const ve=78,He=80;class lo extends I{fromJulianDay(t){let r=super.fromJulianDay(t),n=r.year-ve,o=t-q(r.era,r.year,1,1),s;o<He?(n--,s=B(r.year-1)?31:30,o+=s+155+90+10):(s=B(r.year)?31:30,o-=He);let i,l;if(o<s)i=1,l=o+1;else{let c=o-s;c<155?(i=Math.floor(c/31)+2,l=c%31+1):(c-=155,i=Math.floor(c/30)+7,l=c%30+1)}return new C(this,n,i,l)}toJulianDay(t){let r=t.year+ve,[n,o]=he(r),s,i;return B(o)?(s=31,i=q(n,o,3,21)):(s=30,i=q(n,o,3,22)),t.month===1?i+t.day-1:(i+=s+Math.min(t.month-2,5)*31,t.month>=8&&(i+=(t.month-7)*30),i+=t.day-1,i)}getDaysInMonth(t){return t.month===1&&B(t.year+ve)||t.month>=2&&t.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return["saka"]}balanceDate(){}constructor(...t){super(...t),this.identifier="indian"}}const ce=1948440,Ge=1948439,P=1300,U=1600,co=460322;function ue(e,t,r,n){return n+Math.ceil(29.5*(r-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function Nt(e,t,r){let n=Math.floor((30*(r-t)+10646)/10631),o=Math.min(12,Math.ceil((r-(29+ue(t,n,1,1)))/29.5)+1),s=r-ue(t,n,o,1)+1;return new C(e,n,o,s)}function ze(e){return(14+11*e)%30<11}class Ae{fromJulianDay(t){return Nt(this,ce,t)}toJulianDay(t){return ue(ce,t.year,t.month,t.day)}getDaysInMonth(t){let r=29+t.month%2;return t.month===12&&ze(t.year)&&r++,r}getMonthsInYear(){return 12}getDaysInYear(t){return ze(t.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class uo extends Ae{fromJulianDay(t){return Nt(this,Ge,t)}toJulianDay(t){return ue(Ge,t.year,t.month,t.day)}constructor(...t){super(...t),this.identifier="islamic-tbla"}}const fo="qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=";let Ce,J;function oe(e){return co+J[e-P]}function z(e,t){let r=e-P,n=1<<11-(t-1);return Ce[r]&n?30:29}function Ke(e,t){let r=oe(e);for(let n=1;n<t;n++)r+=z(e,n);return r}function Xe(e){return J[e+1-P]-J[e-P]}class ho extends Ae{fromJulianDay(t){let r=t-ce,n=oe(P),o=oe(U);if(r<n||r>o)return super.fromJulianDay(t);{let s=P-1,i=1,l=1;for(;l>0;){s++,l=r-oe(s)+1;let c=Xe(s);if(l===c){i=12;break}else if(l<c){let d=z(s,i);for(i=1;l>d;)l-=d,i++,d=z(s,i);break}}return new C(this,s,i,r-Ke(s,i)+1)}}toJulianDay(t){return t.year<P||t.year>U?super.toJulianDay(t):ce+Ke(t.year,t.month)+(t.day-1)}getDaysInMonth(t){return t.year<P||t.year>U?super.getDaysInMonth(t):z(t.year,t.month)}getDaysInYear(t){return t.year<P||t.year>U?super.getDaysInYear(t):Xe(t.year)}constructor(){if(super(),this.identifier="islamic-umalqura",Ce||(Ce=new Uint16Array(Uint8Array.from(atob(fo),t=>t.charCodeAt(0)).buffer)),!J){J=new Uint32Array(U-P+1);let t=0;for(let r=P;r<=U;r++){J[r-P]=t;for(let n=1;n<=12;n++)t+=z(r,n)}}}}const Ze=347997,Ft=1080,Lt=24*Ft,mo=29,bo=12*Ft+793,go=mo*Lt+bo;function O(e){return R(e*7+1,19)<7}function se(e){let t=Math.floor((235*e-234)/19),r=12084+13753*t,n=t*29+Math.floor(r/25920);return R(3*(n+1),7)<3&&(n+=1),n}function po(e){let t=se(e-1),r=se(e);return se(e+1)-r===356?2:r-t===382?1:0}function K(e){return se(e)+po(e)}function Ot(e){return K(e+1)-K(e)}function yo(e){let t=Ot(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}function re(e,t){if(t>=6&&!O(e)&&t++,t===4||t===7||t===9||t===11||t===13)return 29;let r=yo(e);return t===2?r===2?30:29:t===3?r===0?29:30:t===6?O(e)?30:0:30}class xo{fromJulianDay(t){let r=t-Ze,n=r*Lt/go,o=Math.floor((19*n+234)/235)+1,s=K(o),i=Math.floor(r-s);for(;i<1;)o--,s=K(o),i=Math.floor(r-s);let l=1,c=0;for(;c<i;)c+=re(o,l),l++;l--,c-=re(o,l);let d=i-c;return new C(this,o,l,d)}toJulianDay(t){let r=K(t.year);for(let n=1;n<t.month;n++)r+=re(t.year,n);return r+t.day+Ze}getDaysInMonth(t){return re(t.year,t.month)}getMonthsInYear(t){return O(t.year)?13:12}getDaysInYear(t){return Ot(t.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(t,r){r.year!==t.year&&(O(r.year)&&!O(t.year)&&r.month>6?t.month--:!O(r.year)&&O(t.year)&&r.month>6&&t.month++)}constructor(){this.identifier="hebrew"}}const Me=1723856,et=1824665,ke=5500;function de(e,t,r,n){return e+365*t+Math.floor(t/4)+30*(r-1)+n-1}function Be(e,t){let r=Math.floor(4*(t-e)/1461),n=1+Math.floor((t-de(e,r,1,1))/30),o=t+1-de(e,r,n,1);return[r,n,o]}function qt(e){return Math.floor(e%4/3)}function Ut(e,t){return t%13!==0?30:qt(e)+5}class Ee{fromJulianDay(t){let[r,n,o]=Be(Me,t),s="AM";return r<=0&&(s="AA",r+=ke),new C(this,s,r,n,o)}toJulianDay(t){let r=t.year;return t.era==="AA"&&(r-=ke),de(Me,r,t.month,t.day)}getDaysInMonth(t){return Ut(t.year,t.month)}getMonthsInYear(){return 13}getDaysInYear(t){return 365+qt(t.year)}getYearsInEra(t){return t.era==="AA"?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class $o extends Ee{fromJulianDay(t){let[r,n,o]=Be(Me,t);return r+=ke,new C(this,"AA",r,n,o)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...t){super(...t),this.identifier="ethioaa"}}class vo extends Ee{fromJulianDay(t){let[r,n,o]=Be(et,t),s="CE";return r<=0&&(s="BCE",r=1-r),new C(this,s,r,n,o)}toJulianDay(t){let r=t.year;return t.era==="BCE"&&(r=1-r),de(et,r,t.month,t.day)}getDaysInMonth(t){let r=t.year;return t.era==="BCE"&&(r=1-r),Ut(r,t.month)}isInverseEra(t){return t.era==="BCE"}balanceDate(t){t.year<=0&&(t.era=t.era==="BCE"?"CE":"BCE",t.year=1-t.year)}getEras(){return["BCE","CE"]}getYearsInEra(t){return t.era==="BCE"?9999:9715}constructor(...t){super(...t),this.identifier="coptic"}}function Yt(e){switch(e){case"buddhist":return new no;case"ethiopic":return new Ee;case"ethioaa":return new $o;case"coptic":return new vo;case"hebrew":return new xo;case"indian":return new lo;case"islamic-civil":return new Ae;case"islamic-tbla":return new uo;case"islamic-umalqura":return new ho;case"japanese":return new ro;case"persian":return new io;case"roc":return new oo;case"gregory":default:return new I}}function wo({themeName:e="calendar",tokens:t,state:r,date:n}){const o=h.useRef(null),{cellProps:s,buttonProps:i,isSelected:l,isOutsideVisibleRange:c,isDisabled:d,formattedDate:u,isInvalid:y}=je.useCalendarCell({date:n},r,o),f=r?.highlightedRange?Ne(n,r?.highlightedRange.start):l,g=r?.highlightedRange?Ne(n,r?.highlightedRange.end):l,{locale:w}=x.useLocale(),m=vt(n,w),$=l&&(f||m===0||n.day===1),v=l&&(g||m===6||n.day===n.calendar.getDaysInMonth(n)),{focusProps:M,isFocusVisible:k}=_.useFocusRing(),D=b(`${e}.cellContainer`,{...t,isFocusVisible:k}),S=b(`${e}.cell`,{...t,isSelected:l,isInvalid:y,isDisabled:d,isRoundedLeft:$,isRoundedRight:v}),F=b(`${e}.cellDate`,{...t,isSelected:l,isInvalid:y,isDisabled:d,isSelectionStart:f,isSelectionEnd:g});return a.jsx("td",{...s,"aria-disabled":!1,className:D,children:a.jsx("div",{...er.mergeProps(i,M),ref:o,hidden:c,className:S,children:a.jsx("div",{className:F,children:u})})})}function Do({themeName:e="calendar",customTheme:t,tokens:r,state:n,...o}){const{locale:s}=fe.useLocale(),{gridProps:i,headerProps:l,weekDays:c}=je.useCalendarGrid({...o},n),d=qn(n.visibleRange.start,s),u=b(`${e}.calendarTable`,r),y=b(`${e}.dayLabel`,r);return a.jsxs("table",{...i,cellPadding:"0",className:u,children:[a.jsx("thead",{...l,children:a.jsx("tr",{children:c.map(f=>a.jsx("th",{className:y,children:f},`${f}`))})}),a.jsx("tbody",{children:[...new Array(d).keys()].map(f=>a.jsx("tr",{children:n.getDatesInWeek(f).map((g,w)=>g?a.jsx(wo,{state:n,date:g},g?.day):a.jsx("td",{},w))},f))})]})}function Jt({buttons:e,tokens:t,customTheme:r,themeName:n="calendar",...o}){const{locale:s}=fe.useLocale(),i=Zt.useCalendarState({...o,locale:s,createCalendar:Yt}),l=h.useRef(null),{calendarProps:c,prevButtonProps:d,nextButtonProps:u,title:y}=je.useCalendar({...o},i),f=b(`${n}.container`,t),g=b(`${n}.header`,t),w=b(`${n}.navigationButtonsContainer`,t);return a.jsxs("div",{...c,ref:l,className:f,children:[a.jsxs("div",{className:g,children:[a.jsx(T,{as:"p",tokens:{size:"h6"},children:y}),a.jsxs("div",{className:w,children:[a.jsx(Q,{themeName:`${n}.navigationButtons`,tokens:{...t},type:"button",...d,handlePress:d?.onPress,children:a.jsx(j,{icon:e?.buttonPrev?.icon??"ArrowLeft"})}),a.jsx(Q,{themeName:`${n}.navigationButtons`,tokens:{...t},type:"button",...u,handlePress:u?.onPress,children:a.jsx(j,{icon:e?.buttonNext?.icon??"ArrowRight"})})]})]}),a.jsx(Do,{state:i})]})}function Co({title:e,children:t,...r}){const n=h.useRef(null),{dialogProps:o}=x.useDialog(r,n);return a.jsx("div",{...o,ref:n,children:t})}function Mo({themeName:e="datePicker",tokens:t,...r}){const n=rr.useRef(null),{state:o,children:s}={...r},{popoverProps:i,underlayProps:l}=G.usePopover({...r,popoverRef:n},o),c=b(`${e}.calendarUnderlay`,t),d=b(`${e}.calendarPopover`,t);return a.jsxs(G.Overlay,{children:[a.jsx("div",{...l,className:c}),a.jsxs("div",{...i,ref:n,className:d,children:[a.jsx(G.DismissButton,{onDismiss:o.close}),s,a.jsx(G.DismissButton,{onDismiss:o.close})]})]})}function ko({segment:e,state:t}){const r=h.useRef(null),{segmentProps:n}=Te.useDateSegment(e,t,r),o=b("datePicker.dateSegment");return a.jsx(x.FocusRing,{focusRingClass:"has-focus-ring",children:a.jsxs("div",{...n,ref:r,className:o,children:[a.jsx("span",{"aria-hidden":"true",style:{visibility:e.isPlaceholder?"visible":"hidden",height:e.isPlaceholder?"":0,pointerEvents:"none",display:e.isPlaceholder?"block":"none"},children:e.placeholder}),e.isPlaceholder?"":e.text]})})}function tt(e){const{locale:t}=fe.useLocale(),r=nt.useDateFieldState({...e,locale:t,createCalendar:Yt}),n=h.useRef(null),{fieldProps:o}=Te.useDateField(e,r,n);return a.jsx("div",{...o,ref:n,className:"flex",children:r.segments.map((s,i)=>a.jsx(ko,{segment:s,state:r},i))})}function Po({popoverPlacement:e="bottom start",tokens:t,customTheme:r,themeName:n="datePicker",icon:o="ArrowDown",description:s,buttonLabel:i,...l}){const c=nt.useDatePickerState({...l}),d=h.useRef(null),{groupProps:u,fieldProps:y,labelProps:f,descriptionProps:g,buttonProps:w,dialogProps:m,calendarProps:$}=Te.useDatePicker({...l},c,d),{label:v}={...l},M=b(`${n}.container`,t),k=b(`${n}.dateField`,t),D=b(`${n}.label`,t);return a.jsxs("div",{className:M,children:[v&&a.jsx("span",{...f,children:v}),s&&a.jsx("div",{...g,children:s}),a.jsx("div",{...u,ref:d,children:a.jsxs(Q,{themeName:`${n}.button`,tokens:{...t},type:"button",...w,handlePress:w.onPress,children:[i&&a.jsx("p",{className:D,children:i}),a.jsxs("div",{className:k,children:[a.jsx(tt,{...y}),c.validationState==="invalid"&&"❌"]}),a.jsx(j,{themeName:`${n}.icon`,tokens:{...t},icon:o})]})}),c.isOpen&&a.jsx(Mo,{triggerRef:d,state:c,placement:e,children:a.jsxs(Co,{...m,children:[a.jsxs("div",{children:[a.jsx(tt,{...y}),c.validationState==="invalid"&&"❌"]}),a.jsx(Jt,{...$})]})})]})}const[To,jo]=ft();function So({children:e}){const[t,r]=h.useState(!1);h.useEffect(()=>{r(!0)},[]);const n=h.useMemo(()=>({isClient:t}),[t]);return a.jsx(jo,{value:n,children:e})}const be=(e,t,r="sharing_tool")=>`?utm_source=${e}&utm_medium=${t}&utm_campaign=${r}`,ge=()=>{const[e,t]=h.useState(),[r,n]=h.useState();return h.useEffect(()=>{t(window.location.href),n(window.document.title)},[]),{windowLocation:e,windowTitle:r}},Ro=(e,t,r)=>{const{windowLocation:n,windowTitle:o}=ge(),s=r??n,i=be(e,t);return`https://www.facebook.com/sharer.php?u=${`${s}${i}`}&t=${o}`},Io=(e,t,r)=>{const{windowLocation:n,windowTitle:o}=ge(),s=r??n,i=be(e,t),l=`${s}${i}`;return`mailto:?to=&body=${o}%20${l}`},Ao=(e,t,r)=>{const{windowLocation:n}=ge(),o=r??n,s=be(e,t);return`https://twitter.com/intent/tweet?text=${`${o}${s}`}`};exports.Accordion=on;exports.ArrowRight=gt;exports.Box=xn;exports.BoxWithForwardRef=bt;exports.Button=Q;exports.ButtonWithForwardRef=V;exports.Calendar=Jt;exports.Checkbox=Sn;exports.Date=Mn;exports.DatePicker=Po;exports.Icon=j;exports.IsClientContextProvider=So;exports.Lightbox=yn;exports.Modal=Re;exports.Popover=vn;exports.ReactHookFormInput=In;exports.ReactHookFormSelect=jn;exports.Select=pt;exports.ShareButton=an;exports.SidePanel=pn;exports.SidePanelContextProvider=cn;exports.TextArea=Rn;exports.TextInputField=yt;exports.ThemeContextProvider=at;exports.ThemeProvider=Xr;exports.Typography=T;exports.WysiwygBlock=wn;exports.createThemeProvider=it;exports.generateUtmTags=be;exports.makeTheme=ot;exports.useFacebookShareUrl=Ro;exports.useIsClient=To;exports.useMailToShareUrl=Io;exports.useSidePanel=mt;exports.useTheme=st;exports.useThemeContext=b;exports.useTwitterShareUrl=Ao;exports.useWindow=ge;
|
|
83
|
+
`,variants:{isError:{true:"border-red-500"}}}),rn=ot({main:e=>fr(e),gridItem:e=>mr(e),grid:e=>hr(e),container:e=>lt(e),accordion:{container:e=>ar(e),button:e=>ir(e),title:e=>lr(e),icon:e=>cr(e),region:e=>ur(e),content:e=>dr(e)},calendar:{container:e=>br(e),header:e=>gr(e),navigationButtonsContainer:e=>pr(e),navigationButtons:e=>yr(e),table:e=>xr(e),dayLabel:e=>$r(e),cellContainer:e=>vr(e),cell:e=>wr(e),cellDate:e=>Dr(e)},datePicker:{container:e=>jr(e),button:e=>Sr(e),icon:e=>Er(e),dateField:e=>Ar(e),dateSegment:e=>Br(e),label:e=>Nr(e),calendarPopover:e=>Ir(e),calendarUnderlay:e=>Rr(e)},popover:{button:e=>Z(e),popover:()=>"border-2 text-black p-4 bg-gray-300"},typography:e=>R(e),button:e=>Z(e),sidePanel:{wrapper:e=>Xr(e),container:e=>Zr(e),innerContainer:e=>en(e)},lightBox:{wrapper:e=>Fr(e),container:e=>Lr(e),closeBtn:e=>Or(e),label:e=>qr(e)},shareButton:{icon:e=>zr(e),button:e=>Wr(e),container:e=>Qr(e),linksList:e=>Gr(e),link:e=>Hr(e),linkIcons:e=>Kr(e)},checkbox:{container:e=>Cr(e),label:e=>Mr(e),checkBox:e=>kr(e),checkMark:e=>Pr(e),checkMarkIcon:e=>Tr(e),errorMessage:e=>R(e)},radio:{label:e=>Ur(e),radio:e=>Yr(e),selectedMark:e=>Jr(e),errorMessage:e=>R(e)},radioGroup:{radioGroup:e=>_r(e),radioGroupItemsGroup:e=>Vr(e),errorMessage:e=>R(e)},select:{button:e=>Z(e),ul:e=>R({...e,className:"outline outline-2 outline-white outline-offset-2 p-2 my-4 rounded-md w-full flex flex-col gap-6"}),popover:e=>Z(e),errorMessage:e=>R({...e,size:"footnotes",isError:!0}),wrapper:()=>"flex flex-col gap-4 relative",container:()=>"flex flex-col gap-4",li:()=>"transition w-full hover:text-gray-300 focus-ring-white"},textarea:{wrapper:()=>"flex flex-col",container:()=>"flex items-center gap-4",label:()=>"text-gray-3 px-6",input:e=>tn(e),errorMessage:e=>R({...e,size:"footnotes",isError:!0})},textInput:{wrapper:()=>"flex flex-col rounded-md px-4 py-1 mb-3 m-0.5 border-2 aria-disabled:pointer-events-none aria-disabled:opacity-30 focus-ring-black",label:()=>"text-xs",container:()=>"flex items-center gap-4",input:()=>"",errorMessage:e=>R({...e,size:"footnotes",isError:!0})}}),nn=h.memo(it(rn)),g=(e,t={},r=null)=>{const n=st();if(n!=null&&e!=null){const{brandTheme:o}=n,s=_t.get(o,e);if(typeof s=="function"){const i=s?.(t);if(typeof i=="string")return i}}if(r)return r},T=({as:e="span",themeName:t="typography",tokens:r,customTheme:n,children:o,...s})=>{const i=g(t,r,n);return a.jsx(e,{...s,className:i,children:o})},Se=h.forwardRef((e,t)=>{const{as:r="span",tokens:n,themeName:o="typography",customTheme:s,children:i,...l}=e,c=g(o,n,s);return a.jsx(r,{...l,ref:t,className:c,children:i})}),ct=h.forwardRef((e,t)=>{const{as:r="a",handlePress:n,children:o,as:s,customTheme:i,tokens:l,themeName:c="button",...d}=e,u=t,{linkProps:y}=x.useLink({...e,elementType:s?.toString(),onPress:n},t??u),f=g(c,l,i);return a.jsx(x.FocusRing,{focusRingClass:"has-focus-ring",children:a.jsx(r,{ref:u,...y,...d,className:f,children:o})})}),ut=h.forwardRef((e,t)=>{const{as:r="button",handlePress:n,children:o,as:s,customTheme:i,tokens:l,themeName:c="button",isDisabled:d=!1,...u}=e,y=t,{buttonProps:f}=x.useButton({...e,isDisabled:d,elementType:s,onPress:n},t??y),p=g(c,l,i);return a.jsx(x.FocusRing,{within:!0,focusRingClass:"has-focus-ring",children:a.jsx(r,{ref:y,...f,...u,className:p,children:o})})}),V=h.forwardRef((e,t)=>{const{as:r}=e;return r==="a"?a.jsx(ct,{ref:t,...e}):a.jsx(ut,{ref:t,...e})}),on=e=>{const{as:t}=e,r=h.useRef(null);return t==="a"?a.jsx(ct,{ref:r,...e}):a.jsx(ut,{ref:r,...e})},Q=h.memo(on),sn=(e,t)=>{const r=e[t];return r?typeof r=="function"?r():Promise.resolve(r):new Promise((n,o)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(o.bind(null,new Error("Unknown variable dynamic import: "+t)))})},an=e=>a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:48,width:48,fill:"currentColor",...e}),dt=h.memo(an),ln=Object.freeze(Object.defineProperty({__proto__:null,default:dt},Symbol.toStringTag,{value:"Module"})),cn=e=>{const{icon:t,...r}=e,n=h.useMemo(()=>h.lazy(()=>sn(Object.assign({"../icons/ArrowDown.tsx":()=>Promise.resolve().then(()=>require("./ArrowDown-a6edacd9.js")),"../icons/ArrowLeft.tsx":()=>Promise.resolve().then(()=>require("./ArrowLeft-4eeead7e.js")),"../icons/ArrowRight.tsx":()=>Promise.resolve().then(()=>jn),"../icons/BrandArrowRight.tsx":()=>Promise.resolve().then(()=>require("./BrandArrowRight-810d374a.js")),"../icons/Check.tsx":()=>Promise.resolve().then(()=>require("./Check-c61ded33.js")),"../icons/ChevronLeft.tsx":()=>Promise.resolve().then(()=>require("./ChevronLeft-3d464239.js")),"../icons/ChevronRight.tsx":()=>Promise.resolve().then(()=>require("./ChevronRight-5709c683.js")),"../icons/CloseBtn.tsx":()=>Promise.resolve().then(()=>require("./CloseBtn-e65fe8bd.js")),"../icons/Facebook.tsx":()=>Promise.resolve().then(()=>require("./Facebook-f2646126.js")),"../icons/FacebookColored.tsx":()=>Promise.resolve().then(()=>require("./FacebookColored-d986225c.js")),"../icons/FacebookRounded.tsx":()=>Promise.resolve().then(()=>require("./FacebookRounded-d75848d2.js")),"../icons/Globe.tsx":()=>Promise.resolve().then(()=>require("./Globe-cbe70168.js")),"../icons/IconFallback.tsx":()=>Promise.resolve().then(()=>ln),"../icons/Instagram.tsx":()=>Promise.resolve().then(()=>require("./Instagram-2f8ef20d.js")),"../icons/InstagramColored.tsx":()=>Promise.resolve().then(()=>require("./InstagramColored-6a2b2b7a.js")),"../icons/Link.tsx":()=>Promise.resolve().then(()=>require("./Link-db71325e.js")),"../icons/LinkedIn.tsx":()=>Promise.resolve().then(()=>require("./LinkedIn-4745de60.js")),"../icons/Mail.tsx":()=>Promise.resolve().then(()=>require("./Mail-a1aec200.js")),"../icons/Plus.tsx":()=>Promise.resolve().then(()=>require("./Plus-75849570.js")),"../icons/Share.tsx":()=>Promise.resolve().then(()=>require("./Share-608e1dd8.js")),"../icons/Twitter.tsx":()=>Promise.resolve().then(()=>require("./Twitter-1eb11c0c.js")),"../icons/TwitterColored.tsx":()=>Promise.resolve().then(()=>require("./TwitterColored-8b72aa64.js")),"../icons/Upload.tsx":()=>Promise.resolve().then(()=>require("./Upload-578304b2.js")),"../icons/X.tsx":()=>Promise.resolve().then(()=>require("./X-ed6c3d62.js")),"../icons/YouTube.tsx":()=>Promise.resolve().then(()=>require("./YouTube-5dbf2e75.js")),"../icons/YouTubeColored.tsx":()=>Promise.resolve().then(()=>require("./YouTubeColored-5baa4a6c.js"))}),`../icons/${t||"ArrowRight"}.tsx`)),[t]);return a.jsx(h.Suspense,{fallback:a.jsx(dt,{className:"overflow-visible pointer-events-none"}),children:a.jsx(n,{...r,className:"overflow-visible pointer-events-none",...e})})},j=e=>{const{icon:t,as:r="span",tokens:n,customTheme:o,themeName:s="icon",children:i,...l}=e,c=g(s,n,o);return typeof t!="string"?a.jsxs(r,{...l,className:c,children:[i,t]}):a.jsxs(r,{className:c,children:[i,a.jsx(cn,{icon:t,...l})]})},un=e=>{const{customTheme:t,themeName:r="accordion",id:n,tokens:o,title:s,ariaLabel:i,onClick:l,icon:c,children:d}=e,[u,y]=h.useState(!1),f=g(`${r}.container`,{...o,isOpen:u},t),p=g(`${r}.title`,{...o,isOpen:u},t),w=g(`${r}.icon`,{...o,isOpen:u},t),b=g(`${r}.region`,{...o,isOpen:u},t),$=g(`${r}.content`,{...o,isOpen:u},t);return a.jsxs("div",{className:f,id:`accordion-control-${n}`,"aria-label":i,"aria-expanded":u,"aria-controls":`accordion-content-${n}`,children:[a.jsxs(Q,{themeName:`${r}.button`,tokens:{...o,isOpen:u},handlePress:()=>{y(!u),l?.(u)},as:"button",id:`accordion-control-${n}`,"aria-label":i,children:[a.jsx("div",{className:p,children:s}),a.jsx("div",{className:w,children:a.jsx(j,{icon:c??"ArrowDown"})})]}),a.jsx("div",{className:b,role:"region",id:`accordion-content-${n}`,"aria-labelledby":`accordion-control-${n}`,children:a.jsx("div",{className:$,children:d})})]})},dn=e=>{const{sharingLinksList:t,id:r,isOpen:n,setIsOpen:o,onShare:s,themeName:i="shareButton",tokens:l,customTheme:c}=e,d=g(`${i}.linksList`,{...l,isOpen:n},c),u=x.useFocusManager(),y=f=>{f.key==="Escape"&&o(!1);const{listDirection:p}=l??{};p==="row"&&(f.key==="ArrowRight"&&(u.focusNext({wrap:!0}),f.preventDefault()),f.key==="ArrowLeft"&&(u.focusPrevious({wrap:!0}),f.preventDefault())),p==="column"&&(f.key==="ArrowDown"&&(u.focusNext({wrap:!0}),f.preventDefault()),f.key==="ArrowUp"&&(u.focusPrevious({wrap:!0}),f.preventDefault()))};return a.jsx("div",{className:d,id:r,role:"listbox",tabIndex:-1,onKeyDown:y,children:t?.map(f=>{const{ariaLabel:p,onClick:w,href:b,icon:$,key:v}=f;return a.jsx(Q,{themeName:`${i}.link`,tokens:{...l,isOpen:n},handlePress:()=>{s?.(v),w?.(v)},"aria-label":p,...b?{href:b,rel:"noopener noreferrer",target:"_blank",as:"a"}:{},role:"option",children:a.jsx(j,{themeName:`${i}.linkIcons`,icon:$})},v)})})},fn=e=>{const{ariaLabel:t,icon:r,id:n,sharingLinksList:o,onShare:s,customTheme:i,themeName:l="shareButton",tokens:c,...d}=e,[u,y]=h.useState(!1),f=g(`${l}.container`,c,i),p=b=>{y(!u),!u&&setTimeout(()=>{b.target.parentElement?.lastChild?.firstChild?.focus()})},w=b=>{const $=b.currentTarget.firstChild,v=b.currentTarget.lastChild,M=v.firstChild,k=v.lastChild,{listDirection:D}=c??{};D==="row"&&(b.key==="ArrowRight"&&b.target===$&&(M?.focus(),b.preventDefault()),b.key==="ArrowLeft"&&b.target===$&&(k.focus(),b.preventDefault())),D==="column"&&(b.key==="ArrowDown"&&b.target===$&&(M?.focus(),b.preventDefault()),b.key==="ArrowUp"&&b.target===$&&(k.focus(),b.preventDefault())),b.key==="Escape"&&(y(!1),$?.focus()),document.activeElement===v&&$?.focus()};return a.jsx(x.FocusScope,{autoFocus:!0,restoreFocus:!0,contain:u,children:a.jsxs("div",{className:f,onKeyDown:w,children:[a.jsx(V,{themeName:`${l}.button`,tokens:{...c,isOpen:u},"aria-label":t,"aria-haspopup":"listbox","aria-expanded":u?"true":"false","aria-controls":"share-buttons",handlePress:p,...d,children:a.jsx(j,{themeName:`${l}.icon`,icon:r??"Share"})}),u&&a.jsx(dn,{id:n,sharingLinksList:o,onShare:s,isOpen:u,setIsOpen:y,themeName:l,customTheme:i,tokens:c})]})})};function ft(){const e=h.createContext(void 0);function t(){const r=h.useContext(e);if(r===void 0)throw new Error("useCtx must be inside a Provider");return r}return[t,e.Provider]}const ht=(e,t,r)=>{const n=Qt.useOverlayTriggerState({defaultOpen:e,onOpenChange:u=>t?.(u)}),o=h.useRef(null),s=h.useRef(null);h.useEffect(()=>{if(e){n.open();return}n.close()},[e]);const i=()=>{n.open()},l=()=>{n.close(),r?.()},{buttonProps:c}=x.useButton({elementType:"div",onPress:i},o),{buttonProps:d}=x.useButton({onPress:l},s);return{state:n,openButtonProps:c,closeButtonProps:d,handleOpen:i,handleClose:l,openButtonRef:o,closeButtonRef:s}},[mt,hn]=ft();function mn({children:e,defaultSelectedKey:t}){const{state:r,closeButtonProps:n,closeButtonRef:o,openButtonProps:s,openButtonRef:i}=ht(!1),l=h.useMemo(()=>({defaultSelectedKey:t,overlayState:r,buttonProps:{closeButtonProps:n,closeButtonRef:o,openButtonProps:s,openButtonRef:i}}),[r,t,n,s]);return a.jsx(hn,{value:l,children:e})}const bn=({isVisible:e,children:t})=>F.useTransition(e,{from:{opacity:0,translateX:"100%"},enter:{opacity:1,translateX:"0%"},leave:{opacity:0,translateX:"25%"}})((n,o)=>o&&a.jsx(F.animated.div,{style:n,children:t})),gn="fixed",pn=({isVisible:e,children:t})=>F.useTransition(e,{from:{opacity:0,position:gn,left:0,top:0,zIndex:1e3,bottom:0,height:"100%",width:"100%"},enter:{opacity:1},leave:{opacity:0},config:F.config.stiff})((n,o)=>o&&a.jsx(F.animated.div,{style:n,children:t})),yn="fixed",xn=({isVisible:e,children:t})=>F.useTransition(e,{from:{opacity:0,scale:.75,position:yn,left:0,top:0,zIndex:1e3,bottom:0,height:"100%",width:"100%"},enter:{opacity:1,scale:1},leave:{opacity:0,scale:.75},config:F.config.stiff})((n,o)=>o&&a.jsx(F.animated.div,{style:n,children:t})),$n=e=>{const{children:t}=e,r=h.useRef(null),{overlayProps:n,underlayProps:o}=x.useOverlay(e,r),{modalProps:s}=x.useModal(),{dialogProps:i}=x.useDialog(e,r);return a.jsx("div",{...o,children:a.jsx(x.FocusRing,{focusRingClass:"has-focus-ring",within:!0,autoFocus:!0,children:a.jsx(x.FocusScope,{contain:!0,restoreFocus:!0,autoFocus:!0,children:a.jsx("div",{...n,...i,...s,ref:r,children:t})})})})},Re=e=>{const[t,r]=h.useState(!1),{children:n,state:o,onCloseCallBack:s,transitionComponent:i=xn}=e,l=h.useCallback(()=>{o.close(),s?.()},[o.close,s]);return h.useEffect(()=>{!o.isOpen&&t||r(!0)},[o.isOpen]),t?a.jsx(H.OverlayContainer,{children:a.jsx(i,{isVisible:o.isOpen,children:a.jsx($n,{isOpen:o.isOpen,onClose:l,isDismissable:!0,children:n})})}):null},vn=e=>{const{children:t,closeBtnRender:r,themeName:n="sidePanel",tokens:o,customTheme:s}=e,i=g(`${n}.wrapper`,o,s),l=g(`${n}.container`,o,s),c=g(`${n}.innerContainer`,o,s),{overlayState:d}=mt();return a.jsx(Re,{state:d,transitionComponent:pn,children:a.jsxs(Vt,{className:i,children:[r&&r(),a.jsx(bn,{isVisible:d.isOpen,children:a.jsx("div",{className:l,children:a.jsx("div",{className:c,children:t})})})]})})},wn=h.memo(vn),Dn=e=>{const{children:t,thumbnailContent:r,isOpen:n,onOpenCallBack:o,onCloseCallBack:s,label:i,themeName:l="lightBox",tokens:c,customTheme:d}=e,{state:u,openButtonRef:y,openButtonProps:f,closeButtonProps:p,closeButtonRef:w}=ht(n,o,s),b=g(`${l}.container`,c,d);return a.jsxs("div",{children:[a.jsx(_.FocusRing,{focusRingClass:"has-focus-ring",within:!0,children:a.jsxs(V,{ref:y,themeName:`${l}.wrapper`,...f,...n?{tabIndex:-1}:{},children:[i&&a.jsx(T,{themeName:`${l}.label`,tokens:{size:"footnotes"},children:i}),r]})}),a.jsx(Re,{onCloseCallBack:s,state:u,children:a.jsxs("div",{children:[a.jsx(V,{themeName:`${l}.closeBtn`,type:"button",...p,ref:w,children:a.jsx(j,{icon:"CloseBtn"})}),a.jsx("div",{className:b,children:t})]})})]})},Cn=({as:e="div",themeName:t="box",tokens:r,customTheme:n,children:o,className:s,...i})=>{const l=g(t,r,n);return a.jsx(e,{...i,className:l,children:o})},bt=h.forwardRef((e,t)=>{const{as:r="div",tokens:n,themeName:o="box",customTheme:s,children:i,...l}=e,c=g(o,n,s);return a.jsx(r,{...l,ref:t,className:c,children:i})}),Mn=h.forwardRef((e,t)=>{const{isOpen:r,onClose:n,children:o,positionProps:s,themeName:i="popover",tokens:l,customTheme:c,...d}=e,{overlayProps:u}=x.useOverlay({isOpen:r,onClose:n,shouldCloseOnBlur:!1,isDismissable:!1},t),{modalProps:y}=x.useModal(),{dialogProps:f}=x.useDialog({},t),p=g(`${i}.popover`,l,c);return a.jsx(x.FocusScope,{autoFocus:!0,restoreFocus:!0,contain:!0,children:a.jsxs(bt,{customTheme:p,...x.mergeProps(u,y,f),ref:t,...s,...d,children:[h.Children.map(o,w=>a.jsx(x.FocusRing,{focusRingClass:"has-focus-ring",children:w})),a.jsx(x.DismissButton,{onDismiss:n})]})})});function kn(e){const{children:t,buttonProps:r,placement:n="right",offset:o=5,themeName:s="popover",tokens:i,customTheme:l}=e,c=rt.useOverlayTriggerState({}),d=h.useRef(null),u=h.useRef(null),{triggerProps:y,overlayProps:f}=x.useOverlayTrigger({type:"dialog"},c,d),{overlayProps:p}=x.useOverlayPosition({targetRef:d,overlayRef:u,placement:n,offset:o,isOpen:c.isOpen}),{onPress:w,...b}=y;return a.jsxs(a.Fragment,{children:[a.jsx(V,{themeName:`${s}.button`,handlePress:w,...r,...b,ref:d}),c.isOpen&&a.jsx(x.OverlayContainer,{children:a.jsx(Mn,{themeName:s,tokens:i,customTheme:l,...f,positionProps:p,ref:u,isOpen:c.isOpen,onClose:c.close,children:t})})]})}const Pn=({content:e,themeName:t="wysiwyg",...r})=>a.jsx(T,{...r,themeName:t,dangerouslySetInnerHTML:{__html:Wt.sanitize(e,{ADD_TAGS:["iframe"],ADD_ATTR:["allow","allowfullscreen","frameborder","scrolling"]})}}),Tn=e=>a.jsxs("svg",{width:24,height:24,fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e,children:[a.jsx("g",{children:a.jsx("path",{d:"M23.92 12.38a1 1 0 0 0 0-.76 1 1 0 0 0-.21-.33l-8-8a1.003 1.003 0 1 0-1.42 1.42l6.3 6.29H1a1 1 0 1 0 0 2h19.59l-6.3 6.29a1 1 0 0 0 0 1.42 1.002 1.002 0 0 0 1.42 0l8-8c.091-.095.162-.207.21-.33Z"})}),a.jsx("defs",{children:a.jsx("clipPath",{children:a.jsx("path",{fill:"currentColor",d:"M0 0h24v24H0z"})})})]}),gt=h.memo(Tn,Gt),jn=Object.freeze(Object.defineProperty({__proto__:null,default:gt},Symbol.toStringTag,{value:"Module"})),Sn=e=>{const{as:t="time",date:r,tokens:n,customTheme:o,dateFormatterOptions:s={month:"long",day:"numeric",year:"numeric"},themeName:i="typography",...l}=e,c=x.useIsSSR(),d=new Date(r),y=fe.useDateFormatter(s).format(d),f=g(i,n,o);return c||Pe.isEmpty(y)?null:a.jsx(t,{...l,dateTime:d.toISOString(),className:f,children:y})},Rn=({item:e,state:t,themeName:r="li"})=>{const n=h.useRef(null),{optionProps:o,isFocusVisible:s}=x.useOption({key:e.key},t,n),i=g(r);return a.jsx(Se,{as:"li",...o,tokens:{className:`${i} ${s?"has-focus-ring":""}`},ref:n,children:e.rendered})},In=e=>{const t=h.useRef(null),{listBoxRef:r=t,state:n,themeName:o="option"}=e,{listBoxProps:s}=x.useListBox(e,n,r);return a.jsx(x.FocusScope,{autoFocus:!0,restoreFocus:!0,contain:!0,children:a.jsx(Se,{...s,ref:r,as:"ul",themeName:`${o}.ul`,children:[...n.collection].map(i=>a.jsx(Rn,{themeName:`${o}.li`,item:i,state:n},i.key))})})},An=e=>{const t=h.useRef(null),{popoverRef:r=t,state:n,children:o,themeName:s="popover",...i}=e,{popoverProps:l,underlayProps:c}=x.usePopover({...e,popoverRef:r},n);return a.jsxs(x.Overlay,{children:[a.jsx("div",{...c,style:{position:"fixed",inset:0}}),a.jsxs(Se,{themeName:s,...i,...l,as:"div",ref:r,children:[a.jsx(x.DismissButton,{onDismiss:n.close}),o,a.jsx(x.DismissButton,{onDismiss:n.close})]})]})},pt=e=>{const{name:t,placeholderLabel:r,disabled:n,hookFormRef:o,isError:s=!1,errorMessage:i,themeName:l="select",tokens:c,customTheme:d,label:u,onSelectionChange:y,defaultValue:f,value:p,icon:w,...b}=e,$=h.useRef(null),v=rt.useSelectState({...b,selectedKey:p,defaultSelectedKey:f,onSelectionChange:y}),{triggerProps:M,menuProps:k,labelProps:D}=x.useSelect({...b},v,$),S=g(`${l}.wrapper`,c,d),L=g(`${l}.container`,c,d);return a.jsxs("div",{className:S,children:[u&&a.jsx(T,{...D,as:"label",themeName:`${l}.label`,children:u}),a.jsx(x.HiddenSelect,{...o,state:v,triggerRef:$,name:t,isDisabled:!0}),a.jsxs("div",{className:L,children:[a.jsxs(V,{...M,ref:$,disabled:n,themeName:`${l}.button`,tokens:{...c,intent:s?"error":"default"},children:[v.selectedItem?v.selectedItem.rendered:r,a.jsx(j,{icon:w??"ArrowDown"})]}),v.isOpen&&$.current&&a.jsx(An,{state:v,tokens:{width:`${$.current?.offsetWidth}`},triggerRef:$,placement:"bottom",themeName:`${l}.popover`,children:a.jsx(In,{...k,themeName:l,state:v})}),s&&a.jsx(T,{tokens:{...c,isError:s},themeName:`${l}.errorMessage`,children:i})]})]})},Bn=e=>{const{name:t,required:r,children:n}=e,{register:o,formState:s}=ae.useFormContext(),l=ae.get(s.errors,t)?.message??void 0,{ref:c}=o(t,{required:r?"This is an error message":!1});return a.jsx(pt,{...e,isError:!Pe.isEmpty(l),errorMessage:l,hookFormRef:c,children:n})},En=e=>{const{id:t,label:r,isDisabled:n=!1,isError:o=!1,errorMessage:s,ariaLabel:i,icon:l,themeName:c="checkbox",tokens:d,customTheme:u}=e,y=Kt.useToggleState(e),f=h.useRef(null),{inputProps:p}=Ht.useCheckbox(e,y,f),{isSelected:w}=y,{focusProps:b,isFocusVisible:$}=_.useFocusRing(),v={...d,selected:w,isDisabled:n,isError:o,isFocusVisible:$},M=g(`${c}.container`,v,u),k=g(`${c}.checkBox`,v,u),D=g(`${c}.checkMark`,v,u),S=g(`${c}.checkMarkIcon`,v,u);return a.jsxs("div",{children:[a.jsx(_.FocusRing,{focusRingClass:"has-focus-ring",within:!0,children:a.jsxs("label",{className:M,htmlFor:t,"aria-label":i,"aria-disabled":n,children:[a.jsx(zt.VisuallyHidden,{children:a.jsx("input",{type:"checkbox",ref:f,"aria-labelledby":t,...p,...b})}),a.jsx("div",{className:k,"aria-checked":w,role:"checkbox","aria-labelledby":t,children:a.jsx("div",{className:D,children:l&&a.jsx(j,{icon:l,customTheme:S})})}),a.jsx(T,{themeName:`${c}.label`,tokens:v,children:r})]})}),o&&s&&a.jsx(T,{themeName:`${c}.errorMessage`,tokens:v,children:s})]})},Nn=e=>{const{id:t,label:r,name:n,placeholder:o,required:s,disabled:i=!1,errorMessage:l,ariaLabel:c,value:d,onBlur:u,onChange:y,fieldRef:f,themeName:p="textarea",tokens:w,customTheme:b}=e,$=h.useRef(null),{errorMessageProps:v,inputProps:M,labelProps:k}=x.useTextField(e,$),D={...w,isDisabled:i,isError:l!=null},S=g(`${p}.wrapper`,D,b),L=g(`${p}.input`,D,b),pe=g(`${p}.label`,D,b),ye=g(`${p}.container`,D,b);return a.jsxs("div",{children:[a.jsxs("div",{className:S,"aria-disabled":i,children:[r&&a.jsx("label",{className:pe,...k,children:r}),a.jsx("div",{className:ye,children:a.jsx(_.FocusRing,{focusRingClass:"has-focus-ring",children:a.jsx("textarea",{ref:G=>{f?.(G),$.current=G},className:L,placeholder:o,disabled:i,required:s,id:t,name:n,"aria-label":c,"aria-labelledby":t,value:d,onBlur:u,onChange:y,...M})})})]}),l&&a.jsx(T,{themeName:`${p}.errorMessage`,tokens:D,...v,children:l})]})},yt=e=>{const{id:t,label:r,required:n,disabled:o=!1,errorMessage:s,ariaLabel:i,value:l,onBlur:c,onChange:d,fieldRef:u,type:y="text",children:f,themeName:p="textInput",tokens:w,customTheme:b}=e,$=h.useRef(null),{errorMessageProps:v,inputProps:M,labelProps:k}=x.useTextField(e,$),D={...w,isDisabled:o,isError:s!=null},S=g(`${p}.wrapper`,D,b),L=g(`${p}.label`,D,b),pe=g(`${p}.input`,D,b),ye=g(`${p}.container`,D,b);return a.jsxs("div",{children:[a.jsx(_.FocusRing,{focusRingClass:"has-focus-ring",within:!0,children:a.jsxs("div",{"aria-disabled":o,className:S,children:[r&&a.jsx("label",{className:L,...k,children:r}),a.jsxs("div",{className:ye,children:[f,a.jsx("input",{...M,className:pe,disabled:o,required:n,ref:G=>{u?.(G),$.current=G},"aria-label":i,"aria-labelledby":t,value:l,onBlur:c,onChange:d,type:y})]})]})}),s&&a.jsx(T,{themeName:`${p}.errorMessage`,tokens:D,...v,children:s})]})},Fn=e=>{const{name:t,required:r,minLength:n=0,maxLength:o=99999999,validation:s}=e,{register:i,formState:l}=ae.useFormContext(),d=ae.get(l.errors,t)?.message??void 0,{t:u}=Xt.useTranslation("components"),{ref:y,...f}=i(t,{required:r?u("FORM.ERROR.REQUIRED")??"required":!1,minLength:{value:n,message:u("FORM.ERROR.MIN_LENGTH",{length:n})},maxLength:{value:o,message:u("FORM.ERROR.MAX_LENGTH",{length:n})},...s});return a.jsx(yt,{fieldRef:y,...f,...e,isError:!Pe.isEmpty(d),errorMessage:d})};function Ln(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function xt(e,t,r){Ln(e,t),t.set(e,r)}function I(e,t){return e-t*Math.floor(e/t)}const $t=1721426;function q(e,t,r,n){t=X(e,t);let o=t-1,s=-2;return r<=2?s=0:E(t)&&(s=-1),$t-1+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*r-362)/12+s+n)}function E(e){return e%4===0&&(e%100!==0||e%400===0)}function X(e,t){return e==="BC"?1-t:t}function he(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}const On={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class A{fromJulianDay(t){let r=t,n=r-$t,o=Math.floor(n/146097),s=I(n,146097),i=Math.floor(s/36524),l=I(s,36524),c=Math.floor(l/1461),d=I(l,1461),u=Math.floor(d/365),y=o*400+i*100+c*4+u+(i!==4&&u!==4?1:0),[f,p]=he(y),w=r-q(f,p,1,1),b=2;r<q(f,p,3,1)?b=0:E(p)&&(b=1);let $=Math.floor(((w+b)*12+373)/367),v=r-q(f,p,$,1)+1;return new C(f,p,$,v)}toJulianDay(t){return q(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return On[E(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return E(t.year)?366:365}getYearsInEra(t){return 9999}getEras(){return["BC","AD"]}isInverseEra(t){return t.era==="BC"}balanceDate(t){t.year<=0&&(t.era=t.era==="BC"?"AD":"BC",t.year=1-t.year)}constructor(){this.identifier="gregory"}}const qn={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function Ne(e,t){return t=me(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function vt(e,t){let r=e.calendar.toJulianDay(e),n=Math.ceil(r+1-_n(t))%7;return n<0&&(n+=7),n}function wt(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function Un(e,t){return Fe(e)-Fe(t)}function Fe(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let xe=null;function Dt(){return xe==null&&(xe=new Intl.DateTimeFormat().resolvedOptions().timeZone),xe}function Yn(e){return e.subtract({days:e.day-1})}const Le=new Map;function Jn(e){if(Intl.Locale){let r=Le.get(e);return r||(r=new Intl.Locale(e).maximize().region,Le.set(e,r)),r}let t=e.split("-")[1];return t==="u"?null:t}function _n(e){let t=Jn(e);return qn[t]||0}function Vn(e,t){let r=e.calendar.getDaysInMonth(e);return Math.ceil((vt(Yn(e),t)+r)/7)}function Oe(e){e=me(e,new A);let t=X(e.era,e.year);return Ct(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function Ct(e,t,r,n,o,s,i){let l=new Date;return l.setUTCHours(n,o,s,i),l.setUTCFullYear(e,t-1,r),l.getTime()}function qe(e,t){if(t==="UTC")return 0;if(e>0&&t===Dt())return new Date(e).getTimezoneOffset()*-6e4;let{year:r,month:n,day:o,hour:s,minute:i,second:l}=Mt(e,t);return Ct(r,n,o,s,i,l,0)-Math.floor(e/1e3)*1e3}const Ue=new Map;function Mt(e,t){let r=Ue.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Ue.set(t,r));let n=r.formatToParts(new Date(e)),o={};for(let s of n)s.type!=="literal"&&(o[s.type]=s.value);return{year:o.era==="BC"||o.era==="B"?-o.year+1:+o.year,month:+o.month,day:+o.day,hour:o.hour==="24"?0:+o.hour,minute:+o.minute,second:+o.second}}const Ye=864e5;function Qn(e,t,r,n){return(r===n?[r]:[r,n]).filter(s=>Wn(e,t,s))}function Wn(e,t,r){let n=Mt(r,t);return e.year===n.year&&e.month===n.month&&e.day===n.day&&e.hour===n.hour&&e.minute===n.minute&&e.second===n.second}function Gn(e,t,r="compatible"){let n=Pt(e);if(t==="UTC")return Oe(n);if(t===Dt()&&r==="compatible"){n=me(n,new A);let c=new Date,d=X(n.era,n.year);return c.setFullYear(d,n.month-1,n.day),c.setHours(n.hour,n.minute,n.second,n.millisecond),c.getTime()}let o=Oe(n),s=qe(o-Ye,t),i=qe(o+Ye,t),l=Qn(n,t,o-s,o-i);if(l.length===1)return l[0];if(l.length>1)switch(r){case"compatible":case"earlier":return l[0];case"later":return l[l.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(o-s,o-i);case"compatible":case"later":return Math.max(o-s,o-i);case"reject":throw new RangeError("No such absolute time found")}}function kt(e,t,r="compatible"){return new Date(Gn(e,t,r))}function Pt(e,t){let r=0,n=0,o=0,s=0;if("timeZone"in e)({hour:r,minute:n,second:o,millisecond:s}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:o,millisecond:s}=t),new ie(e.calendar,e.era,e.year,e.month,e.day,r,n,o,s)}function me(e,t){if(e.calendar.identifier===t.identifier)return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,W(n),n}function Ie(e,t){let r=e.copy(),n="hour"in r?eo(r,t):0;we(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,De(r),Tt(r),r.day+=(t.weeks||0)*7,r.day+=t.days||0,r.day+=n,Hn(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let o=r.calendar.getYearsInEra(r);if(r.year>o){var s,i;let c=(i=(s=r.calendar).isInverseEra)===null||i===void 0?void 0:i.call(s,r);r.year=o,r.month=c?1:r.calendar.getMonthsInYear(r),r.day=c?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let l=r.calendar.getMonthsInYear(r);return r.month>l&&(r.month=l,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function we(e,t){var r,n;!((n=(r=e.calendar).isInverseEra)===null||n===void 0)&&n.call(r,e)&&(t=-t),e.year+=t}function De(e){for(;e.month<1;)we(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,we(e,1)}function Hn(e){for(;e.day<1;)e.month--,De(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,De(e)}function Tt(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function W(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),Tt(e)}function zn(e){let t={};for(let r in e)typeof e[r]=="number"&&(t[r]=-e[r]);return t}function jt(e,t){return Ie(e,zn(t))}function St(e,t){let r=e.copy();return t.era!=null&&(r.era=t.era),t.year!=null&&(r.year=t.year),t.month!=null&&(r.month=t.month),t.day!=null&&(r.day=t.day),W(r),r}function Kn(e,t){let r=e.copy();return t.hour!=null&&(r.hour=t.hour),t.minute!=null&&(r.minute=t.minute),t.second!=null&&(r.second=t.second),t.millisecond!=null&&(r.millisecond=t.millisecond),Zn(r),r}function Xn(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=ee(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=ee(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=ee(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=ee(e.hour,24),t}function Zn(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function ee(e,t){let r=e%t;return r<0&&(r+=t),r}function eo(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,Xn(e)}function Rt(e,t,r,n){let o=e.copy();switch(t){case"era":{let l=e.calendar.getEras(),c=l.indexOf(e.era);if(c<0)throw new Error("Invalid era: "+e.era);c=N(c,r,0,l.length-1,n?.round),o.era=l[c],W(o);break}case"year":var s,i;!((i=(s=o.calendar).isInverseEra)===null||i===void 0)&&i.call(s,o)&&(r=-r),o.year=N(e.year,r,-1/0,9999,n?.round),o.year===-1/0&&(o.year=1),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,e);break;case"month":o.month=N(e.month,r,1,e.calendar.getMonthsInYear(e),n?.round);break;case"day":o.day=N(e.day,r,1,e.calendar.getDaysInMonth(e),n?.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(o),W(o),o}function to(e,t,r,n){let o=e.copy();switch(t){case"hour":{let s=e.hour,i=0,l=23;if(n?.hourCycle===12){let c=s>=12;i=c?12:0,l=c?23:11}o.hour=N(s,r,i,l,n?.round);break}case"minute":o.minute=N(e.minute,r,0,59,n?.round);break;case"second":o.second=N(e.second,r,0,59,n?.round);break;case"millisecond":o.millisecond=N(e.millisecond,r,0,999,n?.round);break;default:throw new Error("Unsupported field "+t)}return o}function N(e,t,r,n,o=!1){if(o){e+=Math.sign(t),e<r&&(e=n);let s=Math.abs(t);t>0?e=Math.ceil(e/s)*s:e=Math.floor(e/s)*s,e>n&&(e=r)}else e+=t,e<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function ro(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function It(e){let t=me(e,new A);return`${String(t.year).padStart(4,"0")}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function no(e){return`${It(e)}T${ro(e)}`}function At(e){let t=typeof e[0]=="object"?e.shift():new A,r;if(typeof e[0]=="string")r=e.shift();else{let i=t.getEras();r=i[i.length-1]}let n=e.shift(),o=e.shift(),s=e.shift();return[t,r,n,o,s]}var oo=new WeakMap;class C{copy(){return this.era?new C(this.calendar,this.era,this.year,this.month,this.day):new C(this.calendar,this.year,this.month,this.day)}add(t){return Ie(this,t)}subtract(t){return jt(this,t)}set(t){return St(this,t)}cycle(t,r,n){return Rt(this,t,r,n)}toDate(t){return kt(this,t)}toString(){return It(this)}compare(t){return wt(this,t)}constructor(...t){xt(this,oo,{writable:!0,value:void 0});let[r,n,o,s,i]=At(t);this.calendar=r,this.era=n,this.year=o,this.month=s,this.day=i,W(this)}}var so=new WeakMap;class ie{copy(){return this.era?new ie(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new ie(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return Ie(this,t)}subtract(t){return jt(this,t)}set(t){return St(Kn(this,t),t)}cycle(t,r,n){switch(t){case"era":case"year":case"month":case"day":return Rt(this,t,r,n);default:return to(this,t,r,n)}}toDate(t,r){return kt(this,t,r)}toString(){return no(this)}compare(t){let r=wt(this,t);return r===0?Un(this,Pt(t)):r}constructor(...t){xt(this,so,{writable:!0,value:void 0});let[r,n,o,s,i]=At(t);this.calendar=r,this.era=n,this.year=o,this.month=s,this.day=i,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,W(this)}}const Y=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],ao=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],ne=[1867,1911,1925,1988,2018],B=["meiji","taisho","showa","heisei","reiwa"];function Je(e){const t=Y.findIndex(([r,n,o])=>e.year<r||e.year===r&&e.month<n||e.year===r&&e.month===n&&e.day<o);return t===-1?Y.length-1:t===0?0:t-1}function $e(e){let t=ne[B.indexOf(e.era)];if(!t)throw new Error("Unknown era: "+e.era);return new C(e.year+t,e.month,e.day)}class io extends A{fromJulianDay(t){let r=super.fromJulianDay(t),n=Je(r);return new C(this,B[n],r.year-ne[n],r.month,r.day)}toJulianDay(t){return super.toJulianDay($e(t))}balanceDate(t){let r=$e(t),n=Je(r);B[n]!==t.era&&(t.era=B[n],t.year=r.year-ne[n]),this.constrainDate(t)}constrainDate(t){let r=B.indexOf(t.era),n=ao[r];if(n!=null){let[o,s,i]=n,l=o-ne[r];t.year=Math.max(1,Math.min(l,t.year)),t.year===l&&(t.month=Math.min(s,t.month),t.month===s&&(t.day=Math.min(i,t.day)))}if(t.year===1&&r>=0){let[,o,s]=Y[r];t.month=Math.max(o,t.month),t.month===o&&(t.day=Math.max(s,t.day))}}getEras(){return B}getYearsInEra(t){let r=B.indexOf(t.era),n=Y[r],o=Y[r+1];if(o==null)return 9999-n[0]+1;let s=o[0]-n[0];return(t.month<o[1]||t.month===o[1]&&t.day<o[2])&&s++,s}getDaysInMonth(t){return super.getDaysInMonth($e(t))}getMinimumMonthInYear(t){let r=_e(t);return r?r[1]:1}getMinimumDayInMonth(t){let r=_e(t);return r&&t.month===r[1]?r[2]:1}constructor(...t){super(...t),this.identifier="japanese"}}function _e(e){if(e.year===1){let t=B.indexOf(e.era);return Y[t]}}const Bt=-543;class lo extends A{fromJulianDay(t){let r=super.fromJulianDay(t),n=X(r.era,r.year);return new C(this,n-Bt,r.month,r.day)}toJulianDay(t){return super.toJulianDay(Ve(t))}getEras(){return["BE"]}getDaysInMonth(t){return super.getDaysInMonth(Ve(t))}balanceDate(){}constructor(...t){super(...t),this.identifier="buddhist"}}function Ve(e){let[t,r]=he(e.year+Bt);return new C(t,r,e.month,e.day)}const le=1911;function Et(e){return e.era==="minguo"?e.year+le:1-e.year+le}function Qe(e){let t=e-le;return t>0?["minguo",t]:["before_minguo",1-t]}class co extends A{fromJulianDay(t){let r=super.fromJulianDay(t),n=X(r.era,r.year),[o,s]=Qe(n);return new C(this,o,s,r.month,r.day)}toJulianDay(t){return super.toJulianDay(We(t))}getEras(){return["before_minguo","minguo"]}balanceDate(t){let[r,n]=Qe(Et(t));t.era=r,t.year=n}isInverseEra(t){return t.era==="before_minguo"}getDaysInMonth(t){return super.getDaysInMonth(We(t))}getYearsInEra(t){return t.era==="before_minguo"?9999:9999-le}constructor(...t){super(...t),this.identifier="roc"}}function We(e){let[t,r]=he(Et(e));return new C(t,r,e.month,e.day)}const uo=1948321;function fo(e){let t=e>0?e-474:e-473,r=I(t,2820)+474;return I((r+38)*31,128)<31}function te(e,t,r){let n=e>0?e-474:e-473,o=I(n,2820)+474,s=t<=7?31*(t-1):30*(t-1)+6;return uo-1+1029983*Math.floor(n/2820)+365*(o-1)+Math.floor((31*o-5)/128)+s+r}class ho{fromJulianDay(t){let r=t-te(475,1,1),n=Math.floor(r/1029983),o=I(r,1029983),s=o===1029982?2820:Math.floor((128*o+46878)/46751),i=474+2820*n+s;i<=0&&i--;let l=t-te(i,1,1)+1,c=l<=186?Math.ceil(l/31):Math.ceil((l-6)/31),d=t-te(i,c,1)+1;return new C(this,i,c,d)}toJulianDay(t){return te(t.year,t.month,t.day)}getMonthsInYear(){return 12}getDaysInMonth(t){return t.month<=6?31:t.month<=11||fo(t.year)?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}const ve=78,Ge=80;class mo extends A{fromJulianDay(t){let r=super.fromJulianDay(t),n=r.year-ve,o=t-q(r.era,r.year,1,1),s;o<Ge?(n--,s=E(r.year-1)?31:30,o+=s+155+90+10):(s=E(r.year)?31:30,o-=Ge);let i,l;if(o<s)i=1,l=o+1;else{let c=o-s;c<155?(i=Math.floor(c/31)+2,l=c%31+1):(c-=155,i=Math.floor(c/30)+7,l=c%30+1)}return new C(this,n,i,l)}toJulianDay(t){let r=t.year+ve,[n,o]=he(r),s,i;return E(o)?(s=31,i=q(n,o,3,21)):(s=30,i=q(n,o,3,22)),t.month===1?i+t.day-1:(i+=s+Math.min(t.month-2,5)*31,t.month>=8&&(i+=(t.month-7)*30),i+=t.day-1,i)}getDaysInMonth(t){return t.month===1&&E(t.year+ve)||t.month>=2&&t.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return["saka"]}balanceDate(){}constructor(...t){super(...t),this.identifier="indian"}}const ce=1948440,He=1948439,P=1300,U=1600,bo=460322;function ue(e,t,r,n){return n+Math.ceil(29.5*(r-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function Nt(e,t,r){let n=Math.floor((30*(r-t)+10646)/10631),o=Math.min(12,Math.ceil((r-(29+ue(t,n,1,1)))/29.5)+1),s=r-ue(t,n,o,1)+1;return new C(e,n,o,s)}function ze(e){return(14+11*e)%30<11}class Ae{fromJulianDay(t){return Nt(this,ce,t)}toJulianDay(t){return ue(ce,t.year,t.month,t.day)}getDaysInMonth(t){let r=29+t.month%2;return t.month===12&&ze(t.year)&&r++,r}getMonthsInYear(){return 12}getDaysInYear(t){return ze(t.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class go extends Ae{fromJulianDay(t){return Nt(this,He,t)}toJulianDay(t){return ue(He,t.year,t.month,t.day)}constructor(...t){super(...t),this.identifier="islamic-tbla"}}const po="qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=";let Ce,J;function oe(e){return bo+J[e-P]}function z(e,t){let r=e-P,n=1<<11-(t-1);return Ce[r]&n?30:29}function Ke(e,t){let r=oe(e);for(let n=1;n<t;n++)r+=z(e,n);return r}function Xe(e){return J[e+1-P]-J[e-P]}class yo extends Ae{fromJulianDay(t){let r=t-ce,n=oe(P),o=oe(U);if(r<n||r>o)return super.fromJulianDay(t);{let s=P-1,i=1,l=1;for(;l>0;){s++,l=r-oe(s)+1;let c=Xe(s);if(l===c){i=12;break}else if(l<c){let d=z(s,i);for(i=1;l>d;)l-=d,i++,d=z(s,i);break}}return new C(this,s,i,r-Ke(s,i)+1)}}toJulianDay(t){return t.year<P||t.year>U?super.toJulianDay(t):ce+Ke(t.year,t.month)+(t.day-1)}getDaysInMonth(t){return t.year<P||t.year>U?super.getDaysInMonth(t):z(t.year,t.month)}getDaysInYear(t){return t.year<P||t.year>U?super.getDaysInYear(t):Xe(t.year)}constructor(){if(super(),this.identifier="islamic-umalqura",Ce||(Ce=new Uint16Array(Uint8Array.from(atob(po),t=>t.charCodeAt(0)).buffer)),!J){J=new Uint32Array(U-P+1);let t=0;for(let r=P;r<=U;r++){J[r-P]=t;for(let n=1;n<=12;n++)t+=z(r,n)}}}}const Ze=347997,Ft=1080,Lt=24*Ft,xo=29,$o=12*Ft+793,vo=xo*Lt+$o;function O(e){return I(e*7+1,19)<7}function se(e){let t=Math.floor((235*e-234)/19),r=12084+13753*t,n=t*29+Math.floor(r/25920);return I(3*(n+1),7)<3&&(n+=1),n}function wo(e){let t=se(e-1),r=se(e);return se(e+1)-r===356?2:r-t===382?1:0}function K(e){return se(e)+wo(e)}function Ot(e){return K(e+1)-K(e)}function Do(e){let t=Ot(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}function re(e,t){if(t>=6&&!O(e)&&t++,t===4||t===7||t===9||t===11||t===13)return 29;let r=Do(e);return t===2?r===2?30:29:t===3?r===0?29:30:t===6?O(e)?30:0:30}class Co{fromJulianDay(t){let r=t-Ze,n=r*Lt/vo,o=Math.floor((19*n+234)/235)+1,s=K(o),i=Math.floor(r-s);for(;i<1;)o--,s=K(o),i=Math.floor(r-s);let l=1,c=0;for(;c<i;)c+=re(o,l),l++;l--,c-=re(o,l);let d=i-c;return new C(this,o,l,d)}toJulianDay(t){let r=K(t.year);for(let n=1;n<t.month;n++)r+=re(t.year,n);return r+t.day+Ze}getDaysInMonth(t){return re(t.year,t.month)}getMonthsInYear(t){return O(t.year)?13:12}getDaysInYear(t){return Ot(t.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(t,r){r.year!==t.year&&(O(r.year)&&!O(t.year)&&r.month>6?t.month--:!O(r.year)&&O(t.year)&&r.month>6&&t.month++)}constructor(){this.identifier="hebrew"}}const Me=1723856,et=1824665,ke=5500;function de(e,t,r,n){return e+365*t+Math.floor(t/4)+30*(r-1)+n-1}function Be(e,t){let r=Math.floor(4*(t-e)/1461),n=1+Math.floor((t-de(e,r,1,1))/30),o=t+1-de(e,r,n,1);return[r,n,o]}function qt(e){return Math.floor(e%4/3)}function Ut(e,t){return t%13!==0?30:qt(e)+5}class Ee{fromJulianDay(t){let[r,n,o]=Be(Me,t),s="AM";return r<=0&&(s="AA",r+=ke),new C(this,s,r,n,o)}toJulianDay(t){let r=t.year;return t.era==="AA"&&(r-=ke),de(Me,r,t.month,t.day)}getDaysInMonth(t){return Ut(t.year,t.month)}getMonthsInYear(){return 13}getDaysInYear(t){return 365+qt(t.year)}getYearsInEra(t){return t.era==="AA"?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class Mo extends Ee{fromJulianDay(t){let[r,n,o]=Be(Me,t);return r+=ke,new C(this,"AA",r,n,o)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...t){super(...t),this.identifier="ethioaa"}}class ko extends Ee{fromJulianDay(t){let[r,n,o]=Be(et,t),s="CE";return r<=0&&(s="BCE",r=1-r),new C(this,s,r,n,o)}toJulianDay(t){let r=t.year;return t.era==="BCE"&&(r=1-r),de(et,r,t.month,t.day)}getDaysInMonth(t){let r=t.year;return t.era==="BCE"&&(r=1-r),Ut(r,t.month)}isInverseEra(t){return t.era==="BCE"}balanceDate(t){t.year<=0&&(t.era=t.era==="BCE"?"CE":"BCE",t.year=1-t.year)}getEras(){return["BCE","CE"]}getYearsInEra(t){return t.era==="BCE"?9999:9715}constructor(...t){super(...t),this.identifier="coptic"}}function Yt(e){switch(e){case"buddhist":return new lo;case"ethiopic":return new Ee;case"ethioaa":return new Mo;case"coptic":return new ko;case"hebrew":return new Co;case"indian":return new mo;case"islamic-civil":return new Ae;case"islamic-tbla":return new go;case"islamic-umalqura":return new yo;case"japanese":return new io;case"persian":return new ho;case"roc":return new co;case"gregory":default:return new A}}function Po({themeName:e="calendar",tokens:t,state:r,date:n}){const o=h.useRef(null),{cellProps:s,buttonProps:i,isSelected:l,isOutsideVisibleRange:c,isDisabled:d,formattedDate:u,isInvalid:y}=je.useCalendarCell({date:n},r,o),f=r?.highlightedRange?Ne(n,r?.highlightedRange.start):l,p=r?.highlightedRange?Ne(n,r?.highlightedRange.end):l,{locale:w}=x.useLocale(),b=vt(n,w),$=l&&(f||b===0||n.day===1),v=l&&(p||b===6||n.day===n.calendar.getDaysInMonth(n)),{focusProps:M,isFocusVisible:k}=_.useFocusRing(),D=g(`${e}.cellContainer`,{...t,isFocusVisible:k}),S=g(`${e}.cell`,{...t,isSelected:l,isInvalid:y,isDisabled:d,isRoundedLeft:$,isRoundedRight:v}),L=g(`${e}.cellDate`,{...t,isSelected:l,isInvalid:y,isDisabled:d,isSelectionStart:f,isSelectionEnd:p});return a.jsx("td",{...s,"aria-disabled":!1,className:D,children:a.jsx("div",{...er.mergeProps(i,M),ref:o,hidden:c,className:S,children:a.jsx("div",{className:L,children:u})})})}function To({themeName:e="calendar",customTheme:t,tokens:r,state:n,...o}){const{locale:s}=fe.useLocale(),{gridProps:i,headerProps:l,weekDays:c}=je.useCalendarGrid({...o},n),d=Vn(n.visibleRange.start,s),u=g(`${e}.calendarTable`,r),y=g(`${e}.dayLabel`,r);return a.jsxs("table",{...i,cellPadding:"0",className:u,children:[a.jsx("thead",{...l,children:a.jsx("tr",{children:c.map(f=>a.jsx("th",{className:y,children:f},`${f}`))})}),a.jsx("tbody",{children:[...new Array(d).keys()].map(f=>a.jsx("tr",{children:n.getDatesInWeek(f).map((p,w)=>p?a.jsx(Po,{state:n,date:p},p?.day):a.jsx("td",{},w))},f))})]})}function Jt({buttons:e,tokens:t,customTheme:r,themeName:n="calendar",...o}){const{locale:s}=fe.useLocale(),i=Zt.useCalendarState({...o,locale:s,createCalendar:Yt}),l=h.useRef(null),{calendarProps:c,prevButtonProps:d,nextButtonProps:u,title:y}=je.useCalendar({...o},i),f=g(`${n}.container`,t),p=g(`${n}.header`,t),w=g(`${n}.navigationButtonsContainer`,t);return a.jsxs("div",{...c,ref:l,className:f,children:[a.jsxs("div",{className:p,children:[a.jsx(T,{as:"p",tokens:{size:"h6"},children:y}),a.jsxs("div",{className:w,children:[a.jsx(Q,{themeName:`${n}.navigationButtons`,tokens:{...t},type:"button",...d,handlePress:d?.onPress,children:a.jsx(j,{icon:e?.buttonPrev?.icon??"ArrowLeft"})}),a.jsx(Q,{themeName:`${n}.navigationButtons`,tokens:{...t},type:"button",...u,handlePress:u?.onPress,children:a.jsx(j,{icon:e?.buttonNext?.icon??"ArrowRight"})})]})]}),a.jsx(To,{state:i})]})}function jo({title:e,children:t,...r}){const n=h.useRef(null),{dialogProps:o}=x.useDialog(r,n);return a.jsx("div",{...o,ref:n,children:t})}function So({themeName:e="datePicker",tokens:t,...r}){const n=rr.useRef(null),{state:o,children:s}={...r},{popoverProps:i,underlayProps:l}=H.usePopover({...r,popoverRef:n},o),c=g(`${e}.calendarUnderlay`,t),d=g(`${e}.calendarPopover`,t);return a.jsxs(H.Overlay,{children:[a.jsx("div",{...l,className:c}),a.jsxs("div",{...i,ref:n,className:d,children:[a.jsx(H.DismissButton,{onDismiss:o.close}),s,a.jsx(H.DismissButton,{onDismiss:o.close})]})]})}function Ro({segment:e,state:t}){const r=h.useRef(null),{segmentProps:n}=Te.useDateSegment(e,t,r),o=g("datePicker.dateSegment");return a.jsx(x.FocusRing,{focusRingClass:"has-focus-ring",children:a.jsxs("div",{...n,ref:r,className:o,children:[a.jsx("span",{"aria-hidden":"true",style:{visibility:e.isPlaceholder?"visible":"hidden",height:e.isPlaceholder?"":0,pointerEvents:"none",display:e.isPlaceholder?"block":"none"},children:e.placeholder}),e.isPlaceholder?"":e.text]})})}function tt(e){const{locale:t}=fe.useLocale(),r=nt.useDateFieldState({...e,locale:t,createCalendar:Yt}),n=h.useRef(null),{fieldProps:o}=Te.useDateField(e,r,n);return a.jsx("div",{...o,ref:n,className:"flex",children:r.segments.map((s,i)=>a.jsx(Ro,{segment:s,state:r},i))})}function Io({popoverPlacement:e="bottom start",tokens:t,customTheme:r,themeName:n="datePicker",icon:o="ArrowDown",description:s,buttonLabel:i,...l}){const c=nt.useDatePickerState({...l}),d=h.useRef(null),{groupProps:u,fieldProps:y,labelProps:f,descriptionProps:p,buttonProps:w,dialogProps:b,calendarProps:$}=Te.useDatePicker({...l},c,d),{label:v}={...l},M=g(`${n}.container`,t),k=g(`${n}.dateField`,t),D=g(`${n}.label`,t);return a.jsxs("div",{className:M,children:[v&&a.jsx("span",{...f,children:v}),s&&a.jsx("div",{...p,children:s}),a.jsx("div",{...u,ref:d,children:a.jsxs(Q,{themeName:`${n}.button`,tokens:{...t},type:"button",...w,handlePress:w.onPress,children:[i&&a.jsx("p",{className:D,children:i}),a.jsxs("div",{className:k,children:[a.jsx(tt,{...y}),c.validationState==="invalid"&&"❌"]}),a.jsx(j,{themeName:`${n}.icon`,tokens:{...t},icon:o})]})}),c.isOpen&&a.jsx(So,{triggerRef:d,state:c,placement:e,children:a.jsxs(jo,{...b,children:[a.jsxs("div",{children:[a.jsx(tt,{...y}),c.validationState==="invalid"&&"❌"]}),a.jsx(Jt,{...$})]})})]})}const[Ao,Bo]=ft();function Eo({children:e}){const[t,r]=h.useState(!1);h.useEffect(()=>{r(!0)},[]);const n=h.useMemo(()=>({isClient:t}),[t]);return a.jsx(Bo,{value:n,children:e})}const be=(e,t,r="sharing_tool")=>`?utm_source=${e}&utm_medium=${t}&utm_campaign=${r}`,ge=()=>{const[e,t]=h.useState(),[r,n]=h.useState();return h.useEffect(()=>{t(window.location.href),n(window.document.title)},[]),{windowLocation:e,windowTitle:r}},No=(e,t,r)=>{const{windowLocation:n,windowTitle:o}=ge(),s=r??n,i=be(e,t);return`https://www.facebook.com/sharer.php?u=${`${s}${i}`}&t=${o}`},Fo=(e,t,r)=>{const{windowLocation:n,windowTitle:o}=ge(),s=r??n,i=be(e,t),l=`${s}${i}`;return`mailto:?to=&body=${o}%20${l}`},Lo=(e,t,r)=>{const{windowLocation:n}=ge(),o=r??n,s=be(e,t);return`https://twitter.com/intent/tweet?text=${`${o}${s}`}`};exports.Accordion=un;exports.ArrowRight=gt;exports.Box=Cn;exports.BoxWithForwardRef=bt;exports.Button=Q;exports.ButtonWithForwardRef=V;exports.Calendar=Jt;exports.Checkbox=En;exports.Date=Sn;exports.DatePicker=Io;exports.Icon=j;exports.IsClientContextProvider=Eo;exports.Lightbox=Dn;exports.Modal=Re;exports.Popover=kn;exports.ReactHookFormInput=Fn;exports.ReactHookFormSelect=Bn;exports.Select=pt;exports.ShareButton=fn;exports.SidePanel=wn;exports.SidePanelContextProvider=mn;exports.TextArea=Nn;exports.TextInputField=yt;exports.ThemeContextProvider=at;exports.ThemeProvider=nn;exports.Typography=T;exports.WysiwygBlock=Pn;exports.createThemeProvider=it;exports.generateUtmTags=be;exports.makeTheme=ot;exports.useFacebookShareUrl=No;exports.useIsClient=Ao;exports.useMailToShareUrl=Fo;exports.useSidePanel=mt;exports.useTheme=st;exports.useThemeContext=g;exports.useTwitterShareUrl=Lo;exports.useWindow=ge;
|