aiware-js 1.0.0-master.812 → 1.0.0-master.814

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/js-core.esm.js CHANGED
@@ -1333,7 +1333,7 @@ createScheduledJob(input:{
1333
1333
  unreadCount
1334
1334
  }
1335
1335
  }
1336
- `,variables:e,graphEndpoint:n,token:r})}catch(e){return{success:!1}}});function*refetchNotificationSetting(){yield put(getNotification(0,30))}function*getNotificationListByMailBoxSaga(e){const{status:t,mailBoxIds:n,mailbox:r}=yield select(mailBoxSelector);var{limit:e,offset:i,callback:o}=e.payload,a=yield select(graphEndpointSelector),s=yield select(sessionTokenSelector),l="success"===t||"failure"===t;if(0!==Object.keys(r).length||l){yield put(getNotificationStart(i,e));l=yield call$j(handleNotificationListByMailBox,a,s,n,i,e);if(null!=o&&o(),0<(null==(a=null==l?void 0:l.errors)?void 0:a.length))yield put(getNotificationListByMailBoxFail());else{let n=0;a=null==(o=null==(s=null==l?void 0:l.data)?void 0:s.notificationMailboxes)?void 0:o.map(t=>{var e;return 0<(null==(e=null==t?void 0:t.notifications)?void 0:e.count)?(e=null==(e=null==(e=null==t?void 0:t.notifications)?void 0:e.records)?void 0:e.map(e=>Object.assign(Object.assign({},e),{mailboxId:t.id})),n++,e):[]}),l=((null==a?void 0:a.flat())||[]).map(t=>{var e,n=r.find(e=>e.id===t.mailboxId);return Object.assign(Object.assign({},t),{appId:(null==(e=null==n?void 0:n.application)?void 0:e.applicationId)||"",appName:(null==(e=null==n?void 0:n.application)?void 0:e.name)||"",eventNames:(null==(e=null==n?void 0:n.eventFilter)?void 0:e.eventNames)||[],icon:(null==(e=null==n?void 0:n.application)?void 0:e.icon)||"",title:t.title||""})});yield put(getNotificationListByMailBoxSuccess({offset:i,limit:e,availableMailBoxes:n,data:l}))}}else yield take(subscriberSuccess({}).type)}function*listenToPushNotificationSaga(e){var t=(yield select(mailBoxSelector))["mailbox"];const n=e["payload"];e=t.find(e=>e.id===n.mailboxId);yield put(updateNotificationList(Object.assign(Object.assign({},n),{appId:(null==(t=null==e?void 0:e.application)?void 0:t.applicationId)||"",appName:(null==(t=null==e?void 0:e.application)?void 0:t.name)||"",icon:(null==(t=null==e?void 0:e.application)?void 0:t.icon)||""})))}function*updateNotificationReadSaga(e){var t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector);try{var r=yield call$j(handleUpdateNotificationRead,t,n,e.payload);null!=r&&r.error?yield put(updateNotificationReadFail()):yield put(updateNotificationReadSuccess(Object.assign({},r)))}catch(e){yield put(updateNotificationReadFail())}}function*updateMarkAllReadNotificationSaga(){var e=(yield select(mailBoxSelector))["mailBoxIds"],t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector);if(0<(null==e?void 0:e.length))try{(yield call$j(handleMarkAllReadNotification,e,t,n)).error?yield put(markAllReadNotificationFail()):yield put(markAllReadNotificationSuccess())}catch(e){yield put(markAllReadNotificationFail())}}function*getNotificationActionSaga(e){var t,n,{eventType:r,appId:i,eventName:o}=yield select(notificationDetailSelector(e.payload)),a=yield select(graphEndpointSelector),s=yield select(sessionTokenSelector);try{var l,c=yield call$j(handleGetNotificationAction,o,r,i,a,s);c.error?yield put(getNotificationActionError()):(l=(null==(n=null==(t=null==c?void 0:c.data)?void 0:t.notificationActions)?void 0:n.records)||[],yield put(getNotificationActionSuccess(e.payload,l)))}catch(e){yield put(getNotificationActionError())}}function*notificationSaga(){yield all$2([takeEvery$1(getNotification.type,getNotificationListByMailBoxSaga),takeLatest$1(updateUtilitySetting.type,refetchNotificationSetting),takeEvery$1(getNotificationListByMailBoxRequest.type,getNotificationListByMailBoxSaga),takeEvery$1("mailbox/PUSH_NOTIFICATION",listenToPushNotificationSaga),takeEvery$1(updateNotificationReadRequest.type,updateNotificationReadSaga),takeEvery$1(GET_NOTIFICATION_ACTION_REQUEST,getNotificationActionSaga),takeLatest$1(markAllReadNotificationRequest.type,updateMarkAllReadNotificationSaga)])}function getNotificationModule(){return{id:"os-notification-panel",reducerMap:{[nameSpace$3]:notificationReducer},sagas:[notificationSaga],initialActions:[],retained:!0}}const useStyles$b$2=makeStyles()((e,{msg:t})=>({root:{width:"100%",height:"100%"},noData:{paddingTop:66,display:"flex",justifyContent:"center"},iconNoData:{width:235,height:235,display:"flex",justifyContent:"center",borderRadius:"50%",padding:"20px",border:"20px solid #FFFF"},noDataDescription:{display:"flex",justifyContent:"center",marginTop:66},noDataDescriptionText:{fontSize:"18px",lineHeight:"23px",textTransform:"uppercase",color:e.palette.secondary.main,textAlign:"center",width:t?"250px":""}})),NotificationContent=({msg:e})=>{var t=useStyles$b$2({msg:e})["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:t.root,"data-testid":"notification-content"},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:t.noData},{children:jsxRuntime.exports.jsx("div",Object.assign({className:t.iconNoData},{children:jsxRuntime.exports.jsx("img",{src:img$4,draggable:"false",alt:"noNotification"})}))})),jsxRuntime.exports.jsx("div",Object.assign({className:t.noDataDescription},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1","data-test":"no-notification",className:t.noDataDescriptionText},{children:e?jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.select-product",defaultMessage:"No notifications for the selected product",description:"Notification panel: no notification message for select product"}):jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.pBrbyj",defaultMessage:"You don’t have any notifications",description:"Notification panel: no notification message"})}))}))]}))},useStyles$a$2=makeStyles()(e=>({cardContainer:{width:"100%","&:hover":{backgroundColor:"#EEF3F9"}},rootCard:{padding:e.spacing(4,6),display:"flex",cursor:"pointer"},unreadCard:{padding:e.spacing(4,6),display:"flex",cursor:"pointer",paddingLeft:e.spacing(2)},iconCard:{marginTop:e.spacing(-.4)},leftContent:{width:"345px",padding:e.spacing(0,6,0,3)},titleCard:{display:"flex"},appsCard:{fontSize:"14px",fontWeight:600},timestampCard:{fontSize:"12px",paddingLeft:e.spacing(3),color:e.palette.text.secondary},contentCard:{lineHeight:"150%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",color:e.palette.text.secondary},dividerCard:{margin:e.spacing(0,6),height:"0.5px"},notificationIcon:{width:24,height:24},unread:{width:"auto",marginRight:e.spacing(2.4),fontSize:"unset"},unreadIcon:{width:8,height:8,color:e.palette.primary.main},appName:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"calc(100% - 85px)"}})),NotificationCard=react$1.exports.forwardRef(({data:e,onViewDetail:t},n)=>{var r=useStyles$a$2()["classes"];const i=useDispatch(),[o,a]=react$1.exports.useState(!1);const{createdDateTime:s,icon:l,title:c,appName:u,body:d,id:p,flags:f}=e;return jsxRuntime.exports.jsxs("div",Object.assign({ref:n,className:r.cardContainer},{children:[jsxRuntime.exports.jsxs("div",Object.assign({onClick:t,className:null!=f&&f.includes(NotificationFlag.unread)?r.unreadCard:r.rootCard},{children:[(null==f?void 0:f.includes(NotificationFlag.unread))&&jsxRuntime.exports.jsx(Icon$1,{"data-test":"notification-unread-icon","data-testid":"notification-unread-icon",className:r.unread,children:jsxRuntime.exports.jsx(default_1$d,{className:r.unreadIcon}),onClick:function(e){e.stopPropagation(),i(updateNotificationReadRequest(p))}}),jsxRuntime.exports.jsx("div",Object.assign({className:r.iconCard},{children:l&&!o?jsxRuntime.exports.jsx("img",{src:l,className:r.notificationIcon,draggable:"false",alt:"notification-card-icon",onError:function(){a(!0)}}):jsxRuntime.exports.jsx(Notifications,{})})),jsxRuntime.exports.jsxs("div",Object.assign({className:r.leftContent},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:r.titleCard},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.appName},{children:null!=f&&f.includes(NotificationFlag.unread)?jsxRuntime.exports.jsx("strong",{children:u}):u})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.timestampCard},{children:jsxRuntime.exports.jsx(FormattedRelativeTime$1,{value:getRelativeValue(s),unit:"minute",updateIntervalInSeconds:60,children:e=>e.includes("seconds")?jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.mvPoLJ",defaultMessage:"Just now",description:"the time label of notification that received on 1 minute"}):react$1.exports.createElement("span",{},e)})}))]})),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.contentCard},{children:convertHTMLEntities(c||d)}))})]}))]})),jsxRuntime.exports.jsx(Divider$1,{className:r.dividerCard})]}))}),useStyles$9$2=makeStyles()(e=>({header:{opacity:.9,display:"flex",justifyContent:"space-between",padding:e.spacing(3.5,6,4,6),position:"sticky",width:"fit-content",fontSize:"14px",fontWeight:400,top:0},scrollContent:{overflow:"hidden"},infinityLoading:{display:"flex",justifyContent:"center",padding:e.spacing(4)}}));function NotificationList({title:e,data:r,loading:t,handleGetNotification:n,onOpenNotificationDetail:i,setPanelIsOpenState:o}){var a=useStyles$9$2()["classes"];const s=react$1.exports.useRef(),l=react$1.exports.useCallback(e=>{t||(s.current&&s.current.disconnect(),s.current=new IntersectionObserver(e=>{e[0].isIntersecting&&n()}),e&&s.current.observe(e))},[n,t]),c=useSelector(betaFeaturesSelector),u=useDispatch(),d=()=>{o&&o(!1),u(hidePanel$1("NOTIFICATION_PANEL_ID")),u(mountPanel$1({panelId:"CHANGELOG_PANEL",microFrontend:{name:"CHANGELOG_PANEL",config:{}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:0,size:"small",zIndex:1e3,dimmed:0,borderBottom:!0}}))};return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("div",Object.assign({className:a.header},{children:e.toUpperCase()})),jsxRuntime.exports.jsxs("div",Object.assign({className:a.scrollContent},{children:[0<(null==r?void 0:r.length)?r.map((e,t)=>{var n=!!(e.eventNames||[]).find(e=>"NewVersionInstalled"===e);return r.length===t+1?jsxRuntime.exports.jsx(NotificationCard,{ref:l,onViewDetail:n?()=>d():()=>null==i?void 0:i(e),data:e},t):jsxRuntime.exports.jsx(NotificationCard,{onViewDetail:n&&c?()=>d():()=>null==i?void 0:i(e),data:e},t)}):jsxRuntime.exports.jsx(NotificationContent,{msg:!0}),t&&jsxRuntime.exports.jsx("div",Object.assign({className:a.infinityLoading},{children:jsxRuntime.exports.jsx(CircularProgress$1,{size:30})}))]}))]})}const useStyles$8$3=makeStyles()(e=>({loadingContainer:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},filterContainer:{position:"absolute",top:e.spacing(12.4),right:0,paddingTop:e.spacing(3),paddingRight:e.spacing(6),paddingBottom:e.spacing(2),width:"100%",display:"flex",justifyContent:"flex-end",backgroundColor:e.palette.background.default},markAllReadButton:{cursor:"pointer",marginRight:e.spacing(4),backgroundColor:e.palette.background.default,textTransform:"capitalize"}})),NotificationPanel=({setPanelIsOpenState:e})=>{const r=useDispatch();var t=useStyles$8$3()["classes"],n=useSelector(applicationFilterSelector)||[];const[i,o]=react$1.exports.useState(!1),a=useSelector(mailboxIdSelector);var s=useSelector(notificationWithFilterSelector);const{filter:l,status:c,notifications:u,availableMailBoxes:d,offset:p,limit:f}=useSelector(notificationSelector),h=e=>Math.max(Math.ceil(50/e),5);react$1.exports.useEffect(()=>{var e=(null===a||void 0===a?void 0:a.length)||0;0<e&&0===f&&(e=h(e),r(getNotification(0,e)))},[r,f,a]);var m=react$1.exports.useCallback(()=>{var e;0<d&&(o(!0),e=h(d),r(getNotification(p+f,e,()=>{o(!1)})))},[d,r,f,p]);return jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getNotificationModule()]},{children:0===s.length&&"success"!==c&&"failure"!==c&&0<a.length?jsxRuntime.exports.jsx("div",Object.assign({className:t.loadingContainer},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})):0<(null==u?void 0:u.length)?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:t.filterContainer,id:"notification-list-header"},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:function(){r(markAllReadNotificationRequest())},className:t.markAllReadButton,"data-test":"notification-mark-all-read-button","data-testid":"notification-mark-all-read-button"},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"caption",color:"primary"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.PtPIns",defaultMessage:"Mark All Read",description:"label of Mark All Read button"})}))})),jsxRuntime.exports.jsx(Filter,{data:[...filters$3,...n],filter:l,onFilter:function(e){e=e.target.value,r(updateFilterValue(e))}})]})),jsxRuntime.exports.jsx(NotificationList,{setPanelIsOpenState:e,title:"All time",onOpenNotificationDetail:function(e){var t="DETAIL_PANEL_ID",n={name:"NOTIFICATION_DETAIL",config:{mode:"actionable",id:e.id,data:Object.assign({},e),actionIconButtons:null!=(n=e.actions)?n:[],onClose:()=>{console.log("onClose")}}};r(unmountPanel$1(t)),r(mountPanel$1({panelId:t,microFrontend:n,panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:413,width:420,header:{title:"Notification detail"},dimmed:0,siblingPanelId:"NOTIFICATION_PANEL_ID",parentPanelId:"NOTIFICATION_PANEL_ID"}})),r(updateNotificationReadRequest(e.id))},data:s,loading:i,handleGetNotification:m})]}):jsxRuntime.exports.jsx(NotificationContent,{})}))})};function CustomWorkFlow(){return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex",justifyContent:"space-between",alignItems:"center","data-testid":"custom-workflow-box"},{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.1+8+OX",defaultMessage:"Custom Workflows",description:"custom-workflows"})}),jsxRuntime.exports.jsx(Button$1,{variant:"outlined",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.gAFAOA",defaultMessage:"Create New",description:"creat-new-btn"}),color:"primary"})]})),jsxRuntime.exports.jsx(Typography$1,{style:{fontSize:14,marginTop:20},children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.9+Qhjr",defaultMessage:"You don’t have any custom workflows yet. Get started by clicking the Create New button above!",description:"text"})})]})}const useStyles$7$3=makeStyles()(e=>({dividerSmallMargin:{marginTop:e.spacing(3.6),marginBottom:e.spacing(4)},utilityItem:{padding:0,cursor:"pointer"},utilityItemHover:{padding:e.spacing(2,0),"&:hover":{backgroundColor:e.palette.background.paper}},utilityDetail:{fontSize:12}}));function NotificationSettingItem(e){const{imgSrc:t,primaryText:n,secondaryText:r,bigSize:i,onOpenUtility:o,onOpenApplication:a,hideDivider:s,applicationId:l,applicationTitle:c,utilityId:u="",utilityTitle:d="Finder",disabled:p,isHover:f}=e;e=useStyles$7$3().classes;return jsxRuntime.exports.jsxs(react$1.exports.Fragment,{children:[jsxRuntime.exports.jsxs(ListItem$1,Object.assign({className:classNames(e.utilityItem,f?e.utilityItemHover:""),onClick:function(){null!==o&&void 0!==o&&o(u,d),null!==a&&void 0!==a&&a(l,c)},disabled:p,"data-testid":"notification-setting-item"},{children:[jsxRuntime.exports.jsx(ListItemAvatar$1,{children:jsxRuntime.exports.jsx(Avatar$1,{style:{width:i?60:40,height:i?60:40,borderRadius:"50%",marginRight:19},src:t})}),jsxRuntime.exports.jsx(ListItemText$1,{primary:jsxRuntime.exports.jsx(Typography$1,{variant:i?"h3":"body2",children:n}),secondary:jsxRuntime.exports.jsx(Typography$1,{variant:i?"body2":"caption",children:r})})]})),!s&&jsxRuntime.exports.jsx(Divider$1,{className:f?"":e.dividerSmallMargin})]})}const useStyles$6$3=makeStyles()(e=>({notificationTypeItemBox:{background:e.palette.background.paper,borderRadius:e.shape.borderRadius,width:"100%",display:"flex",flexDirection:"column",alignItems:"center",padding:e.spacing(4,1,1),height:"100%",fontSize:10,lineHeight:"16px",justifyContent:"center"},disableType:{color:e.palette.grey[500]}}));function NotificationTypeItem(e){const{notificationTypeIcon:t,notificationTypeName:n,defaultSelected:r,onSelectNotificationType:i,notificationTypeId:o,isDisabled:a}=e,[s,l]=react$1.exports.useState(r);e=useStyles$6$3().classes;return jsxRuntime.exports.jsxs("div",Object.assign({className:classNames(e.notificationTypeItemBox,a?e.disableType:""),"data-testid":"notification-type-item"},{children:[jsxRuntime.exports.jsx("div",{children:"string"==typeof t?jsxRuntime.exports.jsx("img",{src:t,alt:"icon",draggable:"false"}):t}),jsxRuntime.exports.jsx("div",{children:n}),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Checkbox$1,{icon:jsxRuntime.exports.jsx("img",{src:img$1r,alt:"uncheck icon",draggable:"false"}),checkedIcon:jsxRuntime.exports.jsx("img",{src:img$1q,alt:"checked icon",draggable:"false"}),checked:s,onChange:function(){l(e=>(null!==i&&void 0!==i&&i(o,!e),!e))},disabled:!!a})})]}))}const useStyles$5$4=makeStyles()(e=>({notificationTypeBox:{paddingBottom:e.spacing(0)},notificationTypeHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:16,lineHeight:"22px",fontWeight:600,marginBottom:e.spacing(2)},notificationList:{display:"inline-grid",gridColumnGap:e.spacing(2.8),gridTemplateColumns:"1fr 1fr 1fr",width:"100%",marginBottom:e.spacing(4.4)},divider:{marginTop:e.spacing(4),marginBottom:e.spacing(4.4)},dividerWithoutDescription:{marginBottom:e.spacing(3)}})),defaultNotificationTypeList=[{id:INotificationType.EMAIL,notificationTypeIcon:jsxRuntime.exports.jsx(Email,{}),notificationTypeName:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.rTFvFj",defaultMessage:"Email",description:"allow notification types: email"}),isSelected:!0},{id:INotificationType.NOTIFICATION_CENTER,notificationTypeIcon:jsxRuntime.exports.jsx(HelpCenter$1,{}),notificationTypeName:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.SmyvFq",defaultMessage:"Notification Center",description:"allow notification types: Notification Center"}),isSelected:!0},{id:INotificationType.BANNER,notificationTypeIcon:jsxRuntime.exports.jsx(Banner,{}),notificationTypeName:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.r7Whww",defaultMessage:"Banners",description:"allow notification types: Banners"}),isSelected:!0}];function NotificationType(e){const{notificationTypeTitle:t,children:n,description:r,allowTypes:i=[],allowNotification:o,onChangeAllowType:a,hideDivider:s,onChangeNotificationType:l,disabledTypes:c=[]}=e,[u,d]=react$1.exports.useState(!!o),[p,f]=react$1.exports.useState(defaultNotificationTypeList);var e=useStyles$5$4()["classes"],h=[...i];const[m,g]=react$1.exports.useState(i);var y=t||"Allow Notifications";return react$1.exports.useEffect(()=>{var e=defaultNotificationTypeList.map(t=>{var e=-1!==m.findIndex(e=>e===t.id),n=-1!==c.findIndex(e=>e===t.id);return Object.assign(Object.assign({},t),{isSelected:e,isDisabled:n})});f(e)},[h.join(", "),m]),react$1.exports.useEffect(()=>{null!==a&&void 0!==a&&a(u),u?0===m.length&&u&&g([INotificationType.EMAIL]):g([])},[u]),jsxRuntime.exports.jsxs("div",Object.assign({className:e.notificationTypeBox},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:e.notificationTypeHeader},{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.8Z0yyD",defaultMessage:"{title}",description:"notification setting: allow notification types",values:{title:y}})}),jsxRuntime.exports.jsx(Switch$1,{checked:u,onChange:function(){d(e=>!e)},color:"primary",name:"notificationTypeChecked","data-testid":"notification-type-switch"})]})),n,jsxRuntime.exports.jsx("div",Object.assign({className:e.notificationList},{children:p.map(t=>{var e=-1!==c.findIndex(e=>e===t.id)||!u;return jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(NotificationTypeItem,{notificationTypeIcon:t.notificationTypeIcon,notificationTypeName:t.notificationTypeName,defaultSelected:t.isSelected,onSelectNotificationType:l,notificationTypeId:t.id,isDisabled:e})},t.id+"-"+t.isSelected)})})),r,!s&&jsxRuntime.exports.jsx(Divider$1,{className:r?e.divider:e.dividerWithoutDescription})]}))}const useStyles$4$4=makeStyles()(e=>({tableCell:{padding:0,"& > span":{paddingLeft:0,paddingRight:0}},itemCell:{padding:0,"& > span":{padding:e.spacing(0,2)}},eventNameContainer:{display:"flex",alignItems:"center"},tableRowCheckbox:{marginRight:e.spacing(2)},rowCheckbox:{paddingLeft:0},customLineHeight:{lineHeight:e.spacing(8)},disabledCheckBox:{"& svg":{color:"green"}}}));function NotificationUtilityActionItem(e){const{events:t,disabled:n}=e,r=useStyles$4$4()["classes"],i=[{type:INotificationType.EMAIL,iconUrl:img$1u},{type:INotificationType.NOTIFICATION_CENTER,iconUrl:img$1t},{type:INotificationType.BANNER,iconUrl:img$1s}];return jsxRuntime.exports.jsx(TableContainer$1,{children:jsxRuntime.exports.jsxs(Table$1,Object.assign({"aria-label":"customized table"},{children:[jsxRuntime.exports.jsx(TableHead$1,{children:jsxRuntime.exports.jsxs(TableRow$1,{children:[jsxRuntime.exports.jsx(TableCell$1,Object.assign({className:r.tableCell},{children:jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.KVIpaj",defaultMessage:"Events",description:"allow-notification"})})})),i.map(e=>jsxRuntime.exports.jsx(TableCell$1,Object.assign({align:"center",className:r.itemCell},{children:jsxRuntime.exports.jsx("img",{src:e.iconUrl,alt:e.type})}),e.type))]})}),jsxRuntime.exports.jsx(TableBody$1,{children:null==t?void 0:t.map(t=>jsxRuntime.exports.jsxs(TableRow$1,{children:[jsxRuntime.exports.jsxs(TableCell$1,Object.assign({className:classNames(r.eventNameContainer,r.tableCell)},{children:[jsxRuntime.exports.jsx(Checkbox$1,{id:t.id,disabled:n,className:r.tableRowCheckbox}),jsxRuntime.exports.jsx(ListItemText$1,{children:jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.VNVmyk",defaultMessage:"{defaultMessage}",description:"Finder notifications: {defaultMessage}",values:{defaultMessage:t.title,id:t.id}})})})]})),i.map(e=>jsxRuntime.exports.jsx(TableCell$1,Object.assign({className:r.itemCell},{children:jsxRuntime.exports.jsx(Checkbox$1,{id:"checkbox-"+t.id,icon:jsxRuntime.exports.jsx(default_1$c,{}),checkedIcon:jsxRuntime.exports.jsx(CheckCircle,{})})}),e.type+"-type"))]},t.id))})]}))})}const useStyles$3$5=makeStyles()(e=>({finderNotification:{padding:e.spacing(4,6),maxHeight:"100%",overflow:"auto"},buttonBox:{display:"flex",justifyContent:"flex-end",marginTop:e.spacing(8)},buttonLeft:{marginRight:e.spacing(4)},settingItem:{marginBottom:e.spacing(6)},sharedItem:{padding:0}}));function NotificationUtilityPanel(e){const t=e["dataId"];e=useStyles$3$5().classes;const n=useSelector(notificationSelector).settings;var r=n.utility,r=null==r?void 0:r.find(e=>e.id===t);const[i,o]=react$1.exports.useState(r||{}),a=[];return[INotificationType.EMAIL,INotificationType.NOTIFICATION_CENTER,INotificationType.BANNER].forEach(t=>{-1===n.allowType.findIndex(e=>e===t)&&a.push(t)}),jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs("div",Object.assign({className:e.finderNotification},{children:[jsxRuntime.exports.jsx(NotificationType,{allowTypes:null==i?void 0:i.allowType,allowNotification:null==i?void 0:i.allow,onChangeAllowType:function(r){o(e=>{var t=r?[...e.allowType]:[],n=r?[...e.action]:[...e.action].map(e=>Object.assign(Object.assign({},e),{allow:!1}));return Object.assign(Object.assign({},e),{allow:r,allowType:t,action:n})})},onChangeNotificationType:function(r,i){o(e=>{var t=[...e.allowType],n=t.indexOf(r);return-1===n||i?t.push(r):t.splice(n,1),Object.assign(Object.assign({},e),{allowType:t})})},disabledTypes:a,children:jsxRuntime.exports.jsx(NotificationSettingItem,{imgSrc:(null==i?void 0:i.iconUrl)||"",primaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.ubNxKs",defaultMessage:"{utilityTitle}",description:"title of notification utility: {utilityTitle}",values:{id:null==i?void 0:i.id,utilityTitle:null==i?void 0:i.title}}),secondaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.XkH621",defaultMessage:"Chose which events you’d like to be notified about.",description:"content of notification utility description"}),bigSize:!0}),description:jsxRuntime.exports.jsx(Typography$1,{variant:"caption",children:"Banner previews are being set at the parent level"})}),jsxRuntime.exports.jsx(NotificationUtilityActionItem,{events:null==i?void 0:i.action,onSelectAction:function(r){o(e=>{var t=[...e.action],n=t.findIndex(e=>e.id===r.id);return t[n]=r,Object.assign(Object.assign({},e),{action:t})})},disabled:!i.allow}),jsxRuntime.exports.jsx(Divider$1,{style:{marginBottom:20,marginTop:15}}),jsxRuntime.exports.jsx(CustomWorkFlow,{})]}))})}const useStyles$2$6=makeStyles()(e=>({notificationSetting:{padding:e.spacing(3,6,4.4),overflowY:"scroll",height:"100%"},appAllowTitle:{paddingTop:e.spacing(2.4)},dividerBigMargin:{marginTop:e.spacing(2.4),marginBottom:e.spacing(3)},notificationSettingItem:{padding:0},bannerStyleLabel:{fontWeight:"normal"}}));function NotificationSetting(){var e=useStyles$2$6()["classes"];const r=useDispatch(),[t,i]=react$1.exports.useState(!0),[n,o]=react$1.exports.useState(!0);var a=useSelector(notificationSettingSelector);const[s,l]=react$1.exports.useState(a.bannerStyle);var c=useSelector(notificationUtilitiesSelector);const u=useSelector(notificationApplicationsSelector),[d,p]=react$1.exports.useState(null==a?void 0:a.allow),[f,h]=react$1.exports.useState(a);var a=-1!==(null==(a=null===f||void 0===f?void 0:f.allowType)?void 0:a.findIndex(e=>e===INotificationType.BANNER));const[m,g]=react$1.exports.useState(a);function y(e){var t={name:"NOTIFICATION_UTILITY",config:{mode:"actionable",onClose:()=>{console.log("onClose")}}},n={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:472,width:413,zIndex:1002,header:{divider:!0,title:"finder notifications"}};r(mountPanel$1({panelId:e||"",microFrontend:t,panelConfig:n}))}function v(e){var t={name:"NOTIFICATION_APPLICATION",config:{mode:"actionable",onClose:()=>{console.log("onClose")}}},n={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:472,width:413,zIndex:1002,header:{divider:!0,title:"app notifications"}};r(mountPanel$1({panelId:e||"",microFrontend:t,panelConfig:n}))}return react$1.exports.useEffect(()=>{r(updateNotificationSetting(f))},[f,r]),jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs("div",Object.assign({className:e.notificationSetting},{children:[jsxRuntime.exports.jsx(NotificationType,{allowTypes:null===f||void 0===f?void 0:f.allowType,allowNotification:null===f||void 0===f?void 0:f.allow,onChangeAllowType:function(n){p(n),n||(i(n),o(n)),h(e=>{var t=n?[...e.allowType]:[];return Object.assign(Object.assign({},e),{allow:n,allowType:t})})},hideDivider:m,onChangeNotificationType:function(r,i){r===INotificationType.BANNER&&g(i),h(e=>{var t=[...e.allowType],n=t.indexOf(r);return-1===n||i?t.push(r):t.splice(n,1),Object.assign(Object.assign({},e),{allowType:t})})}}),d&&m&&jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:"Banner Style"}),jsxRuntime.exports.jsx(FormControl$1,Object.assign({component:"fieldset"},{children:jsxRuntime.exports.jsxs(RadioGroup$1,Object.assign({"aria-label":"bannerStyle",name:"bannerStyle",value:s,onChange:e=>{l(e.target.value),r(updateBannerStyle(e.target.value))},row:!0},{children:[jsxRuntime.exports.jsx(FormControlLabel$1,{value:"temporary",control:jsxRuntime.exports.jsx(Radio$2,{}),label:jsxRuntime.exports.jsx("span",{children:jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:"Temporary"})})}),jsxRuntime.exports.jsx(FormControlLabel$1,{value:"persistent",control:jsxRuntime.exports.jsx(Radio$2,{}),label:jsxRuntime.exports.jsx("span",{children:jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:"Persistent"})})})]}))})),jsxRuntime.exports.jsx(Divider$1,{className:e.dividerBigMargin})]}),jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex",justifyContent:"space-between",alignItems:"center"},{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.qJ0Sxo",defaultMessage:"Allow Utility Notifications",description:"allow-utility-notification"})}),jsxRuntime.exports.jsx(Switch$1,{checked:t,onChange:e=>{e=e.target.checked;i(e)},color:"primary",name:"enableUtilityNotification",disabled:!d})]})),jsxRuntime.exports.jsx(List$2,Object.assign({className:e.notificationSettingItem},{children:null==c?void 0:c.map(e=>jsxRuntime.exports.jsx(NotificationSettingItem,{imgSrc:e.iconUrl,isHover:!0,primaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.tadsU0",defaultMessage:"{defaultMessage}",description:"title of notification utility: {defaultMessage}",values:{id:e.id,defaultMessage:e.title}}),secondaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.AgAM0k",defaultMessage:"{defaultMessage}",description:"allowed types of notification utility: {defaultMessage}",values:{id:e.id,defaultMessage:e.allowType.join(", ")}}),onOpenUtility:y,utilityId:e.id,utilityTitle:e.title,disabled:!t},e.id))}))]}),jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex",justifyContent:"space-between",alignItems:"center",className:e.appAllowTitle},{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.swIpqY",defaultMessage:"Allow Application Notifications",description:"allow-application-notification"})}),jsxRuntime.exports.jsx(Switch$1,{checked:n,onChange:e=>{e=e.target.checked;o(e)},color:"primary",name:"checkedB",disabled:!d})]})),jsxRuntime.exports.jsx(List$2,Object.assign({className:e.notificationSettingItem},{children:null==(a=null===u||void 0===u?void 0:u.allIds)?void 0:a.map(e=>jsxRuntime.exports.jsx(NotificationSettingItem,{imgSrc:null===u||void 0===u?void 0:u.byId[e].iconUrl,isHover:!0,primaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.JvsYLn",defaultMessage:"{defaultMessage}",description:"title of notification application: {defaultMessage}",values:{idMessage:e,defaultMessage:null===u||void 0===u?void 0:u.byId[e].name}}),secondaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.AgAM0k",defaultMessage:"{defaultMessage}",description:"allowed types of notification utility: {defaultMessage}",values:{id:e,defaultMessage:null===u||void 0===u?void 0:u.byId[e].allowType.join(", ")}}),onOpenApplication:v,applicationId:e,applicationTitle:null===u||void 0===u?void 0:u.byId[e].name,disabled:!n},e))}))]})]}))})}const useStyles$1$6=makeStyles()(e=>({appNoti:{padding:e.spacing(6),paddingTop:e.spacing(4.4),overflowY:"scroll",height:"100%"}})),useStyles$n=makeStyles()(e=>({tableCell:{padding:0,"& > span":{paddingLeft:0,paddingRight:0}},tableRowCheckbox:{marginRight:e.spacing(2)},rowCheckbox:{paddingLeft:0,paddingTop:0,paddingBottom:0,height:"20px"},disabledCheckBox:{"& svg":{color:"green"}},firstColumn:{paddingRight:e.spacing(2)},secondColumn:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},thirdColumn:{paddingLeft:e.spacing(2)}}));function NotificationAllowCell(e){const{id:t,type:n,allowType:r,currentApplicationAllowType:i,isLineEnable:o,onChangeAppAction:a}=e,s=useStyles$n()["classes"];e=(e,t)=>{switch(t){case"email":return e.includes(INotificationType.EMAIL);case"banners":return e.includes(INotificationType.BANNER);case"notification-center":return e.includes(INotificationType.NOTIFICATION_CENTER)}};return jsxRuntime.exports.jsx(TableCell$1,Object.assign({align:"center",className:s.tableCell+" "+(()=>{switch(t){case"email":return s.firstColumn;case"notification-center":return s.secondColumn;case"banners":return s.thirdColumn;default:return""}})()},{children:jsxRuntime.exports.jsx(Checkbox$1,{id:"checkbox-"+t,checked:e(r,t),disabled:!e(i,t)||!o,icon:jsxRuntime.exports.jsx(default_1$c,{}),checkedIcon:jsxRuntime.exports.jsx(CheckCircle,{color:e(i,t)&&o?"primary":"disabled"}),onChange:e=>{a(e,n)}})}))}function NotificationAllowRow(e){const{allowNotificationTitle:t,checked:n,allowType:r,appId:i,id:o}=e;e=useStyles$n().classes;const a=useDispatch();var s=useSelector(notificationApplicationSelector(i));const[l,c]=react$1.exports.useState(n),u=null==s?void 0:s.allowType,[d,p]=react$1.exports.useState(r);s=[{id:"email",type:INotificationType.EMAIL},{id:"notification-center",type:INotificationType.NOTIFICATION_CENTER},{id:"banners",type:INotificationType.BANNER}];const f=(e,t)=>{let n;n=e.currentTarget.checked?[...d,t]:d.filter(e=>e!==t),p(n),a(updateAppActionAllowNotification(i,o,n,"allowType"))};return jsxRuntime.exports.jsxs(TableRow$1,{children:[jsxRuntime.exports.jsx(TableCell$1,Object.assign({component:"th",scope:"row",className:e.tableCell},{children:jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex"},{children:[jsxRuntime.exports.jsx(Checkbox$1,{"data-test":"row-check-"+o,"data-testid":"row-check-"+o,className:e.rowCheckbox,checked:l,onChange:e=>{e=e.currentTarget.checked;c(e),a(updateAppActionAllowNotification(i,o,e,"allow"))}}),jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.tSG+Bv",defaultMessage:"{text}",description:"allow-notification-table-{text}",values:{text:t}})})]}))})),s.map(e=>jsxRuntime.exports.jsx(NotificationAllowCell,{id:e.id,type:e.type,allowType:r,currentApplicationAllowType:u,isLineEnable:l,onChangeAppAction:f},e.id))]})}function NotificationAllowTable(e){const{action:n,appId:r}=e;var e=useStyles$n()["classes"],t=classNames(e.tableCell,e.firstColumn),i=classNames(e.tableCell,e.secondColumn),o=classNames(e.tableCell,e.thirdColumn);return jsxRuntime.exports.jsx(TableContainer$1,{children:jsxRuntime.exports.jsxs(Table$1,Object.assign({"aria-label":"notification-table"},{children:[jsxRuntime.exports.jsx(TableHead$1,{children:jsxRuntime.exports.jsxs(TableRow$1,{children:[jsxRuntime.exports.jsx(TableCell$1,Object.assign({className:e.tableCell},{children:jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.KVIpaj",defaultMessage:"Events",description:"allow-notification"})})})),jsxRuntime.exports.jsx(TableCell$1,Object.assign({align:"center",className:t},{children:jsxRuntime.exports.jsx("img",{src:img$1u,alt:"img-icon"})})),jsxRuntime.exports.jsx(TableCell$1,Object.assign({align:"center",className:i},{children:jsxRuntime.exports.jsx("img",{src:img$1t,alt:"img-icon"})})),jsxRuntime.exports.jsx(TableCell$1,Object.assign({align:"center",className:o},{children:jsxRuntime.exports.jsx("img",{src:img$1s,alt:"img-icon"})}))]})}),jsxRuntime.exports.jsx(TableBody$1,{children:null==(e=null===n||void 0===n?void 0:n.allIds)?void 0:e.map(e=>{var t;return jsxRuntime.exports.jsx(NotificationAllowRow,{allowNotificationTitle:null==(t=null===n||void 0===n?void 0:n.byId[e])?void 0:t.title,checked:null==(t=null===n||void 0===n?void 0:n.byId[e])?void 0:t.allow,allowType:null==(t=null===n||void 0===n?void 0:n.byId[e])?void 0:t.allowType,appId:r,id:e},e)})})]}))})}function NotificationApplication(e){const o=e["dataId"];var e=useStyles$1$6()["classes"];const t=useDispatch();var n=useSelector(notificationApplicationsSelector);const[r,a]=react$1.exports.useState(n),i=useSelector(notificationSelector).settings;var s=useSelector(notificationApplicationSelector(o));react$1.exports.useEffect(()=>{t(updateApplicationSetting(r))},[r]);var l=[INotificationType.EMAIL,INotificationType.NOTIFICATION_CENTER,INotificationType.BANNER];const c=[];l.forEach(t=>{-1===(null===i||void 0===i?void 0:i.allowType.findIndex(e=>e===t))&&c.push(t)});return jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs("div",Object.assign({className:e.appNoti},{children:[jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(NotificationType,{notificationTypeTitle:"Allow Notifications",allowNotification:null==n?void 0:n.byId[o].allow,allowTypes:null==(l=null==n?void 0:n.byId[o])?void 0:l.allowType,disabledTypes:c,children:jsxRuntime.exports.jsx(NotificationSettingItem,{imgSrc:(null==(e=null==n?void 0:n.byId[o])?void 0:e.iconUrl)||"",primaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.OR1ivL",defaultMessage:"{text}",description:"notification-app-id",values:{text:null==s?void 0:s.name}}),secondaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.QgzNQa",defaultMessage:"{text}",description:"notification application detail text",values:{text:null==s?void 0:s.description}}),bigSize:!0}),description:jsxRuntime.exports.jsx(Typography$1,{variant:"caption",children:"Banner previews are being set at the parent level"}),onChangeNotificationType:function(r,i){a(e=>{var t=[...e.byId[o].allowType],n=t.indexOf(r);return i&&-1===n?t.push(r):t.splice(n,1),Object.assign(Object.assign({},e),{byId:Object.assign(Object.assign({},e.byId),{[o]:Object.assign(Object.assign({},e.byId[o]),{allowType:t})})})})},onChangeAllowType:e=>{t(updateAppAllowNotification(o,e))}})}),jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(NotificationAllowTable,{action:null==(l=null==n?void 0:n.byId[o])?void 0:l.action,appId:o}),jsxRuntime.exports.jsx(Divider$1,{style:{marginBottom:20,marginTop:15}})]}),jsxRuntime.exports.jsx(CustomWorkFlow,{})]}))})}var index_esm$5=Object.freeze({__proto__:null,NotificationApplication:NotificationApplication,NotificationDetailPanel:NotificationDetailPanel,NotificationPanel:NotificationPanel,NotificationSetting:NotificationSetting,NotificationUtilityPanel:NotificationUtilityPanel,initNotificationAction:initNotificationAction,onNotificationActionClicked:onNotificationActionClicked}),REGEX=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function validate(e){return"string"==typeof e&&REGEX.test(e)}var SettingsApplications={},_interopRequireDefault$b=interopRequireDefault.exports,default_1$b=(Object.defineProperty(SettingsApplications,"__esModule",{value:!0}),SettingsApplications.default=void 0),_createSvgIcon$b=_interopRequireDefault$b(createSvgIcon$1),_jsxRuntime$b=jsxRuntime.exports,_default$b=(0,_createSvgIcon$b.default)((0,_jsxRuntime$b.jsx)("path",{d:"M12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm7-7H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-1.75 9c0 .23-.02.46-.05.68l1.48 1.16c.13.11.17.3.08.45l-1.4 2.42c-.09.15-.27.21-.43.15l-1.74-.7c-.36.28-.76.51-1.18.69l-.26 1.85c-.03.17-.18.3-.35.3h-2.8c-.17 0-.32-.13-.35-.29l-.26-1.85c-.43-.18-.82-.41-1.18-.69l-1.74.7c-.16.06-.34 0-.43-.15l-1.4-2.42c-.09-.15-.05-.34.08-.45l1.48-1.16c-.03-.23-.05-.46-.05-.69 0-.23.02-.46.05-.68l-1.48-1.16c-.13-.11-.17-.3-.08-.45l1.4-2.42c.09-.15.27-.21.43-.15l1.74.7c.36-.28.76-.51 1.18-.69l.26-1.85c.03-.17.18-.3.35-.3h2.8c.17 0 .32.13.35.29l.26 1.85c.43.18.82.41 1.18.69l1.74-.7c.16-.06.34 0 .43.15l1.4 2.42c.09.15.05.34-.08.45l-1.48 1.16c.03.23.05.46.05.69z"}),"SettingsApplications"),default_1$b=SettingsApplications.default=_default$b,Delete={},_interopRequireDefault$a=interopRequireDefault.exports,default_1$a=(Object.defineProperty(Delete,"__esModule",{value:!0}),Delete.default=void 0),_createSvgIcon$a=_interopRequireDefault$a(createSvgIcon$1),_jsxRuntime$a=jsxRuntime.exports,_default$a=(0,_createSvgIcon$a.default)((0,_jsxRuntime$a.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete"),default_1$a=Delete.default=_default$a,Help$1={},_interopRequireDefault$9=interopRequireDefault.exports,default_1$9=(Object.defineProperty(Help$1,"__esModule",{value:!0}),Help$1.default=void 0),_createSvgIcon$9=_interopRequireDefault$9(createSvgIcon$1),_jsxRuntime$9=jsxRuntime.exports,_default$9=(0,_createSvgIcon$9.default)((0,_jsxRuntime$9.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}),"Help"),default_1$9=Help$1.default=_default$9,objectProto=Object.prototype,hasOwnProperty$3=objectProto.hasOwnProperty;function baseHas$1(e,t){return null!=e&&hasOwnProperty$3.call(e,t)}var _baseHas=baseHas$1,baseHas=baseHas$1,hasPath=_hasPath;function has$1(e,t){return null!=e&&hasPath(e,t,baseHas)}var has_1=has$1;const protocols=["http","https","mailto","tel"];function uriTransformer(e){var t=(e||"").trim(),e=t.charAt(0);if("#"===e||"/"===e)return t;var n=t.indexOf(":");if(-1===n)return t;let r=-1;for(;++r<protocols.length;){var i=protocols[r];if(n===i.length&&t.slice(0,i.length).toLowerCase()===i)return t}return-1!==(r=t.indexOf("?"))&&n>r||-1!==(r=t.indexOf("#"))&&n>r?t:"javascript:void(0)"}var isBuffer=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)};function stringifyPosition$2(e){return e&&"object"==typeof e?"position"in e||"type"in e?position$3(e.position):"start"in e||"end"in e?position$3(e):"line"in e||"column"in e?point$4(e):"":""}function point$4(e){return index$4(e&&e.line)+":"+index$4(e&&e.column)}function position$3(e){return point$4(e&&e.start)+"-"+point$4(e&&e.end)}function index$4(e){return e&&"number"==typeof e?e:1}class VFileMessage$1 extends Error{constructor(e,t,n){var r,i=[null,null];let o={start:{line:null,column:null},end:{line:null,column:null}};super(),"string"==typeof t&&(n=t,t=void 0),"string"==typeof n&&(-1===(r=n.indexOf(":"))?i[1]=n:(i[0]=n.slice(0,r),i[1]=n.slice(r+1))),t&&("type"in t||"position"in t?t.position&&(o=t.position):"start"in t||"end"in t?o=t:("line"in t||"column"in t)&&(o.start=t)),this.name=stringifyPosition$2(t)||"1:1",this.message="object"==typeof e?e.message:e,this.stack="","object"==typeof e&&e.stack&&(this.stack=e.stack),this.reason=this.message,this.fatal,this.line=o.start.line,this.column=o.start.column,this.position=o,this.source=i[0],this.ruleId=i[1],this.file,this.actual,this.expected,this.url,this.note}}VFileMessage$1.prototype.file="",VFileMessage$1.prototype.name="",VFileMessage$1.prototype.reason="",VFileMessage$1.prototype.message="",VFileMessage$1.prototype.stack="",VFileMessage$1.prototype.fatal=null,VFileMessage$1.prototype.column=null,VFileMessage$1.prototype.line=null,VFileMessage$1.prototype.source=null,VFileMessage$1.prototype.ruleId=null,VFileMessage$1.prototype.position=null;const path$1={basename:basename$1,dirname:dirname$1,extname:extname$1,join:join$1,sep:"/"};function basename$1(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');assertPath$3(e);let n=0,r=-1,i=e.length,o;if(void 0===t||0===t.length||t.length>e.length){for(;i--;)if(47===e.charCodeAt(i)){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;i--;)if(47===e.charCodeAt(i)){if(o){n=i+1;break}}else a<0&&(o=!0,a=i+1),-1<s&&(e.charCodeAt(i)===t.charCodeAt(s--)?s<0&&(r=i):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function dirname$1(e){if(assertPath$3(e),0===e.length)return".";let t=-1,n=e.length,r;for(;--n;)if(47===e.charCodeAt(n)){if(r){t=n;break}}else r=r||!0;return t<0?47===e.charCodeAt(0)?"/":".":1===t&&47===e.charCodeAt(0)?"//":e.slice(0,t)}function extname$1(e){assertPath$3(e);let t=e.length,n=-1,r=0,i=-1,o=0,a;for(;t--;){var s=e.charCodeAt(t);if(47===s){if(a){r=t+1;break}}else n<0&&(a=!0,n=t+1),46===s?i<0?i=t:1!==o&&(o=1):-1<i&&(o=-1)}return i<0||n<0||0===o||1===o&&i===n-1&&i===r+1?"":e.slice(i,n)}function join$1(...e){let t=-1,n;for(;++t<e.length;)assertPath$3(e[t]),e[t]&&(n=void 0===n?e[t]:n+"/"+e[t]);return void 0===n?".":normalize$3(n)}function normalize$3(e){assertPath$3(e);var t=47===e.charCodeAt(0);let n=normalizeString$1(e,!t);return 0<(n=0!==n.length||t?n:".").length&&47===e.charCodeAt(e.length-1)&&(n+="/"),t?"/"+n:n}function normalizeString$1(e,t){let n="",r=0,i=-1,o=0,a=-1,s;for(var l;++a<=e.length;){if(a<e.length)s=e.charCodeAt(a);else{if(47===s)break;s=47}if(47===s){if(i!==a-1&&1!==o)if(i!==a-1&&2===o){if(n.length<2||2!==r||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(2<n.length){if((l=n.lastIndexOf("/"))!==n.length-1){r=l<0?(n="",0):(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),i=a,o=0;continue}}else if(0<n.length){n="",r=0,i=a,o=0;continue}t&&(n=0<n.length?n+"/..":"..",r=2)}else 0<n.length?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,o=0}else 46===s&&-1<o?o++:o=-1}return n}function assertPath$3(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const proc$1={cwd:cwd$1};function cwd$1(){return"/"}function isUrl$1(e){return null!==e&&"object"==typeof e&&e.href&&e.origin}function urlToPath$1(e){var t;if("string"==typeof e)e=new URL(e);else if(!isUrl$1(e))throw(t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`")).code="ERR_INVALID_ARG_TYPE",t;if("file:"!==e.protocol)throw(t=new TypeError("The URL must be of scheme file")).code="ERR_INVALID_URL_SCHEME",t;return getPathFromURLPosix$1(e)}function getPathFromURLPosix$1(e){var t;if(""!==e.hostname)throw(t=new TypeError('File URL host must be "localhost" or empty on darwin')).code="ERR_INVALID_FILE_URL_HOST",t;var n=e.pathname;let r=-1;for(;++r<n.length;)if(37===n.charCodeAt(r)&&50===n.charCodeAt(r+1)){var i=n.charCodeAt(r+2);if(70===i||102===i)throw(i=new TypeError("File URL path must not include encoded / characters")).code="ERR_INVALID_FILE_URL_PATH",i}return decodeURIComponent(n)}const order$1=["history","path","basename","stem","extname","dirname"];class VFile$1{constructor(e){let t,n=(t=e?"string"==typeof e||buffer$1(e)?{value:e}:isUrl$1(e)?{path:e}:e:{},this.data={},this.messages=[],this.history=[],this.cwd=proc$1.cwd(),this.value,this.stored,this.result,this.map,-1);for(;++n<order$1.length;){const r=order$1[n];r in t&&void 0!==t[r]&&null!==t[r]&&(this[r]="history"===r?[...t[r]]:t[r])}let r;for(r in t)order$1.includes(r)||(this[r]=t[r])}get path(){return this.history[this.history.length-1]}set path(e){assertNonEmpty$1(e=isUrl$1(e)?urlToPath$1(e):e,"path"),this.path!==e&&this.history.push(e)}get dirname(){return"string"==typeof this.path?path$1.dirname(this.path):void 0}set dirname(e){assertPath$2(this.basename,"dirname"),this.path=path$1.join(e||"",this.basename)}get basename(){return"string"==typeof this.path?path$1.basename(this.path):void 0}set basename(e){assertNonEmpty$1(e,"basename"),assertPart$1(e,"basename"),this.path=path$1.join(this.dirname||"",e)}get extname(){return"string"==typeof this.path?path$1.extname(this.path):void 0}set extname(e){if(assertPart$1(e,"extname"),assertPath$2(this.dirname,"extname"),e){if(46!==e.charCodeAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=path$1.join(this.dirname,this.stem+(e||""))}get stem(){return"string"==typeof this.path?path$1.basename(this.path,this.extname):void 0}set stem(e){assertNonEmpty$1(e,"stem"),assertPart$1(e,"stem"),this.path=path$1.join(this.dirname||"",e+(this.extname||""))}toString(e){return(this.value||"").toString(e||void 0)}message(e,t,n){e=new VFileMessage$1(e,t,n);return this.path&&(e.name=this.path+":"+e.name,e.file=this.path),e.fatal=!1,this.messages.push(e),e}info(e,t,n){e=this.message(e,t,n);return e.fatal=null,e}fail(e,t,n){e=this.message(e,t,n);throw e.fatal=!0,e}}function assertPart$1(e,t){if(e&&e.includes(path$1.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+path$1.sep+"`")}function assertNonEmpty$1(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function assertPath$2(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function buffer$1(e){return isBuffer(e)}function bail(e){if(e)throw e}var hasOwn$a=Object.prototype.hasOwnProperty,toStr=Object.prototype.toString,defineProperty$6=Object.defineProperty,gOPD=Object.getOwnPropertyDescriptor,isArray=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===toStr.call(e)},isPlainObject$2=function(e){if(!e||"[object Object]"!==toStr.call(e))return!1;var t,n=hasOwn$a.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&hasOwn$a.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||hasOwn$a.call(e,t)},setProperty=function(e,t){defineProperty$6&&"__proto__"===t.name?defineProperty$6(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},getProperty=function(e,t){if("__proto__"===t){if(!hasOwn$a.call(e,t))return;if(gOPD)return gOPD(e,t).value}return e[t]},extend=function e(){var t,n,r,i,o,a=arguments[0],s=1,l=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[1]||{},s=2),(null==a||"object"!=typeof a&&"function"!=typeof a)&&(a={});s<l;++s)if(null!=(t=arguments[s]))for(n in t)o=getProperty(a,n),a!==(r=getProperty(t,n))&&(c&&r&&(isPlainObject$2(r)||(i=isArray(r)))?(o=i?(i=!1,o&&isArray(o)?o:[]):o&&isPlainObject$2(o)?o:{},setProperty(a,{name:n,newValue:e(c,o,r)})):void 0!==r&&setProperty(a,{name:n,newValue:r}));return a};function isPlainObject$1(e){var t;return"object"==typeof e&&null!==e&&!(null!==(t=Object.getPrototypeOf(e))&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function trough(){const l=[],t={run:function(...o){let a=-1;const s=o.pop();if("function"!=typeof s)throw new TypeError("Expected function as last argument, not "+s);!function e(t,...n){var r=l[++a];let i=-1;if(t)s(t);else{for(;++i<o.length;)null!==n[i]&&void 0!==n[i]||(n[i]=o[i]);o=n,r?wrap$1(r,e)(...n):s(null,...n)}}(null,...o)},use:function(e){if("function"==typeof e)return l.push(e),t;throw new TypeError("Expected `middelware` to be a function, not "+e)}};return t}function wrap$1(r,n){let i;return function(...t){var n=r.length>t.length;let e;n&&t.push(o);try{e=r.apply(this,t)}catch(e){t=e;if(n&&i)throw t;return o(t)}n||(e instanceof Promise?e.then(a,o):(e instanceof Error?o:a)(e))};function o(e,...t){i||(i=!0,n(e,...t))}function a(e){o(null,e)}}function stringifyPosition$1(e){return e&&"object"==typeof e?"position"in e||"type"in e?position$2(e.position):"start"in e||"end"in e?position$2(e):"line"in e||"column"in e?point$3(e):"":""}function point$3(e){return index$3(e&&e.line)+":"+index$3(e&&e.column)}function position$2(e){return point$3(e&&e.start)+"-"+point$3(e&&e.end)}function index$3(e){return e&&"number"==typeof e?e:1}class VFileMessage extends Error{constructor(e,t,n){var r,i=[null,null];let o={start:{line:null,column:null},end:{line:null,column:null}};super(),"string"==typeof t&&(n=t,t=void 0),"string"==typeof n&&(-1===(r=n.indexOf(":"))?i[1]=n:(i[0]=n.slice(0,r),i[1]=n.slice(r+1))),t&&("type"in t||"position"in t?t.position&&(o=t.position):"start"in t||"end"in t?o=t:("line"in t||"column"in t)&&(o.start=t)),this.name=stringifyPosition$1(t)||"1:1",this.message="object"==typeof e?e.message:e,this.stack="","object"==typeof e&&e.stack&&(this.stack=e.stack),this.reason=this.message,this.fatal,this.line=o.start.line,this.column=o.start.column,this.position=o,this.source=i[0],this.ruleId=i[1],this.file,this.actual,this.expected,this.url,this.note}}VFileMessage.prototype.file="",VFileMessage.prototype.name="",VFileMessage.prototype.reason="",VFileMessage.prototype.message="",VFileMessage.prototype.stack="",VFileMessage.prototype.fatal=null,VFileMessage.prototype.column=null,VFileMessage.prototype.line=null,VFileMessage.prototype.source=null,VFileMessage.prototype.ruleId=null,VFileMessage.prototype.position=null;const path={basename:basename,dirname:dirname,extname:extname,join:join,sep:"/"};function basename(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');assertPath$1(e);let n=0,r=-1,i=e.length,o;if(void 0===t||0===t.length||t.length>e.length){for(;i--;)if(47===e.charCodeAt(i)){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;i--;)if(47===e.charCodeAt(i)){if(o){n=i+1;break}}else a<0&&(o=!0,a=i+1),-1<s&&(e.charCodeAt(i)===t.charCodeAt(s--)?s<0&&(r=i):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function dirname(e){if(assertPath$1(e),0===e.length)return".";let t=-1,n=e.length,r;for(;--n;)if(47===e.charCodeAt(n)){if(r){t=n;break}}else r=r||!0;return t<0?47===e.charCodeAt(0)?"/":".":1===t&&47===e.charCodeAt(0)?"//":e.slice(0,t)}function extname(e){assertPath$1(e);let t=e.length,n=-1,r=0,i=-1,o=0,a;for(;t--;){var s=e.charCodeAt(t);if(47===s){if(a){r=t+1;break}}else n<0&&(a=!0,n=t+1),46===s?i<0?i=t:1!==o&&(o=1):-1<i&&(o=-1)}return i<0||n<0||0===o||1===o&&i===n-1&&i===r+1?"":e.slice(i,n)}function join(...e){let t=-1,n;for(;++t<e.length;)assertPath$1(e[t]),e[t]&&(n=void 0===n?e[t]:n+"/"+e[t]);return void 0===n?".":normalize$2(n)}function normalize$2(e){assertPath$1(e);var t=47===e.charCodeAt(0);let n=normalizeString(e,!t);return 0<(n=0!==n.length||t?n:".").length&&47===e.charCodeAt(e.length-1)&&(n+="/"),t?"/"+n:n}function normalizeString(e,t){let n="",r=0,i=-1,o=0,a=-1,s;for(var l;++a<=e.length;){if(a<e.length)s=e.charCodeAt(a);else{if(47===s)break;s=47}if(47===s){if(i!==a-1&&1!==o)if(i!==a-1&&2===o){if(n.length<2||2!==r||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(2<n.length){if((l=n.lastIndexOf("/"))!==n.length-1){r=l<0?(n="",0):(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),i=a,o=0;continue}}else if(0<n.length){n="",r=0,i=a,o=0;continue}t&&(n=0<n.length?n+"/..":"..",r=2)}else 0<n.length?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,o=0}else 46===s&&-1<o?o++:o=-1}return n}function assertPath$1(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const proc={cwd:cwd};function cwd(){return"/"}function isUrl(e){return null!==e&&"object"==typeof e&&e.href&&e.origin}function urlToPath(e){var t;if("string"==typeof e)e=new URL(e);else if(!isUrl(e))throw(t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`")).code="ERR_INVALID_ARG_TYPE",t;if("file:"!==e.protocol)throw(t=new TypeError("The URL must be of scheme file")).code="ERR_INVALID_URL_SCHEME",t;return getPathFromURLPosix(e)}function getPathFromURLPosix(e){var t;if(""!==e.hostname)throw(t=new TypeError('File URL host must be "localhost" or empty on darwin')).code="ERR_INVALID_FILE_URL_HOST",t;var n=e.pathname;let r=-1;for(;++r<n.length;)if(37===n.charCodeAt(r)&&50===n.charCodeAt(r+1)){var i=n.charCodeAt(r+2);if(70===i||102===i)throw(i=new TypeError("File URL path must not include encoded / characters")).code="ERR_INVALID_FILE_URL_PATH",i}return decodeURIComponent(n)}const order=["history","path","basename","stem","extname","dirname"];class VFile{constructor(e){let t,n=(t=e?"string"==typeof e||buffer(e)?{value:e}:isUrl(e)?{path:e}:e:{},this.data={},this.messages=[],this.history=[],this.cwd=proc.cwd(),this.value,this.stored,this.result,this.map,-1);for(;++n<order.length;){const r=order[n];r in t&&void 0!==t[r]&&null!==t[r]&&(this[r]="history"===r?[...t[r]]:t[r])}let r;for(r in t)order.includes(r)||(this[r]=t[r])}get path(){return this.history[this.history.length-1]}set path(e){assertNonEmpty(e=isUrl(e)?urlToPath(e):e,"path"),this.path!==e&&this.history.push(e)}get dirname(){return"string"==typeof this.path?path.dirname(this.path):void 0}set dirname(e){assertPath(this.basename,"dirname"),this.path=path.join(e||"",this.basename)}get basename(){return"string"==typeof this.path?path.basename(this.path):void 0}set basename(e){assertNonEmpty(e,"basename"),assertPart(e,"basename"),this.path=path.join(this.dirname||"",e)}get extname(){return"string"==typeof this.path?path.extname(this.path):void 0}set extname(e){if(assertPart(e,"extname"),assertPath(this.dirname,"extname"),e){if(46!==e.charCodeAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=path.join(this.dirname,this.stem+(e||""))}get stem(){return"string"==typeof this.path?path.basename(this.path,this.extname):void 0}set stem(e){assertNonEmpty(e,"stem"),assertPart(e,"stem"),this.path=path.join(this.dirname||"",e+(this.extname||""))}toString(e){return(this.value||"").toString(e||void 0)}message(e,t,n){e=new VFileMessage(e,t,n);return this.path&&(e.name=this.path+":"+e.name,e.file=this.path),e.fatal=!1,this.messages.push(e),e}info(e,t,n){e=this.message(e,t,n);return e.fatal=null,e}fail(e,t,n){e=this.message(e,t,n);throw e.fatal=!0,e}}function assertPart(e,t){if(e&&e.includes(path.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+path.sep+"`")}function assertNonEmpty(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function assertPath(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function buffer(e){return isBuffer(e)}const unified=base().freeze(),own$7={}.hasOwnProperty;function base(){const n=trough(),i=[];let o={},l,r=-1;return c.data=function(e,t){if("string"==typeof e)return 2===arguments.length?(assertUnfrozen("data",l),o[e]=t,c):own$7.call(o,e)&&o[e]||null;if(e)return assertUnfrozen("data",l),o=e,c;return o},c.Parser=void 0,c.Compiler=void 0,c.freeze=function(){if(!l){for(;++r<i.length;){var[e,...t]=i[r];!1!==t[0]&&(!0===t[0]&&(t[0]=void 0),"function"==typeof(e=e.call(c,...t)))&&n.use(e)}l=!0,r=Number.POSITIVE_INFINITY}return c},c.attachers=i,c.use=function(e,...t){let n;if(assertUnfrozen("use",l),null!=e)if("function"==typeof e)s(e,...t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");(Array.isArray(e)?r:a)(e)}n&&(o.settings=Object.assign(o.settings||{},n));return c;function a(e){r(e.plugins),e.settings&&(n=Object.assign(n||{},e.settings))}function r(e){let t=-1;if(null!=e){if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){var n,r,i=e[t],o=(r=n=o=void 0,i);if("function"==typeof o)s(o);else{if("object"!=typeof o)throw new TypeError("Expected usable value, not `"+o+"`");Array.isArray(o)?([n,...r]=o,s(n,...r)):a(o)}}}}function s(e,t){let n=-1,r;for(;++n<i.length;)if(i[n][0]===e){r=i[n];break}r?(isPlainObject$1(r[1])&&isPlainObject$1(t)&&(t=extend(!0,r[1],t)),r[1]=t):i.push([...arguments])}},c.parse=function(e){c.freeze();var e=vfile(e),t=c.Parser;if(assertParser("parse",t),newable(t,"parse"))return new t(String(e),e).parse();return t(String(e),e)},c.stringify=function(e,t){c.freeze();var t=vfile(t),n=c.Compiler;if(assertCompiler("stringify",n),assertNode(e),newable(n,"compile"))return new n(e,t).compile();return n(e,t)},c.run=function(o,e,a){assertNode(o),c.freeze(),a||"function"!=typeof e||(a=e,e=void 0);if(!a)return new Promise(t);function t(r,i){n.run(o,vfile(e),function(e,t,n){t=t||o,e?i(e):r?r(t):a(null,t,n)})}t(null,a)},c.runSync=function(e,t){let n,r;return c.run(e,t,function(e,t){bail(e),n=t,r=!0}),assertDone("runSync","run",r),n},c.process=function(t,o){if(c.freeze(),assertParser("process",c.Parser),assertCompiler("process",c.Compiler),!o)return new Promise(e);function e(n,r){var e=vfile(t);function i(e,t){e||!t?r(e):n?n(t):o(null,t)}c.run(c.parse(e),e,(e,t,n)=>{!e&&t&&n?(null!=(t=c.stringify(t,n))&&(looksLikeAVFileValue(t)?n.value=t:n.result=t),i(e,n)):i(e)})}e(null,o)},c.processSync=function(e){let t;c.freeze(),assertParser("processSync",c.Parser),assertCompiler("processSync",c.Compiler);e=vfile(e);return c.process(e,function(e){t=!0,bail(e)}),assertDone("processSync","process",t),e},c;function c(){var e=base();let t=-1;for(;++t<i.length;)e.use(...i[t]);return e.data(extend(!0,{},o)),e}}function newable(e,t){return"function"==typeof e&&e.prototype&&(keys$2(e.prototype)||t in e.prototype)}function keys$2(e){let t;for(t in e)if(own$7.call(e,t))return!0;return!1}function assertParser(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Parser`")}function assertCompiler(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Compiler`")}function assertUnfrozen(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function assertNode(e){if(!isPlainObject$1(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function assertDone(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function vfile(e){return looksLikeAVFile(e)?e:new VFile(e)}function looksLikeAVFile(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}function looksLikeAVFileValue(e){return"string"==typeof e||isBuffer(e)}function toString$4(e,t){t=(t||{}).includeImageAlt;return one$1(e,"boolean"!=typeof t||t)}function one$1(e,t){return node$1(e)&&("value"in e&&e.value||t&&"alt"in e&&e.alt||"children"in e&&all$1(e.children,t))||Array.isArray(e)&&all$1(e,t)||""}function all$1(e,t){var n=[];let r=-1;for(;++r<e.length;)n[r]=one$1(e[r],t);return n.join("")}function node$1(e){return Boolean(e&&"object"==typeof e)}function splice(e,t,n,r){var i=e.length;let o=0,a;if(t=t<0?i<-t?0:i+t:i<t?i:t,n=0<n?n:0,r.length<1e4)(a=Array.from(r)).unshift(t,n),[].splice.apply(e,a);else for(n&&[].splice.apply(e,[t,n]);o<r.length;)(a=r.slice(o,o+1e4)).unshift(t,0),[].splice.apply(e,a),o+=1e4,t+=1e4}function push$1(e,t){return 0<e.length?(splice(e,e.length,0,t),e):t}const hasOwnProperty$2={}.hasOwnProperty;function combineExtensions(e){var t={};let n=-1;for(;++n<e.length;)syntaxExtension(t,e[n]);return t}function syntaxExtension(t,n){let r;for(r in n){var i=(hasOwnProperty$2.call(t,r)?t[r]:void 0)||(t[r]={}),o=n[r];let e;for(e in o){hasOwnProperty$2.call(i,e)||(i[e]=[]);var a=o[e];constructs(i[e],Array.isArray(a)?a:a?[a]:[])}}}function constructs(e,t){let n=-1;for(var r=[];++n<t.length;)("after"===t[n].add?e:r).push(t[n]);splice(e,0,0,r)}const unicodePunctuationRegex=/[!-/:-@[-`{-~\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,asciiAlpha=regexCheck(/[A-Za-z]/),asciiDigit=regexCheck(/\d/),asciiHexDigit=regexCheck(/[\dA-Fa-f]/),asciiAlphanumeric=regexCheck(/[\dA-Za-z]/),asciiPunctuation=regexCheck(/[!-/:-@[-`{-~]/),asciiAtext=regexCheck(/[#-'*+\--9=?A-Z^-~]/);function asciiControl(e){return null!==e&&(e<32||127===e)}function markdownLineEndingOrSpace(e){return null!==e&&(e<0||32===e)}function markdownLineEnding(e){return null!==e&&e<-2}function markdownSpace(e){return-2===e||-1===e||32===e}const unicodeWhitespace=regexCheck(/\s/),unicodePunctuation=regexCheck(unicodePunctuationRegex);function regexCheck(t){return function(e){return null!==e&&t.test(String.fromCharCode(e))}}function factorySpace(t,n,r,e){const i=e?e-1:Number.POSITIVE_INFINITY;let o=0;return function(e){if(markdownSpace(e))return t.enter(r),a(e);return n(e)};function a(e){return markdownSpace(e)&&o++<i?(t.consume(e),a):(t.exit(r),n(e))}}const content$1={tokenize:initializeContent};function initializeContent(n){const t=n.attempt(this.parser.constructs.contentInitial,function(e){if(null!==e)return n.enter("lineEnding"),n.consume(e),n.exit("lineEnding"),factorySpace(n,t,"linePrefix");n.consume(e)},function(e){return n.enter("paragraph"),i(e)});let r;return t;function i(e){var t=n.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=t),r=t,o(e)}function o(e){if(null!==e)return markdownLineEnding(e)?(n.consume(e),n.exit("chunkText"),i):(n.consume(e),o);n.exit("chunkText"),n.exit("paragraph"),n.consume(e)}}const document$5={tokenize:initializeDocument},containerConstruct={tokenize:tokenizeContainer};function initializeDocument(r){const o=this,i=[];let a=0,s,n,l;return t;function t(e){var t;return(a<i.length?(t=i[a],o.containerState=t[1],r.attempt(t[0].continuation,c,u)):u)(e)}function c(r){if(a++,o.containerState._closeFlow){o.containerState._closeFlow=void 0,s&&x();var i=o.events.length;let e=i,t;for(;e--;)if("exit"===o.events[e][0]&&"chunkFlow"===o.events[e][1].type){t=o.events[e][1].end;break}v(a);let n=i;for(;n<o.events.length;)o.events[n][1].end=Object.assign({},t),n++;return splice(o.events,e+1,0,o.events.slice(i)),o.events.length=n,u(r)}return t(r)}function u(e){if(a===i.length){if(!s)return f(e);if(s.currentConstruct&&s.currentConstruct.concrete)return m(e);o.interrupt=Boolean(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return o.containerState={},r.check(containerConstruct,d,p)(e)}function d(e){return s&&x(),v(a),f(e)}function p(e){return o.parser.lazy[o.now().line]=a!==i.length,l=o.now().offset,m(e)}function f(e){return o.containerState={},r.attempt(containerConstruct,h,m)(e)}function h(e){return a++,i.push([o.currentConstruct,o.containerState]),f(e)}function m(e){if(null!==e)return s=s||o.parser.flow(o.now()),r.enter("chunkFlow",{contentType:"flow",previous:n,_tokenizer:s}),g(e);s&&x(),v(0),r.consume(e)}function g(e){if(null!==e)return markdownLineEnding(e)?(r.consume(e),y(r.exit("chunkFlow")),a=0,o.interrupt=void 0,t):(r.consume(e),g);y(r.exit("chunkFlow"),!0),v(0),r.consume(e)}function y(e,i){var t=o.sliceStream(e);if(i&&t.push(null),(e.previous=n)&&(n.next=e),n=e,s.defineSkip(e.start),s.write(t),o.parser.lazy[e.start.line]){let e=s.events.length;for(;e--;)if(s.events[e][1].start.offset<l&&(!s.events[e][1].end||s.events[e][1].end.offset>l))return;i=o.events.length;let t=i,n,r;for(;t--;)if("exit"===o.events[t][0]&&"chunkFlow"===o.events[t][1].type){if(n){r=o.events[t][1].end;break}n=!0}for(v(a),e=i;e<o.events.length;)o.events[e][1].end=Object.assign({},r),e++;splice(o.events,t+1,0,o.events.slice(i)),o.events.length=e}}function v(e){let t=i.length;for(;t-- >e;){var n=i[t];o.containerState=n[1],n[0].exit.call(o,r)}i.length=e}function x(){s.write([null]),n=void 0,s=void 0,o.containerState._closeFlow=void 0}}function tokenizeContainer(e,t,n){return factorySpace(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function classifyCharacter(e){return null===e||markdownLineEndingOrSpace(e)||unicodeWhitespace(e)?1:unicodePunctuation(e)?2:void 0}function resolveAll(e,t,n){var r=[];let i=-1;for(;++i<e.length;){var o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const attention={name:"attention",tokenize:tokenizeAttention,resolveAll:resolveAllAttention};function resolveAllAttention(e,t){let n=-1,r;var i;let o,a;for(;++n<e.length;)if("enter"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._close)for(r=n;r--;)if("exit"===e[r][0]&&"attentionSequence"===e[r][1].type&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)&&(!((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3)||(e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3)){var s=1<e[r][1].end.offset-e[r][1].start.offset&&1<e[n][1].end.offset-e[n][1].start.offset?2:1,l=Object.assign({},e[r][1].end),c=Object.assign({},e[n][1].start);movePoint(l,-s),movePoint(c,s),l={type:1<s?"strongSequence":"emphasisSequence",start:l,end:Object.assign({},e[r][1].end)},c={type:1<s?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:c},i={type:1<s?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},s={type:1<s?"strong":"emphasis",start:Object.assign({},l.start),end:Object.assign({},c.end)},e[r][1].end=Object.assign({},l.start),e[n][1].start=Object.assign({},c.end),o=[],e[r][1].end.offset-e[r][1].start.offset&&(o=push$1(o,[["enter",e[r][1],t],["exit",e[r][1],t]])),o=push$1(o,[["enter",s,t],["enter",l,t],["exit",l,t],["enter",i,t]]),o=push$1(o,resolveAll(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),o=push$1(o,[["exit",i,t],["enter",c,t],["exit",c,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(a=2,o=push$1(o,[["enter",e[n][1],t],["exit",e[n][1],t]])):a=0,splice(e,r-1,n-r+3,o),n=r+o.length-a-2;break}for(n=-1;++n<e.length;)"attentionSequence"===e[n][1].type&&(e[n][1].type="data");return e}function tokenizeAttention(o,a){const s=this.parser.constructs.attentionMarkers.null,l=this.previous,c=classifyCharacter(l);let u;return function(e){return o.enter("attentionSequence"),d(u=e)};function d(e){var t,n,r,i;return e===u?(o.consume(e),d):(t=o.exit("attentionSequence"),r=!(n=classifyCharacter(e))||2===n&&c||s.includes(e),i=!c||2===c&&n||s.includes(l),t._open=Boolean(42===u?r:r&&(c||!i)),t._close=Boolean(42===u?i:i&&(n||!r)),a(e))}}function movePoint(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const autolink={name:"autolink",tokenize:tokenizeAutolink};function tokenizeAutolink(t,n,r){let i=1;return function(e){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(e),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),o};function o(e){return asciiAlpha(e)?(t.consume(e),a):(asciiAtext(e)?c:r)(e)}function a(e){return(43===e||45===e||46===e||asciiAlphanumeric(e)?s:c)(e)}function s(e){return 58===e?(t.consume(e),l):(43===e||45===e||46===e||asciiAlphanumeric(e))&&i++<32?(t.consume(e),s):c(e)}function l(e){return 62===e?(t.exit("autolinkProtocol"),f(e)):null===e||32===e||60===e||asciiControl(e)?r(e):(t.consume(e),l)}function c(e){return 64===e?(t.consume(e),i=0,u):asciiAtext(e)?(t.consume(e),c):r(e)}function u(e){return(asciiAlphanumeric(e)?d:r)(e)}function d(e){return 46===e?(t.consume(e),i=0,u):(62===e?(t.exit("autolinkProtocol").type="autolinkEmail",f):p)(e)}function p(e){return(45===e||asciiAlphanumeric(e))&&i++<63?(t.consume(e),45===e?p:d):r(e)}function f(e){return t.enter("autolinkMarker"),t.consume(e),t.exit("autolinkMarker"),t.exit("autolink"),n}}const blankLine={tokenize:tokenizeBlankLine,partial:!0};function tokenizeBlankLine(e,t,n){return factorySpace(e,function(e){return(null===e||markdownLineEnding(e)?t:n)(e)},"linePrefix")}const blockQuote={name:"blockQuote",tokenize:tokenizeBlockQuoteStart,continuation:{tokenize:tokenizeBlockQuoteContinuation},exit:exit};function tokenizeBlockQuoteStart(n,t,r){const i=this;return function(e){if(62!==e)return r(e);{var t=i.containerState;return t.open||(n.enter("blockQuote",{_container:!0}),t.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(e),n.exit("blockQuoteMarker"),o}};function o(e){return markdownSpace(e)?(n.enter("blockQuotePrefixWhitespace"),n.consume(e),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),t):(n.exit("blockQuotePrefix"),t(e))}}function tokenizeBlockQuoteContinuation(e,t,n){return factorySpace(e,e.attempt(blockQuote,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function exit(e){e.exit("blockQuote")}const characterEscape={name:"characterEscape",tokenize:tokenizeCharacterEscape};function tokenizeCharacterEscape(t,n,r){return function(e){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(e),t.exit("escapeMarker"),i};function i(e){return asciiPunctuation(e)?(t.enter("characterEscapeValue"),t.consume(e),t.exit("characterEscapeValue"),t.exit("characterEscape"),n):r(e)}}const element=document.createElement("i");function decodeNamedCharacterReference(e){var t="&"+e+";",n=(element.innerHTML=t,element.textContent);return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}const characterReference={name:"characterReference",tokenize:tokenizeCharacterReference};function tokenizeCharacterReference(n,r,i){const o=this;let a=0,s,l;return function(e){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(e),n.exit("characterReferenceMarker"),t};function t(e){return 35===e?(n.enter("characterReferenceMarkerNumeric"),n.consume(e),n.exit("characterReferenceMarkerNumeric"),c):(n.enter("characterReferenceValue"),s=31,l=asciiAlphanumeric,u(e))}function c(e){return 88===e||120===e?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(e),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),s=6,l=asciiHexDigit,u):(n.enter("characterReferenceValue"),s=7,l=asciiDigit,u(e))}function u(e){var t;return 59===e&&a?(t=n.exit("characterReferenceValue"),l!==asciiAlphanumeric||decodeNamedCharacterReference(o.sliceSerialize(t))?(n.enter("characterReferenceMarker"),n.consume(e),n.exit("characterReferenceMarker"),n.exit("characterReference"),r):i(e)):l(e)&&a++<s?(n.consume(e),u):i(e)}}const codeFenced={name:"codeFenced",tokenize:tokenizeCodeFenced,concrete:!0};function tokenizeCodeFenced(t,n,r){const i=this,o={tokenize:function(t,n,r){let i=0;return factorySpace(t,function(e){return t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),o(e)},"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function o(e){return e===c?(t.consume(e),i++,o):(i<l?r:(t.exit("codeFencedFenceSequence"),factorySpace(t,a,"whitespace")))(e)}function a(e){return(null===e||markdownLineEnding(e)?(t.exit("codeFencedFence"),n):r)(e)}},partial:!0},a={tokenize:function(t,n,r){const i=this;return function(e){return t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),o};function o(e){return(i.parser.lazy[i.now().line]?r:n)(e)}},partial:!0};var e=this.events[this.events.length-1];const s=e&&"linePrefix"===e[1].type?e[2].sliceSerialize(e[1],!0).length:0;let l=0,c;return function(e){return t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),u(c=e)};function u(e){return e===c?(t.consume(e),l++,u):(t.exit("codeFencedFenceSequence"),(l<3?r:factorySpace(t,d,"whitespace"))(e))}function d(e){return(null===e||markdownLineEnding(e)?m:(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),p))(e)}function p(e){return null===e||markdownLineEndingOrSpace(e)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),factorySpace(t,f,"whitespace")(e)):96===e&&e===c?r(e):(t.consume(e),p)}function f(e){return(null===e||markdownLineEnding(e)?m:(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),h))(e)}function h(e){return null===e||markdownLineEnding(e)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),m(e)):96===e&&e===c?r(e):(t.consume(e),h)}function m(e){return t.exit("codeFencedFence"),(i.interrupt?n:g)(e)}function g(e){return(null===e?v:markdownLineEnding(e)?t.attempt(a,t.attempt(o,v,s?factorySpace(t,g,"linePrefix",s+1):g),v):(t.enter("codeFlowValue"),y))(e)}function y(e){return null===e||markdownLineEnding(e)?(t.exit("codeFlowValue"),g(e)):(t.consume(e),y)}function v(e){return t.exit("codeFenced"),n(e)}}const codeIndented={name:"codeIndented",tokenize:tokenizeCodeIndented},indentedContent={tokenize:tokenizeIndentedContent,partial:!0};function tokenizeCodeIndented(t,n,r){const i=this;return function(e){return t.enter("codeIndented"),factorySpace(t,o,"linePrefix",5)(e)};function o(e){var t=i.events[i.events.length-1];return(t&&"linePrefix"===t[1].type&&4<=t[2].sliceSerialize(t[1],!0).length?a:r)(e)}function a(e){return(null===e?l:markdownLineEnding(e)?t.attempt(indentedContent,a,l):(t.enter("codeFlowValue"),s))(e)}function s(e){return null===e||markdownLineEnding(e)?(t.exit("codeFlowValue"),a(e)):(t.consume(e),s)}function l(e){return t.exit("codeIndented"),n(e)}}function tokenizeIndentedContent(t,n,r){const i=this;return o;function o(e){return i.parser.lazy[i.now().line]?r(e):markdownLineEnding(e)?(t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),o):factorySpace(t,a,"linePrefix",5)(e)}function a(e){var t=i.events[i.events.length-1];return(t&&"linePrefix"===t[1].type&&4<=t[2].sliceSerialize(t[1],!0).length?n:markdownLineEnding(e)?o:r)(e)}}const codeText={name:"codeText",tokenize:tokenizeCodeText,resolve:resolveCodeText,previous:previous};function resolveCodeText(e){let t=e.length-4,n=3,r,i;if(!("lineEnding"!==e[n][1].type&&"space"!==e[n][1].type||"lineEnding"!==e[t][1].type&&"space"!==e[t][1].type))for(r=n;++r<t;)if("codeTextData"===e[r][1].type){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}for(r=n-1,t++;++r<=t;)void 0===i?r!==t&&"lineEnding"!==e[r][1].type&&(i=r):r!==t&&"lineEnding"!==e[r][1].type||(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function previous(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}function tokenizeCodeText(t,n,r){let i=0,o,a;return function(e){return t.enter("codeText"),t.enter("codeTextSequence"),s(e)};function s(e){return 96===e?(t.consume(e),i++,s):(t.exit("codeTextSequence"),l(e))}function l(e){return null===e?r(e):96===e?(a=t.enter("codeTextSequence"),o=0,u(e)):32===e?(t.enter("space"),t.consume(e),t.exit("space"),l):markdownLineEnding(e)?(t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),l):(t.enter("codeTextData"),c(e))}function c(e){return null===e||32===e||96===e||markdownLineEnding(e)?(t.exit("codeTextData"),l(e)):(t.consume(e),c)}function u(e){return 96===e?(t.consume(e),o++,u):(o===i?(t.exit("codeTextSequence"),t.exit("codeText"),n):(a.type="codeTextData",c))(e)}}function subtokenize(e){var t,n,r,i,o={};let a=-1,s,l,c;for(;++a<e.length;){for(;a in o;)a=o[a];if(t=e[a],a&&"chunkFlow"===t[1].type&&"listItemPrefix"===e[a-1][1].type&&(i=t[1]._tokenizer.events,(l=0)<i.length&&"lineEndingBlank"===i[l][1].type&&(l+=2),l<i.length)&&"content"===i[l][1].type)for(;++l<i.length&&"content"!==i[l][1].type;)"chunkText"===i[l][1].type&&(i[l][1]._isInFirstContentOfListItem=!0,l++);if("enter"===t[0])t[1].contentType&&(Object.assign(o,subcontent(e,a)),a=o[a],c=!0);else if(t[1]._container){for(l=a,s=void 0;l--&&("lineEnding"===(n=e[l])[1].type||"lineEndingBlank"===n[1].type);)"enter"===n[0]&&(s&&(e[s][1].type="lineEndingBlank"),n[1].type="lineEnding",s=l);s&&(t[1].end=Object.assign({},e[s][1].start),(r=e.slice(s,a)).unshift(t),splice(e,s,a-s+1,r))}}return!c}function subcontent(e,t){var n=e[t][1],r=e[t][2];let i=t-1;var o,a=[],s=n._tokenizer||r.parser[n.contentType](n.start),l=s.events,c=[],u={};let d,p=-1,f=n,h=0,m=0;for(var g=[m];f;){for(;e[++i][1]!==f;);a.push(i),f._tokenizer||(o=r.sliceStream(f),f.next||o.push(null),d&&s.defineSkip(f.start),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(o),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=(d=f).next}for(f=n;++p<l.length;)"exit"===l[p][0]&&"enter"===l[p-1][0]&&l[p][1].type===l[p-1][1].type&&l[p][1].start.line!==l[p][1].end.line&&(m=p+1,g.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(s.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),p=g.length;p--;){var y=l.slice(g[p],g[p+1]);const m=a.pop();c.unshift([m,m+y.length-1]),splice(e,m,2,y)}for(p=-1;++p<c.length;)u[h+c[p][0]]=h+c[p][1],h+=c[p][1]-c[p][0]-1;return u}const content={tokenize:tokenizeContent,resolve:resolveContent},continuationConstruct={tokenize:tokenizeContinuation,partial:!0};function resolveContent(e){return subtokenize(e),e}function tokenizeContent(t,n){let r;return function(e){return t.enter("content"),r=t.enter("chunkContent",{contentType:"content"}),i(e)};function i(e){return null===e?o(e):markdownLineEnding(e)?t.check(continuationConstruct,a,o)(e):(t.consume(e),i)}function o(e){return t.exit("chunkContent"),t.exit("content"),n(e)}function a(e){return t.consume(e),t.exit("chunkContent"),r.next=t.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,i}}function tokenizeContinuation(n,r,i){const o=this;return function(e){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(e),n.exit("lineEnding"),factorySpace(n,t,"linePrefix")};function t(e){var t;return(null===e||markdownLineEnding(e)?i:(t=o.events[o.events.length-1],!o.parser.constructs.disable.null.includes("codeIndented")&&t&&"linePrefix"===t[1].type&&4<=t[2].sliceSerialize(t[1],!0).length?r:n.interrupt(o.parser.constructs.flow,i,r)))(e)}}function factoryDestination(t,n,r,i,o,a,s,l,e){const c=e||Number.POSITIVE_INFINITY;let u=0;return function(e){if(60===e)return t.enter(i),t.enter(o),t.enter(a),t.consume(e),t.exit(a),d;if(null===e||41===e||asciiControl(e))return r(e);return t.enter(i),t.enter(s),t.enter(l),t.enter("chunkString",{contentType:"string"}),h(e)};function d(e){return 62===e?(t.enter(a),t.consume(e),t.exit(a),t.exit(o),t.exit(i),n):(t.enter(l),t.enter("chunkString",{contentType:"string"}),p(e))}function p(e){return 62===e?(t.exit("chunkString"),t.exit(l),d(e)):null===e||60===e||markdownLineEnding(e)?r(e):(t.consume(e),92===e?f:p)}function f(e){return 60===e||62===e||92===e?(t.consume(e),p):p(e)}function h(e){return 40===e?++u>c?r(e):(t.consume(e),h):41===e?u--?(t.consume(e),h):(t.exit("chunkString"),t.exit(l),t.exit(s),t.exit(i),n(e)):null===e||markdownLineEndingOrSpace(e)?(u?r:(t.exit("chunkString"),t.exit(l),t.exit(s),t.exit(i),n))(e):asciiControl(e)?r(e):(t.consume(e),92===e?m:h)}function m(e){return 40===e||41===e||92===e?(t.consume(e),h):h(e)}}function factoryLabel(t,n,r,i,o,a){const s=this;let l=0,c;return function(e){return t.enter(i),t.enter(o),t.consume(e),t.exit(o),t.enter(a),u};function u(e){return null===e||91===e||93===e&&!c||94===e&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs||999<l?r(e):93===e?(t.exit(a),t.enter(o),t.consume(e),t.exit(o),t.exit(i),n):markdownLineEnding(e)?(t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),u):(t.enter("chunkString",{contentType:"string"}),d(e))}function d(e){return null===e||91===e||93===e||markdownLineEnding(e)||999<l++?(t.exit("chunkString"),u(e)):(t.consume(e),c=c||!markdownSpace(e),92===e?p:d)}function p(e){return 91===e||92===e||93===e?(t.consume(e),l++,d):d(e)}}function factoryTitle(t,n,r,i,o,a){let s;return function(e){return t.enter(i),t.enter(o),t.consume(e),t.exit(o),s=40===e?41:e,l};function l(e){return e===s?(t.enter(o),t.consume(e),t.exit(o),t.exit(i),n):(t.enter(a),c(e))}function c(e){return e===s?(t.exit(a),l(s)):null===e?r(e):markdownLineEnding(e)?(t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),factorySpace(t,c,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),u(e))}function u(e){return e===s||null===e||markdownLineEnding(e)?(t.exit("chunkString"),c(e)):(t.consume(e),92===e?d:u)}function d(e){return e===s||92===e?(t.consume(e),u):u(e)}}function factoryWhitespace(n,r){let i;return function e(t){if(markdownLineEnding(t))return n.enter("lineEnding"),n.consume(t),n.exit("lineEnding"),i=!0,e;if(markdownSpace(t))return factorySpace(n,e,i?"linePrefix":"lineSuffix")(t);return r(t)}}function normalizeIdentifier(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const definition={name:"definition",tokenize:tokenizeDefinition},titleConstruct={tokenize:tokenizeTitle,partial:!0};function tokenizeDefinition(t,n,r){const i=this;let o;return function(e){return t.enter("definition"),factoryLabel.call(i,t,a,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(e)};function a(e){return o=normalizeIdentifier(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),58===e?(t.enter("definitionMarker"),t.consume(e),t.exit("definitionMarker"),factoryWhitespace(t,factoryDestination(t,t.attempt(titleConstruct,factorySpace(t,s,"whitespace"),factorySpace(t,s,"whitespace")),r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):r(e)}function s(e){return(null===e||markdownLineEnding(e)?(t.exit("definition"),i.parser.defined.includes(o)||i.parser.defined.push(o),n):r)(e)}}function tokenizeTitle(t,n,r){return function(e){return(markdownLineEndingOrSpace(e)?factoryWhitespace(t,i):r)(e)};function i(e){return(34===e||39===e||40===e?factoryTitle(t,factorySpace(t,o,"whitespace"),r,"definitionTitle","definitionTitleMarker","definitionTitleString"):r)(e)}function o(e){return(null===e||markdownLineEnding(e)?n:r)(e)}}const hardBreakEscape={name:"hardBreakEscape",tokenize:tokenizeHardBreakEscape};function tokenizeHardBreakEscape(t,n,r){return function(e){return t.enter("hardBreakEscape"),t.enter("escapeMarker"),t.consume(e),i};function i(e){return(markdownLineEnding(e)?(t.exit("escapeMarker"),t.exit("hardBreakEscape"),n):r)(e)}}const headingAtx={name:"headingAtx",tokenize:tokenizeHeadingAtx,resolve:resolveHeadingAtx};function resolveHeadingAtx(e,t){let n=e.length-2,r=3;var i,o;return"whitespace"===e[r][1].type&&(r+=2),n-2>r&&"whitespace"===e[n][1].type&&(n-=2),"atxHeadingSequence"===e[n][1].type&&(r===n-1||n-4>r&&"whitespace"===e[n-2][1].type)&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},splice(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function tokenizeHeadingAtx(t,n,r){const i=this;let o=0;return function(e){return t.enter("atxHeading"),t.enter("atxHeadingSequence"),a(e)};function a(e){return 35===e&&o++<6?(t.consume(e),a):(null===e||markdownLineEndingOrSpace(e)?(t.exit("atxHeadingSequence"),i.interrupt?n:s):r)(e)}function s(e){return(35===e?(t.enter("atxHeadingSequence"),l):null===e||markdownLineEnding(e)?(t.exit("atxHeading"),n):markdownSpace(e)?factorySpace(t,s,"whitespace"):(t.enter("atxHeadingText"),c))(e)}function l(e){return 35===e?(t.consume(e),l):(t.exit("atxHeadingSequence"),s(e))}function c(e){return null===e||35===e||markdownLineEndingOrSpace(e)?(t.exit("atxHeadingText"),s(e)):(t.consume(e),c)}}const htmlBlockNames=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],htmlRawNames=["pre","script","style","textarea"],htmlFlow={name:"htmlFlow",tokenize:tokenizeHtmlFlow,resolveTo:resolveToHtmlFlow,concrete:!0},nextBlankConstruct={tokenize:tokenizeNextBlank,partial:!0};function resolveToHtmlFlow(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return 1<t&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function tokenizeHtmlFlow(t,n,r){const o=this;let i,a,s,l,c;return function(e){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(e),u};function u(e){return 33===e?(t.consume(e),d):47===e?(t.consume(e),h):63===e?(t.consume(e),i=3,o.interrupt?n:M):asciiAlpha(e)?(t.consume(e),s=String.fromCharCode(e),a=!0,m):r(e)}function d(e){return 45===e?(t.consume(e),i=2,p):91===e?(t.consume(e),i=5,s="CDATA[",l=0,f):asciiAlpha(e)?(t.consume(e),i=4,o.interrupt?n:M):r(e)}function p(e){return 45===e?(t.consume(e),o.interrupt?n:M):r(e)}function f(e){return e===s.charCodeAt(l++)?(t.consume(e),l===s.length?o.interrupt?n:E:f):r(e)}function h(e){return asciiAlpha(e)?(t.consume(e),s=String.fromCharCode(e),m):r(e)}function m(e){return null===e||47===e||62===e||markdownLineEndingOrSpace(e)?47!==e&&a&&htmlRawNames.includes(s.toLowerCase())?(i=1,(o.interrupt?n:E)(e)):htmlBlockNames.includes(s.toLowerCase())?(i=6,47===e?(t.consume(e),g):(o.interrupt?n:E)(e)):(i=7,(o.interrupt&&!o.parser.lazy[o.now().line]?r:a?v:y)(e)):45===e||asciiAlphanumeric(e)?(t.consume(e),s+=String.fromCharCode(e),m):r(e)}function g(e){return 62===e?(t.consume(e),o.interrupt?n:E):r(e)}function y(e){return markdownSpace(e)?(t.consume(e),y):_(e)}function v(e){return 47===e?(t.consume(e),_):58===e||95===e||asciiAlpha(e)?(t.consume(e),x):markdownSpace(e)?(t.consume(e),v):_(e)}function x(e){return 45===e||46===e||58===e||95===e||asciiAlphanumeric(e)?(t.consume(e),x):b(e)}function b(e){return 61===e?(t.consume(e),$):markdownSpace(e)?(t.consume(e),b):v(e)}function $(e){return null===e||60===e||61===e||62===e||96===e?r(e):34===e||39===e?(t.consume(e),c=e,C):markdownSpace(e)?(t.consume(e),$):(c=null,S(e))}function C(e){return null===e||markdownLineEnding(e)?r(e):e===c?(t.consume(e),w):(t.consume(e),C)}function S(e){return null===e||34===e||39===e||60===e||61===e||62===e||96===e||markdownLineEndingOrSpace(e)?b(e):(t.consume(e),S)}function w(e){return(47===e||62===e||markdownSpace(e)?v:r)(e)}function _(e){return 62===e?(t.consume(e),T):r(e)}function T(e){return markdownSpace(e)?(t.consume(e),T):(null===e||markdownLineEnding(e)?E:r)(e)}function E(e){return 45===e&&2===i?(t.consume(e),O):60===e&&1===i?(t.consume(e),k):62===e&&4===i?(t.consume(e),L):63===e&&3===i?(t.consume(e),M):93===e&&5===i?(t.consume(e),N):!markdownLineEnding(e)||6!==i&&7!==i?null===e||markdownLineEnding(e)?j(e):(t.consume(e),E):t.check(nextBlankConstruct,L,j)(e)}function j(e){return t.exit("htmlFlowData"),R(e)}function R(e){return(null===e?P:markdownLineEnding(e)?t.attempt({tokenize:I,partial:!0},R,P):(t.enter("htmlFlowData"),E))(e)}function I(t,n,r){return function(e){return t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),i};function i(e){return(o.parser.lazy[o.now().line]?r:n)(e)}}function O(e){return 45===e?(t.consume(e),M):E(e)}function k(e){return 47===e?(t.consume(e),s="",A):E(e)}function A(e){return 62===e&&htmlRawNames.includes(s.toLowerCase())?(t.consume(e),L):asciiAlpha(e)&&s.length<8?(t.consume(e),s+=String.fromCharCode(e),A):E(e)}function N(e){return 93===e?(t.consume(e),M):E(e)}function M(e){return 62===e?(t.consume(e),L):45===e&&2===i?(t.consume(e),M):E(e)}function L(e){return null===e||markdownLineEnding(e)?(t.exit("htmlFlowData"),P(e)):(t.consume(e),L)}function P(e){return t.exit("htmlFlow"),n(e)}}function tokenizeNextBlank(t,n,r){return function(e){return t.exit("htmlFlowData"),t.enter("lineEndingBlank"),t.consume(e),t.exit("lineEndingBlank"),t.attempt(blankLine,n,r)}}const htmlText={name:"htmlText",tokenize:tokenizeHtmlText};function tokenizeHtmlText(t,n,r){const i=this;let o,a,s,l;return function(e){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(e),c};function c(e){return 33===e?(t.consume(e),u):47===e?(t.consume(e),S):63===e?(t.consume(e),$):asciiAlpha(e)?(t.consume(e),T):r(e)}function u(e){return 45===e?(t.consume(e),d):91===e?(t.consume(e),a="CDATA[",s=0,g):asciiAlpha(e)?(t.consume(e),b):r(e)}function d(e){return 45===e?(t.consume(e),p):r(e)}function p(e){return null===e||62===e?r(e):45===e?(t.consume(e),f):h(e)}function f(e){return(null===e||62===e?r:h)(e)}function h(e){return null===e?r(e):45===e?(t.consume(e),m):markdownLineEnding(e)?(l=h,M(e)):(t.consume(e),h)}function m(e){return 45===e?(t.consume(e),P):h(e)}function g(e){return e===a.charCodeAt(s++)?(t.consume(e),s===a.length?y:g):r(e)}function y(e){return null===e?r(e):93===e?(t.consume(e),v):markdownLineEnding(e)?(l=y,M(e)):(t.consume(e),y)}function v(e){return 93===e?(t.consume(e),x):y(e)}function x(e){return 62===e?P(e):93===e?(t.consume(e),x):y(e)}function b(e){return null===e||62===e?P(e):markdownLineEnding(e)?(l=b,M(e)):(t.consume(e),b)}function $(e){return null===e?r(e):63===e?(t.consume(e),C):markdownLineEnding(e)?(l=$,M(e)):(t.consume(e),$)}function C(e){return(62===e?P:$)(e)}function S(e){return asciiAlpha(e)?(t.consume(e),w):r(e)}function w(e){return 45===e||asciiAlphanumeric(e)?(t.consume(e),w):_(e)}function _(e){return markdownLineEnding(e)?(l=_,M(e)):markdownSpace(e)?(t.consume(e),_):P(e)}function T(e){return 45===e||asciiAlphanumeric(e)?(t.consume(e),T):(47===e||62===e||markdownLineEndingOrSpace(e)?E:r)(e)}function E(e){return 47===e?(t.consume(e),P):58===e||95===e||asciiAlpha(e)?(t.consume(e),j):markdownLineEnding(e)?(l=E,M(e)):markdownSpace(e)?(t.consume(e),E):P(e)}function j(e){return 45===e||46===e||58===e||95===e||asciiAlphanumeric(e)?(t.consume(e),j):R(e)}function R(e){return 61===e?(t.consume(e),I):markdownLineEnding(e)?(l=R,M(e)):markdownSpace(e)?(t.consume(e),R):E(e)}function I(e){return null===e||60===e||61===e||62===e||96===e?r(e):34===e||39===e?(t.consume(e),o=e,O):markdownLineEnding(e)?(l=I,M(e)):markdownSpace(e)?(t.consume(e),I):(t.consume(e),o=void 0,A)}function O(e){return e===o?(t.consume(e),k):null===e?r(e):markdownLineEnding(e)?(l=O,M(e)):(t.consume(e),O)}function k(e){return(62===e||47===e||markdownLineEndingOrSpace(e)?E:r)(e)}function A(e){return null===e||34===e||39===e||60===e||61===e||96===e?r(e):62===e||markdownLineEndingOrSpace(e)?E(e):(t.consume(e),A)}function M(e){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),factorySpace(t,L,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function L(e){return t.enter("htmlTextData"),l(e)}function P(e){return 62===e?(t.consume(e),t.exit("htmlTextData"),t.exit("htmlText"),n):r(e)}}const labelEnd={name:"labelEnd",tokenize:tokenizeLabelEnd,resolveTo:resolveToLabelEnd,resolveAll:resolveAllLabelEnd},resourceConstruct={tokenize:tokenizeResource},fullReferenceConstruct={tokenize:tokenizeFullReference},collapsedReferenceConstruct={tokenize:tokenizeCollapsedReference};function resolveAllLabelEnd(e){let t=-1;for(var n;++t<e.length;)"labelImage"!==(n=e[t][1]).type&&"labelLink"!==n.type&&"labelEnd"!==n.type||(e.splice(t+1,"labelImage"===n.type?4:2),n.type="data",t++);return e}function resolveToLabelEnd(e,t){let n=e.length,r=0;var i;let o,a;for(;n--;)if(i=e[n][1],o){if("link"===i.type||"labelLink"===i.type&&i._inactive)break;"enter"===e[n][0]&&"labelLink"===i.type&&(i._inactive=!0)}else if(a){if("enter"===e[n][0]&&("labelImage"===i.type||"labelLink"===i.type)&&!i._balanced&&(o=n,"labelLink"!==i.type)){r=2;break}}else"labelEnd"===i.type&&(a=n);var s,l={type:"labelLink"===e[o][1].type?"link":"image",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"label",start:Object.assign({},e[o][1].start),end:Object.assign({},e[a][1].end)},u={type:"labelText",start:Object.assign({},e[o+r+2][1].end),end:Object.assign({},e[a-2][1].start)};return s=push$1([["enter",l,t],["enter",c,t]],e.slice(o+1,o+r+3)),s=push$1(s,[["enter",u,t]]),s=push$1(s,resolveAll(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),s=push$1(s,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),s=push$1(s,e.slice(a+1)),s=push$1(s,[["exit",l,t]]),splice(e,o,e.length,s),e}function tokenizeLabelEnd(t,n,r){const i=this;let e=i.events.length,o,a;for(;e--;)if(("labelImage"===i.events[e][1].type||"labelLink"===i.events[e][1].type)&&!i.events[e][1]._balanced){o=i.events[e][1];break}return function(e){return o?o._inactive?l(e):(a=i.parser.defined.includes(normalizeIdentifier(i.sliceSerialize({start:o.end,end:i.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(e),t.exit("labelMarker"),t.exit("labelEnd"),s):r(e)};function s(e){return(40===e?t.attempt(resourceConstruct,n,a?n:l):91===e?t.attempt(fullReferenceConstruct,n,a?t.attempt(collapsedReferenceConstruct,n,l):l):a?n:l)(e)}function l(e){return o._balanced=!0,r(e)}}function tokenizeResource(t,n,r){return function(e){return t.enter("resource"),t.enter("resourceMarker"),t.consume(e),t.exit("resourceMarker"),factoryWhitespace(t,i)};function i(e){return(41===e?s:factoryDestination(t,o,r,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32))(e)}function o(e){return(markdownLineEndingOrSpace(e)?factoryWhitespace(t,a):s)(e)}function a(e){return(34===e||39===e||40===e?factoryTitle(t,factoryWhitespace(t,s),r,"resourceTitle","resourceTitleMarker","resourceTitleString"):s)(e)}function s(e){return 41===e?(t.enter("resourceMarker"),t.consume(e),t.exit("resourceMarker"),t.exit("resource"),n):r(e)}}function tokenizeFullReference(t,n,r){const i=this;return function(e){return factoryLabel.call(i,t,o,r,"reference","referenceMarker","referenceString")(e)};function o(e){return(i.parser.defined.includes(normalizeIdentifier(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?n:r)(e)}}function tokenizeCollapsedReference(t,n,r){return function(e){return t.enter("reference"),t.enter("referenceMarker"),t.consume(e),t.exit("referenceMarker"),i};function i(e){return 93===e?(t.enter("referenceMarker"),t.consume(e),t.exit("referenceMarker"),t.exit("reference"),n):r(e)}}const labelStartImage={name:"labelStartImage",tokenize:tokenizeLabelStartImage,resolveAll:labelEnd.resolveAll};function tokenizeLabelStartImage(t,n,r){const i=this;return function(e){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(e),t.exit("labelImageMarker"),o};function o(e){return 91===e?(t.enter("labelMarker"),t.consume(e),t.exit("labelMarker"),t.exit("labelImage"),a):r(e)}function a(e){return(94===e&&"_hiddenFootnoteSupport"in i.parser.constructs?r:n)(e)}}const labelStartLink={name:"labelStartLink",tokenize:tokenizeLabelStartLink,resolveAll:labelEnd.resolveAll};function tokenizeLabelStartLink(t,n,r){const i=this;return function(e){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(e),t.exit("labelMarker"),t.exit("labelLink"),o};function o(e){return(94===e&&"_hiddenFootnoteSupport"in i.parser.constructs?r:n)(e)}}const lineEnding={name:"lineEnding",tokenize:tokenizeLineEnding};function tokenizeLineEnding(t,n){return function(e){return t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),factorySpace(t,n,"linePrefix")}}const thematicBreak$1={name:"thematicBreak",tokenize:tokenizeThematicBreak};function tokenizeThematicBreak(t,n,r){let i=0,o;return function(e){return t.enter("thematicBreak"),a(o=e)};function a(e){return(e===o?(t.enter("thematicBreakSequence"),s):markdownSpace(e)?factorySpace(t,a,"whitespace"):i<3||null!==e&&!markdownLineEnding(e)?r:(t.exit("thematicBreak"),n))(e)}function s(e){return e===o?(t.consume(e),i++,s):(t.exit("thematicBreakSequence"),a(e))}}const list$1={name:"list",tokenize:tokenizeListStart,continuation:{tokenize:tokenizeListContinuation},exit:tokenizeListEnd},listItemPrefixWhitespaceConstruct={tokenize:tokenizeListItemPrefixWhitespace,partial:!0},indentConstruct={tokenize:tokenizeIndent,partial:!0};function tokenizeListStart(n,t,r){const i=this;var e=i.events[i.events.length-1];let o=e&&"linePrefix"===e[1].type?e[2].sliceSerialize(e[1],!0).length:0,a=0;return function(e){var t=i.containerState.type||(42===e||43===e||45===e?"listUnordered":"listOrdered");if("listUnordered"===t?!i.containerState.marker||e===i.containerState.marker:asciiDigit(e)){if(i.containerState.type||(i.containerState.type=t,n.enter(t,{_container:!0})),"listUnordered"===t)return n.enter("listItemPrefix"),(42===e||45===e?n.check(thematicBreak$1,r,l):l)(e);if(!i.interrupt||49===e)return n.enter("listItemPrefix"),n.enter("listItemValue"),s(e)}return r(e)};function s(e){return asciiDigit(e)&&++a<10?(n.consume(e),s):((!i.interrupt||a<2)&&(i.containerState.marker?e===i.containerState.marker:41===e||46===e)?(n.exit("listItemValue"),l):r)(e)}function l(e){return n.enter("listItemMarker"),n.consume(e),n.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||e,n.check(blankLine,i.interrupt?r:c,n.attempt(listItemPrefixWhitespaceConstruct,d,u))}function c(e){return i.containerState.initialBlankLine=!0,o++,d(e)}function u(e){return markdownSpace(e)?(n.enter("listItemPrefixWhitespace"),n.consume(e),n.exit("listItemPrefixWhitespace"),d):r(e)}function d(e){return i.containerState.size=o+i.sliceSerialize(n.exit("listItemPrefix"),!0).length,t(e)}}function tokenizeListContinuation(t,n,r){const i=this;return i.containerState._closeFlow=void 0,t.check(blankLine,function(e){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,factorySpace(t,n,"listItemIndent",i.containerState.size+1)(e)},function(e){return(!i.containerState.furtherBlankLines&&markdownSpace(e)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,t.attempt(indentConstruct,n,o)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,o))(e)});function o(e){return i.containerState._closeFlow=!0,i.interrupt=void 0,factorySpace(t,t.attempt(list$1,n,r),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(e)}}function tokenizeIndent(e,n,r){const i=this;return factorySpace(e,function(e){var t=i.events[i.events.length-1];return(t&&"listItemIndent"===t[1].type&&t[2].sliceSerialize(t[1],!0).length===i.containerState.size?n:r)(e)},"listItemIndent",i.containerState.size+1)}function tokenizeListEnd(e){e.exit(this.containerState.type)}function tokenizeListItemPrefixWhitespace(e,n,r){const i=this;return factorySpace(e,function(e){var t=i.events[i.events.length-1];return(!markdownSpace(e)&&t&&"listItemPrefixWhitespace"===t[1].type?n:r)(e)},"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}const setextUnderline={name:"setextUnderline",tokenize:tokenizeSetextUnderline,resolveTo:resolveToSetextUnderline};function resolveToSetextUnderline(e,t){let n=e.length,r,i,o;for(;n--;)if("enter"===e[n][0]){if("content"===e[n][1].type){r=n;break}"paragraph"===e[n][1].type&&(i=n)}else"content"===e[n][1].type&&e.splice(n,1),o||"definition"!==e[n][1].type||(o=n);var a={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[o][1].end)):e[r][1]=a,e.push(["exit",a,t]),e}function tokenizeSetextUnderline(t,n,r){const i=this;let e=i.events.length,o,a;for(;e--;)if("lineEnding"!==i.events[e][1].type&&"linePrefix"!==i.events[e][1].type&&"content"!==i.events[e][1].type){a="paragraph"===i.events[e][1].type;break}return function(e){return i.parser.lazy[i.now().line]||!i.interrupt&&!a?r(e):(t.enter("setextHeadingLine"),t.enter("setextHeadingLineSequence"),s(o=e))};function s(e){return e===o?(t.consume(e),s):(t.exit("setextHeadingLineSequence"),factorySpace(t,l,"lineSuffix")(e))}function l(e){return(null===e||markdownLineEnding(e)?(t.exit("setextHeadingLine"),n):r)(e)}}const flow$1={tokenize:initializeFlow};function initializeFlow(t){const n=this,r=t.attempt(blankLine,function(e){if(null!==e)return t.enter("lineEndingBlank"),t.consume(e),t.exit("lineEndingBlank"),n.currentConstruct=void 0,r;t.consume(e)},t.attempt(this.parser.constructs.flowInitial,e,factorySpace(t,t.attempt(this.parser.constructs.flow,e,t.attempt(content,e)),"linePrefix")));return r;function e(e){if(null!==e)return t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),n.currentConstruct=void 0,r;t.consume(e)}}const resolver={resolveAll:createResolver()},string$1=initializeFactory("string"),text$2=initializeFactory("text");function initializeFactory(l){return{tokenize:function(t){const i=this,o=this.parser.constructs[l],n=t.attempt(o,e,r);return e;function e(e){return(s(e)?n:r)(e)}function r(e){if(null!==e)return t.enter("data"),t.consume(e),a;t.consume(e)}function a(e){return s(e)?(t.exit("data"),n(e)):(t.consume(e),a)}function s(e){if(null===e)return 1;var t=o[e];let n=-1;if(t)for(;++n<t.length;){var r=t[n];if(!r.previous||r.previous.call(i,i.previous))return 1}}},resolveAll:createResolver("text"===l?resolveAllLineSuffixes:void 0)}}function createResolver(i){return function(e,t){let n=-1,r;for(;++n<=e.length;)void 0===r?e[n]&&"data"===e[n][1].type&&(r=n,n++):e[n]&&"data"===e[n][1].type||(n!==r+2&&(e[r][1].end=e[n-1][1].end,e.splice(r+2,n-r-2),n=r+2),r=void 0);return i?i(e,t):e}}function resolveAllLineSuffixes(i,o){let a=0;for(;++a<=i.length;)if((a===i.length||"lineEnding"===i[a][1].type)&&"data"===i[a-1][1].type){var s,l=i[a-1][1],c=o.sliceStream(l);let e=c.length,t=-1,n=0,r;for(;e--;){var u=c[e];if("string"==typeof u){for(t=u.length;32===u.charCodeAt(t-1);)n++,t--;if(t)break;t=-1}else if(-2===u)r=!0,n++;else if(-1!==u){e++;break}}n&&(s={type:a===i.length||r||n<2?"lineSuffix":"hardBreakTrailing",start:{line:l.end.line,column:l.end.column-n,offset:l.end.offset-n,_index:l.start._index+e,_bufferIndex:e?t:l.start._bufferIndex+t},end:Object.assign({},l.end)},l.end=Object.assign({},s.start),l.start.offset===l.end.offset?Object.assign(l,s):(i.splice(a,0,["enter",s,o],["exit",s,o]),a+=2)),a++}return i}function createTokenizer(e,r,t){let f=Object.assign(t?Object.assign({},t):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const n={},i=[];let o=[],h=[];const m={consume:function(e){markdownLineEnding(e)?(f.line++,f.column=1,f.offset+=-3===e?2:1,v()):-1!==e&&(f.column++,f.offset++);f._bufferIndex<0?f._index++:(f._bufferIndex++,f._bufferIndex===o[f._index].length&&(f._bufferIndex=-1,f._index++));g.previous=e},enter:function(e,t){t=t||{};return t.type=e,t.start=y(),g.events.push(["enter",t,g]),h.push(t),t},exit:function(e){var t=h.pop();return t.end=y(),g.events.push(["exit",t,g]),t},attempt:u(function(e,t){d(e,t.from)}),check:u(c),interrupt:u(c,{interrupt:!0})},g={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:s,sliceSerialize:function(e,t){return serializeChunks(s(e),t)},now:y,defineSkip:function(e){n[e.line]=e.column,v()},write:function(e){var t;for(o=push$1(o,e);f._index<o.length;){var n=o[f._index];if("string"==typeof n)for(t=f._index,f._bufferIndex<0&&(f._bufferIndex=0);f._index===t&&f._bufferIndex<n.length;)l(n.charCodeAt(f._bufferIndex));else l(n)}return null===o[o.length-1]?(d(r,0),g.events=resolveAll(i,g.events,g),g.events):[]}};let a=r.tokenize.call(g,m);return r.resolveAll&&i.push(r),g;function s(e){return sliceChunks(o,e)}function y(){return Object.assign({},f)}function l(e){a=a(e)}function c(e,t){t.restore()}function u(d,p){return function(e,t,n){let r,i,o,a;return Array.isArray(e)?s(e):"tokenize"in e?s([e]):function(r){return function(e){var t=null!==e&&r[e],n=null!==e&&r.null,t=[...Array.isArray(t)?t:t?[t]:[],...Array.isArray(n)?n:n?[n]:[]];return s(t)(e)}}(e);function s(e){return r=e,(i=0)===e.length?n:l(e[i])}function l(t){return function(e){a=function(){const e=y(),t=g.previous,n=g.currentConstruct,r=g.events.length,i=Array.from(h);return{restore:function(){f=e,g.previous=t,g.currentConstruct=n,g.events.length=r,h=i,v()},from:r}}(),(o=t).partial||(g.currentConstruct=t);if(t.name&&g.parser.constructs.disable.null.includes(t.name))return u();return t.tokenize.call(p?Object.assign(Object.create(g),p):g,m,c,u)(e)}}function c(e){return d(o,a),t}function u(e){return a.restore(),++i<r.length?l(r[i]):n}}}function d(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&splice(g.events,t,g.events.length-t,e.resolve(g.events.slice(t),g)),e.resolveTo&&(g.events=e.resolveTo(g.events,g))}function v(){f.line in n&&f.column<2&&(f.column=n[f.line],f.offset+=n[f.line]-1)}}function sliceChunks(e,t){var n=t.start._index,r=t.start._bufferIndex,i=t.end._index,t=t.end._bufferIndex;let o;return n===i?o=[e[n].slice(r,t)]:(o=e.slice(n,i),-1<r&&(o[0]=o[0].slice(r)),0<t&&o.push(e[i].slice(0,t))),o}function serializeChunks(t,n){let r=-1;var i=[];let o;for(;++r<t.length;){var a=t[r];let e;if("string"==typeof a)e=a;else switch(a){case-5:e="\r";break;case-4:e="\n";break;case-3:e="\r\n";break;case-2:e=n?" ":"\t";break;case-1:if(!n&&o)continue;e=" ";break;default:e=String.fromCharCode(a)}o=-2===a,i.push(e)}return i.join("")}const document$4={[42]:list$1,43:list$1,45:list$1,48:list$1,49:list$1,50:list$1,51:list$1,52:list$1,53:list$1,54:list$1,55:list$1,56:list$1,57:list$1,62:blockQuote},contentInitial={[91]:definition},flowInitial={"-2":codeIndented,"-1":codeIndented,[32]:codeIndented},flow={[35]:headingAtx,42:thematicBreak$1,45:[setextUnderline,thematicBreak$1],60:htmlFlow,61:setextUnderline,95:thematicBreak$1,96:codeFenced,126:codeFenced},string={[38]:characterReference,92:characterEscape},text$1={"-5":lineEnding,"-4":lineEnding,"-3":lineEnding,[33]:labelStartImage,38:characterReference,42:attention,60:[autolink,htmlText],91:labelStartLink,92:[hardBreakEscape,characterEscape],93:labelEnd,95:attention,96:codeText},insideSpan={null:[attention,resolver]},attentionMarkers={null:[42,95]},disable={null:[]};var defaultConstructs=Object.freeze({__proto__:null,document:document$4,contentInitial:contentInitial,flowInitial:flowInitial,flow:flow,string:string,text:text$1,insideSpan:insideSpan,attentionMarkers:attentionMarkers,disable:disable});function parse$4(e={}){const n={defined:[],lazy:{},constructs:combineExtensions([defaultConstructs].concat(e.extensions||[])),content:t(content$1),document:t(document$5),flow:t(flow$1),string:t(string$1),text:t(text$2)};return n;function t(t){return function(e){return createTokenizer(n,t,e)}}}const search=/[\0\t\n\r]/g;function preprocess(){let c=1,u="",d=!0,p;return function(e,t,n){var r=[];let i,o,a,s,l;e=u+e.toString(t),a=0,u="",d&&(65279===e.charCodeAt(0)&&a++,d=void 0);for(;a<e.length;){if(search.lastIndex=a,i=search.exec(e),s=i&&void 0!==i.index?i.index:e.length,l=e.charCodeAt(s),!i){u=e.slice(a);break}if(10===l&&a===s&&p)r.push(-3),p=void 0;else switch(p&&(r.push(-5),p=void 0),a<s&&(r.push(e.slice(a,s)),c+=s-a),l){case 0:r.push(65533),c++;break;case 9:for(o=4*Math.ceil(c/4),r.push(-2);c++<o;)r.push(-1);break;case 10:r.push(-4),c=1;break;default:p=!0,c=1}a=s+1}n&&(p&&r.push(-5),u&&r.push(u),r.push(null));return r}}function postprocess(e){for(;!subtokenize(e););return e}function decodeNumericCharacterReference(e,t){e=Number.parseInt(e,t);return e<9||11===e||13<e&&e<32||126<e&&e<160||55295<e&&e<57344||64975<e&&e<65008||65535==(65535&e)||65534==(65535&e)||1114111<e?"�":String.fromCharCode(e)}const characterEscapeOrReference=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function decodeString(e){return e.replace(characterEscapeOrReference,decode)}function decode(e,t,n){if(t)return t;const r=n.charCodeAt(0);if(35!==r)return decodeNamedCharacterReference(n)||e;{const r=n.charCodeAt(1);t=120===r||88===r;return decodeNumericCharacterReference(n.slice(t?2:1),t?16:10)}}function stringifyPosition(e){return e&&"object"==typeof e?"position"in e||"type"in e?position$1(e.position):"start"in e||"end"in e?position$1(e):"line"in e||"column"in e?point$2(e):"":""}function point$2(e){return index$2(e&&e.line)+":"+index$2(e&&e.column)}function position$1(e){return point$2(e&&e.start)+"-"+point$2(e&&e.end)}function index$2(e){return e&&"number"==typeof e?e:1}const own$6={}.hasOwnProperty,fromMarkdown=function(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),compiler(n)(postprocess(parse$4(n).document().write(preprocess()(e,t,!0))))};function compiler(e){const l={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:t(x),autolinkProtocol:r,autolinkEmail:r,atxHeading:t(g),blockQuote:t(function(){return{type:"blockquote",children:[]}}),characterEscape:r,characterReference:r,codeFenced:t(m),codeFencedFenceInfo:d,codeFencedFenceMeta:d,codeIndented:t(m,d),codeText:t(function(){return{type:"inlineCode",value:""}},d),codeTextData:r,data:r,codeFlowValue:r,definition:t(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:d,definitionLabelString:d,definitionTitleString:d,emphasis:t(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:t(y),hardBreakTrailing:t(y),htmlFlow:t(v,d),htmlFlowData:r,htmlText:t(v,d),htmlTextData:r,image:t(function(){return{type:"image",title:null,url:"",alt:null}}),label:d,link:t(x),listItem:t(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}),listItemValue:function(e){i.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),c("expectingFirstListItemValue"))},listOrdered:t(b,function(){c("expectingFirstListItemValue",!0)}),listUnordered:t(b),paragraph:t(function(){return{type:"paragraph",children:[]}}),reference:function(){c("referenceType","collapsed")},referenceString:d,resourceDestinationString:d,resourceTitleString:d,setextHeading:t(g),strong:t(function(){return{type:"strong",children:[]}}),thematicBreak:t(function(){return{type:"thematicBreak"}})},exit:{atxHeading:n(),atxHeadingSequence:function(e){var t=this.stack[this.stack.length-1];t.depth||(e=this.sliceSerialize(e).length,t.depth=e)},autolink:n(),autolinkEmail:function(e){o.call(this,e);var t=this.stack[this.stack.length-1];t.url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){o.call(this,e);var t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)},blockQuote:n(),characterEscapeValue:o,characterReferenceMarkerHexadecimal:s,characterReferenceMarkerNumeric:s,characterReferenceValue:function(e){var t=this.sliceSerialize(e),n=i.characterReferenceType;let r;n?(r=decodeNumericCharacterReference(t,"characterReferenceMarkerNumeric"===n?10:16),c("characterReferenceType")):(n=decodeNamedCharacterReference(t),r=n);t=this.stack.pop();t.value+=r,t.position.end=point$1(e.end)},codeFenced:n(function(){var e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),c("flowCodeInside")}),codeFencedFence:function(){i.flowCodeInside||(this.buffer(),c("flowCodeInside",!0))},codeFencedFenceInfo:function(){var e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e},codeFencedFenceMeta:function(){var e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e},codeFlowValue:o,codeIndented:n(function(){var e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:n(function(){var e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}),codeTextData:o,data:o,definition:n(),definitionDestinationString:function(){var e=this.resume(),t=this.stack[this.stack.length-1];t.url=e},definitionLabelString:function(e){var t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=normalizeIdentifier(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){var e=this.resume(),t=this.stack[this.stack.length-1];t.title=e},emphasis:n(),hardBreakEscape:n(a),hardBreakTrailing:n(a),htmlFlow:n(function(){var e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}),htmlFlowData:o,htmlText:n(function(){var e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}),htmlTextData:o,image:n(function(){var e=this.stack[this.stack.length-1];{var t;i.inReference?(t=i.referenceType||"shortcut",e.type+="Reference",e.referenceType=t,delete e.url,delete e.title):(delete e.identifier,delete e.label)}c("referenceType")}),label:function(){var e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];c("inReference",!0),"link"===n.type?(e=e.children,n.children=e):n.alt=t},labelText:function(e){var e=this.sliceSerialize(e),t=this.stack[this.stack.length-2];t.label=decodeString(e),t.identifier=normalizeIdentifier(e).toLowerCase()},lineEnding:function(e){var t=this.stack[this.stack.length-1];i.atHardBreak?(t.children[t.children.length-1].position.end=point$1(e.end),c("atHardBreak")):!i.setextHeadingSlurpLineEnding&&l.canContainEols.includes(t.type)&&(r.call(this,e),o.call(this,e))},link:n(function(){var e=this.stack[this.stack.length-1];{var t;i.inReference?(t=i.referenceType||"shortcut",e.type+="Reference",e.referenceType=t,delete e.url,delete e.title):(delete e.identifier,delete e.label)}c("referenceType")}),listItem:n(),listOrdered:n(),listUnordered:n(),paragraph:n(),referenceString:function(e){var t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=normalizeIdentifier(this.sliceSerialize(e)).toLowerCase(),c("referenceType","full")},resourceDestinationString:function(){var e=this.resume(),t=this.stack[this.stack.length-1];t.url=e},resourceTitleString:function(){var e=this.resume(),t=this.stack[this.stack.length-1];t.title=e},resource:function(){c("inReference")},setextHeading:n(function(){c("setextHeadingSlurpLineEnding")}),setextHeadingLineSequence:function(e){var t=this.stack[this.stack.length-1];t.depth=61===this.sliceSerialize(e).charCodeAt(0)?1:2},setextHeadingText:function(){c("setextHeadingSlurpLineEnding",!0)},strong:n(),thematicBreak:n()}},i=(configure(l,(e||{}).mdastExtensions||[]),{});return function(e){let t={type:"root",children:[]};var n={stack:[t],tokenStack:[],config:l,enter:p,exit:f,buffer:d,resume:h,setData:c,getData:u},r=[];let i=-1;for(;++i<e.length;){var o;"listOrdered"!==e[i][1].type&&"listUnordered"!==e[i][1].type||("enter"===e[i][0]?r.push(i):(o=r.pop(),i=function(t,e,n){let r=e-1,i=-1,o=!1,a,s,l,c;for(;++r<=n;){var u=t[r];if("listUnordered"===u[1].type||"listOrdered"===u[1].type||"blockQuote"===u[1].type?("enter"===u[0]?i++:i--,c=void 0):"lineEndingBlank"===u[1].type?"enter"===u[0]&&(!a||c||i||(l=l||r),c=void 0):"linePrefix"!==u[1].type&&"listItemValue"!==u[1].type&&"listItemMarker"!==u[1].type&&"listItemPrefix"!==u[1].type&&"listItemPrefixWhitespace"!==u[1].type&&(c=void 0),!i&&"enter"===u[0]&&"listItemPrefix"===u[1].type||-1===i&&"exit"===u[0]&&("listUnordered"===u[1].type||"listOrdered"===u[1].type)){if(a){let e=r;for(s=void 0;e--;){var d=t[e];if("lineEnding"===d[1].type||"lineEndingBlank"===d[1].type)"exit"!==d[0]&&(s&&(t[s][1].type="lineEndingBlank",o=!0),d[1].type="lineEnding",s=e);else if("linePrefix"!==d[1].type&&"blockQuotePrefix"!==d[1].type&&"blockQuotePrefixWhitespace"!==d[1].type&&"blockQuoteMarker"!==d[1].type&&"listItemIndent"!==d[1].type)break}l&&(!s||l<s)&&(a._spread=!0),a.end=Object.assign({},s?t[s][1].start:u[1].end),t.splice(s||r,0,["exit",a,u[2]]),r++,n++}"listItemPrefix"===u[1].type&&(a={type:"listItem",_spread:!1,start:Object.assign({},u[1].start)},t.splice(r,0,["enter",a,u[2]]),r++,n++,l=void 0,c=!0)}}return t[e][1]._spread=o,n}(e,o,i)))}i=-1;for(;++i<e.length;){var a=l[e[i][0]];own$6.call(a,e[i][1].type)&&a[e[i][1].type].call(Object.assign({sliceSerialize:e[i][2].sliceSerialize},n),e[i][1])}{var s;0<n.tokenStack.length&&((s=n.tokenStack[n.tokenStack.length-1])[1]||defaultOnError).call(n,void 0,s[0])}t.position={start:point$1(0<e.length?e[0][1].start:{line:1,column:1,offset:0}),end:point$1(0<e.length?e[e.length-2][1].end:{line:1,column:1,offset:0})},i=-1;for(;++i<l.transforms.length;)t=l.transforms[i](t)||t;return t};function c(e,t){i[e]=t}function u(e){return i[e]}function t(t,n){return function(e){p.call(this,t(e),e),n&&n.call(this,e)}}function d(){this.stack.push({type:"fragment",children:[]})}function p(e,t,n){return this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n]),e.position={start:point$1(t.start)},e}function n(t){return function(e){t&&t.call(this,e);f.call(this,e)}}function f(e,t){var n=this.stack.pop(),r=this.tokenStack.pop();if(r)return r[0].type!==e.type&&(t||r[1]||defaultOnError).call(this,e,r[0]),n.position.end=point$1(e.end),n;throw new Error("Cannot close `"+e.type+"` ("+stringifyPosition({start:e.start,end:e.end})+"): it’s not open")}function h(){return toString$4(this.stack.pop())}function r(e){var t=this.stack[this.stack.length-1];let n=t.children[t.children.length-1];n&&"text"===n.type||((n={type:"text",value:""}).position={start:point$1(e.start)},t.children.push(n)),this.stack.push(n)}function o(e){var t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=point$1(e.end)}function a(){c("atHardBreak",!0)}function s(e){c("characterReferenceType",e.type)}function m(){return{type:"code",lang:null,meta:null,value:""}}function g(){return{type:"heading",depth:void 0,children:[]}}function y(){return{type:"break"}}function v(){return{type:"html",value:""}}function x(){return{type:"link",title:null,url:"",children:[]}}function b(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}}function point$1(e){return{line:e.line,column:e.column,offset:e.offset}}function configure(e,t){let n=-1;for(;++n<t.length;){var r=t[n];(Array.isArray(r)?configure:extension)(e,r)}}function extension(e,t){let n;for(n in t){var r,i;own$6.call(t,n)&&("canContainEols"===n?(r=t[n])&&e[n].push(...r):"transforms"===n?(r=t[n])&&e[n].push(...r):"enter"!==n&&"exit"!==n||(i=t[n])&&Object.assign(e[n],i))}}function defaultOnError(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+stringifyPosition({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+stringifyPosition({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+stringifyPosition({start:t.start,end:t.end})+") is still open")}function remarkParse(n){Object.assign(this,{Parser:e=>{var t=this.data("settings");return fromMarkdown(e,Object.assign({},t,n,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}const u$2=function(e,t,n){e={type:String(e)};return null!=n||"string"!=typeof t&&!Array.isArray(t)?Object.assign(e,t):n=t,Array.isArray(n)?e.children=n:null!=n&&(e.value=String(n)),e},own$5={}.hasOwnProperty;function unknown(e,t){var n=t.data||{};return"value"in t&&!(own$5.call(n,"hName")||own$5.call(n,"hProperties")||own$5.call(n,"hChildren"))?e.augment(t,u$2("text",t.value)):e(t,"div",all(e,t))}function one(e,t,n){var r=t&&t.type;let i;if(r)return("function"==typeof(i=own$5.call(e.handlers,r)?e.handlers[r]:e.passThrough&&e.passThrough.includes(r)?returnNode:e.unknownHandler)?i:unknown)(e,t,n);throw new Error("Expected node, got `"+t+"`")}function returnNode(e,t){return"children"in t?{...t,children:all(e,t)}:t}function all(t,n){var r=[];if("children"in n){var i=n.children;let e=-1;for(;++e<i.length;){var o,a=one(t,i[e],n);a&&(e&&"break"===i[e-1].type&&(Array.isArray(a)||"text"!==a.type||(a.value=a.value.replace(/^\s+/,"")),Array.isArray(a)||"element"!==a.type||(o=a.children[0])&&"text"===o.type&&(o.value=o.value.replace(/^\s+/,""))),Array.isArray(a)?r.push(...a):r.push(a))}}return r}const convert$2=function(e){if(null==e)return ok$1;if("string"==typeof e)return typeFactory$1(e);if("object"==typeof e)return(Array.isArray(e)?anyFactory$1:propsFactory$1)(e);if("function"==typeof e)return castFactory$1(e);throw new Error("Expected function, string, or object as test")};function anyFactory$1(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=convert$2(e[t]);return castFactory$1(function(...e){let t=-1;for(;++t<n.length;)if(n[t].call(this,...e))return!0;return!1})}function propsFactory$1(n){return castFactory$1(function(e){let t;for(t in n)if(e[t]!==n[t])return!1;return!0})}function typeFactory$1(t){return castFactory$1(function(e){return e&&e.type===t})}function castFactory$1(n){return function(e,...t){return Boolean(e&&"object"==typeof e&&"type"in e&&Boolean(n.call(this,e,...t)))}}function ok$1(){return!0}function color$1(e){return e}const CONTINUE$1=!0,EXIT$1=!1,SKIP$1="skip",visitParents$1=function(e,l,c,u){"function"==typeof l&&"function"!=typeof c&&(u=c,c=l,l=null);const d=convert$2(l),p=u?-1:1;!function i(o,a,s){const e=o&&"object"==typeof o?o:{};if("string"==typeof e.type){const n="string"==typeof e.tagName?e.tagName:"string"==typeof e.name?e.name:void 0;Object.defineProperty(t,"name",{value:"node ("+color$1(o.type+(n?"<"+n+">":""))+")"})}return t;function t(){let e=[],t,n,r;if((l&&!d(o,a,s[s.length-1]||null)||(e=toResult$1(c(o,s)))[0]!==EXIT$1)&&o.children&&e[0]!==SKIP$1)for(n=(u?o.children.length:-1)+p,r=s.concat(o);-1<n&&n<o.children.length;){if((t=i(o.children[n],n,r)())[0]===EXIT$1)return t;n="number"==typeof t[1]?t[1]:n+p}return e}}(e,void 0,[])()};function toResult$1(e){return Array.isArray(e)?e:"number"==typeof e?[CONTINUE$1,e]:[e]}const visit$1=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null),visitParents$1(e,t,function(e,t){t=t[t.length-1];return n(e,t?t.children.indexOf(e):null,t)},r)},pointStart=point("start"),pointEnd=point("end");function point(t){return function(e){e=e&&e.position&&e.position[t]||{};return{line:e.line||null,column:e.column||null,offset:-1<e.offset?e.offset:null}}}function generated(e){return!(e&&e.position&&e.position.start&&e.position.start.line&&e.position.start.column&&e.position.end&&e.position.end.line&&e.position.end.column)}const own$4={}.hasOwnProperty;function definitions(e){const n=Object.create(null);if(e&&e.type)return visit$1(e,"definition",e=>{var t=clean(e.identifier);t&&!own$4.call(n,t)&&(n[t]=e)}),function(e){e=clean(e);return e&&own$4.call(n,e)?n[e]:null};throw new Error("mdast-util-definitions expected node")}function clean(e){return String(e||"").toUpperCase()}function thematicBreak(e,t){return e(t,"hr")}function wrap(e,t){var n=[];let r=-1;for(t&&n.push(u$2("text","\n"));++r<e.length;)r&&n.push(u$2("text","\n")),n.push(e[r]);return t&&0<e.length&&n.push(u$2("text","\n")),n}function list(e,t){var n={},r=t.ordered?"ol":"ul",i=all(e,t);let o=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++o<i.length;){var a=i[o];if("element"===a.type&&"li"===a.tagName&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}return e(t,r,n,wrap(i,!0))}function footer(e){var t=e.footnoteById,n=e.footnoteOrder;let r=-1;for(var i=[];++r<n.length;){var o,a,s,l=t[n[r].toUpperCase()];l&&(o=String(r+1),((s=(a=[...l.children])[a.length-1])&&"paragraph"===s.type?s.children:a).push({type:"link",url:"#fnref"+o,data:{hProperties:{className:["footnote-back"],role:"doc-backlink"}},children:[{type:"text",value:"↩"}]}),i.push({type:"listItem",data:{hProperties:{id:"fn"+o,role:"doc-endnote"}},children:a,position:l.position}))}return 0===i.length?null:e(null,"section",{className:["footnotes"],role:"doc-endnotes"},wrap([thematicBreak(e),list(e,{type:"list",ordered:!0,children:i})],!0))}function blockquote(e,t){return e(t,"blockquote",wrap(all(e,t),!0))}function hardBreak(e,t){return[e(t,"br"),u$2("text","\n")]}function code(e,t){var n=t.value?t.value+"\n":"",r=t.lang&&t.lang.match(/^[^ \t]+(?=[ \t]|$)/),i={},r=(r&&(i.className=["language-"+r]),e(t,"code",i,[u$2("text",n)]));return t.meta&&(r.data={meta:t.meta}),e(t.position,"pre",[r])}function strikethrough(e,t){return e(t,"del",all(e,t))}function emphasis(e,t){return e(t,"em",all(e,t))}function footnoteReference(e,t){var n=e.footnoteOrder,r=String(t.identifier),i=n.indexOf(r),n=String(-1===i?n.push(r):i+1);return e(t,"a",{href:"#fn"+n,className:["footnote-ref"],id:"fnref"+n,role:"doc-noteref"},[e(t.position,"sup",[u$2("text",n)])])}function footnote(e,t){var n=e.footnoteById,r=e.footnoteOrder;let i=1;for(;i in n;)i++;var o=String(i);return r.push(o),n[o]={type:"footnoteDefinition",identifier:o,children:[{type:"paragraph",children:t.children}],position:t.position},footnoteReference(e,{type:"footnoteReference",identifier:o,position:t.position})}function heading(e,t){return e(t,"h"+t.depth,all(e,t))}function html$5(e,t){return e.dangerous?e.augment(t,u$2("raw",t.value)):null}var encodeCache={};function getEncodeCache(e){var t,n,r=encodeCache[e];if(!r){for(r=encodeCache[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),/^[0-9a-z]$/i.test(n)?r.push(n):r.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t<e.length;t++)r[e.charCodeAt(t)]=e[t]}return r}function encode(e,t,n){var r,i,o,a,s="";for("string"!=typeof t&&(n=t,t=encode.defaultChars),void 0===n&&(n=!0),a=getEncodeCache(t),r=0,i=e.length;r<i;r++)o=e.charCodeAt(r),n&&37===o&&r+2<i&&/^[0-9a-f]{2}$/i.test(e.slice(r+1,r+3))?(s+=e.slice(r,r+3),r+=2):o<128?s+=a[o]:55296<=o&&o<=57343?55296<=o&&o<=56319&&r+1<i&&56320<=(o=e.charCodeAt(r+1))&&o<=57343?(s+=encodeURIComponent(e[r]+e[r+1]),r++):s+="%EF%BF%BD":s+=encodeURIComponent(e[r]);return s}encode.defaultChars=";/?:@&=+$,-_.!~*'()#",encode.componentChars="-_.!~*'()";var encode_1=encode;function revert(e,t){var n=t.referenceType;let r="]";return"collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type?u$2("text","!["+t.alt+r):((e=(n=all(e,t))[0])&&"text"===e.type?e.value="["+e.value:n.unshift(u$2("text","[")),(t=n[n.length-1])&&"text"===t.type?t.value+=r:n.push(u$2("text",r)),n)}function imageReference(e,t){var n,r=e.definition(t.identifier);return r?(n={src:encode_1(r.url||""),alt:t.alt},null!==r.title&&void 0!==r.title&&(n.title=r.title),e(t,"img",n)):revert(e,t)}function image(e,t){var n={src:encode_1(t.url),alt:t.alt};return null!==t.title&&void 0!==t.title&&(n.title=t.title),e(t,"img",n)}function inlineCode(e,t){return e(t,"code",[u$2("text",t.value.replace(/\r?\n|\r/g," "))])}function linkReference(e,t){var n,r=e.definition(t.identifier);return r?(n={href:encode_1(r.url||"")},null!==r.title&&void 0!==r.title&&(n.title=r.title),e(t,"a",n,all(e,t))):revert(e,t)}function link(e,t){var n={href:encode_1(t.url)};return null!==t.title&&void 0!==t.title&&(n.title=t.title),e(t,"a",n,all(e,t))}function listItem(t,n,r){var i=all(t,n),e=r?listLoose(r):listItemLoose(n),r={},o=[];if("boolean"==typeof n.checked){let e;i[0]&&"element"===i[0].type&&"p"===i[0].tagName?e=i[0]:(e=t(null,"p",[]),i.unshift(e)),0<e.children.length&&e.children.unshift(u$2("text"," ")),e.children.unshift(t(null,"input",{type:"checkbox",checked:n.checked,disabled:!0})),r.className=["task-list-item"]}let a=-1;for(;++a<i.length;){var s=i[a];!e&&0===a&&"element"===s.type&&"p"===s.tagName||o.push(u$2("text","\n")),"element"!==s.type||"p"!==s.tagName||e?o.push(s):o.push(...s.children)}var l=i[i.length-1];return!l||!e&&"tagName"in l&&"p"===l.tagName||o.push(u$2("text","\n")),t(n,"li",r,o)}function listLoose(e){let t=e.spread;var n=e.children;let r=-1;for(;!t&&++r<n.length;)t=listItemLoose(n[r]);return Boolean(t)}function listItemLoose(e){var t=e.spread;return null==t?1<e.children.length:t}function paragraph(e,t){return e(t,"p",all(e,t))}function root$2(e,t){return e.augment(t,u$2("root",wrap(all(e,t))))}function strong(e,t){return e(t,"strong",all(e,t))}function table(t,n){var r=n.children;let i=-1;for(var o=n.align||[],a=[];++i<r.length;){var s=r[i].children,l=0===i?"th":"td";let e=(n.align?o:s).length;for(var c=[];e--;){var u=s[e];c[e]=t(u,l,{align:o[e]},u?all(t,u):[])}a[i]=t(r[i],"tr",wrap(c,!0))}return t(n,"table",wrap([t(a[0].position,"thead",wrap([a[0]],!0))].concat(a[1]?t({start:pointStart(a[1]),end:pointEnd(a[a.length-1])},"tbody",wrap(a.slice(1),!0)):[]),!0))}function text(e,t){return e.augment(t,u$2("text",String(t.value).replace(/[ \t]*(\r?\n|\r)[ \t]*/g,"$1")))}const handlers={blockquote:blockquote,break:hardBreak,code:code,delete:strikethrough,emphasis:emphasis,footnoteReference:footnoteReference,footnote:footnote,heading:heading,html:html$5,imageReference:imageReference,image:image,inlineCode:inlineCode,linkReference:linkReference,link:link,listItem:listItem,list:list,paragraph:paragraph,root:root$2,strong:strong,table:table,text:text,thematicBreak:thematicBreak,toml:ignore,yaml:ignore,definition:ignore,footnoteDefinition:ignore};function ignore(){return null}const own$3={}.hasOwnProperty;function factory(e,t){var t=t||{},n=t.allowDangerousHtml||!1;const r={};return o.dangerous=n,o.definition=definitions(e),o.footnoteById=r,o.footnoteOrder=[],o.augment=i,o.handlers={...handlers,...t.handlers},o.unknownHandler=t.unknownHandler,o.passThrough=t.passThrough,visit$1(e,"footnoteDefinition",e=>{var t=String(e.identifier).toUpperCase();own$3.call(r,t)||(r[t]=e)}),o;function i(e,t){var n;return e&&"data"in e&&e.data&&((n=e.data).hName&&((t="element"!==t.type?{type:"element",tagName:"",properties:{},children:[]}:t).tagName=n.hName),"element"===t.type&&n.hProperties&&(t.properties={...t.properties,...n.hProperties}),"children"in t)&&t.children&&n.hChildren&&(t.children=n.hChildren),e&&!generated(n="type"in e?e:{position:e})&&(t.position={start:pointStart(n),end:pointEnd(n)}),t}function o(e,t,n,r){return Array.isArray(n)&&(r=n,n={}),i(e,{type:"element",tagName:t,properties:n||{},children:r||[]})}}function toHast(e,t){t=factory(e,t),e=one(t,e,null),t=footer(t);return t&&e.children.push(u$2("text","\n"),t),Array.isArray(e)?{type:"root",children:e}:e}const remarkRehype=function(e,t){return e&&"run"in e?bridge(e,t):mutate(e)};var remarkRehype$1=remarkRehype;function bridge(r,i){return(e,t,n)=>{r.run(toHast(e,i),t,e=>{n(e)})}}function mutate(t){return e=>toHast(e,t)}class Schema{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function merge(e,t){var n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new Schema(n,r,t)}function normalize$1(e){return e.toLowerCase()}Schema.prototype.property={},Schema.prototype.normal={},Schema.prototype.space=null;class Info$1{constructor(e,t){this.property=e,this.attribute=t}}Info$1.prototype.space=null,Info$1.prototype.boolean=!1,Info$1.prototype.booleanish=!1,Info$1.prototype.overloadedBoolean=!1,Info$1.prototype.number=!1,Info$1.prototype.commaSeparated=!1,Info$1.prototype.spaceSeparated=!1,Info$1.prototype.commaOrSpaceSeparated=!1,Info$1.prototype.mustUseProperty=!1,Info$1.prototype.defined=!1;let powers=0;const boolean=increment(),booleanish=increment(),overloadedBoolean=increment(),number=increment(),spaceSeparated=increment(),commaSeparated=increment(),commaOrSpaceSeparated=increment();function increment(){return 2**++powers}var types=Object.freeze({__proto__:null,boolean:boolean,booleanish:booleanish,overloadedBoolean:overloadedBoolean,number:number,spaceSeparated:spaceSeparated,commaSeparated:commaSeparated,commaOrSpaceSeparated:commaOrSpaceSeparated});const checks=Object.keys(types);class DefinedInfo extends Info$1{constructor(e,t,n,r){let i=-1;if(super(e,t),mark(this,"space",r),"number"==typeof n)for(;++i<checks.length;){var o=checks[i];mark(this,checks[i],(n&types[o])===types[o])}}}function mark(e,t,n){n&&(e[t]=n)}DefinedInfo.prototype.defined=!0;const own$2={}.hasOwnProperty;function create$3(e){var t,n={},r={};let i;for(i in e.properties)own$2.call(e.properties,i)&&(t=e.properties[i],t=new DefinedInfo(i,e.transform(e.attributes||{},i),t,e.space),e.mustUseProperty&&e.mustUseProperty.includes(i)&&(t.mustUseProperty=!0),n[i]=t,r[normalize$1(i)]=i,r[normalize$1(t.attribute)]=i);return new Schema(n,r,e.space)}const xlink=create$3({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),xml=create$3({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function caseSensitiveTransform(e,t){return t in e?e[t]:t}function caseInsensitiveTransform(e,t){return caseSensitiveTransform(e,t.toLowerCase())}const xmlns=create$3({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:caseInsensitiveTransform,properties:{xmlns:null,xmlnsXLink:null}}),aria=create$3({transform(e,t){return"role"===t?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:booleanish,ariaAutoComplete:null,ariaBusy:booleanish,ariaChecked:booleanish,ariaColCount:number,ariaColIndex:number,ariaColSpan:number,ariaControls:spaceSeparated,ariaCurrent:null,ariaDescribedBy:spaceSeparated,ariaDetails:null,ariaDisabled:booleanish,ariaDropEffect:spaceSeparated,ariaErrorMessage:null,ariaExpanded:booleanish,ariaFlowTo:spaceSeparated,ariaGrabbed:booleanish,ariaHasPopup:null,ariaHidden:booleanish,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:spaceSeparated,ariaLevel:number,ariaLive:null,ariaModal:booleanish,ariaMultiLine:booleanish,ariaMultiSelectable:booleanish,ariaOrientation:null,ariaOwns:spaceSeparated,ariaPlaceholder:null,ariaPosInSet:number,ariaPressed:booleanish,ariaReadOnly:booleanish,ariaRelevant:null,ariaRequired:booleanish,ariaRoleDescription:spaceSeparated,ariaRowCount:number,ariaRowIndex:number,ariaRowSpan:number,ariaSelected:booleanish,ariaSetSize:number,ariaSort:null,ariaValueMax:number,ariaValueMin:number,ariaValueNow:number,ariaValueText:null,role:null}}),html$4=create$3({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:caseInsensitiveTransform,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:commaSeparated,acceptCharset:spaceSeparated,accessKey:spaceSeparated,action:null,allow:null,allowFullScreen:boolean,allowPaymentRequest:boolean,allowUserMedia:boolean,alt:null,as:null,async:boolean,autoCapitalize:null,autoComplete:spaceSeparated,autoFocus:boolean,autoPlay:boolean,capture:boolean,charSet:null,checked:boolean,cite:null,className:spaceSeparated,cols:number,colSpan:null,content:null,contentEditable:booleanish,controls:boolean,controlsList:spaceSeparated,coords:number|commaSeparated,crossOrigin:null,data:null,dateTime:null,decoding:null,default:boolean,defer:boolean,dir:null,dirName:null,disabled:boolean,download:overloadedBoolean,draggable:booleanish,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:boolean,formTarget:null,headers:spaceSeparated,height:number,hidden:boolean,high:number,href:null,hrefLang:null,htmlFor:spaceSeparated,httpEquiv:spaceSeparated,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:boolean,itemId:null,itemProp:spaceSeparated,itemRef:spaceSeparated,itemScope:boolean,itemType:spaceSeparated,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:boolean,low:number,manifest:null,max:null,maxLength:number,media:null,method:null,min:null,minLength:number,multiple:boolean,muted:boolean,name:null,nonce:null,noModule:boolean,noValidate:boolean,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:boolean,optimum:number,pattern:null,ping:spaceSeparated,placeholder:null,playsInline:boolean,poster:null,preload:null,readOnly:boolean,referrerPolicy:null,rel:spaceSeparated,required:boolean,reversed:boolean,rows:number,rowSpan:number,sandbox:spaceSeparated,scope:null,scoped:boolean,seamless:boolean,selected:boolean,shape:null,size:number,sizes:null,slot:null,span:number,spellCheck:booleanish,src:null,srcDoc:null,srcLang:null,srcSet:null,start:number,step:null,style:null,tabIndex:number,target:null,title:null,translate:null,type:null,typeMustMatch:boolean,useMap:null,value:booleanish,width:number,wrap:null,align:null,aLink:null,archive:spaceSeparated,axis:null,background:null,bgColor:null,border:number,borderColor:null,bottomMargin:number,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:boolean,declare:boolean,event:null,face:null,frame:null,frameBorder:null,hSpace:number,leftMargin:number,link:null,longDesc:null,lowSrc:null,marginHeight:number,marginWidth:number,noResize:boolean,noHref:boolean,noShade:boolean,noWrap:boolean,object:null,profile:null,prompt:null,rev:null,rightMargin:number,rules:null,scheme:null,scrolling:booleanish,standby:null,summary:null,text:null,topMargin:number,valueType:null,version:null,vAlign:null,vLink:null,vSpace:number,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:boolean,disableRemotePlayback:boolean,prefix:null,property:null,results:number,security:null,unselectable:null}}),svg$1=create$3({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:caseSensitiveTransform,properties:{about:commaOrSpaceSeparated,accentHeight:number,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:number,amplitude:number,arabicForm:null,ascent:number,attributeName:null,attributeType:null,azimuth:number,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:number,by:null,calcMode:null,capHeight:number,className:spaceSeparated,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:number,diffuseConstant:number,direction:null,display:null,dur:null,divisor:number,dominantBaseline:null,download:boolean,dx:null,dy:null,edgeMode:null,editable:null,elevation:number,enableBackground:null,end:null,event:null,exponent:number,externalResourcesRequired:null,fill:null,fillOpacity:number,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:commaSeparated,g2:commaSeparated,glyphName:commaSeparated,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:number,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:number,horizOriginX:number,horizOriginY:number,id:null,ideographic:number,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:number,k:number,k1:number,k2:number,k3:number,k4:number,kernelMatrix:commaOrSpaceSeparated,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:number,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:number,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:number,overlineThickness:number,paintOrder:null,panose1:null,path:null,pathLength:number,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:spaceSeparated,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:number,pointsAtY:number,pointsAtZ:number,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:commaOrSpaceSeparated,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:commaOrSpaceSeparated,rev:commaOrSpaceSeparated,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:commaOrSpaceSeparated,requiredFeatures:commaOrSpaceSeparated,requiredFonts:commaOrSpaceSeparated,requiredFormats:commaOrSpaceSeparated,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:number,specularExponent:number,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:number,strikethroughThickness:number,string:null,stroke:null,strokeDashArray:commaOrSpaceSeparated,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:number,strokeOpacity:number,strokeWidth:null,style:null,surfaceScale:number,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:commaOrSpaceSeparated,tabIndex:number,tableValues:null,target:null,targetX:number,targetY:number,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:commaOrSpaceSeparated,to:null,transform:null,u1:null,u2:null,underlinePosition:number,underlineThickness:number,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:number,values:null,vAlphabetic:number,vMathematical:number,vectorEffect:null,vHanging:number,vIdeographic:number,version:null,vertAdvY:number,vertOriginX:number,vertOriginY:number,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:number,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),valid=/^data[-\w.:]+$/i,dash=/-[a-z]/g,cap=/[A-Z]/g;function find$2(e,t){var n=normalize$1(t);let r=t,i=Info$1;if(n in e.normal)return e.property[e.normal[n]];if(4<n.length&&"data"===n.slice(0,4)&&valid.test(t)){if("-"===t.charAt(4)){e=t.slice(5).replace(dash,camelcase);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{n=t.slice(4);if(!dash.test(n)){let e=n.replace(cap,kebab);t="data"+(e="-"!==e.charAt(0)?"-"+e:e)}}i=DefinedInfo}return new i(r,t)}function kebab(e){return"-"+e.toLowerCase()}function camelcase(e){return e.charAt(1).toUpperCase()}const hastToReact={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},html$3=merge([xml,xlink,xmlns,aria,html$4],"html"),svg=merge([xml,xlink,xmlns,aria,svg$1],"svg"),convert$1=function(e){if(null==e)return ok;if("string"==typeof e)return typeFactory(e);if("object"==typeof e)return(Array.isArray(e)?anyFactory:propsFactory)(e);if("function"==typeof e)return castFactory(e);throw new Error("Expected function, string, or object as test")};function anyFactory(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=convert$1(e[t]);return castFactory(function(...e){let t=-1;for(;++t<n.length;)if(n[t].call(this,...e))return!0;return!1})}function propsFactory(n){return castFactory(function(e){let t;for(t in n)if(e[t]!==n[t])return!1;return!0})}function typeFactory(t){return castFactory(function(e){return e&&e.type===t})}function castFactory(n){return function(e,...t){return Boolean(e&&"object"==typeof e&&"type"in e&&Boolean(n.call(this,e,...t)))}}function ok(){return!0}function color(e){return e}const CONTINUE=!0,EXIT=!1,SKIP="skip",visitParents=function(e,l,c,u){"function"==typeof l&&"function"!=typeof c&&(u=c,c=l,l=null);const d=convert$1(l),p=u?-1:1;!function i(o,a,s){const e=o&&"object"==typeof o?o:{};if("string"==typeof e.type){const n="string"==typeof e.tagName?e.tagName:"string"==typeof e.name?e.name:void 0;Object.defineProperty(t,"name",{value:"node ("+color(o.type+(n?"<"+n+">":""))+")"})}return t;function t(){let e=[],t,n,r;if((l&&!d(o,a,s[s.length-1]||null)||(e=toResult(c(o,s)))[0]!==EXIT)&&o.children&&e[0]!==SKIP)for(n=(u?o.children.length:-1)+p,r=s.concat(o);-1<n&&n<o.children.length;){if((t=i(o.children[n],n,r)())[0]===EXIT)return t;n="number"==typeof t[1]?t[1]:n+p}return e}}(e,void 0,[])()};function toResult(e){return Array.isArray(e)?e:"number"==typeof e?[CONTINUE,e]:[e]}const visit=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null),visitParents(e,t,function(e,t){t=t[t.length-1];return n(e,t?t.children.indexOf(e):null,t)},r)};function rehypeFilter(i){if(i.allowedElements&&i.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(i.allowedElements||i.disallowedElements||i.allowElement)return e=>{visit(e,"element",(e,t,n)=>{let r;if(i.allowedElements?r=!i.allowedElements.includes(e.tagName):i.disallowedElements&&(r=i.disallowedElements.includes(e.tagName)),(r=!r&&i.allowElement&&"number"==typeof t?!i.allowElement(e,t,n):r)&&"number"==typeof t)return i.unwrapDisallowed&&e.children?n.children.splice(t,1,...e.children):n.children.splice(t,1),t})}}var x$1,reactIs={exports:{}},reactIs_production_min={},b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l$2=60113,m=60120,n$2=60115,p$1=60116,q$1=60121,r$1=60122,u$1=60117,v$2=60129,w$1=60131;function y$1(t){if("object"==typeof t&&null!==t){var n=t.$$typeof;switch(n){case b:switch(t=t.type){case d:case f:case e:case l$2:case m:return t;default:switch(t=t&&t.$$typeof){case h:case k:case p$1:case n$2:case g:return t;default:return n}}case c:return n}}}"function"==typeof Symbol&&Symbol.for&&(b=(x$1=Symbol.for)("react.element"),c=x$1("react.portal"),d=x$1("react.fragment"),e=x$1("react.strict_mode"),f=x$1("react.profiler"),g=x$1("react.provider"),h=x$1("react.context"),k=x$1("react.forward_ref"),l$2=x$1("react.suspense"),m=x$1("react.suspense_list"),n$2=x$1("react.memo"),p$1=x$1("react.lazy"),q$1=x$1("react.block"),r$1=x$1("react.server.block"),u$1=x$1("react.fundamental"),v$2=x$1("react.debug_trace_mode"),w$1=x$1("react.legacy_hidden"));var z$1=g,A$1=b,B$1=k,C$1=d,D$1=p$1,E$1=n$2,F$1=c,G$1=f,H$1=e,I$2=l$2,ReactIs=(reactIs_production_min.ContextConsumer=h,reactIs_production_min.ContextProvider=z$1,reactIs_production_min.Element=A$1,reactIs_production_min.ForwardRef=B$1,reactIs_production_min.Fragment=C$1,reactIs_production_min.Lazy=D$1,reactIs_production_min.Memo=E$1,reactIs_production_min.Portal=F$1,reactIs_production_min.Profiler=G$1,reactIs_production_min.StrictMode=H$1,reactIs_production_min.Suspense=I$2,reactIs_production_min.isAsyncMode=function(){return!1},reactIs_production_min.isConcurrentMode=function(){return!1},reactIs_production_min.isContextConsumer=function(e){return y$1(e)===h},reactIs_production_min.isContextProvider=function(e){return y$1(e)===g},reactIs_production_min.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===b},reactIs_production_min.isForwardRef=function(e){return y$1(e)===k},reactIs_production_min.isFragment=function(e){return y$1(e)===d},reactIs_production_min.isLazy=function(e){return y$1(e)===p$1},reactIs_production_min.isMemo=function(e){return y$1(e)===n$2},reactIs_production_min.isPortal=function(e){return y$1(e)===c},reactIs_production_min.isProfiler=function(e){return y$1(e)===f},reactIs_production_min.isStrictMode=function(t){return y$1(t)===e},reactIs_production_min.isSuspense=function(e){return y$1(e)===l$2},reactIs_production_min.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===d||t===f||t===v$2||t===e||t===l$2||t===m||t===w$1||"object"==typeof t&&null!==t&&(t.$$typeof===p$1||t.$$typeof===n$2||t.$$typeof===g||t.$$typeof===h||t.$$typeof===k||t.$$typeof===u$1||t.$$typeof===q$1||t[0]===r$1)},reactIs_production_min.typeOf=y$1,reactIs.exports=reactIs_production_min,reactIs.exports);function whitespace(e){e=e&&"object"==typeof e&&"text"===e.type?e.value||"":e;return"string"==typeof e&&""===e.replace(/[ \t\n\f\r]/g,"")}function stringify$2(e){return e.join(" ").trim()}function stringify$1(e,t){t=t||{};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}var COMMENT_REGEX=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,NEWLINE_REGEX=/\n/g,WHITESPACE_REGEX=/^\s*/,PROPERTY_REGEX=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,COLON_REGEX=/^:\s*/,VALUE_REGEX=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,SEMICOLON_REGEX=/^[;\s]*/,TRIM_REGEX=/^\s+|\s+$/g,NEWLINE="\n",FORWARD_SLASH="/",ASTERISK="*",EMPTY_STRING="",TYPE_COMMENT="comment",TYPE_DECLARATION="declaration",inlineStyleParser=function(r,n){if("string"!=typeof r)throw new TypeError("First argument must be a string");if(!r)return[];n=n||{};var i=1,o=1;function a(e){var t=e.match(NEWLINE_REGEX),t=(t&&(i+=t.length),e.lastIndexOf(NEWLINE));o=~t?e.length-t:o+e.length}function s(){var t={line:i,column:o};return function(e){return e.position=new l(t),d(),e}}function l(e){this.start=e,this.end={line:i,column:o},this.source=n.source}function c(e){var t=new Error(n.source+":"+i+":"+o+": "+e);if(t.reason=e,t.filename=n.source,t.line=i,t.column=o,t.source=r,!n.silent)throw t}function u(e){var t,e=e.exec(r);if(e)return a(t=e[0]),r=r.slice(t.length),e}function d(){u(WHITESPACE_REGEX)}function e(e){var t;for(e=e||[];t=p();)!1!==t&&e.push(t)}function p(){var e=s();if(FORWARD_SLASH==r.charAt(0)&&ASTERISK==r.charAt(1)){for(var t,n=2;EMPTY_STRING!=r.charAt(n)&&(ASTERISK!=r.charAt(n)||FORWARD_SLASH!=r.charAt(n+1));)++n;return EMPTY_STRING===r.charAt((n+=2)-1)?c("End of comment missing"):(t=r.slice(2,n-2),o+=2,a(t),r=r.slice(n),o+=2,e({type:TYPE_COMMENT,comment:t}))}}l.prototype.content=r,d();var t,f=[];for(e(f);t=function(){var e,t=s(),n=u(PROPERTY_REGEX);if(n)return p(),u(COLON_REGEX)?(e=u(VALUE_REGEX),t=t({type:TYPE_DECLARATION,property:trim(n[0].replace(COMMENT_REGEX,EMPTY_STRING)),value:e?trim(e[0].replace(COMMENT_REGEX,EMPTY_STRING)):EMPTY_STRING}),u(SEMICOLON_REGEX),t):c("property missing ':'")}();)!1!==t&&(f.push(t),e(f));return f};function trim(e){return e?e.replace(TRIM_REGEX,EMPTY_STRING):EMPTY_STRING}var parse$3=inlineStyleParser;function StyleToObject(e,t){var n=null;if(e&&"string"==typeof e)for(var r,i,o,a=parse$3(e),s="function"==typeof t,l=0,c=a.length;l<c;l++)i=(r=a[l]).property,o=r.value,s?t(i,o,r):o&&((n=n||{})[i]=o);return n}var styleToObject=StyleToObject;const own$1={}.hasOwnProperty,tableElements=new Set(["table","thead","tbody","tfoot","tr"]);function childrenToReact(e,t){var n,r=[];let i=-1;for(;++i<t.children.length;)"element"===(n=t.children[i]).type?r.push(toReact(e,n,i,t)):"text"===n.type?"element"===t.type&&tableElements.has(t.tagName)&&whitespace(n)||r.push(n.value):"raw"!==n.type||e.options.skipHtml||r.push(n.value);return r}function toReact(e,t,n,r){var i=e.options,o=e.schema,a=t.tagName,s={};let l;if("html"===o.space&&"svg"===a&&(c=svg,e.schema=c),t.properties)for(l in t.properties)own$1.call(t.properties,l)&&addProperty(s,l,t.properties[l],e);"ol"!==a&&"ul"!==a||e.listDepth++;var c=childrenToReact(e,t),o=("ol"!==a&&"ul"!==a||e.listDepth--,e.schema=o,t.position||{start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}}),u=i.components&&own$1.call(i.components,a)?i.components[a]:a,d="string"==typeof u||u===React5.Fragment;if(ReactIs.isValidElementType(u))return s.key=[a,o.start.line,o.start.column,n].join("-"),"a"===a&&i.linkTarget&&(s.target="function"==typeof i.linkTarget?i.linkTarget(String(s.href||""),t.children,"string"==typeof s.title?s.title:null):i.linkTarget),"a"===a&&i.transformLinkUri&&(s.href=i.transformLinkUri(String(s.href||""),t.children,"string"==typeof s.title?s.title:null)),d||"code"!==a||"element"!==r.type||"pre"===r.tagName||(s.inline=!0),d||"h1"!==a&&"h2"!==a&&"h3"!==a&&"h4"!==a&&"h5"!==a&&"h6"!==a||(s.level=Number.parseInt(a.charAt(1),10)),"img"===a&&i.transformImageUri&&(s.src=i.transformImageUri(String(s.src||""),String(s.alt||""),"string"==typeof s.title?s.title:null)),d||"li"!==a||"element"!==r.type||(n=getInputElement(t),s.checked=n&&n.properties?Boolean(n.properties.checked):null,s.index=getElementsBeforeCount(r,t),s.ordered="ol"===r.tagName),d||"ol"!==a&&"ul"!==a||(s.ordered="ol"===a,s.depth=e.listDepth),"td"!==a&&"th"!==a||(s.align&&(s.style||(s.style={}),s.style.textAlign=s.align,delete s.align),d)||(s.isHeader="th"===a),d||"tr"!==a||"element"!==r.type||(s.isHeader=Boolean("thead"===r.tagName)),i.sourcePos&&(s["data-sourcepos"]=flattenPosition(o)),!d&&i.rawSourcePos&&(s.sourcePosition=t.position),!d&&i.includeElementIndex&&(s.index=getElementsBeforeCount(r,t),s.siblingCount=getElementsBeforeCount(r)),d||(s.node=t),0<c.length?React5.createElement(u,s,c):React5.createElement(u,s);throw new TypeError(`Component for name \`${a}\` not defined or is not renderable`)}function getInputElement(e){let t=-1;for(;++t<e.children.length;){var n=e.children[t];if("element"===n.type&&"input"===n.tagName)return n}return null}function getElementsBeforeCount(e,t){let n=-1,r=0;for(;++n<e.children.length&&e.children[n]!==t;)"element"===e.children[n].type&&r++;return r}function addProperty(e,t,n,r){r=find$2(r.schema,t);let i=n;null!==i&&void 0!==i&&i==i&&(Array.isArray(i)&&(i=(r.commaSeparated?stringify$1:stringify$2)(i)),"style"===r.property&&"string"==typeof i&&(i=parseStyle(i)),r.space&&r.property?e[own$1.call(hastToReact,r.property)?hastToReact[r.property]:r.property]=i:r.attribute&&(e[r.attribute]=i))}function parseStyle(e){const n={};try{styleToObject(e,function(e,t){e="-ms-"===e.slice(0,4)?"ms-"+e.slice(4):e;n[e.replace(/-([a-z])/g,styleReplacer)]=t})}catch{}return n}function styleReplacer(e,t){return t.toUpperCase()}function flattenPosition(e){return[e.start.line,":",e.start.column,"-",e.end.line,":",e.end.column].map(e=>String(e)).join("")}const own={}.hasOwnProperty,changelog="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",deprecated={renderers:{to:"components",id:"change-renderers-to-components"},astPlugins:{id:"remove-buggy-html-in-markdown-parser"},allowDangerousHtml:{id:"remove-buggy-html-in-markdown-parser"},escapeHtml:{id:"remove-buggy-html-in-markdown-parser"},source:{to:"children",id:"change-source-to-children"},allowNode:{to:"allowElement",id:"replace-allownode-allowedtypes-and-disallowedtypes"},allowedTypes:{to:"allowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},disallowedTypes:{to:"disallowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},includeNodeIndex:{to:"includeElementIndex",id:"change-includenodeindex-to-includeelementindex"}};function ReactMarkdown(e){for(const o in deprecated){var t;own.call(deprecated,o)&&own.call(e,o)&&(t=deprecated[o],console.warn(`[react-markdown] Warning: please ${t.to?`use \`${t.to}\` instead of`:"remove"} \`${o}\` (see <${changelog}#${t.id}> for more info)`),delete deprecated[o])}var n=unified().use(remarkParse).use(e.remarkPlugins||e.plugins||[]).use(remarkRehype$1,{allowDangerousHtml:!0}).use(e.rehypePlugins||[]).use(rehypeFilter,e),r=new VFile$1,n=("string"==typeof e.children?r.value=e.children:void 0!==e.children&&null!==e.children&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`),n.runSync(n.parse(r),r));if("root"!==n.type)throw new TypeError("Expected a `root` node");let i=React5.createElement(React5.Fragment,{},childrenToReact({options:e,schema:html$3,listDepth:0},n));return i=e.className?React5.createElement("div",{className:e.className},i):i}ReactMarkdown.defaultProps={transformLinkUri:uriTransformer},ReactMarkdown.propTypes={children:PropTypes.string,className:PropTypes.string,allowElement:PropTypes.func,allowedElements:PropTypes.arrayOf(PropTypes.string),disallowedElements:PropTypes.arrayOf(PropTypes.string),unwrapDisallowed:PropTypes.bool,remarkPlugins:PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.object,PropTypes.func,PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.object,PropTypes.func]))])),rehypePlugins:PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.object,PropTypes.func,PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.object,PropTypes.func]))])),sourcePos:PropTypes.bool,rawSourcePos:PropTypes.bool,skipHtml:PropTypes.bool,includeElementIndex:PropTypes.bool,transformLinkUri:PropTypes.oneOfType([PropTypes.func,PropTypes.bool]),linkTarget:PropTypes.oneOfType([PropTypes.func,PropTypes.string]),transformImageUri:PropTypes.func,components:PropTypes.object};var isCheckBoxInput=e=>"checkbox"===e.type,isDateObject=e=>e instanceof Date,isNullOrUndefined=e=>null==e;const isObjectType=e=>"object"==typeof e;var isObject$a=e=>!isNullOrUndefined(e)&&!Array.isArray(e)&&isObjectType(e)&&!isDateObject(e),getEventValue=e=>isObject$a(e)&&e.target?isCheckBoxInput(e.target)?e.target.checked:e.target.value:e,getNodeParentName=e=>e.substring(0,e.search(/.\d/))||e,isNameInFieldArray=(e,t)=>[...e].some(e=>getNodeParentName(t)===e),compact=e=>Array.isArray(e)?e.filter(Boolean):[],isUndefined$1=e=>void 0===e,get$1=(e,t,n)=>{var r;return t&&isObject$a(e)?(r=compact(t.split(/[,[\].]+?/)).reduce((e,t)=>isNullOrUndefined(e)?e:e[t],e),isUndefined$1(r)||r===e?isUndefined$1(e[t])?n:e[t]:r):n};const EVENTS={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},VALIDATION_MODE={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},INPUT_VALIDATION_RULES={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},HookFormContext=React5.createContext(null),useFormContext=()=>React5.useContext(HookFormContext),FormProvider=e=>{const{children:t,...n}=e;return React5.createElement(HookFormContext.Provider,{value:n},e.children)};var getProxyFormState=(t,n,r,i=!0)=>{var e={};for(const o in t)Object.defineProperty(e,o,{get:()=>{var e=o;return n[e]!==VALIDATION_MODE.all&&(n[e]=!i||VALIDATION_MODE.all),r&&(r[e]=!0),t[e]}});return e},isEmptyObject=e=>isObject$a(e)&&!Object.keys(e).length,shouldRenderFormState=(e,t,n)=>{const{name:r,...i}=e;return isEmptyObject(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(e=>t[e]===(!n||VALIDATION_MODE.all))},convertToArrayPayload=e=>Array.isArray(e)?e:[e],shouldSubscribeByName=(e,t,n)=>n&&t?e===t:!e||!t||e===t||convertToArrayPayload(e).some(e=>e&&(e.startsWith(t)||t.startsWith(e)));function useSubscribe(e){const n=React5.useRef(e);n.current=e,React5.useEffect(()=>{const t=!e.disabled&&n.current.subject.subscribe({next:n.current.callback});return()=>{var e;(e=t)&&e.unsubscribe()}},[e.disabled])}function useFormState(e){var t=useFormContext();const{control:n=t.control,disabled:r,name:i,exact:o}=e||{},[a,s]=React5.useState(n._formState),l=React5.useRef({isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=React5.useRef(i),u=React5.useRef(!0);return c.current=i,useSubscribe({disabled:r,callback:React5.useCallback(e=>u.current&&shouldSubscribeByName(c.current,e.name,o)&&shouldRenderFormState(e,l.current)&&s({...n._formState,...e}),[n,o]),subject:n._subjects.state}),React5.useEffect(()=>(u.current=!0,()=>{u.current=!1}),[]),getProxyFormState(a,n._proxyFormState,l.current,!1)}var isString$1=e=>"string"==typeof e,generateWatchOutput=(e,t,n,r)=>{var i=Array.isArray(e);return isString$1(e)?(r&&t.watch.add(e),get$1(n,e)):i?e.map(e=>(r&&t.watch.add(e),get$1(n,e))):(r&&(t.watchAll=!0),n)},isFunction=e=>"function"==typeof e,objectHasFunction=e=>{for(const t in e)if(isFunction(e[t]))return!0;return!1};function useWatch(e){var t=useFormContext();const{control:n=t.control,name:r,defaultValue:i,disabled:o,exact:a}=e||{},s=React5.useRef(r);s.current=r;e=React5.useCallback(e=>{shouldSubscribeByName(s.current,e.name,a)&&(e=generateWatchOutput(s.current,n._names,e.values||n._formValues),c(isUndefined$1(s.current)||isObject$a(e)&&!objectHasFunction(e)?{...e}:Array.isArray(e)?[...e]:isUndefined$1(e)?i:e))},[n,a,i]);useSubscribe({disabled:o,subject:n._subjects.watch,callback:e});const[l,c]=React5.useState(isUndefined$1(i)?n._getWatch(r):i);return React5.useEffect(()=>{n._removeUnmounted()}),l}function useController(e){var t=useFormContext();const{name:n,control:r=t.control,shouldUnregister:i}=e,o=isNameInFieldArray(r._names.array,n);var t=useWatch({control:r,name:n,defaultValue:get$1(r._formValues,n,get$1(r._defaultValues,n,e.defaultValue)),exact:!0}),a=useFormState({control:r,name:n});const s=React5.useRef(r.register(n,{...e.rules,value:t}));return React5.useEffect(()=>{const t=(e,t)=>{e=get$1(r._fields,e);e&&(e._f.mount=t)};return t(n,!0),()=>{var e=r._options.shouldUnregister||i;(o?e&&!r._stateFlags.action:e)?r.unregister(n):t(n,!1)}},[n,r,o,i]),{field:{name:n,value:t,onChange:React5.useCallback(e=>{s.current.onChange({target:{value:getEventValue(e),name:n},type:EVENTS.CHANGE})},[n]),onBlur:React5.useCallback(()=>{s.current.onBlur({target:{value:get$1(r._formValues,n),name:n},type:EVENTS.BLUR})},[n,r]),ref:React5.useCallback(t=>{var e=get$1(r._fields,n);t&&e&&t.focus&&(e._f.ref={focus:()=>t.focus(),setCustomValidity:e=>t.setCustomValidity(e),reportValidity:()=>t.reportValidity()})},[n,r._fields])},formState:a,fieldState:r.getFieldState(n,a)}}const Controller=e=>e.render(useController(e));var appendErrors=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},isKey=e=>/^\w*$/.test(e),stringToPath=e=>compact(e.replace(/["|']|\]/g,"").split(/\.|\[/));function set$2(t,e,n){let r=-1;for(var i=isKey(e)?[e]:stringToPath(e),o=i.length,a=o-1;++r<o;){var s,l=i[r];let e=n;r!==a&&(s=t[l],e=isObject$a(s)||Array.isArray(s)?s:isNaN(+i[r+1])?{}:[]),t[l]=e,t=t[l]}return t}const focusFieldBy=(e,t,n)=>{for(const i of n||Object.keys(e)){var r=get$1(e,i);if(r){const{_f:o,...a}=r;if(o&&t(o.name)){if(o.ref.focus&&isUndefined$1(o.ref.focus()))break;if(o.refs){o.refs[0].focus();break}}else isObject$a(a)&&focusFieldBy(a,t)}}};var generateId=()=>{const n="undefined"==typeof performance?Date.now():1e3*performance.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{var t=(16*Math.random()+n)%16|0;return("x"==e?t:3&t|8).toString(16)})},getFocusFieldName=(e,t,n={})=>n.shouldFocus||isUndefined$1(n.shouldFocus)?n.focusName||`${e}.${isUndefined$1(n.focusIndex)?t:n.focusIndex}.`:"",isWatched=(t,e,n)=>!n&&(e.watchAll||e.watch.has(t)||[...e.watch].some(e=>t.startsWith(e)&&/^\.\w+/.test(t.slice(e.length))));function append(e,t){return[...e,...convertToArrayPayload(t)]}function cloneObject(e){let t;var n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(!n&&!isObject$a(e))return e;t=n?[]:{};for(const r in e){if(isFunction(e[r])){t=e;break}t[r]=cloneObject(e[r])}}return t}var fillEmptyArray=e=>Array.isArray(e)?e.map(()=>{}):void 0;function insert(e,t,n){return[...e.slice(0,t),...convertToArrayPayload(n),...e.slice(t)]}var moveArrayAt=(e,t,n)=>Array.isArray(e)?(isUndefined$1(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[];function prepend(e,t){return[...convertToArrayPayload(t),...convertToArrayPayload(e)]}function removeAtIndexes(e,t){let n=0;var r=[...e];for(const i of t)r.splice(i-n,1),n++;return compact(r).length?r:[]}var removeArrayAt=(e,t)=>isUndefined$1(t)?[]:removeAtIndexes(e,convertToArrayPayload(t).sort((e,t)=>e-t)),swapArrayAt=(e,t,n)=>{e[t]=[e[n],e[n]=e[t]][0]},updateAt=(e,t,n)=>(e[t]=n,e);function useFieldArray(e){var t=useFormContext();const{control:o=t.control,name:a,keyName:n="id",shouldUnregister:r}=e,[i,s]=React5.useState(o._getFieldArray(a)),l=React5.useRef(o._getFieldArray(a).map(generateId));e=React5.useRef(i);const c=React5.useRef(a),u=React5.useRef(!1),d=(c.current=a,e.current=i,o._names.array.add(a),useSubscribe({callback:React5.useCallback(({values:e,name:t})=>{t!==c.current&&t||(t=get$1(e,c.current,[]),s(t),l.current=t.map(generateId))},[]),subject:o._subjects.array}),React5.useCallback(e=>{u.current=!0,o._updateFieldArray(a,e)},[o,a]));return React5.useEffect(()=>{o._stateFlags.action=!1,isWatched(a,o._names)&&o._subjects.state.next({}),u.current&&o._executeSchema([a]).then(e=>{e=get$1(e.errors,a);e&&e.type&&!get$1(o._formState.errors,a)&&(set$2(o._formState.errors,a,e),o._subjects.state.next({errors:o._formState.errors}))}),o._subjects.watch.next({name:a,values:o._formValues}),o._names.focus&&focusFieldBy(o._fields,e=>e.startsWith(o._names.focus)),o._names.focus="",o._proxyFormState.isValid&&o._updateValid()},[i,a,o]),React5.useEffect(()=>(get$1(o._formValues,a)||o._updateFieldArray(a),()=>{(o._options.shouldUnregister||r)&&o.unregister(a)}),[a,o,n,r]),{swap:React5.useCallback((e,t)=>{var n=o._getFieldArray(a);swapArrayAt(n,e,t),swapArrayAt(l.current,e,t),d(n),s(n),o._updateFieldArray(a,n,swapArrayAt,{argA:e,argB:t},!1)},[d,a,o]),move:React5.useCallback((e,t)=>{var n=o._getFieldArray(a);moveArrayAt(n,e,t),moveArrayAt(l.current,e,t),d(n),s(n),o._updateFieldArray(a,n,moveArrayAt,{argA:e,argB:t},!1)},[d,a,o]),prepend:React5.useCallback((e,t)=>{var n=convertToArrayPayload(cloneObject(e)),r=prepend(o._getFieldArray(a),n);o._names.focus=getFocusFieldName(a,0,t),l.current=prepend(l.current,n.map(generateId)),d(r),s(r),o._updateFieldArray(a,r,prepend,{argA:fillEmptyArray(e)})},[d,a,o]),append:React5.useCallback((e,t)=>{var n=convertToArrayPayload(cloneObject(e)),r=append(o._getFieldArray(a),n);o._names.focus=getFocusFieldName(a,r.length-1,t),l.current=append(l.current,n.map(generateId)),d(r),s(r),o._updateFieldArray(a,r,append,{argA:fillEmptyArray(e)})},[d,a,o]),remove:React5.useCallback(e=>{var t=removeArrayAt(o._getFieldArray(a),e);l.current=removeArrayAt(l.current,e),d(t),s(t),o._updateFieldArray(a,t,removeArrayAt,{argA:e})},[d,a,o]),insert:React5.useCallback((e,t,n)=>{var r=convertToArrayPayload(cloneObject(t)),i=insert(o._getFieldArray(a),e,r);o._names.focus=getFocusFieldName(a,e,n),l.current=insert(l.current,e,r.map(generateId)),d(i),s(i),o._updateFieldArray(a,i,insert,{argA:e,argB:fillEmptyArray(t)})},[d,a,o]),update:React5.useCallback((n,e)=>{var e=cloneObject(e),t=updateAt(o._getFieldArray(a),n,e);l.current=[...t].map((e,t)=>e&&t!==n?l.current[t]:generateId()),d(t),s([...t]),o._updateFieldArray(a,t,updateAt,{argA:n,argB:e},!0,!1)},[d,a,o]),replace:React5.useCallback(e=>{e=convertToArrayPayload(cloneObject(e));l.current=e.map(generateId),d([...e]),s([...e]),o._updateFieldArray(a,[...e],e=>e,{},!0,!1)},[d,a,o]),fields:React5.useMemo(()=>i.map((e,t)=>({...e,[n]:l.current[t]||generateId()})),[i,n])}}function createSubject(){let n=[];return{get observers(){return n},next:e=>{for(const t of n)t.next(e)},subscribe:t=>(n.push(t),{unsubscribe:()=>{n=n.filter(e=>e!==t)}}),unsubscribe:()=>{n=[]}}}var isPrimitive=e=>isNullOrUndefined(e)||!isObjectType(e);function deepEqual(e,t){if(isPrimitive(e)||isPrimitive(t))return e===t;if(isDateObject(e)&&isDateObject(t))return e.getTime()===t.getTime();var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const a of n){var i=e[a];if(!r.includes(a))return!1;if("ref"!==a){var o=t[a];if(isDateObject(i)&&isDateObject(o)||isObject$a(i)&&isObject$a(o)||Array.isArray(i)&&Array.isArray(o)?!deepEqual(i,o):i!==o)return!1}}return!0}var getValidationModes=e=>({isOnSubmit:!e||e===VALIDATION_MODE.onSubmit,isOnBlur:e===VALIDATION_MODE.onBlur,isOnChange:e===VALIDATION_MODE.onChange,isOnAll:e===VALIDATION_MODE.all,isOnTouch:e===VALIDATION_MODE.onTouched}),isBoolean=e=>"boolean"==typeof e,isFileInput=e=>"file"===e.type,isHTMLElement=e=>e instanceof HTMLElement,isMultipleSelect=e=>"select-multiple"===e.type,isRadioInput=e=>"radio"===e.type,isRadioOrCheckbox=e=>isRadioInput(e)||isCheckBoxInput(e),isWeb="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document,live=e=>isHTMLElement(e)&&e.isConnected;function baseGet(e,t){var n=t.slice(0,-1).length;let r=0;for(;r<n;)e=isUndefined$1(e)?r++:e[t[r++]];return e}function unset(r,e){var i=isKey(e)?[e]:stringToPath(e),e=1==i.length?r:baseGet(r,i),t=i[i.length-1];let o;e&&delete e[t];for(let n=0;n<i.slice(0,-1).length;n++){let e=-1,t;var a=i.slice(0,-(n+1)),s=a.length-1;for(0<n&&(o=r);++e<a.length;){var l=a[e];t=(t||r)[l],s===e&&(isObject$a(t)&&isEmptyObject(t)||Array.isArray(t)&&!t.filter(e=>!isUndefined$1(e)).length)&&(o?delete o[l]:delete r[l]),o=t}}return r}function markFieldsDirty(e,t={}){var n=Array.isArray(e);if(isObject$a(e)||n)for(const r in e)Array.isArray(e[r])||isObject$a(e[r])&&!objectHasFunction(e[r])?(t[r]=Array.isArray(e[r])?[]:{},markFieldsDirty(e[r],t[r])):isNullOrUndefined(e[r])||(t[r]=!0);return t}function getDirtyFieldsFromDefaultValues(e,t,n){var r=Array.isArray(e);if(isObject$a(e)||r)for(const i in e)Array.isArray(e[i])||isObject$a(e[i])&&!objectHasFunction(e[i])?isUndefined$1(t)||isPrimitive(n[i])?n[i]=Array.isArray(e[i])?markFieldsDirty(e[i],[]):{...markFieldsDirty(e[i])}:getDirtyFieldsFromDefaultValues(e[i],isNullOrUndefined(t)?{}:t[i],n[i]):n[i]=!deepEqual(e[i],t[i]);return n}var getDirtyFields=(e,t)=>getDirtyFieldsFromDefaultValues(e,t,markFieldsDirty(t));const defaultResult={value:!1,isValid:!1},validResult={value:!0,isValid:!0};var getCheckboxValue=e=>{var t;return Array.isArray(e)?1<e.length?{value:t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value),isValid:!!t.length}:e[0].checked&&!e[0].disabled?!e[0].attributes||isUndefined$1(e[0].attributes.value)||isUndefined$1(e[0].value)||""===e[0].value?validResult:{value:e[0].value,isValid:!0}:defaultResult:defaultResult},getFieldValueAs=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>isUndefined$1(e)?e:t?""===e?NaN:+e:n&&isString$1(e)?new Date(e):r?r(e):e;const defaultReturn={isValid:!1,value:null};var getRadioValue=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,defaultReturn):defaultReturn;function getFieldValue(e){var t=e.ref;if(e.refs?!e.refs.every(e=>e.disabled):!t.disabled)return isFileInput(t)?t.files:isRadioInput(t)?getRadioValue(e.refs).value:isMultipleSelect(t)?[...t.selectedOptions].map(({value:e})=>e):isCheckBoxInput(t)?getCheckboxValue(e.refs).value:getFieldValueAs((isUndefined$1(t.value)?e.ref:t).value,e)}var getResolverOptions=(e,t,n,r)=>{var i={};for(const a of e){var o=get$1(t,a);o&&set$2(i,a,o._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},isRegex=e=>e instanceof RegExp,getRuleValue=e=>isUndefined$1(e)?void 0:isRegex(e)?e.source:isObject$a(e)?isRegex(e.value)?e.value.source:e.value:e,hasValidation=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function schemaErrorLookup(e,t,n){var r=get$1(e,n);if(r||isKey(n))return{error:r,name:n};for(var i=n.split(".");i.length;){var o=i.join("."),a=get$1(t,o),s=get$1(e,o);if(a&&!Array.isArray(a)&&n!==o)return{name:n};if(s&&s.type)return{name:o,error:s};i.pop()}return{name:n}}var skipValidation=(e,t,n,r,i)=>!i.isOnAll&&(!n&&i.isOnTouch?!(t||e):(n?r:i).isOnBlur?!e:!(n?r:i).isOnChange||e),unsetEmptyArray=(e,t)=>!compact(get$1(e,t)).length&&unset(e,t),isMessage=e=>isString$1(e)||React5.isValidElement(e);function getValidateError(e,t,n="validate"){if(isMessage(e)||Array.isArray(e)&&e.every(isMessage)||isBoolean(e)&&!e)return{type:n,message:isMessage(e)?e:"",ref:t}}var getValueAndMessage=e=>isObject$a(e)&&!isRegex(e)?e:{value:e,message:""},validateField=async(n,r,i,t)=>{const{ref:o,refs:e,required:a,maxLength:s,minLength:l,min:c,max:u,pattern:d,validate:p,name:f,valueAsNumber:h,mount:m,disabled:g}=n._f;if(!m||g)return{};const y=e?e[0]:o;var v=e=>{t&&y.reportValidity&&(y.setCustomValidity(isBoolean(e)?"":e||" "),y.reportValidity())};const x={};var n=isRadioInput(o),b=isCheckBoxInput(o),$=n||b,C=(h||isFileInput(o))&&!o.value||""===r||Array.isArray(r)&&!r.length;const S=appendErrors.bind(null,f,i,x);var w=(e,t,n,r=INPUT_VALIDATION_RULES.maxLength,i=INPUT_VALIDATION_RULES.minLength)=>{t=e?t:n;x[f]={type:e?r:i,message:t,ref:o,...S(e?r:i,t)}};if(a&&(!$&&(C||isNullOrUndefined(r))||isBoolean(r)&&!r||b&&!getCheckboxValue(e).isValid||n&&!getRadioValue(e).isValid)){var{value:$,message:b}=isMessage(a)?{value:!!a,message:a}:getValueAndMessage(a);if($&&(x[f]={type:INPUT_VALIDATION_RULES.required,message:b,ref:y,...S(INPUT_VALIDATION_RULES.required,b)},!i))return v(b),x}if(!(C||isNullOrUndefined(c)&&isNullOrUndefined(u))){let e,t;n=getValueAndMessage(u),$=getValueAndMessage(c);if(isNaN(r)?(b=o.valueAsDate||new Date(r),isString$1(n.value)&&(e=b>new Date(n.value)),isString$1($.value)&&(t=b<new Date($.value))):(b=o.valueAsNumber||+r,isNullOrUndefined(n.value)||(e=b>n.value),isNullOrUndefined($.value)||(t=b<$.value)),(e||t)&&(w(!!e,n.message,$.message,INPUT_VALIDATION_RULES.max,INPUT_VALIDATION_RULES.min),!i))return v(x[f].message),x}if((s||l)&&!C&&isString$1(r)){var b=getValueAndMessage(s),n=getValueAndMessage(l),$=!isNullOrUndefined(b.value)&&r.length>b.value,_=!isNullOrUndefined(n.value)&&r.length<n.value;if(($||_)&&(w($,b.message,n.message),!i))return v(x[f].message),x}if(d&&!C&&isString$1(r)){var{value:_,message:w}=getValueAndMessage(d);if(isRegex(_)&&!r.match(_)&&(x[f]={type:INPUT_VALIDATION_RULES.pattern,message:w,ref:o,...S(INPUT_VALIDATION_RULES.pattern,w)},!i))return v(w),x}if(p)if(isFunction(p)){$=getValidateError(await p(r),y);if($&&(x[f]={...$,...S(INPUT_VALIDATION_RULES.validate,$.message)},!i))return v($.message),x}else if(isObject$a(p)){let e={};for(const E in p){if(!isEmptyObject(e)&&!i)break;var T=getValidateError(await p[E](r),y,E);T&&(e={...T,...S(E,T.message)},v(T.message),i)&&(x[f]=e)}if(!isEmptyObject(e)&&(x[f]={ref:y,...e},!i))return x}return v(!0),x};const defaultOptions$1={mode:VALIDATION_MODE.onSubmit,reValidateMode:VALIDATION_MODE.onChange,shouldFocusError:!0};function createFormControl(c={}){let u={...defaultOptions$1,...c},d={isDirty:!1,isValidating:!1,dirtyFields:{},isSubmitted:!1,submitCount:0,touchedFields:{},isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,errors:{}},p={},f=cloneObject(u.defaultValues)||{},h=u.shouldUnregister?{}:cloneObject(f),s={action:!1,mount:!1,watch:!1},m={mount:new Set,unMount:new Set,array:new Set,watch:new Set},g,y=0,v={};const x={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},b={watch:createSubject(),array:createSubject(),state:createSubject()},$=getValidationModes(u.mode),C=getValidationModes(u.reValidateMode),S=u.criteriaMode===VALIDATION_MODE.all,w=async e=>{let t=!1;return x.isValid&&(t=u.resolver?isEmptyObject((await j()).errors):await l(p,!0),e||t===d.isValid||(d.isValid=t,b.state.next({isValid:t}))),t};const _=(e,t)=>(set$2(d.errors,e,t),b.state.next({errors:d.errors})),a=(e,t,n,r)=>{var i=get$1(p,e);i&&(n=get$1(h,e,isUndefined$1(n)?get$1(f,e):n),isUndefined$1(n)||r&&r.defaultChecked||t?set$2(h,e,t?n:getFieldValue(i._f)):I(e,n),s.mount)&&w()},T=(e,t,n,r,i)=>{let o=!1;var a,s={name:e},l=get$1(d.touchedFields,e);return x.isDirty&&(a=d.isDirty,d.isDirty=s.isDirty=R(),o=a!==s.isDirty),!x.dirtyFields||n&&!r||(a=get$1(d.dirtyFields,e),deepEqual(get$1(f,e),t)?unset(d.dirtyFields,e):set$2(d.dirtyFields,e,!0),s.dirtyFields=d.dirtyFields,o=o||a!==get$1(d.dirtyFields,e)),n&&!l&&(set$2(d.touchedFields,e,n),s.touchedFields=d.touchedFields,o=o||x.touchedFields&&l!==n),o&&i&&b.state.next(s),o?s:{}},E=async(e,t,n,r,i)=>{var o,a,s=get$1(d.errors,t),l=x.isValid&&d.isValid!==n;c.delayError&&r?(g=g||(o=_,a=c.delayError,(...e)=>{clearTimeout(y),y=window.setTimeout(()=>o(...e),a)}))(t,r):(clearTimeout(y),r?set$2(d.errors,t,r):unset(d.errors,t)),(r?deepEqual(s,r):!s)&&isEmptyObject(i)&&!l||e||(r={...i,...l?{isValid:n}:{},errors:d.errors,name:t},d={...d,...r},b.state.next(r)),v[t]--,x.isValidating&&!Object.values(v).some(e=>e)&&(b.state.next({isValidating:!1}),v={})},j=async e=>u.resolver?await u.resolver({...h},u.context,getResolverOptions(e||m.mount,p,u.criteriaMode,u.shouldUseNativeValidation)):{},l=async(e,t,n={valid:!0})=>{for(const i in e){var r=e[i];if(r){const{_f:o,...a}=r;if(o){r=await validateField(r,get$1(h,o.name),S,u.shouldUseNativeValidation);if(r[o.name]&&(n.valid=!1,t))break;t||(r[o.name]?set$2(d.errors,o.name,r[o.name]):unset(d.errors,o.name))}a&&await l(a,t,n)}}return n.valid};const R=(e,t)=>(e&&t&&set$2(h,e,t),!deepEqual(i(),f)),r=(e,t,n)=>{t={...s.mount?h:isUndefined$1(t)?f:isString$1(e)?{[e]:t}:t};return generateWatchOutput(e,m,t,n)};const I=(e,t,n={})=>{var r=get$1(p,e);let i=t;r&&(r=r._f)&&(r.disabled||set$2(h,e,getFieldValueAs(t,r)),i=isWeb&&isHTMLElement(r.ref)&&isNullOrUndefined(t)?"":t,isMultipleSelect(r.ref)?[...r.ref.options].forEach(e=>e.selected=i.includes(e.value)):r.refs?isCheckBoxInput(r.ref)?1<r.refs.length?r.refs.forEach(t=>!t.disabled&&(t.checked=Array.isArray(i)?!!i.find(e=>e===t.value):i===t.value)):r.refs[0]&&(r.refs[0].checked=!!i):r.refs.forEach(e=>e.checked=e.value===i):isFileInput(r.ref)?r.ref.value="":(r.ref.value=i,r.ref.type||b.watch.next({name:e}))),(n.shouldDirty||n.shouldTouch)&&T(e,i,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&k(e)},O=(e,t,n)=>{for(const a in t){var r=t[a],i=e+"."+a,o=get$1(p,i);(!m.array.has(e)&&isPrimitive(r)&&(!o||o._f)||isDateObject(r)?I:O)(i,r,n)}},n=(e,t,n={})=>{var r=get$1(p,e),i=m.array.has(e),t=cloneObject(t);set$2(h,e,t),i?(b.array.next({name:e,values:h}),(x.isDirty||x.dirtyFields)&&n.shouldDirty&&(d.dirtyFields=getDirtyFields(f,h),b.state.next({name:e,dirtyFields:d.dirtyFields,isDirty:R(e,t)}))):(!r||r._f||isNullOrUndefined(t)?I:O)(e,t,n),isWatched(e,m)&&b.state.next({}),b.watch.next({name:e})},t=async n=>{var r=n.target;let i=r.name;var o=get$1(p,i);if(o){let e,t;var r=r.type?getFieldValue(o._f):getEventValue(n),a=n.type===EVENTS.BLUR||n.type===EVENTS.FOCUS_OUT,s=!hasValidation(o._f)&&!u.resolver&&!get$1(d.errors,i)&&!o._f.deps||skipValidation(a,get$1(d.touchedFields,i),d.isSubmitted,C,$),l=isWatched(i,m,a),r=(set$2(h,i,r),a?o._f.onBlur&&o._f.onBlur(n):o._f.onChange&&o._f.onChange(n),T(i,r,a,!1)),c=!isEmptyObject(r)||l;if(a||b.watch.next({name:i,type:n.type}),s)return c&&b.state.next({name:i,...l?{}:r});!a&&l&&b.state.next({}),v[i]=(v[i],1),b.state.next({isValidating:!0}),t=u.resolver?(n=(await j([i]))["errors"],s=schemaErrorLookup(d.errors,p,i),c=schemaErrorLookup(n,p,s.name||i),e=c.error,i=c.name,isEmptyObject(n)):(e=(await validateField(o,get$1(h,i),S,u.shouldUseNativeValidation))[i],await w(!0)),o._f.deps&&k(o._f.deps),E(!1,i,t,e,r)}},k=async(e,t={})=>{let n,r;var i=convertToArrayPayload(e);if(b.state.next({isValidating:!0}),u.resolver){const o=await(async e=>{var t=(await j())["errors"];if(e)for(const r of e){var n=get$1(t,r);n?set$2(d.errors,r,n):unset(d.errors,r)}else d.errors=t;return t})(isUndefined$1(e)?e:i);n=isEmptyObject(o),r=e?!i.some(e=>get$1(o,e)):n}else e?((r=(await Promise.all(i.map(async e=>{var t=get$1(p,e);return l(t&&t._f?{[e]:t}:t)}))).every(Boolean))||d.isValid)&&w():r=n=await l(p);return b.state.next({...!isString$1(e)||x.isValid&&n!==d.isValid?{}:{name:e},...u.resolver?{isValid:n}:{},errors:d.errors,isValidating:!1}),t.shouldFocus&&!r&&focusFieldBy(p,e=>get$1(d.errors,e),e?i:m.mount),r},i=e=>{const t={...f,...s.mount?h:{}};return isUndefined$1(e)?t:isString$1(e)?get$1(t,e):e.map(e=>get$1(t,e))};var e=(e,t)=>({invalid:!!get$1((t||d).errors,e),isDirty:!!get$1((t||d).dirtyFields,e),isTouched:!!get$1((t||d).touchedFields,e),error:get$1((t||d).errors,e)});const o=(e,t={})=>{for(const n of e?convertToArrayPayload(e):m.mount)m.mount.delete(n),m.array.delete(n),get$1(p,n)&&(t.keepValue||(unset(p,n),unset(h,n)),t.keepError||unset(d.errors,n),t.keepDirty||unset(d.dirtyFields,n),t.keepTouched||unset(d.touchedFields,n),u.shouldUnregister||t.keepDefaultValue||unset(f,n));b.watch.next({}),b.state.next({...d,...t.keepDirty?{isDirty:R()}:{}}),t.keepIsValid||w()},A=(r,i={})=>{let o=get$1(p,r);var e=isBoolean(i.disabled);return set$2(p,r,{_f:{...o&&o._f?o._f:{ref:{name:r}},name:r,mount:!0,...i}}),m.mount.add(r),o?e&&set$2(h,r,i.disabled?void 0:get$1(h,r,getFieldValue(o._f))):a(r,!0,i.value),{...e?{disabled:i.disabled}:{},...u.shouldUseNativeValidation?{required:!!i.required,min:getRuleValue(i.min),max:getRuleValue(i.max),minLength:getRuleValue(i.minLength),maxLength:getRuleValue(i.maxLength),pattern:getRuleValue(i.pattern)}:{},name:r,onChange:t,onBlur:t,ref:e=>{if(e){A(r,i),o=get$1(p,r);const n=isUndefined$1(e.value)&&e.querySelectorAll&&e.querySelectorAll("input,select,textarea")[0]||e;var e=isRadioOrCheckbox(n),t=o._f.refs||[];(e?t.find(e=>e===n):n===o._f.ref)||(set$2(p,r,{_f:{...o._f,...e?{refs:[...t.filter(live),n],ref:{type:n.type,name:r}}:{ref:n}}}),a(r,!1,void 0,n))}else(o=get$1(p,r,{}))._f&&(o._f.mount=!1),!u.shouldUnregister&&!i.shouldUnregister||isNameInFieldArray(m.array,r)&&s.action||m.unMount.add(r)}}};return{control:{register:A,unregister:o,getFieldState:e,_executeSchema:j,_getWatch:r,_getDirty:R,_updateValid:w,_removeUnmounted:()=>{for(const t of m.unMount){var e=get$1(p,t);e&&(e._f.refs?e._f.refs.every(e=>!live(e)):!live(e._f.ref))&&o(t)}m.unMount=new Set},_updateFieldArray:(e,t=[],n,r,i=!0,o=!0)=>{var a;r&&n?(s.action=!0,o&&Array.isArray(get$1(p,e))&&(a=n(get$1(p,e),r.argA,r.argB),i)&&set$2(p,e,a),x.errors&&o&&Array.isArray(get$1(d.errors,e))&&(a=n(get$1(d.errors,e),r.argA,r.argB),i&&set$2(d.errors,e,a),unsetEmptyArray(d.errors,e)),x.touchedFields&&o&&Array.isArray(get$1(d.touchedFields,e))&&(a=n(get$1(d.touchedFields,e),r.argA,r.argB),i)&&set$2(d.touchedFields,e,a),x.dirtyFields&&(d.dirtyFields=getDirtyFields(f,h)),b.state.next({isDirty:R(e,t),dirtyFields:d.dirtyFields,errors:d.errors,isValid:d.isValid})):set$2(h,e,t)},_getFieldArray:e=>compact(get$1(s.mount?h:f,e,c.shouldUnregister?get$1(f,e,[]):[])),_subjects:b,_proxyFormState:x,get _fields(){return p},get _formValues(){return h},get _stateFlags(){return s},set _stateFlags(e){s=e},get _defaultValues(){return f},get _names(){return m},set _names(e){m=e},get _formState(){return d},set _formState(e){d=e},get _options(){return u},set _options(e){u={...u,...e}}},trigger:k,register:A,handleSubmit:(o,a)=>async e=>{e&&(e.preventDefault&&e.preventDefault(),e.persist)&&e.persist();let t=!0,n=cloneObject(h);b.state.next({isSubmitting:!0});try{var r,i;u.resolver?({errors:r,values:i}=await j(),d.errors=r,n=i):await l(p),isEmptyObject(d.errors)&&Object.keys(d.errors).every(e=>get$1(n,e))?(b.state.next({errors:{},isSubmitting:!0}),await o(n,e)):(a&&await a({...d.errors},e),u.shouldFocusError&&focusFieldBy(p,e=>get$1(d.errors,e),m.mount))}catch(e){throw t=!1,e}finally{d.isSubmitted=!0,b.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:isEmptyObject(d.errors)&&t,submitCount:d.submitCount+1,errors:d.errors})}},watch:(t,n)=>isFunction(t)?b.watch.subscribe({next:e=>t(r(void 0,n),e)}):r(t,n,!0),setValue:n,getValues:i,reset:(e,t={})=>{var n=e||f,r=cloneObject(n),i=e&&!isEmptyObject(e)?r:f;if(t.keepDefaultValues||(f=n),!t.keepValues){if(isWeb&&isUndefined$1(e))for(const a of m.mount){var o=get$1(p,a);if(o&&o._f){o=Array.isArray(o._f.refs)?o._f.refs[0]:o._f.ref;try{isHTMLElement(o)&&o.closest("form").reset();break}catch(e){}}}h=c.shouldUnregister?t.keepDefaultValues?cloneObject(f):{}:r,p={},b.array.next({values:i}),b.watch.next({values:i})}m={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!x.isValid||!!t.keepIsValid,s.watch=!!c.shouldUnregister,b.state.next({submitCount:t.keepSubmitCount?d.submitCount:0,isDirty:t.keepDirty?d.isDirty:!!t.keepDefaultValues&&!deepEqual(e,f),isSubmitted:!!t.keepIsSubmitted&&d.isSubmitted,dirtyFields:t.keepDirty?d.dirtyFields:t.keepDefaultValues&&e?Object.entries(e).reduce((e,[t,n])=>({...e,[t]:n!==get$1(f,t)}),{}):{},touchedFields:t.keepTouched?d.touchedFields:{},errors:t.keepErrors?d.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},resetField:(e,t={})=>{get$1(p,e)&&(isUndefined$1(t.defaultValue)?n(e,get$1(f,e)):(n(e,t.defaultValue),set$2(f,e,t.defaultValue)),t.keepTouched||unset(d.touchedFields,e),t.keepDirty||(unset(d.dirtyFields,e),d.isDirty=t.defaultValue?R(e,get$1(f,e)):R()),t.keepError||(unset(d.errors,e),x.isValid&&w()),b.state.next({...d}))},clearErrors:e=>{e?convertToArrayPayload(e).forEach(e=>unset(d.errors,e)):d.errors={},b.state.next({errors:d.errors})},unregister:o,setError:(e,t,n)=>{var r=(get$1(p,e,{_f:{}})._f||{}).ref;set$2(d.errors,e,{...t,ref:r}),b.state.next({name:e,errors:d.errors,isValid:!1}),n&&n.shouldFocus&&r&&r.focus&&r.focus()},setFocus:(e,t={})=>{e=get$1(p,e)._f,e=e.refs?e.refs[0]:e.ref;t.shouldSelect?e.select():e.focus()},getFieldState:e}}function useForm(e={}){var t=React5.useRef();const[n,r]=React5.useState({isDirty:!1,isValidating:!1,dirtyFields:{},isSubmitted:!1,submitCount:0,touchedFields:{},isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,errors:{}}),i=(t.current?t.current.control._options=e:t.current={...createFormControl(e),formState:n},t.current.control);e=React5.useCallback(e=>{shouldRenderFormState(e,i._proxyFormState,!0)&&(i._formState={...i._formState,...e},r({...i._formState}))},[i]);return useSubscribe({subject:i._subjects.state,callback:e}),React5.useEffect(()=>{i._stateFlags.mount||(i._proxyFormState.isValid&&i._updateValid(),i._stateFlags.mount=!0),i._stateFlags.watch&&(i._stateFlags.watch=!1,i._subjects.state.next({})),i._removeUnmounted()}),t.current.formState=getProxyFormState(n,i._proxyFormState),t.current}var baseIteratee$1=_baseIteratee,isArrayLike=isArrayLike_1,keys$1=keys_1;function createFind$1(o){return function(e,t,n){var r,i=Object(e),t=(isArrayLike(e)||(r=baseIteratee$1(t),e=keys$1(e),t=function(e){return r(i[e],e,i)}),o(e,t,n));return-1<t?i[r?e[t]:t]:void 0}}var _createFind=createFind$1;function baseFindIndex$1(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}var _baseFindIndex=baseFindIndex$1,baseFindIndex=_baseFindIndex,baseIteratee=_baseIteratee,toInteger$1=toInteger_1,nativeMax$1=Math.max;function findIndex$4(e,t,n){var r=null==e?0:e.length;return r?((n=null==n?0:toInteger$1(n))<0&&(n=nativeMax$1(r+n,0)),baseFindIndex(e,baseIteratee(t),n)):-1}var findIndex_1=findIndex$4,createFind=_createFind,findIndex$3=findIndex_1,find$1=_createFind(findIndex_1),find_1=find$1;function arrayIncludes$1(t,e){return Array.isArray(e)?e.every(e=>-1!==t.indexOf(e)):-1!==t.indexOf(e)}const onSpaceOrEnter=(t,n)=>e=>{"Enter"!==e.key&&" "!==e.key||(t(e),e.preventDefault(),e.stopPropagation()),n&&n(e)};function getPickersMonthUtilityClass(e){return generateUtilityClass("PrivatePickersMonth",e)}const pickersMonthClasses=generateUtilityClasses("PrivatePickersMonth",["root","selected"]),_excluded$a=["disabled","onSelect","selected","value","tabIndex","hasFocus","onFocus","onBlur"],useUtilityClasses$b=e=>{var{classes:e,selected:t}=e;return composeClasses({root:["root",t&&"selected"]},getPickersMonthUtilityClass,e)},PickersMonthRoot=styled$1(Typography$1,{name:"PrivatePickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root,{["&."+pickersMonthClasses.selected]:t.selected}]})(({theme:e})=>_extends$3({flex:"1 0 33.33%",display:"flex",alignItems:"center",justifyContent:"center",color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,borderRadius:18,cursor:"pointer","&:focus, &:hover":{backgroundColor:alpha(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{pointerEvents:"none",color:e.palette.text.secondary},["&."+pickersMonthClasses.selected]:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:focus, &:hover":{backgroundColor:e.palette.primary.dark}}})),noop$5=()=>{},PickersMonth=e=>{const{disabled:t,onSelect:n,selected:r,value:i,tabIndex:o,hasFocus:a,onFocus:s=noop$5,onBlur:l=noop$5}=e,c=_objectWithoutPropertiesLoose$2(e,_excluded$a);var e=useUtilityClasses$b(e),u=()=>{n(i)};const d=react$1.exports.useRef(null);return useEnhancedEffect$3(()=>{var e;a&&null!=(e=d.current)&&e.focus()},[a]),jsxRuntime.exports.jsx(PickersMonthRoot,_extends$3({ref:d,component:"button",type:"button",className:e.root,tabIndex:o,onClick:u,onKeyDown:onSpaceOrEnter(u),color:r?"primary":void 0,variant:r?"h5":"subtitle1",disabled:t,onFocus:e=>s(e,i),onBlur:e=>l(e,i)},c))},getPickersLocalization=e=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:_extends$3({},e)}}}}),enUSPickers={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"open previous view",openNextView:"open next view",calendarViewSwitchingButtonAriaLabel:e=>"year"===e?"year view is open, switch to calendar view":"calendar view is open, switch to year view",inputModeToggleButtonAriaLabel:(e,t)=>e?`text input view is open, go to ${t} view`:t+" view is open, go to text input view",start:"Start",end:"End",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerDefaultToolbarTitle:"Select date",dateTimePickerDefaultToolbarTitle:"Select date & time",timePickerDefaultToolbarTitle:"Select time",dateRangePickerDefaultToolbarTitle:"Select date range",clockLabelText:(e,t,n)=>`Select ${e}. `+(null===t?"No time selected":"Selected time is "+n.format(t,"fullTime")),hoursClockNumberText:e=>e+" hours",minutesClockNumberText:e=>e+" minutes",secondsClockNumberText:e=>e+" seconds",openDatePickerDialogue:(e,t)=>e&&t.isValid(t.date(e))?"Choose date, selected date is "+t.format(t.date(e),"fullDate"):"Choose date",openTimePickerDialogue:(e,t)=>e&&t.isValid(t.date(e))?"Choose time, selected time is "+t.format(t.date(e),"fullTime"):"Choose time",timeTableLabel:"pick time",dateTableLabel:"pick date"},DEFAULT_LOCALE=enUSPickers,MuiPickersAdapterContext=(getPickersLocalization(enUSPickers),react$1.exports.createContext(null));function LocalizationProvider(e){const{children:t,dateAdapter:n,dateFormats:r,dateLibInstance:i,locale:o,adapterLocale:a,localeText:s}=useThemeProps({props:e,name:"MuiLocalizationProvider"}),l=react$1.exports.useMemo(()=>new n({locale:null!=a?a:o,formats:r,instance:i}),[n,o,a,r,i]),c=react$1.exports.useMemo(()=>({minDate:l.date("1900-01-01T00:00:00.000"),maxDate:l.date("2099-12-31T00:00:00.000")}),[l]);e=react$1.exports.useMemo(()=>({utils:l,defaultDates:c,localeText:_extends$3({},DEFAULT_LOCALE,null!=s?s:{})}),[c,l,s]);return jsxRuntime.exports.jsx(MuiPickersAdapterContext.Provider,{value:e,children:t})}const useLocalizationContext=()=>{var e=react$1.exports.useContext(MuiPickersAdapterContext);if(null===e)throw new Error("MUI: Can not find utils in context. It looks like you forgot to wrap your component in LocalizationProvider, or pass dateAdapter prop directly.");return e},useUtils=()=>useLocalizationContext().utils,useDefaultDates=()=>useLocalizationContext().defaultDates,useLocaleText=()=>useLocalizationContext().localeText,useNow=()=>{var e=useUtils();return react$1.exports.useRef(e.date()).current};function getMonthPickerUtilityClass(e){return generateUtilityClass("MuiMonthPicker",e)}generateUtilityClasses("MuiMonthPicker",["root"]);const findClosestEnabledDate=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:i,isDateDisabled:o,utils:a})=>{var s=a.startOfDay(a.date());n&&a.isBefore(i,s)&&(i=s),t&&a.isAfter(r,s)&&(r=s);let l=e,c=e;for(a.isBefore(e,i)&&(l=a.date(i),c=null),a.isAfter(e,r)&&(c=c&&a.date(r),l=null);l||c;){if(l&&a.isAfter(l,r)&&(l=null),c&&a.isBefore(c,i)&&(c=null),l){if(!o(l))return l;l=a.addDays(l,1)}if(c){if(!o(c))return c;c=a.addDays(c,-1)}}return null},parseNonNullablePickerDate=(e,t,n)=>{return null!=t&&(t=e.date(t),e.isValid(t))?t:n},_excluded$9=["className","date","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange"],useUtilityClasses$a=e=>{e=e.classes;return composeClasses({root:["root"]},getMonthPickerUtilityClass,e)};function useMonthPickerDefaultizedProps(e,t){var n=useUtils(),r=useDefaultDates(),e=useThemeProps({props:e,name:t});return _extends$3({disableFuture:!1,disablePast:!1},e,{minDate:parseNonNullablePickerDate(n,e.minDate,r.minDate),maxDate:parseNonNullablePickerDate(n,e.maxDate,r.maxDate)})}const MonthPickerRoot=styled$1("div",{name:"MuiMonthPicker",slot:"Root",overridesResolver:(e,t)=>t.root})({width:310,display:"flex",flexWrap:"wrap",alignContent:"stretch",margin:"0 4px"}),MonthPicker=react$1.exports.forwardRef(function(e,t){const r=useUtils(),i=useNow();e=useMonthPickerDefaultizedProps(e,"MuiMonthPicker");const{className:n,date:o,disabled:a,disableFuture:s,disablePast:l,maxDate:c,minDate:u,onChange:d,shouldDisableMonth:p,readOnly:f,disableHighlightToday:h,autoFocus:m=!1,onMonthFocus:g,hasFocus:y,onFocusedViewChange:v}=e,x=_objectWithoutPropertiesLoose$2(e,_excluded$9);var b=useUtilityClasses$a(e);const $=useTheme$2(),C=react$1.exports.useMemo(()=>null!=o?o:r.startOfMonth(i),[i,r,o]),S=react$1.exports.useMemo(()=>null!=o?r.getMonth(o):h?null:r.getMonth(i),[i,o,r,h]),[w,_]=react$1.exports.useState(()=>S||r.getMonth(i)),T=react$1.exports.useCallback(e=>{var t=r.startOfMonth(l&&r.isAfter(i,u)?i:u),n=r.startOfMonth(s&&r.isBefore(i,c)?i:c);return!!r.isBefore(e,t)||!!r.isAfter(e,n)||!!p&&p(e)},[s,l,c,u,i,p,r]),E=e=>{f||(e=r.setMonth(C,e),d(e,"finish"))},[j,R]=useControlled$1({name:"MonthPicker",state:"hasFocus",controlled:y,default:m}),I=react$1.exports.useCallback(e=>{R(e),v&&v(e)},[R,v]),O=react$1.exports.useCallback(e=>{T(r.setMonth(C,e))||(_(e),I(!0),g&&g(e))},[T,r,C,I,g]);react$1.exports.useEffect(()=>{_(e=>null!==S&&e!==S?S:e)},[S]);var k=useEventCallback(e=>{switch(e.key){case"ArrowUp":O((12+w-3)%12),e.preventDefault();break;case"ArrowDown":O((12+w+3)%12),e.preventDefault();break;case"ArrowLeft":O((12+w+("ltr"===$.direction?-1:1))%12),e.preventDefault();break;case"ArrowRight":O((12+w+("ltr"===$.direction?1:-1))%12),e.preventDefault()}});const A=react$1.exports.useCallback((e,t)=>{O(t)},[O]),M=react$1.exports.useCallback(()=>{I(!1)},[I]),L=r.getMonth(i);return jsxRuntime.exports.jsx(MonthPickerRoot,_extends$3({ref:t,className:clsx(b.root,n),ownerState:e,onKeyDown:k},x,{children:r.getMonthArray(C).map(e=>{var t=r.getMonth(e),n=r.format(e,"monthShort"),e=a||T(e);return jsxRuntime.exports.jsx(PickersMonth,{value:t,selected:t===S,tabIndex:t!==w||e?-1:0,hasFocus:j&&t===w,onSelect:E,onFocus:A,onBlur:M,disabled:e,"aria-current":L===t?"date":void 0,children:n},n)})}))}),validateDate$1=({props:e,value:t,adapter:n})=>{var r=n.utils.date(),i=n.utils.date(t),o=parseNonNullablePickerDate(n.utils,e.minDate,n.defaultDates.minDate),a=parseNonNullablePickerDate(n.utils,e.maxDate,n.defaultDates.maxDate);if(null===i)return null;switch(!0){case!n.utils.isValid(t):return"invalidDate";case Boolean(e.shouldDisableDate&&e.shouldDisableDate(i)):return"shouldDisableDate";case Boolean(e.disableFuture&&n.utils.isAfterDay(i,r)):return"disableFuture";case Boolean(e.disablePast&&n.utils.isBeforeDay(i,r)):return"disablePast";case Boolean(o&&n.utils.isBeforeDay(i,o)):return"minDate";case Boolean(a&&n.utils.isAfterDay(i,a)):return"maxDate";default:return null}},useIsDayDisabled=({shouldDisableDate:t,minDate:n,maxDate:r,disableFuture:i,disablePast:o})=>{const a=useLocalizationContext();return react$1.exports.useCallback(e=>null!==validateDate$1({adapter:a,value:e,props:{shouldDisableDate:t,minDate:n,maxDate:r,disableFuture:i,disablePast:o}}),[a,t,n,r,i,o])},createCalendarStateReducer=(r,i,o)=>(e,t)=>{switch(t.type){case"changeMonth":return _extends$3({},e,{slideDirection:t.direction,currentMonth:t.newMonth,isMonthSwitchingAnimating:!r});case"finishMonthSwitchingAnimation":return _extends$3({},e,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":var n;return null!=e.focusedDay&&null!=t.focusedDay&&o.isSameDay(t.focusedDay,e.focusedDay)?e:(n=null!=t.focusedDay&&!i&&!o.isSameMonth(e.currentMonth,t.focusedDay),_extends$3({},e,{focusedDay:t.focusedDay,isMonthSwitchingAnimating:n&&!r&&!t.withoutMonthSwitchingAnimation,currentMonth:n?o.startOfMonth(t.focusedDay):e.currentMonth,slideDirection:null!=t.focusedDay&&o.isAfterDay(t.focusedDay,e.currentMonth)?"left":"right"}));default:throw new Error("missing support")}},useCalendarState=({date:e,defaultCalendarMonth:t,disableFuture:n,disablePast:r,disableSwitchToMonthOnDayFocus:i=!1,maxDate:o,minDate:a,onMonthChange:s,reduceAnimations:l,shouldDisableDate:c})=>{const u=useNow(),d=useUtils();l=react$1.exports.useRef(createCalendarStateReducer(Boolean(l),i,d)).current;const[p,f]=react$1.exports.useReducer(l,{isMonthSwitchingAnimating:!1,focusedDay:e||u,currentMonth:d.startOfMonth(null!=(i=null!=e?e:t)?i:u),slideDirection:"left"}),h=react$1.exports.useCallback(e=>{f(_extends$3({type:"changeMonth"},e)),s&&s(e.newMonth)},[s]);l=react$1.exports.useCallback(e=>{e=null!=e?e:u;d.isSameMonth(e,p.currentMonth)||h({newMonth:d.startOfMonth(e),direction:d.isAfterDay(e,p.currentMonth)?"left":"right"})},[p.currentMonth,h,u,d]);const m=useIsDayDisabled({shouldDisableDate:c,minDate:a,maxDate:o,disableFuture:n,disablePast:r});e=react$1.exports.useCallback(()=>{f({type:"finishMonthSwitchingAnimation"})},[]),t=react$1.exports.useCallback((e,t)=>{m(e)||f({type:"changeFocusedDay",focusedDay:e,withoutMonthSwitchingAnimation:t})},[m]);return{calendarState:p,changeMonth:l,changeFocusedDay:t,isDateDisabled:m,onMonthSwitchingAnimationEnd:e,handleChangeMonth:h}},getPickersFadeTransitionGroupUtilityClass=e=>generateUtilityClass("MuiPickersFadeTransitionGroup",e),useUtilityClasses$9=(generateUtilityClasses("MuiPickersFadeTransitionGroup",["root"]),e=>{e=e.classes;return composeClasses({root:["root"]},getPickersFadeTransitionGroupUtilityClass,e)}),animationDuration=500,PickersFadeTransitionGroupRoot=styled$1(TransitionGroup$1,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function PickersFadeTransitionGroup(e){var e=useThemeProps({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:t,className:n,reduceAnimations:r,transKey:i}=e,e=useUtilityClasses$9(e);return r?t:jsxRuntime.exports.jsx(PickersFadeTransitionGroupRoot,{className:clsx(e.root,n),children:jsxRuntime.exports.jsx(Fade$1,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:animationDuration,enter:animationDuration/2,exit:0},children:t},i)})}const useEnhancedEffect="undefined"!=typeof window?react$1.exports.useLayoutEffect:react$1.exports.useEffect;var useEnhancedEffect$1=useEnhancedEffect;function useControlled({controlled:e,default:t}){const n=react$1.exports.useRef(void 0!==e)["current"],[r,i]=react$1.exports.useState(t);return[n?e:r,react$1.exports.useCallback(e=>{n||i(e)},[])]}const DAY_SIZE=36,DAY_MARGIN=2,DIALOG_WIDTH=320,VIEW_HEIGHT=358;function getPickersDayUtilityClass(e){return generateUtilityClass("MuiPickersDay",e)}const pickersDayClasses=generateUtilityClasses("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),_excluded$8=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today"],useUtilityClasses$8=e=>{var{selected:e,disableMargin:t,disableHighlightToday:n,today:r,disabled:i,outsideCurrentMonth:o,showDaysOutsideCurrentMonth:a,classes:s}=e;return composeClasses({root:["root",e&&"selected",i&&"disabled",!t&&"dayWithMargin",!n&&r&&"today",o&&a&&"dayOutsideMonth",o&&!a&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},getPickersDayUtilityClass,s)},styleArg=({theme:e,ownerState:t})=>_extends$3({},e.typography.caption,{width:DAY_SIZE,height:DAY_SIZE,borderRadius:"50%",padding:0,backgroundColor:e.palette.background.paper,color:e.palette.text.primary,"&:hover":{backgroundColor:alpha(e.palette.action.active,e.palette.action.hoverOpacity)},"&:focus":{backgroundColor:alpha(e.palette.action.active,e.palette.action.hoverOpacity),["&."+pickersDayClasses.selected]:{willChange:"background-color",backgroundColor:e.palette.primary.dark}},["&."+pickersDayClasses.selected]:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,fontWeight:e.typography.fontWeightMedium,transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),"&:hover":{willChange:"background-color",backgroundColor:e.palette.primary.dark}},["&."+pickersDayClasses.disabled]:{color:e.palette.text.disabled}},!t.disableMargin&&{margin:`0 ${DAY_MARGIN}px`},t.outsideCurrentMonth&&t.showDaysOutsideCurrentMonth&&{color:e.palette.text.secondary},!t.disableHighlightToday&&t.today&&{[`&:not(.${pickersDayClasses.selected})`]:{border:"1px solid "+e.palette.text.secondary}}),overridesResolver=(e,t)=>{e=e.ownerState;return[t.root,!e.disableMargin&&t.dayWithMargin,!e.disableHighlightToday&&e.today&&t.today,!e.outsideCurrentMonth&&e.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,e.outsideCurrentMonth&&!e.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},PickersDayRoot=styled$1(ButtonBase$1,{name:"MuiPickersDay",slot:"Root",overridesResolver:overridesResolver})(styleArg),PickersDayFiller=styled$1("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:overridesResolver})(({theme:e,ownerState:t})=>_extends$3({},styleArg({theme:e,ownerState:t}),{opacity:0,pointerEvents:"none"})),noop$4=()=>{},PickersDayRaw=react$1.exports.forwardRef(function(e,t){e=useThemeProps({props:e,name:"MuiPickersDay"});const{autoFocus:n=!1,className:r,day:i,disabled:o=!1,disableHighlightToday:a=!1,disableMargin:s=!1,isAnimating:l,onClick:c,onDaySelect:u,onFocus:d=noop$4,onBlur:p=noop$4,onKeyDown:f=noop$4,onMouseDown:h,outsideCurrentMonth:m,selected:g=!1,showDaysOutsideCurrentMonth:y=!1,children:v,today:x=!1}=e,b=_objectWithoutPropertiesLoose$2(e,_excluded$8);var e=_extends$3({},e,{autoFocus:n,disabled:o,disableHighlightToday:a,disableMargin:s,selected:g,showDaysOutsideCurrentMonth:y,today:x}),$=useUtilityClasses$8(e),C=useUtils();const S=react$1.exports.useRef(null);t=useForkRef(S,t);useEnhancedEffect$1(()=>{!n||o||l||m||S.current.focus()},[n,o,l,m]);return m&&!y?jsxRuntime.exports.jsx(PickersDayFiller,{className:clsx($.root,$.hiddenDaySpacingFiller,r),ownerState:e,role:b.role}):jsxRuntime.exports.jsx(PickersDayRoot,_extends$3({className:clsx($.root,r),ownerState:e,ref:t,centerRipple:!0,disabled:o,tabIndex:g?0:-1,onKeyDown:e=>f(e,i),onFocus:e=>d(e,i),onBlur:e=>p(e,i),onClick:e=>{o||u(i,"finish"),m&&e.currentTarget.focus(),c&&c(e)},onMouseDown:e=>{h&&h(e),m&&e.preventDefault()}},b,{children:v||C.format(i,"dayOfMonth")}))}),areDayPropsEqual=(e,t)=>e.autoFocus===t.autoFocus&&e.isAnimating===t.isAnimating&&e.today===t.today&&e.disabled===t.disabled&&e.selected===t.selected&&e.disableMargin===t.disableMargin&&e.showDaysOutsideCurrentMonth===t.showDaysOutsideCurrentMonth&&e.disableHighlightToday===t.disableHighlightToday&&e.className===t.className&&e.sx===t.sx&&e.outsideCurrentMonth===t.outsideCurrentMonth&&e.onFocus===t.onFocus&&e.onBlur===t.onBlur&&e.onDaySelect===t.onDaySelect,PickersDay=react$1.exports.memo(PickersDayRaw,areDayPropsEqual),getPickersSlideTransitionUtilityClass=e=>generateUtilityClass("PrivatePickersSlideTransition",e),pickersSlideTransitionClasses=generateUtilityClasses("PrivatePickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),_excluded$7=["children","className","reduceAnimations","slideDirection","transKey"],useUtilityClasses$7=e=>{e=e.classes;return composeClasses({root:["root"]},getPickersSlideTransitionUtilityClass,e)},slideAnimationDuration=350,PickersSlideTransitionRoot=styled$1(TransitionGroup$1,{name:"PrivatePickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{["."+pickersSlideTransitionClasses["slideEnter-left"]]:t["slideEnter-left"]},{["."+pickersSlideTransitionClasses["slideEnter-right"]]:t["slideEnter-right"]},{["."+pickersSlideTransitionClasses.slideEnterActive]:t.slideEnterActive},{["."+pickersSlideTransitionClasses.slideExit]:t.slideExit},{["."+pickersSlideTransitionClasses["slideExitActiveLeft-left"]]:t["slideExitActiveLeft-left"]},{["."+pickersSlideTransitionClasses["slideExitActiveLeft-right"]]:t["slideExitActiveLeft-right"]}]})(({theme:e})=>{e=e.transitions.create("transform",{duration:slideAnimationDuration,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},["& ."+pickersSlideTransitionClasses["slideEnter-left"]]:{willChange:"transform",transform:"translate(100%)",zIndex:1},["& ."+pickersSlideTransitionClasses["slideEnter-right"]]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},["& ."+pickersSlideTransitionClasses.slideEnterActive]:{transform:"translate(0%)",transition:e},["& ."+pickersSlideTransitionClasses.slideExit]:{transform:"translate(0%)"},["& ."+pickersSlideTransitionClasses["slideExitActiveLeft-left"]]:{willChange:"transform",transform:"translate(-100%)",transition:e,zIndex:0},["& ."+pickersSlideTransitionClasses["slideExitActiveLeft-right"]]:{willChange:"transform",transform:"translate(100%)",transition:e,zIndex:0}}}),PickersSlideTransition=e=>{var{children:t,className:n,reduceAnimations:r,slideDirection:i,transKey:o}=e,a=_objectWithoutPropertiesLoose$2(e,_excluded$7),e=useUtilityClasses$7(e);if(r)return jsxRuntime.exports.jsx("div",{className:clsx(e.root,n),children:t});const s={exit:pickersSlideTransitionClasses.slideExit,enterActive:pickersSlideTransitionClasses.slideEnterActive,enter:pickersSlideTransitionClasses["slideEnter-"+i],exitActive:pickersSlideTransitionClasses["slideExitActiveLeft-"+i]};return jsxRuntime.exports.jsx(PickersSlideTransitionRoot,{className:clsx(e.root,n),childFactory:e=>react$1.exports.cloneElement(e,{classNames:s}),role:"presentation",children:jsxRuntime.exports.jsx(CSSTransition$1,_extends$3({mountOnEnter:!0,unmountOnExit:!0,timeout:slideAnimationDuration,classNames:s},a,{children:t}),o)})},getDayPickerUtilityClass=e=>generateUtilityClass("MuiDayPicker",e),useUtilityClasses$6=(generateUtilityClasses("MuiDayPicker",["header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer"]),e=>{e=e.classes;return composeClasses({header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"]},getDayPickerUtilityClass,e)}),defaultDayOfWeekFormatter=e=>e.charAt(0).toUpperCase(),weeksContainerHeight=6*(DAY_SIZE+2*DAY_MARGIN),PickersCalendarDayHeader=styled$1("div",{name:"MuiDayPicker",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),PickersCalendarWeekDayLabel=styled$1(Typography$1,{name:"MuiDayPicker",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:e.palette.text.secondary})),PickersCalendarLoadingContainer=styled$1("div",{name:"MuiDayPicker",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:weeksContainerHeight}),PickersCalendarSlideTransition=styled$1(PickersSlideTransition,{name:"MuiDayPicker",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:weeksContainerHeight}),PickersCalendarWeekContainer=styled$1("div",{name:"MuiDayPicker",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),PickersCalendarWeek=styled$1("div",{name:"MuiDayPicker",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:DAY_MARGIN+"px 0",display:"flex",justifyContent:"center"});function DayPicker(e){const i=useNow(),o=useUtils();e=useThemeProps({props:e,name:"MuiDayPicker"});const r=useUtilityClasses$6(e),{onFocusedDayChange:t,className:n,currentMonth:a,selectedDays:s,disabled:l,disableHighlightToday:c,focusedDay:u,isMonthSwitchingAnimating:d,loading:p,onSelectedDaysChange:f,onMonthSwitchingAnimationEnd:h,readOnly:m,reduceAnimations:g,renderDay:y,renderLoading:v=()=>jsxRuntime.exports.jsx("span",{children:"..."}),showDaysOutsideCurrentMonth:x,slideDirection:b,TransitionProps:$,disablePast:C,disableFuture:S,minDate:P,maxDate:N,shouldDisableDate:D,dayOfWeekFormatter:w=defaultDayOfWeekFormatter,hasFocus:_,onFocusedViewChange:T,gridLabelId:F}=e,E=useIsDayDisabled({shouldDisableDate:D,minDate:P,maxDate:N,disablePast:C,disableFuture:S}),[j,V]=react$1.exports.useState(()=>u||i),R=react$1.exports.useCallback(e=>{T&&T(e)},[T]),H=react$1.exports.useCallback((e,t="finish")=>{m||f(e,t)},[f,m]),I=react$1.exports.useCallback(e=>{E(e)||(t(e),V(e),R(!0))},[E,t,R]),O=useTheme();function B(e,t){switch(e.key){case"ArrowUp":I(o.addDays(t,-7)),e.preventDefault();break;case"ArrowDown":I(o.addDays(t,7)),e.preventDefault();break;case"ArrowLeft":var n=o.addDays(t,"ltr"===O.direction?-1:1),r="ltr"===O.direction?o.getPreviousMonth(t):o.getNextMonth(t),r=findClosestEnabledDate({utils:o,date:n,minDate:"ltr"===O.direction?o.startOfMonth(r):n,maxDate:"ltr"===O.direction?n:o.endOfMonth(r),isDateDisabled:E});I(r||n),e.preventDefault();break;case"ArrowRight":r=o.addDays(t,"ltr"===O.direction?1:-1),n="ltr"===O.direction?o.getNextMonth(t):o.getPreviousMonth(t),n=findClosestEnabledDate({utils:o,date:r,minDate:"ltr"===O.direction?r:o.startOfMonth(n),maxDate:"ltr"===O.direction?o.endOfMonth(n):r,isDateDisabled:E});I(n||r),e.preventDefault();break;case"Home":I(o.startOfWeek(t)),e.preventDefault();break;case"End":I(o.endOfWeek(t)),e.preventDefault();break;case"PageUp":I(o.getNextMonth(t)),e.preventDefault();break;case"PageDown":I(o.getPreviousMonth(t)),e.preventDefault()}}function U(e,t){I(t)}function z(e,t){_&&o.isSameDay(j,t)&&R(!1)}const k=o.getMonth(a),A=s.filter(e=>!!e).map(e=>o.startOfDay(e));var e=k,M=react$1.exports.useMemo(()=>react$1.exports.createRef(),[e]);const W=o.startOfWeek(i),L=react$1.exports.useMemo(()=>{var e=o.startOfMonth(a),t=o.endOfMonth(a);return E(j)||o.isAfterDay(j,t)||o.isBeforeDay(j,e)?findClosestEnabledDate({utils:o,date:j,minDate:e,maxDate:t,disablePast:C,disableFuture:S,isDateDisabled:E}):j},[a,S,C,j,E,o]);return jsxRuntime.exports.jsxs("div",{role:"grid","aria-labelledby":F,children:[jsxRuntime.exports.jsx(PickersCalendarDayHeader,{role:"row",className:r.header,children:o.getWeekdays().map((e,t)=>{var n;return jsxRuntime.exports.jsx(PickersCalendarWeekDayLabel,{variant:"caption",role:"columnheader","aria-label":o.format(o.addDays(W,t),"weekday"),className:r.weekDayLabel,children:null!=(n=null==w?void 0:w(e))?n:e},e+t.toString())})}),p?jsxRuntime.exports.jsx(PickersCalendarLoadingContainer,{className:r.loadingContainer,children:v()}):jsxRuntime.exports.jsx(PickersCalendarSlideTransition,_extends$3({transKey:e,onExited:h,reduceAnimations:g,slideDirection:b,className:clsx(n,r.slideTransition)},$,{nodeRef:M,children:jsxRuntime.exports.jsx(PickersCalendarWeekContainer,{ref:M,role:"rowgroup",className:r.monthContainer,children:o.getWeekArray(a).map(e=>jsxRuntime.exports.jsx(PickersCalendarWeek,{role:"row",className:r.weekContainer,children:e.map(t=>{var e=null!==L&&o.isSameDay(t,L),n=A.some(e=>o.isSameDay(e,t)),r=o.isSameDay(t,i),e={key:null==t?void 0:t.toString(),day:t,isAnimating:d,disabled:l||E(t),autoFocus:_&&e,today:r,outsideCurrentMonth:o.getMonth(t)!==k,selected:n,disableHighlightToday:c,showDaysOutsideCurrentMonth:x,onKeyDown:B,onFocus:U,onBlur:z,onDaySelect:H,tabIndex:e?0:-1,role:"gridcell","aria-selected":n};return r&&(e["aria-current"]="date"),y?y(t,A,e):react$1.exports.createElement(PickersDay,_extends$3({},e,{key:e.key}))})},"week-"+e[0]))})}))]})}function useViews({onChange:r,onViewChange:t,openTo:e,view:n,views:i}){const[o,a]=useControlled$1({name:"Picker",state:"view",controlled:n,default:e&&arrayIncludes$1(i,e)?e:i[0]});e=null!=(n=i[i.indexOf(o)-1])?n:null;const s=null!=(n=i[i.indexOf(o)+1])?n:null,l=react$1.exports.useCallback(e=>{a(e),t&&t(e)},[a,t]),c=react$1.exports.useCallback(()=>{s&&l(s)},[s,l]);return{handleChangeAndOpenNext:react$1.exports.useCallback((e,t)=>{var n="finish"===t,t=n&&Boolean(s)?"partial":t;r(e,t),n&&c()},[s,r,c]),nextView:s,previousView:e,openNext:c,openView:o,setOpenView:l}}const ArrowDropDown=createSvgIcon$2(jsxRuntime.exports.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),ArrowLeft=createSvgIcon$2(jsxRuntime.exports.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),ArrowRight=createSvgIcon$2(jsxRuntime.exports.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight");function getPickersArrowSwitcherUtilityClass(e){return generateUtilityClass("MuiPickersArrowSwitcher",e)}createSvgIcon$2(jsxRuntime.exports.jsx("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar"),createSvgIcon$2(jsxRuntime.exports.jsxs(react$1.exports.Fragment,{children:[jsxRuntime.exports.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),jsxRuntime.exports.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock"),createSvgIcon$2(jsxRuntime.exports.jsx("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange"),createSvgIcon$2(jsxRuntime.exports.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Pen"),createSvgIcon$2(jsxRuntime.exports.jsxs(react$1.exports.Fragment,{children:[jsxRuntime.exports.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),jsxRuntime.exports.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time"),generateUtilityClasses("MuiPickersArrowSwitcher",["root","spacer","button"]);const _excluded$6=["children","className","components","componentsProps","isLeftDisabled","isLeftHidden","isRightDisabled","isRightHidden","leftArrowButtonText","onLeftClick","onRightClick","rightArrowButtonText"],useUtilityClasses$5=e=>{e=e.classes;return composeClasses({root:["root"],spacer:["spacer"],button:["button"]},getPickersArrowSwitcherUtilityClass,e)},PickersArrowSwitcherRoot=styled$1("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),PickersArrowSwitcherSpacer=styled$1("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),PickersArrowSwitcherButton=styled$1(IconButton$1,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})(({ownerState:e})=>_extends$3({},e.hidden&&{visibility:"hidden"})),PickersArrowSwitcher=react$1.exports.forwardRef(function(e,t){var e=useThemeProps({props:e,name:"MuiPickersArrowSwitcher"}),{children:n,className:r,components:i,componentsProps:o,isLeftDisabled:a,isLeftHidden:s,isRightDisabled:l,isRightHidden:c,leftArrowButtonText:u,onLeftClick:d,onRightClick:p,rightArrowButtonText:f}=e,h=_objectWithoutPropertiesLoose$2(e,_excluded$6),m="rtl"===useTheme().direction,g=(null==o?void 0:o.leftArrowButton)||{},y=(null==i?void 0:i.LeftArrowIcon)||ArrowLeft,o=(null==o?void 0:o.rightArrowButton)||{},v=(null==i?void 0:i.RightArrowIcon)||ArrowRight,x=useUtilityClasses$5(e);return jsxRuntime.exports.jsxs(PickersArrowSwitcherRoot,_extends$3({ref:t,className:clsx(x.root,r),ownerState:e},h,{children:[jsxRuntime.exports.jsx(PickersArrowSwitcherButton,_extends$3({as:null==i?void 0:i.LeftArrowButton,size:"small","aria-label":u,title:u,disabled:a,edge:"end",onClick:d},g,{className:clsx(x.button,g.className),ownerState:_extends$3({},e,g,{hidden:s}),children:m?jsxRuntime.exports.jsx(v,{}):jsxRuntime.exports.jsx(y,{})})),n?jsxRuntime.exports.jsx(Typography$1,{variant:"subtitle1",component:"span",children:n}):jsxRuntime.exports.jsx(PickersArrowSwitcherSpacer,{className:x.spacer,ownerState:e}),jsxRuntime.exports.jsx(PickersArrowSwitcherButton,_extends$3({as:null==i?void 0:i.RightArrowButton,size:"small","aria-label":f,title:f,edge:"start",disabled:l,onClick:p},o,{className:clsx(x.button,o.className),ownerState:_extends$3({},e,o,{hidden:c}),children:m?jsxRuntime.exports.jsx(y,{}):jsxRuntime.exports.jsx(v,{})}))]}))});function useNextMonthDisabled(t,{disableFuture:n,maxDate:r}){const i=useUtils();return react$1.exports.useMemo(()=>{var e=i.date(),e=i.startOfMonth(n&&i.isBefore(e,r)?e:r);return!i.isAfter(e,t)},[n,r,t,i])}function usePreviousMonthDisabled(t,{disablePast:n,minDate:r}){const i=useUtils();return react$1.exports.useMemo(()=>{var e=i.date(),e=i.startOfMonth(n&&i.isAfter(e,r)?e:r);return!i.isBefore(e,t)},[n,r,t,i])}const buildDeprecatedPropsWarning=e=>()=>{},getPickersCalendarHeaderUtilityClass=e=>generateUtilityClass("MuiPickersCalendarHeader",e),useUtilityClasses$4=(generateUtilityClasses("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),e=>{e=e.classes;return composeClasses({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},getPickersCalendarHeaderUtilityClass,e)}),PickersCalendarHeaderRoot=styled$1("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:16,marginBottom:8,paddingLeft:24,paddingRight:12,maxHeight:30,minHeight:30}),PickersCalendarHeaderLabelContainer=styled$1("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>_extends$3({display:"flex",maxHeight:30,overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),PickersCalendarHeaderLabel=styled$1("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),PickersCalendarHeaderSwitchViewButton=styled$1(IconButton$1,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto"}),PickersCalendarHeaderSwitchViewIcon=styled$1(ArrowDropDown,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(({theme:e,ownerState:t})=>_extends$3({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"},"year"===t.openView&&{transform:"rotate(180deg)"})),deprecatedPropsWarning=buildDeprecatedPropsWarning();function PickersCalendarHeader(e){e=useThemeProps({props:e,name:"MuiPickersCalendarHeader"});const{components:t={},componentsProps:n={},currentMonth:r,disabled:i,disableFuture:o,disablePast:a,getViewSwitchingButtonText:s,leftArrowButtonText:l,maxDate:c,minDate:u,onMonthChange:d,onViewChange:p,openView:f,reduceAnimations:h,rightArrowButtonText:m,views:g,labelId:y}=e;deprecatedPropsWarning({leftArrowButtonText:l,rightArrowButtonText:m,getViewSwitchingButtonText:s});var v=useLocaleText(),x=null!=l?l:v.previousMonth,b=null!=m?m:v.nextMonth,v=null!=s?s:v.calendarViewSwitchingButtonAriaLabel;const $=useUtils();var C=useUtilityClasses$4(e),S=n.switchViewButton||{},w=useNextMonthDisabled(r,{disableFuture:o,maxDate:c}),_=usePreviousMonthDisabled(r,{disablePast:a,minDate:u});return 1===g.length&&"year"===g[0]?null:(e=e,jsxRuntime.exports.jsxs(PickersCalendarHeaderRoot,{ownerState:e,className:C.root,children:[jsxRuntime.exports.jsxs(PickersCalendarHeaderLabelContainer,{role:"presentation",onClick:()=>{var e;1!==g.length&&p&&!i&&(2===g.length?p(g.find(e=>e!==f)||g[0]):(e=0!==g.indexOf(f)?0:1,p(g[e])))},ownerState:e,"aria-live":"polite",className:C.labelContainer,children:[jsxRuntime.exports.jsx(PickersFadeTransitionGroup,{reduceAnimations:h,transKey:$.format(r,"monthAndYear"),children:jsxRuntime.exports.jsx(PickersCalendarHeaderLabel,{id:y,ownerState:e,className:C.label,children:$.format(r,"monthAndYear")})}),1<g.length&&!i&&jsxRuntime.exports.jsx(PickersCalendarHeaderSwitchViewButton,_extends$3({size:"small",as:t.SwitchViewButton,"aria-label":v(f),className:C.switchViewButton},S,{children:jsxRuntime.exports.jsx(PickersCalendarHeaderSwitchViewIcon,{as:t.SwitchViewIcon,ownerState:e,className:C.switchViewIcon})}))]}),jsxRuntime.exports.jsx(Fade$1,{in:"day"===f,children:jsxRuntime.exports.jsx(PickersArrowSwitcher,{leftArrowButtonText:x,rightArrowButtonText:b,components:t,componentsProps:n,onLeftClick:()=>d($.getPreviousMonth(r),"right"),onRightClick:()=>d($.getNextMonth(r),"left"),isLeftDisabled:_,isRightDisabled:w})})]}))}const WrapperVariantContext=react$1.exports.createContext(null);function getPickersYearUtilityClass(e){return generateUtilityClass("PrivatePickersYear",e)}const pickersYearClasses=generateUtilityClasses("PrivatePickersYear",["root","modeDesktop","modeMobile","yearButton","selected","disabled"]),_excluded$5=["autoFocus","className","children","disabled","onClick","onKeyDown","value","tabIndex","onFocus","onBlur"],useUtilityClasses$3=e=>{var{wrapperVariant:e,disabled:t,selected:n,classes:r}=e;return composeClasses({root:["root",e&&"mode"+capitalize$2(e)],yearButton:["yearButton",t&&"disabled",n&&"selected"]},getPickersYearUtilityClass,r)},PickersYearRoot=styled$1("div",{name:"PrivatePickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root,{["&."+pickersYearClasses.modeDesktop]:t.modeDesktop},{["&."+pickersYearClasses.modeMobile]:t.modeMobile}]})(({ownerState:e})=>_extends$3({flexBasis:"33.3%",display:"flex",alignItems:"center",justifyContent:"center"},"desktop"===(null==e?void 0:e.wrapperVariant)&&{flexBasis:"25%"})),PickersYearButton=styled$1("button",{name:"PrivatePickersYear",slot:"Button",overridesResolver:(e,t)=>[t.button,{["&."+pickersYearClasses.disabled]:t.disabled},{["&."+pickersYearClasses.selected]:t.selected}]})(({theme:e})=>_extends$3({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus, &:hover":{backgroundColor:alpha(e.palette.action.active,e.palette.action.hoverOpacity)},["&."+pickersYearClasses.disabled]:{color:e.palette.text.secondary},["&."+pickersYearClasses.selected]:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:focus, &:hover":{backgroundColor:e.palette.primary.dark}}})),noop$3=()=>{},PickersYear=react$1.exports.forwardRef(function(e,t){const{autoFocus:n,className:r,children:i,disabled:o,onClick:a,onKeyDown:s,value:l,tabIndex:c,onFocus:u=noop$3,onBlur:d=noop$3}=e,p=_objectWithoutPropertiesLoose$2(e,_excluded$5),f=react$1.exports.useRef(null);var t=useForkRef(f,t),e=_extends$3({},e,{wrapperVariant:react$1.exports.useContext(WrapperVariantContext)}),h=useUtilityClasses$3(e);return react$1.exports.useEffect(()=>{n&&f.current.focus()},[n]),jsxRuntime.exports.jsx(PickersYearRoot,{className:clsx(h.root,r),ownerState:e,children:jsxRuntime.exports.jsx(PickersYearButton,_extends$3({ref:t,disabled:o,type:"button",tabIndex:o?-1:c,onClick:e=>a(e,l),onKeyDown:e=>s(e,l),onFocus:e=>u(e,l),onBlur:e=>d(e,l),className:h.yearButton,ownerState:e},p,{children:i}))})});function getYearPickerUtilityClass(e){return generateUtilityClass("MuiYearPicker",e)}generateUtilityClasses("MuiYearPicker",["root"]);const useUtilityClasses$2=e=>{e=e.classes;return composeClasses({root:["root"]},getYearPickerUtilityClass,e)};function useYearPickerDefaultizedProps(e,t){var n=useUtils(),r=useDefaultDates(),e=useThemeProps({props:e,name:t});return _extends$3({disablePast:!1,disableFuture:!1},e,{minDate:parseNonNullablePickerDate(n,e.minDate,r.minDate),maxDate:parseNonNullablePickerDate(n,e.maxDate,r.maxDate)})}const YearPickerRoot=styled$1("div",{name:"MuiYearPicker",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",maxHeight:"304px"}),YearPicker=react$1.exports.forwardRef(function(e,t){const n=useNow(),r=useTheme(),i=useUtils();e=useYearPickerDefaultizedProps(e,"MuiYearPicker");const{autoFocus:o,className:a,date:s,disabled:l,disableFuture:c,disablePast:u,maxDate:d,minDate:p,onChange:f,readOnly:h,shouldDisableYear:m,disableHighlightToday:g,onYearFocus:y,hasFocus:v,onFocusedViewChange:x}=e;var b=useUtilityClasses$2(e);const $=react$1.exports.useMemo(()=>null!=s?s:i.startOfYear(n),[n,i,s]),C=react$1.exports.useMemo(()=>null!=s?i.getYear(s):g?null:i.getYear(n),[n,s,i,g]);var S=react$1.exports.useContext(WrapperVariantContext);const w=react$1.exports.useRef(null),[_,T]=react$1.exports.useState(()=>C||i.getYear(n)),[E,j]=useControlled({name:"YearPicker",state:"hasFocus",controlled:v,default:o}),R=react$1.exports.useCallback(e=>{j(e),x&&x(e)},[j,x]),I=react$1.exports.useCallback(e=>!(!u||!i.isBeforeYear(e,n))||!!(c&&i.isAfterYear(e,n)||p&&i.isBeforeYear(e,p)||d&&i.isAfterYear(e,d)||m&&m(e)),[c,u,d,p,n,m,i]),O=(e,t,n="finish")=>{h||(t=i.setYear($,t),f(t,n))},k=react$1.exports.useCallback(e=>{I(i.setYear($,e))||(T(e),R(!0),null!=y&&y(e))},[I,i,$,R,y]),A=(react$1.exports.useEffect(()=>{T(e=>null!==C&&e!==C?C:e)},[C]),"desktop"===S?4:3),M=react$1.exports.useCallback((e,t)=>{switch(e.key){case"ArrowUp":k(t-A),e.preventDefault();break;case"ArrowDown":k(t+A),e.preventDefault();break;case"ArrowLeft":k(t+("ltr"===r.direction?-1:1)),e.preventDefault();break;case"ArrowRight":k(t+("ltr"===r.direction?1:-1)),e.preventDefault()}},[k,r.direction,A]),P=react$1.exports.useCallback((e,t)=>{k(t)},[k]),N=react$1.exports.useCallback((e,t)=>{_===t&&R(!1)},[_,R]),D=i.getYear(n),L=react$1.exports.useRef(null);S=useForkRef(t,L);return react$1.exports.useEffect(()=>{var e,t,n,r,i;o||null===L.current||(t=L.current.querySelector('[tabindex="0"]'))&&(e=t.offsetHeight,t=t.offsetTop,n=L.current.clientHeight,r=L.current.scrollTop,i=t+e,n<e||t<r||(L.current.scrollTop=i-n/2-e/2))},[o]),jsxRuntime.exports.jsx(YearPickerRoot,{ref:S,className:clsx(b.root,a),ownerState:e,children:i.getYearRange(p,d).map(e=>{var t=i.getYear(e),n=t===C;return jsxRuntime.exports.jsx(PickersYear,{selected:n,value:t,onClick:O,onKeyDown:M,autoFocus:E&&t===_,ref:n?w:void 0,disabled:l||I(e),tabIndex:t===_?0:-1,onFocus:P,onBlur:N,"aria-current":D===t?"date":void 0,children:i.format(e,"year")},i.format(e,"year"))})})}),PickerViewRoot=styled$1("div")({overflowX:"hidden",width:DIALOG_WIDTH,maxHeight:VIEW_HEIGHT,display:"flex",flexDirection:"column",margin:"0 auto"}),defaultReduceAnimations="undefined"!=typeof navigator&&/(android)/i.test(navigator.userAgent),getCalendarPickerUtilityClass=e=>generateUtilityClass("MuiCalendarPicker",e),_excluded$4=(generateUtilityClasses("MuiCalendarPicker",["root","viewTransitionContainer"]),["autoFocus","onViewChange","date","disableFuture","disablePast","defaultCalendarMonth","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","classes"]),useUtilityClasses$1=e=>{e=e.classes;return composeClasses({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},getCalendarPickerUtilityClass,e)};function useCalendarPickerDefaultizedProps(e,t){var n=useUtils(),r=useDefaultDates(),e=useThemeProps({props:e,name:t});return _extends$3({loading:!1,disablePast:!1,disableFuture:!1,openTo:"day",views:["year","day"],reduceAnimations:defaultReduceAnimations,renderLoading:()=>jsxRuntime.exports.jsx("span",{children:"..."})},e,{minDate:parseNonNullablePickerDate(n,e.minDate,r.minDate),maxDate:parseNonNullablePickerDate(n,e.maxDate,r.maxDate)})}const CalendarPickerRoot=styled$1(PickerViewRoot,{name:"MuiCalendarPicker",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column"}),CalendarPickerViewTransitionContainer=styled$1(PickersFadeTransitionGroup,{name:"MuiCalendarPicker",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),CalendarPicker=react$1.exports.forwardRef(function(e,t){const i=useUtils();var n=useId(),e=useCalendarPickerDefaultizedProps(e,"MuiCalendarPicker");const{autoFocus:r,onViewChange:o,date:a,disableFuture:s,disablePast:l,defaultCalendarMonth:c,onChange:u,onYearChange:d,onMonthChange:p,reduceAnimations:f,shouldDisableDate:h,shouldDisableMonth:m,shouldDisableYear:P,view:N,views:g,openTo:D,className:y,disabled:v,readOnly:F,minDate:x,maxDate:b,disableHighlightToday:V,focusedView:H,onFocusedViewChange:$}=e,C=_objectWithoutPropertiesLoose$2(e,_excluded$4),{openView:S,setOpenView:B,openNext:w}=useViews({view:N,views:g,openTo:D,onChange:u,onViewChange:o}),{calendarState:_,changeFocusedDay:T,changeMonth:E,handleChangeMonth:U,isDateDisabled:j,onMonthSwitchingAnimationEnd:z}=useCalendarState({date:a,defaultCalendarMonth:c,reduceAnimations:f,onMonthChange:p,minDate:x,maxDate:b,shouldDisableDate:h,disablePast:l,disableFuture:s});var W=react$1.exports.useCallback((e,t)=>{var n=i.startOfMonth(e),r=i.endOfMonth(e),r=j(e)?findClosestEnabledDate({utils:i,date:e,minDate:i.isBefore(x,n)?n:x,maxDate:i.isAfter(b,r)?r:b,disablePast:l,disableFuture:s,isDateDisabled:j}):e;r?(u(r,t),null!=p&&p(n)):(w(),E(n)),T(r,!0)},[T,s,l,j,b,x,u,p,E,w,i]),Z=react$1.exports.useCallback((e,t)=>{var n=i.startOfYear(e),r=i.endOfYear(e),r=j(e)?findClosestEnabledDate({utils:i,date:e,minDate:i.isBefore(x,n)?n:x,maxDate:i.isAfter(b,r)?r:b,disablePast:l,disableFuture:s,isDateDisabled:j}):e;r?(u(r,t),null!=d&&d(r)):(w(),E(n)),T(r,!0)},[T,s,l,j,b,x,u,d,w,i,E]),G=react$1.exports.useCallback((e,t)=>a&&e?u(i.mergeDateAndTime(e,a),t):u(e,t),[i,a,u]),R=(react$1.exports.useEffect(()=>{a&&E(a)},[a]),useUtilityClasses$1(e)),I={disablePast:l,disableFuture:s,maxDate:b,minDate:x},q=v&&a||x,K=v&&a||b,O={disableHighlightToday:V,readOnly:F,disabled:v},n=n+"-grid-label";const[Y,k]=useControlled$1({name:"DayPicker",state:"focusedView",controlled:H,default:r?S:null});var A=null!==Y;const M=useEventCallback(t=>e=>{$?$(t)(e):e?k(t):k(e=>e===t?null:e)}),L=react$1.exports.useRef(S);return react$1.exports.useEffect(()=>{L.current!==S&&(L.current=S,M(S)(!0))},[S,M]),jsxRuntime.exports.jsxs(CalendarPickerRoot,{ref:t,className:clsx(R.root,y),ownerState:e,children:[jsxRuntime.exports.jsx(PickersCalendarHeader,_extends$3({},C,{views:g,openView:S,currentMonth:_.currentMonth,onViewChange:B,onMonthChange:(e,t)=>U({newMonth:e,direction:t}),minDate:q,maxDate:K,disabled:v,disablePast:l,disableFuture:s,reduceAnimations:f,labelId:n})),jsxRuntime.exports.jsx(CalendarPickerViewTransitionContainer,{reduceAnimations:f,className:R.viewTransitionContainer,transKey:S,ownerState:e,children:jsxRuntime.exports.jsxs("div",{children:["year"===S&&jsxRuntime.exports.jsx(YearPicker,_extends$3({},C,I,O,{autoFocus:r,date:a,onChange:Z,shouldDisableYear:P,hasFocus:A,onFocusedViewChange:M("year")})),"month"===S&&jsxRuntime.exports.jsx(MonthPicker,_extends$3({},I,O,{autoFocus:r,hasFocus:A,className:y,date:a,onChange:W,shouldDisableMonth:m,onFocusedViewChange:M("month")})),"day"===S&&jsxRuntime.exports.jsx(DayPicker,_extends$3({},C,_,I,O,{autoFocus:r,onMonthSwitchingAnimationEnd:z,onFocusedDayChange:T,reduceAnimations:f,selectedDays:[a],onSelectedDaysChange:G,shouldDisableDate:h,hasFocus:A,onFocusedViewChange:M("day"),gridLabelId:n}))]})})]})});function toInteger(e){return null===e||!0===e||!1===e?NaN:(e=Number(e),isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e))}function requiredArgs(e,t){if(t.length<e)throw new TypeError(e+" argument"+(1<e?"s":"")+" required, but only "+t.length+" present")}function _typeof$y(e){return(_typeof$y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function toDate$1(e){requiredArgs(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===_typeof$y(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function addDays(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toInteger(t);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function addMilliseconds(e,t){requiredArgs(2,arguments);var n=toDate$1(e).getTime(),r=toInteger(t);return new Date(n+r)}function addSeconds(e,t){return requiredArgs(2,arguments),addMilliseconds(e,1e3*toInteger(t))}var MILLISECONDS_IN_MINUTE=6e4;function addMinutes(e,t){return requiredArgs(2,arguments),addMilliseconds(e,toInteger(t)*MILLISECONDS_IN_MINUTE)}var MILLISECONDS_IN_HOUR=36e5;function addHours(e,t){return requiredArgs(2,arguments),addMilliseconds(e,toInteger(t)*MILLISECONDS_IN_HOUR)}function addWeeks(e,t){return requiredArgs(2,arguments),addDays(e,7*toInteger(t))}function addMonths(e,t){requiredArgs(2,arguments);var n,r,i=toDate$1(e),o=toInteger(t);return isNaN(o)?new Date(NaN):o?(n=i.getDate(),(r=new Date(i.getTime())).setMonth(i.getMonth()+o+1,0),r.getDate()<=n?r:(i.setFullYear(r.getFullYear(),r.getMonth(),n),i)):i}function addYears(e,t){return requiredArgs(2,arguments),addMonths(e,12*toInteger(t))}function differenceInCalendarYears(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toDate$1(t);return n.getFullYear()-r.getFullYear()}function compareAsc(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toDate$1(t),n=n.getTime()-r.getTime();return n<0?-1:0<n?1:n}function differenceInYears(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toDate$1(t),i=compareAsc(n,r),o=Math.abs(differenceInCalendarYears(n,r)),n=(n.setFullYear(1584),r.setFullYear(1584),compareAsc(n,r)===-i),r=i*(o-Number(n));return 0==r?0:r}function differenceInCalendarMonths(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toDate$1(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}function endOfDay(e){requiredArgs(1,arguments);var t=toDate$1(e);return t.setHours(23,59,59,999),t}function endOfMonth(e){requiredArgs(1,arguments);var t=toDate$1(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function isLastDayOfMonth(e){requiredArgs(1,arguments);var t=toDate$1(e);return endOfDay(t).getTime()===endOfMonth(t).getTime()}function differenceInMonths(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toDate$1(t),i=compareAsc(n,r),o=Math.abs(differenceInCalendarMonths(n,r)),r=o<1?0:(1===n.getMonth()&&27<n.getDate()&&n.setDate(30),n.setMonth(n.getMonth()-i*o),n=compareAsc(n,r)===-i,isLastDayOfMonth(toDate$1(e))&&1===o&&1===compareAsc(e,r)&&(n=!1),i*(o-Number(n)));return 0===r?0:r}var roundingMap={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}},defaultRoundingMethod="trunc";function getRoundingMethod(e){return e?roundingMap[e]:roundingMap[defaultRoundingMethod]}function differenceInQuarters(e,t,n){requiredArgs(2,arguments);var r=differenceInMonths(e,t)/3;return getRoundingMethod(null==n?void 0:n.roundingMethod)(r)}function getTimezoneOffsetInMilliseconds(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function startOfDay(e){requiredArgs(1,arguments);var t=toDate$1(e);return t.setHours(0,0,0,0),t}var MILLISECONDS_IN_DAY$1=864e5;function differenceInCalendarDays(e,t){requiredArgs(2,arguments);var n=startOfDay(e),r=startOfDay(t),n=n.getTime()-getTimezoneOffsetInMilliseconds(n),r=r.getTime()-getTimezoneOffsetInMilliseconds(r);return Math.round((n-r)/MILLISECONDS_IN_DAY$1)}function compareLocalAsc(e,t){e=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return e<0?-1:0<e?1:e}function differenceInDays(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toDate$1(t),i=compareLocalAsc(n,r),o=Math.abs(differenceInCalendarDays(n,r));n.setDate(n.getDate()-i*o);o=i*(o-Number(compareLocalAsc(n,r)===-i));return 0==o?0:o}function differenceInWeeks(e,t,n){requiredArgs(2,arguments);var r=differenceInDays(e,t)/7;return getRoundingMethod(null==n?void 0:n.roundingMethod)(r)}var millisecondsInMinute=6e4,millisecondsInHour=36e5,millisecondsInSecond=1e3;function differenceInMilliseconds(e,t){return requiredArgs(2,arguments),toDate$1(e).getTime()-toDate$1(t).getTime()}function differenceInHours(e,t,n){requiredArgs(2,arguments);var r=differenceInMilliseconds(e,t)/millisecondsInHour;return getRoundingMethod(null==n?void 0:n.roundingMethod)(r)}function differenceInMinutes(e,t,n){requiredArgs(2,arguments);var r=differenceInMilliseconds(e,t)/millisecondsInMinute;return getRoundingMethod(null==n?void 0:n.roundingMethod)(r)}function differenceInSeconds(e,t,n){requiredArgs(2,arguments);var r=differenceInMilliseconds(e,t)/1e3;return getRoundingMethod(null==n?void 0:n.roundingMethod)(r)}function eachDayOfInterval(e,t){requiredArgs(1,arguments);var n=e||{},r=toDate$1(n.start),i=toDate$1(n.end).getTime();if(!(r.getTime()<=i))throw new RangeError("Invalid interval");var o=[],a=r,s=(a.setHours(0,0,0,0),Number(null!=(n=null==t?void 0:t.step)?n:1));if(s<1||isNaN(s))throw new RangeError("`options.step` must be a number greater than 1");for(;a.getTime()<=i;)o.push(toDate$1(a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o}var defaultOptions={};function getDefaultOptions(){return defaultOptions}function endOfWeek(e,t){requiredArgs(1,arguments);var n,r,i=getDefaultOptions(),i=toInteger(null!=(n=null!=(n=null!=(n=null!=(n=null==t?void 0:t.weekStartsOn)?n:null==t||null==(n=t.locale)||null==(n=n.options)?void 0:n.weekStartsOn)?n:i.weekStartsOn)?n:null==(n=i.locale)||null==(i=n.options)?void 0:i.weekStartsOn)?n:0);if(0<=i&&i<=6)return r=6+((r=(n=toDate$1(e)).getDay())<i?-7:0)-(r-i),n.setDate(n.getDate()+r),n.setHours(23,59,59,999),n;throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}function endOfYear(e){requiredArgs(1,arguments);var t=toDate$1(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}function _typeof$x(e){return(_typeof$x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function isDate$1(e){return requiredArgs(1,arguments),e instanceof Date||"object"===_typeof$x(e)&&"[object Date]"===Object.prototype.toString.call(e)}function isValid(e){var t;return requiredArgs(1,arguments),!(!isDate$1(e)&&"number"!=typeof e||(t=toDate$1(e),isNaN(Number(t))))}function subMilliseconds(e,t){return requiredArgs(2,arguments),addMilliseconds(e,-toInteger(t))}var MILLISECONDS_IN_DAY=864e5;function getUTCDayOfYear(e){requiredArgs(1,arguments);var t=toDate$1(e),n=t.getTime(),t=(t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0),t.getTime());return Math.floor((n-t)/MILLISECONDS_IN_DAY)+1}function startOfUTCISOWeek(e){requiredArgs(1,arguments);var t=toDate$1(e),n=t.getUTCDay(),n=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-n),t.setUTCHours(0,0,0,0),t}function getUTCISOWeekYear(e){requiredArgs(1,arguments);var t=toDate$1(e),n=t.getUTCFullYear(),r=new Date(0),r=(r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0),startOfUTCISOWeek(r)),i=new Date(0),i=(i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0),startOfUTCISOWeek(i));return t.getTime()>=r.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function startOfUTCISOWeekYear(e){requiredArgs(1,arguments);var t=getUTCISOWeekYear(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),startOfUTCISOWeek(n)}var MILLISECONDS_IN_WEEK$1=6048e5;function getUTCISOWeek(e){requiredArgs(1,arguments);var t=toDate$1(e),t=startOfUTCISOWeek(t).getTime()-startOfUTCISOWeekYear(t).getTime();return Math.round(t/MILLISECONDS_IN_WEEK$1)+1}function startOfUTCWeek(e,t){requiredArgs(1,arguments);var n,r,i=getDefaultOptions(),i=toInteger(null!=(n=null!=(n=null!=(n=null!=(n=null==t?void 0:t.weekStartsOn)?n:null==t||null==(n=t.locale)||null==(n=n.options)?void 0:n.weekStartsOn)?n:i.weekStartsOn)?n:null==(n=i.locale)||null==(i=n.options)?void 0:i.weekStartsOn)?n:0);if(0<=i&&i<=6)return r=((r=(n=toDate$1(e)).getUTCDay())<i?7:0)+r-i,n.setUTCDate(n.getUTCDate()-r),n.setUTCHours(0,0,0,0),n;throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}function getUTCWeekYear(e,t){requiredArgs(1,arguments);var n,r,i=toDate$1(e),o=i.getUTCFullYear(),a=getDefaultOptions(),a=toInteger(null!=(n=null!=(n=null!=(n=null!=(n=null==t?void 0:t.firstWeekContainsDate)?n:null==t||null==(n=t.locale)||null==(n=n.options)?void 0:n.firstWeekContainsDate)?n:a.firstWeekContainsDate)?n:null==(n=a.locale)||null==(a=n.options)?void 0:a.firstWeekContainsDate)?n:1);if(1<=a&&a<=7)return(n=new Date(0)).setUTCFullYear(o+1,0,a),n.setUTCHours(0,0,0,0),n=startOfUTCWeek(n,t),(r=new Date(0)).setUTCFullYear(o,0,a),r.setUTCHours(0,0,0,0),a=startOfUTCWeek(r,t),i.getTime()>=n.getTime()?o+1:i.getTime()>=a.getTime()?o:o-1;throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively")}function startOfUTCWeekYear(e,t){requiredArgs(1,arguments);var n=getDefaultOptions(),n=toInteger(null!=(r=null!=(r=null!=(r=null!=(r=null==t?void 0:t.firstWeekContainsDate)?r:null==t||null==(r=t.locale)||null==(r=r.options)?void 0:r.firstWeekContainsDate)?r:n.firstWeekContainsDate)?r:null==(r=n.locale)||null==(n=r.options)?void 0:n.firstWeekContainsDate)?r:1),r=getUTCWeekYear(e,t),i=new Date(0);return i.setUTCFullYear(r,0,n),i.setUTCHours(0,0,0,0),startOfUTCWeek(i,t)}var MILLISECONDS_IN_WEEK=6048e5;function getUTCWeek(e,t){requiredArgs(1,arguments);var n=toDate$1(e),n=startOfUTCWeek(n,t).getTime()-startOfUTCWeekYear(n,t).getTime();return Math.round(n/MILLISECONDS_IN_WEEK)+1}function addLeadingZeros(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}var formatters$2={y:function(e,t){e=e.getUTCFullYear(),e=0<e?e:1-e;return addLeadingZeros("yy"===t?e%100:e,t.length)},M:function(e,t){e=e.getUTCMonth();return"M"===t?String(e+1):addLeadingZeros(e+1,2)},d:function(e,t){return addLeadingZeros(e.getUTCDate(),t.length)},a:function(e,t){var n=1<=e.getUTCHours()/12?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return addLeadingZeros(e.getUTCHours()%12||12,t.length)},H:function(e,t){return addLeadingZeros(e.getUTCHours(),t.length)},m:function(e,t){return addLeadingZeros(e.getUTCMinutes(),t.length)},s:function(e,t){return addLeadingZeros(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,e=e.getUTCMilliseconds();return addLeadingZeros(Math.floor(e*Math.pow(10,n-3)),t.length)}},lightFormatters=formatters$2,dayPeriodEnum={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},formatters={G:function(e,t,n){var r=0<e.getUTCFullYear()?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){var r;return"yo"===t?(r=e.getUTCFullYear(),n.ordinalNumber(0<r?r:1-r,{unit:"year"})):lightFormatters.y(e,t)},Y:function(e,t,n,r){e=getUTCWeekYear(e,r),r=0<e?e:1-e;return"YY"===t?addLeadingZeros(r%100,2):"Yo"===t?n.ordinalNumber(r,{unit:"year"}):addLeadingZeros(r,t.length)},R:function(e,t){return addLeadingZeros(getUTCISOWeekYear(e),t.length)},u:function(e,t){return addLeadingZeros(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return addLeadingZeros(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return addLeadingZeros(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return lightFormatters.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return addLeadingZeros(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){e=getUTCWeek(e,r);return"wo"===t?n.ordinalNumber(e,{unit:"week"}):addLeadingZeros(e,t.length)},I:function(e,t,n){e=getUTCISOWeek(e);return"Io"===t?n.ordinalNumber(e,{unit:"week"}):addLeadingZeros(e,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):lightFormatters.d(e,t)},D:function(e,t,n){e=getUTCDayOfYear(e);return"Do"===t?n.ordinalNumber(e,{unit:"dayOfYear"}):addLeadingZeros(e,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return addLeadingZeros(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return addLeadingZeros(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return addLeadingZeros(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=1<=e.getUTCHours()/12?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var e=e.getUTCHours(),r=12===e?dayPeriodEnum.noon:0===e?dayPeriodEnum.midnight:1<=e/12?"pm":"am";switch(t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var e=e.getUTCHours(),r=17<=e?dayPeriodEnum.evening:12<=e?dayPeriodEnum.afternoon:4<=e?dayPeriodEnum.morning:dayPeriodEnum.night;switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){var r;return"ho"===t?(r=e.getUTCHours()%12,n.ordinalNumber(r=0===r?12:r,{unit:"hour"})):lightFormatters.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):lightFormatters.H(e,t)},K:function(e,t,n){e=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(e,{unit:"hour"}):addLeadingZeros(e,t.length)},k:function(e,t,n){e=e.getUTCHours();return 0===e&&(e=24),"ko"===t?n.ordinalNumber(e,{unit:"hour"}):addLeadingZeros(e,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):lightFormatters.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):lightFormatters.s(e,t)},S:function(e,t){return lightFormatters.S(e,t)},X:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return formatTimezoneWithOptionalMinutes(i);case"XXXX":case"XX":return formatTimezone(i);default:return formatTimezone(i,":")}},x:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return formatTimezoneWithOptionalMinutes(i);case"xxxx":case"xx":return formatTimezone(i);default:return formatTimezone(i,":")}},O:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+formatTimezoneShort(i,":");default:return"GMT"+formatTimezone(i,":")}},z:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+formatTimezoneShort(i,":");default:return"GMT"+formatTimezone(i,":")}},t:function(e,t,n,r){r=r._originalDate||e;return addLeadingZeros(Math.floor(r.getTime()/1e3),t.length)},T:function(e,t,n,r){return addLeadingZeros((r._originalDate||e).getTime(),t.length)}};function formatTimezoneShort(e,t){var n=0<e?"-":"+",e=Math.abs(e),r=Math.floor(e/60),e=e%60;return 0==e?n+String(r):(t=t||"",n+String(r)+t+addLeadingZeros(e,2))}function formatTimezoneWithOptionalMinutes(e,t){return e%60==0?(0<e?"-":"+")+addLeadingZeros(Math.abs(e)/60,2):formatTimezone(e,t)}function formatTimezone(e,t){var t=t||"",n=0<e?"-":"+",e=Math.abs(e);return n+addLeadingZeros(Math.floor(e/60),2)+t+addLeadingZeros(e%60,2)}var formatters$1=formatters,dateLongFormatter=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},timeLongFormatter=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},dateTimeLongFormatter=function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],i=r[1],r=r[2];if(!r)return dateLongFormatter(e,t);switch(i){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",dateLongFormatter(i,t)).replace("{{time}}",timeLongFormatter(r,t))},longFormatters$2={p:timeLongFormatter,P:dateTimeLongFormatter},longFormatters$3=longFormatters$2,protectedDayOfYearTokens=["D","DD"],protectedWeekYearTokens=["YY","YYYY"];function isProtectedDayOfYearToken(e){return-1!==protectedDayOfYearTokens.indexOf(e)}function isProtectedWeekYearToken(e){return-1!==protectedWeekYearTokens.indexOf(e)}function throwProtectedError(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var formatDistanceLocale$3={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},formatDistance$6=function(e,t,n){e=formatDistanceLocale$3[e],e="string"==typeof e?e:1===t?e.one:e.other.replace("{{count}}",t.toString());return null!=n&&n.addSuffix?n.comparison&&0<n.comparison?"in "+e:e+" ago":e},formatDistance$7=formatDistance$6;function buildFormatLongFn$1(t){return function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=e.width?String(e.width):t.defaultWidth;return t.formats[e]||t.formats[t.defaultWidth]}}var dateFormats$3={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},timeFormats$3={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},dateTimeFormats$3={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong$6={date:buildFormatLongFn$1({formats:dateFormats$3,defaultWidth:"full"}),time:buildFormatLongFn$1({formats:timeFormats$3,defaultWidth:"full"}),dateTime:buildFormatLongFn$1({formats:dateTimeFormats$3,defaultWidth:"full"})},formatLong$7=formatLong$6,formatRelativeLocale$3={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},formatRelative$6=function(e,t,n,r){return formatRelativeLocale$3[e]},formatRelative$7=formatRelative$6;function buildLocalizeFn$1(i){return function(e,t){t="formatting"===(null!=t&&t.context?String(t.context):"standalone")&&i.formattingValues?(r=i.defaultFormattingWidth||i.defaultWidth,n=null!=t&&t.width?String(t.width):r,i.formattingValues[n]||i.formattingValues[r]):(n=i.defaultWidth,r=null!=t&&t.width?String(t.width):i.defaultWidth,i.values[r]||i.values[n]);var n,r=i.argumentCallback?i.argumentCallback(e):e;return t[r]}}var eraValues$3={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},quarterValues$3={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},monthValues$3={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},dayValues$3={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},dayPeriodValues$3={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},formattingDayPeriodValues$2={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ordinalNumber$3=function(e,t){var n=Number(e),e=n%100;if(20<e||e<10)switch(e%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},localize$6={ordinalNumber:ordinalNumber$3,era:buildLocalizeFn$1({values:eraValues$3,defaultWidth:"wide"}),quarter:buildLocalizeFn$1({values:quarterValues$3,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:buildLocalizeFn$1({values:monthValues$3,defaultWidth:"wide"}),day:buildLocalizeFn$1({values:dayValues$3,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn$1({values:dayPeriodValues$3,defaultWidth:"wide",formattingValues:formattingDayPeriodValues$2,defaultFormattingWidth:"wide"})},localize$7=localize$6;function buildMatchFn$1(o){return function(e){var t,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=n.width,i=r&&o.matchPatterns[r]||o.matchPatterns[o.defaultMatchWidth],i=e.match(i);return i?(t=i[0],i=r&&o.parsePatterns[r]||o.parsePatterns[o.defaultParseWidth],r=Array.isArray(i)?findIndex$2(i,function(e){return e.test(t)}):findKey$1(i,function(e){return e.test(t)}),i=o.valueCallback?o.valueCallback(r):r,{value:i=n.valueCallback?n.valueCallback(i):i,rest:e.slice(t.length)}):null}}function findKey$1(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function findIndex$2(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function buildMatchPatternFn$1(i){return function(e){var t,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=e.match(i.matchPattern);return r&&(r=r[0],t=e.match(i.parsePattern))?(t=i.valueCallback?i.valueCallback(t[0]):t[0],{value:t=n.valueCallback?n.valueCallback(t):t,rest:e.slice(r.length)}):null}}var matchOrdinalNumberPattern$3=/^(\d+)(th|st|nd|rd)?/i,parseOrdinalNumberPattern$3=/\d+/i,matchEraPatterns$3={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},parseEraPatterns$3={any:[/^b/i,/^(a|c)/i]},matchQuarterPatterns$3={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},parseQuarterPatterns$3={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns$3={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},parseMonthPatterns$3={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns$3={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},parseDayPatterns$3={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},matchDayPeriodPatterns$3={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},parseDayPeriodPatterns$3={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},match$7={ordinalNumber:buildMatchPatternFn$1({matchPattern:matchOrdinalNumberPattern$3,parsePattern:parseOrdinalNumberPattern$3,valueCallback:function(e){return parseInt(e,10)}}),era:buildMatchFn$1({matchPatterns:matchEraPatterns$3,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$3,defaultParseWidth:"any"}),quarter:buildMatchFn$1({matchPatterns:matchQuarterPatterns$3,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$3,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:buildMatchFn$1({matchPatterns:matchMonthPatterns$3,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$3,defaultParseWidth:"any"}),day:buildMatchFn$1({matchPatterns:matchDayPatterns$3,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$3,defaultParseWidth:"any"}),dayPeriod:buildMatchFn$1({matchPatterns:matchDayPeriodPatterns$3,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$3,defaultParseWidth:"any"})},match$8=match$7,locale$3={code:"en-US",formatDistance:formatDistance$7,formatLong:formatLong$7,formatRelative:formatRelative$7,localize:localize$7,match:match$7,options:{weekStartsOn:0,firstWeekContainsDate:1}},defaultLocale$2=locale$3,formattingTokensRegExp$1=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,longFormattingTokensRegExp$1=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,escapedStringRegExp$1=/^'([^]*?)'?$/,doubleQuoteRegExp$1=/''/g,unescapedLatinCharacterRegExp$1=/[a-zA-Z]/;function format(r,i,o){requiredArgs(2,arguments);var e=String(i),t=getDefaultOptions(),a=null!=(n=null!=(n=null==o?void 0:o.locale)?n:t.locale)?n:defaultLocale$2,n=toInteger(null!=(n=null!=(n=null!=(n=null!=(n=null==o?void 0:o.firstWeekContainsDate)?n:null==o||null==(n=o.locale)||null==(n=n.options)?void 0:n.firstWeekContainsDate)?n:t.firstWeekContainsDate)?n:null==(n=t.locale)||null==(n=n.options)?void 0:n.firstWeekContainsDate)?n:1);if(!(1<=n&&n<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");t=toInteger(null!=(c=null!=(c=null!=(c=null!=(c=null==o?void 0:o.weekStartsOn)?c:null==o||null==(c=o.locale)||null==(c=c.options)?void 0:c.weekStartsOn)?c:t.weekStartsOn)?c:null==(c=t.locale)||null==(t=c.options)?void 0:t.weekStartsOn)?c:0);if(!(0<=t&&t<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!a.localize)throw new RangeError("locale must contain localize property");if(!a.formatLong)throw new RangeError("locale must contain formatLong property");var s,l,c=toDate$1(r);if(isValid(c))return s=subMilliseconds(c,getTimezoneOffsetInMilliseconds(c)),l={firstWeekContainsDate:n,weekStartsOn:t,locale:a,_originalDate:c},e.match(longFormattingTokensRegExp$1).map(function(e){var t=e[0];return"p"===t||"P"===t?(0,longFormatters$3[t])(e,a.formatLong):e}).join("").match(formattingTokensRegExp$1).map(function(e){if("''"===e)return"'";var t=e[0];if("'"===t)return cleanEscapedString$1(e);var n=formatters$1[t];if(n)return null!=o&&o.useAdditionalWeekYearTokens||!isProtectedWeekYearToken(e)||throwProtectedError(e,i,String(r)),null!=o&&o.useAdditionalDayOfYearTokens||!isProtectedDayOfYearToken(e)||throwProtectedError(e,i,String(r)),n(s,e,a.localize,l);if(t.match(unescapedLatinCharacterRegExp$1))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return e}).join("");throw new RangeError("Invalid time value")}function cleanEscapedString$1(e){var t=e.match(escapedStringRegExp$1);return t?t[1].replace(doubleQuoteRegExp$1,"'"):e}function getDate(e){return requiredArgs(1,arguments),toDate$1(e).getDate()}function getDay(e){return requiredArgs(1,arguments),toDate$1(e).getDay()}function getDaysInMonth(e){requiredArgs(1,arguments);var t=toDate$1(e),n=t.getFullYear(),t=t.getMonth(),r=new Date(0);return r.setFullYear(n,t+1,0),r.setHours(0,0,0,0),r.getDate()}function getHours(e){return requiredArgs(1,arguments),toDate$1(e).getHours()}function getMinutes(e){return requiredArgs(1,arguments),toDate$1(e).getMinutes()}function getMonth(e){return requiredArgs(1,arguments),toDate$1(e).getMonth()}function getSeconds(e){return requiredArgs(1,arguments),toDate$1(e).getSeconds()}function getYear(e){return requiredArgs(1,arguments),toDate$1(e).getFullYear()}function isAfter(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toDate$1(t);return n.getTime()>r.getTime()}function isBefore(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toDate$1(t);return n.getTime()<r.getTime()}function isEqual$3(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toDate$1(t);return n.getTime()===r.getTime()}function isSameDay(e,t){requiredArgs(2,arguments);var n=startOfDay(e),r=startOfDay(t);return n.getTime()===r.getTime()}function isSameYear(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toDate$1(t);return n.getFullYear()===r.getFullYear()}function isSameMonth(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toDate$1(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function startOfHour(e){requiredArgs(1,arguments);var t=toDate$1(e);return t.setMinutes(0,0,0),t}function isSameHour(e,t){requiredArgs(2,arguments);var n=startOfHour(e),r=startOfHour(t);return n.getTime()===r.getTime()}function assign$1(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function _typeof$w(e){return(_typeof$w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _inherits$v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$w(e,t)}function _setPrototypeOf$w(e,t){return(_setPrototypeOf$w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$v(n){var r=_isNativeReflectConstruct$w();return function(){var e,t=_getPrototypeOf$w(n);return _possibleConstructorReturn$v(this,r?(e=_getPrototypeOf$w(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$v(e,t){return!t||"object"!==_typeof$w(t)&&"function"!=typeof t?_assertThisInitialized$v(e):t}function _assertThisInitialized$v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$w(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$w(e){return(_getPrototypeOf$w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _classCallCheck$w(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$x(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$x(e,t,n){return t&&_defineProperties$x(e.prototype,t),n&&_defineProperties$x(e,n),e}function _defineProperty$v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var TIMEZONE_UNIT_PRIORITY=10,Setter=function(){function e(){_classCallCheck$w(this,e),_defineProperty$v(this,"subPriority",0)}return _createClass$x(e,[{key:"validate",value:function(e,t){return!0}}]),e}(),ValueSetter=function(){_inherits$v(s,Setter);var a=_createSuper$v(s);function s(e,t,n,r,i){var o;return _classCallCheck$w(this,s),(o=a.call(this)).value=e,o.validateValue=t,o.setValue=n,o.priority=r,i&&(o.subPriority=i),o}return _createClass$x(s,[{key:"validate",value:function(e,t){return this.validateValue(e,this.value,t)}},{key:"set",value:function(e,t,n){return this.setValue(e,t,this.value,n)}}]),s}(),DateToSystemTimezoneSetter=function(){_inherits$v(o,Setter);var i=_createSuper$v(o);function o(){var e;_classCallCheck$w(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$v(_assertThisInitialized$v(e=i.call.apply(i,[this].concat(n))),"priority",TIMEZONE_UNIT_PRIORITY),_defineProperty$v(_assertThisInitialized$v(e),"subPriority",-1),e}return _createClass$x(o,[{key:"set",value:function(e,t){return t.timestampIsSet?e:((t=new Date(0)).setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),t.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),t)}}]),o}();function _classCallCheck$v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$w(e,t,n){return t&&_defineProperties$w(e.prototype,t),n&&_defineProperties$w(e,n),e}var Parser=function(){function e(){_classCallCheck$v(this,e)}return _createClass$w(e,[{key:"run",value:function(e,t,n,r){e=this.parse(e,t,n,r);return e?{setter:new ValueSetter(e.value,this.validate,this.set,this.priority,this.subPriority),rest:e.rest}:null}},{key:"validate",value:function(e,t,n){return!0}}]),e}();function _typeof$v(e){return(_typeof$v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$v(e,t,n){return t&&_defineProperties$v(e.prototype,t),n&&_defineProperties$v(e,n),e}function _inherits$u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$v(e,t)}function _setPrototypeOf$v(e,t){return(_setPrototypeOf$v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$u(n){var r=_isNativeReflectConstruct$v();return function(){var e,t=_getPrototypeOf$v(n);return _possibleConstructorReturn$u(this,r?(e=_getPrototypeOf$v(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$u(e,t){return!t||"object"!==_typeof$v(t)&&"function"!=typeof t?_assertThisInitialized$u(e):t}function _assertThisInitialized$u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$v(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$v(e){return(_getPrototypeOf$v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var EraParser=function(){_inherits$u(o,Parser);var i=_createSuper$u(o);function o(){var e;_classCallCheck$u(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$u(_assertThisInitialized$u(e=i.call.apply(i,[this].concat(n))),"priority",140),_defineProperty$u(_assertThisInitialized$u(e),"incompatibleTokens",["R","u","t","T"]),e}return _createClass$v(o,[{key:"parse",value:function(e,t,n){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}},{key:"set",value:function(e,t,n){return t.era=n,e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e}}]),o}(),numericPatterns={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},timezonePatterns={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function mapValue(e,t){return e&&{value:t(e.value),rest:e.rest}}function parseNumericPattern(e,t){e=t.match(e);return e?{value:parseInt(e[0],10),rest:t.slice(e[0].length)}:null}function parseTimezonePattern(e,t){var n,r,i,o,e=t.match(e);return e?"Z"===e[0]?{value:0,rest:t.slice(1)}:(n="+"===e[1]?1:-1,r=e[2]?parseInt(e[2],10):0,i=e[3]?parseInt(e[3],10):0,o=e[5]?parseInt(e[5],10):0,{value:n*(r*millisecondsInHour+i*millisecondsInMinute+o*millisecondsInSecond),rest:t.slice(e[0].length)}):null}function parseAnyDigitsSigned(e){return parseNumericPattern(numericPatterns.anyDigitsSigned,e)}function parseNDigits(e,t){switch(e){case 1:return parseNumericPattern(numericPatterns.singleDigit,t);case 2:return parseNumericPattern(numericPatterns.twoDigits,t);case 3:return parseNumericPattern(numericPatterns.threeDigits,t);case 4:return parseNumericPattern(numericPatterns.fourDigits,t);default:return parseNumericPattern(new RegExp("^\\d{1,"+e+"}"),t)}}function parseNDigitsSigned(e,t){switch(e){case 1:return parseNumericPattern(numericPatterns.singleDigitSigned,t);case 2:return parseNumericPattern(numericPatterns.twoDigitsSigned,t);case 3:return parseNumericPattern(numericPatterns.threeDigitsSigned,t);case 4:return parseNumericPattern(numericPatterns.fourDigitsSigned,t);default:return parseNumericPattern(new RegExp("^-?\\d{1,"+e+"}"),t)}}function dayPeriodEnumToHours(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function normalizeTwoDigitYear(e,t){var n=0<t,t=n?t:1-t;return t=t<=50?e||100:(t=t+50,e+100*Math.floor(t/100)-(t%100<=e?100:0)),n?t:1-t}function isLeapYearIndex$1(e){return e%400==0||e%4==0&&e%100!=0}function _typeof$u(e){return(_typeof$u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$u(e,t,n){return t&&_defineProperties$u(e.prototype,t),n&&_defineProperties$u(e,n),e}function _inherits$t(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$u(e,t)}function _setPrototypeOf$u(e,t){return(_setPrototypeOf$u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$t(n){var r=_isNativeReflectConstruct$u();return function(){var e,t=_getPrototypeOf$u(n);return _possibleConstructorReturn$t(this,r?(e=_getPrototypeOf$u(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$t(e,t){return!t||"object"!==_typeof$u(t)&&"function"!=typeof t?_assertThisInitialized$t(e):t}function _assertThisInitialized$t(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$u(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$u(e){return(_getPrototypeOf$u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var YearParser=function(){_inherits$t(o,Parser);var i=_createSuper$t(o);function o(){var e;_classCallCheck$t(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$t(_assertThisInitialized$t(e=i.call.apply(i,[this].concat(n))),"priority",130),_defineProperty$t(_assertThisInitialized$t(e),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),e}return _createClass$u(o,[{key:"parse",value:function(e,t,n){function r(e){return{year:e,isTwoDigitYear:"yy"===t}}switch(t){case"y":return mapValue(parseNDigits(4,e),r);case"yo":return mapValue(n.ordinalNumber(e,{unit:"year"}),r);default:return mapValue(parseNDigits(t.length,e),r)}}},{key:"validate",value:function(e,t){return t.isTwoDigitYear||0<t.year}},{key:"set",value:function(e,t,n){var r=e.getUTCFullYear();return n.isTwoDigitYear?(r=normalizeTwoDigitYear(n.year,r),e.setUTCFullYear(r,0,1),e.setUTCHours(0,0,0,0)):(r="era"in t&&1!==t.era?1-n.year:n.year,e.setUTCFullYear(r,0,1),e.setUTCHours(0,0,0,0)),e}}]),o}();function _typeof$t(e){return(_typeof$t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$t(e,t,n){return t&&_defineProperties$t(e.prototype,t),n&&_defineProperties$t(e,n),e}function _inherits$s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$t(e,t)}function _setPrototypeOf$t(e,t){return(_setPrototypeOf$t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$s(n){var r=_isNativeReflectConstruct$t();return function(){var e,t=_getPrototypeOf$t(n);return _possibleConstructorReturn$s(this,r?(e=_getPrototypeOf$t(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$s(e,t){return!t||"object"!==_typeof$t(t)&&"function"!=typeof t?_assertThisInitialized$s(e):t}function _assertThisInitialized$s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$t(e){return(_getPrototypeOf$t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var LocalWeekYearParser=function(){_inherits$s(o,Parser);var i=_createSuper$s(o);function o(){var e;_classCallCheck$s(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$s(_assertThisInitialized$s(e=i.call.apply(i,[this].concat(n))),"priority",130),_defineProperty$s(_assertThisInitialized$s(e),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),e}return _createClass$t(o,[{key:"parse",value:function(e,t,n){function r(e){return{year:e,isTwoDigitYear:"YY"===t}}switch(t){case"Y":return mapValue(parseNDigits(4,e),r);case"Yo":return mapValue(n.ordinalNumber(e,{unit:"year"}),r);default:return mapValue(parseNDigits(t.length,e),r)}}},{key:"validate",value:function(e,t){return t.isTwoDigitYear||0<t.year}},{key:"set",value:function(e,t,n,r){var i=getUTCWeekYear(e,r);return n.isTwoDigitYear?(i=normalizeTwoDigitYear(n.year,i),e.setUTCFullYear(i,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0)):(i="era"in t&&1!==t.era?1-n.year:n.year,e.setUTCFullYear(i,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0)),startOfUTCWeek(e,r)}}]),o}();function _typeof$s(e){return(_typeof$s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$s(e,t,n){return t&&_defineProperties$s(e.prototype,t),n&&_defineProperties$s(e,n),e}function _inherits$r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$s(e,t)}function _setPrototypeOf$s(e,t){return(_setPrototypeOf$s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$r(n){var r=_isNativeReflectConstruct$s();return function(){var e,t=_getPrototypeOf$s(n);return _possibleConstructorReturn$r(this,r?(e=_getPrototypeOf$s(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$r(e,t){return!t||"object"!==_typeof$s(t)&&"function"!=typeof t?_assertThisInitialized$r(e):t}function _assertThisInitialized$r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$s(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$s(e){return(_getPrototypeOf$s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ISOWeekYearParser=function(){_inherits$r(o,Parser);var i=_createSuper$r(o);function o(){var e;_classCallCheck$r(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$r(_assertThisInitialized$r(e=i.call.apply(i,[this].concat(n))),"priority",130),_defineProperty$r(_assertThisInitialized$r(e),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),e}return _createClass$s(o,[{key:"parse",value:function(e,t){return parseNDigitsSigned("R"===t?4:t.length,e)}},{key:"set",value:function(e,t,n){var r=new Date(0);return r.setUTCFullYear(n,0,4),r.setUTCHours(0,0,0,0),startOfUTCISOWeek(r)}}]),o}();function _typeof$r(e){return(_typeof$r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$r(e,t,n){return t&&_defineProperties$r(e.prototype,t),n&&_defineProperties$r(e,n),e}function _inherits$q(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$r(e,t)}function _setPrototypeOf$r(e,t){return(_setPrototypeOf$r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$q(n){var r=_isNativeReflectConstruct$r();return function(){var e,t=_getPrototypeOf$r(n);return _possibleConstructorReturn$q(this,r?(e=_getPrototypeOf$r(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$q(e,t){return!t||"object"!==_typeof$r(t)&&"function"!=typeof t?_assertThisInitialized$q(e):t}function _assertThisInitialized$q(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$r(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$r(e){return(_getPrototypeOf$r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ExtendedYearParser=function(){_inherits$q(o,Parser);var i=_createSuper$q(o);function o(){var e;_classCallCheck$q(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$q(_assertThisInitialized$q(e=i.call.apply(i,[this].concat(n))),"priority",130),_defineProperty$q(_assertThisInitialized$q(e),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),e}return _createClass$r(o,[{key:"parse",value:function(e,t){return parseNDigitsSigned("u"===t?4:t.length,e)}},{key:"set",value:function(e,t,n){return e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e}}]),o}();function _typeof$q(e){return(_typeof$q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$q(e,t,n){return t&&_defineProperties$q(e.prototype,t),n&&_defineProperties$q(e,n),e}function _inherits$p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$q(e,t)}function _setPrototypeOf$q(e,t){return(_setPrototypeOf$q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$p(n){var r=_isNativeReflectConstruct$q();return function(){var e,t=_getPrototypeOf$q(n);return _possibleConstructorReturn$p(this,r?(e=_getPrototypeOf$q(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$p(e,t){return!t||"object"!==_typeof$q(t)&&"function"!=typeof t?_assertThisInitialized$p(e):t}function _assertThisInitialized$p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$q(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$q(e){return(_getPrototypeOf$q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var QuarterParser=function(){_inherits$p(o,Parser);var i=_createSuper$p(o);function o(){var e;_classCallCheck$p(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$p(_assertThisInitialized$p(e=i.call.apply(i,[this].concat(n))),"priority",120),_defineProperty$p(_assertThisInitialized$p(e),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),e}return _createClass$q(o,[{key:"parse",value:function(e,t,n){switch(t){case"Q":case"QQ":return parseNDigits(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return 1<=t&&t<=4}},{key:"set",value:function(e,t,n){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e}}]),o}();function _typeof$p(e){return(_typeof$p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$p(e,t,n){return t&&_defineProperties$p(e.prototype,t),n&&_defineProperties$p(e,n),e}function _inherits$o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$p(e,t)}function _setPrototypeOf$p(e,t){return(_setPrototypeOf$p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$o(n){var r=_isNativeReflectConstruct$p();return function(){var e,t=_getPrototypeOf$p(n);return _possibleConstructorReturn$o(this,r?(e=_getPrototypeOf$p(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$o(e,t){return!t||"object"!==_typeof$p(t)&&"function"!=typeof t?_assertThisInitialized$o(e):t}function _assertThisInitialized$o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$p(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$p(e){return(_getPrototypeOf$p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var StandAloneQuarterParser=function(){_inherits$o(o,Parser);var i=_createSuper$o(o);function o(){var e;_classCallCheck$o(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$o(_assertThisInitialized$o(e=i.call.apply(i,[this].concat(n))),"priority",120),_defineProperty$o(_assertThisInitialized$o(e),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),e}return _createClass$p(o,[{key:"parse",value:function(e,t,n){switch(t){case"q":case"qq":return parseNDigits(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,t){return 1<=t&&t<=4}},{key:"set",value:function(e,t,n){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e}}]),o}();function _typeof$o(e){return(_typeof$o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$o(e,t,n){return t&&_defineProperties$o(e.prototype,t),n&&_defineProperties$o(e,n),e}function _inherits$n(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$o(e,t)}function _setPrototypeOf$o(e,t){return(_setPrototypeOf$o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$n(n){var r=_isNativeReflectConstruct$o();return function(){var e,t=_getPrototypeOf$o(n);return _possibleConstructorReturn$n(this,r?(e=_getPrototypeOf$o(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$n(e,t){return!t||"object"!==_typeof$o(t)&&"function"!=typeof t?_assertThisInitialized$n(e):t}function _assertThisInitialized$n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$o(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$o(e){return(_getPrototypeOf$o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var MonthParser=function(){_inherits$n(o,Parser);var i=_createSuper$n(o);function o(){var e;_classCallCheck$n(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$n(_assertThisInitialized$n(e=i.call.apply(i,[this].concat(n))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),_defineProperty$n(_assertThisInitialized$n(e),"priority",110),e}return _createClass$o(o,[{key:"parse",value:function(e,t,n){function r(e){return e-1}switch(t){case"M":return mapValue(parseNumericPattern(numericPatterns.month,e),r);case"MM":return mapValue(parseNDigits(2,e),r);case"Mo":return mapValue(n.ordinalNumber(e,{unit:"month"}),r);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return 0<=t&&t<=11}},{key:"set",value:function(e,t,n){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e}}]),o}();function _typeof$n(e){return(_typeof$n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$n(e,t,n){return t&&_defineProperties$n(e.prototype,t),n&&_defineProperties$n(e,n),e}function _inherits$m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$n(e,t)}function _setPrototypeOf$n(e,t){return(_setPrototypeOf$n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$m(n){var r=_isNativeReflectConstruct$n();return function(){var e,t=_getPrototypeOf$n(n);return _possibleConstructorReturn$m(this,r?(e=_getPrototypeOf$n(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$m(e,t){return!t||"object"!==_typeof$n(t)&&"function"!=typeof t?_assertThisInitialized$m(e):t}function _assertThisInitialized$m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$n(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$n(e){return(_getPrototypeOf$n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var StandAloneMonthParser=function(){_inherits$m(o,Parser);var i=_createSuper$m(o);function o(){var e;_classCallCheck$m(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$m(_assertThisInitialized$m(e=i.call.apply(i,[this].concat(n))),"priority",110),_defineProperty$m(_assertThisInitialized$m(e),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),e}return _createClass$n(o,[{key:"parse",value:function(e,t,n){function r(e){return e-1}switch(t){case"L":return mapValue(parseNumericPattern(numericPatterns.month,e),r);case"LL":return mapValue(parseNDigits(2,e),r);case"Lo":return mapValue(n.ordinalNumber(e,{unit:"month"}),r);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,t){return 0<=t&&t<=11}},{key:"set",value:function(e,t,n){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e}}]),o}();function setUTCWeek(e,t,n){requiredArgs(2,arguments);var r=toDate$1(e),i=toInteger(t),i=getUTCWeek(r,n)-i;return r.setUTCDate(r.getUTCDate()-7*i),r}function _typeof$m(e){return(_typeof$m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$m(e,t,n){return t&&_defineProperties$m(e.prototype,t),n&&_defineProperties$m(e,n),e}function _inherits$l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$m(e,t)}function _setPrototypeOf$m(e,t){return(_setPrototypeOf$m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$l(n){var r=_isNativeReflectConstruct$m();return function(){var e,t=_getPrototypeOf$m(n);return _possibleConstructorReturn$l(this,r?(e=_getPrototypeOf$m(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$l(e,t){return!t||"object"!==_typeof$m(t)&&"function"!=typeof t?_assertThisInitialized$l(e):t}function _assertThisInitialized$l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$m(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$m(e){return(_getPrototypeOf$m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var LocalWeekParser=function(){_inherits$l(o,Parser);var i=_createSuper$l(o);function o(){var e;_classCallCheck$l(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$l(_assertThisInitialized$l(e=i.call.apply(i,[this].concat(n))),"priority",100),_defineProperty$l(_assertThisInitialized$l(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),e}return _createClass$m(o,[{key:"parse",value:function(e,t,n){switch(t){case"w":return parseNumericPattern(numericPatterns.week,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return parseNDigits(t.length,e)}}},{key:"validate",value:function(e,t){return 1<=t&&t<=53}},{key:"set",value:function(e,t,n,r){return startOfUTCWeek(setUTCWeek(e,n,r),r)}}]),o}();function setUTCISOWeek(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toInteger(t),r=getUTCISOWeek(n)-r;return n.setUTCDate(n.getUTCDate()-7*r),n}function _typeof$l(e){return(_typeof$l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$k(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$l(e,t,n){return t&&_defineProperties$l(e.prototype,t),n&&_defineProperties$l(e,n),e}function _inherits$k(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$l(e,t)}function _setPrototypeOf$l(e,t){return(_setPrototypeOf$l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$k(n){var r=_isNativeReflectConstruct$l();return function(){var e,t=_getPrototypeOf$l(n);return _possibleConstructorReturn$k(this,r?(e=_getPrototypeOf$l(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$k(e,t){return!t||"object"!==_typeof$l(t)&&"function"!=typeof t?_assertThisInitialized$k(e):t}function _assertThisInitialized$k(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$l(e){return(_getPrototypeOf$l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ISOWeekParser=function(){_inherits$k(o,Parser);var i=_createSuper$k(o);function o(){var e;_classCallCheck$k(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$k(_assertThisInitialized$k(e=i.call.apply(i,[this].concat(n))),"priority",100),_defineProperty$k(_assertThisInitialized$k(e),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),e}return _createClass$l(o,[{key:"parse",value:function(e,t,n){switch(t){case"I":return parseNumericPattern(numericPatterns.week,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return parseNDigits(t.length,e)}}},{key:"validate",value:function(e,t){return 1<=t&&t<=53}},{key:"set",value:function(e,t,n){return startOfUTCISOWeek(setUTCISOWeek(e,n))}}]),o}();function _typeof$k(e){return(_typeof$k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$k(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$k(e,t,n){return t&&_defineProperties$k(e.prototype,t),n&&_defineProperties$k(e,n),e}function _inherits$j(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$k(e,t)}function _setPrototypeOf$k(e,t){return(_setPrototypeOf$k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$j(n){var r=_isNativeReflectConstruct$k();return function(){var e,t=_getPrototypeOf$k(n);return _possibleConstructorReturn$j(this,r?(e=_getPrototypeOf$k(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$j(e,t){return!t||"object"!==_typeof$k(t)&&"function"!=typeof t?_assertThisInitialized$j(e):t}function _assertThisInitialized$j(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$k(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$k(e){return(_getPrototypeOf$k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var DAYS_IN_MONTH=[31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP_YEAR=[31,29,31,30,31,30,31,31,30,31,30,31],DateParser=function(){_inherits$j(o,Parser);var i=_createSuper$j(o);function o(){var e;_classCallCheck$j(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$j(_assertThisInitialized$j(e=i.call.apply(i,[this].concat(n))),"priority",90),_defineProperty$j(_assertThisInitialized$j(e),"subPriority",1),_defineProperty$j(_assertThisInitialized$j(e),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),e}return _createClass$k(o,[{key:"parse",value:function(e,t,n){switch(t){case"d":return parseNumericPattern(numericPatterns.date,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return parseNDigits(t.length,e)}}},{key:"validate",value:function(e,t){var n=isLeapYearIndex$1(e.getUTCFullYear()),e=e.getUTCMonth();return n?1<=t&&t<=DAYS_IN_MONTH_LEAP_YEAR[e]:1<=t&&t<=DAYS_IN_MONTH[e]}},{key:"set",value:function(e,t,n){return e.setUTCDate(n),e.setUTCHours(0,0,0,0),e}}]),o}();function _typeof$j(e){return(_typeof$j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$j(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$j(e,t,n){return t&&_defineProperties$j(e.prototype,t),n&&_defineProperties$j(e,n),e}function _inherits$i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$j(e,t)}function _setPrototypeOf$j(e,t){return(_setPrototypeOf$j=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$i(n){var r=_isNativeReflectConstruct$j();return function(){var e,t=_getPrototypeOf$j(n);return _possibleConstructorReturn$i(this,r?(e=_getPrototypeOf$j(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$i(e,t){return!t||"object"!==_typeof$j(t)&&"function"!=typeof t?_assertThisInitialized$i(e):t}function _assertThisInitialized$i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$j(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$j(e){return(_getPrototypeOf$j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var DayOfYearParser=function(){_inherits$i(o,Parser);var i=_createSuper$i(o);function o(){var e;_classCallCheck$i(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$i(_assertThisInitialized$i(e=i.call.apply(i,[this].concat(n))),"priority",90),_defineProperty$i(_assertThisInitialized$i(e),"subpriority",1),_defineProperty$i(_assertThisInitialized$i(e),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),e}return _createClass$j(o,[{key:"parse",value:function(e,t,n){switch(t){case"D":case"DD":return parseNumericPattern(numericPatterns.dayOfYear,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return parseNDigits(t.length,e)}}},{key:"validate",value:function(e,t){return isLeapYearIndex$1(e.getUTCFullYear())?1<=t&&t<=366:1<=t&&t<=365}},{key:"set",value:function(e,t,n){return e.setUTCMonth(0,n),e.setUTCHours(0,0,0,0),e}}]),o}();function setUTCDay(e,t,n){requiredArgs(2,arguments);var r,i,o=getDefaultOptions(),o=toInteger(null!=(r=null!=(r=null!=(r=null!=(r=null==n?void 0:n.weekStartsOn)?r:null==n||null==(r=n.locale)||null==(r=r.options)?void 0:r.weekStartsOn)?r:o.weekStartsOn)?r:null==(r=o.locale)||null==(o=r.options)?void 0:o.weekStartsOn)?r:0);if(0<=o&&o<=6)return r=toDate$1(e),o=((7+(i=toInteger(t))%7)%7<o?7:0)+i-r.getUTCDay(),r.setUTCDate(r.getUTCDate()+o),r;throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}function _typeof$i(e){return(_typeof$i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$i(e,t,n){return t&&_defineProperties$i(e.prototype,t),n&&_defineProperties$i(e,n),e}function _inherits$h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$i(e,t)}function _setPrototypeOf$i(e,t){return(_setPrototypeOf$i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$h(n){var r=_isNativeReflectConstruct$i();return function(){var e,t=_getPrototypeOf$i(n);return _possibleConstructorReturn$h(this,r?(e=_getPrototypeOf$i(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$h(e,t){return!t||"object"!==_typeof$i(t)&&"function"!=typeof t?_assertThisInitialized$h(e):t}function _assertThisInitialized$h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$i(e){return(_getPrototypeOf$i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var DayParser=function(){_inherits$h(o,Parser);var i=_createSuper$h(o);function o(){var e;_classCallCheck$h(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$h(_assertThisInitialized$h(e=i.call.apply(i,[this].concat(n))),"priority",90),_defineProperty$h(_assertThisInitialized$h(e),"incompatibleTokens",["D","i","e","c","t","T"]),e}return _createClass$i(o,[{key:"parse",value:function(e,t,n){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return 0<=t&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=setUTCDay(e,n,r)).setUTCHours(0,0,0,0),e}}]),o}();function _typeof$h(e){return(_typeof$h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$h(e,t,n){return t&&_defineProperties$h(e.prototype,t),n&&_defineProperties$h(e,n),e}function _inherits$g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$h(e,t)}function _setPrototypeOf$h(e,t){return(_setPrototypeOf$h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$g(n){var r=_isNativeReflectConstruct$h();return function(){var e,t=_getPrototypeOf$h(n);return _possibleConstructorReturn$g(this,r?(e=_getPrototypeOf$h(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$g(e,t){return!t||"object"!==_typeof$h(t)&&"function"!=typeof t?_assertThisInitialized$g(e):t}function _assertThisInitialized$g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$h(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$h(e){return(_getPrototypeOf$h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var LocalDayParser=function(){_inherits$g(o,Parser);var i=_createSuper$g(o);function o(){var e;_classCallCheck$g(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$g(_assertThisInitialized$g(e=i.call.apply(i,[this].concat(n))),"priority",90),_defineProperty$g(_assertThisInitialized$g(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),e}return _createClass$h(o,[{key:"parse",value:function(e,t,n,r){function i(e){var t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t}switch(t){case"e":case"ee":return mapValue(parseNDigits(t.length,e),i);case"eo":return mapValue(n.ordinalNumber(e,{unit:"day"}),i);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return 0<=t&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=setUTCDay(e,n,r)).setUTCHours(0,0,0,0),e}}]),o}();function _typeof$g(e){return(_typeof$g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$g(e,t,n){return t&&_defineProperties$g(e.prototype,t),n&&_defineProperties$g(e,n),e}function _inherits$f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$g(e,t)}function _setPrototypeOf$g(e,t){return(_setPrototypeOf$g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$f(n){var r=_isNativeReflectConstruct$g();return function(){var e,t=_getPrototypeOf$g(n);return _possibleConstructorReturn$f(this,r?(e=_getPrototypeOf$g(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$f(e,t){return!t||"object"!==_typeof$g(t)&&"function"!=typeof t?_assertThisInitialized$f(e):t}function _assertThisInitialized$f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$g(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$g(e){return(_getPrototypeOf$g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var StandAloneLocalDayParser=function(){_inherits$f(o,Parser);var i=_createSuper$f(o);function o(){var e;_classCallCheck$f(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$f(_assertThisInitialized$f(e=i.call.apply(i,[this].concat(n))),"priority",90),_defineProperty$f(_assertThisInitialized$f(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),e}return _createClass$g(o,[{key:"parse",value:function(e,t,n,r){function i(e){var t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t}switch(t){case"c":case"cc":return mapValue(parseNDigits(t.length,e),i);case"co":return mapValue(n.ordinalNumber(e,{unit:"day"}),i);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,t){return 0<=t&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=setUTCDay(e,n,r)).setUTCHours(0,0,0,0),e}}]),o}();function setUTCISODay(e,t){requiredArgs(2,arguments);var n=toInteger(t),r=(n%7==0&&(n-=7),toDate$1(e)),n=((7+n%7)%7<1?7:0)+n-r.getUTCDay();return r.setUTCDate(r.getUTCDate()+n),r}function _typeof$f(e){return(_typeof$f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$f(e,t,n){return t&&_defineProperties$f(e.prototype,t),n&&_defineProperties$f(e,n),e}function _inherits$e(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$f(e,t)}function _setPrototypeOf$f(e,t){return(_setPrototypeOf$f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$e(n){var r=_isNativeReflectConstruct$f();return function(){var e,t=_getPrototypeOf$f(n);return _possibleConstructorReturn$e(this,r?(e=_getPrototypeOf$f(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$e(e,t){return!t||"object"!==_typeof$f(t)&&"function"!=typeof t?_assertThisInitialized$e(e):t}function _assertThisInitialized$e(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$f(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$f(e){return(_getPrototypeOf$f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ISODayParser=function(){_inherits$e(o,Parser);var i=_createSuper$e(o);function o(){var e;_classCallCheck$e(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$e(_assertThisInitialized$e(e=i.call.apply(i,[this].concat(n))),"priority",90),_defineProperty$e(_assertThisInitialized$e(e),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),e}return _createClass$f(o,[{key:"parse",value:function(e,t,n){function r(e){return 0===e?7:e}switch(t){case"i":case"ii":return parseNDigits(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return mapValue(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiii":return mapValue(n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return mapValue(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);default:return mapValue(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r)}}},{key:"validate",value:function(e,t){return 1<=t&&t<=7}},{key:"set",value:function(e,t,n){return(e=setUTCISODay(e,n)).setUTCHours(0,0,0,0),e}}]),o}();function _typeof$e(e){return(_typeof$e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$e(e,t,n){return t&&_defineProperties$e(e.prototype,t),n&&_defineProperties$e(e,n),e}function _inherits$d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$e(e,t)}function _setPrototypeOf$e(e,t){return(_setPrototypeOf$e=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$d(n){var r=_isNativeReflectConstruct$e();return function(){var e,t=_getPrototypeOf$e(n);return _possibleConstructorReturn$d(this,r?(e=_getPrototypeOf$e(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$d(e,t){return!t||"object"!==_typeof$e(t)&&"function"!=typeof t?_assertThisInitialized$d(e):t}function _assertThisInitialized$d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$e(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$e(e){return(_getPrototypeOf$e=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var AMPMParser=function(){_inherits$d(o,Parser);var i=_createSuper$d(o);function o(){var e;_classCallCheck$d(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$d(_assertThisInitialized$d(e=i.call.apply(i,[this].concat(n))),"priority",80),_defineProperty$d(_assertThisInitialized$d(e),"incompatibleTokens",["b","B","H","k","t","T"]),e}return _createClass$e(o,[{key:"parse",value:function(e,t,n){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,t,n){return e.setUTCHours(dayPeriodEnumToHours(n),0,0,0),e}}]),o}();function _typeof$d(e){return(_typeof$d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$d(e,t,n){return t&&_defineProperties$d(e.prototype,t),n&&_defineProperties$d(e,n),e}function _inherits$c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$d(e,t)}function _setPrototypeOf$d(e,t){return(_setPrototypeOf$d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$c(n){var r=_isNativeReflectConstruct$d();return function(){var e,t=_getPrototypeOf$d(n);return _possibleConstructorReturn$c(this,r?(e=_getPrototypeOf$d(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$c(e,t){return!t||"object"!==_typeof$d(t)&&"function"!=typeof t?_assertThisInitialized$c(e):t}function _assertThisInitialized$c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$d(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$d(e){return(_getPrototypeOf$d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var AMPMMidnightParser=function(){_inherits$c(o,Parser);var i=_createSuper$c(o);function o(){var e;_classCallCheck$c(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$c(_assertThisInitialized$c(e=i.call.apply(i,[this].concat(n))),"priority",80),_defineProperty$c(_assertThisInitialized$c(e),"incompatibleTokens",["a","B","H","k","t","T"]),e}return _createClass$d(o,[{key:"parse",value:function(e,t,n){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,t,n){return e.setUTCHours(dayPeriodEnumToHours(n),0,0,0),e}}]),o}();function _typeof$c(e){return(_typeof$c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$c(e,t,n){return t&&_defineProperties$c(e.prototype,t),n&&_defineProperties$c(e,n),e}function _inherits$b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$c(e,t)}function _setPrototypeOf$c(e,t){return(_setPrototypeOf$c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$b(n){var r=_isNativeReflectConstruct$c();return function(){var e,t=_getPrototypeOf$c(n);return _possibleConstructorReturn$b(this,r?(e=_getPrototypeOf$c(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$b(e,t){return!t||"object"!==_typeof$c(t)&&"function"!=typeof t?_assertThisInitialized$b(e):t}function _assertThisInitialized$b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$c(e){return(_getPrototypeOf$c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var DayPeriodParser=function(){_inherits$b(o,Parser);var i=_createSuper$b(o);function o(){var e;_classCallCheck$b(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$b(_assertThisInitialized$b(e=i.call.apply(i,[this].concat(n))),"priority",80),_defineProperty$b(_assertThisInitialized$b(e),"incompatibleTokens",["a","b","t","T"]),e}return _createClass$c(o,[{key:"parse",value:function(e,t,n){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,t,n){return e.setUTCHours(dayPeriodEnumToHours(n),0,0,0),e}}]),o}();function _typeof$b(e){return(_typeof$b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$b(e,t,n){return t&&_defineProperties$b(e.prototype,t),n&&_defineProperties$b(e,n),e}function _inherits$a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$b(e,t)}function _setPrototypeOf$b(e,t){return(_setPrototypeOf$b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$a(n){var r=_isNativeReflectConstruct$b();return function(){var e,t=_getPrototypeOf$b(n);return _possibleConstructorReturn$a(this,r?(e=_getPrototypeOf$b(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$a(e,t){return!t||"object"!==_typeof$b(t)&&"function"!=typeof t?_assertThisInitialized$a(e):t}function _assertThisInitialized$a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$b(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$b(e){return(_getPrototypeOf$b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Hour1to12Parser=function(){_inherits$a(o,Parser);var i=_createSuper$a(o);function o(){var e;_classCallCheck$a(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$a(_assertThisInitialized$a(e=i.call.apply(i,[this].concat(n))),"priority",70),_defineProperty$a(_assertThisInitialized$a(e),"incompatibleTokens",["H","K","k","t","T"]),e}return _createClass$b(o,[{key:"parse",value:function(e,t,n){switch(t){case"h":return parseNumericPattern(numericPatterns.hour12h,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return parseNDigits(t.length,e)}}},{key:"validate",value:function(e,t){return 1<=t&&t<=12}},{key:"set",value:function(e,t,n){var r=12<=e.getUTCHours();return r&&n<12?e.setUTCHours(n+12,0,0,0):r||12!==n?e.setUTCHours(n,0,0,0):e.setUTCHours(0,0,0,0),e}}]),o}();function _typeof$a(e){return(_typeof$a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$a(e,t,n){return t&&_defineProperties$a(e.prototype,t),n&&_defineProperties$a(e,n),e}function _inherits$9(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$a(e,t)}function _setPrototypeOf$a(e,t){return(_setPrototypeOf$a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$9(n){var r=_isNativeReflectConstruct$a();return function(){var e,t=_getPrototypeOf$a(n);return _possibleConstructorReturn$9(this,r?(e=_getPrototypeOf$a(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$9(e,t){return!t||"object"!==_typeof$a(t)&&"function"!=typeof t?_assertThisInitialized$9(e):t}function _assertThisInitialized$9(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$a(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$a(e){return(_getPrototypeOf$a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$9(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Hour0to23Parser=function(){_inherits$9(o,Parser);var i=_createSuper$9(o);function o(){var e;_classCallCheck$9(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$9(_assertThisInitialized$9(e=i.call.apply(i,[this].concat(n))),"priority",70),_defineProperty$9(_assertThisInitialized$9(e),"incompatibleTokens",["a","b","h","K","k","t","T"]),e}return _createClass$a(o,[{key:"parse",value:function(e,t,n){switch(t){case"H":return parseNumericPattern(numericPatterns.hour23h,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return parseNDigits(t.length,e)}}},{key:"validate",value:function(e,t){return 0<=t&&t<=23}},{key:"set",value:function(e,t,n){return e.setUTCHours(n,0,0,0),e}}]),o}();function _typeof$9(e){return(_typeof$9="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$9(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$9(e,t,n){return t&&_defineProperties$9(e.prototype,t),n&&_defineProperties$9(e,n),e}function _inherits$8(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$9(e,t)}function _setPrototypeOf$9(e,t){return(_setPrototypeOf$9=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$8(n){var r=_isNativeReflectConstruct$9();return function(){var e,t=_getPrototypeOf$9(n);return _possibleConstructorReturn$8(this,r?(e=_getPrototypeOf$9(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$8(e,t){return!t||"object"!==_typeof$9(t)&&"function"!=typeof t?_assertThisInitialized$8(e):t}function _assertThisInitialized$8(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$9(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$9(e){return(_getPrototypeOf$9=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$8(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Hour0To11Parser=function(){_inherits$8(o,Parser);var i=_createSuper$8(o);function o(){var e;_classCallCheck$8(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$8(_assertThisInitialized$8(e=i.call.apply(i,[this].concat(n))),"priority",70),_defineProperty$8(_assertThisInitialized$8(e),"incompatibleTokens",["h","H","k","t","T"]),e}return _createClass$9(o,[{key:"parse",value:function(e,t,n){switch(t){case"K":return parseNumericPattern(numericPatterns.hour11h,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return parseNDigits(t.length,e)}}},{key:"validate",value:function(e,t){return 0<=t&&t<=11}},{key:"set",value:function(e,t,n){return 12<=e.getUTCHours()&&n<12?e.setUTCHours(n+12,0,0,0):e.setUTCHours(n,0,0,0),e}}]),o}();function _typeof$8(e){return(_typeof$8="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$8(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$8(e,t,n){return t&&_defineProperties$8(e.prototype,t),n&&_defineProperties$8(e,n),e}function _inherits$7(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$8(e,t)}function _setPrototypeOf$8(e,t){return(_setPrototypeOf$8=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$7(n){var r=_isNativeReflectConstruct$8();return function(){var e,t=_getPrototypeOf$8(n);return _possibleConstructorReturn$7(this,r?(e=_getPrototypeOf$8(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$7(e,t){return!t||"object"!==_typeof$8(t)&&"function"!=typeof t?_assertThisInitialized$7(e):t}function _assertThisInitialized$7(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$8(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$8(e){return(_getPrototypeOf$8=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$7(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Hour1To24Parser=function(){_inherits$7(o,Parser);var i=_createSuper$7(o);function o(){var e;_classCallCheck$7(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$7(_assertThisInitialized$7(e=i.call.apply(i,[this].concat(n))),"priority",70),_defineProperty$7(_assertThisInitialized$7(e),"incompatibleTokens",["a","b","h","H","K","t","T"]),e}return _createClass$8(o,[{key:"parse",value:function(e,t,n){switch(t){case"k":return parseNumericPattern(numericPatterns.hour24h,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return parseNDigits(t.length,e)}}},{key:"validate",value:function(e,t){return 1<=t&&t<=24}},{key:"set",value:function(e,t,n){return e.setUTCHours(n<=24?n%24:n,0,0,0),e}}]),o}();function _typeof$7(e){return(_typeof$7="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$7(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$7(e,t,n){return t&&_defineProperties$7(e.prototype,t),n&&_defineProperties$7(e,n),e}function _inherits$6(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$7(e,t)}function _setPrototypeOf$7(e,t){return(_setPrototypeOf$7=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$6(n){var r=_isNativeReflectConstruct$7();return function(){var e,t=_getPrototypeOf$7(n);return _possibleConstructorReturn$6(this,r?(e=_getPrototypeOf$7(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$6(e,t){return!t||"object"!==_typeof$7(t)&&"function"!=typeof t?_assertThisInitialized$6(e):t}function _assertThisInitialized$6(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$7(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$7(e){return(_getPrototypeOf$7=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$6(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var MinuteParser=function(){_inherits$6(o,Parser);var i=_createSuper$6(o);function o(){var e;_classCallCheck$6(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$6(_assertThisInitialized$6(e=i.call.apply(i,[this].concat(n))),"priority",60),_defineProperty$6(_assertThisInitialized$6(e),"incompatibleTokens",["t","T"]),e}return _createClass$7(o,[{key:"parse",value:function(e,t,n){switch(t){case"m":return parseNumericPattern(numericPatterns.minute,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return parseNDigits(t.length,e)}}},{key:"validate",value:function(e,t){return 0<=t&&t<=59}},{key:"set",value:function(e,t,n){return e.setUTCMinutes(n,0,0),e}}]),o}();function _typeof$6(e){return(_typeof$6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$5(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$6(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$6(e,t,n){return t&&_defineProperties$6(e.prototype,t),n&&_defineProperties$6(e,n),e}function _inherits$5(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$6(e,t)}function _setPrototypeOf$6(e,t){return(_setPrototypeOf$6=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$5(n){var r=_isNativeReflectConstruct$6();return function(){var e,t=_getPrototypeOf$6(n);return _possibleConstructorReturn$5(this,r?(e=_getPrototypeOf$6(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$5(e,t){return!t||"object"!==_typeof$6(t)&&"function"!=typeof t?_assertThisInitialized$5(e):t}function _assertThisInitialized$5(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$6(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$6(e){return(_getPrototypeOf$6=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$5(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var SecondParser=function(){_inherits$5(o,Parser);var i=_createSuper$5(o);function o(){var e;_classCallCheck$5(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$5(_assertThisInitialized$5(e=i.call.apply(i,[this].concat(n))),"priority",50),_defineProperty$5(_assertThisInitialized$5(e),"incompatibleTokens",["t","T"]),e}return _createClass$6(o,[{key:"parse",value:function(e,t,n){switch(t){case"s":return parseNumericPattern(numericPatterns.second,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return parseNDigits(t.length,e)}}},{key:"validate",value:function(e,t){return 0<=t&&t<=59}},{key:"set",value:function(e,t,n){return e.setUTCSeconds(n,0),e}}]),o}();function _typeof$5(e){return(_typeof$5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$5(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$5(e,t,n){return t&&_defineProperties$5(e.prototype,t),n&&_defineProperties$5(e,n),e}function _inherits$4(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$5(e,t)}function _setPrototypeOf$5(e,t){return(_setPrototypeOf$5=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$4(n){var r=_isNativeReflectConstruct$5();return function(){var e,t=_getPrototypeOf$5(n);return _possibleConstructorReturn$4(this,r?(e=_getPrototypeOf$5(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$4(e,t){return!t||"object"!==_typeof$5(t)&&"function"!=typeof t?_assertThisInitialized$4(e):t}function _assertThisInitialized$4(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$5(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$5(e){return(_getPrototypeOf$5=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$4(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var FractionOfSecondParser=function(){_inherits$4(o,Parser);var i=_createSuper$4(o);function o(){var e;_classCallCheck$4(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$4(_assertThisInitialized$4(e=i.call.apply(i,[this].concat(n))),"priority",30),_defineProperty$4(_assertThisInitialized$4(e),"incompatibleTokens",["t","T"]),e}return _createClass$5(o,[{key:"parse",value:function(e,t){return mapValue(parseNDigits(t.length,e),function(e){return Math.floor(e*Math.pow(10,3-t.length))})}},{key:"set",value:function(e,t,n){return e.setUTCMilliseconds(n),e}}]),o}();function _typeof$4(e){return(_typeof$4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$3(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$4(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$4(e,t,n){return t&&_defineProperties$4(e.prototype,t),n&&_defineProperties$4(e,n),e}function _inherits$3(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$4(e,t)}function _setPrototypeOf$4(e,t){return(_setPrototypeOf$4=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$3(n){var r=_isNativeReflectConstruct$4();return function(){var e,t=_getPrototypeOf$4(n);return _possibleConstructorReturn$3(this,r?(e=_getPrototypeOf$4(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$3(e,t){return!t||"object"!==_typeof$4(t)&&"function"!=typeof t?_assertThisInitialized$3(e):t}function _assertThisInitialized$3(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$4(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$4(e){return(_getPrototypeOf$4=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$3(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ISOTimezoneWithZParser=function(){_inherits$3(o,Parser);var i=_createSuper$3(o);function o(){var e;_classCallCheck$3(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$3(_assertThisInitialized$3(e=i.call.apply(i,[this].concat(n))),"priority",10),_defineProperty$3(_assertThisInitialized$3(e),"incompatibleTokens",["t","T","x"]),e}return _createClass$4(o,[{key:"parse",value:function(e,t){switch(t){case"X":return parseTimezonePattern(timezonePatterns.basicOptionalMinutes,e);case"XX":return parseTimezonePattern(timezonePatterns.basic,e);case"XXXX":return parseTimezonePattern(timezonePatterns.basicOptionalSeconds,e);case"XXXXX":return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds,e);default:return parseTimezonePattern(timezonePatterns.extended,e)}}},{key:"set",value:function(e,t,n){return t.timestampIsSet?e:new Date(e.getTime()-n)}}]),o}();function _typeof$3(e){return(_typeof$3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$3(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$3(e,t,n){return t&&_defineProperties$3(e.prototype,t),n&&_defineProperties$3(e,n),e}function _inherits$2(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$3(e,t)}function _setPrototypeOf$3(e,t){return(_setPrototypeOf$3=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$2(n){var r=_isNativeReflectConstruct$3();return function(){var e,t=_getPrototypeOf$3(n);return _possibleConstructorReturn$2(this,r?(e=_getPrototypeOf$3(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$2(e,t){return!t||"object"!==_typeof$3(t)&&"function"!=typeof t?_assertThisInitialized$2(e):t}function _assertThisInitialized$2(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$3(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$3(e){return(_getPrototypeOf$3=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$2(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ISOTimezoneParser=function(){_inherits$2(o,Parser);var i=_createSuper$2(o);function o(){var e;_classCallCheck$2(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$2(_assertThisInitialized$2(e=i.call.apply(i,[this].concat(n))),"priority",10),_defineProperty$2(_assertThisInitialized$2(e),"incompatibleTokens",["t","T","X"]),e}return _createClass$3(o,[{key:"parse",value:function(e,t){switch(t){case"x":return parseTimezonePattern(timezonePatterns.basicOptionalMinutes,e);case"xx":return parseTimezonePattern(timezonePatterns.basic,e);case"xxxx":return parseTimezonePattern(timezonePatterns.basicOptionalSeconds,e);case"xxxxx":return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds,e);default:return parseTimezonePattern(timezonePatterns.extended,e)}}},{key:"set",value:function(e,t,n){return t.timestampIsSet?e:new Date(e.getTime()-n)}}]),o}();function _typeof$2(e){return(_typeof$2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$2(e,t,n){return t&&_defineProperties$2(e.prototype,t),n&&_defineProperties$2(e,n),e}function _inherits$1(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$2(e,t)}function _setPrototypeOf$2(e,t){return(_setPrototypeOf$2=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$1(n){var r=_isNativeReflectConstruct$2();return function(){var e,t=_getPrototypeOf$2(n);return _possibleConstructorReturn$1(this,r?(e=_getPrototypeOf$2(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$1(e,t){return!t||"object"!==_typeof$2(t)&&"function"!=typeof t?_assertThisInitialized$1(e):t}function _assertThisInitialized$1(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$2(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$2(e){return(_getPrototypeOf$2=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var TimestampSecondsParser=function(){_inherits$1(o,Parser);var i=_createSuper$1(o);function o(){var e;_classCallCheck$1(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$1(_assertThisInitialized$1(e=i.call.apply(i,[this].concat(n))),"priority",40),_defineProperty$1(_assertThisInitialized$1(e),"incompatibleTokens","*"),e}return _createClass$2(o,[{key:"parse",value:function(e){return parseAnyDigitsSigned(e)}},{key:"set",value:function(e,t,n){return[new Date(1e3*n),{timestampIsSet:!0}]}}]),o}();function _typeof$1(e){return(_typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$1(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$1(e,t,n){return t&&_defineProperties$1(e.prototype,t),n&&_defineProperties$1(e,n),e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$1(e,t)}function _setPrototypeOf$1(e,t){return(_setPrototypeOf$1=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(n){var r=_isNativeReflectConstruct$1();return function(){var e,t=_getPrototypeOf$1(n);return _possibleConstructorReturn(this,r?(e=_getPrototypeOf$1(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof$1(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$1(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$1(e){return(_getPrototypeOf$1=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var TimestampMillisecondsParser=function(){_inherits(o,Parser);var i=_createSuper(o);function o(){var e;_classCallCheck(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty(_assertThisInitialized(e=i.call.apply(i,[this].concat(n))),"priority",20),_defineProperty(_assertThisInitialized(e),"incompatibleTokens","*"),e}return _createClass$1(o,[{key:"parse",value:function(e){return parseAnyDigitsSigned(e)}},{key:"set",value:function(e,t,n){return[new Date(n),{timestampIsSet:!0}]}}]),o}(),parsers={G:new EraParser,y:new YearParser,Y:new LocalWeekYearParser,R:new ISOWeekYearParser,u:new ExtendedYearParser,Q:new QuarterParser,q:new StandAloneQuarterParser,M:new MonthParser,L:new StandAloneMonthParser,w:new LocalWeekParser,I:new ISOWeekParser,d:new DateParser,D:new DayOfYearParser,E:new DayParser,e:new LocalDayParser,c:new StandAloneLocalDayParser,i:new ISODayParser,a:new AMPMParser,b:new AMPMMidnightParser,B:new DayPeriodParser,h:new Hour1to12Parser,H:new Hour0to23Parser,K:new Hour0To11Parser,k:new Hour1To24Parser,m:new MinuteParser,s:new SecondParser,S:new FractionOfSecondParser,X:new ISOTimezoneWithZParser,x:new ISOTimezoneParser,t:new TimestampSecondsParser,T:new TimestampMillisecondsParser};function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _createForOfIteratorHelper(e,t){var n,r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=_unsupportedIterableToArray$1(e))||t&&e&&"number"==typeof e.length)return n&&(e=n),r=0,{s:t=function(){},n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw i}}}}function _unsupportedIterableToArray$1(e,t){var n;if(e)return"string"==typeof e?_arrayLikeToArray$1(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray$1(e,t):void 0}function _arrayLikeToArray$1(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var formattingTokensRegExp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,longFormattingTokensRegExp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,escapedStringRegExp=/^'([^]*?)'?$/,doubleQuoteRegExp=/''/g,notWhitespaceRegExp=/\S/,unescapedLatinCharacterRegExp=/[a-zA-Z]/;function parse$2(o,e,t,a){requiredArgs(3,arguments);var s=String(o),l=String(e),n=getDefaultOptions(),c=null!=(r=null!=(r=null==a?void 0:a.locale)?r:n.locale)?r:defaultLocale$2;if(!c.match)throw new RangeError("locale must contain match property");var r=toInteger(null!=(r=null!=(r=null!=(r=null!=(r=null==a?void 0:a.firstWeekContainsDate)?r:null==a||null==(r=a.locale)||null==(r=r.options)?void 0:r.firstWeekContainsDate)?r:n.firstWeekContainsDate)?r:null==(r=n.locale)||null==(r=r.options)?void 0:r.firstWeekContainsDate)?r:1);if(!(1<=r&&r<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");n=toInteger(null!=(i=null!=(i=null!=(i=null!=(i=null==a?void 0:a.weekStartsOn)?i:null==a||null==(i=a.locale)||null==(i=i.options)?void 0:i.weekStartsOn)?i:n.weekStartsOn)?i:null==(i=n.locale)||null==(n=i.options)?void 0:n.weekStartsOn)?i:0);if(!(0<=n&&n<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===l)return""===s?toDate$1(t):new Date(NaN);var u,d={firstWeekContainsDate:r,weekStartsOn:n,locale:c},p=[new DateToSystemTimezoneSetter],i=l.match(longFormattingTokensRegExp).map(function(e){var t=e[0];return t in longFormatters$3?(0,longFormatters$3[t])(e,c.formatLong):e}).join("").match(formattingTokensRegExp),f=[],h=_createForOfIteratorHelper(i);try{for(h.s();!(u=h.n()).done;){var m=function(){var e=u.value,t=(null!=a&&a.useAdditionalWeekYearTokens||!isProtectedWeekYearToken(e)||throwProtectedError(e,l,o),null!=a&&a.useAdditionalDayOfYearTokens||!isProtectedDayOfYearToken(e)||throwProtectedError(e,l,o),e[0]),n=parsers[t];if(n){var r=n.incompatibleTokens;if(Array.isArray(r)){var i=f.find(function(e){return r.includes(e.token)||e.token===t});if(i)throw new RangeError("The format string mustn't contain `".concat(i.fullToken,"` and `").concat(e,"` at the same time"))}else if("*"===n.incompatibleTokens&&0<f.length)throw new RangeError("The format string mustn't contain `".concat(e,"` and any other token at the same time"));f.push({token:t,fullToken:e});i=n.run(s,e,c.match,d);if(!i)return{v:new Date(NaN)};p.push(i.setter),s=i.rest}else{if(t.match(unescapedLatinCharacterRegExp))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");if("''"===e?e="'":"'"===t&&(e=cleanEscapedString(e)),0!==s.indexOf(e))return{v:new Date(NaN)};s=s.slice(e.length)}}();if("object"===_typeof(m))return m.v}}catch(e){h.e(e)}finally{h.f()}if(0<s.length&&notWhitespaceRegExp.test(s))return new Date(NaN);r=p.map(function(e){return e.priority}).sort(function(e,t){return t-e}).filter(function(e,t,n){return n.indexOf(e)===t}).map(function(t){return p.filter(function(e){return e.priority===t}).sort(function(e,t){return t.subPriority-e.subPriority})}).map(function(e){return e[0]}),n=toDate$1(t);if(isNaN(n.getTime()))return new Date(NaN);var g,y=subMilliseconds(n,getTimezoneOffsetInMilliseconds(n)),v={},x=_createForOfIteratorHelper(r);try{for(x.s();!(g=x.n()).done;){var b=g.value;if(!b.validate(y,d))return new Date(NaN);var $=b.set(y,v,d);Array.isArray($)?(y=$[0],assign$1(v,$[1])):y=$}}catch(e){x.e(e)}finally{x.f()}return y}function cleanEscapedString(e){return e.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp,"'")}function setDate(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toInteger(t);return n.setDate(r),n}function setHours(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toInteger(t);return n.setHours(r),n}function setMinutes(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toInteger(t);return n.setMinutes(r),n}function setMonth(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toInteger(t),i=n.getFullYear(),o=n.getDate(),a=new Date(0),i=(a.setFullYear(i,r,15),a.setHours(0,0,0,0),getDaysInMonth(a));return n.setMonth(r,Math.min(o,i)),n}function setSeconds(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toInteger(t);return n.setSeconds(r),n}function setYear(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toInteger(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(r),n)}function startOfMonth(e){requiredArgs(1,arguments);var t=toDate$1(e);return t.setDate(1),t.setHours(0,0,0,0),t}function startOfWeek(e,t){requiredArgs(1,arguments);var n,r,i=getDefaultOptions(),i=toInteger(null!=(n=null!=(n=null!=(n=null!=(n=null==t?void 0:t.weekStartsOn)?n:null==t||null==(n=t.locale)||null==(n=n.options)?void 0:n.weekStartsOn)?n:i.weekStartsOn)?n:null==(n=i.locale)||null==(i=n.options)?void 0:i.weekStartsOn)?n:0);if(0<=i&&i<=6)return r=((r=(n=toDate$1(e)).getDay())<i?7:0)+r-i,n.setDate(n.getDate()-r),n.setHours(0,0,0,0),n;throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}function startOfYear(e){requiredArgs(1,arguments);var t=toDate$1(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function parseISO(e,t){requiredArgs(1,arguments);var n,r,i=toInteger(null!=(i=null==t?void 0:t.additionalDigits)?i:2);if(2!==i&&1!==i&&0!==i)throw new RangeError("additionalDigits must be 0, 1 or 2");return"string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e)||!(n=(r=splitDateString(e)).date?parseDate((i=parseYear(r.date,i)).restDateString,i.year):n)||isNaN(n.getTime())||(i=n.getTime(),n=0,r.time&&(n=parseTime(r.time),isNaN(n)))?new Date(NaN):r.timezone?(r=parseTimezone(r.timezone),isNaN(r)?new Date(NaN):new Date(i+n+r)):(r=new Date(i+n),(i=new Date(0)).setFullYear(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate()),i.setHours(r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds()),i)}var patterns={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},dateRegex=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,timeRegex=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,timezoneRegex=/^([+-])(\d{2})(?::?(\d{2}))?$/;function splitDateString(e){var t,n={},r=e.split(patterns.dateTimeDelimiter);return 2<r.length||(/:/.test(r[0])?t=r[0]:(n.date=r[0],t=r[1],patterns.timeZoneDelimiter.test(n.date)&&(n.date=e.split(patterns.timeZoneDelimiter)[0],t=e.substr(n.date.length,e.length))),t&&((r=patterns.timezone.exec(t))?(n.time=t.replace(r[1],""),n.timezone=r[1]):n.time=t)),n}function parseYear(e,t){var n,r,t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),t=e.match(t);return t?(n=t[1]?parseInt(t[1]):null,{year:null===(r=t[2]?parseInt(t[2]):null)?n:100*r,restDateString:e.slice((t[1]||t[2]).length)}):{year:NaN,restDateString:""}}function parseDate(e,t){var n,r,i,o,a;return null!==t&&(e=e.match(dateRegex))?(a=!!e[4],n=parseDateUnit(e[1]),r=parseDateUnit(e[2])-1,i=parseDateUnit(e[3]),o=parseDateUnit(e[4]),e=parseDateUnit(e[5])-1,a?validateWeekDate(t,o,e)?dayOfISOWeekYear(t,o,e):new Date(NaN):(a=new Date(0),validateDate(t,r,i)&&validateDayOfYearDate(t,n)?(a.setUTCFullYear(t,r,Math.max(n,i)),a):new Date(NaN))):new Date(NaN)}function parseDateUnit(e){return e?parseInt(e):1}function parseTime(e){var t,n,e=e.match(timeRegex);return e&&validateTime(t=parseTimeUnit(e[1]),n=parseTimeUnit(e[2]),e=parseTimeUnit(e[3]))?t*millisecondsInHour+n*millisecondsInMinute+1e3*e:NaN}function parseTimeUnit(e){return e&&parseFloat(e.replace(",","."))||0}function parseTimezone(e){var t,n;return"Z"!==e&&(e=e.match(timezoneRegex))?(t="+"===e[1]?-1:1,validateTimezone(n=parseInt(e[2]),e=e[3]&&parseInt(e[3])||0)?t*(n*millisecondsInHour+e*millisecondsInMinute):NaN):0}function dayOfISOWeekYear(e,t,n){var r=new Date(0);r.setUTCFullYear(e,0,4);e=7*(t-1)+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+e),r}var daysInMonths=[31,null,31,30,31,30,31,31,30,31,30,31];function isLeapYearIndex(e){return e%400==0||e%4==0&&e%100!=0}function validateDate(e,t,n){return 0<=t&&t<=11&&1<=n&&n<=(daysInMonths[t]||(isLeapYearIndex(e)?29:28))}function validateDayOfYearDate(e,t){return 1<=t&&t<=(isLeapYearIndex(e)?366:365)}function validateWeekDate(e,t,n){return 1<=t&&t<=53&&0<=n&&n<=6}function validateTime(e,t,n){return 24===e?0===t&&0===n:0<=n&&n<60&&0<=t&&t<60&&0<=e&&e<25}function validateTimezone(e,t){return 0<=t&&t<=59}function formatISO(e,t){requiredArgs(1,arguments);var n=toDate$1(e);if(isNaN(n.getTime()))throw new RangeError("Invalid time value");var r=String(null!=(r=null==t?void 0:t.format)?r:"extended"),i=String(null!=(i=null==t?void 0:t.representation)?i:"complete");if("extended"!==r&&"basic"!==r)throw new RangeError("format must be 'extended' or 'basic'");if("date"!==i&&"time"!==i&&"complete"!==i)throw new RangeError("representation must be 'date', 'time', or 'complete'");var o,a,s,l="",c="",u="extended"===r?"-":"",r="extended"===r?":":"";return"time"!==i&&(a=addLeadingZeros(n.getDate(),2),s=addLeadingZeros(n.getMonth()+1,2),o=addLeadingZeros(n.getFullYear(),4),l="".concat(o).concat(u).concat(s).concat(u).concat(a)),"date"!==i&&(c=0!==(o=n.getTimezoneOffset())?(s=Math.abs(o),u=addLeadingZeros(Math.floor(s/60),2),a=addLeadingZeros(s%60,2),"".concat(o<0?"+":"-").concat(u,":").concat(a)):"Z",i=""===l?"":"T",s=[addLeadingZeros(n.getHours(),2),addLeadingZeros(n.getMinutes(),2),addLeadingZeros(n.getSeconds(),2)].join(r),l="".concat(l).concat(i).concat(s).concat(c)),l}function isWithinInterval(e,t){requiredArgs(2,arguments);var n=toDate$1(e).getTime(),r=toDate$1(t.start).getTime(),i=toDate$1(t.end).getTime();if(r<=i)return r<=n&&n<=i;throw new RangeError("Invalid interval")}var longFormatters$1={exports:{}},longFormatters=(!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;function o(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}}function a(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}}t.default={p:a,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],i=r[1],r=r[2];if(!r)return o(e,t);switch(i){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",o(i,t)).replace("{{time}}",a(r,t))}},e.exports=t.default}(longFormatters$1,longFormatters$1.exports),getDefaultExportFromCjs(longFormatters$1.exports)),defaultFormats={dayOfMonth:"d",fullDate:"PP",fullDateWithWeekday:"PPPP",fullDateTime:"PP p",fullDateTime12h:"PP hh:mm aaa",fullDateTime24h:"PP HH:mm",fullTime:"p",fullTime12h:"hh:mm aaa",fullTime24h:"HH:mm",hours12h:"hh",hours24h:"HH",keyboardDate:"P",keyboardDateTime:"P p",keyboardDateTime12h:"P hh:mm aaa",keyboardDateTime24h:"P HH:mm",minutes:"mm",month:"LLLL",monthAndDate:"MMMM d",monthAndYear:"LLLL yyyy",monthShort:"MMM",weekday:"EEEE",weekdayShort:"EEE",normalDate:"d MMMM",normalDateWithWeekday:"EEE, MMM d",seconds:"ss",shortDate:"MMM d",year:"yyyy"},DateFnsUtils=function(e){var c=this,t=(e=void 0===e?{}:e).locale,e=e.formats;this.lib="date-fns",this.is12HourCycleInCurrentLocale=function(){return!c.locale||/a/.test(c.locale.formatLong.time())},this.getFormatHelperText=function(e){var n=c.locale||defaultLocale$2;return e.match(/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g).map(function(e){var t=e[0];return"p"===t||"P"===t?(0,longFormatters[t])(e,n.formatLong,{}):e}).join("").replace(/(aaa|aa|a)/g,"(a|p)m").toLocaleLowerCase()},this.parseISO=function(e){return parseISO(e)},this.toISO=function(e){return formatISO(e,{format:"extended"})},this.getCurrentLocaleCode=function(){var e;return(null==(e=c.locale)?void 0:e.code)||"en-US"},this.addSeconds=function(e,t){return addSeconds(e,t)},this.addMinutes=function(e,t){return addMinutes(e,t)},this.addHours=function(e,t){return addHours(e,t)},this.addDays=function(e,t){return addDays(e,t)},this.addWeeks=function(e,t){return addWeeks(e,t)},this.addMonths=function(e,t){return addMonths(e,t)},this.addYears=function(e,t){return addYears(e,t)},this.isValid=function(e){return isValid(c.date(e))},this.getDiff=function(e,t,n){switch(n){case"years":return differenceInYears(e,c.date(t));case"quarters":return differenceInQuarters(e,c.date(t));case"months":return differenceInMonths(e,c.date(t));case"weeks":return differenceInWeeks(e,c.date(t));case"days":return differenceInDays(e,c.date(t));case"hours":return differenceInHours(e,c.date(t));case"minutes":return differenceInMinutes(e,c.date(t));case"seconds":return differenceInSeconds(e,c.date(t));default:return differenceInMilliseconds(e,c.date(t))}},this.isAfter=function(e,t){return isAfter(e,t)},this.isBefore=function(e,t){return isBefore(e,t)},this.startOfDay=function(e){return startOfDay(e)},this.endOfDay=function(e){return endOfDay(e)},this.getHours=function(e){return getHours(e)},this.setHours=function(e,t){return setHours(e,t)},this.setMinutes=function(e,t){return setMinutes(e,t)},this.getSeconds=function(e){return getSeconds(e)},this.setSeconds=function(e,t){return setSeconds(e,t)},this.isSameDay=function(e,t){return isSameDay(e,t)},this.isSameMonth=function(e,t){return isSameMonth(e,t)},this.isSameYear=function(e,t){return isSameYear(e,t)},this.isSameHour=function(e,t){return isSameHour(e,t)},this.startOfYear=function(e){return startOfYear(e)},this.endOfYear=function(e){return endOfYear(e)},this.startOfMonth=function(e){return startOfMonth(e)},this.endOfMonth=function(e){return endOfMonth(e)},this.startOfWeek=function(e){return startOfWeek(e,{locale:c.locale})},this.endOfWeek=function(e){return endOfWeek(e,{locale:c.locale})},this.getYear=function(e){return getYear(e)},this.setYear=function(e,t){return setYear(e,t)},this.date=function(e){return void 0===e?new Date:null===e?null:new Date(e)},this.toJsDate=function(e){return e},this.parse=function(e,t){return""===e?null:parse$2(e,t,new Date,{locale:c.locale})},this.format=function(e,t){return c.formatByString(e,c.formats[t])},this.formatByString=function(e,t){return format(e,t,{locale:c.locale})},this.isEqual=function(e,t){return null===e&&null===t||isEqual$3(e,t)},this.isNull=function(e){return null===e},this.isAfterDay=function(e,t){return isAfter(e,endOfDay(t))},this.isBeforeDay=function(e,t){return isBefore(e,startOfDay(t))},this.isBeforeYear=function(e,t){return isBefore(e,startOfYear(t))},this.isAfterYear=function(e,t){return isAfter(e,endOfYear(t))},this.isWithinRange=function(e,t){return isWithinInterval(e,{start:t[0],end:t[1]})},this.formatNumber=function(e){return e},this.getMinutes=function(e){return getMinutes(e)},this.getDate=function(e){return getDate(e)},this.setDate=function(e,t){return setDate(e,t)},this.getMonth=function(e){return getMonth(e)},this.getDaysInMonth=function(e){return getDaysInMonth(e)},this.setMonth=function(e,t){return setMonth(e,t)},this.getMeridiemText=function(e){return"am"===e?"AM":"PM"},this.getNextMonth=function(e){return addMonths(e,1)},this.getPreviousMonth=function(e){return addMonths(e,-1)},this.getMonthArray=function(e){for(var t=[startOfYear(e)];t.length<12;){var n=t[t.length-1];t.push(c.getNextMonth(n))}return t},this.mergeDateAndTime=function(e,t){return c.setSeconds(c.setMinutes(c.setHours(e,c.getHours(t)),c.getMinutes(t)),c.getSeconds(t))},this.getWeekdays=function(){var e=new Date;return eachDayOfInterval({start:startOfWeek(e,{locale:c.locale}),end:endOfWeek(e,{locale:c.locale})}).map(function(e){return c.formatByString(e,"EEEEEE")})},this.getWeekArray=function(e){for(var t=startOfWeek(startOfMonth(e),{locale:c.locale}),n=endOfWeek(endOfMonth(e),{locale:c.locale}),r=0,i=t,o=[],a=null;isBefore(i,n);){var s=Math.floor(r/7),l=(o[s]=o[s]||[],getDay(i));a!==l&&(a=l,o[s].push(i),r+=1),i=addDays(i,1)}return o},this.getYearRange=function(e,t){for(var e=startOfYear(e),n=endOfYear(t),r=[],i=e;isBefore(i,n);)r.push(i),i=addYears(i,1);return r},this.locale=t,this.formats=Object.assign({},defaultFormats,e)};const formatTokenMap={y:"year",yy:"year",yyy:"year",yyyy:"year",MMMM:"month",MM:"month",DD:"day",d:"day",dd:"day",H:"hour",HH:"hour",h:"hour",hh:"hour",mm:"minute",ss:"second",a:"am-pm",aa:"am-pm",aaa:"am-pm"};class AdapterDateFns extends DateFnsUtils{constructor(...e){super(...e),this.formatTokenMap=formatTokenMap,this.expandFormat=e=>{return e.match(/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g).map(e=>{var t=e[0];return"p"===t||"P"===t?(0,longFormatters[t])(e,(this.locale||defaultLocale$2).formatLong,{}):e}).join("")},this.getFormatHelperText=e=>this.expandFormat(e).replace(/(aaa|aa|a)/g,"(a|p)m").toLocaleLowerCase()}}var classCallCheck$1=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},createClass$1=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),_extends$2=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},inherits$1=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},possibleConstructorReturn$1=function(e,t){if(e)return!t||"object"!=typeof t&&"function"!=typeof t?e:t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")},slicedToArray=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){var n=t,r=[],i=!0,t=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(i=(a=s.next()).done)&&(r.push(a.value),!n||r.length!==n);i=!0);}catch(e){t=!0,o=e}finally{try{!i&&s.return&&s.return()}finally{if(t)throw o}}return r}throw new TypeError("Invalid attempt to destructure non-iterable instance")},windowObject=void 0,windowObject="undefined"!=typeof window?window:"undefined"!=typeof self?self:global,cancelFrame=null,requestFrame=null,TIMEOUT_DURATION=20,clearTimeoutFn=windowObject.clearTimeout,setTimeoutFn=windowObject.setTimeout,cancelAnimationFrameFn=windowObject.cancelAnimationFrame||windowObject.mozCancelAnimationFrame||windowObject.webkitCancelAnimationFrame,requestAnimationFrameFn=windowObject.requestAnimationFrame||windowObject.mozRequestAnimationFrame||windowObject.webkitRequestAnimationFrame;function createDetectElementResize(s){var l=void 0,c=void 0,u=void 0,d=void 0,p=void 0,f=void 0,h="undefined"!=typeof document&&document.attachEvent;if(!h){var p=function(e){var e=e.__resizeTriggers__,t=e.firstElementChild,e=e.lastElementChild,n=t.firstElementChild;e.scrollLeft=e.scrollWidth,e.scrollTop=e.scrollHeight,n.style.width=t.offsetWidth+1+"px",n.style.height=t.offsetHeight+1+"px",t.scrollLeft=t.scrollWidth,t.scrollTop=t.scrollHeight},e=function(e){return e.offsetWidth!==e.__resizeLast__.width||e.offsetHeight!==e.__resizeLast__.height},f=function(t){var n;t.target.className&&"function"==typeof t.target.className.indexOf&&t.target.className.indexOf("contract-trigger")<0&&t.target.className.indexOf("expand-trigger")<0||(p(n=this),this.__resizeRAF__&&cancelFrame(this.__resizeRAF__),this.__resizeRAF__=requestFrame(function(){e(n)&&(n.__resizeLast__.width=n.offsetWidth,n.__resizeLast__.height=n.offsetHeight,n.__resizeListeners__.forEach(function(e){e.call(n,t)}))}))},t=!1,n="",u="animationstart",r="Webkit Moz O ms".split(" "),i="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),o=document.createElement("fakeelement");if(!1===(t=void 0!==o.style.animationName?!0:t))for(var a=0;a<r.length;a++)if(void 0!==o.style[r[a]+"AnimationName"]){n="-"+r[a].toLowerCase()+"-",u=i[a],t=!0;break}l="@"+n+"keyframes "+(c="resizeanim")+" { from { opacity: 0; } to { opacity: 0; } } ",d=n+"animation: 1ms "+c+"; "}return{addResizeListener:function(t,e){var n,r,i,o,a;h?t.attachEvent("onresize",e):(t.__resizeTriggers__||(n=t.ownerDocument,(r=windowObject.getComputedStyle(t))&&"static"===r.position&&(t.style.position="relative"),(r=n).getElementById("detectElementResize")||(i=(l||"")+".resize-triggers { "+(d||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',o=r.head||r.getElementsByTagName("head")[0],(a=r.createElement("style")).id="detectElementResize",a.type="text/css",null!=s&&a.setAttribute("nonce",s),a.styleSheet?a.styleSheet.cssText=i:a.appendChild(r.createTextNode(i)),o.appendChild(a)),t.__resizeLast__={},t.__resizeListeners__=[],(t.__resizeTriggers__=n.createElement("div")).className="resize-triggers",(r=n.createElement("div")).className="expand-trigger",r.appendChild(n.createElement("div")),(i=n.createElement("div")).className="contract-trigger",t.__resizeTriggers__.appendChild(r),t.__resizeTriggers__.appendChild(i),t.appendChild(t.__resizeTriggers__),p(t),t.addEventListener("scroll",f,!0),u&&(t.__resizeTriggers__.__animationListener__=function(e){e.animationName===c&&p(t)},t.__resizeTriggers__.addEventListener(u,t.__resizeTriggers__.__animationListener__))),t.__resizeListeners__.push(e))},removeResizeListener:function(e,t){if(h)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",f,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(u,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}var requestFrame=null==cancelAnimationFrameFn||null==requestAnimationFrameFn?(cancelFrame=clearTimeoutFn,function(e){return setTimeoutFn(e,TIMEOUT_DURATION)}):(cancelFrame=function(e){var e=slicedToArray(e,2),t=e[0],e=e[1];cancelAnimationFrameFn(t),clearTimeoutFn(e)},function(e){var t=requestAnimationFrameFn(function(){clearTimeoutFn(n),e()}),n=setTimeoutFn(function(){cancelAnimationFrameFn(t),e()},TIMEOUT_DURATION);return[t,n]}),AutoSizer=function(e){function i(){var e,c;classCallCheck$1(this,i);for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=c=possibleConstructorReturn$1(this,(e=i.__proto__||Object.getPrototypeOf(i)).call.apply(e,[this].concat(n)))).state={height:c.props.defaultHeight||0,width:c.props.defaultWidth||0},c._onResize=function(){var e,t,n,r,i,o,a=c.props,s=a.disableHeight,l=a.disableWidth,a=a.onResize;c._parentNode&&(e=c._parentNode.offsetHeight||0,t=c._parentNode.offsetWidth||0,o=window.getComputedStyle(c._parentNode)||{},n=parseInt(o.paddingLeft,10)||0,r=parseInt(o.paddingRight,10)||0,i=parseInt(o.paddingTop,10)||0,o=parseInt(o.paddingBottom,10)||0,!s&&c.state.height!==e-i-o||!l&&c.state.width!==t-n-r)&&(c.setState({height:e-i-o,width:t-n-r}),a({height:e,width:t}))},c._setRef=function(e){c._autoSizer=e},possibleConstructorReturn$1(c,e)}return inherits$1(i,e),createClass$1(i,[{key:"componentDidMount",value:function(){var e=this.props.nonce;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._detectElementResize=createDetectElementResize(e),this._detectElementResize.addResizeListener(this._parentNode,this._onResize),this._onResize())}},{key:"componentWillUnmount",value:function(){this._detectElementResize&&this._parentNode&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.disableHeight,i=e.disableWidth,e=e.style,o=this.state,a=o.height,o=o.width,s={overflow:"visible"},l={},c=!1;return r||(0===a&&(c=!0),s.height=0,l.height=a),i||(0===o&&(c=!0),s.width=0,l.width=o),react$1.exports.createElement("div",{className:n,ref:this._setRef,style:_extends$2({},s,e)},!c&&t(l))}}]),i}(react$1.exports.PureComponent),safeIsNaN=(AutoSizer.defaultProps={onResize:function(){},disableHeight:!1,disableWidth:!1,style:{}},Number.isNaN||function(e){return"number"==typeof e&&e!=e});function isEqual$2(e,t){return e===t||!(!safeIsNaN(e)||!safeIsNaN(t))}function areInputsEqual$1(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!isEqual$2(e[n],t[n]))return!1;return!0}function memoizeOne(n,r){void 0===r&&(r=areInputsEqual$1);var i,o,a=[],s=!1;return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s&&i===this&&r(e,a)||(o=n.apply(this,e),s=!0,i=this,a=e),o}}var hasNativePerformanceNow="object"==typeof performance&&"function"==typeof performance.now,now$3=hasNativePerformanceNow?function(){return performance.now()}:function(){return Date.now()};function cancelTimeout(e){cancelAnimationFrame(e.id)}function requestTimeout(t,n){var r=now$3();var i={id:requestAnimationFrame(function e(){now$3()-r>=n?t.call(null):i.id=requestAnimationFrame(e)})};return i}var size=-1;function getScrollbarSize(e){var t;return void 0===e&&(e=!1),-1!==size&&!e||((t=(e=document.createElement("div")).style).width="50px",t.height="50px",t.overflow="scroll",document.body.appendChild(e),size=e.offsetWidth-e.clientWidth,document.body.removeChild(e)),size}var cachedRTLResult=null;function getRTLOffsetType(e){var t,n;return void 0===e&&(e=!1),null!==cachedRTLResult&&!e||((t=(e=document.createElement("div")).style).width="50px",t.height="50px",t.overflow="scroll",t.direction="rtl",(n=(t=document.createElement("div")).style).width="100px",n.height="100px",e.appendChild(t),document.body.appendChild(e),cachedRTLResult=0<e.scrollLeft?"positive-descending":(e.scrollLeft=1,0===e.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(e)),cachedRTLResult}var IS_SCROLLING_DEBOUNCE_INTERVAL$1=150,defaultItemKey$1=function(e,t){return e};function createListComponent(e){var c=e.getItemOffset,S=e.getEstimatedTotalSize,u=e.getItemSize,a=e.getOffsetForIndexAndAlignment,s=e.getStartIndexForOffset,l=e.getStopIndexForStartIndex,r=e.initInstanceProps,d=e.shouldResetStyleCacheOnItemSizeChange,i=e.validateProps,e=function(t){function e(e){var l=t.call(this,e)||this;return l._instanceProps=r(l.props,_assertThisInitialized$x(l)),l._outerRef=void 0,l._resetIsScrollingTimeoutId=null,l.state={instance:_assertThisInitialized$x(l),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof l.props.initialScrollOffset?l.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},l._callOnItemsRendered=void 0,l._callOnItemsRendered=memoizeOne(function(e,t,n,r){return l.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:r})}),l._callOnScroll=void 0,l._callOnScroll=memoizeOne(function(e,t,n){return l.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})}),l._getItemStyle=void 0,l._getItemStyle=function(e){var t,n,r,i,o=l.props,a=o.direction,s=o.itemSize,o=o.layout,s=l._getItemStyleCache(d&&s,d&&o,d&&a);return s.hasOwnProperty(e)?t=s[e]:(n=c(l.props,e,l._instanceProps),r=u(l.props,e,l._instanceProps),i=(o="horizontal"===a||"horizontal"===o)?n:0,s[e]=t={position:"absolute",left:(s="rtl"===a)?void 0:i,right:s?i:void 0,top:o?0:n,height:o?"100%":r,width:o?r:"100%"}),t},l._getItemStyleCache=void 0,l._getItemStyleCache=memoizeOne(function(e,t,n){return{}}),l._onScrollHorizontal=function(e){var e=e.currentTarget,r=e.clientWidth,i=e.scrollLeft,o=e.scrollWidth;l.setState(function(e){if(e.scrollOffset===i)return null;var t=l.props.direction,n=i;if("rtl"===t)switch(getRTLOffsetType()){case"negative":n=-i;break;case"positive-descending":n=o-r-i}return n=Math.max(0,Math.min(n,o-r)),{isScrolling:!0,scrollDirection:e.scrollOffset<i?"forward":"backward",scrollOffset:n,scrollUpdateWasRequested:!1}},l._resetIsScrollingDebounced)},l._onScrollVertical=function(e){var e=e.currentTarget,n=e.clientHeight,r=e.scrollHeight,i=e.scrollTop;l.setState(function(e){var t;return e.scrollOffset===i?null:(t=Math.max(0,Math.min(i,r-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1})},l._resetIsScrollingDebounced)},l._outerRefSetter=function(e){var t=l.props.outerRef;l._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},l._resetIsScrollingDebounced=function(){null!==l._resetIsScrollingTimeoutId&&cancelTimeout(l._resetIsScrollingTimeoutId),l._resetIsScrollingTimeoutId=requestTimeout(l._resetIsScrolling,IS_SCROLLING_DEBOUNCE_INTERVAL$1)},l._resetIsScrolling=function(){l._resetIsScrollingTimeoutId=null,l.setState({isScrolling:!1},function(){l._getItemStyleCache(-1,null)})},l}_inheritsLoose$2(e,t),e.getDerivedStateFromProps=function(e,t){return validateSharedProps$1(e,t),i(e),null};var n=e.prototype;return n.scrollTo=function(t){t=Math.max(0,t),this.setState(function(e){return e.scrollOffset===t?null:{scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},n.scrollToItem=function(e,t){void 0===t&&(t="auto");var n,r=this.props,i=r.itemCount,r=r.layout,o=this.state.scrollOffset,i=(e=Math.max(0,Math.min(e,i-1)),0);this._outerRef&&(n=this._outerRef,i="vertical"===r?n.scrollWidth>n.clientWidth?getScrollbarSize():0:n.scrollHeight>n.clientHeight?getScrollbarSize():0),this.scrollTo(a(this.props,e,t,o,this._instanceProps,i))},n.componentDidMount=function(){var e,t=this.props,n=t.direction,r=t.initialScrollOffset,t=t.layout;"number"==typeof r&&null!=this._outerRef&&(e=this._outerRef,"horizontal"===n||"horizontal"===t?e.scrollLeft=r:e.scrollTop=r),this._callPropsCallbacks()},n.componentDidUpdate=function(){var e=this.props,t=e.direction,e=e.layout,n=this.state,r=n.scrollOffset;if(n.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("horizontal"===t||"horizontal"===e)if("rtl"===t)switch(getRTLOffsetType()){case"negative":i.scrollLeft=-r;break;case"positive-ascending":i.scrollLeft=r;break;default:var o=i.clientWidth,a=i.scrollWidth;i.scrollLeft=a-o-r}else i.scrollLeft=r;else i.scrollTop=r}this._callPropsCallbacks()},n.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&cancelTimeout(this._resetIsScrollingTimeoutId)},n.render=function(){var e=this.props,t=e.children,n=e.className,r=e.direction,i=e.height,o=e.innerRef,a=e.innerElementType,s=e.innerTagName,l=e.itemCount,c=e.itemData,u=e.itemKey,d=void 0===u?defaultItemKey$1:u,u=e.layout,p=e.outerElementType,f=e.outerTagName,h=e.style,m=e.useIsScrolling,e=e.width,g=this.state.isScrolling,u="horizontal"===r||"horizontal"===u,y=u?this._onScrollHorizontal:this._onScrollVertical,v=this._getRangeToRender(),x=v[0],b=v[1],$=[];if(0<l)for(var C=x;C<=b;C++)$.push(react$1.exports.createElement(t,{data:c,key:d(C,c),index:C,isScrolling:m?g:void 0,style:this._getItemStyle(C)}));v=S(this.props,this._instanceProps);return react$1.exports.createElement(p||f||"div",{className:n,onScroll:y,ref:this._outerRefSetter,style:_extends$3({position:"relative",height:i,width:e,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:r},h)},react$1.exports.createElement(a||s||"div",{children:$,ref:o,style:{height:u?"100%":v,pointerEvents:g?"none":void 0,width:u?v:"100%"}}))},n._callPropsCallbacks=function(){var e,t,n,r;"function"==typeof this.props.onItemsRendered&&0<this.props.itemCount&&(e=(r=this._getRangeToRender())[0],t=r[1],n=r[2],r=r[3],this._callOnItemsRendered(e,t,n,r)),"function"==typeof this.props.onScroll&&(t=(e=this.state).scrollDirection,n=e.scrollOffset,r=e.scrollUpdateWasRequested,this._callOnScroll(t,n,r))},n._getRangeToRender=function(){var e,t,n=this.props,r=n.itemCount,n=n.overscanCount,i=this.state,o=i.isScrolling,a=i.scrollDirection,i=i.scrollOffset;return 0===r?[0,0,0,0]:(e=s(this.props,i,this._instanceProps),i=l(this.props,e,i,this._instanceProps),t=o&&"backward"!==a?1:Math.max(1,n),o=o&&"forward"!==a?1:Math.max(1,n),[Math.max(0,e-t),Math.max(0,Math.min(r-1,i+o)),e,i])},e}(react$1.exports.PureComponent);return e.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},e}var validateSharedProps$1=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},DEFAULT_ESTIMATED_ITEM_SIZE$1=50,getItemMetadata$1=function(e,t,n){var r=e.itemSize,i=n.itemMetadataMap,e=n.lastMeasuredIndex;if(e<t){var o,a=0;0<=e&&(a=(o=i[e]).offset+o.size);for(var s=e+1;s<=t;s++){var l=r(s);i[s]={offset:a,size:l},a+=l}n.lastMeasuredIndex=t}return i[t]},findNearestItem$1=function(e,t,n){var r=t.itemMetadataMap,i=t.lastMeasuredIndex;return n<=(0<i?r[i].offset:0)?findNearestItemBinarySearch$1(e,t,i,0,n):findNearestItemExponentialSearch$1(e,t,Math.max(0,i),n)},findNearestItemBinarySearch$1=function(e,t,n,r,i){for(;r<=n;){var o=r+Math.floor((n-r)/2),a=getItemMetadata$1(e,o,t).offset;if(a===i)return o;a<i?r=o+1:i<a&&(n=o-1)}return 0<r?r-1:0},findNearestItemExponentialSearch$1=function(e,t,n,r){for(var i=e.itemCount,o=1;n<i&&getItemMetadata$1(e,n,t).offset<r;)n+=o,o*=2;return findNearestItemBinarySearch$1(e,t,Math.min(n,i-1),Math.floor(n/2),r)},getEstimatedTotalSize=function(e,t){var e=e.itemCount,n=t.itemMetadataMap,r=t.estimatedItemSize,t=t.lastMeasuredIndex,i=0,e=e-(t=e<=t?e-1:t)-1;return(i=0<=t?(n=n[t]).offset+n.size:i)+e*r},VariableSizeList=createListComponent({getItemOffset:function(e,t,n){return getItemMetadata$1(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:getEstimatedTotalSize,getOffsetForIndexAndAlignment:function(e,t,n,r,i,o){var a=e.direction,s=e.height,l=e.layout,c=e.width,a="horizontal"===a||"horizontal"===l?c:s,l=getItemMetadata$1(e,t,i),c=getEstimatedTotalSize(e,i),u=Math.max(0,Math.min(c-a,l.offset)),d=Math.max(0,l.offset-a+l.size+o);switch(n="smart"===n?d-a<=r&&r<=u+a?"auto":"center":n){case"start":return u;case"end":return d;case"center":return Math.round(d+(u-d)/2);default:return d<=r&&r<=u?r:r<d?d:u}},getStartIndexForOffset:function(e,t,n){return findNearestItem$1(e,n,t)},getStopIndexForStartIndex:function(e,t,n,r){for(var i=e.direction,o=e.height,a=e.itemCount,s=e.layout,l=e.width,i="horizontal"===i||"horizontal"===s?l:o,s=getItemMetadata$1(e,t,r),c=n+i,u=s.offset+s.size,d=t;d<a-1&&u<c;)u+=getItemMetadata$1(e,++d,r).size;return d},initInstanceProps:function(e,n){var r={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||DEFAULT_ESTIMATED_ITEM_SIZE$1,lastMeasuredIndex:-1};return n.resetAfterIndex=function(e,t){void 0===t&&(t=!0),r.lastMeasuredIndex=Math.min(r.lastMeasuredIndex,e-1),n._getItemStyleCache(-1),t&&n.forceUpdate()},r},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}}),FixedSizeList=createListComponent({getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,n,r,i,o){var a=e.direction,s=e.height,l=e.itemCount,c=e.itemSize,u=e.layout,e=e.width,d="horizontal"===a||"horizontal"===u?e:s,p=Math.max(0,l*c-d),f=Math.min(p,t*c),h=Math.max(0,t*c-d+c+o);switch(n="smart"===n?h-d<=r&&r<=f+d?"auto":"center":n){case"start":return f;case"end":return h;case"center":var m=Math.round(h+(f-h)/2);return m<Math.ceil(d/2)?0:m>p+Math.floor(d/2)?p:m;default:return h<=r&&r<=f?r:r<h?h:f}},getStartIndexForOffset:function(e,t){var n=e.itemCount,e=e.itemSize;return Math.max(0,Math.min(n-1,Math.floor(t/e)))},getStopIndexForStartIndex:function(e,t,n){var r=e.direction,i=e.height,o=e.itemCount,a=e.itemSize,s=e.layout,e=e.width,r=Math.ceil((("horizontal"===r||"horizontal"===s?e:i)+n-t*a)/a);return Math.max(0,Math.min(o-1,t+r-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.itemSize}});function isRangeVisible(e){var t=e.lastRenderedStartIndex,n=e.lastRenderedStopIndex,r=e.startIndex,e=e.stopIndex;return!(n<r||e<t)}function scanForUnloadedRanges(e){for(var t=e.isItemLoaded,n=e.itemCount,r=e.minimumBatchSize,i=e.startIndex,o=e.stopIndex,a=[],s=null,l=null,c=i;c<=o;c++)t(c)?null!==l&&(a.push(s,l),s=l=null):(l=c,null===s&&(s=c));if(null!==l){for(var u=Math.min(Math.max(l,s+r-1),n-1),d=l+1;d<=u&&!t(d);d++)l=d;a.push(s,l)}if(a.length)for(;a[1]-a[0]+1<r&&0<a[0];){var p=a[0]-1;if(t(p))break;a[0]=p}return a}var classCallCheck=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},createClass=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),inherits=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},possibleConstructorReturn=function(e,t){if(e)return!t||"object"!=typeof t&&"function"!=typeof t?e:t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")},InfiniteLoader=function(e){function o(){var e,n;classCallCheck(this,o);for(var t=arguments.length,r=Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n=possibleConstructorReturn(this,(e=o.__proto__||Object.getPrototypeOf(o)).call.apply(e,[this].concat(r))))._lastRenderedStartIndex=-1,n._lastRenderedStopIndex=-1,n._memoizedUnloadedRanges=[],n._onItemsRendered=function(e){var t=e.visibleStartIndex,e=e.visibleStopIndex;n._lastRenderedStartIndex=t,n._lastRenderedStopIndex=e,n._ensureRowsLoaded(t,e)},n._setRef=function(e){n._listRef=e},possibleConstructorReturn(n,e)}return inherits(o,e),createClass(o,[{key:"resetloadMoreItemsCache",value:function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0];this._memoizedUnloadedRanges=[],e&&this._ensureRowsLoaded(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"componentDidMount",value:function(){}},{key:"render",value:function(){return(0,this.props.children)({onItemsRendered:this._onItemsRendered,ref:this._setRef})}},{key:"_ensureRowsLoaded",value:function(e,t){var n=this.props,r=n.isItemLoaded,i=n.itemCount,o=n.minimumBatchSize,n=n.threshold,n=void 0===n?15:n,a=scanForUnloadedRanges({isItemLoaded:r,itemCount:i,minimumBatchSize:void 0===o?10:o,startIndex:Math.max(0,e-n),stopIndex:Math.min(i-1,t+n)});this._memoizedUnloadedRanges.length===a.length&&!this._memoizedUnloadedRanges.some(function(e,t){return a[t]!==e})||(this._memoizedUnloadedRanges=a,this._loadUnloadedRanges(a))}},{key:"_loadUnloadedRanges",value:function(r){for(var i=this,o=this.props.loadMoreItems||this.props.loadMoreRows,e=0;e<r.length;e+=2)!function(e){var t=r[e],n=r[e+1],e=o(t,n);null!=e&&e.then(function(){isRangeVisible({lastRenderedStartIndex:i._lastRenderedStartIndex,lastRenderedStopIndex:i._lastRenderedStopIndex,startIndex:t,stopIndex:n})&&null!=i._listRef&&("function"==typeof i._listRef.resetAfterIndex?i._listRef.resetAfterIndex(t,!0):("function"==typeof i._listRef._getItemStyleCache&&i._listRef._getItemStyleCache(-1),i._listRef.forceUpdate()))})}(e)}}]),o}(react$1.exports.PureComponent);function getLoadingButtonUtilityClass(e){return generateUtilityClass("MuiLoadingButton",e)}const loadingButtonClasses=generateUtilityClasses("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]);var loadingButtonClasses$1=loadingButtonClasses;const _excluded$3=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],useUtilityClasses=e=>{var{loading:e,loadingPosition:t,classes:n}=e;return _extends$3({},n,composeClasses({root:["root",e&&"loading"],startIcon:[e&&"startIconLoading"+capitalize$2(t)],endIcon:[e&&"endIconLoading"+capitalize$2(t)],loadingIndicator:["loadingIndicator",e&&"loadingIndicator"+capitalize$2(t)]},getLoadingButtonUtilityClass,n))},rootShouldForwardProp=e=>"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e&&"classes"!==e,LoadingButtonRoot=styled$1(Button$1,{shouldForwardProp:e=>rootShouldForwardProp(e)||"classes"===e,name:"MuiLoadingButton",slot:"Root",overridesResolver:(e,t)=>[t.root,t.startIconLoadingStart&&{["& ."+loadingButtonClasses$1.startIconLoadingStart]:t.startIconLoadingStart},t.endIconLoadingEnd&&{["& ."+loadingButtonClasses$1.endIconLoadingEnd]:t.endIconLoadingEnd}]})(({ownerState:e,theme:t})=>_extends$3({[`& .${loadingButtonClasses$1.startIconLoadingStart}, & .`+loadingButtonClasses$1.endIconLoadingEnd]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},"center"===e.loadingPosition&&{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),["&."+loadingButtonClasses$1.loading]:{color:"transparent"}},"start"===e.loadingPosition&&e.fullWidth&&{[`& .${loadingButtonClasses$1.startIconLoadingStart}, & .`+loadingButtonClasses$1.endIconLoadingEnd]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginRight:-8}},"end"===e.loadingPosition&&e.fullWidth&&{[`& .${loadingButtonClasses$1.startIconLoadingStart}, & .`+loadingButtonClasses$1.endIconLoadingEnd]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginLeft:-8}})),LoadingButtonLoadingIndicator=styled$1("div",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>{e=e.ownerState;return[t.loadingIndicator,t["loadingIndicator"+capitalize$2(e.loadingPosition)]]}})(({theme:e,ownerState:t})=>_extends$3({position:"absolute",visibility:"visible",display:"flex"},"start"===t.loadingPosition&&("outlined"===t.variant||"contained"===t.variant)&&{left:"small"===t.size?10:14},"start"===t.loadingPosition&&"text"===t.variant&&{left:6},"center"===t.loadingPosition&&{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled},"end"===t.loadingPosition&&("outlined"===t.variant||"contained"===t.variant)&&{right:"small"===t.size?10:14},"end"===t.loadingPosition&&"text"===t.variant&&{right:6},"start"===t.loadingPosition&&t.fullWidth&&{position:"relative",left:-10},"end"===t.loadingPosition&&t.fullWidth&&{position:"relative",right:-10})),LoadingButton=react$1.exports.forwardRef(function(e,t){var e=useThemeProps({props:e,name:"MuiLoadingButton"}),{children:n,disabled:r=!1,id:i,loading:o=!1,loadingIndicator:a,loadingPosition:s="center",variant:l="text"}=e,c=_objectWithoutPropertiesLoose$2(e,_excluded$3),i=useId(i),a=null!=a?a:jsxRuntime.exports.jsx(CircularProgress$1,{"aria-labelledby":i,color:"inherit",size:16}),e=_extends$3({},e,{disabled:r,loading:o,loadingIndicator:a,loadingPosition:s,variant:l}),s=useUtilityClasses(e),a=o?jsxRuntime.exports.jsx(LoadingButtonLoadingIndicator,{className:s.loadingIndicator,ownerState:e,children:a}):null;return jsxRuntime.exports.jsxs(LoadingButtonRoot,_extends$3({disabled:r||o,id:i,ref:t},c,{variant:l,classes:s,ownerState:e,children:["end"===e.loadingPosition?n:a,"end"===e.loadingPosition?a:n]}))});var LoadingButton$1=LoadingButton,root$1=_root,now$2=function(){return root$1.Date.now()},now_1=now$2,isObject$9=isObject_1,now$1=now_1,toNumber=toNumber_1,FUNC_ERROR_TEXT="Expected a function",nativeMax=Math.max,nativeMin=Math.min;function debounce(r,n,e){var i,o,a,s,l,c,u=0,d=!1,p=!1,t=!0;if("function"!=typeof r)throw new TypeError(FUNC_ERROR_TEXT);function f(e){var t=i,n=o;return i=o=void 0,u=e,s=r.apply(n,t)}function h(e){var t=e-c;return void 0===c||n<=t||t<0||p&&a<=e-u}function m(){var e,t=now$1();if(h(t))return g(t);l=setTimeout(m,(e=n-((t=t)-c),p?nativeMin(e,a-(t-u)):e))}function g(e){return l=void 0,t&&i?f(e):(i=o=void 0,s)}function y(){var e=now$1(),t=h(e);if(i=arguments,o=this,c=e,t){if(void 0===l)return u=e=c,l=setTimeout(m,n),d?f(e):s;if(p)return clearTimeout(l),l=setTimeout(m,n),f(c)}return void 0===l&&(l=setTimeout(m,n)),s}return n=toNumber(n)||0,isObject$9(e)&&(d=!!e.leading,p="maxWait"in e,a=p?nativeMax(toNumber(e.maxWait)||0,n):a,t="trailing"in e?!!e.trailing:t),y.cancel=function(){void 0!==l&&clearTimeout(l),i=c=o=l=void(u=0)},y.flush=function(){return void 0===l?s:g(now$1())},y}var debounce_1=debounce,baseGetTag=_baseGetTag,isObjectLike=isObjectLike_1,numberTag="[object Number]";function isNumber$1(e){return"number"==typeof e||isObjectLike(e)&&baseGetTag(e)==numberTag}var isNumber_1=isNumber$1;const useStyles$8$2=makeStyles()(e=>({characterCount:{position:"absolute",margin:0,bottom:4,right:8,fontSize:12,fontWeight:400},wrapper:{width:"100%",position:"relative"}})),CharacterCountTextField=({handleChange:t,variant:e="outlined",shrinkAlways:n=!1,lines:r=5,maxChar:i=300,error:o=!1,label:a="",id:s,testId:l,required:c=!1,disabled:u=!1,value:d=""})=>{var p=useStyles$8$2()["classes"],f=d.length;return jsxRuntime.exports.jsxs(Box$1,Object.assign({className:p.wrapper},{children:[jsxRuntime.exports.jsx(TextField$1,{multiline:!0,label:a,rows:r,value:d,onChange:e=>{e.target.value.length>i||t(e.target.value)},"data-test":"reusable-char-count-text-"+l,id:s,variant:e,fullWidth:!0,error:o,required:c,InputLabelProps:0<d.length||n?{shrink:!0}:{},disabled:u}),jsxRuntime.exports.jsxs("div",Object.assign({"data-test":"reusable-char-count-text-count-"+l,className:p.characterCount},{children:[f,"/",i]}))]}))};var characterCountTextFieldJsx=Object.freeze({__proto__:null,CharacterCountTextField:CharacterCountTextField});function __rest$3(e,t){var n={};for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n}function __awaiter$5(e,a,s,l){return new(s=s||Promise)(function(n,t){function r(e){try{o(l.next(e))}catch(e){t(e)}}function i(e){try{o(l.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,i)}o((l=l.apply(e,a||[])).next())})}function getEngines(n,r,i){return __awaiter$5(this,void 0,void 0,function*(){var e="getEngines",t={edgeVersion:r},t=(i&&(t.state=i),yield baseGraphQLApiWithError(Object.assign({query:"\n query getEngines ($state: [EngineState], $edgeVersion: Int) {\n engines(\n offset: 0,\n limit: 500,\n state: $state,\n edgeVersion: $edgeVersion\n ) {\n count\n records {\n id\n name\n categoryId\n edgeVersion\n }\n }\n }\n ",variables:t,operationName:e},n)));return t.engines})}function getEngineCategories(n){return __awaiter$5(this,void 0,void 0,function*(){var e="getEngineCategories",t="engineCategories",e=yield baseGraphQLApiWithError(Object.assign({query:"\n query getEngineCategories {\n engineCategories(offset: 0, limit: 200) {\n count\n records {\n id\n name\n description\n }\n }\n }\n ",operationName:e},n));return e[t].records=e[t].records.map(e=>Object.assign(Object.assign({},e),{iconName:e.name.replace(/[^a-zA-Z]/g,"")})),e[t]})}var enginesFilterApi=Object.freeze({__proto__:null,getEngines:getEngines,getEngineCategories:getEngineCategories});const useStyles$7$2=makeStyles()(e=>({dateRangeDisplay:{display:"flex",alignItems:"center",justifyContent:"start",fontWeight:400,fontSize:"10px",lineHeight:"16px",border:"1px solid #D5DFE9",borderRadius:"5px",padding:"0px 7px",boxSizing:"border-box",minWidth:"120px",minHeight:"28px",cursor:"pointer"},menuItem:{marginLeft:"25px"},subheader:{fontWeight:"bold"},tooltipList:{margin:0,padding:0,listStyle:"none"},formControl:{marginRight:"12px"},label:{fontWeight:700,fontSize:14,color:"#2A323C",marginBottom:0,display:"flex",justifyContent:"space-between"},selectField:{width:150,height:28,fontSize:"10px",lineHeight:"16px",fontWeight:400},title:{textTransform:"capitalize"},clearButton:{color:"#0C53B0",cursor:"pointer",fontWeight:"400",fontSize:"14px"},field:{width:150},clearBtn:{color:"#0C53B0",cursor:"pointer",fontWeight:400}})),muiSelectStyleOverrides={height:"28px",fontSize:"0.8em","& fieldset":{borderColor:"#D5DFE9",borderWidth:"2px",borderRadius:"6px"},"&:hover":{"&& fieldset":{borderColor:"rgba(42,50,60,0.5)"}}},AiEngineFilter=({id:e,label:t,items:n,selectedValue:r,onChange:i,engineList:o,entity:a="jobs",clearAndApply:s})=>{const l=useStyles$7$2()["classes"];var c=useIntl();const u={engine:c.formatMessage({id:"reusable-utils.engine-label",defaultMessage:[{type:0,value:"Engine"}]}),engines:c.formatMessage({id:"reusable-utils.engines-label",defaultMessage:[{type:0,value:"Engines"}]})},d=react$1.exports.useCallback(e=>{var e=e["target"]["value"];i&&i("string"==typeof e?e.split(","):e)},[i]);const p=()=>jsxRuntime.exports.jsx("ul",Object.assign({className:l.tooltipList},{children:r.map(e=>jsxRuntime.exports.jsx("li",{children:o[e].name}))}));return jsxRuntime.exports.jsxs(FormControl$1,Object.assign({size:"small",className:l.formControl},{children:[jsxRuntime.exports.jsxs("label",Object.assign({htmlFor:e,className:l.label},{children:[t," ",0<r.length&&jsxRuntime.exports.jsx("span",Object.assign({onClick:()=>{d({target:{value:[]}}),s&&s()},className:l.clearBtn},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"shared-ai-search-results-filter-input-clear-button",defaultMessage:"Clear",description:"Search Filter input Clear butoon"})}))]})),jsxRuntime.exports.jsx(Select$1,Object.assign({id:e,"data-test":a+"-engines-select",sx:muiSelectStyleOverrides,variant:"outlined",value:r,multiple:!0,displayEmpty:!0,className:l.field,onChange:d,renderValue:e=>{return 0===e.length?jsxRuntime.exports.jsx("div",{children:"All"}):(e=e["length"],jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:jsxRuntime.exports.jsx(p,{})},{children:jsxRuntime.exports.jsxs("span",Object.assign({style:{display:"flex",alignItems:"center"}},{children:[jsxRuntime.exports.jsx(default_1$b,{sx:{fontSize:"16px",fill:"#555F7C",marginRight:"3px"}})," ",e," ",1<e?u.engines:u.engine]}))})))},MenuProps:{sx:{maxHeight:"50vh"},className:"aiware-el"}},{children:n.map(e=>{return t=(e=e).engines.map(e=>jsxRuntime.exports.jsx(MenuItem$1,Object.assign({className:l.menuItem,value:e.engineId,"data-testid":`processing-center.${a}.engine-filter-option-`+e.engineId},{children:e.engineName}),e.engineId)),[jsxRuntime.exports.jsx(ListSubheader$1,Object.assign({className:l.subheader},{children:e.categoryName})),t];var t})}))]}))};var enginesFilterJsx=Object.freeze({__proto__:null,AiEngineFilter:AiEngineFilter});const engineListItems=(e,t,r,i)=>e.map((n,e)=>({categoryName:t[n].name,id:t[n].id,engines:r.filter((e,t)=>{if(i[e].categoryId===n)return e}).map((e,t)=>({engineId:i[e].id,engineName:i[e].name}))}));var enginesFilterHelpers=Object.freeze({__proto__:null,engineListItems:engineListItems});function getImageURL(r,i){return __awaiter$5(this,void 0,void 0,function*(){var e={name:i.name},e=yield baseGraphQLApiWithError(Object.assign({query:`
1336
+ `,variables:e,graphEndpoint:n,token:r})}catch(e){return{success:!1}}});function*refetchNotificationSetting(){yield put(getNotification(0,30))}function*getNotificationListByMailBoxSaga(e){const{status:t,mailBoxIds:n,mailbox:r}=yield select(mailBoxSelector);var{limit:e,offset:i,callback:o}=e.payload,a=yield select(graphEndpointSelector),s=yield select(sessionTokenSelector),l="success"===t||"failure"===t;if(0!==Object.keys(r).length||l){yield put(getNotificationStart(i,e));l=yield call$j(handleNotificationListByMailBox,a,s,n,i,e);if(null!=o&&o(),0<(null==(a=null==l?void 0:l.errors)?void 0:a.length))yield put(getNotificationListByMailBoxFail());else{let n=0;a=null==(o=null==(s=null==l?void 0:l.data)?void 0:s.notificationMailboxes)?void 0:o.map(t=>{var e;return 0<(null==(e=null==t?void 0:t.notifications)?void 0:e.count)?(e=null==(e=null==(e=null==t?void 0:t.notifications)?void 0:e.records)?void 0:e.map(e=>Object.assign(Object.assign({},e),{mailboxId:t.id})),n++,e):[]}),l=((null==a?void 0:a.flat())||[]).map(t=>{var e,n=r.find(e=>e.id===t.mailboxId);return Object.assign(Object.assign({},t),{appId:(null==(e=null==n?void 0:n.application)?void 0:e.applicationId)||"",appName:(null==(e=null==n?void 0:n.application)?void 0:e.name)||"",eventNames:(null==(e=null==n?void 0:n.eventFilter)?void 0:e.eventNames)||[],icon:(null==(e=null==n?void 0:n.application)?void 0:e.icon)||"",title:t.title||""})});yield put(getNotificationListByMailBoxSuccess({offset:i,limit:e,availableMailBoxes:n,data:l}))}}else yield take(subscriberSuccess({}).type)}function*listenToPushNotificationSaga(e){var t=(yield select(mailBoxSelector))["mailbox"];const n=e["payload"];e=t.find(e=>e.id===n.mailboxId);yield put(updateNotificationList(Object.assign(Object.assign({},n),{appId:(null==(t=null==e?void 0:e.application)?void 0:t.applicationId)||"",appName:(null==(t=null==e?void 0:e.application)?void 0:t.name)||"",icon:(null==(t=null==e?void 0:e.application)?void 0:t.icon)||""})))}function*updateNotificationReadSaga(e){var t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector);try{var r=yield call$j(handleUpdateNotificationRead,t,n,e.payload);null!=r&&r.error?yield put(updateNotificationReadFail()):yield put(updateNotificationReadSuccess(Object.assign({},r)))}catch(e){yield put(updateNotificationReadFail())}}function*updateMarkAllReadNotificationSaga(){var e=(yield select(mailBoxSelector))["mailBoxIds"],t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector);if(0<(null==e?void 0:e.length))try{(yield call$j(handleMarkAllReadNotification,e,t,n)).error?yield put(markAllReadNotificationFail()):yield put(markAllReadNotificationSuccess())}catch(e){yield put(markAllReadNotificationFail())}}function*getNotificationActionSaga(e){var t,n,{eventType:r,appId:i,eventName:o}=yield select(notificationDetailSelector(e.payload)),a=yield select(graphEndpointSelector),s=yield select(sessionTokenSelector);try{var l,c=yield call$j(handleGetNotificationAction,o,r,i,a,s);c.error?yield put(getNotificationActionError()):(l=(null==(n=null==(t=null==c?void 0:c.data)?void 0:t.notificationActions)?void 0:n.records)||[],yield put(getNotificationActionSuccess(e.payload,l)))}catch(e){yield put(getNotificationActionError())}}function*notificationSaga(){yield all$2([takeEvery$1(getNotification.type,getNotificationListByMailBoxSaga),takeLatest$1(updateUtilitySetting.type,refetchNotificationSetting),takeEvery$1(getNotificationListByMailBoxRequest.type,getNotificationListByMailBoxSaga),takeEvery$1("mailbox/PUSH_NOTIFICATION",listenToPushNotificationSaga),takeEvery$1(updateNotificationReadRequest.type,updateNotificationReadSaga),takeEvery$1(GET_NOTIFICATION_ACTION_REQUEST,getNotificationActionSaga),takeLatest$1(markAllReadNotificationRequest.type,updateMarkAllReadNotificationSaga)])}function getNotificationModule(){return{id:"os-notification-panel",reducerMap:{[nameSpace$3]:notificationReducer},sagas:[notificationSaga],initialActions:[],retained:!0}}const useStyles$b$2=makeStyles()((e,{msg:t})=>({root:{width:"100%",height:"100%"},noData:{paddingTop:66,display:"flex",justifyContent:"center"},iconNoData:{width:235,height:235,display:"flex",justifyContent:"center",borderRadius:"50%",padding:"20px",border:"20px solid #FFFF"},noDataDescription:{display:"flex",justifyContent:"center",marginTop:66},noDataDescriptionText:{fontSize:"18px",lineHeight:"23px",textTransform:"uppercase",color:e.palette.secondary.main,textAlign:"center",width:t?"250px":""}})),NotificationContent=({msg:e})=>{var t=useStyles$b$2({msg:e})["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:t.root,"data-testid":"notification-content"},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:t.noData},{children:jsxRuntime.exports.jsx("div",Object.assign({className:t.iconNoData},{children:jsxRuntime.exports.jsx("img",{src:img$4,draggable:"false",alt:"noNotification"})}))})),jsxRuntime.exports.jsx("div",Object.assign({className:t.noDataDescription},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1","data-test":"no-notification",className:t.noDataDescriptionText},{children:e?jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.select-product",defaultMessage:"No notifications for the selected product",description:"Notification panel: no notification message for select product"}):jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.pBrbyj",defaultMessage:"You don’t have any notifications",description:"Notification panel: no notification message"})}))}))]}))},useStyles$a$2=makeStyles()(e=>({cardContainer:{width:"100%","&:hover":{backgroundColor:"#EEF3F9"}},rootCard:{padding:e.spacing(4,6),display:"flex",cursor:"pointer"},unreadCard:{padding:e.spacing(4,6),display:"flex",cursor:"pointer",paddingLeft:e.spacing(2)},iconCard:{marginTop:e.spacing(-.4)},leftContent:{width:"345px",padding:e.spacing(0,6,0,3)},titleCard:{display:"flex"},appsCard:{fontSize:"14px",fontWeight:600},timestampCard:{fontSize:"12px",paddingLeft:e.spacing(3),color:e.palette.text.secondary},contentCard:{lineHeight:"150%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",color:e.palette.text.secondary},dividerCard:{margin:e.spacing(0,6),height:"0.5px"},notificationIcon:{width:24,height:24},unread:{width:"auto",marginRight:e.spacing(2.4),fontSize:"unset"},unreadIcon:{width:8,height:8,color:e.palette.primary.main},appName:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"calc(100% - 85px)"}})),NotificationCard=react$1.exports.forwardRef(({data:e,onViewDetail:t},n)=>{var r=useStyles$a$2()["classes"];const i=useDispatch(),[o,a]=react$1.exports.useState(!1);const{createdDateTime:s,icon:l,title:c,appName:u,body:d,id:p,flags:f}=e;return jsxRuntime.exports.jsxs("div",Object.assign({ref:n,className:r.cardContainer},{children:[jsxRuntime.exports.jsxs("div",Object.assign({onClick:t,className:null!=f&&f.includes(NotificationFlag.unread)?r.unreadCard:r.rootCard},{children:[(null==f?void 0:f.includes(NotificationFlag.unread))&&jsxRuntime.exports.jsx(Icon$1,{"data-test":"notification-unread-icon","data-testid":"notification-unread-icon",className:r.unread,children:jsxRuntime.exports.jsx(default_1$d,{className:r.unreadIcon}),onClick:function(e){e.stopPropagation(),i(updateNotificationReadRequest(p))}}),jsxRuntime.exports.jsx("div",Object.assign({className:r.iconCard},{children:l&&!o?jsxRuntime.exports.jsx("img",{src:l,className:r.notificationIcon,draggable:"false",alt:"notification-card-icon",onError:function(){a(!0)}}):jsxRuntime.exports.jsx(Notifications,{})})),jsxRuntime.exports.jsxs("div",Object.assign({className:r.leftContent},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:r.titleCard},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.appName},{children:null!=f&&f.includes(NotificationFlag.unread)?jsxRuntime.exports.jsx("strong",{children:u}):u})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.timestampCard},{children:jsxRuntime.exports.jsx(FormattedRelativeTime$1,{value:getRelativeValue(s),unit:"minute",updateIntervalInSeconds:60,children:e=>e.includes("seconds")?jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.mvPoLJ",defaultMessage:"Just now",description:"the time label of notification that received on 1 minute"}):react$1.exports.createElement("span",{},e)})}))]})),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.contentCard},{children:convertHTMLEntities(c||d)}))})]}))]})),jsxRuntime.exports.jsx(Divider$1,{className:r.dividerCard})]}))}),useStyles$9$2=makeStyles()(e=>({header:{opacity:.9,display:"flex",justifyContent:"space-between",padding:e.spacing(3.5,6,4,6),position:"sticky",width:"fit-content",fontSize:"14px",fontWeight:400,top:0},scrollContent:{overflow:"hidden"},infinityLoading:{display:"flex",justifyContent:"center",padding:e.spacing(4)}}));function NotificationList({title:e,data:r,loading:t,handleGetNotification:n,onOpenNotificationDetail:i,setPanelIsOpenState:o}){var a=useStyles$9$2()["classes"];const s=react$1.exports.useRef(),l=react$1.exports.useCallback(e=>{t||(s.current&&s.current.disconnect(),s.current=new IntersectionObserver(e=>{e[0].isIntersecting&&n()}),e&&s.current.observe(e))},[n,t]),c=useDispatch(),u=()=>{o&&o(!1),c(hidePanel$1("NOTIFICATION_PANEL_ID")),c(mountPanel$1({panelId:"CHANGELOG_PANEL",microFrontend:{name:"CHANGELOG_PANEL",config:{}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:0,size:"small",zIndex:1e3,dimmed:0,borderBottom:!0}}))};return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("div",Object.assign({className:a.header},{children:e.toUpperCase()})),jsxRuntime.exports.jsxs("div",Object.assign({className:a.scrollContent},{children:[0<(null==r?void 0:r.length)?r.map((e,t)=>{var n=!!(e.eventNames||[]).find(e=>"NewVersionInstalled"===e);return r.length===t+1?jsxRuntime.exports.jsx(NotificationCard,{ref:l,onViewDetail:n?()=>u():()=>null==i?void 0:i(e),data:e},t):jsxRuntime.exports.jsx(NotificationCard,{onViewDetail:n?()=>u():()=>null==i?void 0:i(e),data:e},t)}):jsxRuntime.exports.jsx(NotificationContent,{msg:!0}),t&&jsxRuntime.exports.jsx("div",Object.assign({className:a.infinityLoading},{children:jsxRuntime.exports.jsx(CircularProgress$1,{size:30})}))]}))]})}const useStyles$8$3=makeStyles()(e=>({loadingContainer:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},filterContainer:{position:"absolute",top:e.spacing(12.4),right:0,paddingTop:e.spacing(3),paddingRight:e.spacing(6),paddingBottom:e.spacing(2),width:"100%",display:"flex",justifyContent:"flex-end",backgroundColor:e.palette.background.default},markAllReadButton:{cursor:"pointer",marginRight:e.spacing(4),backgroundColor:e.palette.background.default,textTransform:"capitalize"}})),NotificationPanel=({setPanelIsOpenState:e})=>{const r=useDispatch();var t=useStyles$8$3()["classes"],n=useSelector(applicationFilterSelector)||[];const[i,o]=react$1.exports.useState(!1),a=useSelector(mailboxIdSelector);var s=useSelector(notificationWithFilterSelector);const{filter:l,status:c,notifications:u,availableMailBoxes:d,offset:p,limit:f}=useSelector(notificationSelector),h=e=>Math.max(Math.ceil(50/e),5);react$1.exports.useEffect(()=>{var e=(null===a||void 0===a?void 0:a.length)||0;0<e&&0===f&&(e=h(e),r(getNotification(0,e)))},[r,f,a]);var m=react$1.exports.useCallback(()=>{var e;0<d&&(o(!0),e=h(d),r(getNotification(p+f,e,()=>{o(!1)})))},[d,r,f,p]);return jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getNotificationModule()]},{children:0===s.length&&"success"!==c&&"failure"!==c&&0<a.length?jsxRuntime.exports.jsx("div",Object.assign({className:t.loadingContainer},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})):0<(null==u?void 0:u.length)?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:t.filterContainer,id:"notification-list-header"},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:function(){r(markAllReadNotificationRequest())},className:t.markAllReadButton,"data-test":"notification-mark-all-read-button","data-testid":"notification-mark-all-read-button"},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"caption",color:"primary"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.PtPIns",defaultMessage:"Mark All Read",description:"label of Mark All Read button"})}))})),jsxRuntime.exports.jsx(Filter,{data:[...filters$3,...n],filter:l,onFilter:function(e){e=e.target.value,r(updateFilterValue(e))}})]})),jsxRuntime.exports.jsx(NotificationList,{setPanelIsOpenState:e,title:"All time",onOpenNotificationDetail:function(e){var t="DETAIL_PANEL_ID",n={name:"NOTIFICATION_DETAIL",config:{mode:"actionable",id:e.id,data:Object.assign({},e),actionIconButtons:null!=(n=e.actions)?n:[],onClose:()=>{console.log("onClose")}}};r(unmountPanel$1(t)),r(mountPanel$1({panelId:t,microFrontend:n,panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:413,width:420,header:{title:"Notification detail"},dimmed:0,siblingPanelId:"NOTIFICATION_PANEL_ID",parentPanelId:"NOTIFICATION_PANEL_ID"}})),r(updateNotificationReadRequest(e.id))},data:s,loading:i,handleGetNotification:m})]}):jsxRuntime.exports.jsx(NotificationContent,{})}))})};function CustomWorkFlow(){return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex",justifyContent:"space-between",alignItems:"center","data-testid":"custom-workflow-box"},{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.1+8+OX",defaultMessage:"Custom Workflows",description:"custom-workflows"})}),jsxRuntime.exports.jsx(Button$1,{variant:"outlined",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.gAFAOA",defaultMessage:"Create New",description:"creat-new-btn"}),color:"primary"})]})),jsxRuntime.exports.jsx(Typography$1,{style:{fontSize:14,marginTop:20},children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.9+Qhjr",defaultMessage:"You don’t have any custom workflows yet. Get started by clicking the Create New button above!",description:"text"})})]})}const useStyles$7$3=makeStyles()(e=>({dividerSmallMargin:{marginTop:e.spacing(3.6),marginBottom:e.spacing(4)},utilityItem:{padding:0,cursor:"pointer"},utilityItemHover:{padding:e.spacing(2,0),"&:hover":{backgroundColor:e.palette.background.paper}},utilityDetail:{fontSize:12}}));function NotificationSettingItem(e){const{imgSrc:t,primaryText:n,secondaryText:r,bigSize:i,onOpenUtility:o,onOpenApplication:a,hideDivider:s,applicationId:l,applicationTitle:c,utilityId:u="",utilityTitle:d="Finder",disabled:p,isHover:f}=e;e=useStyles$7$3().classes;return jsxRuntime.exports.jsxs(react$1.exports.Fragment,{children:[jsxRuntime.exports.jsxs(ListItem$1,Object.assign({className:classNames(e.utilityItem,f?e.utilityItemHover:""),onClick:function(){null!==o&&void 0!==o&&o(u,d),null!==a&&void 0!==a&&a(l,c)},disabled:p,"data-testid":"notification-setting-item"},{children:[jsxRuntime.exports.jsx(ListItemAvatar$1,{children:jsxRuntime.exports.jsx(Avatar$1,{style:{width:i?60:40,height:i?60:40,borderRadius:"50%",marginRight:19},src:t})}),jsxRuntime.exports.jsx(ListItemText$1,{primary:jsxRuntime.exports.jsx(Typography$1,{variant:i?"h3":"body2",children:n}),secondary:jsxRuntime.exports.jsx(Typography$1,{variant:i?"body2":"caption",children:r})})]})),!s&&jsxRuntime.exports.jsx(Divider$1,{className:f?"":e.dividerSmallMargin})]})}const useStyles$6$3=makeStyles()(e=>({notificationTypeItemBox:{background:e.palette.background.paper,borderRadius:e.shape.borderRadius,width:"100%",display:"flex",flexDirection:"column",alignItems:"center",padding:e.spacing(4,1,1),height:"100%",fontSize:10,lineHeight:"16px",justifyContent:"center"},disableType:{color:e.palette.grey[500]}}));function NotificationTypeItem(e){const{notificationTypeIcon:t,notificationTypeName:n,defaultSelected:r,onSelectNotificationType:i,notificationTypeId:o,isDisabled:a}=e,[s,l]=react$1.exports.useState(r);e=useStyles$6$3().classes;return jsxRuntime.exports.jsxs("div",Object.assign({className:classNames(e.notificationTypeItemBox,a?e.disableType:""),"data-testid":"notification-type-item"},{children:[jsxRuntime.exports.jsx("div",{children:"string"==typeof t?jsxRuntime.exports.jsx("img",{src:t,alt:"icon",draggable:"false"}):t}),jsxRuntime.exports.jsx("div",{children:n}),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Checkbox$1,{icon:jsxRuntime.exports.jsx("img",{src:img$1r,alt:"uncheck icon",draggable:"false"}),checkedIcon:jsxRuntime.exports.jsx("img",{src:img$1q,alt:"checked icon",draggable:"false"}),checked:s,onChange:function(){l(e=>(null!==i&&void 0!==i&&i(o,!e),!e))},disabled:!!a})})]}))}const useStyles$5$4=makeStyles()(e=>({notificationTypeBox:{paddingBottom:e.spacing(0)},notificationTypeHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:16,lineHeight:"22px",fontWeight:600,marginBottom:e.spacing(2)},notificationList:{display:"inline-grid",gridColumnGap:e.spacing(2.8),gridTemplateColumns:"1fr 1fr 1fr",width:"100%",marginBottom:e.spacing(4.4)},divider:{marginTop:e.spacing(4),marginBottom:e.spacing(4.4)},dividerWithoutDescription:{marginBottom:e.spacing(3)}})),defaultNotificationTypeList=[{id:INotificationType.EMAIL,notificationTypeIcon:jsxRuntime.exports.jsx(Email,{}),notificationTypeName:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.rTFvFj",defaultMessage:"Email",description:"allow notification types: email"}),isSelected:!0},{id:INotificationType.NOTIFICATION_CENTER,notificationTypeIcon:jsxRuntime.exports.jsx(HelpCenter$1,{}),notificationTypeName:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.SmyvFq",defaultMessage:"Notification Center",description:"allow notification types: Notification Center"}),isSelected:!0},{id:INotificationType.BANNER,notificationTypeIcon:jsxRuntime.exports.jsx(Banner,{}),notificationTypeName:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.r7Whww",defaultMessage:"Banners",description:"allow notification types: Banners"}),isSelected:!0}];function NotificationType(e){const{notificationTypeTitle:t,children:n,description:r,allowTypes:i=[],allowNotification:o,onChangeAllowType:a,hideDivider:s,onChangeNotificationType:l,disabledTypes:c=[]}=e,[u,d]=react$1.exports.useState(!!o),[p,f]=react$1.exports.useState(defaultNotificationTypeList);var e=useStyles$5$4()["classes"],h=[...i];const[m,g]=react$1.exports.useState(i);var y=t||"Allow Notifications";return react$1.exports.useEffect(()=>{var e=defaultNotificationTypeList.map(t=>{var e=-1!==m.findIndex(e=>e===t.id),n=-1!==c.findIndex(e=>e===t.id);return Object.assign(Object.assign({},t),{isSelected:e,isDisabled:n})});f(e)},[h.join(", "),m]),react$1.exports.useEffect(()=>{null!==a&&void 0!==a&&a(u),u?0===m.length&&u&&g([INotificationType.EMAIL]):g([])},[u]),jsxRuntime.exports.jsxs("div",Object.assign({className:e.notificationTypeBox},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:e.notificationTypeHeader},{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.8Z0yyD",defaultMessage:"{title}",description:"notification setting: allow notification types",values:{title:y}})}),jsxRuntime.exports.jsx(Switch$1,{checked:u,onChange:function(){d(e=>!e)},color:"primary",name:"notificationTypeChecked","data-testid":"notification-type-switch"})]})),n,jsxRuntime.exports.jsx("div",Object.assign({className:e.notificationList},{children:p.map(t=>{var e=-1!==c.findIndex(e=>e===t.id)||!u;return jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(NotificationTypeItem,{notificationTypeIcon:t.notificationTypeIcon,notificationTypeName:t.notificationTypeName,defaultSelected:t.isSelected,onSelectNotificationType:l,notificationTypeId:t.id,isDisabled:e})},t.id+"-"+t.isSelected)})})),r,!s&&jsxRuntime.exports.jsx(Divider$1,{className:r?e.divider:e.dividerWithoutDescription})]}))}const useStyles$4$4=makeStyles()(e=>({tableCell:{padding:0,"& > span":{paddingLeft:0,paddingRight:0}},itemCell:{padding:0,"& > span":{padding:e.spacing(0,2)}},eventNameContainer:{display:"flex",alignItems:"center"},tableRowCheckbox:{marginRight:e.spacing(2)},rowCheckbox:{paddingLeft:0},customLineHeight:{lineHeight:e.spacing(8)},disabledCheckBox:{"& svg":{color:"green"}}}));function NotificationUtilityActionItem(e){const{events:t,disabled:n}=e,r=useStyles$4$4()["classes"],i=[{type:INotificationType.EMAIL,iconUrl:img$1u},{type:INotificationType.NOTIFICATION_CENTER,iconUrl:img$1t},{type:INotificationType.BANNER,iconUrl:img$1s}];return jsxRuntime.exports.jsx(TableContainer$1,{children:jsxRuntime.exports.jsxs(Table$1,Object.assign({"aria-label":"customized table"},{children:[jsxRuntime.exports.jsx(TableHead$1,{children:jsxRuntime.exports.jsxs(TableRow$1,{children:[jsxRuntime.exports.jsx(TableCell$1,Object.assign({className:r.tableCell},{children:jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.KVIpaj",defaultMessage:"Events",description:"allow-notification"})})})),i.map(e=>jsxRuntime.exports.jsx(TableCell$1,Object.assign({align:"center",className:r.itemCell},{children:jsxRuntime.exports.jsx("img",{src:e.iconUrl,alt:e.type})}),e.type))]})}),jsxRuntime.exports.jsx(TableBody$1,{children:null==t?void 0:t.map(t=>jsxRuntime.exports.jsxs(TableRow$1,{children:[jsxRuntime.exports.jsxs(TableCell$1,Object.assign({className:classNames(r.eventNameContainer,r.tableCell)},{children:[jsxRuntime.exports.jsx(Checkbox$1,{id:t.id,disabled:n,className:r.tableRowCheckbox}),jsxRuntime.exports.jsx(ListItemText$1,{children:jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.VNVmyk",defaultMessage:"{defaultMessage}",description:"Finder notifications: {defaultMessage}",values:{defaultMessage:t.title,id:t.id}})})})]})),i.map(e=>jsxRuntime.exports.jsx(TableCell$1,Object.assign({className:r.itemCell},{children:jsxRuntime.exports.jsx(Checkbox$1,{id:"checkbox-"+t.id,icon:jsxRuntime.exports.jsx(default_1$c,{}),checkedIcon:jsxRuntime.exports.jsx(CheckCircle,{})})}),e.type+"-type"))]},t.id))})]}))})}const useStyles$3$5=makeStyles()(e=>({finderNotification:{padding:e.spacing(4,6),maxHeight:"100%",overflow:"auto"},buttonBox:{display:"flex",justifyContent:"flex-end",marginTop:e.spacing(8)},buttonLeft:{marginRight:e.spacing(4)},settingItem:{marginBottom:e.spacing(6)},sharedItem:{padding:0}}));function NotificationUtilityPanel(e){const t=e["dataId"];e=useStyles$3$5().classes;const n=useSelector(notificationSelector).settings;var r=n.utility,r=null==r?void 0:r.find(e=>e.id===t);const[i,o]=react$1.exports.useState(r||{}),a=[];return[INotificationType.EMAIL,INotificationType.NOTIFICATION_CENTER,INotificationType.BANNER].forEach(t=>{-1===n.allowType.findIndex(e=>e===t)&&a.push(t)}),jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs("div",Object.assign({className:e.finderNotification},{children:[jsxRuntime.exports.jsx(NotificationType,{allowTypes:null==i?void 0:i.allowType,allowNotification:null==i?void 0:i.allow,onChangeAllowType:function(r){o(e=>{var t=r?[...e.allowType]:[],n=r?[...e.action]:[...e.action].map(e=>Object.assign(Object.assign({},e),{allow:!1}));return Object.assign(Object.assign({},e),{allow:r,allowType:t,action:n})})},onChangeNotificationType:function(r,i){o(e=>{var t=[...e.allowType],n=t.indexOf(r);return-1===n||i?t.push(r):t.splice(n,1),Object.assign(Object.assign({},e),{allowType:t})})},disabledTypes:a,children:jsxRuntime.exports.jsx(NotificationSettingItem,{imgSrc:(null==i?void 0:i.iconUrl)||"",primaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.ubNxKs",defaultMessage:"{utilityTitle}",description:"title of notification utility: {utilityTitle}",values:{id:null==i?void 0:i.id,utilityTitle:null==i?void 0:i.title}}),secondaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.XkH621",defaultMessage:"Chose which events you’d like to be notified about.",description:"content of notification utility description"}),bigSize:!0}),description:jsxRuntime.exports.jsx(Typography$1,{variant:"caption",children:"Banner previews are being set at the parent level"})}),jsxRuntime.exports.jsx(NotificationUtilityActionItem,{events:null==i?void 0:i.action,onSelectAction:function(r){o(e=>{var t=[...e.action],n=t.findIndex(e=>e.id===r.id);return t[n]=r,Object.assign(Object.assign({},e),{action:t})})},disabled:!i.allow}),jsxRuntime.exports.jsx(Divider$1,{style:{marginBottom:20,marginTop:15}}),jsxRuntime.exports.jsx(CustomWorkFlow,{})]}))})}const useStyles$2$6=makeStyles()(e=>({notificationSetting:{padding:e.spacing(3,6,4.4),overflowY:"scroll",height:"100%"},appAllowTitle:{paddingTop:e.spacing(2.4)},dividerBigMargin:{marginTop:e.spacing(2.4),marginBottom:e.spacing(3)},notificationSettingItem:{padding:0},bannerStyleLabel:{fontWeight:"normal"}}));function NotificationSetting(){var e=useStyles$2$6()["classes"];const r=useDispatch(),[t,i]=react$1.exports.useState(!0),[n,o]=react$1.exports.useState(!0);var a=useSelector(notificationSettingSelector);const[s,l]=react$1.exports.useState(a.bannerStyle);var c=useSelector(notificationUtilitiesSelector);const u=useSelector(notificationApplicationsSelector),[d,p]=react$1.exports.useState(null==a?void 0:a.allow),[f,h]=react$1.exports.useState(a);var a=-1!==(null==(a=null===f||void 0===f?void 0:f.allowType)?void 0:a.findIndex(e=>e===INotificationType.BANNER));const[m,g]=react$1.exports.useState(a);function y(e){var t={name:"NOTIFICATION_UTILITY",config:{mode:"actionable",onClose:()=>{console.log("onClose")}}},n={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:472,width:413,zIndex:1002,header:{divider:!0,title:"finder notifications"}};r(mountPanel$1({panelId:e||"",microFrontend:t,panelConfig:n}))}function v(e){var t={name:"NOTIFICATION_APPLICATION",config:{mode:"actionable",onClose:()=>{console.log("onClose")}}},n={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:472,width:413,zIndex:1002,header:{divider:!0,title:"app notifications"}};r(mountPanel$1({panelId:e||"",microFrontend:t,panelConfig:n}))}return react$1.exports.useEffect(()=>{r(updateNotificationSetting(f))},[f,r]),jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs("div",Object.assign({className:e.notificationSetting},{children:[jsxRuntime.exports.jsx(NotificationType,{allowTypes:null===f||void 0===f?void 0:f.allowType,allowNotification:null===f||void 0===f?void 0:f.allow,onChangeAllowType:function(n){p(n),n||(i(n),o(n)),h(e=>{var t=n?[...e.allowType]:[];return Object.assign(Object.assign({},e),{allow:n,allowType:t})})},hideDivider:m,onChangeNotificationType:function(r,i){r===INotificationType.BANNER&&g(i),h(e=>{var t=[...e.allowType],n=t.indexOf(r);return-1===n||i?t.push(r):t.splice(n,1),Object.assign(Object.assign({},e),{allowType:t})})}}),d&&m&&jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:"Banner Style"}),jsxRuntime.exports.jsx(FormControl$1,Object.assign({component:"fieldset"},{children:jsxRuntime.exports.jsxs(RadioGroup$1,Object.assign({"aria-label":"bannerStyle",name:"bannerStyle",value:s,onChange:e=>{l(e.target.value),r(updateBannerStyle(e.target.value))},row:!0},{children:[jsxRuntime.exports.jsx(FormControlLabel$1,{value:"temporary",control:jsxRuntime.exports.jsx(Radio$2,{}),label:jsxRuntime.exports.jsx("span",{children:jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:"Temporary"})})}),jsxRuntime.exports.jsx(FormControlLabel$1,{value:"persistent",control:jsxRuntime.exports.jsx(Radio$2,{}),label:jsxRuntime.exports.jsx("span",{children:jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:"Persistent"})})})]}))})),jsxRuntime.exports.jsx(Divider$1,{className:e.dividerBigMargin})]}),jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex",justifyContent:"space-between",alignItems:"center"},{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.qJ0Sxo",defaultMessage:"Allow Utility Notifications",description:"allow-utility-notification"})}),jsxRuntime.exports.jsx(Switch$1,{checked:t,onChange:e=>{e=e.target.checked;i(e)},color:"primary",name:"enableUtilityNotification",disabled:!d})]})),jsxRuntime.exports.jsx(List$2,Object.assign({className:e.notificationSettingItem},{children:null==c?void 0:c.map(e=>jsxRuntime.exports.jsx(NotificationSettingItem,{imgSrc:e.iconUrl,isHover:!0,primaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.tadsU0",defaultMessage:"{defaultMessage}",description:"title of notification utility: {defaultMessage}",values:{id:e.id,defaultMessage:e.title}}),secondaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.AgAM0k",defaultMessage:"{defaultMessage}",description:"allowed types of notification utility: {defaultMessage}",values:{id:e.id,defaultMessage:e.allowType.join(", ")}}),onOpenUtility:y,utilityId:e.id,utilityTitle:e.title,disabled:!t},e.id))}))]}),jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex",justifyContent:"space-between",alignItems:"center",className:e.appAllowTitle},{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.swIpqY",defaultMessage:"Allow Application Notifications",description:"allow-application-notification"})}),jsxRuntime.exports.jsx(Switch$1,{checked:n,onChange:e=>{e=e.target.checked;o(e)},color:"primary",name:"checkedB",disabled:!d})]})),jsxRuntime.exports.jsx(List$2,Object.assign({className:e.notificationSettingItem},{children:null==(a=null===u||void 0===u?void 0:u.allIds)?void 0:a.map(e=>jsxRuntime.exports.jsx(NotificationSettingItem,{imgSrc:null===u||void 0===u?void 0:u.byId[e].iconUrl,isHover:!0,primaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.JvsYLn",defaultMessage:"{defaultMessage}",description:"title of notification application: {defaultMessage}",values:{idMessage:e,defaultMessage:null===u||void 0===u?void 0:u.byId[e].name}}),secondaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.AgAM0k",defaultMessage:"{defaultMessage}",description:"allowed types of notification utility: {defaultMessage}",values:{id:e,defaultMessage:null===u||void 0===u?void 0:u.byId[e].allowType.join(", ")}}),onOpenApplication:v,applicationId:e,applicationTitle:null===u||void 0===u?void 0:u.byId[e].name,disabled:!n},e))}))]})]}))})}const useStyles$1$6=makeStyles()(e=>({appNoti:{padding:e.spacing(6),paddingTop:e.spacing(4.4),overflowY:"scroll",height:"100%"}})),useStyles$n=makeStyles()(e=>({tableCell:{padding:0,"& > span":{paddingLeft:0,paddingRight:0}},tableRowCheckbox:{marginRight:e.spacing(2)},rowCheckbox:{paddingLeft:0,paddingTop:0,paddingBottom:0,height:"20px"},disabledCheckBox:{"& svg":{color:"green"}},firstColumn:{paddingRight:e.spacing(2)},secondColumn:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},thirdColumn:{paddingLeft:e.spacing(2)}}));function NotificationAllowCell(e){const{id:t,type:n,allowType:r,currentApplicationAllowType:i,isLineEnable:o,onChangeAppAction:a}=e,s=useStyles$n()["classes"];e=(e,t)=>{switch(t){case"email":return e.includes(INotificationType.EMAIL);case"banners":return e.includes(INotificationType.BANNER);case"notification-center":return e.includes(INotificationType.NOTIFICATION_CENTER)}};return jsxRuntime.exports.jsx(TableCell$1,Object.assign({align:"center",className:s.tableCell+" "+(()=>{switch(t){case"email":return s.firstColumn;case"notification-center":return s.secondColumn;case"banners":return s.thirdColumn;default:return""}})()},{children:jsxRuntime.exports.jsx(Checkbox$1,{id:"checkbox-"+t,checked:e(r,t),disabled:!e(i,t)||!o,icon:jsxRuntime.exports.jsx(default_1$c,{}),checkedIcon:jsxRuntime.exports.jsx(CheckCircle,{color:e(i,t)&&o?"primary":"disabled"}),onChange:e=>{a(e,n)}})}))}function NotificationAllowRow(e){const{allowNotificationTitle:t,checked:n,allowType:r,appId:i,id:o}=e;e=useStyles$n().classes;const a=useDispatch();var s=useSelector(notificationApplicationSelector(i));const[l,c]=react$1.exports.useState(n),u=null==s?void 0:s.allowType,[d,p]=react$1.exports.useState(r);s=[{id:"email",type:INotificationType.EMAIL},{id:"notification-center",type:INotificationType.NOTIFICATION_CENTER},{id:"banners",type:INotificationType.BANNER}];const f=(e,t)=>{let n;n=e.currentTarget.checked?[...d,t]:d.filter(e=>e!==t),p(n),a(updateAppActionAllowNotification(i,o,n,"allowType"))};return jsxRuntime.exports.jsxs(TableRow$1,{children:[jsxRuntime.exports.jsx(TableCell$1,Object.assign({component:"th",scope:"row",className:e.tableCell},{children:jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex"},{children:[jsxRuntime.exports.jsx(Checkbox$1,{"data-test":"row-check-"+o,"data-testid":"row-check-"+o,className:e.rowCheckbox,checked:l,onChange:e=>{e=e.currentTarget.checked;c(e),a(updateAppActionAllowNotification(i,o,e,"allow"))}}),jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.tSG+Bv",defaultMessage:"{text}",description:"allow-notification-table-{text}",values:{text:t}})})]}))})),s.map(e=>jsxRuntime.exports.jsx(NotificationAllowCell,{id:e.id,type:e.type,allowType:r,currentApplicationAllowType:u,isLineEnable:l,onChangeAppAction:f},e.id))]})}function NotificationAllowTable(e){const{action:n,appId:r}=e;var e=useStyles$n()["classes"],t=classNames(e.tableCell,e.firstColumn),i=classNames(e.tableCell,e.secondColumn),o=classNames(e.tableCell,e.thirdColumn);return jsxRuntime.exports.jsx(TableContainer$1,{children:jsxRuntime.exports.jsxs(Table$1,Object.assign({"aria-label":"notification-table"},{children:[jsxRuntime.exports.jsx(TableHead$1,{children:jsxRuntime.exports.jsxs(TableRow$1,{children:[jsxRuntime.exports.jsx(TableCell$1,Object.assign({className:e.tableCell},{children:jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.KVIpaj",defaultMessage:"Events",description:"allow-notification"})})})),jsxRuntime.exports.jsx(TableCell$1,Object.assign({align:"center",className:t},{children:jsxRuntime.exports.jsx("img",{src:img$1u,alt:"img-icon"})})),jsxRuntime.exports.jsx(TableCell$1,Object.assign({align:"center",className:i},{children:jsxRuntime.exports.jsx("img",{src:img$1t,alt:"img-icon"})})),jsxRuntime.exports.jsx(TableCell$1,Object.assign({align:"center",className:o},{children:jsxRuntime.exports.jsx("img",{src:img$1s,alt:"img-icon"})}))]})}),jsxRuntime.exports.jsx(TableBody$1,{children:null==(e=null===n||void 0===n?void 0:n.allIds)?void 0:e.map(e=>{var t;return jsxRuntime.exports.jsx(NotificationAllowRow,{allowNotificationTitle:null==(t=null===n||void 0===n?void 0:n.byId[e])?void 0:t.title,checked:null==(t=null===n||void 0===n?void 0:n.byId[e])?void 0:t.allow,allowType:null==(t=null===n||void 0===n?void 0:n.byId[e])?void 0:t.allowType,appId:r,id:e},e)})})]}))})}function NotificationApplication(e){const o=e["dataId"];var e=useStyles$1$6()["classes"];const t=useDispatch();var n=useSelector(notificationApplicationsSelector);const[r,a]=react$1.exports.useState(n),i=useSelector(notificationSelector).settings;var s=useSelector(notificationApplicationSelector(o));react$1.exports.useEffect(()=>{t(updateApplicationSetting(r))},[r]);var l=[INotificationType.EMAIL,INotificationType.NOTIFICATION_CENTER,INotificationType.BANNER];const c=[];l.forEach(t=>{-1===(null===i||void 0===i?void 0:i.allowType.findIndex(e=>e===t))&&c.push(t)});return jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs("div",Object.assign({className:e.appNoti},{children:[jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(NotificationType,{notificationTypeTitle:"Allow Notifications",allowNotification:null==n?void 0:n.byId[o].allow,allowTypes:null==(l=null==n?void 0:n.byId[o])?void 0:l.allowType,disabledTypes:c,children:jsxRuntime.exports.jsx(NotificationSettingItem,{imgSrc:(null==(e=null==n?void 0:n.byId[o])?void 0:e.iconUrl)||"",primaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.OR1ivL",defaultMessage:"{text}",description:"notification-app-id",values:{text:null==s?void 0:s.name}}),secondaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.QgzNQa",defaultMessage:"{text}",description:"notification application detail text",values:{text:null==s?void 0:s.description}}),bigSize:!0}),description:jsxRuntime.exports.jsx(Typography$1,{variant:"caption",children:"Banner previews are being set at the parent level"}),onChangeNotificationType:function(r,i){a(e=>{var t=[...e.byId[o].allowType],n=t.indexOf(r);return i&&-1===n?t.push(r):t.splice(n,1),Object.assign(Object.assign({},e),{byId:Object.assign(Object.assign({},e.byId),{[o]:Object.assign(Object.assign({},e.byId[o]),{allowType:t})})})})},onChangeAllowType:e=>{t(updateAppAllowNotification(o,e))}})}),jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(NotificationAllowTable,{action:null==(l=null==n?void 0:n.byId[o])?void 0:l.action,appId:o}),jsxRuntime.exports.jsx(Divider$1,{style:{marginBottom:20,marginTop:15}})]}),jsxRuntime.exports.jsx(CustomWorkFlow,{})]}))})}var index_esm$5=Object.freeze({__proto__:null,NotificationApplication:NotificationApplication,NotificationDetailPanel:NotificationDetailPanel,NotificationPanel:NotificationPanel,NotificationSetting:NotificationSetting,NotificationUtilityPanel:NotificationUtilityPanel,initNotificationAction:initNotificationAction,onNotificationActionClicked:onNotificationActionClicked}),REGEX=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function validate(e){return"string"==typeof e&&REGEX.test(e)}var SettingsApplications={},_interopRequireDefault$b=interopRequireDefault.exports,default_1$b=(Object.defineProperty(SettingsApplications,"__esModule",{value:!0}),SettingsApplications.default=void 0),_createSvgIcon$b=_interopRequireDefault$b(createSvgIcon$1),_jsxRuntime$b=jsxRuntime.exports,_default$b=(0,_createSvgIcon$b.default)((0,_jsxRuntime$b.jsx)("path",{d:"M12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm7-7H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-1.75 9c0 .23-.02.46-.05.68l1.48 1.16c.13.11.17.3.08.45l-1.4 2.42c-.09.15-.27.21-.43.15l-1.74-.7c-.36.28-.76.51-1.18.69l-.26 1.85c-.03.17-.18.3-.35.3h-2.8c-.17 0-.32-.13-.35-.29l-.26-1.85c-.43-.18-.82-.41-1.18-.69l-1.74.7c-.16.06-.34 0-.43-.15l-1.4-2.42c-.09-.15-.05-.34.08-.45l1.48-1.16c-.03-.23-.05-.46-.05-.69 0-.23.02-.46.05-.68l-1.48-1.16c-.13-.11-.17-.3-.08-.45l1.4-2.42c.09-.15.27-.21.43-.15l1.74.7c.36-.28.76-.51 1.18-.69l.26-1.85c.03-.17.18-.3.35-.3h2.8c.17 0 .32.13.35.29l.26 1.85c.43.18.82.41 1.18.69l1.74-.7c.16-.06.34 0 .43.15l1.4 2.42c.09.15.05.34-.08.45l-1.48 1.16c.03.23.05.46.05.69z"}),"SettingsApplications"),default_1$b=SettingsApplications.default=_default$b,Delete={},_interopRequireDefault$a=interopRequireDefault.exports,default_1$a=(Object.defineProperty(Delete,"__esModule",{value:!0}),Delete.default=void 0),_createSvgIcon$a=_interopRequireDefault$a(createSvgIcon$1),_jsxRuntime$a=jsxRuntime.exports,_default$a=(0,_createSvgIcon$a.default)((0,_jsxRuntime$a.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete"),default_1$a=Delete.default=_default$a,Help$1={},_interopRequireDefault$9=interopRequireDefault.exports,default_1$9=(Object.defineProperty(Help$1,"__esModule",{value:!0}),Help$1.default=void 0),_createSvgIcon$9=_interopRequireDefault$9(createSvgIcon$1),_jsxRuntime$9=jsxRuntime.exports,_default$9=(0,_createSvgIcon$9.default)((0,_jsxRuntime$9.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}),"Help"),default_1$9=Help$1.default=_default$9,objectProto=Object.prototype,hasOwnProperty$3=objectProto.hasOwnProperty;function baseHas$1(e,t){return null!=e&&hasOwnProperty$3.call(e,t)}var _baseHas=baseHas$1,baseHas=baseHas$1,hasPath=_hasPath;function has$1(e,t){return null!=e&&hasPath(e,t,baseHas)}var has_1=has$1;const protocols=["http","https","mailto","tel"];function uriTransformer(e){var t=(e||"").trim(),e=t.charAt(0);if("#"===e||"/"===e)return t;var n=t.indexOf(":");if(-1===n)return t;let r=-1;for(;++r<protocols.length;){var i=protocols[r];if(n===i.length&&t.slice(0,i.length).toLowerCase()===i)return t}return-1!==(r=t.indexOf("?"))&&n>r||-1!==(r=t.indexOf("#"))&&n>r?t:"javascript:void(0)"}var isBuffer=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)};function stringifyPosition$2(e){return e&&"object"==typeof e?"position"in e||"type"in e?position$3(e.position):"start"in e||"end"in e?position$3(e):"line"in e||"column"in e?point$4(e):"":""}function point$4(e){return index$4(e&&e.line)+":"+index$4(e&&e.column)}function position$3(e){return point$4(e&&e.start)+"-"+point$4(e&&e.end)}function index$4(e){return e&&"number"==typeof e?e:1}class VFileMessage$1 extends Error{constructor(e,t,n){var r,i=[null,null];let o={start:{line:null,column:null},end:{line:null,column:null}};super(),"string"==typeof t&&(n=t,t=void 0),"string"==typeof n&&(-1===(r=n.indexOf(":"))?i[1]=n:(i[0]=n.slice(0,r),i[1]=n.slice(r+1))),t&&("type"in t||"position"in t?t.position&&(o=t.position):"start"in t||"end"in t?o=t:("line"in t||"column"in t)&&(o.start=t)),this.name=stringifyPosition$2(t)||"1:1",this.message="object"==typeof e?e.message:e,this.stack="","object"==typeof e&&e.stack&&(this.stack=e.stack),this.reason=this.message,this.fatal,this.line=o.start.line,this.column=o.start.column,this.position=o,this.source=i[0],this.ruleId=i[1],this.file,this.actual,this.expected,this.url,this.note}}VFileMessage$1.prototype.file="",VFileMessage$1.prototype.name="",VFileMessage$1.prototype.reason="",VFileMessage$1.prototype.message="",VFileMessage$1.prototype.stack="",VFileMessage$1.prototype.fatal=null,VFileMessage$1.prototype.column=null,VFileMessage$1.prototype.line=null,VFileMessage$1.prototype.source=null,VFileMessage$1.prototype.ruleId=null,VFileMessage$1.prototype.position=null;const path$1={basename:basename$1,dirname:dirname$1,extname:extname$1,join:join$1,sep:"/"};function basename$1(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');assertPath$3(e);let n=0,r=-1,i=e.length,o;if(void 0===t||0===t.length||t.length>e.length){for(;i--;)if(47===e.charCodeAt(i)){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;i--;)if(47===e.charCodeAt(i)){if(o){n=i+1;break}}else a<0&&(o=!0,a=i+1),-1<s&&(e.charCodeAt(i)===t.charCodeAt(s--)?s<0&&(r=i):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function dirname$1(e){if(assertPath$3(e),0===e.length)return".";let t=-1,n=e.length,r;for(;--n;)if(47===e.charCodeAt(n)){if(r){t=n;break}}else r=r||!0;return t<0?47===e.charCodeAt(0)?"/":".":1===t&&47===e.charCodeAt(0)?"//":e.slice(0,t)}function extname$1(e){assertPath$3(e);let t=e.length,n=-1,r=0,i=-1,o=0,a;for(;t--;){var s=e.charCodeAt(t);if(47===s){if(a){r=t+1;break}}else n<0&&(a=!0,n=t+1),46===s?i<0?i=t:1!==o&&(o=1):-1<i&&(o=-1)}return i<0||n<0||0===o||1===o&&i===n-1&&i===r+1?"":e.slice(i,n)}function join$1(...e){let t=-1,n;for(;++t<e.length;)assertPath$3(e[t]),e[t]&&(n=void 0===n?e[t]:n+"/"+e[t]);return void 0===n?".":normalize$3(n)}function normalize$3(e){assertPath$3(e);var t=47===e.charCodeAt(0);let n=normalizeString$1(e,!t);return 0<(n=0!==n.length||t?n:".").length&&47===e.charCodeAt(e.length-1)&&(n+="/"),t?"/"+n:n}function normalizeString$1(e,t){let n="",r=0,i=-1,o=0,a=-1,s;for(var l;++a<=e.length;){if(a<e.length)s=e.charCodeAt(a);else{if(47===s)break;s=47}if(47===s){if(i!==a-1&&1!==o)if(i!==a-1&&2===o){if(n.length<2||2!==r||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(2<n.length){if((l=n.lastIndexOf("/"))!==n.length-1){r=l<0?(n="",0):(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),i=a,o=0;continue}}else if(0<n.length){n="",r=0,i=a,o=0;continue}t&&(n=0<n.length?n+"/..":"..",r=2)}else 0<n.length?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,o=0}else 46===s&&-1<o?o++:o=-1}return n}function assertPath$3(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const proc$1={cwd:cwd$1};function cwd$1(){return"/"}function isUrl$1(e){return null!==e&&"object"==typeof e&&e.href&&e.origin}function urlToPath$1(e){var t;if("string"==typeof e)e=new URL(e);else if(!isUrl$1(e))throw(t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`")).code="ERR_INVALID_ARG_TYPE",t;if("file:"!==e.protocol)throw(t=new TypeError("The URL must be of scheme file")).code="ERR_INVALID_URL_SCHEME",t;return getPathFromURLPosix$1(e)}function getPathFromURLPosix$1(e){var t;if(""!==e.hostname)throw(t=new TypeError('File URL host must be "localhost" or empty on darwin')).code="ERR_INVALID_FILE_URL_HOST",t;var n=e.pathname;let r=-1;for(;++r<n.length;)if(37===n.charCodeAt(r)&&50===n.charCodeAt(r+1)){var i=n.charCodeAt(r+2);if(70===i||102===i)throw(i=new TypeError("File URL path must not include encoded / characters")).code="ERR_INVALID_FILE_URL_PATH",i}return decodeURIComponent(n)}const order$1=["history","path","basename","stem","extname","dirname"];class VFile$1{constructor(e){let t,n=(t=e?"string"==typeof e||buffer$1(e)?{value:e}:isUrl$1(e)?{path:e}:e:{},this.data={},this.messages=[],this.history=[],this.cwd=proc$1.cwd(),this.value,this.stored,this.result,this.map,-1);for(;++n<order$1.length;){const r=order$1[n];r in t&&void 0!==t[r]&&null!==t[r]&&(this[r]="history"===r?[...t[r]]:t[r])}let r;for(r in t)order$1.includes(r)||(this[r]=t[r])}get path(){return this.history[this.history.length-1]}set path(e){assertNonEmpty$1(e=isUrl$1(e)?urlToPath$1(e):e,"path"),this.path!==e&&this.history.push(e)}get dirname(){return"string"==typeof this.path?path$1.dirname(this.path):void 0}set dirname(e){assertPath$2(this.basename,"dirname"),this.path=path$1.join(e||"",this.basename)}get basename(){return"string"==typeof this.path?path$1.basename(this.path):void 0}set basename(e){assertNonEmpty$1(e,"basename"),assertPart$1(e,"basename"),this.path=path$1.join(this.dirname||"",e)}get extname(){return"string"==typeof this.path?path$1.extname(this.path):void 0}set extname(e){if(assertPart$1(e,"extname"),assertPath$2(this.dirname,"extname"),e){if(46!==e.charCodeAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=path$1.join(this.dirname,this.stem+(e||""))}get stem(){return"string"==typeof this.path?path$1.basename(this.path,this.extname):void 0}set stem(e){assertNonEmpty$1(e,"stem"),assertPart$1(e,"stem"),this.path=path$1.join(this.dirname||"",e+(this.extname||""))}toString(e){return(this.value||"").toString(e||void 0)}message(e,t,n){e=new VFileMessage$1(e,t,n);return this.path&&(e.name=this.path+":"+e.name,e.file=this.path),e.fatal=!1,this.messages.push(e),e}info(e,t,n){e=this.message(e,t,n);return e.fatal=null,e}fail(e,t,n){e=this.message(e,t,n);throw e.fatal=!0,e}}function assertPart$1(e,t){if(e&&e.includes(path$1.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+path$1.sep+"`")}function assertNonEmpty$1(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function assertPath$2(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function buffer$1(e){return isBuffer(e)}function bail(e){if(e)throw e}var hasOwn$a=Object.prototype.hasOwnProperty,toStr=Object.prototype.toString,defineProperty$6=Object.defineProperty,gOPD=Object.getOwnPropertyDescriptor,isArray=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===toStr.call(e)},isPlainObject$2=function(e){if(!e||"[object Object]"!==toStr.call(e))return!1;var t,n=hasOwn$a.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&hasOwn$a.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||hasOwn$a.call(e,t)},setProperty=function(e,t){defineProperty$6&&"__proto__"===t.name?defineProperty$6(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},getProperty=function(e,t){if("__proto__"===t){if(!hasOwn$a.call(e,t))return;if(gOPD)return gOPD(e,t).value}return e[t]},extend=function e(){var t,n,r,i,o,a=arguments[0],s=1,l=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[1]||{},s=2),(null==a||"object"!=typeof a&&"function"!=typeof a)&&(a={});s<l;++s)if(null!=(t=arguments[s]))for(n in t)o=getProperty(a,n),a!==(r=getProperty(t,n))&&(c&&r&&(isPlainObject$2(r)||(i=isArray(r)))?(o=i?(i=!1,o&&isArray(o)?o:[]):o&&isPlainObject$2(o)?o:{},setProperty(a,{name:n,newValue:e(c,o,r)})):void 0!==r&&setProperty(a,{name:n,newValue:r}));return a};function isPlainObject$1(e){var t;return"object"==typeof e&&null!==e&&!(null!==(t=Object.getPrototypeOf(e))&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function trough(){const l=[],t={run:function(...o){let a=-1;const s=o.pop();if("function"!=typeof s)throw new TypeError("Expected function as last argument, not "+s);!function e(t,...n){var r=l[++a];let i=-1;if(t)s(t);else{for(;++i<o.length;)null!==n[i]&&void 0!==n[i]||(n[i]=o[i]);o=n,r?wrap$1(r,e)(...n):s(null,...n)}}(null,...o)},use:function(e){if("function"==typeof e)return l.push(e),t;throw new TypeError("Expected `middelware` to be a function, not "+e)}};return t}function wrap$1(r,n){let i;return function(...t){var n=r.length>t.length;let e;n&&t.push(o);try{e=r.apply(this,t)}catch(e){t=e;if(n&&i)throw t;return o(t)}n||(e instanceof Promise?e.then(a,o):(e instanceof Error?o:a)(e))};function o(e,...t){i||(i=!0,n(e,...t))}function a(e){o(null,e)}}function stringifyPosition$1(e){return e&&"object"==typeof e?"position"in e||"type"in e?position$2(e.position):"start"in e||"end"in e?position$2(e):"line"in e||"column"in e?point$3(e):"":""}function point$3(e){return index$3(e&&e.line)+":"+index$3(e&&e.column)}function position$2(e){return point$3(e&&e.start)+"-"+point$3(e&&e.end)}function index$3(e){return e&&"number"==typeof e?e:1}class VFileMessage extends Error{constructor(e,t,n){var r,i=[null,null];let o={start:{line:null,column:null},end:{line:null,column:null}};super(),"string"==typeof t&&(n=t,t=void 0),"string"==typeof n&&(-1===(r=n.indexOf(":"))?i[1]=n:(i[0]=n.slice(0,r),i[1]=n.slice(r+1))),t&&("type"in t||"position"in t?t.position&&(o=t.position):"start"in t||"end"in t?o=t:("line"in t||"column"in t)&&(o.start=t)),this.name=stringifyPosition$1(t)||"1:1",this.message="object"==typeof e?e.message:e,this.stack="","object"==typeof e&&e.stack&&(this.stack=e.stack),this.reason=this.message,this.fatal,this.line=o.start.line,this.column=o.start.column,this.position=o,this.source=i[0],this.ruleId=i[1],this.file,this.actual,this.expected,this.url,this.note}}VFileMessage.prototype.file="",VFileMessage.prototype.name="",VFileMessage.prototype.reason="",VFileMessage.prototype.message="",VFileMessage.prototype.stack="",VFileMessage.prototype.fatal=null,VFileMessage.prototype.column=null,VFileMessage.prototype.line=null,VFileMessage.prototype.source=null,VFileMessage.prototype.ruleId=null,VFileMessage.prototype.position=null;const path={basename:basename,dirname:dirname,extname:extname,join:join,sep:"/"};function basename(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');assertPath$1(e);let n=0,r=-1,i=e.length,o;if(void 0===t||0===t.length||t.length>e.length){for(;i--;)if(47===e.charCodeAt(i)){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;i--;)if(47===e.charCodeAt(i)){if(o){n=i+1;break}}else a<0&&(o=!0,a=i+1),-1<s&&(e.charCodeAt(i)===t.charCodeAt(s--)?s<0&&(r=i):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function dirname(e){if(assertPath$1(e),0===e.length)return".";let t=-1,n=e.length,r;for(;--n;)if(47===e.charCodeAt(n)){if(r){t=n;break}}else r=r||!0;return t<0?47===e.charCodeAt(0)?"/":".":1===t&&47===e.charCodeAt(0)?"//":e.slice(0,t)}function extname(e){assertPath$1(e);let t=e.length,n=-1,r=0,i=-1,o=0,a;for(;t--;){var s=e.charCodeAt(t);if(47===s){if(a){r=t+1;break}}else n<0&&(a=!0,n=t+1),46===s?i<0?i=t:1!==o&&(o=1):-1<i&&(o=-1)}return i<0||n<0||0===o||1===o&&i===n-1&&i===r+1?"":e.slice(i,n)}function join(...e){let t=-1,n;for(;++t<e.length;)assertPath$1(e[t]),e[t]&&(n=void 0===n?e[t]:n+"/"+e[t]);return void 0===n?".":normalize$2(n)}function normalize$2(e){assertPath$1(e);var t=47===e.charCodeAt(0);let n=normalizeString(e,!t);return 0<(n=0!==n.length||t?n:".").length&&47===e.charCodeAt(e.length-1)&&(n+="/"),t?"/"+n:n}function normalizeString(e,t){let n="",r=0,i=-1,o=0,a=-1,s;for(var l;++a<=e.length;){if(a<e.length)s=e.charCodeAt(a);else{if(47===s)break;s=47}if(47===s){if(i!==a-1&&1!==o)if(i!==a-1&&2===o){if(n.length<2||2!==r||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(2<n.length){if((l=n.lastIndexOf("/"))!==n.length-1){r=l<0?(n="",0):(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),i=a,o=0;continue}}else if(0<n.length){n="",r=0,i=a,o=0;continue}t&&(n=0<n.length?n+"/..":"..",r=2)}else 0<n.length?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,o=0}else 46===s&&-1<o?o++:o=-1}return n}function assertPath$1(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const proc={cwd:cwd};function cwd(){return"/"}function isUrl(e){return null!==e&&"object"==typeof e&&e.href&&e.origin}function urlToPath(e){var t;if("string"==typeof e)e=new URL(e);else if(!isUrl(e))throw(t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`")).code="ERR_INVALID_ARG_TYPE",t;if("file:"!==e.protocol)throw(t=new TypeError("The URL must be of scheme file")).code="ERR_INVALID_URL_SCHEME",t;return getPathFromURLPosix(e)}function getPathFromURLPosix(e){var t;if(""!==e.hostname)throw(t=new TypeError('File URL host must be "localhost" or empty on darwin')).code="ERR_INVALID_FILE_URL_HOST",t;var n=e.pathname;let r=-1;for(;++r<n.length;)if(37===n.charCodeAt(r)&&50===n.charCodeAt(r+1)){var i=n.charCodeAt(r+2);if(70===i||102===i)throw(i=new TypeError("File URL path must not include encoded / characters")).code="ERR_INVALID_FILE_URL_PATH",i}return decodeURIComponent(n)}const order=["history","path","basename","stem","extname","dirname"];class VFile{constructor(e){let t,n=(t=e?"string"==typeof e||buffer(e)?{value:e}:isUrl(e)?{path:e}:e:{},this.data={},this.messages=[],this.history=[],this.cwd=proc.cwd(),this.value,this.stored,this.result,this.map,-1);for(;++n<order.length;){const r=order[n];r in t&&void 0!==t[r]&&null!==t[r]&&(this[r]="history"===r?[...t[r]]:t[r])}let r;for(r in t)order.includes(r)||(this[r]=t[r])}get path(){return this.history[this.history.length-1]}set path(e){assertNonEmpty(e=isUrl(e)?urlToPath(e):e,"path"),this.path!==e&&this.history.push(e)}get dirname(){return"string"==typeof this.path?path.dirname(this.path):void 0}set dirname(e){assertPath(this.basename,"dirname"),this.path=path.join(e||"",this.basename)}get basename(){return"string"==typeof this.path?path.basename(this.path):void 0}set basename(e){assertNonEmpty(e,"basename"),assertPart(e,"basename"),this.path=path.join(this.dirname||"",e)}get extname(){return"string"==typeof this.path?path.extname(this.path):void 0}set extname(e){if(assertPart(e,"extname"),assertPath(this.dirname,"extname"),e){if(46!==e.charCodeAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=path.join(this.dirname,this.stem+(e||""))}get stem(){return"string"==typeof this.path?path.basename(this.path,this.extname):void 0}set stem(e){assertNonEmpty(e,"stem"),assertPart(e,"stem"),this.path=path.join(this.dirname||"",e+(this.extname||""))}toString(e){return(this.value||"").toString(e||void 0)}message(e,t,n){e=new VFileMessage(e,t,n);return this.path&&(e.name=this.path+":"+e.name,e.file=this.path),e.fatal=!1,this.messages.push(e),e}info(e,t,n){e=this.message(e,t,n);return e.fatal=null,e}fail(e,t,n){e=this.message(e,t,n);throw e.fatal=!0,e}}function assertPart(e,t){if(e&&e.includes(path.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+path.sep+"`")}function assertNonEmpty(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function assertPath(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function buffer(e){return isBuffer(e)}const unified=base().freeze(),own$7={}.hasOwnProperty;function base(){const n=trough(),i=[];let o={},l,r=-1;return c.data=function(e,t){if("string"==typeof e)return 2===arguments.length?(assertUnfrozen("data",l),o[e]=t,c):own$7.call(o,e)&&o[e]||null;if(e)return assertUnfrozen("data",l),o=e,c;return o},c.Parser=void 0,c.Compiler=void 0,c.freeze=function(){if(!l){for(;++r<i.length;){var[e,...t]=i[r];!1!==t[0]&&(!0===t[0]&&(t[0]=void 0),"function"==typeof(e=e.call(c,...t)))&&n.use(e)}l=!0,r=Number.POSITIVE_INFINITY}return c},c.attachers=i,c.use=function(e,...t){let n;if(assertUnfrozen("use",l),null!=e)if("function"==typeof e)s(e,...t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");(Array.isArray(e)?r:a)(e)}n&&(o.settings=Object.assign(o.settings||{},n));return c;function a(e){r(e.plugins),e.settings&&(n=Object.assign(n||{},e.settings))}function r(e){let t=-1;if(null!=e){if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){var n,r,i=e[t],o=(r=n=o=void 0,i);if("function"==typeof o)s(o);else{if("object"!=typeof o)throw new TypeError("Expected usable value, not `"+o+"`");Array.isArray(o)?([n,...r]=o,s(n,...r)):a(o)}}}}function s(e,t){let n=-1,r;for(;++n<i.length;)if(i[n][0]===e){r=i[n];break}r?(isPlainObject$1(r[1])&&isPlainObject$1(t)&&(t=extend(!0,r[1],t)),r[1]=t):i.push([...arguments])}},c.parse=function(e){c.freeze();var e=vfile(e),t=c.Parser;if(assertParser("parse",t),newable(t,"parse"))return new t(String(e),e).parse();return t(String(e),e)},c.stringify=function(e,t){c.freeze();var t=vfile(t),n=c.Compiler;if(assertCompiler("stringify",n),assertNode(e),newable(n,"compile"))return new n(e,t).compile();return n(e,t)},c.run=function(o,e,a){assertNode(o),c.freeze(),a||"function"!=typeof e||(a=e,e=void 0);if(!a)return new Promise(t);function t(r,i){n.run(o,vfile(e),function(e,t,n){t=t||o,e?i(e):r?r(t):a(null,t,n)})}t(null,a)},c.runSync=function(e,t){let n,r;return c.run(e,t,function(e,t){bail(e),n=t,r=!0}),assertDone("runSync","run",r),n},c.process=function(t,o){if(c.freeze(),assertParser("process",c.Parser),assertCompiler("process",c.Compiler),!o)return new Promise(e);function e(n,r){var e=vfile(t);function i(e,t){e||!t?r(e):n?n(t):o(null,t)}c.run(c.parse(e),e,(e,t,n)=>{!e&&t&&n?(null!=(t=c.stringify(t,n))&&(looksLikeAVFileValue(t)?n.value=t:n.result=t),i(e,n)):i(e)})}e(null,o)},c.processSync=function(e){let t;c.freeze(),assertParser("processSync",c.Parser),assertCompiler("processSync",c.Compiler);e=vfile(e);return c.process(e,function(e){t=!0,bail(e)}),assertDone("processSync","process",t),e},c;function c(){var e=base();let t=-1;for(;++t<i.length;)e.use(...i[t]);return e.data(extend(!0,{},o)),e}}function newable(e,t){return"function"==typeof e&&e.prototype&&(keys$2(e.prototype)||t in e.prototype)}function keys$2(e){let t;for(t in e)if(own$7.call(e,t))return!0;return!1}function assertParser(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Parser`")}function assertCompiler(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Compiler`")}function assertUnfrozen(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function assertNode(e){if(!isPlainObject$1(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function assertDone(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function vfile(e){return looksLikeAVFile(e)?e:new VFile(e)}function looksLikeAVFile(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}function looksLikeAVFileValue(e){return"string"==typeof e||isBuffer(e)}function toString$4(e,t){t=(t||{}).includeImageAlt;return one$1(e,"boolean"!=typeof t||t)}function one$1(e,t){return node$1(e)&&("value"in e&&e.value||t&&"alt"in e&&e.alt||"children"in e&&all$1(e.children,t))||Array.isArray(e)&&all$1(e,t)||""}function all$1(e,t){var n=[];let r=-1;for(;++r<e.length;)n[r]=one$1(e[r],t);return n.join("")}function node$1(e){return Boolean(e&&"object"==typeof e)}function splice(e,t,n,r){var i=e.length;let o=0,a;if(t=t<0?i<-t?0:i+t:i<t?i:t,n=0<n?n:0,r.length<1e4)(a=Array.from(r)).unshift(t,n),[].splice.apply(e,a);else for(n&&[].splice.apply(e,[t,n]);o<r.length;)(a=r.slice(o,o+1e4)).unshift(t,0),[].splice.apply(e,a),o+=1e4,t+=1e4}function push$1(e,t){return 0<e.length?(splice(e,e.length,0,t),e):t}const hasOwnProperty$2={}.hasOwnProperty;function combineExtensions(e){var t={};let n=-1;for(;++n<e.length;)syntaxExtension(t,e[n]);return t}function syntaxExtension(t,n){let r;for(r in n){var i=(hasOwnProperty$2.call(t,r)?t[r]:void 0)||(t[r]={}),o=n[r];let e;for(e in o){hasOwnProperty$2.call(i,e)||(i[e]=[]);var a=o[e];constructs(i[e],Array.isArray(a)?a:a?[a]:[])}}}function constructs(e,t){let n=-1;for(var r=[];++n<t.length;)("after"===t[n].add?e:r).push(t[n]);splice(e,0,0,r)}const unicodePunctuationRegex=/[!-/:-@[-`{-~\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,asciiAlpha=regexCheck(/[A-Za-z]/),asciiDigit=regexCheck(/\d/),asciiHexDigit=regexCheck(/[\dA-Fa-f]/),asciiAlphanumeric=regexCheck(/[\dA-Za-z]/),asciiPunctuation=regexCheck(/[!-/:-@[-`{-~]/),asciiAtext=regexCheck(/[#-'*+\--9=?A-Z^-~]/);function asciiControl(e){return null!==e&&(e<32||127===e)}function markdownLineEndingOrSpace(e){return null!==e&&(e<0||32===e)}function markdownLineEnding(e){return null!==e&&e<-2}function markdownSpace(e){return-2===e||-1===e||32===e}const unicodeWhitespace=regexCheck(/\s/),unicodePunctuation=regexCheck(unicodePunctuationRegex);function regexCheck(t){return function(e){return null!==e&&t.test(String.fromCharCode(e))}}function factorySpace(t,n,r,e){const i=e?e-1:Number.POSITIVE_INFINITY;let o=0;return function(e){if(markdownSpace(e))return t.enter(r),a(e);return n(e)};function a(e){return markdownSpace(e)&&o++<i?(t.consume(e),a):(t.exit(r),n(e))}}const content$1={tokenize:initializeContent};function initializeContent(n){const t=n.attempt(this.parser.constructs.contentInitial,function(e){if(null!==e)return n.enter("lineEnding"),n.consume(e),n.exit("lineEnding"),factorySpace(n,t,"linePrefix");n.consume(e)},function(e){return n.enter("paragraph"),i(e)});let r;return t;function i(e){var t=n.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=t),r=t,o(e)}function o(e){if(null!==e)return markdownLineEnding(e)?(n.consume(e),n.exit("chunkText"),i):(n.consume(e),o);n.exit("chunkText"),n.exit("paragraph"),n.consume(e)}}const document$5={tokenize:initializeDocument},containerConstruct={tokenize:tokenizeContainer};function initializeDocument(r){const o=this,i=[];let a=0,s,n,l;return t;function t(e){var t;return(a<i.length?(t=i[a],o.containerState=t[1],r.attempt(t[0].continuation,c,u)):u)(e)}function c(r){if(a++,o.containerState._closeFlow){o.containerState._closeFlow=void 0,s&&x();var i=o.events.length;let e=i,t;for(;e--;)if("exit"===o.events[e][0]&&"chunkFlow"===o.events[e][1].type){t=o.events[e][1].end;break}v(a);let n=i;for(;n<o.events.length;)o.events[n][1].end=Object.assign({},t),n++;return splice(o.events,e+1,0,o.events.slice(i)),o.events.length=n,u(r)}return t(r)}function u(e){if(a===i.length){if(!s)return f(e);if(s.currentConstruct&&s.currentConstruct.concrete)return m(e);o.interrupt=Boolean(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return o.containerState={},r.check(containerConstruct,d,p)(e)}function d(e){return s&&x(),v(a),f(e)}function p(e){return o.parser.lazy[o.now().line]=a!==i.length,l=o.now().offset,m(e)}function f(e){return o.containerState={},r.attempt(containerConstruct,h,m)(e)}function h(e){return a++,i.push([o.currentConstruct,o.containerState]),f(e)}function m(e){if(null!==e)return s=s||o.parser.flow(o.now()),r.enter("chunkFlow",{contentType:"flow",previous:n,_tokenizer:s}),g(e);s&&x(),v(0),r.consume(e)}function g(e){if(null!==e)return markdownLineEnding(e)?(r.consume(e),y(r.exit("chunkFlow")),a=0,o.interrupt=void 0,t):(r.consume(e),g);y(r.exit("chunkFlow"),!0),v(0),r.consume(e)}function y(e,i){var t=o.sliceStream(e);if(i&&t.push(null),(e.previous=n)&&(n.next=e),n=e,s.defineSkip(e.start),s.write(t),o.parser.lazy[e.start.line]){let e=s.events.length;for(;e--;)if(s.events[e][1].start.offset<l&&(!s.events[e][1].end||s.events[e][1].end.offset>l))return;i=o.events.length;let t=i,n,r;for(;t--;)if("exit"===o.events[t][0]&&"chunkFlow"===o.events[t][1].type){if(n){r=o.events[t][1].end;break}n=!0}for(v(a),e=i;e<o.events.length;)o.events[e][1].end=Object.assign({},r),e++;splice(o.events,t+1,0,o.events.slice(i)),o.events.length=e}}function v(e){let t=i.length;for(;t-- >e;){var n=i[t];o.containerState=n[1],n[0].exit.call(o,r)}i.length=e}function x(){s.write([null]),n=void 0,s=void 0,o.containerState._closeFlow=void 0}}function tokenizeContainer(e,t,n){return factorySpace(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function classifyCharacter(e){return null===e||markdownLineEndingOrSpace(e)||unicodeWhitespace(e)?1:unicodePunctuation(e)?2:void 0}function resolveAll(e,t,n){var r=[];let i=-1;for(;++i<e.length;){var o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const attention={name:"attention",tokenize:tokenizeAttention,resolveAll:resolveAllAttention};function resolveAllAttention(e,t){let n=-1,r;var i;let o,a;for(;++n<e.length;)if("enter"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._close)for(r=n;r--;)if("exit"===e[r][0]&&"attentionSequence"===e[r][1].type&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)&&(!((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3)||(e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3)){var s=1<e[r][1].end.offset-e[r][1].start.offset&&1<e[n][1].end.offset-e[n][1].start.offset?2:1,l=Object.assign({},e[r][1].end),c=Object.assign({},e[n][1].start);movePoint(l,-s),movePoint(c,s),l={type:1<s?"strongSequence":"emphasisSequence",start:l,end:Object.assign({},e[r][1].end)},c={type:1<s?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:c},i={type:1<s?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},s={type:1<s?"strong":"emphasis",start:Object.assign({},l.start),end:Object.assign({},c.end)},e[r][1].end=Object.assign({},l.start),e[n][1].start=Object.assign({},c.end),o=[],e[r][1].end.offset-e[r][1].start.offset&&(o=push$1(o,[["enter",e[r][1],t],["exit",e[r][1],t]])),o=push$1(o,[["enter",s,t],["enter",l,t],["exit",l,t],["enter",i,t]]),o=push$1(o,resolveAll(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),o=push$1(o,[["exit",i,t],["enter",c,t],["exit",c,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(a=2,o=push$1(o,[["enter",e[n][1],t],["exit",e[n][1],t]])):a=0,splice(e,r-1,n-r+3,o),n=r+o.length-a-2;break}for(n=-1;++n<e.length;)"attentionSequence"===e[n][1].type&&(e[n][1].type="data");return e}function tokenizeAttention(o,a){const s=this.parser.constructs.attentionMarkers.null,l=this.previous,c=classifyCharacter(l);let u;return function(e){return o.enter("attentionSequence"),d(u=e)};function d(e){var t,n,r,i;return e===u?(o.consume(e),d):(t=o.exit("attentionSequence"),r=!(n=classifyCharacter(e))||2===n&&c||s.includes(e),i=!c||2===c&&n||s.includes(l),t._open=Boolean(42===u?r:r&&(c||!i)),t._close=Boolean(42===u?i:i&&(n||!r)),a(e))}}function movePoint(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const autolink={name:"autolink",tokenize:tokenizeAutolink};function tokenizeAutolink(t,n,r){let i=1;return function(e){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(e),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),o};function o(e){return asciiAlpha(e)?(t.consume(e),a):(asciiAtext(e)?c:r)(e)}function a(e){return(43===e||45===e||46===e||asciiAlphanumeric(e)?s:c)(e)}function s(e){return 58===e?(t.consume(e),l):(43===e||45===e||46===e||asciiAlphanumeric(e))&&i++<32?(t.consume(e),s):c(e)}function l(e){return 62===e?(t.exit("autolinkProtocol"),f(e)):null===e||32===e||60===e||asciiControl(e)?r(e):(t.consume(e),l)}function c(e){return 64===e?(t.consume(e),i=0,u):asciiAtext(e)?(t.consume(e),c):r(e)}function u(e){return(asciiAlphanumeric(e)?d:r)(e)}function d(e){return 46===e?(t.consume(e),i=0,u):(62===e?(t.exit("autolinkProtocol").type="autolinkEmail",f):p)(e)}function p(e){return(45===e||asciiAlphanumeric(e))&&i++<63?(t.consume(e),45===e?p:d):r(e)}function f(e){return t.enter("autolinkMarker"),t.consume(e),t.exit("autolinkMarker"),t.exit("autolink"),n}}const blankLine={tokenize:tokenizeBlankLine,partial:!0};function tokenizeBlankLine(e,t,n){return factorySpace(e,function(e){return(null===e||markdownLineEnding(e)?t:n)(e)},"linePrefix")}const blockQuote={name:"blockQuote",tokenize:tokenizeBlockQuoteStart,continuation:{tokenize:tokenizeBlockQuoteContinuation},exit:exit};function tokenizeBlockQuoteStart(n,t,r){const i=this;return function(e){if(62!==e)return r(e);{var t=i.containerState;return t.open||(n.enter("blockQuote",{_container:!0}),t.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(e),n.exit("blockQuoteMarker"),o}};function o(e){return markdownSpace(e)?(n.enter("blockQuotePrefixWhitespace"),n.consume(e),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),t):(n.exit("blockQuotePrefix"),t(e))}}function tokenizeBlockQuoteContinuation(e,t,n){return factorySpace(e,e.attempt(blockQuote,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function exit(e){e.exit("blockQuote")}const characterEscape={name:"characterEscape",tokenize:tokenizeCharacterEscape};function tokenizeCharacterEscape(t,n,r){return function(e){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(e),t.exit("escapeMarker"),i};function i(e){return asciiPunctuation(e)?(t.enter("characterEscapeValue"),t.consume(e),t.exit("characterEscapeValue"),t.exit("characterEscape"),n):r(e)}}const element=document.createElement("i");function decodeNamedCharacterReference(e){var t="&"+e+";",n=(element.innerHTML=t,element.textContent);return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}const characterReference={name:"characterReference",tokenize:tokenizeCharacterReference};function tokenizeCharacterReference(n,r,i){const o=this;let a=0,s,l;return function(e){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(e),n.exit("characterReferenceMarker"),t};function t(e){return 35===e?(n.enter("characterReferenceMarkerNumeric"),n.consume(e),n.exit("characterReferenceMarkerNumeric"),c):(n.enter("characterReferenceValue"),s=31,l=asciiAlphanumeric,u(e))}function c(e){return 88===e||120===e?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(e),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),s=6,l=asciiHexDigit,u):(n.enter("characterReferenceValue"),s=7,l=asciiDigit,u(e))}function u(e){var t;return 59===e&&a?(t=n.exit("characterReferenceValue"),l!==asciiAlphanumeric||decodeNamedCharacterReference(o.sliceSerialize(t))?(n.enter("characterReferenceMarker"),n.consume(e),n.exit("characterReferenceMarker"),n.exit("characterReference"),r):i(e)):l(e)&&a++<s?(n.consume(e),u):i(e)}}const codeFenced={name:"codeFenced",tokenize:tokenizeCodeFenced,concrete:!0};function tokenizeCodeFenced(t,n,r){const i=this,o={tokenize:function(t,n,r){let i=0;return factorySpace(t,function(e){return t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),o(e)},"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function o(e){return e===c?(t.consume(e),i++,o):(i<l?r:(t.exit("codeFencedFenceSequence"),factorySpace(t,a,"whitespace")))(e)}function a(e){return(null===e||markdownLineEnding(e)?(t.exit("codeFencedFence"),n):r)(e)}},partial:!0},a={tokenize:function(t,n,r){const i=this;return function(e){return t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),o};function o(e){return(i.parser.lazy[i.now().line]?r:n)(e)}},partial:!0};var e=this.events[this.events.length-1];const s=e&&"linePrefix"===e[1].type?e[2].sliceSerialize(e[1],!0).length:0;let l=0,c;return function(e){return t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),u(c=e)};function u(e){return e===c?(t.consume(e),l++,u):(t.exit("codeFencedFenceSequence"),(l<3?r:factorySpace(t,d,"whitespace"))(e))}function d(e){return(null===e||markdownLineEnding(e)?m:(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),p))(e)}function p(e){return null===e||markdownLineEndingOrSpace(e)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),factorySpace(t,f,"whitespace")(e)):96===e&&e===c?r(e):(t.consume(e),p)}function f(e){return(null===e||markdownLineEnding(e)?m:(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),h))(e)}function h(e){return null===e||markdownLineEnding(e)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),m(e)):96===e&&e===c?r(e):(t.consume(e),h)}function m(e){return t.exit("codeFencedFence"),(i.interrupt?n:g)(e)}function g(e){return(null===e?v:markdownLineEnding(e)?t.attempt(a,t.attempt(o,v,s?factorySpace(t,g,"linePrefix",s+1):g),v):(t.enter("codeFlowValue"),y))(e)}function y(e){return null===e||markdownLineEnding(e)?(t.exit("codeFlowValue"),g(e)):(t.consume(e),y)}function v(e){return t.exit("codeFenced"),n(e)}}const codeIndented={name:"codeIndented",tokenize:tokenizeCodeIndented},indentedContent={tokenize:tokenizeIndentedContent,partial:!0};function tokenizeCodeIndented(t,n,r){const i=this;return function(e){return t.enter("codeIndented"),factorySpace(t,o,"linePrefix",5)(e)};function o(e){var t=i.events[i.events.length-1];return(t&&"linePrefix"===t[1].type&&4<=t[2].sliceSerialize(t[1],!0).length?a:r)(e)}function a(e){return(null===e?l:markdownLineEnding(e)?t.attempt(indentedContent,a,l):(t.enter("codeFlowValue"),s))(e)}function s(e){return null===e||markdownLineEnding(e)?(t.exit("codeFlowValue"),a(e)):(t.consume(e),s)}function l(e){return t.exit("codeIndented"),n(e)}}function tokenizeIndentedContent(t,n,r){const i=this;return o;function o(e){return i.parser.lazy[i.now().line]?r(e):markdownLineEnding(e)?(t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),o):factorySpace(t,a,"linePrefix",5)(e)}function a(e){var t=i.events[i.events.length-1];return(t&&"linePrefix"===t[1].type&&4<=t[2].sliceSerialize(t[1],!0).length?n:markdownLineEnding(e)?o:r)(e)}}const codeText={name:"codeText",tokenize:tokenizeCodeText,resolve:resolveCodeText,previous:previous};function resolveCodeText(e){let t=e.length-4,n=3,r,i;if(!("lineEnding"!==e[n][1].type&&"space"!==e[n][1].type||"lineEnding"!==e[t][1].type&&"space"!==e[t][1].type))for(r=n;++r<t;)if("codeTextData"===e[r][1].type){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}for(r=n-1,t++;++r<=t;)void 0===i?r!==t&&"lineEnding"!==e[r][1].type&&(i=r):r!==t&&"lineEnding"!==e[r][1].type||(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function previous(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}function tokenizeCodeText(t,n,r){let i=0,o,a;return function(e){return t.enter("codeText"),t.enter("codeTextSequence"),s(e)};function s(e){return 96===e?(t.consume(e),i++,s):(t.exit("codeTextSequence"),l(e))}function l(e){return null===e?r(e):96===e?(a=t.enter("codeTextSequence"),o=0,u(e)):32===e?(t.enter("space"),t.consume(e),t.exit("space"),l):markdownLineEnding(e)?(t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),l):(t.enter("codeTextData"),c(e))}function c(e){return null===e||32===e||96===e||markdownLineEnding(e)?(t.exit("codeTextData"),l(e)):(t.consume(e),c)}function u(e){return 96===e?(t.consume(e),o++,u):(o===i?(t.exit("codeTextSequence"),t.exit("codeText"),n):(a.type="codeTextData",c))(e)}}function subtokenize(e){var t,n,r,i,o={};let a=-1,s,l,c;for(;++a<e.length;){for(;a in o;)a=o[a];if(t=e[a],a&&"chunkFlow"===t[1].type&&"listItemPrefix"===e[a-1][1].type&&(i=t[1]._tokenizer.events,(l=0)<i.length&&"lineEndingBlank"===i[l][1].type&&(l+=2),l<i.length)&&"content"===i[l][1].type)for(;++l<i.length&&"content"!==i[l][1].type;)"chunkText"===i[l][1].type&&(i[l][1]._isInFirstContentOfListItem=!0,l++);if("enter"===t[0])t[1].contentType&&(Object.assign(o,subcontent(e,a)),a=o[a],c=!0);else if(t[1]._container){for(l=a,s=void 0;l--&&("lineEnding"===(n=e[l])[1].type||"lineEndingBlank"===n[1].type);)"enter"===n[0]&&(s&&(e[s][1].type="lineEndingBlank"),n[1].type="lineEnding",s=l);s&&(t[1].end=Object.assign({},e[s][1].start),(r=e.slice(s,a)).unshift(t),splice(e,s,a-s+1,r))}}return!c}function subcontent(e,t){var n=e[t][1],r=e[t][2];let i=t-1;var o,a=[],s=n._tokenizer||r.parser[n.contentType](n.start),l=s.events,c=[],u={};let d,p=-1,f=n,h=0,m=0;for(var g=[m];f;){for(;e[++i][1]!==f;);a.push(i),f._tokenizer||(o=r.sliceStream(f),f.next||o.push(null),d&&s.defineSkip(f.start),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(o),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=(d=f).next}for(f=n;++p<l.length;)"exit"===l[p][0]&&"enter"===l[p-1][0]&&l[p][1].type===l[p-1][1].type&&l[p][1].start.line!==l[p][1].end.line&&(m=p+1,g.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(s.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),p=g.length;p--;){var y=l.slice(g[p],g[p+1]);const m=a.pop();c.unshift([m,m+y.length-1]),splice(e,m,2,y)}for(p=-1;++p<c.length;)u[h+c[p][0]]=h+c[p][1],h+=c[p][1]-c[p][0]-1;return u}const content={tokenize:tokenizeContent,resolve:resolveContent},continuationConstruct={tokenize:tokenizeContinuation,partial:!0};function resolveContent(e){return subtokenize(e),e}function tokenizeContent(t,n){let r;return function(e){return t.enter("content"),r=t.enter("chunkContent",{contentType:"content"}),i(e)};function i(e){return null===e?o(e):markdownLineEnding(e)?t.check(continuationConstruct,a,o)(e):(t.consume(e),i)}function o(e){return t.exit("chunkContent"),t.exit("content"),n(e)}function a(e){return t.consume(e),t.exit("chunkContent"),r.next=t.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,i}}function tokenizeContinuation(n,r,i){const o=this;return function(e){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(e),n.exit("lineEnding"),factorySpace(n,t,"linePrefix")};function t(e){var t;return(null===e||markdownLineEnding(e)?i:(t=o.events[o.events.length-1],!o.parser.constructs.disable.null.includes("codeIndented")&&t&&"linePrefix"===t[1].type&&4<=t[2].sliceSerialize(t[1],!0).length?r:n.interrupt(o.parser.constructs.flow,i,r)))(e)}}function factoryDestination(t,n,r,i,o,a,s,l,e){const c=e||Number.POSITIVE_INFINITY;let u=0;return function(e){if(60===e)return t.enter(i),t.enter(o),t.enter(a),t.consume(e),t.exit(a),d;if(null===e||41===e||asciiControl(e))return r(e);return t.enter(i),t.enter(s),t.enter(l),t.enter("chunkString",{contentType:"string"}),h(e)};function d(e){return 62===e?(t.enter(a),t.consume(e),t.exit(a),t.exit(o),t.exit(i),n):(t.enter(l),t.enter("chunkString",{contentType:"string"}),p(e))}function p(e){return 62===e?(t.exit("chunkString"),t.exit(l),d(e)):null===e||60===e||markdownLineEnding(e)?r(e):(t.consume(e),92===e?f:p)}function f(e){return 60===e||62===e||92===e?(t.consume(e),p):p(e)}function h(e){return 40===e?++u>c?r(e):(t.consume(e),h):41===e?u--?(t.consume(e),h):(t.exit("chunkString"),t.exit(l),t.exit(s),t.exit(i),n(e)):null===e||markdownLineEndingOrSpace(e)?(u?r:(t.exit("chunkString"),t.exit(l),t.exit(s),t.exit(i),n))(e):asciiControl(e)?r(e):(t.consume(e),92===e?m:h)}function m(e){return 40===e||41===e||92===e?(t.consume(e),h):h(e)}}function factoryLabel(t,n,r,i,o,a){const s=this;let l=0,c;return function(e){return t.enter(i),t.enter(o),t.consume(e),t.exit(o),t.enter(a),u};function u(e){return null===e||91===e||93===e&&!c||94===e&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs||999<l?r(e):93===e?(t.exit(a),t.enter(o),t.consume(e),t.exit(o),t.exit(i),n):markdownLineEnding(e)?(t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),u):(t.enter("chunkString",{contentType:"string"}),d(e))}function d(e){return null===e||91===e||93===e||markdownLineEnding(e)||999<l++?(t.exit("chunkString"),u(e)):(t.consume(e),c=c||!markdownSpace(e),92===e?p:d)}function p(e){return 91===e||92===e||93===e?(t.consume(e),l++,d):d(e)}}function factoryTitle(t,n,r,i,o,a){let s;return function(e){return t.enter(i),t.enter(o),t.consume(e),t.exit(o),s=40===e?41:e,l};function l(e){return e===s?(t.enter(o),t.consume(e),t.exit(o),t.exit(i),n):(t.enter(a),c(e))}function c(e){return e===s?(t.exit(a),l(s)):null===e?r(e):markdownLineEnding(e)?(t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),factorySpace(t,c,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),u(e))}function u(e){return e===s||null===e||markdownLineEnding(e)?(t.exit("chunkString"),c(e)):(t.consume(e),92===e?d:u)}function d(e){return e===s||92===e?(t.consume(e),u):u(e)}}function factoryWhitespace(n,r){let i;return function e(t){if(markdownLineEnding(t))return n.enter("lineEnding"),n.consume(t),n.exit("lineEnding"),i=!0,e;if(markdownSpace(t))return factorySpace(n,e,i?"linePrefix":"lineSuffix")(t);return r(t)}}function normalizeIdentifier(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const definition={name:"definition",tokenize:tokenizeDefinition},titleConstruct={tokenize:tokenizeTitle,partial:!0};function tokenizeDefinition(t,n,r){const i=this;let o;return function(e){return t.enter("definition"),factoryLabel.call(i,t,a,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(e)};function a(e){return o=normalizeIdentifier(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),58===e?(t.enter("definitionMarker"),t.consume(e),t.exit("definitionMarker"),factoryWhitespace(t,factoryDestination(t,t.attempt(titleConstruct,factorySpace(t,s,"whitespace"),factorySpace(t,s,"whitespace")),r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):r(e)}function s(e){return(null===e||markdownLineEnding(e)?(t.exit("definition"),i.parser.defined.includes(o)||i.parser.defined.push(o),n):r)(e)}}function tokenizeTitle(t,n,r){return function(e){return(markdownLineEndingOrSpace(e)?factoryWhitespace(t,i):r)(e)};function i(e){return(34===e||39===e||40===e?factoryTitle(t,factorySpace(t,o,"whitespace"),r,"definitionTitle","definitionTitleMarker","definitionTitleString"):r)(e)}function o(e){return(null===e||markdownLineEnding(e)?n:r)(e)}}const hardBreakEscape={name:"hardBreakEscape",tokenize:tokenizeHardBreakEscape};function tokenizeHardBreakEscape(t,n,r){return function(e){return t.enter("hardBreakEscape"),t.enter("escapeMarker"),t.consume(e),i};function i(e){return(markdownLineEnding(e)?(t.exit("escapeMarker"),t.exit("hardBreakEscape"),n):r)(e)}}const headingAtx={name:"headingAtx",tokenize:tokenizeHeadingAtx,resolve:resolveHeadingAtx};function resolveHeadingAtx(e,t){let n=e.length-2,r=3;var i,o;return"whitespace"===e[r][1].type&&(r+=2),n-2>r&&"whitespace"===e[n][1].type&&(n-=2),"atxHeadingSequence"===e[n][1].type&&(r===n-1||n-4>r&&"whitespace"===e[n-2][1].type)&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},splice(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function tokenizeHeadingAtx(t,n,r){const i=this;let o=0;return function(e){return t.enter("atxHeading"),t.enter("atxHeadingSequence"),a(e)};function a(e){return 35===e&&o++<6?(t.consume(e),a):(null===e||markdownLineEndingOrSpace(e)?(t.exit("atxHeadingSequence"),i.interrupt?n:s):r)(e)}function s(e){return(35===e?(t.enter("atxHeadingSequence"),l):null===e||markdownLineEnding(e)?(t.exit("atxHeading"),n):markdownSpace(e)?factorySpace(t,s,"whitespace"):(t.enter("atxHeadingText"),c))(e)}function l(e){return 35===e?(t.consume(e),l):(t.exit("atxHeadingSequence"),s(e))}function c(e){return null===e||35===e||markdownLineEndingOrSpace(e)?(t.exit("atxHeadingText"),s(e)):(t.consume(e),c)}}const htmlBlockNames=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],htmlRawNames=["pre","script","style","textarea"],htmlFlow={name:"htmlFlow",tokenize:tokenizeHtmlFlow,resolveTo:resolveToHtmlFlow,concrete:!0},nextBlankConstruct={tokenize:tokenizeNextBlank,partial:!0};function resolveToHtmlFlow(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return 1<t&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function tokenizeHtmlFlow(t,n,r){const o=this;let i,a,s,l,c;return function(e){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(e),u};function u(e){return 33===e?(t.consume(e),d):47===e?(t.consume(e),h):63===e?(t.consume(e),i=3,o.interrupt?n:M):asciiAlpha(e)?(t.consume(e),s=String.fromCharCode(e),a=!0,m):r(e)}function d(e){return 45===e?(t.consume(e),i=2,p):91===e?(t.consume(e),i=5,s="CDATA[",l=0,f):asciiAlpha(e)?(t.consume(e),i=4,o.interrupt?n:M):r(e)}function p(e){return 45===e?(t.consume(e),o.interrupt?n:M):r(e)}function f(e){return e===s.charCodeAt(l++)?(t.consume(e),l===s.length?o.interrupt?n:E:f):r(e)}function h(e){return asciiAlpha(e)?(t.consume(e),s=String.fromCharCode(e),m):r(e)}function m(e){return null===e||47===e||62===e||markdownLineEndingOrSpace(e)?47!==e&&a&&htmlRawNames.includes(s.toLowerCase())?(i=1,(o.interrupt?n:E)(e)):htmlBlockNames.includes(s.toLowerCase())?(i=6,47===e?(t.consume(e),g):(o.interrupt?n:E)(e)):(i=7,(o.interrupt&&!o.parser.lazy[o.now().line]?r:a?v:y)(e)):45===e||asciiAlphanumeric(e)?(t.consume(e),s+=String.fromCharCode(e),m):r(e)}function g(e){return 62===e?(t.consume(e),o.interrupt?n:E):r(e)}function y(e){return markdownSpace(e)?(t.consume(e),y):_(e)}function v(e){return 47===e?(t.consume(e),_):58===e||95===e||asciiAlpha(e)?(t.consume(e),x):markdownSpace(e)?(t.consume(e),v):_(e)}function x(e){return 45===e||46===e||58===e||95===e||asciiAlphanumeric(e)?(t.consume(e),x):b(e)}function b(e){return 61===e?(t.consume(e),$):markdownSpace(e)?(t.consume(e),b):v(e)}function $(e){return null===e||60===e||61===e||62===e||96===e?r(e):34===e||39===e?(t.consume(e),c=e,C):markdownSpace(e)?(t.consume(e),$):(c=null,S(e))}function C(e){return null===e||markdownLineEnding(e)?r(e):e===c?(t.consume(e),w):(t.consume(e),C)}function S(e){return null===e||34===e||39===e||60===e||61===e||62===e||96===e||markdownLineEndingOrSpace(e)?b(e):(t.consume(e),S)}function w(e){return(47===e||62===e||markdownSpace(e)?v:r)(e)}function _(e){return 62===e?(t.consume(e),T):r(e)}function T(e){return markdownSpace(e)?(t.consume(e),T):(null===e||markdownLineEnding(e)?E:r)(e)}function E(e){return 45===e&&2===i?(t.consume(e),O):60===e&&1===i?(t.consume(e),k):62===e&&4===i?(t.consume(e),L):63===e&&3===i?(t.consume(e),M):93===e&&5===i?(t.consume(e),N):!markdownLineEnding(e)||6!==i&&7!==i?null===e||markdownLineEnding(e)?j(e):(t.consume(e),E):t.check(nextBlankConstruct,L,j)(e)}function j(e){return t.exit("htmlFlowData"),R(e)}function R(e){return(null===e?P:markdownLineEnding(e)?t.attempt({tokenize:I,partial:!0},R,P):(t.enter("htmlFlowData"),E))(e)}function I(t,n,r){return function(e){return t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),i};function i(e){return(o.parser.lazy[o.now().line]?r:n)(e)}}function O(e){return 45===e?(t.consume(e),M):E(e)}function k(e){return 47===e?(t.consume(e),s="",A):E(e)}function A(e){return 62===e&&htmlRawNames.includes(s.toLowerCase())?(t.consume(e),L):asciiAlpha(e)&&s.length<8?(t.consume(e),s+=String.fromCharCode(e),A):E(e)}function N(e){return 93===e?(t.consume(e),M):E(e)}function M(e){return 62===e?(t.consume(e),L):45===e&&2===i?(t.consume(e),M):E(e)}function L(e){return null===e||markdownLineEnding(e)?(t.exit("htmlFlowData"),P(e)):(t.consume(e),L)}function P(e){return t.exit("htmlFlow"),n(e)}}function tokenizeNextBlank(t,n,r){return function(e){return t.exit("htmlFlowData"),t.enter("lineEndingBlank"),t.consume(e),t.exit("lineEndingBlank"),t.attempt(blankLine,n,r)}}const htmlText={name:"htmlText",tokenize:tokenizeHtmlText};function tokenizeHtmlText(t,n,r){const i=this;let o,a,s,l;return function(e){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(e),c};function c(e){return 33===e?(t.consume(e),u):47===e?(t.consume(e),S):63===e?(t.consume(e),$):asciiAlpha(e)?(t.consume(e),T):r(e)}function u(e){return 45===e?(t.consume(e),d):91===e?(t.consume(e),a="CDATA[",s=0,g):asciiAlpha(e)?(t.consume(e),b):r(e)}function d(e){return 45===e?(t.consume(e),p):r(e)}function p(e){return null===e||62===e?r(e):45===e?(t.consume(e),f):h(e)}function f(e){return(null===e||62===e?r:h)(e)}function h(e){return null===e?r(e):45===e?(t.consume(e),m):markdownLineEnding(e)?(l=h,M(e)):(t.consume(e),h)}function m(e){return 45===e?(t.consume(e),P):h(e)}function g(e){return e===a.charCodeAt(s++)?(t.consume(e),s===a.length?y:g):r(e)}function y(e){return null===e?r(e):93===e?(t.consume(e),v):markdownLineEnding(e)?(l=y,M(e)):(t.consume(e),y)}function v(e){return 93===e?(t.consume(e),x):y(e)}function x(e){return 62===e?P(e):93===e?(t.consume(e),x):y(e)}function b(e){return null===e||62===e?P(e):markdownLineEnding(e)?(l=b,M(e)):(t.consume(e),b)}function $(e){return null===e?r(e):63===e?(t.consume(e),C):markdownLineEnding(e)?(l=$,M(e)):(t.consume(e),$)}function C(e){return(62===e?P:$)(e)}function S(e){return asciiAlpha(e)?(t.consume(e),w):r(e)}function w(e){return 45===e||asciiAlphanumeric(e)?(t.consume(e),w):_(e)}function _(e){return markdownLineEnding(e)?(l=_,M(e)):markdownSpace(e)?(t.consume(e),_):P(e)}function T(e){return 45===e||asciiAlphanumeric(e)?(t.consume(e),T):(47===e||62===e||markdownLineEndingOrSpace(e)?E:r)(e)}function E(e){return 47===e?(t.consume(e),P):58===e||95===e||asciiAlpha(e)?(t.consume(e),j):markdownLineEnding(e)?(l=E,M(e)):markdownSpace(e)?(t.consume(e),E):P(e)}function j(e){return 45===e||46===e||58===e||95===e||asciiAlphanumeric(e)?(t.consume(e),j):R(e)}function R(e){return 61===e?(t.consume(e),I):markdownLineEnding(e)?(l=R,M(e)):markdownSpace(e)?(t.consume(e),R):E(e)}function I(e){return null===e||60===e||61===e||62===e||96===e?r(e):34===e||39===e?(t.consume(e),o=e,O):markdownLineEnding(e)?(l=I,M(e)):markdownSpace(e)?(t.consume(e),I):(t.consume(e),o=void 0,A)}function O(e){return e===o?(t.consume(e),k):null===e?r(e):markdownLineEnding(e)?(l=O,M(e)):(t.consume(e),O)}function k(e){return(62===e||47===e||markdownLineEndingOrSpace(e)?E:r)(e)}function A(e){return null===e||34===e||39===e||60===e||61===e||96===e?r(e):62===e||markdownLineEndingOrSpace(e)?E(e):(t.consume(e),A)}function M(e){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),factorySpace(t,L,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function L(e){return t.enter("htmlTextData"),l(e)}function P(e){return 62===e?(t.consume(e),t.exit("htmlTextData"),t.exit("htmlText"),n):r(e)}}const labelEnd={name:"labelEnd",tokenize:tokenizeLabelEnd,resolveTo:resolveToLabelEnd,resolveAll:resolveAllLabelEnd},resourceConstruct={tokenize:tokenizeResource},fullReferenceConstruct={tokenize:tokenizeFullReference},collapsedReferenceConstruct={tokenize:tokenizeCollapsedReference};function resolveAllLabelEnd(e){let t=-1;for(var n;++t<e.length;)"labelImage"!==(n=e[t][1]).type&&"labelLink"!==n.type&&"labelEnd"!==n.type||(e.splice(t+1,"labelImage"===n.type?4:2),n.type="data",t++);return e}function resolveToLabelEnd(e,t){let n=e.length,r=0;var i;let o,a;for(;n--;)if(i=e[n][1],o){if("link"===i.type||"labelLink"===i.type&&i._inactive)break;"enter"===e[n][0]&&"labelLink"===i.type&&(i._inactive=!0)}else if(a){if("enter"===e[n][0]&&("labelImage"===i.type||"labelLink"===i.type)&&!i._balanced&&(o=n,"labelLink"!==i.type)){r=2;break}}else"labelEnd"===i.type&&(a=n);var s,l={type:"labelLink"===e[o][1].type?"link":"image",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"label",start:Object.assign({},e[o][1].start),end:Object.assign({},e[a][1].end)},u={type:"labelText",start:Object.assign({},e[o+r+2][1].end),end:Object.assign({},e[a-2][1].start)};return s=push$1([["enter",l,t],["enter",c,t]],e.slice(o+1,o+r+3)),s=push$1(s,[["enter",u,t]]),s=push$1(s,resolveAll(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),s=push$1(s,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),s=push$1(s,e.slice(a+1)),s=push$1(s,[["exit",l,t]]),splice(e,o,e.length,s),e}function tokenizeLabelEnd(t,n,r){const i=this;let e=i.events.length,o,a;for(;e--;)if(("labelImage"===i.events[e][1].type||"labelLink"===i.events[e][1].type)&&!i.events[e][1]._balanced){o=i.events[e][1];break}return function(e){return o?o._inactive?l(e):(a=i.parser.defined.includes(normalizeIdentifier(i.sliceSerialize({start:o.end,end:i.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(e),t.exit("labelMarker"),t.exit("labelEnd"),s):r(e)};function s(e){return(40===e?t.attempt(resourceConstruct,n,a?n:l):91===e?t.attempt(fullReferenceConstruct,n,a?t.attempt(collapsedReferenceConstruct,n,l):l):a?n:l)(e)}function l(e){return o._balanced=!0,r(e)}}function tokenizeResource(t,n,r){return function(e){return t.enter("resource"),t.enter("resourceMarker"),t.consume(e),t.exit("resourceMarker"),factoryWhitespace(t,i)};function i(e){return(41===e?s:factoryDestination(t,o,r,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32))(e)}function o(e){return(markdownLineEndingOrSpace(e)?factoryWhitespace(t,a):s)(e)}function a(e){return(34===e||39===e||40===e?factoryTitle(t,factoryWhitespace(t,s),r,"resourceTitle","resourceTitleMarker","resourceTitleString"):s)(e)}function s(e){return 41===e?(t.enter("resourceMarker"),t.consume(e),t.exit("resourceMarker"),t.exit("resource"),n):r(e)}}function tokenizeFullReference(t,n,r){const i=this;return function(e){return factoryLabel.call(i,t,o,r,"reference","referenceMarker","referenceString")(e)};function o(e){return(i.parser.defined.includes(normalizeIdentifier(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?n:r)(e)}}function tokenizeCollapsedReference(t,n,r){return function(e){return t.enter("reference"),t.enter("referenceMarker"),t.consume(e),t.exit("referenceMarker"),i};function i(e){return 93===e?(t.enter("referenceMarker"),t.consume(e),t.exit("referenceMarker"),t.exit("reference"),n):r(e)}}const labelStartImage={name:"labelStartImage",tokenize:tokenizeLabelStartImage,resolveAll:labelEnd.resolveAll};function tokenizeLabelStartImage(t,n,r){const i=this;return function(e){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(e),t.exit("labelImageMarker"),o};function o(e){return 91===e?(t.enter("labelMarker"),t.consume(e),t.exit("labelMarker"),t.exit("labelImage"),a):r(e)}function a(e){return(94===e&&"_hiddenFootnoteSupport"in i.parser.constructs?r:n)(e)}}const labelStartLink={name:"labelStartLink",tokenize:tokenizeLabelStartLink,resolveAll:labelEnd.resolveAll};function tokenizeLabelStartLink(t,n,r){const i=this;return function(e){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(e),t.exit("labelMarker"),t.exit("labelLink"),o};function o(e){return(94===e&&"_hiddenFootnoteSupport"in i.parser.constructs?r:n)(e)}}const lineEnding={name:"lineEnding",tokenize:tokenizeLineEnding};function tokenizeLineEnding(t,n){return function(e){return t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),factorySpace(t,n,"linePrefix")}}const thematicBreak$1={name:"thematicBreak",tokenize:tokenizeThematicBreak};function tokenizeThematicBreak(t,n,r){let i=0,o;return function(e){return t.enter("thematicBreak"),a(o=e)};function a(e){return(e===o?(t.enter("thematicBreakSequence"),s):markdownSpace(e)?factorySpace(t,a,"whitespace"):i<3||null!==e&&!markdownLineEnding(e)?r:(t.exit("thematicBreak"),n))(e)}function s(e){return e===o?(t.consume(e),i++,s):(t.exit("thematicBreakSequence"),a(e))}}const list$1={name:"list",tokenize:tokenizeListStart,continuation:{tokenize:tokenizeListContinuation},exit:tokenizeListEnd},listItemPrefixWhitespaceConstruct={tokenize:tokenizeListItemPrefixWhitespace,partial:!0},indentConstruct={tokenize:tokenizeIndent,partial:!0};function tokenizeListStart(n,t,r){const i=this;var e=i.events[i.events.length-1];let o=e&&"linePrefix"===e[1].type?e[2].sliceSerialize(e[1],!0).length:0,a=0;return function(e){var t=i.containerState.type||(42===e||43===e||45===e?"listUnordered":"listOrdered");if("listUnordered"===t?!i.containerState.marker||e===i.containerState.marker:asciiDigit(e)){if(i.containerState.type||(i.containerState.type=t,n.enter(t,{_container:!0})),"listUnordered"===t)return n.enter("listItemPrefix"),(42===e||45===e?n.check(thematicBreak$1,r,l):l)(e);if(!i.interrupt||49===e)return n.enter("listItemPrefix"),n.enter("listItemValue"),s(e)}return r(e)};function s(e){return asciiDigit(e)&&++a<10?(n.consume(e),s):((!i.interrupt||a<2)&&(i.containerState.marker?e===i.containerState.marker:41===e||46===e)?(n.exit("listItemValue"),l):r)(e)}function l(e){return n.enter("listItemMarker"),n.consume(e),n.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||e,n.check(blankLine,i.interrupt?r:c,n.attempt(listItemPrefixWhitespaceConstruct,d,u))}function c(e){return i.containerState.initialBlankLine=!0,o++,d(e)}function u(e){return markdownSpace(e)?(n.enter("listItemPrefixWhitespace"),n.consume(e),n.exit("listItemPrefixWhitespace"),d):r(e)}function d(e){return i.containerState.size=o+i.sliceSerialize(n.exit("listItemPrefix"),!0).length,t(e)}}function tokenizeListContinuation(t,n,r){const i=this;return i.containerState._closeFlow=void 0,t.check(blankLine,function(e){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,factorySpace(t,n,"listItemIndent",i.containerState.size+1)(e)},function(e){return(!i.containerState.furtherBlankLines&&markdownSpace(e)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,t.attempt(indentConstruct,n,o)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,o))(e)});function o(e){return i.containerState._closeFlow=!0,i.interrupt=void 0,factorySpace(t,t.attempt(list$1,n,r),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(e)}}function tokenizeIndent(e,n,r){const i=this;return factorySpace(e,function(e){var t=i.events[i.events.length-1];return(t&&"listItemIndent"===t[1].type&&t[2].sliceSerialize(t[1],!0).length===i.containerState.size?n:r)(e)},"listItemIndent",i.containerState.size+1)}function tokenizeListEnd(e){e.exit(this.containerState.type)}function tokenizeListItemPrefixWhitespace(e,n,r){const i=this;return factorySpace(e,function(e){var t=i.events[i.events.length-1];return(!markdownSpace(e)&&t&&"listItemPrefixWhitespace"===t[1].type?n:r)(e)},"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}const setextUnderline={name:"setextUnderline",tokenize:tokenizeSetextUnderline,resolveTo:resolveToSetextUnderline};function resolveToSetextUnderline(e,t){let n=e.length,r,i,o;for(;n--;)if("enter"===e[n][0]){if("content"===e[n][1].type){r=n;break}"paragraph"===e[n][1].type&&(i=n)}else"content"===e[n][1].type&&e.splice(n,1),o||"definition"!==e[n][1].type||(o=n);var a={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[o][1].end)):e[r][1]=a,e.push(["exit",a,t]),e}function tokenizeSetextUnderline(t,n,r){const i=this;let e=i.events.length,o,a;for(;e--;)if("lineEnding"!==i.events[e][1].type&&"linePrefix"!==i.events[e][1].type&&"content"!==i.events[e][1].type){a="paragraph"===i.events[e][1].type;break}return function(e){return i.parser.lazy[i.now().line]||!i.interrupt&&!a?r(e):(t.enter("setextHeadingLine"),t.enter("setextHeadingLineSequence"),s(o=e))};function s(e){return e===o?(t.consume(e),s):(t.exit("setextHeadingLineSequence"),factorySpace(t,l,"lineSuffix")(e))}function l(e){return(null===e||markdownLineEnding(e)?(t.exit("setextHeadingLine"),n):r)(e)}}const flow$1={tokenize:initializeFlow};function initializeFlow(t){const n=this,r=t.attempt(blankLine,function(e){if(null!==e)return t.enter("lineEndingBlank"),t.consume(e),t.exit("lineEndingBlank"),n.currentConstruct=void 0,r;t.consume(e)},t.attempt(this.parser.constructs.flowInitial,e,factorySpace(t,t.attempt(this.parser.constructs.flow,e,t.attempt(content,e)),"linePrefix")));return r;function e(e){if(null!==e)return t.enter("lineEnding"),t.consume(e),t.exit("lineEnding"),n.currentConstruct=void 0,r;t.consume(e)}}const resolver={resolveAll:createResolver()},string$1=initializeFactory("string"),text$2=initializeFactory("text");function initializeFactory(l){return{tokenize:function(t){const i=this,o=this.parser.constructs[l],n=t.attempt(o,e,r);return e;function e(e){return(s(e)?n:r)(e)}function r(e){if(null!==e)return t.enter("data"),t.consume(e),a;t.consume(e)}function a(e){return s(e)?(t.exit("data"),n(e)):(t.consume(e),a)}function s(e){if(null===e)return 1;var t=o[e];let n=-1;if(t)for(;++n<t.length;){var r=t[n];if(!r.previous||r.previous.call(i,i.previous))return 1}}},resolveAll:createResolver("text"===l?resolveAllLineSuffixes:void 0)}}function createResolver(i){return function(e,t){let n=-1,r;for(;++n<=e.length;)void 0===r?e[n]&&"data"===e[n][1].type&&(r=n,n++):e[n]&&"data"===e[n][1].type||(n!==r+2&&(e[r][1].end=e[n-1][1].end,e.splice(r+2,n-r-2),n=r+2),r=void 0);return i?i(e,t):e}}function resolveAllLineSuffixes(i,o){let a=0;for(;++a<=i.length;)if((a===i.length||"lineEnding"===i[a][1].type)&&"data"===i[a-1][1].type){var s,l=i[a-1][1],c=o.sliceStream(l);let e=c.length,t=-1,n=0,r;for(;e--;){var u=c[e];if("string"==typeof u){for(t=u.length;32===u.charCodeAt(t-1);)n++,t--;if(t)break;t=-1}else if(-2===u)r=!0,n++;else if(-1!==u){e++;break}}n&&(s={type:a===i.length||r||n<2?"lineSuffix":"hardBreakTrailing",start:{line:l.end.line,column:l.end.column-n,offset:l.end.offset-n,_index:l.start._index+e,_bufferIndex:e?t:l.start._bufferIndex+t},end:Object.assign({},l.end)},l.end=Object.assign({},s.start),l.start.offset===l.end.offset?Object.assign(l,s):(i.splice(a,0,["enter",s,o],["exit",s,o]),a+=2)),a++}return i}function createTokenizer(e,r,t){let f=Object.assign(t?Object.assign({},t):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const n={},i=[];let o=[],h=[];const m={consume:function(e){markdownLineEnding(e)?(f.line++,f.column=1,f.offset+=-3===e?2:1,v()):-1!==e&&(f.column++,f.offset++);f._bufferIndex<0?f._index++:(f._bufferIndex++,f._bufferIndex===o[f._index].length&&(f._bufferIndex=-1,f._index++));g.previous=e},enter:function(e,t){t=t||{};return t.type=e,t.start=y(),g.events.push(["enter",t,g]),h.push(t),t},exit:function(e){var t=h.pop();return t.end=y(),g.events.push(["exit",t,g]),t},attempt:u(function(e,t){d(e,t.from)}),check:u(c),interrupt:u(c,{interrupt:!0})},g={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:s,sliceSerialize:function(e,t){return serializeChunks(s(e),t)},now:y,defineSkip:function(e){n[e.line]=e.column,v()},write:function(e){var t;for(o=push$1(o,e);f._index<o.length;){var n=o[f._index];if("string"==typeof n)for(t=f._index,f._bufferIndex<0&&(f._bufferIndex=0);f._index===t&&f._bufferIndex<n.length;)l(n.charCodeAt(f._bufferIndex));else l(n)}return null===o[o.length-1]?(d(r,0),g.events=resolveAll(i,g.events,g),g.events):[]}};let a=r.tokenize.call(g,m);return r.resolveAll&&i.push(r),g;function s(e){return sliceChunks(o,e)}function y(){return Object.assign({},f)}function l(e){a=a(e)}function c(e,t){t.restore()}function u(d,p){return function(e,t,n){let r,i,o,a;return Array.isArray(e)?s(e):"tokenize"in e?s([e]):function(r){return function(e){var t=null!==e&&r[e],n=null!==e&&r.null,t=[...Array.isArray(t)?t:t?[t]:[],...Array.isArray(n)?n:n?[n]:[]];return s(t)(e)}}(e);function s(e){return r=e,(i=0)===e.length?n:l(e[i])}function l(t){return function(e){a=function(){const e=y(),t=g.previous,n=g.currentConstruct,r=g.events.length,i=Array.from(h);return{restore:function(){f=e,g.previous=t,g.currentConstruct=n,g.events.length=r,h=i,v()},from:r}}(),(o=t).partial||(g.currentConstruct=t);if(t.name&&g.parser.constructs.disable.null.includes(t.name))return u();return t.tokenize.call(p?Object.assign(Object.create(g),p):g,m,c,u)(e)}}function c(e){return d(o,a),t}function u(e){return a.restore(),++i<r.length?l(r[i]):n}}}function d(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&splice(g.events,t,g.events.length-t,e.resolve(g.events.slice(t),g)),e.resolveTo&&(g.events=e.resolveTo(g.events,g))}function v(){f.line in n&&f.column<2&&(f.column=n[f.line],f.offset+=n[f.line]-1)}}function sliceChunks(e,t){var n=t.start._index,r=t.start._bufferIndex,i=t.end._index,t=t.end._bufferIndex;let o;return n===i?o=[e[n].slice(r,t)]:(o=e.slice(n,i),-1<r&&(o[0]=o[0].slice(r)),0<t&&o.push(e[i].slice(0,t))),o}function serializeChunks(t,n){let r=-1;var i=[];let o;for(;++r<t.length;){var a=t[r];let e;if("string"==typeof a)e=a;else switch(a){case-5:e="\r";break;case-4:e="\n";break;case-3:e="\r\n";break;case-2:e=n?" ":"\t";break;case-1:if(!n&&o)continue;e=" ";break;default:e=String.fromCharCode(a)}o=-2===a,i.push(e)}return i.join("")}const document$4={[42]:list$1,43:list$1,45:list$1,48:list$1,49:list$1,50:list$1,51:list$1,52:list$1,53:list$1,54:list$1,55:list$1,56:list$1,57:list$1,62:blockQuote},contentInitial={[91]:definition},flowInitial={"-2":codeIndented,"-1":codeIndented,[32]:codeIndented},flow={[35]:headingAtx,42:thematicBreak$1,45:[setextUnderline,thematicBreak$1],60:htmlFlow,61:setextUnderline,95:thematicBreak$1,96:codeFenced,126:codeFenced},string={[38]:characterReference,92:characterEscape},text$1={"-5":lineEnding,"-4":lineEnding,"-3":lineEnding,[33]:labelStartImage,38:characterReference,42:attention,60:[autolink,htmlText],91:labelStartLink,92:[hardBreakEscape,characterEscape],93:labelEnd,95:attention,96:codeText},insideSpan={null:[attention,resolver]},attentionMarkers={null:[42,95]},disable={null:[]};var defaultConstructs=Object.freeze({__proto__:null,document:document$4,contentInitial:contentInitial,flowInitial:flowInitial,flow:flow,string:string,text:text$1,insideSpan:insideSpan,attentionMarkers:attentionMarkers,disable:disable});function parse$4(e={}){const n={defined:[],lazy:{},constructs:combineExtensions([defaultConstructs].concat(e.extensions||[])),content:t(content$1),document:t(document$5),flow:t(flow$1),string:t(string$1),text:t(text$2)};return n;function t(t){return function(e){return createTokenizer(n,t,e)}}}const search=/[\0\t\n\r]/g;function preprocess(){let c=1,u="",d=!0,p;return function(e,t,n){var r=[];let i,o,a,s,l;e=u+e.toString(t),a=0,u="",d&&(65279===e.charCodeAt(0)&&a++,d=void 0);for(;a<e.length;){if(search.lastIndex=a,i=search.exec(e),s=i&&void 0!==i.index?i.index:e.length,l=e.charCodeAt(s),!i){u=e.slice(a);break}if(10===l&&a===s&&p)r.push(-3),p=void 0;else switch(p&&(r.push(-5),p=void 0),a<s&&(r.push(e.slice(a,s)),c+=s-a),l){case 0:r.push(65533),c++;break;case 9:for(o=4*Math.ceil(c/4),r.push(-2);c++<o;)r.push(-1);break;case 10:r.push(-4),c=1;break;default:p=!0,c=1}a=s+1}n&&(p&&r.push(-5),u&&r.push(u),r.push(null));return r}}function postprocess(e){for(;!subtokenize(e););return e}function decodeNumericCharacterReference(e,t){e=Number.parseInt(e,t);return e<9||11===e||13<e&&e<32||126<e&&e<160||55295<e&&e<57344||64975<e&&e<65008||65535==(65535&e)||65534==(65535&e)||1114111<e?"�":String.fromCharCode(e)}const characterEscapeOrReference=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function decodeString(e){return e.replace(characterEscapeOrReference,decode)}function decode(e,t,n){if(t)return t;const r=n.charCodeAt(0);if(35!==r)return decodeNamedCharacterReference(n)||e;{const r=n.charCodeAt(1);t=120===r||88===r;return decodeNumericCharacterReference(n.slice(t?2:1),t?16:10)}}function stringifyPosition(e){return e&&"object"==typeof e?"position"in e||"type"in e?position$1(e.position):"start"in e||"end"in e?position$1(e):"line"in e||"column"in e?point$2(e):"":""}function point$2(e){return index$2(e&&e.line)+":"+index$2(e&&e.column)}function position$1(e){return point$2(e&&e.start)+"-"+point$2(e&&e.end)}function index$2(e){return e&&"number"==typeof e?e:1}const own$6={}.hasOwnProperty,fromMarkdown=function(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),compiler(n)(postprocess(parse$4(n).document().write(preprocess()(e,t,!0))))};function compiler(e){const l={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:t(x),autolinkProtocol:r,autolinkEmail:r,atxHeading:t(g),blockQuote:t(function(){return{type:"blockquote",children:[]}}),characterEscape:r,characterReference:r,codeFenced:t(m),codeFencedFenceInfo:d,codeFencedFenceMeta:d,codeIndented:t(m,d),codeText:t(function(){return{type:"inlineCode",value:""}},d),codeTextData:r,data:r,codeFlowValue:r,definition:t(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:d,definitionLabelString:d,definitionTitleString:d,emphasis:t(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:t(y),hardBreakTrailing:t(y),htmlFlow:t(v,d),htmlFlowData:r,htmlText:t(v,d),htmlTextData:r,image:t(function(){return{type:"image",title:null,url:"",alt:null}}),label:d,link:t(x),listItem:t(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}),listItemValue:function(e){i.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),c("expectingFirstListItemValue"))},listOrdered:t(b,function(){c("expectingFirstListItemValue",!0)}),listUnordered:t(b),paragraph:t(function(){return{type:"paragraph",children:[]}}),reference:function(){c("referenceType","collapsed")},referenceString:d,resourceDestinationString:d,resourceTitleString:d,setextHeading:t(g),strong:t(function(){return{type:"strong",children:[]}}),thematicBreak:t(function(){return{type:"thematicBreak"}})},exit:{atxHeading:n(),atxHeadingSequence:function(e){var t=this.stack[this.stack.length-1];t.depth||(e=this.sliceSerialize(e).length,t.depth=e)},autolink:n(),autolinkEmail:function(e){o.call(this,e);var t=this.stack[this.stack.length-1];t.url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){o.call(this,e);var t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)},blockQuote:n(),characterEscapeValue:o,characterReferenceMarkerHexadecimal:s,characterReferenceMarkerNumeric:s,characterReferenceValue:function(e){var t=this.sliceSerialize(e),n=i.characterReferenceType;let r;n?(r=decodeNumericCharacterReference(t,"characterReferenceMarkerNumeric"===n?10:16),c("characterReferenceType")):(n=decodeNamedCharacterReference(t),r=n);t=this.stack.pop();t.value+=r,t.position.end=point$1(e.end)},codeFenced:n(function(){var e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),c("flowCodeInside")}),codeFencedFence:function(){i.flowCodeInside||(this.buffer(),c("flowCodeInside",!0))},codeFencedFenceInfo:function(){var e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e},codeFencedFenceMeta:function(){var e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e},codeFlowValue:o,codeIndented:n(function(){var e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:n(function(){var e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}),codeTextData:o,data:o,definition:n(),definitionDestinationString:function(){var e=this.resume(),t=this.stack[this.stack.length-1];t.url=e},definitionLabelString:function(e){var t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=normalizeIdentifier(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){var e=this.resume(),t=this.stack[this.stack.length-1];t.title=e},emphasis:n(),hardBreakEscape:n(a),hardBreakTrailing:n(a),htmlFlow:n(function(){var e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}),htmlFlowData:o,htmlText:n(function(){var e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}),htmlTextData:o,image:n(function(){var e=this.stack[this.stack.length-1];{var t;i.inReference?(t=i.referenceType||"shortcut",e.type+="Reference",e.referenceType=t,delete e.url,delete e.title):(delete e.identifier,delete e.label)}c("referenceType")}),label:function(){var e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];c("inReference",!0),"link"===n.type?(e=e.children,n.children=e):n.alt=t},labelText:function(e){var e=this.sliceSerialize(e),t=this.stack[this.stack.length-2];t.label=decodeString(e),t.identifier=normalizeIdentifier(e).toLowerCase()},lineEnding:function(e){var t=this.stack[this.stack.length-1];i.atHardBreak?(t.children[t.children.length-1].position.end=point$1(e.end),c("atHardBreak")):!i.setextHeadingSlurpLineEnding&&l.canContainEols.includes(t.type)&&(r.call(this,e),o.call(this,e))},link:n(function(){var e=this.stack[this.stack.length-1];{var t;i.inReference?(t=i.referenceType||"shortcut",e.type+="Reference",e.referenceType=t,delete e.url,delete e.title):(delete e.identifier,delete e.label)}c("referenceType")}),listItem:n(),listOrdered:n(),listUnordered:n(),paragraph:n(),referenceString:function(e){var t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=normalizeIdentifier(this.sliceSerialize(e)).toLowerCase(),c("referenceType","full")},resourceDestinationString:function(){var e=this.resume(),t=this.stack[this.stack.length-1];t.url=e},resourceTitleString:function(){var e=this.resume(),t=this.stack[this.stack.length-1];t.title=e},resource:function(){c("inReference")},setextHeading:n(function(){c("setextHeadingSlurpLineEnding")}),setextHeadingLineSequence:function(e){var t=this.stack[this.stack.length-1];t.depth=61===this.sliceSerialize(e).charCodeAt(0)?1:2},setextHeadingText:function(){c("setextHeadingSlurpLineEnding",!0)},strong:n(),thematicBreak:n()}},i=(configure(l,(e||{}).mdastExtensions||[]),{});return function(e){let t={type:"root",children:[]};var n={stack:[t],tokenStack:[],config:l,enter:p,exit:f,buffer:d,resume:h,setData:c,getData:u},r=[];let i=-1;for(;++i<e.length;){var o;"listOrdered"!==e[i][1].type&&"listUnordered"!==e[i][1].type||("enter"===e[i][0]?r.push(i):(o=r.pop(),i=function(t,e,n){let r=e-1,i=-1,o=!1,a,s,l,c;for(;++r<=n;){var u=t[r];if("listUnordered"===u[1].type||"listOrdered"===u[1].type||"blockQuote"===u[1].type?("enter"===u[0]?i++:i--,c=void 0):"lineEndingBlank"===u[1].type?"enter"===u[0]&&(!a||c||i||(l=l||r),c=void 0):"linePrefix"!==u[1].type&&"listItemValue"!==u[1].type&&"listItemMarker"!==u[1].type&&"listItemPrefix"!==u[1].type&&"listItemPrefixWhitespace"!==u[1].type&&(c=void 0),!i&&"enter"===u[0]&&"listItemPrefix"===u[1].type||-1===i&&"exit"===u[0]&&("listUnordered"===u[1].type||"listOrdered"===u[1].type)){if(a){let e=r;for(s=void 0;e--;){var d=t[e];if("lineEnding"===d[1].type||"lineEndingBlank"===d[1].type)"exit"!==d[0]&&(s&&(t[s][1].type="lineEndingBlank",o=!0),d[1].type="lineEnding",s=e);else if("linePrefix"!==d[1].type&&"blockQuotePrefix"!==d[1].type&&"blockQuotePrefixWhitespace"!==d[1].type&&"blockQuoteMarker"!==d[1].type&&"listItemIndent"!==d[1].type)break}l&&(!s||l<s)&&(a._spread=!0),a.end=Object.assign({},s?t[s][1].start:u[1].end),t.splice(s||r,0,["exit",a,u[2]]),r++,n++}"listItemPrefix"===u[1].type&&(a={type:"listItem",_spread:!1,start:Object.assign({},u[1].start)},t.splice(r,0,["enter",a,u[2]]),r++,n++,l=void 0,c=!0)}}return t[e][1]._spread=o,n}(e,o,i)))}i=-1;for(;++i<e.length;){var a=l[e[i][0]];own$6.call(a,e[i][1].type)&&a[e[i][1].type].call(Object.assign({sliceSerialize:e[i][2].sliceSerialize},n),e[i][1])}{var s;0<n.tokenStack.length&&((s=n.tokenStack[n.tokenStack.length-1])[1]||defaultOnError).call(n,void 0,s[0])}t.position={start:point$1(0<e.length?e[0][1].start:{line:1,column:1,offset:0}),end:point$1(0<e.length?e[e.length-2][1].end:{line:1,column:1,offset:0})},i=-1;for(;++i<l.transforms.length;)t=l.transforms[i](t)||t;return t};function c(e,t){i[e]=t}function u(e){return i[e]}function t(t,n){return function(e){p.call(this,t(e),e),n&&n.call(this,e)}}function d(){this.stack.push({type:"fragment",children:[]})}function p(e,t,n){return this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n]),e.position={start:point$1(t.start)},e}function n(t){return function(e){t&&t.call(this,e);f.call(this,e)}}function f(e,t){var n=this.stack.pop(),r=this.tokenStack.pop();if(r)return r[0].type!==e.type&&(t||r[1]||defaultOnError).call(this,e,r[0]),n.position.end=point$1(e.end),n;throw new Error("Cannot close `"+e.type+"` ("+stringifyPosition({start:e.start,end:e.end})+"): it’s not open")}function h(){return toString$4(this.stack.pop())}function r(e){var t=this.stack[this.stack.length-1];let n=t.children[t.children.length-1];n&&"text"===n.type||((n={type:"text",value:""}).position={start:point$1(e.start)},t.children.push(n)),this.stack.push(n)}function o(e){var t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=point$1(e.end)}function a(){c("atHardBreak",!0)}function s(e){c("characterReferenceType",e.type)}function m(){return{type:"code",lang:null,meta:null,value:""}}function g(){return{type:"heading",depth:void 0,children:[]}}function y(){return{type:"break"}}function v(){return{type:"html",value:""}}function x(){return{type:"link",title:null,url:"",children:[]}}function b(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}}function point$1(e){return{line:e.line,column:e.column,offset:e.offset}}function configure(e,t){let n=-1;for(;++n<t.length;){var r=t[n];(Array.isArray(r)?configure:extension)(e,r)}}function extension(e,t){let n;for(n in t){var r,i;own$6.call(t,n)&&("canContainEols"===n?(r=t[n])&&e[n].push(...r):"transforms"===n?(r=t[n])&&e[n].push(...r):"enter"!==n&&"exit"!==n||(i=t[n])&&Object.assign(e[n],i))}}function defaultOnError(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+stringifyPosition({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+stringifyPosition({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+stringifyPosition({start:t.start,end:t.end})+") is still open")}function remarkParse(n){Object.assign(this,{Parser:e=>{var t=this.data("settings");return fromMarkdown(e,Object.assign({},t,n,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}const u$2=function(e,t,n){e={type:String(e)};return null!=n||"string"!=typeof t&&!Array.isArray(t)?Object.assign(e,t):n=t,Array.isArray(n)?e.children=n:null!=n&&(e.value=String(n)),e},own$5={}.hasOwnProperty;function unknown(e,t){var n=t.data||{};return"value"in t&&!(own$5.call(n,"hName")||own$5.call(n,"hProperties")||own$5.call(n,"hChildren"))?e.augment(t,u$2("text",t.value)):e(t,"div",all(e,t))}function one(e,t,n){var r=t&&t.type;let i;if(r)return("function"==typeof(i=own$5.call(e.handlers,r)?e.handlers[r]:e.passThrough&&e.passThrough.includes(r)?returnNode:e.unknownHandler)?i:unknown)(e,t,n);throw new Error("Expected node, got `"+t+"`")}function returnNode(e,t){return"children"in t?{...t,children:all(e,t)}:t}function all(t,n){var r=[];if("children"in n){var i=n.children;let e=-1;for(;++e<i.length;){var o,a=one(t,i[e],n);a&&(e&&"break"===i[e-1].type&&(Array.isArray(a)||"text"!==a.type||(a.value=a.value.replace(/^\s+/,"")),Array.isArray(a)||"element"!==a.type||(o=a.children[0])&&"text"===o.type&&(o.value=o.value.replace(/^\s+/,""))),Array.isArray(a)?r.push(...a):r.push(a))}}return r}const convert$2=function(e){if(null==e)return ok$1;if("string"==typeof e)return typeFactory$1(e);if("object"==typeof e)return(Array.isArray(e)?anyFactory$1:propsFactory$1)(e);if("function"==typeof e)return castFactory$1(e);throw new Error("Expected function, string, or object as test")};function anyFactory$1(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=convert$2(e[t]);return castFactory$1(function(...e){let t=-1;for(;++t<n.length;)if(n[t].call(this,...e))return!0;return!1})}function propsFactory$1(n){return castFactory$1(function(e){let t;for(t in n)if(e[t]!==n[t])return!1;return!0})}function typeFactory$1(t){return castFactory$1(function(e){return e&&e.type===t})}function castFactory$1(n){return function(e,...t){return Boolean(e&&"object"==typeof e&&"type"in e&&Boolean(n.call(this,e,...t)))}}function ok$1(){return!0}function color$1(e){return e}const CONTINUE$1=!0,EXIT$1=!1,SKIP$1="skip",visitParents$1=function(e,l,c,u){"function"==typeof l&&"function"!=typeof c&&(u=c,c=l,l=null);const d=convert$2(l),p=u?-1:1;!function i(o,a,s){const e=o&&"object"==typeof o?o:{};if("string"==typeof e.type){const n="string"==typeof e.tagName?e.tagName:"string"==typeof e.name?e.name:void 0;Object.defineProperty(t,"name",{value:"node ("+color$1(o.type+(n?"<"+n+">":""))+")"})}return t;function t(){let e=[],t,n,r;if((l&&!d(o,a,s[s.length-1]||null)||(e=toResult$1(c(o,s)))[0]!==EXIT$1)&&o.children&&e[0]!==SKIP$1)for(n=(u?o.children.length:-1)+p,r=s.concat(o);-1<n&&n<o.children.length;){if((t=i(o.children[n],n,r)())[0]===EXIT$1)return t;n="number"==typeof t[1]?t[1]:n+p}return e}}(e,void 0,[])()};function toResult$1(e){return Array.isArray(e)?e:"number"==typeof e?[CONTINUE$1,e]:[e]}const visit$1=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null),visitParents$1(e,t,function(e,t){t=t[t.length-1];return n(e,t?t.children.indexOf(e):null,t)},r)},pointStart=point("start"),pointEnd=point("end");function point(t){return function(e){e=e&&e.position&&e.position[t]||{};return{line:e.line||null,column:e.column||null,offset:-1<e.offset?e.offset:null}}}function generated(e){return!(e&&e.position&&e.position.start&&e.position.start.line&&e.position.start.column&&e.position.end&&e.position.end.line&&e.position.end.column)}const own$4={}.hasOwnProperty;function definitions(e){const n=Object.create(null);if(e&&e.type)return visit$1(e,"definition",e=>{var t=clean(e.identifier);t&&!own$4.call(n,t)&&(n[t]=e)}),function(e){e=clean(e);return e&&own$4.call(n,e)?n[e]:null};throw new Error("mdast-util-definitions expected node")}function clean(e){return String(e||"").toUpperCase()}function thematicBreak(e,t){return e(t,"hr")}function wrap(e,t){var n=[];let r=-1;for(t&&n.push(u$2("text","\n"));++r<e.length;)r&&n.push(u$2("text","\n")),n.push(e[r]);return t&&0<e.length&&n.push(u$2("text","\n")),n}function list(e,t){var n={},r=t.ordered?"ol":"ul",i=all(e,t);let o=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++o<i.length;){var a=i[o];if("element"===a.type&&"li"===a.tagName&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}return e(t,r,n,wrap(i,!0))}function footer(e){var t=e.footnoteById,n=e.footnoteOrder;let r=-1;for(var i=[];++r<n.length;){var o,a,s,l=t[n[r].toUpperCase()];l&&(o=String(r+1),((s=(a=[...l.children])[a.length-1])&&"paragraph"===s.type?s.children:a).push({type:"link",url:"#fnref"+o,data:{hProperties:{className:["footnote-back"],role:"doc-backlink"}},children:[{type:"text",value:"↩"}]}),i.push({type:"listItem",data:{hProperties:{id:"fn"+o,role:"doc-endnote"}},children:a,position:l.position}))}return 0===i.length?null:e(null,"section",{className:["footnotes"],role:"doc-endnotes"},wrap([thematicBreak(e),list(e,{type:"list",ordered:!0,children:i})],!0))}function blockquote(e,t){return e(t,"blockquote",wrap(all(e,t),!0))}function hardBreak(e,t){return[e(t,"br"),u$2("text","\n")]}function code(e,t){var n=t.value?t.value+"\n":"",r=t.lang&&t.lang.match(/^[^ \t]+(?=[ \t]|$)/),i={},r=(r&&(i.className=["language-"+r]),e(t,"code",i,[u$2("text",n)]));return t.meta&&(r.data={meta:t.meta}),e(t.position,"pre",[r])}function strikethrough(e,t){return e(t,"del",all(e,t))}function emphasis(e,t){return e(t,"em",all(e,t))}function footnoteReference(e,t){var n=e.footnoteOrder,r=String(t.identifier),i=n.indexOf(r),n=String(-1===i?n.push(r):i+1);return e(t,"a",{href:"#fn"+n,className:["footnote-ref"],id:"fnref"+n,role:"doc-noteref"},[e(t.position,"sup",[u$2("text",n)])])}function footnote(e,t){var n=e.footnoteById,r=e.footnoteOrder;let i=1;for(;i in n;)i++;var o=String(i);return r.push(o),n[o]={type:"footnoteDefinition",identifier:o,children:[{type:"paragraph",children:t.children}],position:t.position},footnoteReference(e,{type:"footnoteReference",identifier:o,position:t.position})}function heading(e,t){return e(t,"h"+t.depth,all(e,t))}function html$5(e,t){return e.dangerous?e.augment(t,u$2("raw",t.value)):null}var encodeCache={};function getEncodeCache(e){var t,n,r=encodeCache[e];if(!r){for(r=encodeCache[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),/^[0-9a-z]$/i.test(n)?r.push(n):r.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t<e.length;t++)r[e.charCodeAt(t)]=e[t]}return r}function encode(e,t,n){var r,i,o,a,s="";for("string"!=typeof t&&(n=t,t=encode.defaultChars),void 0===n&&(n=!0),a=getEncodeCache(t),r=0,i=e.length;r<i;r++)o=e.charCodeAt(r),n&&37===o&&r+2<i&&/^[0-9a-f]{2}$/i.test(e.slice(r+1,r+3))?(s+=e.slice(r,r+3),r+=2):o<128?s+=a[o]:55296<=o&&o<=57343?55296<=o&&o<=56319&&r+1<i&&56320<=(o=e.charCodeAt(r+1))&&o<=57343?(s+=encodeURIComponent(e[r]+e[r+1]),r++):s+="%EF%BF%BD":s+=encodeURIComponent(e[r]);return s}encode.defaultChars=";/?:@&=+$,-_.!~*'()#",encode.componentChars="-_.!~*'()";var encode_1=encode;function revert(e,t){var n=t.referenceType;let r="]";return"collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type?u$2("text","!["+t.alt+r):((e=(n=all(e,t))[0])&&"text"===e.type?e.value="["+e.value:n.unshift(u$2("text","[")),(t=n[n.length-1])&&"text"===t.type?t.value+=r:n.push(u$2("text",r)),n)}function imageReference(e,t){var n,r=e.definition(t.identifier);return r?(n={src:encode_1(r.url||""),alt:t.alt},null!==r.title&&void 0!==r.title&&(n.title=r.title),e(t,"img",n)):revert(e,t)}function image(e,t){var n={src:encode_1(t.url),alt:t.alt};return null!==t.title&&void 0!==t.title&&(n.title=t.title),e(t,"img",n)}function inlineCode(e,t){return e(t,"code",[u$2("text",t.value.replace(/\r?\n|\r/g," "))])}function linkReference(e,t){var n,r=e.definition(t.identifier);return r?(n={href:encode_1(r.url||"")},null!==r.title&&void 0!==r.title&&(n.title=r.title),e(t,"a",n,all(e,t))):revert(e,t)}function link(e,t){var n={href:encode_1(t.url)};return null!==t.title&&void 0!==t.title&&(n.title=t.title),e(t,"a",n,all(e,t))}function listItem(t,n,r){var i=all(t,n),e=r?listLoose(r):listItemLoose(n),r={},o=[];if("boolean"==typeof n.checked){let e;i[0]&&"element"===i[0].type&&"p"===i[0].tagName?e=i[0]:(e=t(null,"p",[]),i.unshift(e)),0<e.children.length&&e.children.unshift(u$2("text"," ")),e.children.unshift(t(null,"input",{type:"checkbox",checked:n.checked,disabled:!0})),r.className=["task-list-item"]}let a=-1;for(;++a<i.length;){var s=i[a];!e&&0===a&&"element"===s.type&&"p"===s.tagName||o.push(u$2("text","\n")),"element"!==s.type||"p"!==s.tagName||e?o.push(s):o.push(...s.children)}var l=i[i.length-1];return!l||!e&&"tagName"in l&&"p"===l.tagName||o.push(u$2("text","\n")),t(n,"li",r,o)}function listLoose(e){let t=e.spread;var n=e.children;let r=-1;for(;!t&&++r<n.length;)t=listItemLoose(n[r]);return Boolean(t)}function listItemLoose(e){var t=e.spread;return null==t?1<e.children.length:t}function paragraph(e,t){return e(t,"p",all(e,t))}function root$2(e,t){return e.augment(t,u$2("root",wrap(all(e,t))))}function strong(e,t){return e(t,"strong",all(e,t))}function table(t,n){var r=n.children;let i=-1;for(var o=n.align||[],a=[];++i<r.length;){var s=r[i].children,l=0===i?"th":"td";let e=(n.align?o:s).length;for(var c=[];e--;){var u=s[e];c[e]=t(u,l,{align:o[e]},u?all(t,u):[])}a[i]=t(r[i],"tr",wrap(c,!0))}return t(n,"table",wrap([t(a[0].position,"thead",wrap([a[0]],!0))].concat(a[1]?t({start:pointStart(a[1]),end:pointEnd(a[a.length-1])},"tbody",wrap(a.slice(1),!0)):[]),!0))}function text(e,t){return e.augment(t,u$2("text",String(t.value).replace(/[ \t]*(\r?\n|\r)[ \t]*/g,"$1")))}const handlers={blockquote:blockquote,break:hardBreak,code:code,delete:strikethrough,emphasis:emphasis,footnoteReference:footnoteReference,footnote:footnote,heading:heading,html:html$5,imageReference:imageReference,image:image,inlineCode:inlineCode,linkReference:linkReference,link:link,listItem:listItem,list:list,paragraph:paragraph,root:root$2,strong:strong,table:table,text:text,thematicBreak:thematicBreak,toml:ignore,yaml:ignore,definition:ignore,footnoteDefinition:ignore};function ignore(){return null}const own$3={}.hasOwnProperty;function factory(e,t){var t=t||{},n=t.allowDangerousHtml||!1;const r={};return o.dangerous=n,o.definition=definitions(e),o.footnoteById=r,o.footnoteOrder=[],o.augment=i,o.handlers={...handlers,...t.handlers},o.unknownHandler=t.unknownHandler,o.passThrough=t.passThrough,visit$1(e,"footnoteDefinition",e=>{var t=String(e.identifier).toUpperCase();own$3.call(r,t)||(r[t]=e)}),o;function i(e,t){var n;return e&&"data"in e&&e.data&&((n=e.data).hName&&((t="element"!==t.type?{type:"element",tagName:"",properties:{},children:[]}:t).tagName=n.hName),"element"===t.type&&n.hProperties&&(t.properties={...t.properties,...n.hProperties}),"children"in t)&&t.children&&n.hChildren&&(t.children=n.hChildren),e&&!generated(n="type"in e?e:{position:e})&&(t.position={start:pointStart(n),end:pointEnd(n)}),t}function o(e,t,n,r){return Array.isArray(n)&&(r=n,n={}),i(e,{type:"element",tagName:t,properties:n||{},children:r||[]})}}function toHast(e,t){t=factory(e,t),e=one(t,e,null),t=footer(t);return t&&e.children.push(u$2("text","\n"),t),Array.isArray(e)?{type:"root",children:e}:e}const remarkRehype=function(e,t){return e&&"run"in e?bridge(e,t):mutate(e)};var remarkRehype$1=remarkRehype;function bridge(r,i){return(e,t,n)=>{r.run(toHast(e,i),t,e=>{n(e)})}}function mutate(t){return e=>toHast(e,t)}class Schema{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function merge(e,t){var n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new Schema(n,r,t)}function normalize$1(e){return e.toLowerCase()}Schema.prototype.property={},Schema.prototype.normal={},Schema.prototype.space=null;class Info$1{constructor(e,t){this.property=e,this.attribute=t}}Info$1.prototype.space=null,Info$1.prototype.boolean=!1,Info$1.prototype.booleanish=!1,Info$1.prototype.overloadedBoolean=!1,Info$1.prototype.number=!1,Info$1.prototype.commaSeparated=!1,Info$1.prototype.spaceSeparated=!1,Info$1.prototype.commaOrSpaceSeparated=!1,Info$1.prototype.mustUseProperty=!1,Info$1.prototype.defined=!1;let powers=0;const boolean=increment(),booleanish=increment(),overloadedBoolean=increment(),number=increment(),spaceSeparated=increment(),commaSeparated=increment(),commaOrSpaceSeparated=increment();function increment(){return 2**++powers}var types=Object.freeze({__proto__:null,boolean:boolean,booleanish:booleanish,overloadedBoolean:overloadedBoolean,number:number,spaceSeparated:spaceSeparated,commaSeparated:commaSeparated,commaOrSpaceSeparated:commaOrSpaceSeparated});const checks=Object.keys(types);class DefinedInfo extends Info$1{constructor(e,t,n,r){let i=-1;if(super(e,t),mark(this,"space",r),"number"==typeof n)for(;++i<checks.length;){var o=checks[i];mark(this,checks[i],(n&types[o])===types[o])}}}function mark(e,t,n){n&&(e[t]=n)}DefinedInfo.prototype.defined=!0;const own$2={}.hasOwnProperty;function create$3(e){var t,n={},r={};let i;for(i in e.properties)own$2.call(e.properties,i)&&(t=e.properties[i],t=new DefinedInfo(i,e.transform(e.attributes||{},i),t,e.space),e.mustUseProperty&&e.mustUseProperty.includes(i)&&(t.mustUseProperty=!0),n[i]=t,r[normalize$1(i)]=i,r[normalize$1(t.attribute)]=i);return new Schema(n,r,e.space)}const xlink=create$3({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),xml=create$3({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function caseSensitiveTransform(e,t){return t in e?e[t]:t}function caseInsensitiveTransform(e,t){return caseSensitiveTransform(e,t.toLowerCase())}const xmlns=create$3({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:caseInsensitiveTransform,properties:{xmlns:null,xmlnsXLink:null}}),aria=create$3({transform(e,t){return"role"===t?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:booleanish,ariaAutoComplete:null,ariaBusy:booleanish,ariaChecked:booleanish,ariaColCount:number,ariaColIndex:number,ariaColSpan:number,ariaControls:spaceSeparated,ariaCurrent:null,ariaDescribedBy:spaceSeparated,ariaDetails:null,ariaDisabled:booleanish,ariaDropEffect:spaceSeparated,ariaErrorMessage:null,ariaExpanded:booleanish,ariaFlowTo:spaceSeparated,ariaGrabbed:booleanish,ariaHasPopup:null,ariaHidden:booleanish,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:spaceSeparated,ariaLevel:number,ariaLive:null,ariaModal:booleanish,ariaMultiLine:booleanish,ariaMultiSelectable:booleanish,ariaOrientation:null,ariaOwns:spaceSeparated,ariaPlaceholder:null,ariaPosInSet:number,ariaPressed:booleanish,ariaReadOnly:booleanish,ariaRelevant:null,ariaRequired:booleanish,ariaRoleDescription:spaceSeparated,ariaRowCount:number,ariaRowIndex:number,ariaRowSpan:number,ariaSelected:booleanish,ariaSetSize:number,ariaSort:null,ariaValueMax:number,ariaValueMin:number,ariaValueNow:number,ariaValueText:null,role:null}}),html$4=create$3({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:caseInsensitiveTransform,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:commaSeparated,acceptCharset:spaceSeparated,accessKey:spaceSeparated,action:null,allow:null,allowFullScreen:boolean,allowPaymentRequest:boolean,allowUserMedia:boolean,alt:null,as:null,async:boolean,autoCapitalize:null,autoComplete:spaceSeparated,autoFocus:boolean,autoPlay:boolean,capture:boolean,charSet:null,checked:boolean,cite:null,className:spaceSeparated,cols:number,colSpan:null,content:null,contentEditable:booleanish,controls:boolean,controlsList:spaceSeparated,coords:number|commaSeparated,crossOrigin:null,data:null,dateTime:null,decoding:null,default:boolean,defer:boolean,dir:null,dirName:null,disabled:boolean,download:overloadedBoolean,draggable:booleanish,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:boolean,formTarget:null,headers:spaceSeparated,height:number,hidden:boolean,high:number,href:null,hrefLang:null,htmlFor:spaceSeparated,httpEquiv:spaceSeparated,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:boolean,itemId:null,itemProp:spaceSeparated,itemRef:spaceSeparated,itemScope:boolean,itemType:spaceSeparated,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:boolean,low:number,manifest:null,max:null,maxLength:number,media:null,method:null,min:null,minLength:number,multiple:boolean,muted:boolean,name:null,nonce:null,noModule:boolean,noValidate:boolean,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:boolean,optimum:number,pattern:null,ping:spaceSeparated,placeholder:null,playsInline:boolean,poster:null,preload:null,readOnly:boolean,referrerPolicy:null,rel:spaceSeparated,required:boolean,reversed:boolean,rows:number,rowSpan:number,sandbox:spaceSeparated,scope:null,scoped:boolean,seamless:boolean,selected:boolean,shape:null,size:number,sizes:null,slot:null,span:number,spellCheck:booleanish,src:null,srcDoc:null,srcLang:null,srcSet:null,start:number,step:null,style:null,tabIndex:number,target:null,title:null,translate:null,type:null,typeMustMatch:boolean,useMap:null,value:booleanish,width:number,wrap:null,align:null,aLink:null,archive:spaceSeparated,axis:null,background:null,bgColor:null,border:number,borderColor:null,bottomMargin:number,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:boolean,declare:boolean,event:null,face:null,frame:null,frameBorder:null,hSpace:number,leftMargin:number,link:null,longDesc:null,lowSrc:null,marginHeight:number,marginWidth:number,noResize:boolean,noHref:boolean,noShade:boolean,noWrap:boolean,object:null,profile:null,prompt:null,rev:null,rightMargin:number,rules:null,scheme:null,scrolling:booleanish,standby:null,summary:null,text:null,topMargin:number,valueType:null,version:null,vAlign:null,vLink:null,vSpace:number,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:boolean,disableRemotePlayback:boolean,prefix:null,property:null,results:number,security:null,unselectable:null}}),svg$1=create$3({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:caseSensitiveTransform,properties:{about:commaOrSpaceSeparated,accentHeight:number,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:number,amplitude:number,arabicForm:null,ascent:number,attributeName:null,attributeType:null,azimuth:number,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:number,by:null,calcMode:null,capHeight:number,className:spaceSeparated,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:number,diffuseConstant:number,direction:null,display:null,dur:null,divisor:number,dominantBaseline:null,download:boolean,dx:null,dy:null,edgeMode:null,editable:null,elevation:number,enableBackground:null,end:null,event:null,exponent:number,externalResourcesRequired:null,fill:null,fillOpacity:number,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:commaSeparated,g2:commaSeparated,glyphName:commaSeparated,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:number,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:number,horizOriginX:number,horizOriginY:number,id:null,ideographic:number,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:number,k:number,k1:number,k2:number,k3:number,k4:number,kernelMatrix:commaOrSpaceSeparated,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:number,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:number,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:number,overlineThickness:number,paintOrder:null,panose1:null,path:null,pathLength:number,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:spaceSeparated,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:number,pointsAtY:number,pointsAtZ:number,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:commaOrSpaceSeparated,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:commaOrSpaceSeparated,rev:commaOrSpaceSeparated,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:commaOrSpaceSeparated,requiredFeatures:commaOrSpaceSeparated,requiredFonts:commaOrSpaceSeparated,requiredFormats:commaOrSpaceSeparated,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:number,specularExponent:number,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:number,strikethroughThickness:number,string:null,stroke:null,strokeDashArray:commaOrSpaceSeparated,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:number,strokeOpacity:number,strokeWidth:null,style:null,surfaceScale:number,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:commaOrSpaceSeparated,tabIndex:number,tableValues:null,target:null,targetX:number,targetY:number,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:commaOrSpaceSeparated,to:null,transform:null,u1:null,u2:null,underlinePosition:number,underlineThickness:number,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:number,values:null,vAlphabetic:number,vMathematical:number,vectorEffect:null,vHanging:number,vIdeographic:number,version:null,vertAdvY:number,vertOriginX:number,vertOriginY:number,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:number,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),valid=/^data[-\w.:]+$/i,dash=/-[a-z]/g,cap=/[A-Z]/g;function find$2(e,t){var n=normalize$1(t);let r=t,i=Info$1;if(n in e.normal)return e.property[e.normal[n]];if(4<n.length&&"data"===n.slice(0,4)&&valid.test(t)){if("-"===t.charAt(4)){e=t.slice(5).replace(dash,camelcase);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{n=t.slice(4);if(!dash.test(n)){let e=n.replace(cap,kebab);t="data"+(e="-"!==e.charAt(0)?"-"+e:e)}}i=DefinedInfo}return new i(r,t)}function kebab(e){return"-"+e.toLowerCase()}function camelcase(e){return e.charAt(1).toUpperCase()}const hastToReact={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},html$3=merge([xml,xlink,xmlns,aria,html$4],"html"),svg=merge([xml,xlink,xmlns,aria,svg$1],"svg"),convert$1=function(e){if(null==e)return ok;if("string"==typeof e)return typeFactory(e);if("object"==typeof e)return(Array.isArray(e)?anyFactory:propsFactory)(e);if("function"==typeof e)return castFactory(e);throw new Error("Expected function, string, or object as test")};function anyFactory(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=convert$1(e[t]);return castFactory(function(...e){let t=-1;for(;++t<n.length;)if(n[t].call(this,...e))return!0;return!1})}function propsFactory(n){return castFactory(function(e){let t;for(t in n)if(e[t]!==n[t])return!1;return!0})}function typeFactory(t){return castFactory(function(e){return e&&e.type===t})}function castFactory(n){return function(e,...t){return Boolean(e&&"object"==typeof e&&"type"in e&&Boolean(n.call(this,e,...t)))}}function ok(){return!0}function color(e){return e}const CONTINUE=!0,EXIT=!1,SKIP="skip",visitParents=function(e,l,c,u){"function"==typeof l&&"function"!=typeof c&&(u=c,c=l,l=null);const d=convert$1(l),p=u?-1:1;!function i(o,a,s){const e=o&&"object"==typeof o?o:{};if("string"==typeof e.type){const n="string"==typeof e.tagName?e.tagName:"string"==typeof e.name?e.name:void 0;Object.defineProperty(t,"name",{value:"node ("+color(o.type+(n?"<"+n+">":""))+")"})}return t;function t(){let e=[],t,n,r;if((l&&!d(o,a,s[s.length-1]||null)||(e=toResult(c(o,s)))[0]!==EXIT)&&o.children&&e[0]!==SKIP)for(n=(u?o.children.length:-1)+p,r=s.concat(o);-1<n&&n<o.children.length;){if((t=i(o.children[n],n,r)())[0]===EXIT)return t;n="number"==typeof t[1]?t[1]:n+p}return e}}(e,void 0,[])()};function toResult(e){return Array.isArray(e)?e:"number"==typeof e?[CONTINUE,e]:[e]}const visit=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null),visitParents(e,t,function(e,t){t=t[t.length-1];return n(e,t?t.children.indexOf(e):null,t)},r)};function rehypeFilter(i){if(i.allowedElements&&i.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(i.allowedElements||i.disallowedElements||i.allowElement)return e=>{visit(e,"element",(e,t,n)=>{let r;if(i.allowedElements?r=!i.allowedElements.includes(e.tagName):i.disallowedElements&&(r=i.disallowedElements.includes(e.tagName)),(r=!r&&i.allowElement&&"number"==typeof t?!i.allowElement(e,t,n):r)&&"number"==typeof t)return i.unwrapDisallowed&&e.children?n.children.splice(t,1,...e.children):n.children.splice(t,1),t})}}var x$1,reactIs={exports:{}},reactIs_production_min={},b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l$2=60113,m=60120,n$2=60115,p$1=60116,q$1=60121,r$1=60122,u$1=60117,v$2=60129,w$1=60131;function y$1(t){if("object"==typeof t&&null!==t){var n=t.$$typeof;switch(n){case b:switch(t=t.type){case d:case f:case e:case l$2:case m:return t;default:switch(t=t&&t.$$typeof){case h:case k:case p$1:case n$2:case g:return t;default:return n}}case c:return n}}}"function"==typeof Symbol&&Symbol.for&&(b=(x$1=Symbol.for)("react.element"),c=x$1("react.portal"),d=x$1("react.fragment"),e=x$1("react.strict_mode"),f=x$1("react.profiler"),g=x$1("react.provider"),h=x$1("react.context"),k=x$1("react.forward_ref"),l$2=x$1("react.suspense"),m=x$1("react.suspense_list"),n$2=x$1("react.memo"),p$1=x$1("react.lazy"),q$1=x$1("react.block"),r$1=x$1("react.server.block"),u$1=x$1("react.fundamental"),v$2=x$1("react.debug_trace_mode"),w$1=x$1("react.legacy_hidden"));var z$1=g,A$1=b,B$1=k,C$1=d,D$1=p$1,E$1=n$2,F$1=c,G$1=f,H$1=e,I$2=l$2,ReactIs=(reactIs_production_min.ContextConsumer=h,reactIs_production_min.ContextProvider=z$1,reactIs_production_min.Element=A$1,reactIs_production_min.ForwardRef=B$1,reactIs_production_min.Fragment=C$1,reactIs_production_min.Lazy=D$1,reactIs_production_min.Memo=E$1,reactIs_production_min.Portal=F$1,reactIs_production_min.Profiler=G$1,reactIs_production_min.StrictMode=H$1,reactIs_production_min.Suspense=I$2,reactIs_production_min.isAsyncMode=function(){return!1},reactIs_production_min.isConcurrentMode=function(){return!1},reactIs_production_min.isContextConsumer=function(e){return y$1(e)===h},reactIs_production_min.isContextProvider=function(e){return y$1(e)===g},reactIs_production_min.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===b},reactIs_production_min.isForwardRef=function(e){return y$1(e)===k},reactIs_production_min.isFragment=function(e){return y$1(e)===d},reactIs_production_min.isLazy=function(e){return y$1(e)===p$1},reactIs_production_min.isMemo=function(e){return y$1(e)===n$2},reactIs_production_min.isPortal=function(e){return y$1(e)===c},reactIs_production_min.isProfiler=function(e){return y$1(e)===f},reactIs_production_min.isStrictMode=function(t){return y$1(t)===e},reactIs_production_min.isSuspense=function(e){return y$1(e)===l$2},reactIs_production_min.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===d||t===f||t===v$2||t===e||t===l$2||t===m||t===w$1||"object"==typeof t&&null!==t&&(t.$$typeof===p$1||t.$$typeof===n$2||t.$$typeof===g||t.$$typeof===h||t.$$typeof===k||t.$$typeof===u$1||t.$$typeof===q$1||t[0]===r$1)},reactIs_production_min.typeOf=y$1,reactIs.exports=reactIs_production_min,reactIs.exports);function whitespace(e){e=e&&"object"==typeof e&&"text"===e.type?e.value||"":e;return"string"==typeof e&&""===e.replace(/[ \t\n\f\r]/g,"")}function stringify$2(e){return e.join(" ").trim()}function stringify$1(e,t){t=t||{};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}var COMMENT_REGEX=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,NEWLINE_REGEX=/\n/g,WHITESPACE_REGEX=/^\s*/,PROPERTY_REGEX=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,COLON_REGEX=/^:\s*/,VALUE_REGEX=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,SEMICOLON_REGEX=/^[;\s]*/,TRIM_REGEX=/^\s+|\s+$/g,NEWLINE="\n",FORWARD_SLASH="/",ASTERISK="*",EMPTY_STRING="",TYPE_COMMENT="comment",TYPE_DECLARATION="declaration",inlineStyleParser=function(r,n){if("string"!=typeof r)throw new TypeError("First argument must be a string");if(!r)return[];n=n||{};var i=1,o=1;function a(e){var t=e.match(NEWLINE_REGEX),t=(t&&(i+=t.length),e.lastIndexOf(NEWLINE));o=~t?e.length-t:o+e.length}function s(){var t={line:i,column:o};return function(e){return e.position=new l(t),d(),e}}function l(e){this.start=e,this.end={line:i,column:o},this.source=n.source}function c(e){var t=new Error(n.source+":"+i+":"+o+": "+e);if(t.reason=e,t.filename=n.source,t.line=i,t.column=o,t.source=r,!n.silent)throw t}function u(e){var t,e=e.exec(r);if(e)return a(t=e[0]),r=r.slice(t.length),e}function d(){u(WHITESPACE_REGEX)}function e(e){var t;for(e=e||[];t=p();)!1!==t&&e.push(t)}function p(){var e=s();if(FORWARD_SLASH==r.charAt(0)&&ASTERISK==r.charAt(1)){for(var t,n=2;EMPTY_STRING!=r.charAt(n)&&(ASTERISK!=r.charAt(n)||FORWARD_SLASH!=r.charAt(n+1));)++n;return EMPTY_STRING===r.charAt((n+=2)-1)?c("End of comment missing"):(t=r.slice(2,n-2),o+=2,a(t),r=r.slice(n),o+=2,e({type:TYPE_COMMENT,comment:t}))}}l.prototype.content=r,d();var t,f=[];for(e(f);t=function(){var e,t=s(),n=u(PROPERTY_REGEX);if(n)return p(),u(COLON_REGEX)?(e=u(VALUE_REGEX),t=t({type:TYPE_DECLARATION,property:trim(n[0].replace(COMMENT_REGEX,EMPTY_STRING)),value:e?trim(e[0].replace(COMMENT_REGEX,EMPTY_STRING)):EMPTY_STRING}),u(SEMICOLON_REGEX),t):c("property missing ':'")}();)!1!==t&&(f.push(t),e(f));return f};function trim(e){return e?e.replace(TRIM_REGEX,EMPTY_STRING):EMPTY_STRING}var parse$3=inlineStyleParser;function StyleToObject(e,t){var n=null;if(e&&"string"==typeof e)for(var r,i,o,a=parse$3(e),s="function"==typeof t,l=0,c=a.length;l<c;l++)i=(r=a[l]).property,o=r.value,s?t(i,o,r):o&&((n=n||{})[i]=o);return n}var styleToObject=StyleToObject;const own$1={}.hasOwnProperty,tableElements=new Set(["table","thead","tbody","tfoot","tr"]);function childrenToReact(e,t){var n,r=[];let i=-1;for(;++i<t.children.length;)"element"===(n=t.children[i]).type?r.push(toReact(e,n,i,t)):"text"===n.type?"element"===t.type&&tableElements.has(t.tagName)&&whitespace(n)||r.push(n.value):"raw"!==n.type||e.options.skipHtml||r.push(n.value);return r}function toReact(e,t,n,r){var i=e.options,o=e.schema,a=t.tagName,s={};let l;if("html"===o.space&&"svg"===a&&(c=svg,e.schema=c),t.properties)for(l in t.properties)own$1.call(t.properties,l)&&addProperty(s,l,t.properties[l],e);"ol"!==a&&"ul"!==a||e.listDepth++;var c=childrenToReact(e,t),o=("ol"!==a&&"ul"!==a||e.listDepth--,e.schema=o,t.position||{start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}}),u=i.components&&own$1.call(i.components,a)?i.components[a]:a,d="string"==typeof u||u===React5.Fragment;if(ReactIs.isValidElementType(u))return s.key=[a,o.start.line,o.start.column,n].join("-"),"a"===a&&i.linkTarget&&(s.target="function"==typeof i.linkTarget?i.linkTarget(String(s.href||""),t.children,"string"==typeof s.title?s.title:null):i.linkTarget),"a"===a&&i.transformLinkUri&&(s.href=i.transformLinkUri(String(s.href||""),t.children,"string"==typeof s.title?s.title:null)),d||"code"!==a||"element"!==r.type||"pre"===r.tagName||(s.inline=!0),d||"h1"!==a&&"h2"!==a&&"h3"!==a&&"h4"!==a&&"h5"!==a&&"h6"!==a||(s.level=Number.parseInt(a.charAt(1),10)),"img"===a&&i.transformImageUri&&(s.src=i.transformImageUri(String(s.src||""),String(s.alt||""),"string"==typeof s.title?s.title:null)),d||"li"!==a||"element"!==r.type||(n=getInputElement(t),s.checked=n&&n.properties?Boolean(n.properties.checked):null,s.index=getElementsBeforeCount(r,t),s.ordered="ol"===r.tagName),d||"ol"!==a&&"ul"!==a||(s.ordered="ol"===a,s.depth=e.listDepth),"td"!==a&&"th"!==a||(s.align&&(s.style||(s.style={}),s.style.textAlign=s.align,delete s.align),d)||(s.isHeader="th"===a),d||"tr"!==a||"element"!==r.type||(s.isHeader=Boolean("thead"===r.tagName)),i.sourcePos&&(s["data-sourcepos"]=flattenPosition(o)),!d&&i.rawSourcePos&&(s.sourcePosition=t.position),!d&&i.includeElementIndex&&(s.index=getElementsBeforeCount(r,t),s.siblingCount=getElementsBeforeCount(r)),d||(s.node=t),0<c.length?React5.createElement(u,s,c):React5.createElement(u,s);throw new TypeError(`Component for name \`${a}\` not defined or is not renderable`)}function getInputElement(e){let t=-1;for(;++t<e.children.length;){var n=e.children[t];if("element"===n.type&&"input"===n.tagName)return n}return null}function getElementsBeforeCount(e,t){let n=-1,r=0;for(;++n<e.children.length&&e.children[n]!==t;)"element"===e.children[n].type&&r++;return r}function addProperty(e,t,n,r){r=find$2(r.schema,t);let i=n;null!==i&&void 0!==i&&i==i&&(Array.isArray(i)&&(i=(r.commaSeparated?stringify$1:stringify$2)(i)),"style"===r.property&&"string"==typeof i&&(i=parseStyle(i)),r.space&&r.property?e[own$1.call(hastToReact,r.property)?hastToReact[r.property]:r.property]=i:r.attribute&&(e[r.attribute]=i))}function parseStyle(e){const n={};try{styleToObject(e,function(e,t){e="-ms-"===e.slice(0,4)?"ms-"+e.slice(4):e;n[e.replace(/-([a-z])/g,styleReplacer)]=t})}catch{}return n}function styleReplacer(e,t){return t.toUpperCase()}function flattenPosition(e){return[e.start.line,":",e.start.column,"-",e.end.line,":",e.end.column].map(e=>String(e)).join("")}const own={}.hasOwnProperty,changelog="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",deprecated={renderers:{to:"components",id:"change-renderers-to-components"},astPlugins:{id:"remove-buggy-html-in-markdown-parser"},allowDangerousHtml:{id:"remove-buggy-html-in-markdown-parser"},escapeHtml:{id:"remove-buggy-html-in-markdown-parser"},source:{to:"children",id:"change-source-to-children"},allowNode:{to:"allowElement",id:"replace-allownode-allowedtypes-and-disallowedtypes"},allowedTypes:{to:"allowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},disallowedTypes:{to:"disallowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},includeNodeIndex:{to:"includeElementIndex",id:"change-includenodeindex-to-includeelementindex"}};function ReactMarkdown(e){for(const o in deprecated){var t;own.call(deprecated,o)&&own.call(e,o)&&(t=deprecated[o],console.warn(`[react-markdown] Warning: please ${t.to?`use \`${t.to}\` instead of`:"remove"} \`${o}\` (see <${changelog}#${t.id}> for more info)`),delete deprecated[o])}var n=unified().use(remarkParse).use(e.remarkPlugins||e.plugins||[]).use(remarkRehype$1,{allowDangerousHtml:!0}).use(e.rehypePlugins||[]).use(rehypeFilter,e),r=new VFile$1,n=("string"==typeof e.children?r.value=e.children:void 0!==e.children&&null!==e.children&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`),n.runSync(n.parse(r),r));if("root"!==n.type)throw new TypeError("Expected a `root` node");let i=React5.createElement(React5.Fragment,{},childrenToReact({options:e,schema:html$3,listDepth:0},n));return i=e.className?React5.createElement("div",{className:e.className},i):i}ReactMarkdown.defaultProps={transformLinkUri:uriTransformer},ReactMarkdown.propTypes={children:PropTypes.string,className:PropTypes.string,allowElement:PropTypes.func,allowedElements:PropTypes.arrayOf(PropTypes.string),disallowedElements:PropTypes.arrayOf(PropTypes.string),unwrapDisallowed:PropTypes.bool,remarkPlugins:PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.object,PropTypes.func,PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.object,PropTypes.func]))])),rehypePlugins:PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.object,PropTypes.func,PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.object,PropTypes.func]))])),sourcePos:PropTypes.bool,rawSourcePos:PropTypes.bool,skipHtml:PropTypes.bool,includeElementIndex:PropTypes.bool,transformLinkUri:PropTypes.oneOfType([PropTypes.func,PropTypes.bool]),linkTarget:PropTypes.oneOfType([PropTypes.func,PropTypes.string]),transformImageUri:PropTypes.func,components:PropTypes.object};var isCheckBoxInput=e=>"checkbox"===e.type,isDateObject=e=>e instanceof Date,isNullOrUndefined=e=>null==e;const isObjectType=e=>"object"==typeof e;var isObject$a=e=>!isNullOrUndefined(e)&&!Array.isArray(e)&&isObjectType(e)&&!isDateObject(e),getEventValue=e=>isObject$a(e)&&e.target?isCheckBoxInput(e.target)?e.target.checked:e.target.value:e,getNodeParentName=e=>e.substring(0,e.search(/.\d/))||e,isNameInFieldArray=(e,t)=>[...e].some(e=>getNodeParentName(t)===e),compact=e=>Array.isArray(e)?e.filter(Boolean):[],isUndefined$1=e=>void 0===e,get$1=(e,t,n)=>{var r;return t&&isObject$a(e)?(r=compact(t.split(/[,[\].]+?/)).reduce((e,t)=>isNullOrUndefined(e)?e:e[t],e),isUndefined$1(r)||r===e?isUndefined$1(e[t])?n:e[t]:r):n};const EVENTS={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},VALIDATION_MODE={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},INPUT_VALIDATION_RULES={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},HookFormContext=React5.createContext(null),useFormContext=()=>React5.useContext(HookFormContext),FormProvider=e=>{const{children:t,...n}=e;return React5.createElement(HookFormContext.Provider,{value:n},e.children)};var getProxyFormState=(t,n,r,i=!0)=>{var e={};for(const o in t)Object.defineProperty(e,o,{get:()=>{var e=o;return n[e]!==VALIDATION_MODE.all&&(n[e]=!i||VALIDATION_MODE.all),r&&(r[e]=!0),t[e]}});return e},isEmptyObject=e=>isObject$a(e)&&!Object.keys(e).length,shouldRenderFormState=(e,t,n)=>{const{name:r,...i}=e;return isEmptyObject(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(e=>t[e]===(!n||VALIDATION_MODE.all))},convertToArrayPayload=e=>Array.isArray(e)?e:[e],shouldSubscribeByName=(e,t,n)=>n&&t?e===t:!e||!t||e===t||convertToArrayPayload(e).some(e=>e&&(e.startsWith(t)||t.startsWith(e)));function useSubscribe(e){const n=React5.useRef(e);n.current=e,React5.useEffect(()=>{const t=!e.disabled&&n.current.subject.subscribe({next:n.current.callback});return()=>{var e;(e=t)&&e.unsubscribe()}},[e.disabled])}function useFormState(e){var t=useFormContext();const{control:n=t.control,disabled:r,name:i,exact:o}=e||{},[a,s]=React5.useState(n._formState),l=React5.useRef({isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=React5.useRef(i),u=React5.useRef(!0);return c.current=i,useSubscribe({disabled:r,callback:React5.useCallback(e=>u.current&&shouldSubscribeByName(c.current,e.name,o)&&shouldRenderFormState(e,l.current)&&s({...n._formState,...e}),[n,o]),subject:n._subjects.state}),React5.useEffect(()=>(u.current=!0,()=>{u.current=!1}),[]),getProxyFormState(a,n._proxyFormState,l.current,!1)}var isString$1=e=>"string"==typeof e,generateWatchOutput=(e,t,n,r)=>{var i=Array.isArray(e);return isString$1(e)?(r&&t.watch.add(e),get$1(n,e)):i?e.map(e=>(r&&t.watch.add(e),get$1(n,e))):(r&&(t.watchAll=!0),n)},isFunction=e=>"function"==typeof e,objectHasFunction=e=>{for(const t in e)if(isFunction(e[t]))return!0;return!1};function useWatch(e){var t=useFormContext();const{control:n=t.control,name:r,defaultValue:i,disabled:o,exact:a}=e||{},s=React5.useRef(r);s.current=r;e=React5.useCallback(e=>{shouldSubscribeByName(s.current,e.name,a)&&(e=generateWatchOutput(s.current,n._names,e.values||n._formValues),c(isUndefined$1(s.current)||isObject$a(e)&&!objectHasFunction(e)?{...e}:Array.isArray(e)?[...e]:isUndefined$1(e)?i:e))},[n,a,i]);useSubscribe({disabled:o,subject:n._subjects.watch,callback:e});const[l,c]=React5.useState(isUndefined$1(i)?n._getWatch(r):i);return React5.useEffect(()=>{n._removeUnmounted()}),l}function useController(e){var t=useFormContext();const{name:n,control:r=t.control,shouldUnregister:i}=e,o=isNameInFieldArray(r._names.array,n);var t=useWatch({control:r,name:n,defaultValue:get$1(r._formValues,n,get$1(r._defaultValues,n,e.defaultValue)),exact:!0}),a=useFormState({control:r,name:n});const s=React5.useRef(r.register(n,{...e.rules,value:t}));return React5.useEffect(()=>{const t=(e,t)=>{e=get$1(r._fields,e);e&&(e._f.mount=t)};return t(n,!0),()=>{var e=r._options.shouldUnregister||i;(o?e&&!r._stateFlags.action:e)?r.unregister(n):t(n,!1)}},[n,r,o,i]),{field:{name:n,value:t,onChange:React5.useCallback(e=>{s.current.onChange({target:{value:getEventValue(e),name:n},type:EVENTS.CHANGE})},[n]),onBlur:React5.useCallback(()=>{s.current.onBlur({target:{value:get$1(r._formValues,n),name:n},type:EVENTS.BLUR})},[n,r]),ref:React5.useCallback(t=>{var e=get$1(r._fields,n);t&&e&&t.focus&&(e._f.ref={focus:()=>t.focus(),setCustomValidity:e=>t.setCustomValidity(e),reportValidity:()=>t.reportValidity()})},[n,r._fields])},formState:a,fieldState:r.getFieldState(n,a)}}const Controller=e=>e.render(useController(e));var appendErrors=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},isKey=e=>/^\w*$/.test(e),stringToPath=e=>compact(e.replace(/["|']|\]/g,"").split(/\.|\[/));function set$2(t,e,n){let r=-1;for(var i=isKey(e)?[e]:stringToPath(e),o=i.length,a=o-1;++r<o;){var s,l=i[r];let e=n;r!==a&&(s=t[l],e=isObject$a(s)||Array.isArray(s)?s:isNaN(+i[r+1])?{}:[]),t[l]=e,t=t[l]}return t}const focusFieldBy=(e,t,n)=>{for(const i of n||Object.keys(e)){var r=get$1(e,i);if(r){const{_f:o,...a}=r;if(o&&t(o.name)){if(o.ref.focus&&isUndefined$1(o.ref.focus()))break;if(o.refs){o.refs[0].focus();break}}else isObject$a(a)&&focusFieldBy(a,t)}}};var generateId=()=>{const n="undefined"==typeof performance?Date.now():1e3*performance.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{var t=(16*Math.random()+n)%16|0;return("x"==e?t:3&t|8).toString(16)})},getFocusFieldName=(e,t,n={})=>n.shouldFocus||isUndefined$1(n.shouldFocus)?n.focusName||`${e}.${isUndefined$1(n.focusIndex)?t:n.focusIndex}.`:"",isWatched=(t,e,n)=>!n&&(e.watchAll||e.watch.has(t)||[...e.watch].some(e=>t.startsWith(e)&&/^\.\w+/.test(t.slice(e.length))));function append(e,t){return[...e,...convertToArrayPayload(t)]}function cloneObject(e){let t;var n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(!n&&!isObject$a(e))return e;t=n?[]:{};for(const r in e){if(isFunction(e[r])){t=e;break}t[r]=cloneObject(e[r])}}return t}var fillEmptyArray=e=>Array.isArray(e)?e.map(()=>{}):void 0;function insert(e,t,n){return[...e.slice(0,t),...convertToArrayPayload(n),...e.slice(t)]}var moveArrayAt=(e,t,n)=>Array.isArray(e)?(isUndefined$1(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[];function prepend(e,t){return[...convertToArrayPayload(t),...convertToArrayPayload(e)]}function removeAtIndexes(e,t){let n=0;var r=[...e];for(const i of t)r.splice(i-n,1),n++;return compact(r).length?r:[]}var removeArrayAt=(e,t)=>isUndefined$1(t)?[]:removeAtIndexes(e,convertToArrayPayload(t).sort((e,t)=>e-t)),swapArrayAt=(e,t,n)=>{e[t]=[e[n],e[n]=e[t]][0]},updateAt=(e,t,n)=>(e[t]=n,e);function useFieldArray(e){var t=useFormContext();const{control:o=t.control,name:a,keyName:n="id",shouldUnregister:r}=e,[i,s]=React5.useState(o._getFieldArray(a)),l=React5.useRef(o._getFieldArray(a).map(generateId));e=React5.useRef(i);const c=React5.useRef(a),u=React5.useRef(!1),d=(c.current=a,e.current=i,o._names.array.add(a),useSubscribe({callback:React5.useCallback(({values:e,name:t})=>{t!==c.current&&t||(t=get$1(e,c.current,[]),s(t),l.current=t.map(generateId))},[]),subject:o._subjects.array}),React5.useCallback(e=>{u.current=!0,o._updateFieldArray(a,e)},[o,a]));return React5.useEffect(()=>{o._stateFlags.action=!1,isWatched(a,o._names)&&o._subjects.state.next({}),u.current&&o._executeSchema([a]).then(e=>{e=get$1(e.errors,a);e&&e.type&&!get$1(o._formState.errors,a)&&(set$2(o._formState.errors,a,e),o._subjects.state.next({errors:o._formState.errors}))}),o._subjects.watch.next({name:a,values:o._formValues}),o._names.focus&&focusFieldBy(o._fields,e=>e.startsWith(o._names.focus)),o._names.focus="",o._proxyFormState.isValid&&o._updateValid()},[i,a,o]),React5.useEffect(()=>(get$1(o._formValues,a)||o._updateFieldArray(a),()=>{(o._options.shouldUnregister||r)&&o.unregister(a)}),[a,o,n,r]),{swap:React5.useCallback((e,t)=>{var n=o._getFieldArray(a);swapArrayAt(n,e,t),swapArrayAt(l.current,e,t),d(n),s(n),o._updateFieldArray(a,n,swapArrayAt,{argA:e,argB:t},!1)},[d,a,o]),move:React5.useCallback((e,t)=>{var n=o._getFieldArray(a);moveArrayAt(n,e,t),moveArrayAt(l.current,e,t),d(n),s(n),o._updateFieldArray(a,n,moveArrayAt,{argA:e,argB:t},!1)},[d,a,o]),prepend:React5.useCallback((e,t)=>{var n=convertToArrayPayload(cloneObject(e)),r=prepend(o._getFieldArray(a),n);o._names.focus=getFocusFieldName(a,0,t),l.current=prepend(l.current,n.map(generateId)),d(r),s(r),o._updateFieldArray(a,r,prepend,{argA:fillEmptyArray(e)})},[d,a,o]),append:React5.useCallback((e,t)=>{var n=convertToArrayPayload(cloneObject(e)),r=append(o._getFieldArray(a),n);o._names.focus=getFocusFieldName(a,r.length-1,t),l.current=append(l.current,n.map(generateId)),d(r),s(r),o._updateFieldArray(a,r,append,{argA:fillEmptyArray(e)})},[d,a,o]),remove:React5.useCallback(e=>{var t=removeArrayAt(o._getFieldArray(a),e);l.current=removeArrayAt(l.current,e),d(t),s(t),o._updateFieldArray(a,t,removeArrayAt,{argA:e})},[d,a,o]),insert:React5.useCallback((e,t,n)=>{var r=convertToArrayPayload(cloneObject(t)),i=insert(o._getFieldArray(a),e,r);o._names.focus=getFocusFieldName(a,e,n),l.current=insert(l.current,e,r.map(generateId)),d(i),s(i),o._updateFieldArray(a,i,insert,{argA:e,argB:fillEmptyArray(t)})},[d,a,o]),update:React5.useCallback((n,e)=>{var e=cloneObject(e),t=updateAt(o._getFieldArray(a),n,e);l.current=[...t].map((e,t)=>e&&t!==n?l.current[t]:generateId()),d(t),s([...t]),o._updateFieldArray(a,t,updateAt,{argA:n,argB:e},!0,!1)},[d,a,o]),replace:React5.useCallback(e=>{e=convertToArrayPayload(cloneObject(e));l.current=e.map(generateId),d([...e]),s([...e]),o._updateFieldArray(a,[...e],e=>e,{},!0,!1)},[d,a,o]),fields:React5.useMemo(()=>i.map((e,t)=>({...e,[n]:l.current[t]||generateId()})),[i,n])}}function createSubject(){let n=[];return{get observers(){return n},next:e=>{for(const t of n)t.next(e)},subscribe:t=>(n.push(t),{unsubscribe:()=>{n=n.filter(e=>e!==t)}}),unsubscribe:()=>{n=[]}}}var isPrimitive=e=>isNullOrUndefined(e)||!isObjectType(e);function deepEqual(e,t){if(isPrimitive(e)||isPrimitive(t))return e===t;if(isDateObject(e)&&isDateObject(t))return e.getTime()===t.getTime();var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const a of n){var i=e[a];if(!r.includes(a))return!1;if("ref"!==a){var o=t[a];if(isDateObject(i)&&isDateObject(o)||isObject$a(i)&&isObject$a(o)||Array.isArray(i)&&Array.isArray(o)?!deepEqual(i,o):i!==o)return!1}}return!0}var getValidationModes=e=>({isOnSubmit:!e||e===VALIDATION_MODE.onSubmit,isOnBlur:e===VALIDATION_MODE.onBlur,isOnChange:e===VALIDATION_MODE.onChange,isOnAll:e===VALIDATION_MODE.all,isOnTouch:e===VALIDATION_MODE.onTouched}),isBoolean=e=>"boolean"==typeof e,isFileInput=e=>"file"===e.type,isHTMLElement=e=>e instanceof HTMLElement,isMultipleSelect=e=>"select-multiple"===e.type,isRadioInput=e=>"radio"===e.type,isRadioOrCheckbox=e=>isRadioInput(e)||isCheckBoxInput(e),isWeb="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document,live=e=>isHTMLElement(e)&&e.isConnected;function baseGet(e,t){var n=t.slice(0,-1).length;let r=0;for(;r<n;)e=isUndefined$1(e)?r++:e[t[r++]];return e}function unset(r,e){var i=isKey(e)?[e]:stringToPath(e),e=1==i.length?r:baseGet(r,i),t=i[i.length-1];let o;e&&delete e[t];for(let n=0;n<i.slice(0,-1).length;n++){let e=-1,t;var a=i.slice(0,-(n+1)),s=a.length-1;for(0<n&&(o=r);++e<a.length;){var l=a[e];t=(t||r)[l],s===e&&(isObject$a(t)&&isEmptyObject(t)||Array.isArray(t)&&!t.filter(e=>!isUndefined$1(e)).length)&&(o?delete o[l]:delete r[l]),o=t}}return r}function markFieldsDirty(e,t={}){var n=Array.isArray(e);if(isObject$a(e)||n)for(const r in e)Array.isArray(e[r])||isObject$a(e[r])&&!objectHasFunction(e[r])?(t[r]=Array.isArray(e[r])?[]:{},markFieldsDirty(e[r],t[r])):isNullOrUndefined(e[r])||(t[r]=!0);return t}function getDirtyFieldsFromDefaultValues(e,t,n){var r=Array.isArray(e);if(isObject$a(e)||r)for(const i in e)Array.isArray(e[i])||isObject$a(e[i])&&!objectHasFunction(e[i])?isUndefined$1(t)||isPrimitive(n[i])?n[i]=Array.isArray(e[i])?markFieldsDirty(e[i],[]):{...markFieldsDirty(e[i])}:getDirtyFieldsFromDefaultValues(e[i],isNullOrUndefined(t)?{}:t[i],n[i]):n[i]=!deepEqual(e[i],t[i]);return n}var getDirtyFields=(e,t)=>getDirtyFieldsFromDefaultValues(e,t,markFieldsDirty(t));const defaultResult={value:!1,isValid:!1},validResult={value:!0,isValid:!0};var getCheckboxValue=e=>{var t;return Array.isArray(e)?1<e.length?{value:t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value),isValid:!!t.length}:e[0].checked&&!e[0].disabled?!e[0].attributes||isUndefined$1(e[0].attributes.value)||isUndefined$1(e[0].value)||""===e[0].value?validResult:{value:e[0].value,isValid:!0}:defaultResult:defaultResult},getFieldValueAs=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>isUndefined$1(e)?e:t?""===e?NaN:+e:n&&isString$1(e)?new Date(e):r?r(e):e;const defaultReturn={isValid:!1,value:null};var getRadioValue=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,defaultReturn):defaultReturn;function getFieldValue(e){var t=e.ref;if(e.refs?!e.refs.every(e=>e.disabled):!t.disabled)return isFileInput(t)?t.files:isRadioInput(t)?getRadioValue(e.refs).value:isMultipleSelect(t)?[...t.selectedOptions].map(({value:e})=>e):isCheckBoxInput(t)?getCheckboxValue(e.refs).value:getFieldValueAs((isUndefined$1(t.value)?e.ref:t).value,e)}var getResolverOptions=(e,t,n,r)=>{var i={};for(const a of e){var o=get$1(t,a);o&&set$2(i,a,o._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},isRegex=e=>e instanceof RegExp,getRuleValue=e=>isUndefined$1(e)?void 0:isRegex(e)?e.source:isObject$a(e)?isRegex(e.value)?e.value.source:e.value:e,hasValidation=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function schemaErrorLookup(e,t,n){var r=get$1(e,n);if(r||isKey(n))return{error:r,name:n};for(var i=n.split(".");i.length;){var o=i.join("."),a=get$1(t,o),s=get$1(e,o);if(a&&!Array.isArray(a)&&n!==o)return{name:n};if(s&&s.type)return{name:o,error:s};i.pop()}return{name:n}}var skipValidation=(e,t,n,r,i)=>!i.isOnAll&&(!n&&i.isOnTouch?!(t||e):(n?r:i).isOnBlur?!e:!(n?r:i).isOnChange||e),unsetEmptyArray=(e,t)=>!compact(get$1(e,t)).length&&unset(e,t),isMessage=e=>isString$1(e)||React5.isValidElement(e);function getValidateError(e,t,n="validate"){if(isMessage(e)||Array.isArray(e)&&e.every(isMessage)||isBoolean(e)&&!e)return{type:n,message:isMessage(e)?e:"",ref:t}}var getValueAndMessage=e=>isObject$a(e)&&!isRegex(e)?e:{value:e,message:""},validateField=async(n,r,i,t)=>{const{ref:o,refs:e,required:a,maxLength:s,minLength:l,min:c,max:u,pattern:d,validate:p,name:f,valueAsNumber:h,mount:m,disabled:g}=n._f;if(!m||g)return{};const y=e?e[0]:o;var v=e=>{t&&y.reportValidity&&(y.setCustomValidity(isBoolean(e)?"":e||" "),y.reportValidity())};const x={};var n=isRadioInput(o),b=isCheckBoxInput(o),$=n||b,C=(h||isFileInput(o))&&!o.value||""===r||Array.isArray(r)&&!r.length;const S=appendErrors.bind(null,f,i,x);var w=(e,t,n,r=INPUT_VALIDATION_RULES.maxLength,i=INPUT_VALIDATION_RULES.minLength)=>{t=e?t:n;x[f]={type:e?r:i,message:t,ref:o,...S(e?r:i,t)}};if(a&&(!$&&(C||isNullOrUndefined(r))||isBoolean(r)&&!r||b&&!getCheckboxValue(e).isValid||n&&!getRadioValue(e).isValid)){var{value:$,message:b}=isMessage(a)?{value:!!a,message:a}:getValueAndMessage(a);if($&&(x[f]={type:INPUT_VALIDATION_RULES.required,message:b,ref:y,...S(INPUT_VALIDATION_RULES.required,b)},!i))return v(b),x}if(!(C||isNullOrUndefined(c)&&isNullOrUndefined(u))){let e,t;n=getValueAndMessage(u),$=getValueAndMessage(c);if(isNaN(r)?(b=o.valueAsDate||new Date(r),isString$1(n.value)&&(e=b>new Date(n.value)),isString$1($.value)&&(t=b<new Date($.value))):(b=o.valueAsNumber||+r,isNullOrUndefined(n.value)||(e=b>n.value),isNullOrUndefined($.value)||(t=b<$.value)),(e||t)&&(w(!!e,n.message,$.message,INPUT_VALIDATION_RULES.max,INPUT_VALIDATION_RULES.min),!i))return v(x[f].message),x}if((s||l)&&!C&&isString$1(r)){var b=getValueAndMessage(s),n=getValueAndMessage(l),$=!isNullOrUndefined(b.value)&&r.length>b.value,_=!isNullOrUndefined(n.value)&&r.length<n.value;if(($||_)&&(w($,b.message,n.message),!i))return v(x[f].message),x}if(d&&!C&&isString$1(r)){var{value:_,message:w}=getValueAndMessage(d);if(isRegex(_)&&!r.match(_)&&(x[f]={type:INPUT_VALIDATION_RULES.pattern,message:w,ref:o,...S(INPUT_VALIDATION_RULES.pattern,w)},!i))return v(w),x}if(p)if(isFunction(p)){$=getValidateError(await p(r),y);if($&&(x[f]={...$,...S(INPUT_VALIDATION_RULES.validate,$.message)},!i))return v($.message),x}else if(isObject$a(p)){let e={};for(const E in p){if(!isEmptyObject(e)&&!i)break;var T=getValidateError(await p[E](r),y,E);T&&(e={...T,...S(E,T.message)},v(T.message),i)&&(x[f]=e)}if(!isEmptyObject(e)&&(x[f]={ref:y,...e},!i))return x}return v(!0),x};const defaultOptions$1={mode:VALIDATION_MODE.onSubmit,reValidateMode:VALIDATION_MODE.onChange,shouldFocusError:!0};function createFormControl(c={}){let u={...defaultOptions$1,...c},d={isDirty:!1,isValidating:!1,dirtyFields:{},isSubmitted:!1,submitCount:0,touchedFields:{},isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,errors:{}},p={},f=cloneObject(u.defaultValues)||{},h=u.shouldUnregister?{}:cloneObject(f),s={action:!1,mount:!1,watch:!1},m={mount:new Set,unMount:new Set,array:new Set,watch:new Set},g,y=0,v={};const x={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},b={watch:createSubject(),array:createSubject(),state:createSubject()},$=getValidationModes(u.mode),C=getValidationModes(u.reValidateMode),S=u.criteriaMode===VALIDATION_MODE.all,w=async e=>{let t=!1;return x.isValid&&(t=u.resolver?isEmptyObject((await j()).errors):await l(p,!0),e||t===d.isValid||(d.isValid=t,b.state.next({isValid:t}))),t};const _=(e,t)=>(set$2(d.errors,e,t),b.state.next({errors:d.errors})),a=(e,t,n,r)=>{var i=get$1(p,e);i&&(n=get$1(h,e,isUndefined$1(n)?get$1(f,e):n),isUndefined$1(n)||r&&r.defaultChecked||t?set$2(h,e,t?n:getFieldValue(i._f)):I(e,n),s.mount)&&w()},T=(e,t,n,r,i)=>{let o=!1;var a,s={name:e},l=get$1(d.touchedFields,e);return x.isDirty&&(a=d.isDirty,d.isDirty=s.isDirty=R(),o=a!==s.isDirty),!x.dirtyFields||n&&!r||(a=get$1(d.dirtyFields,e),deepEqual(get$1(f,e),t)?unset(d.dirtyFields,e):set$2(d.dirtyFields,e,!0),s.dirtyFields=d.dirtyFields,o=o||a!==get$1(d.dirtyFields,e)),n&&!l&&(set$2(d.touchedFields,e,n),s.touchedFields=d.touchedFields,o=o||x.touchedFields&&l!==n),o&&i&&b.state.next(s),o?s:{}},E=async(e,t,n,r,i)=>{var o,a,s=get$1(d.errors,t),l=x.isValid&&d.isValid!==n;c.delayError&&r?(g=g||(o=_,a=c.delayError,(...e)=>{clearTimeout(y),y=window.setTimeout(()=>o(...e),a)}))(t,r):(clearTimeout(y),r?set$2(d.errors,t,r):unset(d.errors,t)),(r?deepEqual(s,r):!s)&&isEmptyObject(i)&&!l||e||(r={...i,...l?{isValid:n}:{},errors:d.errors,name:t},d={...d,...r},b.state.next(r)),v[t]--,x.isValidating&&!Object.values(v).some(e=>e)&&(b.state.next({isValidating:!1}),v={})},j=async e=>u.resolver?await u.resolver({...h},u.context,getResolverOptions(e||m.mount,p,u.criteriaMode,u.shouldUseNativeValidation)):{},l=async(e,t,n={valid:!0})=>{for(const i in e){var r=e[i];if(r){const{_f:o,...a}=r;if(o){r=await validateField(r,get$1(h,o.name),S,u.shouldUseNativeValidation);if(r[o.name]&&(n.valid=!1,t))break;t||(r[o.name]?set$2(d.errors,o.name,r[o.name]):unset(d.errors,o.name))}a&&await l(a,t,n)}}return n.valid};const R=(e,t)=>(e&&t&&set$2(h,e,t),!deepEqual(i(),f)),r=(e,t,n)=>{t={...s.mount?h:isUndefined$1(t)?f:isString$1(e)?{[e]:t}:t};return generateWatchOutput(e,m,t,n)};const I=(e,t,n={})=>{var r=get$1(p,e);let i=t;r&&(r=r._f)&&(r.disabled||set$2(h,e,getFieldValueAs(t,r)),i=isWeb&&isHTMLElement(r.ref)&&isNullOrUndefined(t)?"":t,isMultipleSelect(r.ref)?[...r.ref.options].forEach(e=>e.selected=i.includes(e.value)):r.refs?isCheckBoxInput(r.ref)?1<r.refs.length?r.refs.forEach(t=>!t.disabled&&(t.checked=Array.isArray(i)?!!i.find(e=>e===t.value):i===t.value)):r.refs[0]&&(r.refs[0].checked=!!i):r.refs.forEach(e=>e.checked=e.value===i):isFileInput(r.ref)?r.ref.value="":(r.ref.value=i,r.ref.type||b.watch.next({name:e}))),(n.shouldDirty||n.shouldTouch)&&T(e,i,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&k(e)},O=(e,t,n)=>{for(const a in t){var r=t[a],i=e+"."+a,o=get$1(p,i);(!m.array.has(e)&&isPrimitive(r)&&(!o||o._f)||isDateObject(r)?I:O)(i,r,n)}},n=(e,t,n={})=>{var r=get$1(p,e),i=m.array.has(e),t=cloneObject(t);set$2(h,e,t),i?(b.array.next({name:e,values:h}),(x.isDirty||x.dirtyFields)&&n.shouldDirty&&(d.dirtyFields=getDirtyFields(f,h),b.state.next({name:e,dirtyFields:d.dirtyFields,isDirty:R(e,t)}))):(!r||r._f||isNullOrUndefined(t)?I:O)(e,t,n),isWatched(e,m)&&b.state.next({}),b.watch.next({name:e})},t=async n=>{var r=n.target;let i=r.name;var o=get$1(p,i);if(o){let e,t;var r=r.type?getFieldValue(o._f):getEventValue(n),a=n.type===EVENTS.BLUR||n.type===EVENTS.FOCUS_OUT,s=!hasValidation(o._f)&&!u.resolver&&!get$1(d.errors,i)&&!o._f.deps||skipValidation(a,get$1(d.touchedFields,i),d.isSubmitted,C,$),l=isWatched(i,m,a),r=(set$2(h,i,r),a?o._f.onBlur&&o._f.onBlur(n):o._f.onChange&&o._f.onChange(n),T(i,r,a,!1)),c=!isEmptyObject(r)||l;if(a||b.watch.next({name:i,type:n.type}),s)return c&&b.state.next({name:i,...l?{}:r});!a&&l&&b.state.next({}),v[i]=(v[i],1),b.state.next({isValidating:!0}),t=u.resolver?(n=(await j([i]))["errors"],s=schemaErrorLookup(d.errors,p,i),c=schemaErrorLookup(n,p,s.name||i),e=c.error,i=c.name,isEmptyObject(n)):(e=(await validateField(o,get$1(h,i),S,u.shouldUseNativeValidation))[i],await w(!0)),o._f.deps&&k(o._f.deps),E(!1,i,t,e,r)}},k=async(e,t={})=>{let n,r;var i=convertToArrayPayload(e);if(b.state.next({isValidating:!0}),u.resolver){const o=await(async e=>{var t=(await j())["errors"];if(e)for(const r of e){var n=get$1(t,r);n?set$2(d.errors,r,n):unset(d.errors,r)}else d.errors=t;return t})(isUndefined$1(e)?e:i);n=isEmptyObject(o),r=e?!i.some(e=>get$1(o,e)):n}else e?((r=(await Promise.all(i.map(async e=>{var t=get$1(p,e);return l(t&&t._f?{[e]:t}:t)}))).every(Boolean))||d.isValid)&&w():r=n=await l(p);return b.state.next({...!isString$1(e)||x.isValid&&n!==d.isValid?{}:{name:e},...u.resolver?{isValid:n}:{},errors:d.errors,isValidating:!1}),t.shouldFocus&&!r&&focusFieldBy(p,e=>get$1(d.errors,e),e?i:m.mount),r},i=e=>{const t={...f,...s.mount?h:{}};return isUndefined$1(e)?t:isString$1(e)?get$1(t,e):e.map(e=>get$1(t,e))};var e=(e,t)=>({invalid:!!get$1((t||d).errors,e),isDirty:!!get$1((t||d).dirtyFields,e),isTouched:!!get$1((t||d).touchedFields,e),error:get$1((t||d).errors,e)});const o=(e,t={})=>{for(const n of e?convertToArrayPayload(e):m.mount)m.mount.delete(n),m.array.delete(n),get$1(p,n)&&(t.keepValue||(unset(p,n),unset(h,n)),t.keepError||unset(d.errors,n),t.keepDirty||unset(d.dirtyFields,n),t.keepTouched||unset(d.touchedFields,n),u.shouldUnregister||t.keepDefaultValue||unset(f,n));b.watch.next({}),b.state.next({...d,...t.keepDirty?{isDirty:R()}:{}}),t.keepIsValid||w()},A=(r,i={})=>{let o=get$1(p,r);var e=isBoolean(i.disabled);return set$2(p,r,{_f:{...o&&o._f?o._f:{ref:{name:r}},name:r,mount:!0,...i}}),m.mount.add(r),o?e&&set$2(h,r,i.disabled?void 0:get$1(h,r,getFieldValue(o._f))):a(r,!0,i.value),{...e?{disabled:i.disabled}:{},...u.shouldUseNativeValidation?{required:!!i.required,min:getRuleValue(i.min),max:getRuleValue(i.max),minLength:getRuleValue(i.minLength),maxLength:getRuleValue(i.maxLength),pattern:getRuleValue(i.pattern)}:{},name:r,onChange:t,onBlur:t,ref:e=>{if(e){A(r,i),o=get$1(p,r);const n=isUndefined$1(e.value)&&e.querySelectorAll&&e.querySelectorAll("input,select,textarea")[0]||e;var e=isRadioOrCheckbox(n),t=o._f.refs||[];(e?t.find(e=>e===n):n===o._f.ref)||(set$2(p,r,{_f:{...o._f,...e?{refs:[...t.filter(live),n],ref:{type:n.type,name:r}}:{ref:n}}}),a(r,!1,void 0,n))}else(o=get$1(p,r,{}))._f&&(o._f.mount=!1),!u.shouldUnregister&&!i.shouldUnregister||isNameInFieldArray(m.array,r)&&s.action||m.unMount.add(r)}}};return{control:{register:A,unregister:o,getFieldState:e,_executeSchema:j,_getWatch:r,_getDirty:R,_updateValid:w,_removeUnmounted:()=>{for(const t of m.unMount){var e=get$1(p,t);e&&(e._f.refs?e._f.refs.every(e=>!live(e)):!live(e._f.ref))&&o(t)}m.unMount=new Set},_updateFieldArray:(e,t=[],n,r,i=!0,o=!0)=>{var a;r&&n?(s.action=!0,o&&Array.isArray(get$1(p,e))&&(a=n(get$1(p,e),r.argA,r.argB),i)&&set$2(p,e,a),x.errors&&o&&Array.isArray(get$1(d.errors,e))&&(a=n(get$1(d.errors,e),r.argA,r.argB),i&&set$2(d.errors,e,a),unsetEmptyArray(d.errors,e)),x.touchedFields&&o&&Array.isArray(get$1(d.touchedFields,e))&&(a=n(get$1(d.touchedFields,e),r.argA,r.argB),i)&&set$2(d.touchedFields,e,a),x.dirtyFields&&(d.dirtyFields=getDirtyFields(f,h)),b.state.next({isDirty:R(e,t),dirtyFields:d.dirtyFields,errors:d.errors,isValid:d.isValid})):set$2(h,e,t)},_getFieldArray:e=>compact(get$1(s.mount?h:f,e,c.shouldUnregister?get$1(f,e,[]):[])),_subjects:b,_proxyFormState:x,get _fields(){return p},get _formValues(){return h},get _stateFlags(){return s},set _stateFlags(e){s=e},get _defaultValues(){return f},get _names(){return m},set _names(e){m=e},get _formState(){return d},set _formState(e){d=e},get _options(){return u},set _options(e){u={...u,...e}}},trigger:k,register:A,handleSubmit:(o,a)=>async e=>{e&&(e.preventDefault&&e.preventDefault(),e.persist)&&e.persist();let t=!0,n=cloneObject(h);b.state.next({isSubmitting:!0});try{var r,i;u.resolver?({errors:r,values:i}=await j(),d.errors=r,n=i):await l(p),isEmptyObject(d.errors)&&Object.keys(d.errors).every(e=>get$1(n,e))?(b.state.next({errors:{},isSubmitting:!0}),await o(n,e)):(a&&await a({...d.errors},e),u.shouldFocusError&&focusFieldBy(p,e=>get$1(d.errors,e),m.mount))}catch(e){throw t=!1,e}finally{d.isSubmitted=!0,b.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:isEmptyObject(d.errors)&&t,submitCount:d.submitCount+1,errors:d.errors})}},watch:(t,n)=>isFunction(t)?b.watch.subscribe({next:e=>t(r(void 0,n),e)}):r(t,n,!0),setValue:n,getValues:i,reset:(e,t={})=>{var n=e||f,r=cloneObject(n),i=e&&!isEmptyObject(e)?r:f;if(t.keepDefaultValues||(f=n),!t.keepValues){if(isWeb&&isUndefined$1(e))for(const a of m.mount){var o=get$1(p,a);if(o&&o._f){o=Array.isArray(o._f.refs)?o._f.refs[0]:o._f.ref;try{isHTMLElement(o)&&o.closest("form").reset();break}catch(e){}}}h=c.shouldUnregister?t.keepDefaultValues?cloneObject(f):{}:r,p={},b.array.next({values:i}),b.watch.next({values:i})}m={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!x.isValid||!!t.keepIsValid,s.watch=!!c.shouldUnregister,b.state.next({submitCount:t.keepSubmitCount?d.submitCount:0,isDirty:t.keepDirty?d.isDirty:!!t.keepDefaultValues&&!deepEqual(e,f),isSubmitted:!!t.keepIsSubmitted&&d.isSubmitted,dirtyFields:t.keepDirty?d.dirtyFields:t.keepDefaultValues&&e?Object.entries(e).reduce((e,[t,n])=>({...e,[t]:n!==get$1(f,t)}),{}):{},touchedFields:t.keepTouched?d.touchedFields:{},errors:t.keepErrors?d.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},resetField:(e,t={})=>{get$1(p,e)&&(isUndefined$1(t.defaultValue)?n(e,get$1(f,e)):(n(e,t.defaultValue),set$2(f,e,t.defaultValue)),t.keepTouched||unset(d.touchedFields,e),t.keepDirty||(unset(d.dirtyFields,e),d.isDirty=t.defaultValue?R(e,get$1(f,e)):R()),t.keepError||(unset(d.errors,e),x.isValid&&w()),b.state.next({...d}))},clearErrors:e=>{e?convertToArrayPayload(e).forEach(e=>unset(d.errors,e)):d.errors={},b.state.next({errors:d.errors})},unregister:o,setError:(e,t,n)=>{var r=(get$1(p,e,{_f:{}})._f||{}).ref;set$2(d.errors,e,{...t,ref:r}),b.state.next({name:e,errors:d.errors,isValid:!1}),n&&n.shouldFocus&&r&&r.focus&&r.focus()},setFocus:(e,t={})=>{e=get$1(p,e)._f,e=e.refs?e.refs[0]:e.ref;t.shouldSelect?e.select():e.focus()},getFieldState:e}}function useForm(e={}){var t=React5.useRef();const[n,r]=React5.useState({isDirty:!1,isValidating:!1,dirtyFields:{},isSubmitted:!1,submitCount:0,touchedFields:{},isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,errors:{}}),i=(t.current?t.current.control._options=e:t.current={...createFormControl(e),formState:n},t.current.control);e=React5.useCallback(e=>{shouldRenderFormState(e,i._proxyFormState,!0)&&(i._formState={...i._formState,...e},r({...i._formState}))},[i]);return useSubscribe({subject:i._subjects.state,callback:e}),React5.useEffect(()=>{i._stateFlags.mount||(i._proxyFormState.isValid&&i._updateValid(),i._stateFlags.mount=!0),i._stateFlags.watch&&(i._stateFlags.watch=!1,i._subjects.state.next({})),i._removeUnmounted()}),t.current.formState=getProxyFormState(n,i._proxyFormState),t.current}var baseIteratee$1=_baseIteratee,isArrayLike=isArrayLike_1,keys$1=keys_1;function createFind$1(o){return function(e,t,n){var r,i=Object(e),t=(isArrayLike(e)||(r=baseIteratee$1(t),e=keys$1(e),t=function(e){return r(i[e],e,i)}),o(e,t,n));return-1<t?i[r?e[t]:t]:void 0}}var _createFind=createFind$1;function baseFindIndex$1(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}var _baseFindIndex=baseFindIndex$1,baseFindIndex=_baseFindIndex,baseIteratee=_baseIteratee,toInteger$1=toInteger_1,nativeMax$1=Math.max;function findIndex$4(e,t,n){var r=null==e?0:e.length;return r?((n=null==n?0:toInteger$1(n))<0&&(n=nativeMax$1(r+n,0)),baseFindIndex(e,baseIteratee(t),n)):-1}var findIndex_1=findIndex$4,createFind=_createFind,findIndex$3=findIndex_1,find$1=_createFind(findIndex_1),find_1=find$1;function arrayIncludes$1(t,e){return Array.isArray(e)?e.every(e=>-1!==t.indexOf(e)):-1!==t.indexOf(e)}const onSpaceOrEnter=(t,n)=>e=>{"Enter"!==e.key&&" "!==e.key||(t(e),e.preventDefault(),e.stopPropagation()),n&&n(e)};function getPickersMonthUtilityClass(e){return generateUtilityClass("PrivatePickersMonth",e)}const pickersMonthClasses=generateUtilityClasses("PrivatePickersMonth",["root","selected"]),_excluded$a=["disabled","onSelect","selected","value","tabIndex","hasFocus","onFocus","onBlur"],useUtilityClasses$b=e=>{var{classes:e,selected:t}=e;return composeClasses({root:["root",t&&"selected"]},getPickersMonthUtilityClass,e)},PickersMonthRoot=styled$1(Typography$1,{name:"PrivatePickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root,{["&."+pickersMonthClasses.selected]:t.selected}]})(({theme:e})=>_extends$3({flex:"1 0 33.33%",display:"flex",alignItems:"center",justifyContent:"center",color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,borderRadius:18,cursor:"pointer","&:focus, &:hover":{backgroundColor:alpha(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{pointerEvents:"none",color:e.palette.text.secondary},["&."+pickersMonthClasses.selected]:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:focus, &:hover":{backgroundColor:e.palette.primary.dark}}})),noop$5=()=>{},PickersMonth=e=>{const{disabled:t,onSelect:n,selected:r,value:i,tabIndex:o,hasFocus:a,onFocus:s=noop$5,onBlur:l=noop$5}=e,c=_objectWithoutPropertiesLoose$2(e,_excluded$a);var e=useUtilityClasses$b(e),u=()=>{n(i)};const d=react$1.exports.useRef(null);return useEnhancedEffect$3(()=>{var e;a&&null!=(e=d.current)&&e.focus()},[a]),jsxRuntime.exports.jsx(PickersMonthRoot,_extends$3({ref:d,component:"button",type:"button",className:e.root,tabIndex:o,onClick:u,onKeyDown:onSpaceOrEnter(u),color:r?"primary":void 0,variant:r?"h5":"subtitle1",disabled:t,onFocus:e=>s(e,i),onBlur:e=>l(e,i)},c))},getPickersLocalization=e=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:_extends$3({},e)}}}}),enUSPickers={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"open previous view",openNextView:"open next view",calendarViewSwitchingButtonAriaLabel:e=>"year"===e?"year view is open, switch to calendar view":"calendar view is open, switch to year view",inputModeToggleButtonAriaLabel:(e,t)=>e?`text input view is open, go to ${t} view`:t+" view is open, go to text input view",start:"Start",end:"End",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerDefaultToolbarTitle:"Select date",dateTimePickerDefaultToolbarTitle:"Select date & time",timePickerDefaultToolbarTitle:"Select time",dateRangePickerDefaultToolbarTitle:"Select date range",clockLabelText:(e,t,n)=>`Select ${e}. `+(null===t?"No time selected":"Selected time is "+n.format(t,"fullTime")),hoursClockNumberText:e=>e+" hours",minutesClockNumberText:e=>e+" minutes",secondsClockNumberText:e=>e+" seconds",openDatePickerDialogue:(e,t)=>e&&t.isValid(t.date(e))?"Choose date, selected date is "+t.format(t.date(e),"fullDate"):"Choose date",openTimePickerDialogue:(e,t)=>e&&t.isValid(t.date(e))?"Choose time, selected time is "+t.format(t.date(e),"fullTime"):"Choose time",timeTableLabel:"pick time",dateTableLabel:"pick date"},DEFAULT_LOCALE=enUSPickers,MuiPickersAdapterContext=(getPickersLocalization(enUSPickers),react$1.exports.createContext(null));function LocalizationProvider(e){const{children:t,dateAdapter:n,dateFormats:r,dateLibInstance:i,locale:o,adapterLocale:a,localeText:s}=useThemeProps({props:e,name:"MuiLocalizationProvider"}),l=react$1.exports.useMemo(()=>new n({locale:null!=a?a:o,formats:r,instance:i}),[n,o,a,r,i]),c=react$1.exports.useMemo(()=>({minDate:l.date("1900-01-01T00:00:00.000"),maxDate:l.date("2099-12-31T00:00:00.000")}),[l]);e=react$1.exports.useMemo(()=>({utils:l,defaultDates:c,localeText:_extends$3({},DEFAULT_LOCALE,null!=s?s:{})}),[c,l,s]);return jsxRuntime.exports.jsx(MuiPickersAdapterContext.Provider,{value:e,children:t})}const useLocalizationContext=()=>{var e=react$1.exports.useContext(MuiPickersAdapterContext);if(null===e)throw new Error("MUI: Can not find utils in context. It looks like you forgot to wrap your component in LocalizationProvider, or pass dateAdapter prop directly.");return e},useUtils=()=>useLocalizationContext().utils,useDefaultDates=()=>useLocalizationContext().defaultDates,useLocaleText=()=>useLocalizationContext().localeText,useNow=()=>{var e=useUtils();return react$1.exports.useRef(e.date()).current};function getMonthPickerUtilityClass(e){return generateUtilityClass("MuiMonthPicker",e)}generateUtilityClasses("MuiMonthPicker",["root"]);const findClosestEnabledDate=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:i,isDateDisabled:o,utils:a})=>{var s=a.startOfDay(a.date());n&&a.isBefore(i,s)&&(i=s),t&&a.isAfter(r,s)&&(r=s);let l=e,c=e;for(a.isBefore(e,i)&&(l=a.date(i),c=null),a.isAfter(e,r)&&(c=c&&a.date(r),l=null);l||c;){if(l&&a.isAfter(l,r)&&(l=null),c&&a.isBefore(c,i)&&(c=null),l){if(!o(l))return l;l=a.addDays(l,1)}if(c){if(!o(c))return c;c=a.addDays(c,-1)}}return null},parseNonNullablePickerDate=(e,t,n)=>{return null!=t&&(t=e.date(t),e.isValid(t))?t:n},_excluded$9=["className","date","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange"],useUtilityClasses$a=e=>{e=e.classes;return composeClasses({root:["root"]},getMonthPickerUtilityClass,e)};function useMonthPickerDefaultizedProps(e,t){var n=useUtils(),r=useDefaultDates(),e=useThemeProps({props:e,name:t});return _extends$3({disableFuture:!1,disablePast:!1},e,{minDate:parseNonNullablePickerDate(n,e.minDate,r.minDate),maxDate:parseNonNullablePickerDate(n,e.maxDate,r.maxDate)})}const MonthPickerRoot=styled$1("div",{name:"MuiMonthPicker",slot:"Root",overridesResolver:(e,t)=>t.root})({width:310,display:"flex",flexWrap:"wrap",alignContent:"stretch",margin:"0 4px"}),MonthPicker=react$1.exports.forwardRef(function(e,t){const r=useUtils(),i=useNow();e=useMonthPickerDefaultizedProps(e,"MuiMonthPicker");const{className:n,date:o,disabled:a,disableFuture:s,disablePast:l,maxDate:c,minDate:u,onChange:d,shouldDisableMonth:p,readOnly:f,disableHighlightToday:h,autoFocus:m=!1,onMonthFocus:g,hasFocus:y,onFocusedViewChange:v}=e,x=_objectWithoutPropertiesLoose$2(e,_excluded$9);var b=useUtilityClasses$a(e);const $=useTheme$2(),C=react$1.exports.useMemo(()=>null!=o?o:r.startOfMonth(i),[i,r,o]),S=react$1.exports.useMemo(()=>null!=o?r.getMonth(o):h?null:r.getMonth(i),[i,o,r,h]),[w,_]=react$1.exports.useState(()=>S||r.getMonth(i)),T=react$1.exports.useCallback(e=>{var t=r.startOfMonth(l&&r.isAfter(i,u)?i:u),n=r.startOfMonth(s&&r.isBefore(i,c)?i:c);return!!r.isBefore(e,t)||!!r.isAfter(e,n)||!!p&&p(e)},[s,l,c,u,i,p,r]),E=e=>{f||(e=r.setMonth(C,e),d(e,"finish"))},[j,R]=useControlled$1({name:"MonthPicker",state:"hasFocus",controlled:y,default:m}),I=react$1.exports.useCallback(e=>{R(e),v&&v(e)},[R,v]),O=react$1.exports.useCallback(e=>{T(r.setMonth(C,e))||(_(e),I(!0),g&&g(e))},[T,r,C,I,g]);react$1.exports.useEffect(()=>{_(e=>null!==S&&e!==S?S:e)},[S]);var k=useEventCallback(e=>{switch(e.key){case"ArrowUp":O((12+w-3)%12),e.preventDefault();break;case"ArrowDown":O((12+w+3)%12),e.preventDefault();break;case"ArrowLeft":O((12+w+("ltr"===$.direction?-1:1))%12),e.preventDefault();break;case"ArrowRight":O((12+w+("ltr"===$.direction?1:-1))%12),e.preventDefault()}});const A=react$1.exports.useCallback((e,t)=>{O(t)},[O]),M=react$1.exports.useCallback(()=>{I(!1)},[I]),L=r.getMonth(i);return jsxRuntime.exports.jsx(MonthPickerRoot,_extends$3({ref:t,className:clsx(b.root,n),ownerState:e,onKeyDown:k},x,{children:r.getMonthArray(C).map(e=>{var t=r.getMonth(e),n=r.format(e,"monthShort"),e=a||T(e);return jsxRuntime.exports.jsx(PickersMonth,{value:t,selected:t===S,tabIndex:t!==w||e?-1:0,hasFocus:j&&t===w,onSelect:E,onFocus:A,onBlur:M,disabled:e,"aria-current":L===t?"date":void 0,children:n},n)})}))}),validateDate$1=({props:e,value:t,adapter:n})=>{var r=n.utils.date(),i=n.utils.date(t),o=parseNonNullablePickerDate(n.utils,e.minDate,n.defaultDates.minDate),a=parseNonNullablePickerDate(n.utils,e.maxDate,n.defaultDates.maxDate);if(null===i)return null;switch(!0){case!n.utils.isValid(t):return"invalidDate";case Boolean(e.shouldDisableDate&&e.shouldDisableDate(i)):return"shouldDisableDate";case Boolean(e.disableFuture&&n.utils.isAfterDay(i,r)):return"disableFuture";case Boolean(e.disablePast&&n.utils.isBeforeDay(i,r)):return"disablePast";case Boolean(o&&n.utils.isBeforeDay(i,o)):return"minDate";case Boolean(a&&n.utils.isAfterDay(i,a)):return"maxDate";default:return null}},useIsDayDisabled=({shouldDisableDate:t,minDate:n,maxDate:r,disableFuture:i,disablePast:o})=>{const a=useLocalizationContext();return react$1.exports.useCallback(e=>null!==validateDate$1({adapter:a,value:e,props:{shouldDisableDate:t,minDate:n,maxDate:r,disableFuture:i,disablePast:o}}),[a,t,n,r,i,o])},createCalendarStateReducer=(r,i,o)=>(e,t)=>{switch(t.type){case"changeMonth":return _extends$3({},e,{slideDirection:t.direction,currentMonth:t.newMonth,isMonthSwitchingAnimating:!r});case"finishMonthSwitchingAnimation":return _extends$3({},e,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":var n;return null!=e.focusedDay&&null!=t.focusedDay&&o.isSameDay(t.focusedDay,e.focusedDay)?e:(n=null!=t.focusedDay&&!i&&!o.isSameMonth(e.currentMonth,t.focusedDay),_extends$3({},e,{focusedDay:t.focusedDay,isMonthSwitchingAnimating:n&&!r&&!t.withoutMonthSwitchingAnimation,currentMonth:n?o.startOfMonth(t.focusedDay):e.currentMonth,slideDirection:null!=t.focusedDay&&o.isAfterDay(t.focusedDay,e.currentMonth)?"left":"right"}));default:throw new Error("missing support")}},useCalendarState=({date:e,defaultCalendarMonth:t,disableFuture:n,disablePast:r,disableSwitchToMonthOnDayFocus:i=!1,maxDate:o,minDate:a,onMonthChange:s,reduceAnimations:l,shouldDisableDate:c})=>{const u=useNow(),d=useUtils();l=react$1.exports.useRef(createCalendarStateReducer(Boolean(l),i,d)).current;const[p,f]=react$1.exports.useReducer(l,{isMonthSwitchingAnimating:!1,focusedDay:e||u,currentMonth:d.startOfMonth(null!=(i=null!=e?e:t)?i:u),slideDirection:"left"}),h=react$1.exports.useCallback(e=>{f(_extends$3({type:"changeMonth"},e)),s&&s(e.newMonth)},[s]);l=react$1.exports.useCallback(e=>{e=null!=e?e:u;d.isSameMonth(e,p.currentMonth)||h({newMonth:d.startOfMonth(e),direction:d.isAfterDay(e,p.currentMonth)?"left":"right"})},[p.currentMonth,h,u,d]);const m=useIsDayDisabled({shouldDisableDate:c,minDate:a,maxDate:o,disableFuture:n,disablePast:r});e=react$1.exports.useCallback(()=>{f({type:"finishMonthSwitchingAnimation"})},[]),t=react$1.exports.useCallback((e,t)=>{m(e)||f({type:"changeFocusedDay",focusedDay:e,withoutMonthSwitchingAnimation:t})},[m]);return{calendarState:p,changeMonth:l,changeFocusedDay:t,isDateDisabled:m,onMonthSwitchingAnimationEnd:e,handleChangeMonth:h}},getPickersFadeTransitionGroupUtilityClass=e=>generateUtilityClass("MuiPickersFadeTransitionGroup",e),useUtilityClasses$9=(generateUtilityClasses("MuiPickersFadeTransitionGroup",["root"]),e=>{e=e.classes;return composeClasses({root:["root"]},getPickersFadeTransitionGroupUtilityClass,e)}),animationDuration=500,PickersFadeTransitionGroupRoot=styled$1(TransitionGroup$1,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function PickersFadeTransitionGroup(e){var e=useThemeProps({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:t,className:n,reduceAnimations:r,transKey:i}=e,e=useUtilityClasses$9(e);return r?t:jsxRuntime.exports.jsx(PickersFadeTransitionGroupRoot,{className:clsx(e.root,n),children:jsxRuntime.exports.jsx(Fade$1,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:animationDuration,enter:animationDuration/2,exit:0},children:t},i)})}const useEnhancedEffect="undefined"!=typeof window?react$1.exports.useLayoutEffect:react$1.exports.useEffect;var useEnhancedEffect$1=useEnhancedEffect;function useControlled({controlled:e,default:t}){const n=react$1.exports.useRef(void 0!==e)["current"],[r,i]=react$1.exports.useState(t);return[n?e:r,react$1.exports.useCallback(e=>{n||i(e)},[])]}const DAY_SIZE=36,DAY_MARGIN=2,DIALOG_WIDTH=320,VIEW_HEIGHT=358;function getPickersDayUtilityClass(e){return generateUtilityClass("MuiPickersDay",e)}const pickersDayClasses=generateUtilityClasses("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),_excluded$8=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today"],useUtilityClasses$8=e=>{var{selected:e,disableMargin:t,disableHighlightToday:n,today:r,disabled:i,outsideCurrentMonth:o,showDaysOutsideCurrentMonth:a,classes:s}=e;return composeClasses({root:["root",e&&"selected",i&&"disabled",!t&&"dayWithMargin",!n&&r&&"today",o&&a&&"dayOutsideMonth",o&&!a&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},getPickersDayUtilityClass,s)},styleArg=({theme:e,ownerState:t})=>_extends$3({},e.typography.caption,{width:DAY_SIZE,height:DAY_SIZE,borderRadius:"50%",padding:0,backgroundColor:e.palette.background.paper,color:e.palette.text.primary,"&:hover":{backgroundColor:alpha(e.palette.action.active,e.palette.action.hoverOpacity)},"&:focus":{backgroundColor:alpha(e.palette.action.active,e.palette.action.hoverOpacity),["&."+pickersDayClasses.selected]:{willChange:"background-color",backgroundColor:e.palette.primary.dark}},["&."+pickersDayClasses.selected]:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,fontWeight:e.typography.fontWeightMedium,transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),"&:hover":{willChange:"background-color",backgroundColor:e.palette.primary.dark}},["&."+pickersDayClasses.disabled]:{color:e.palette.text.disabled}},!t.disableMargin&&{margin:`0 ${DAY_MARGIN}px`},t.outsideCurrentMonth&&t.showDaysOutsideCurrentMonth&&{color:e.palette.text.secondary},!t.disableHighlightToday&&t.today&&{[`&:not(.${pickersDayClasses.selected})`]:{border:"1px solid "+e.palette.text.secondary}}),overridesResolver=(e,t)=>{e=e.ownerState;return[t.root,!e.disableMargin&&t.dayWithMargin,!e.disableHighlightToday&&e.today&&t.today,!e.outsideCurrentMonth&&e.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,e.outsideCurrentMonth&&!e.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},PickersDayRoot=styled$1(ButtonBase$1,{name:"MuiPickersDay",slot:"Root",overridesResolver:overridesResolver})(styleArg),PickersDayFiller=styled$1("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:overridesResolver})(({theme:e,ownerState:t})=>_extends$3({},styleArg({theme:e,ownerState:t}),{opacity:0,pointerEvents:"none"})),noop$4=()=>{},PickersDayRaw=react$1.exports.forwardRef(function(e,t){e=useThemeProps({props:e,name:"MuiPickersDay"});const{autoFocus:n=!1,className:r,day:i,disabled:o=!1,disableHighlightToday:a=!1,disableMargin:s=!1,isAnimating:l,onClick:c,onDaySelect:u,onFocus:d=noop$4,onBlur:p=noop$4,onKeyDown:f=noop$4,onMouseDown:h,outsideCurrentMonth:m,selected:g=!1,showDaysOutsideCurrentMonth:y=!1,children:v,today:x=!1}=e,b=_objectWithoutPropertiesLoose$2(e,_excluded$8);var e=_extends$3({},e,{autoFocus:n,disabled:o,disableHighlightToday:a,disableMargin:s,selected:g,showDaysOutsideCurrentMonth:y,today:x}),$=useUtilityClasses$8(e),C=useUtils();const S=react$1.exports.useRef(null);t=useForkRef(S,t);useEnhancedEffect$1(()=>{!n||o||l||m||S.current.focus()},[n,o,l,m]);return m&&!y?jsxRuntime.exports.jsx(PickersDayFiller,{className:clsx($.root,$.hiddenDaySpacingFiller,r),ownerState:e,role:b.role}):jsxRuntime.exports.jsx(PickersDayRoot,_extends$3({className:clsx($.root,r),ownerState:e,ref:t,centerRipple:!0,disabled:o,tabIndex:g?0:-1,onKeyDown:e=>f(e,i),onFocus:e=>d(e,i),onBlur:e=>p(e,i),onClick:e=>{o||u(i,"finish"),m&&e.currentTarget.focus(),c&&c(e)},onMouseDown:e=>{h&&h(e),m&&e.preventDefault()}},b,{children:v||C.format(i,"dayOfMonth")}))}),areDayPropsEqual=(e,t)=>e.autoFocus===t.autoFocus&&e.isAnimating===t.isAnimating&&e.today===t.today&&e.disabled===t.disabled&&e.selected===t.selected&&e.disableMargin===t.disableMargin&&e.showDaysOutsideCurrentMonth===t.showDaysOutsideCurrentMonth&&e.disableHighlightToday===t.disableHighlightToday&&e.className===t.className&&e.sx===t.sx&&e.outsideCurrentMonth===t.outsideCurrentMonth&&e.onFocus===t.onFocus&&e.onBlur===t.onBlur&&e.onDaySelect===t.onDaySelect,PickersDay=react$1.exports.memo(PickersDayRaw,areDayPropsEqual),getPickersSlideTransitionUtilityClass=e=>generateUtilityClass("PrivatePickersSlideTransition",e),pickersSlideTransitionClasses=generateUtilityClasses("PrivatePickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),_excluded$7=["children","className","reduceAnimations","slideDirection","transKey"],useUtilityClasses$7=e=>{e=e.classes;return composeClasses({root:["root"]},getPickersSlideTransitionUtilityClass,e)},slideAnimationDuration=350,PickersSlideTransitionRoot=styled$1(TransitionGroup$1,{name:"PrivatePickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{["."+pickersSlideTransitionClasses["slideEnter-left"]]:t["slideEnter-left"]},{["."+pickersSlideTransitionClasses["slideEnter-right"]]:t["slideEnter-right"]},{["."+pickersSlideTransitionClasses.slideEnterActive]:t.slideEnterActive},{["."+pickersSlideTransitionClasses.slideExit]:t.slideExit},{["."+pickersSlideTransitionClasses["slideExitActiveLeft-left"]]:t["slideExitActiveLeft-left"]},{["."+pickersSlideTransitionClasses["slideExitActiveLeft-right"]]:t["slideExitActiveLeft-right"]}]})(({theme:e})=>{e=e.transitions.create("transform",{duration:slideAnimationDuration,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},["& ."+pickersSlideTransitionClasses["slideEnter-left"]]:{willChange:"transform",transform:"translate(100%)",zIndex:1},["& ."+pickersSlideTransitionClasses["slideEnter-right"]]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},["& ."+pickersSlideTransitionClasses.slideEnterActive]:{transform:"translate(0%)",transition:e},["& ."+pickersSlideTransitionClasses.slideExit]:{transform:"translate(0%)"},["& ."+pickersSlideTransitionClasses["slideExitActiveLeft-left"]]:{willChange:"transform",transform:"translate(-100%)",transition:e,zIndex:0},["& ."+pickersSlideTransitionClasses["slideExitActiveLeft-right"]]:{willChange:"transform",transform:"translate(100%)",transition:e,zIndex:0}}}),PickersSlideTransition=e=>{var{children:t,className:n,reduceAnimations:r,slideDirection:i,transKey:o}=e,a=_objectWithoutPropertiesLoose$2(e,_excluded$7),e=useUtilityClasses$7(e);if(r)return jsxRuntime.exports.jsx("div",{className:clsx(e.root,n),children:t});const s={exit:pickersSlideTransitionClasses.slideExit,enterActive:pickersSlideTransitionClasses.slideEnterActive,enter:pickersSlideTransitionClasses["slideEnter-"+i],exitActive:pickersSlideTransitionClasses["slideExitActiveLeft-"+i]};return jsxRuntime.exports.jsx(PickersSlideTransitionRoot,{className:clsx(e.root,n),childFactory:e=>react$1.exports.cloneElement(e,{classNames:s}),role:"presentation",children:jsxRuntime.exports.jsx(CSSTransition$1,_extends$3({mountOnEnter:!0,unmountOnExit:!0,timeout:slideAnimationDuration,classNames:s},a,{children:t}),o)})},getDayPickerUtilityClass=e=>generateUtilityClass("MuiDayPicker",e),useUtilityClasses$6=(generateUtilityClasses("MuiDayPicker",["header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer"]),e=>{e=e.classes;return composeClasses({header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"]},getDayPickerUtilityClass,e)}),defaultDayOfWeekFormatter=e=>e.charAt(0).toUpperCase(),weeksContainerHeight=6*(DAY_SIZE+2*DAY_MARGIN),PickersCalendarDayHeader=styled$1("div",{name:"MuiDayPicker",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),PickersCalendarWeekDayLabel=styled$1(Typography$1,{name:"MuiDayPicker",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:e.palette.text.secondary})),PickersCalendarLoadingContainer=styled$1("div",{name:"MuiDayPicker",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:weeksContainerHeight}),PickersCalendarSlideTransition=styled$1(PickersSlideTransition,{name:"MuiDayPicker",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:weeksContainerHeight}),PickersCalendarWeekContainer=styled$1("div",{name:"MuiDayPicker",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),PickersCalendarWeek=styled$1("div",{name:"MuiDayPicker",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:DAY_MARGIN+"px 0",display:"flex",justifyContent:"center"});function DayPicker(e){const i=useNow(),o=useUtils();e=useThemeProps({props:e,name:"MuiDayPicker"});const r=useUtilityClasses$6(e),{onFocusedDayChange:t,className:n,currentMonth:a,selectedDays:s,disabled:l,disableHighlightToday:c,focusedDay:u,isMonthSwitchingAnimating:d,loading:p,onSelectedDaysChange:f,onMonthSwitchingAnimationEnd:h,readOnly:m,reduceAnimations:g,renderDay:y,renderLoading:v=()=>jsxRuntime.exports.jsx("span",{children:"..."}),showDaysOutsideCurrentMonth:x,slideDirection:b,TransitionProps:$,disablePast:C,disableFuture:S,minDate:P,maxDate:N,shouldDisableDate:D,dayOfWeekFormatter:w=defaultDayOfWeekFormatter,hasFocus:_,onFocusedViewChange:T,gridLabelId:F}=e,E=useIsDayDisabled({shouldDisableDate:D,minDate:P,maxDate:N,disablePast:C,disableFuture:S}),[j,V]=react$1.exports.useState(()=>u||i),R=react$1.exports.useCallback(e=>{T&&T(e)},[T]),H=react$1.exports.useCallback((e,t="finish")=>{m||f(e,t)},[f,m]),I=react$1.exports.useCallback(e=>{E(e)||(t(e),V(e),R(!0))},[E,t,R]),O=useTheme();function B(e,t){switch(e.key){case"ArrowUp":I(o.addDays(t,-7)),e.preventDefault();break;case"ArrowDown":I(o.addDays(t,7)),e.preventDefault();break;case"ArrowLeft":var n=o.addDays(t,"ltr"===O.direction?-1:1),r="ltr"===O.direction?o.getPreviousMonth(t):o.getNextMonth(t),r=findClosestEnabledDate({utils:o,date:n,minDate:"ltr"===O.direction?o.startOfMonth(r):n,maxDate:"ltr"===O.direction?n:o.endOfMonth(r),isDateDisabled:E});I(r||n),e.preventDefault();break;case"ArrowRight":r=o.addDays(t,"ltr"===O.direction?1:-1),n="ltr"===O.direction?o.getNextMonth(t):o.getPreviousMonth(t),n=findClosestEnabledDate({utils:o,date:r,minDate:"ltr"===O.direction?r:o.startOfMonth(n),maxDate:"ltr"===O.direction?o.endOfMonth(n):r,isDateDisabled:E});I(n||r),e.preventDefault();break;case"Home":I(o.startOfWeek(t)),e.preventDefault();break;case"End":I(o.endOfWeek(t)),e.preventDefault();break;case"PageUp":I(o.getNextMonth(t)),e.preventDefault();break;case"PageDown":I(o.getPreviousMonth(t)),e.preventDefault()}}function U(e,t){I(t)}function z(e,t){_&&o.isSameDay(j,t)&&R(!1)}const k=o.getMonth(a),A=s.filter(e=>!!e).map(e=>o.startOfDay(e));var e=k,M=react$1.exports.useMemo(()=>react$1.exports.createRef(),[e]);const W=o.startOfWeek(i),L=react$1.exports.useMemo(()=>{var e=o.startOfMonth(a),t=o.endOfMonth(a);return E(j)||o.isAfterDay(j,t)||o.isBeforeDay(j,e)?findClosestEnabledDate({utils:o,date:j,minDate:e,maxDate:t,disablePast:C,disableFuture:S,isDateDisabled:E}):j},[a,S,C,j,E,o]);return jsxRuntime.exports.jsxs("div",{role:"grid","aria-labelledby":F,children:[jsxRuntime.exports.jsx(PickersCalendarDayHeader,{role:"row",className:r.header,children:o.getWeekdays().map((e,t)=>{var n;return jsxRuntime.exports.jsx(PickersCalendarWeekDayLabel,{variant:"caption",role:"columnheader","aria-label":o.format(o.addDays(W,t),"weekday"),className:r.weekDayLabel,children:null!=(n=null==w?void 0:w(e))?n:e},e+t.toString())})}),p?jsxRuntime.exports.jsx(PickersCalendarLoadingContainer,{className:r.loadingContainer,children:v()}):jsxRuntime.exports.jsx(PickersCalendarSlideTransition,_extends$3({transKey:e,onExited:h,reduceAnimations:g,slideDirection:b,className:clsx(n,r.slideTransition)},$,{nodeRef:M,children:jsxRuntime.exports.jsx(PickersCalendarWeekContainer,{ref:M,role:"rowgroup",className:r.monthContainer,children:o.getWeekArray(a).map(e=>jsxRuntime.exports.jsx(PickersCalendarWeek,{role:"row",className:r.weekContainer,children:e.map(t=>{var e=null!==L&&o.isSameDay(t,L),n=A.some(e=>o.isSameDay(e,t)),r=o.isSameDay(t,i),e={key:null==t?void 0:t.toString(),day:t,isAnimating:d,disabled:l||E(t),autoFocus:_&&e,today:r,outsideCurrentMonth:o.getMonth(t)!==k,selected:n,disableHighlightToday:c,showDaysOutsideCurrentMonth:x,onKeyDown:B,onFocus:U,onBlur:z,onDaySelect:H,tabIndex:e?0:-1,role:"gridcell","aria-selected":n};return r&&(e["aria-current"]="date"),y?y(t,A,e):react$1.exports.createElement(PickersDay,_extends$3({},e,{key:e.key}))})},"week-"+e[0]))})}))]})}function useViews({onChange:r,onViewChange:t,openTo:e,view:n,views:i}){const[o,a]=useControlled$1({name:"Picker",state:"view",controlled:n,default:e&&arrayIncludes$1(i,e)?e:i[0]});e=null!=(n=i[i.indexOf(o)-1])?n:null;const s=null!=(n=i[i.indexOf(o)+1])?n:null,l=react$1.exports.useCallback(e=>{a(e),t&&t(e)},[a,t]),c=react$1.exports.useCallback(()=>{s&&l(s)},[s,l]);return{handleChangeAndOpenNext:react$1.exports.useCallback((e,t)=>{var n="finish"===t,t=n&&Boolean(s)?"partial":t;r(e,t),n&&c()},[s,r,c]),nextView:s,previousView:e,openNext:c,openView:o,setOpenView:l}}const ArrowDropDown=createSvgIcon$2(jsxRuntime.exports.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),ArrowLeft=createSvgIcon$2(jsxRuntime.exports.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),ArrowRight=createSvgIcon$2(jsxRuntime.exports.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight");function getPickersArrowSwitcherUtilityClass(e){return generateUtilityClass("MuiPickersArrowSwitcher",e)}createSvgIcon$2(jsxRuntime.exports.jsx("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar"),createSvgIcon$2(jsxRuntime.exports.jsxs(react$1.exports.Fragment,{children:[jsxRuntime.exports.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),jsxRuntime.exports.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock"),createSvgIcon$2(jsxRuntime.exports.jsx("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange"),createSvgIcon$2(jsxRuntime.exports.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Pen"),createSvgIcon$2(jsxRuntime.exports.jsxs(react$1.exports.Fragment,{children:[jsxRuntime.exports.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),jsxRuntime.exports.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time"),generateUtilityClasses("MuiPickersArrowSwitcher",["root","spacer","button"]);const _excluded$6=["children","className","components","componentsProps","isLeftDisabled","isLeftHidden","isRightDisabled","isRightHidden","leftArrowButtonText","onLeftClick","onRightClick","rightArrowButtonText"],useUtilityClasses$5=e=>{e=e.classes;return composeClasses({root:["root"],spacer:["spacer"],button:["button"]},getPickersArrowSwitcherUtilityClass,e)},PickersArrowSwitcherRoot=styled$1("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),PickersArrowSwitcherSpacer=styled$1("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),PickersArrowSwitcherButton=styled$1(IconButton$1,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})(({ownerState:e})=>_extends$3({},e.hidden&&{visibility:"hidden"})),PickersArrowSwitcher=react$1.exports.forwardRef(function(e,t){var e=useThemeProps({props:e,name:"MuiPickersArrowSwitcher"}),{children:n,className:r,components:i,componentsProps:o,isLeftDisabled:a,isLeftHidden:s,isRightDisabled:l,isRightHidden:c,leftArrowButtonText:u,onLeftClick:d,onRightClick:p,rightArrowButtonText:f}=e,h=_objectWithoutPropertiesLoose$2(e,_excluded$6),m="rtl"===useTheme().direction,g=(null==o?void 0:o.leftArrowButton)||{},y=(null==i?void 0:i.LeftArrowIcon)||ArrowLeft,o=(null==o?void 0:o.rightArrowButton)||{},v=(null==i?void 0:i.RightArrowIcon)||ArrowRight,x=useUtilityClasses$5(e);return jsxRuntime.exports.jsxs(PickersArrowSwitcherRoot,_extends$3({ref:t,className:clsx(x.root,r),ownerState:e},h,{children:[jsxRuntime.exports.jsx(PickersArrowSwitcherButton,_extends$3({as:null==i?void 0:i.LeftArrowButton,size:"small","aria-label":u,title:u,disabled:a,edge:"end",onClick:d},g,{className:clsx(x.button,g.className),ownerState:_extends$3({},e,g,{hidden:s}),children:m?jsxRuntime.exports.jsx(v,{}):jsxRuntime.exports.jsx(y,{})})),n?jsxRuntime.exports.jsx(Typography$1,{variant:"subtitle1",component:"span",children:n}):jsxRuntime.exports.jsx(PickersArrowSwitcherSpacer,{className:x.spacer,ownerState:e}),jsxRuntime.exports.jsx(PickersArrowSwitcherButton,_extends$3({as:null==i?void 0:i.RightArrowButton,size:"small","aria-label":f,title:f,edge:"start",disabled:l,onClick:p},o,{className:clsx(x.button,o.className),ownerState:_extends$3({},e,o,{hidden:c}),children:m?jsxRuntime.exports.jsx(y,{}):jsxRuntime.exports.jsx(v,{})}))]}))});function useNextMonthDisabled(t,{disableFuture:n,maxDate:r}){const i=useUtils();return react$1.exports.useMemo(()=>{var e=i.date(),e=i.startOfMonth(n&&i.isBefore(e,r)?e:r);return!i.isAfter(e,t)},[n,r,t,i])}function usePreviousMonthDisabled(t,{disablePast:n,minDate:r}){const i=useUtils();return react$1.exports.useMemo(()=>{var e=i.date(),e=i.startOfMonth(n&&i.isAfter(e,r)?e:r);return!i.isBefore(e,t)},[n,r,t,i])}const buildDeprecatedPropsWarning=e=>()=>{},getPickersCalendarHeaderUtilityClass=e=>generateUtilityClass("MuiPickersCalendarHeader",e),useUtilityClasses$4=(generateUtilityClasses("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),e=>{e=e.classes;return composeClasses({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},getPickersCalendarHeaderUtilityClass,e)}),PickersCalendarHeaderRoot=styled$1("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:16,marginBottom:8,paddingLeft:24,paddingRight:12,maxHeight:30,minHeight:30}),PickersCalendarHeaderLabelContainer=styled$1("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>_extends$3({display:"flex",maxHeight:30,overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),PickersCalendarHeaderLabel=styled$1("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),PickersCalendarHeaderSwitchViewButton=styled$1(IconButton$1,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto"}),PickersCalendarHeaderSwitchViewIcon=styled$1(ArrowDropDown,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(({theme:e,ownerState:t})=>_extends$3({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"},"year"===t.openView&&{transform:"rotate(180deg)"})),deprecatedPropsWarning=buildDeprecatedPropsWarning();function PickersCalendarHeader(e){e=useThemeProps({props:e,name:"MuiPickersCalendarHeader"});const{components:t={},componentsProps:n={},currentMonth:r,disabled:i,disableFuture:o,disablePast:a,getViewSwitchingButtonText:s,leftArrowButtonText:l,maxDate:c,minDate:u,onMonthChange:d,onViewChange:p,openView:f,reduceAnimations:h,rightArrowButtonText:m,views:g,labelId:y}=e;deprecatedPropsWarning({leftArrowButtonText:l,rightArrowButtonText:m,getViewSwitchingButtonText:s});var v=useLocaleText(),x=null!=l?l:v.previousMonth,b=null!=m?m:v.nextMonth,v=null!=s?s:v.calendarViewSwitchingButtonAriaLabel;const $=useUtils();var C=useUtilityClasses$4(e),S=n.switchViewButton||{},w=useNextMonthDisabled(r,{disableFuture:o,maxDate:c}),_=usePreviousMonthDisabled(r,{disablePast:a,minDate:u});return 1===g.length&&"year"===g[0]?null:(e=e,jsxRuntime.exports.jsxs(PickersCalendarHeaderRoot,{ownerState:e,className:C.root,children:[jsxRuntime.exports.jsxs(PickersCalendarHeaderLabelContainer,{role:"presentation",onClick:()=>{var e;1!==g.length&&p&&!i&&(2===g.length?p(g.find(e=>e!==f)||g[0]):(e=0!==g.indexOf(f)?0:1,p(g[e])))},ownerState:e,"aria-live":"polite",className:C.labelContainer,children:[jsxRuntime.exports.jsx(PickersFadeTransitionGroup,{reduceAnimations:h,transKey:$.format(r,"monthAndYear"),children:jsxRuntime.exports.jsx(PickersCalendarHeaderLabel,{id:y,ownerState:e,className:C.label,children:$.format(r,"monthAndYear")})}),1<g.length&&!i&&jsxRuntime.exports.jsx(PickersCalendarHeaderSwitchViewButton,_extends$3({size:"small",as:t.SwitchViewButton,"aria-label":v(f),className:C.switchViewButton},S,{children:jsxRuntime.exports.jsx(PickersCalendarHeaderSwitchViewIcon,{as:t.SwitchViewIcon,ownerState:e,className:C.switchViewIcon})}))]}),jsxRuntime.exports.jsx(Fade$1,{in:"day"===f,children:jsxRuntime.exports.jsx(PickersArrowSwitcher,{leftArrowButtonText:x,rightArrowButtonText:b,components:t,componentsProps:n,onLeftClick:()=>d($.getPreviousMonth(r),"right"),onRightClick:()=>d($.getNextMonth(r),"left"),isLeftDisabled:_,isRightDisabled:w})})]}))}const WrapperVariantContext=react$1.exports.createContext(null);function getPickersYearUtilityClass(e){return generateUtilityClass("PrivatePickersYear",e)}const pickersYearClasses=generateUtilityClasses("PrivatePickersYear",["root","modeDesktop","modeMobile","yearButton","selected","disabled"]),_excluded$5=["autoFocus","className","children","disabled","onClick","onKeyDown","value","tabIndex","onFocus","onBlur"],useUtilityClasses$3=e=>{var{wrapperVariant:e,disabled:t,selected:n,classes:r}=e;return composeClasses({root:["root",e&&"mode"+capitalize$2(e)],yearButton:["yearButton",t&&"disabled",n&&"selected"]},getPickersYearUtilityClass,r)},PickersYearRoot=styled$1("div",{name:"PrivatePickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root,{["&."+pickersYearClasses.modeDesktop]:t.modeDesktop},{["&."+pickersYearClasses.modeMobile]:t.modeMobile}]})(({ownerState:e})=>_extends$3({flexBasis:"33.3%",display:"flex",alignItems:"center",justifyContent:"center"},"desktop"===(null==e?void 0:e.wrapperVariant)&&{flexBasis:"25%"})),PickersYearButton=styled$1("button",{name:"PrivatePickersYear",slot:"Button",overridesResolver:(e,t)=>[t.button,{["&."+pickersYearClasses.disabled]:t.disabled},{["&."+pickersYearClasses.selected]:t.selected}]})(({theme:e})=>_extends$3({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus, &:hover":{backgroundColor:alpha(e.palette.action.active,e.palette.action.hoverOpacity)},["&."+pickersYearClasses.disabled]:{color:e.palette.text.secondary},["&."+pickersYearClasses.selected]:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:focus, &:hover":{backgroundColor:e.palette.primary.dark}}})),noop$3=()=>{},PickersYear=react$1.exports.forwardRef(function(e,t){const{autoFocus:n,className:r,children:i,disabled:o,onClick:a,onKeyDown:s,value:l,tabIndex:c,onFocus:u=noop$3,onBlur:d=noop$3}=e,p=_objectWithoutPropertiesLoose$2(e,_excluded$5),f=react$1.exports.useRef(null);var t=useForkRef(f,t),e=_extends$3({},e,{wrapperVariant:react$1.exports.useContext(WrapperVariantContext)}),h=useUtilityClasses$3(e);return react$1.exports.useEffect(()=>{n&&f.current.focus()},[n]),jsxRuntime.exports.jsx(PickersYearRoot,{className:clsx(h.root,r),ownerState:e,children:jsxRuntime.exports.jsx(PickersYearButton,_extends$3({ref:t,disabled:o,type:"button",tabIndex:o?-1:c,onClick:e=>a(e,l),onKeyDown:e=>s(e,l),onFocus:e=>u(e,l),onBlur:e=>d(e,l),className:h.yearButton,ownerState:e},p,{children:i}))})});function getYearPickerUtilityClass(e){return generateUtilityClass("MuiYearPicker",e)}generateUtilityClasses("MuiYearPicker",["root"]);const useUtilityClasses$2=e=>{e=e.classes;return composeClasses({root:["root"]},getYearPickerUtilityClass,e)};function useYearPickerDefaultizedProps(e,t){var n=useUtils(),r=useDefaultDates(),e=useThemeProps({props:e,name:t});return _extends$3({disablePast:!1,disableFuture:!1},e,{minDate:parseNonNullablePickerDate(n,e.minDate,r.minDate),maxDate:parseNonNullablePickerDate(n,e.maxDate,r.maxDate)})}const YearPickerRoot=styled$1("div",{name:"MuiYearPicker",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",maxHeight:"304px"}),YearPicker=react$1.exports.forwardRef(function(e,t){const n=useNow(),r=useTheme(),i=useUtils();e=useYearPickerDefaultizedProps(e,"MuiYearPicker");const{autoFocus:o,className:a,date:s,disabled:l,disableFuture:c,disablePast:u,maxDate:d,minDate:p,onChange:f,readOnly:h,shouldDisableYear:m,disableHighlightToday:g,onYearFocus:y,hasFocus:v,onFocusedViewChange:x}=e;var b=useUtilityClasses$2(e);const $=react$1.exports.useMemo(()=>null!=s?s:i.startOfYear(n),[n,i,s]),C=react$1.exports.useMemo(()=>null!=s?i.getYear(s):g?null:i.getYear(n),[n,s,i,g]);var S=react$1.exports.useContext(WrapperVariantContext);const w=react$1.exports.useRef(null),[_,T]=react$1.exports.useState(()=>C||i.getYear(n)),[E,j]=useControlled({name:"YearPicker",state:"hasFocus",controlled:v,default:o}),R=react$1.exports.useCallback(e=>{j(e),x&&x(e)},[j,x]),I=react$1.exports.useCallback(e=>!(!u||!i.isBeforeYear(e,n))||!!(c&&i.isAfterYear(e,n)||p&&i.isBeforeYear(e,p)||d&&i.isAfterYear(e,d)||m&&m(e)),[c,u,d,p,n,m,i]),O=(e,t,n="finish")=>{h||(t=i.setYear($,t),f(t,n))},k=react$1.exports.useCallback(e=>{I(i.setYear($,e))||(T(e),R(!0),null!=y&&y(e))},[I,i,$,R,y]),A=(react$1.exports.useEffect(()=>{T(e=>null!==C&&e!==C?C:e)},[C]),"desktop"===S?4:3),M=react$1.exports.useCallback((e,t)=>{switch(e.key){case"ArrowUp":k(t-A),e.preventDefault();break;case"ArrowDown":k(t+A),e.preventDefault();break;case"ArrowLeft":k(t+("ltr"===r.direction?-1:1)),e.preventDefault();break;case"ArrowRight":k(t+("ltr"===r.direction?1:-1)),e.preventDefault()}},[k,r.direction,A]),P=react$1.exports.useCallback((e,t)=>{k(t)},[k]),N=react$1.exports.useCallback((e,t)=>{_===t&&R(!1)},[_,R]),D=i.getYear(n),L=react$1.exports.useRef(null);S=useForkRef(t,L);return react$1.exports.useEffect(()=>{var e,t,n,r,i;o||null===L.current||(t=L.current.querySelector('[tabindex="0"]'))&&(e=t.offsetHeight,t=t.offsetTop,n=L.current.clientHeight,r=L.current.scrollTop,i=t+e,n<e||t<r||(L.current.scrollTop=i-n/2-e/2))},[o]),jsxRuntime.exports.jsx(YearPickerRoot,{ref:S,className:clsx(b.root,a),ownerState:e,children:i.getYearRange(p,d).map(e=>{var t=i.getYear(e),n=t===C;return jsxRuntime.exports.jsx(PickersYear,{selected:n,value:t,onClick:O,onKeyDown:M,autoFocus:E&&t===_,ref:n?w:void 0,disabled:l||I(e),tabIndex:t===_?0:-1,onFocus:P,onBlur:N,"aria-current":D===t?"date":void 0,children:i.format(e,"year")},i.format(e,"year"))})})}),PickerViewRoot=styled$1("div")({overflowX:"hidden",width:DIALOG_WIDTH,maxHeight:VIEW_HEIGHT,display:"flex",flexDirection:"column",margin:"0 auto"}),defaultReduceAnimations="undefined"!=typeof navigator&&/(android)/i.test(navigator.userAgent),getCalendarPickerUtilityClass=e=>generateUtilityClass("MuiCalendarPicker",e),_excluded$4=(generateUtilityClasses("MuiCalendarPicker",["root","viewTransitionContainer"]),["autoFocus","onViewChange","date","disableFuture","disablePast","defaultCalendarMonth","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","classes"]),useUtilityClasses$1=e=>{e=e.classes;return composeClasses({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},getCalendarPickerUtilityClass,e)};function useCalendarPickerDefaultizedProps(e,t){var n=useUtils(),r=useDefaultDates(),e=useThemeProps({props:e,name:t});return _extends$3({loading:!1,disablePast:!1,disableFuture:!1,openTo:"day",views:["year","day"],reduceAnimations:defaultReduceAnimations,renderLoading:()=>jsxRuntime.exports.jsx("span",{children:"..."})},e,{minDate:parseNonNullablePickerDate(n,e.minDate,r.minDate),maxDate:parseNonNullablePickerDate(n,e.maxDate,r.maxDate)})}const CalendarPickerRoot=styled$1(PickerViewRoot,{name:"MuiCalendarPicker",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column"}),CalendarPickerViewTransitionContainer=styled$1(PickersFadeTransitionGroup,{name:"MuiCalendarPicker",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),CalendarPicker=react$1.exports.forwardRef(function(e,t){const i=useUtils();var n=useId(),e=useCalendarPickerDefaultizedProps(e,"MuiCalendarPicker");const{autoFocus:r,onViewChange:o,date:a,disableFuture:s,disablePast:l,defaultCalendarMonth:c,onChange:u,onYearChange:d,onMonthChange:p,reduceAnimations:f,shouldDisableDate:h,shouldDisableMonth:m,shouldDisableYear:P,view:N,views:g,openTo:D,className:y,disabled:v,readOnly:F,minDate:x,maxDate:b,disableHighlightToday:V,focusedView:H,onFocusedViewChange:$}=e,C=_objectWithoutPropertiesLoose$2(e,_excluded$4),{openView:S,setOpenView:B,openNext:w}=useViews({view:N,views:g,openTo:D,onChange:u,onViewChange:o}),{calendarState:_,changeFocusedDay:T,changeMonth:E,handleChangeMonth:U,isDateDisabled:j,onMonthSwitchingAnimationEnd:z}=useCalendarState({date:a,defaultCalendarMonth:c,reduceAnimations:f,onMonthChange:p,minDate:x,maxDate:b,shouldDisableDate:h,disablePast:l,disableFuture:s});var W=react$1.exports.useCallback((e,t)=>{var n=i.startOfMonth(e),r=i.endOfMonth(e),r=j(e)?findClosestEnabledDate({utils:i,date:e,minDate:i.isBefore(x,n)?n:x,maxDate:i.isAfter(b,r)?r:b,disablePast:l,disableFuture:s,isDateDisabled:j}):e;r?(u(r,t),null!=p&&p(n)):(w(),E(n)),T(r,!0)},[T,s,l,j,b,x,u,p,E,w,i]),Z=react$1.exports.useCallback((e,t)=>{var n=i.startOfYear(e),r=i.endOfYear(e),r=j(e)?findClosestEnabledDate({utils:i,date:e,minDate:i.isBefore(x,n)?n:x,maxDate:i.isAfter(b,r)?r:b,disablePast:l,disableFuture:s,isDateDisabled:j}):e;r?(u(r,t),null!=d&&d(r)):(w(),E(n)),T(r,!0)},[T,s,l,j,b,x,u,d,w,i,E]),G=react$1.exports.useCallback((e,t)=>a&&e?u(i.mergeDateAndTime(e,a),t):u(e,t),[i,a,u]),R=(react$1.exports.useEffect(()=>{a&&E(a)},[a]),useUtilityClasses$1(e)),I={disablePast:l,disableFuture:s,maxDate:b,minDate:x},q=v&&a||x,K=v&&a||b,O={disableHighlightToday:V,readOnly:F,disabled:v},n=n+"-grid-label";const[Y,k]=useControlled$1({name:"DayPicker",state:"focusedView",controlled:H,default:r?S:null});var A=null!==Y;const M=useEventCallback(t=>e=>{$?$(t)(e):e?k(t):k(e=>e===t?null:e)}),L=react$1.exports.useRef(S);return react$1.exports.useEffect(()=>{L.current!==S&&(L.current=S,M(S)(!0))},[S,M]),jsxRuntime.exports.jsxs(CalendarPickerRoot,{ref:t,className:clsx(R.root,y),ownerState:e,children:[jsxRuntime.exports.jsx(PickersCalendarHeader,_extends$3({},C,{views:g,openView:S,currentMonth:_.currentMonth,onViewChange:B,onMonthChange:(e,t)=>U({newMonth:e,direction:t}),minDate:q,maxDate:K,disabled:v,disablePast:l,disableFuture:s,reduceAnimations:f,labelId:n})),jsxRuntime.exports.jsx(CalendarPickerViewTransitionContainer,{reduceAnimations:f,className:R.viewTransitionContainer,transKey:S,ownerState:e,children:jsxRuntime.exports.jsxs("div",{children:["year"===S&&jsxRuntime.exports.jsx(YearPicker,_extends$3({},C,I,O,{autoFocus:r,date:a,onChange:Z,shouldDisableYear:P,hasFocus:A,onFocusedViewChange:M("year")})),"month"===S&&jsxRuntime.exports.jsx(MonthPicker,_extends$3({},I,O,{autoFocus:r,hasFocus:A,className:y,date:a,onChange:W,shouldDisableMonth:m,onFocusedViewChange:M("month")})),"day"===S&&jsxRuntime.exports.jsx(DayPicker,_extends$3({},C,_,I,O,{autoFocus:r,onMonthSwitchingAnimationEnd:z,onFocusedDayChange:T,reduceAnimations:f,selectedDays:[a],onSelectedDaysChange:G,shouldDisableDate:h,hasFocus:A,onFocusedViewChange:M("day"),gridLabelId:n}))]})})]})});function toInteger(e){return null===e||!0===e||!1===e?NaN:(e=Number(e),isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e))}function requiredArgs(e,t){if(t.length<e)throw new TypeError(e+" argument"+(1<e?"s":"")+" required, but only "+t.length+" present")}function _typeof$y(e){return(_typeof$y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function toDate$1(e){requiredArgs(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===_typeof$y(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function addDays(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toInteger(t);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function addMilliseconds(e,t){requiredArgs(2,arguments);var n=toDate$1(e).getTime(),r=toInteger(t);return new Date(n+r)}function addSeconds(e,t){return requiredArgs(2,arguments),addMilliseconds(e,1e3*toInteger(t))}var MILLISECONDS_IN_MINUTE=6e4;function addMinutes(e,t){return requiredArgs(2,arguments),addMilliseconds(e,toInteger(t)*MILLISECONDS_IN_MINUTE)}var MILLISECONDS_IN_HOUR=36e5;function addHours(e,t){return requiredArgs(2,arguments),addMilliseconds(e,toInteger(t)*MILLISECONDS_IN_HOUR)}function addWeeks(e,t){return requiredArgs(2,arguments),addDays(e,7*toInteger(t))}function addMonths(e,t){requiredArgs(2,arguments);var n,r,i=toDate$1(e),o=toInteger(t);return isNaN(o)?new Date(NaN):o?(n=i.getDate(),(r=new Date(i.getTime())).setMonth(i.getMonth()+o+1,0),r.getDate()<=n?r:(i.setFullYear(r.getFullYear(),r.getMonth(),n),i)):i}function addYears(e,t){return requiredArgs(2,arguments),addMonths(e,12*toInteger(t))}function differenceInCalendarYears(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toDate$1(t);return n.getFullYear()-r.getFullYear()}function compareAsc(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toDate$1(t),n=n.getTime()-r.getTime();return n<0?-1:0<n?1:n}function differenceInYears(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toDate$1(t),i=compareAsc(n,r),o=Math.abs(differenceInCalendarYears(n,r)),n=(n.setFullYear(1584),r.setFullYear(1584),compareAsc(n,r)===-i),r=i*(o-Number(n));return 0==r?0:r}function differenceInCalendarMonths(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toDate$1(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}function endOfDay(e){requiredArgs(1,arguments);var t=toDate$1(e);return t.setHours(23,59,59,999),t}function endOfMonth(e){requiredArgs(1,arguments);var t=toDate$1(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function isLastDayOfMonth(e){requiredArgs(1,arguments);var t=toDate$1(e);return endOfDay(t).getTime()===endOfMonth(t).getTime()}function differenceInMonths(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toDate$1(t),i=compareAsc(n,r),o=Math.abs(differenceInCalendarMonths(n,r)),r=o<1?0:(1===n.getMonth()&&27<n.getDate()&&n.setDate(30),n.setMonth(n.getMonth()-i*o),n=compareAsc(n,r)===-i,isLastDayOfMonth(toDate$1(e))&&1===o&&1===compareAsc(e,r)&&(n=!1),i*(o-Number(n)));return 0===r?0:r}var roundingMap={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}},defaultRoundingMethod="trunc";function getRoundingMethod(e){return e?roundingMap[e]:roundingMap[defaultRoundingMethod]}function differenceInQuarters(e,t,n){requiredArgs(2,arguments);var r=differenceInMonths(e,t)/3;return getRoundingMethod(null==n?void 0:n.roundingMethod)(r)}function getTimezoneOffsetInMilliseconds(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function startOfDay(e){requiredArgs(1,arguments);var t=toDate$1(e);return t.setHours(0,0,0,0),t}var MILLISECONDS_IN_DAY$1=864e5;function differenceInCalendarDays(e,t){requiredArgs(2,arguments);var n=startOfDay(e),r=startOfDay(t),n=n.getTime()-getTimezoneOffsetInMilliseconds(n),r=r.getTime()-getTimezoneOffsetInMilliseconds(r);return Math.round((n-r)/MILLISECONDS_IN_DAY$1)}function compareLocalAsc(e,t){e=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return e<0?-1:0<e?1:e}function differenceInDays(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toDate$1(t),i=compareLocalAsc(n,r),o=Math.abs(differenceInCalendarDays(n,r));n.setDate(n.getDate()-i*o);o=i*(o-Number(compareLocalAsc(n,r)===-i));return 0==o?0:o}function differenceInWeeks(e,t,n){requiredArgs(2,arguments);var r=differenceInDays(e,t)/7;return getRoundingMethod(null==n?void 0:n.roundingMethod)(r)}var millisecondsInMinute=6e4,millisecondsInHour=36e5,millisecondsInSecond=1e3;function differenceInMilliseconds(e,t){return requiredArgs(2,arguments),toDate$1(e).getTime()-toDate$1(t).getTime()}function differenceInHours(e,t,n){requiredArgs(2,arguments);var r=differenceInMilliseconds(e,t)/millisecondsInHour;return getRoundingMethod(null==n?void 0:n.roundingMethod)(r)}function differenceInMinutes(e,t,n){requiredArgs(2,arguments);var r=differenceInMilliseconds(e,t)/millisecondsInMinute;return getRoundingMethod(null==n?void 0:n.roundingMethod)(r)}function differenceInSeconds(e,t,n){requiredArgs(2,arguments);var r=differenceInMilliseconds(e,t)/1e3;return getRoundingMethod(null==n?void 0:n.roundingMethod)(r)}function eachDayOfInterval(e,t){requiredArgs(1,arguments);var n=e||{},r=toDate$1(n.start),i=toDate$1(n.end).getTime();if(!(r.getTime()<=i))throw new RangeError("Invalid interval");var o=[],a=r,s=(a.setHours(0,0,0,0),Number(null!=(n=null==t?void 0:t.step)?n:1));if(s<1||isNaN(s))throw new RangeError("`options.step` must be a number greater than 1");for(;a.getTime()<=i;)o.push(toDate$1(a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o}var defaultOptions={};function getDefaultOptions(){return defaultOptions}function endOfWeek(e,t){requiredArgs(1,arguments);var n,r,i=getDefaultOptions(),i=toInteger(null!=(n=null!=(n=null!=(n=null!=(n=null==t?void 0:t.weekStartsOn)?n:null==t||null==(n=t.locale)||null==(n=n.options)?void 0:n.weekStartsOn)?n:i.weekStartsOn)?n:null==(n=i.locale)||null==(i=n.options)?void 0:i.weekStartsOn)?n:0);if(0<=i&&i<=6)return r=6+((r=(n=toDate$1(e)).getDay())<i?-7:0)-(r-i),n.setDate(n.getDate()+r),n.setHours(23,59,59,999),n;throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}function endOfYear(e){requiredArgs(1,arguments);var t=toDate$1(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}function _typeof$x(e){return(_typeof$x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function isDate$1(e){return requiredArgs(1,arguments),e instanceof Date||"object"===_typeof$x(e)&&"[object Date]"===Object.prototype.toString.call(e)}function isValid(e){var t;return requiredArgs(1,arguments),!(!isDate$1(e)&&"number"!=typeof e||(t=toDate$1(e),isNaN(Number(t))))}function subMilliseconds(e,t){return requiredArgs(2,arguments),addMilliseconds(e,-toInteger(t))}var MILLISECONDS_IN_DAY=864e5;function getUTCDayOfYear(e){requiredArgs(1,arguments);var t=toDate$1(e),n=t.getTime(),t=(t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0),t.getTime());return Math.floor((n-t)/MILLISECONDS_IN_DAY)+1}function startOfUTCISOWeek(e){requiredArgs(1,arguments);var t=toDate$1(e),n=t.getUTCDay(),n=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-n),t.setUTCHours(0,0,0,0),t}function getUTCISOWeekYear(e){requiredArgs(1,arguments);var t=toDate$1(e),n=t.getUTCFullYear(),r=new Date(0),r=(r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0),startOfUTCISOWeek(r)),i=new Date(0),i=(i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0),startOfUTCISOWeek(i));return t.getTime()>=r.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function startOfUTCISOWeekYear(e){requiredArgs(1,arguments);var t=getUTCISOWeekYear(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),startOfUTCISOWeek(n)}var MILLISECONDS_IN_WEEK$1=6048e5;function getUTCISOWeek(e){requiredArgs(1,arguments);var t=toDate$1(e),t=startOfUTCISOWeek(t).getTime()-startOfUTCISOWeekYear(t).getTime();return Math.round(t/MILLISECONDS_IN_WEEK$1)+1}function startOfUTCWeek(e,t){requiredArgs(1,arguments);var n,r,i=getDefaultOptions(),i=toInteger(null!=(n=null!=(n=null!=(n=null!=(n=null==t?void 0:t.weekStartsOn)?n:null==t||null==(n=t.locale)||null==(n=n.options)?void 0:n.weekStartsOn)?n:i.weekStartsOn)?n:null==(n=i.locale)||null==(i=n.options)?void 0:i.weekStartsOn)?n:0);if(0<=i&&i<=6)return r=((r=(n=toDate$1(e)).getUTCDay())<i?7:0)+r-i,n.setUTCDate(n.getUTCDate()-r),n.setUTCHours(0,0,0,0),n;throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}function getUTCWeekYear(e,t){requiredArgs(1,arguments);var n,r,i=toDate$1(e),o=i.getUTCFullYear(),a=getDefaultOptions(),a=toInteger(null!=(n=null!=(n=null!=(n=null!=(n=null==t?void 0:t.firstWeekContainsDate)?n:null==t||null==(n=t.locale)||null==(n=n.options)?void 0:n.firstWeekContainsDate)?n:a.firstWeekContainsDate)?n:null==(n=a.locale)||null==(a=n.options)?void 0:a.firstWeekContainsDate)?n:1);if(1<=a&&a<=7)return(n=new Date(0)).setUTCFullYear(o+1,0,a),n.setUTCHours(0,0,0,0),n=startOfUTCWeek(n,t),(r=new Date(0)).setUTCFullYear(o,0,a),r.setUTCHours(0,0,0,0),a=startOfUTCWeek(r,t),i.getTime()>=n.getTime()?o+1:i.getTime()>=a.getTime()?o:o-1;throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively")}function startOfUTCWeekYear(e,t){requiredArgs(1,arguments);var n=getDefaultOptions(),n=toInteger(null!=(r=null!=(r=null!=(r=null!=(r=null==t?void 0:t.firstWeekContainsDate)?r:null==t||null==(r=t.locale)||null==(r=r.options)?void 0:r.firstWeekContainsDate)?r:n.firstWeekContainsDate)?r:null==(r=n.locale)||null==(n=r.options)?void 0:n.firstWeekContainsDate)?r:1),r=getUTCWeekYear(e,t),i=new Date(0);return i.setUTCFullYear(r,0,n),i.setUTCHours(0,0,0,0),startOfUTCWeek(i,t)}var MILLISECONDS_IN_WEEK=6048e5;function getUTCWeek(e,t){requiredArgs(1,arguments);var n=toDate$1(e),n=startOfUTCWeek(n,t).getTime()-startOfUTCWeekYear(n,t).getTime();return Math.round(n/MILLISECONDS_IN_WEEK)+1}function addLeadingZeros(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}var formatters$2={y:function(e,t){e=e.getUTCFullYear(),e=0<e?e:1-e;return addLeadingZeros("yy"===t?e%100:e,t.length)},M:function(e,t){e=e.getUTCMonth();return"M"===t?String(e+1):addLeadingZeros(e+1,2)},d:function(e,t){return addLeadingZeros(e.getUTCDate(),t.length)},a:function(e,t){var n=1<=e.getUTCHours()/12?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return addLeadingZeros(e.getUTCHours()%12||12,t.length)},H:function(e,t){return addLeadingZeros(e.getUTCHours(),t.length)},m:function(e,t){return addLeadingZeros(e.getUTCMinutes(),t.length)},s:function(e,t){return addLeadingZeros(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,e=e.getUTCMilliseconds();return addLeadingZeros(Math.floor(e*Math.pow(10,n-3)),t.length)}},lightFormatters=formatters$2,dayPeriodEnum={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},formatters={G:function(e,t,n){var r=0<e.getUTCFullYear()?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){var r;return"yo"===t?(r=e.getUTCFullYear(),n.ordinalNumber(0<r?r:1-r,{unit:"year"})):lightFormatters.y(e,t)},Y:function(e,t,n,r){e=getUTCWeekYear(e,r),r=0<e?e:1-e;return"YY"===t?addLeadingZeros(r%100,2):"Yo"===t?n.ordinalNumber(r,{unit:"year"}):addLeadingZeros(r,t.length)},R:function(e,t){return addLeadingZeros(getUTCISOWeekYear(e),t.length)},u:function(e,t){return addLeadingZeros(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return addLeadingZeros(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return addLeadingZeros(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return lightFormatters.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return addLeadingZeros(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){e=getUTCWeek(e,r);return"wo"===t?n.ordinalNumber(e,{unit:"week"}):addLeadingZeros(e,t.length)},I:function(e,t,n){e=getUTCISOWeek(e);return"Io"===t?n.ordinalNumber(e,{unit:"week"}):addLeadingZeros(e,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):lightFormatters.d(e,t)},D:function(e,t,n){e=getUTCDayOfYear(e);return"Do"===t?n.ordinalNumber(e,{unit:"dayOfYear"}):addLeadingZeros(e,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return addLeadingZeros(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return addLeadingZeros(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return addLeadingZeros(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=1<=e.getUTCHours()/12?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var e=e.getUTCHours(),r=12===e?dayPeriodEnum.noon:0===e?dayPeriodEnum.midnight:1<=e/12?"pm":"am";switch(t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var e=e.getUTCHours(),r=17<=e?dayPeriodEnum.evening:12<=e?dayPeriodEnum.afternoon:4<=e?dayPeriodEnum.morning:dayPeriodEnum.night;switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){var r;return"ho"===t?(r=e.getUTCHours()%12,n.ordinalNumber(r=0===r?12:r,{unit:"hour"})):lightFormatters.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):lightFormatters.H(e,t)},K:function(e,t,n){e=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(e,{unit:"hour"}):addLeadingZeros(e,t.length)},k:function(e,t,n){e=e.getUTCHours();return 0===e&&(e=24),"ko"===t?n.ordinalNumber(e,{unit:"hour"}):addLeadingZeros(e,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):lightFormatters.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):lightFormatters.s(e,t)},S:function(e,t){return lightFormatters.S(e,t)},X:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return formatTimezoneWithOptionalMinutes(i);case"XXXX":case"XX":return formatTimezone(i);default:return formatTimezone(i,":")}},x:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return formatTimezoneWithOptionalMinutes(i);case"xxxx":case"xx":return formatTimezone(i);default:return formatTimezone(i,":")}},O:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+formatTimezoneShort(i,":");default:return"GMT"+formatTimezone(i,":")}},z:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+formatTimezoneShort(i,":");default:return"GMT"+formatTimezone(i,":")}},t:function(e,t,n,r){r=r._originalDate||e;return addLeadingZeros(Math.floor(r.getTime()/1e3),t.length)},T:function(e,t,n,r){return addLeadingZeros((r._originalDate||e).getTime(),t.length)}};function formatTimezoneShort(e,t){var n=0<e?"-":"+",e=Math.abs(e),r=Math.floor(e/60),e=e%60;return 0==e?n+String(r):(t=t||"",n+String(r)+t+addLeadingZeros(e,2))}function formatTimezoneWithOptionalMinutes(e,t){return e%60==0?(0<e?"-":"+")+addLeadingZeros(Math.abs(e)/60,2):formatTimezone(e,t)}function formatTimezone(e,t){var t=t||"",n=0<e?"-":"+",e=Math.abs(e);return n+addLeadingZeros(Math.floor(e/60),2)+t+addLeadingZeros(e%60,2)}var formatters$1=formatters,dateLongFormatter=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},timeLongFormatter=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},dateTimeLongFormatter=function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],i=r[1],r=r[2];if(!r)return dateLongFormatter(e,t);switch(i){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",dateLongFormatter(i,t)).replace("{{time}}",timeLongFormatter(r,t))},longFormatters$2={p:timeLongFormatter,P:dateTimeLongFormatter},longFormatters$3=longFormatters$2,protectedDayOfYearTokens=["D","DD"],protectedWeekYearTokens=["YY","YYYY"];function isProtectedDayOfYearToken(e){return-1!==protectedDayOfYearTokens.indexOf(e)}function isProtectedWeekYearToken(e){return-1!==protectedWeekYearTokens.indexOf(e)}function throwProtectedError(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var formatDistanceLocale$3={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},formatDistance$6=function(e,t,n){e=formatDistanceLocale$3[e],e="string"==typeof e?e:1===t?e.one:e.other.replace("{{count}}",t.toString());return null!=n&&n.addSuffix?n.comparison&&0<n.comparison?"in "+e:e+" ago":e},formatDistance$7=formatDistance$6;function buildFormatLongFn$1(t){return function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=e.width?String(e.width):t.defaultWidth;return t.formats[e]||t.formats[t.defaultWidth]}}var dateFormats$3={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},timeFormats$3={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},dateTimeFormats$3={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong$6={date:buildFormatLongFn$1({formats:dateFormats$3,defaultWidth:"full"}),time:buildFormatLongFn$1({formats:timeFormats$3,defaultWidth:"full"}),dateTime:buildFormatLongFn$1({formats:dateTimeFormats$3,defaultWidth:"full"})},formatLong$7=formatLong$6,formatRelativeLocale$3={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},formatRelative$6=function(e,t,n,r){return formatRelativeLocale$3[e]},formatRelative$7=formatRelative$6;function buildLocalizeFn$1(i){return function(e,t){t="formatting"===(null!=t&&t.context?String(t.context):"standalone")&&i.formattingValues?(r=i.defaultFormattingWidth||i.defaultWidth,n=null!=t&&t.width?String(t.width):r,i.formattingValues[n]||i.formattingValues[r]):(n=i.defaultWidth,r=null!=t&&t.width?String(t.width):i.defaultWidth,i.values[r]||i.values[n]);var n,r=i.argumentCallback?i.argumentCallback(e):e;return t[r]}}var eraValues$3={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},quarterValues$3={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},monthValues$3={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},dayValues$3={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},dayPeriodValues$3={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},formattingDayPeriodValues$2={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ordinalNumber$3=function(e,t){var n=Number(e),e=n%100;if(20<e||e<10)switch(e%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},localize$6={ordinalNumber:ordinalNumber$3,era:buildLocalizeFn$1({values:eraValues$3,defaultWidth:"wide"}),quarter:buildLocalizeFn$1({values:quarterValues$3,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:buildLocalizeFn$1({values:monthValues$3,defaultWidth:"wide"}),day:buildLocalizeFn$1({values:dayValues$3,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn$1({values:dayPeriodValues$3,defaultWidth:"wide",formattingValues:formattingDayPeriodValues$2,defaultFormattingWidth:"wide"})},localize$7=localize$6;function buildMatchFn$1(o){return function(e){var t,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=n.width,i=r&&o.matchPatterns[r]||o.matchPatterns[o.defaultMatchWidth],i=e.match(i);return i?(t=i[0],i=r&&o.parsePatterns[r]||o.parsePatterns[o.defaultParseWidth],r=Array.isArray(i)?findIndex$2(i,function(e){return e.test(t)}):findKey$1(i,function(e){return e.test(t)}),i=o.valueCallback?o.valueCallback(r):r,{value:i=n.valueCallback?n.valueCallback(i):i,rest:e.slice(t.length)}):null}}function findKey$1(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function findIndex$2(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function buildMatchPatternFn$1(i){return function(e){var t,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=e.match(i.matchPattern);return r&&(r=r[0],t=e.match(i.parsePattern))?(t=i.valueCallback?i.valueCallback(t[0]):t[0],{value:t=n.valueCallback?n.valueCallback(t):t,rest:e.slice(r.length)}):null}}var matchOrdinalNumberPattern$3=/^(\d+)(th|st|nd|rd)?/i,parseOrdinalNumberPattern$3=/\d+/i,matchEraPatterns$3={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},parseEraPatterns$3={any:[/^b/i,/^(a|c)/i]},matchQuarterPatterns$3={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},parseQuarterPatterns$3={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns$3={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},parseMonthPatterns$3={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns$3={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},parseDayPatterns$3={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},matchDayPeriodPatterns$3={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},parseDayPeriodPatterns$3={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},match$7={ordinalNumber:buildMatchPatternFn$1({matchPattern:matchOrdinalNumberPattern$3,parsePattern:parseOrdinalNumberPattern$3,valueCallback:function(e){return parseInt(e,10)}}),era:buildMatchFn$1({matchPatterns:matchEraPatterns$3,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$3,defaultParseWidth:"any"}),quarter:buildMatchFn$1({matchPatterns:matchQuarterPatterns$3,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$3,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:buildMatchFn$1({matchPatterns:matchMonthPatterns$3,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$3,defaultParseWidth:"any"}),day:buildMatchFn$1({matchPatterns:matchDayPatterns$3,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$3,defaultParseWidth:"any"}),dayPeriod:buildMatchFn$1({matchPatterns:matchDayPeriodPatterns$3,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$3,defaultParseWidth:"any"})},match$8=match$7,locale$3={code:"en-US",formatDistance:formatDistance$7,formatLong:formatLong$7,formatRelative:formatRelative$7,localize:localize$7,match:match$7,options:{weekStartsOn:0,firstWeekContainsDate:1}},defaultLocale$2=locale$3,formattingTokensRegExp$1=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,longFormattingTokensRegExp$1=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,escapedStringRegExp$1=/^'([^]*?)'?$/,doubleQuoteRegExp$1=/''/g,unescapedLatinCharacterRegExp$1=/[a-zA-Z]/;function format(r,i,o){requiredArgs(2,arguments);var e=String(i),t=getDefaultOptions(),a=null!=(n=null!=(n=null==o?void 0:o.locale)?n:t.locale)?n:defaultLocale$2,n=toInteger(null!=(n=null!=(n=null!=(n=null!=(n=null==o?void 0:o.firstWeekContainsDate)?n:null==o||null==(n=o.locale)||null==(n=n.options)?void 0:n.firstWeekContainsDate)?n:t.firstWeekContainsDate)?n:null==(n=t.locale)||null==(n=n.options)?void 0:n.firstWeekContainsDate)?n:1);if(!(1<=n&&n<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");t=toInteger(null!=(c=null!=(c=null!=(c=null!=(c=null==o?void 0:o.weekStartsOn)?c:null==o||null==(c=o.locale)||null==(c=c.options)?void 0:c.weekStartsOn)?c:t.weekStartsOn)?c:null==(c=t.locale)||null==(t=c.options)?void 0:t.weekStartsOn)?c:0);if(!(0<=t&&t<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!a.localize)throw new RangeError("locale must contain localize property");if(!a.formatLong)throw new RangeError("locale must contain formatLong property");var s,l,c=toDate$1(r);if(isValid(c))return s=subMilliseconds(c,getTimezoneOffsetInMilliseconds(c)),l={firstWeekContainsDate:n,weekStartsOn:t,locale:a,_originalDate:c},e.match(longFormattingTokensRegExp$1).map(function(e){var t=e[0];return"p"===t||"P"===t?(0,longFormatters$3[t])(e,a.formatLong):e}).join("").match(formattingTokensRegExp$1).map(function(e){if("''"===e)return"'";var t=e[0];if("'"===t)return cleanEscapedString$1(e);var n=formatters$1[t];if(n)return null!=o&&o.useAdditionalWeekYearTokens||!isProtectedWeekYearToken(e)||throwProtectedError(e,i,String(r)),null!=o&&o.useAdditionalDayOfYearTokens||!isProtectedDayOfYearToken(e)||throwProtectedError(e,i,String(r)),n(s,e,a.localize,l);if(t.match(unescapedLatinCharacterRegExp$1))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return e}).join("");throw new RangeError("Invalid time value")}function cleanEscapedString$1(e){var t=e.match(escapedStringRegExp$1);return t?t[1].replace(doubleQuoteRegExp$1,"'"):e}function getDate(e){return requiredArgs(1,arguments),toDate$1(e).getDate()}function getDay(e){return requiredArgs(1,arguments),toDate$1(e).getDay()}function getDaysInMonth(e){requiredArgs(1,arguments);var t=toDate$1(e),n=t.getFullYear(),t=t.getMonth(),r=new Date(0);return r.setFullYear(n,t+1,0),r.setHours(0,0,0,0),r.getDate()}function getHours(e){return requiredArgs(1,arguments),toDate$1(e).getHours()}function getMinutes(e){return requiredArgs(1,arguments),toDate$1(e).getMinutes()}function getMonth(e){return requiredArgs(1,arguments),toDate$1(e).getMonth()}function getSeconds(e){return requiredArgs(1,arguments),toDate$1(e).getSeconds()}function getYear(e){return requiredArgs(1,arguments),toDate$1(e).getFullYear()}function isAfter(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toDate$1(t);return n.getTime()>r.getTime()}function isBefore(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toDate$1(t);return n.getTime()<r.getTime()}function isEqual$3(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toDate$1(t);return n.getTime()===r.getTime()}function isSameDay(e,t){requiredArgs(2,arguments);var n=startOfDay(e),r=startOfDay(t);return n.getTime()===r.getTime()}function isSameYear(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toDate$1(t);return n.getFullYear()===r.getFullYear()}function isSameMonth(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toDate$1(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function startOfHour(e){requiredArgs(1,arguments);var t=toDate$1(e);return t.setMinutes(0,0,0),t}function isSameHour(e,t){requiredArgs(2,arguments);var n=startOfHour(e),r=startOfHour(t);return n.getTime()===r.getTime()}function assign$1(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function _typeof$w(e){return(_typeof$w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _inherits$v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$w(e,t)}function _setPrototypeOf$w(e,t){return(_setPrototypeOf$w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$v(n){var r=_isNativeReflectConstruct$w();return function(){var e,t=_getPrototypeOf$w(n);return _possibleConstructorReturn$v(this,r?(e=_getPrototypeOf$w(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$v(e,t){return!t||"object"!==_typeof$w(t)&&"function"!=typeof t?_assertThisInitialized$v(e):t}function _assertThisInitialized$v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$w(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$w(e){return(_getPrototypeOf$w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _classCallCheck$w(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$x(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$x(e,t,n){return t&&_defineProperties$x(e.prototype,t),n&&_defineProperties$x(e,n),e}function _defineProperty$v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var TIMEZONE_UNIT_PRIORITY=10,Setter=function(){function e(){_classCallCheck$w(this,e),_defineProperty$v(this,"subPriority",0)}return _createClass$x(e,[{key:"validate",value:function(e,t){return!0}}]),e}(),ValueSetter=function(){_inherits$v(s,Setter);var a=_createSuper$v(s);function s(e,t,n,r,i){var o;return _classCallCheck$w(this,s),(o=a.call(this)).value=e,o.validateValue=t,o.setValue=n,o.priority=r,i&&(o.subPriority=i),o}return _createClass$x(s,[{key:"validate",value:function(e,t){return this.validateValue(e,this.value,t)}},{key:"set",value:function(e,t,n){return this.setValue(e,t,this.value,n)}}]),s}(),DateToSystemTimezoneSetter=function(){_inherits$v(o,Setter);var i=_createSuper$v(o);function o(){var e;_classCallCheck$w(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$v(_assertThisInitialized$v(e=i.call.apply(i,[this].concat(n))),"priority",TIMEZONE_UNIT_PRIORITY),_defineProperty$v(_assertThisInitialized$v(e),"subPriority",-1),e}return _createClass$x(o,[{key:"set",value:function(e,t){return t.timestampIsSet?e:((t=new Date(0)).setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),t.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),t)}}]),o}();function _classCallCheck$v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$w(e,t,n){return t&&_defineProperties$w(e.prototype,t),n&&_defineProperties$w(e,n),e}var Parser=function(){function e(){_classCallCheck$v(this,e)}return _createClass$w(e,[{key:"run",value:function(e,t,n,r){e=this.parse(e,t,n,r);return e?{setter:new ValueSetter(e.value,this.validate,this.set,this.priority,this.subPriority),rest:e.rest}:null}},{key:"validate",value:function(e,t,n){return!0}}]),e}();function _typeof$v(e){return(_typeof$v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$v(e,t,n){return t&&_defineProperties$v(e.prototype,t),n&&_defineProperties$v(e,n),e}function _inherits$u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$v(e,t)}function _setPrototypeOf$v(e,t){return(_setPrototypeOf$v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$u(n){var r=_isNativeReflectConstruct$v();return function(){var e,t=_getPrototypeOf$v(n);return _possibleConstructorReturn$u(this,r?(e=_getPrototypeOf$v(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$u(e,t){return!t||"object"!==_typeof$v(t)&&"function"!=typeof t?_assertThisInitialized$u(e):t}function _assertThisInitialized$u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$v(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$v(e){return(_getPrototypeOf$v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var EraParser=function(){_inherits$u(o,Parser);var i=_createSuper$u(o);function o(){var e;_classCallCheck$u(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$u(_assertThisInitialized$u(e=i.call.apply(i,[this].concat(n))),"priority",140),_defineProperty$u(_assertThisInitialized$u(e),"incompatibleTokens",["R","u","t","T"]),e}return _createClass$v(o,[{key:"parse",value:function(e,t,n){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}},{key:"set",value:function(e,t,n){return t.era=n,e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e}}]),o}(),numericPatterns={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},timezonePatterns={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function mapValue(e,t){return e&&{value:t(e.value),rest:e.rest}}function parseNumericPattern(e,t){e=t.match(e);return e?{value:parseInt(e[0],10),rest:t.slice(e[0].length)}:null}function parseTimezonePattern(e,t){var n,r,i,o,e=t.match(e);return e?"Z"===e[0]?{value:0,rest:t.slice(1)}:(n="+"===e[1]?1:-1,r=e[2]?parseInt(e[2],10):0,i=e[3]?parseInt(e[3],10):0,o=e[5]?parseInt(e[5],10):0,{value:n*(r*millisecondsInHour+i*millisecondsInMinute+o*millisecondsInSecond),rest:t.slice(e[0].length)}):null}function parseAnyDigitsSigned(e){return parseNumericPattern(numericPatterns.anyDigitsSigned,e)}function parseNDigits(e,t){switch(e){case 1:return parseNumericPattern(numericPatterns.singleDigit,t);case 2:return parseNumericPattern(numericPatterns.twoDigits,t);case 3:return parseNumericPattern(numericPatterns.threeDigits,t);case 4:return parseNumericPattern(numericPatterns.fourDigits,t);default:return parseNumericPattern(new RegExp("^\\d{1,"+e+"}"),t)}}function parseNDigitsSigned(e,t){switch(e){case 1:return parseNumericPattern(numericPatterns.singleDigitSigned,t);case 2:return parseNumericPattern(numericPatterns.twoDigitsSigned,t);case 3:return parseNumericPattern(numericPatterns.threeDigitsSigned,t);case 4:return parseNumericPattern(numericPatterns.fourDigitsSigned,t);default:return parseNumericPattern(new RegExp("^-?\\d{1,"+e+"}"),t)}}function dayPeriodEnumToHours(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function normalizeTwoDigitYear(e,t){var n=0<t,t=n?t:1-t;return t=t<=50?e||100:(t=t+50,e+100*Math.floor(t/100)-(t%100<=e?100:0)),n?t:1-t}function isLeapYearIndex$1(e){return e%400==0||e%4==0&&e%100!=0}function _typeof$u(e){return(_typeof$u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$u(e,t,n){return t&&_defineProperties$u(e.prototype,t),n&&_defineProperties$u(e,n),e}function _inherits$t(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$u(e,t)}function _setPrototypeOf$u(e,t){return(_setPrototypeOf$u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$t(n){var r=_isNativeReflectConstruct$u();return function(){var e,t=_getPrototypeOf$u(n);return _possibleConstructorReturn$t(this,r?(e=_getPrototypeOf$u(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$t(e,t){return!t||"object"!==_typeof$u(t)&&"function"!=typeof t?_assertThisInitialized$t(e):t}function _assertThisInitialized$t(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$u(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$u(e){return(_getPrototypeOf$u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var YearParser=function(){_inherits$t(o,Parser);var i=_createSuper$t(o);function o(){var e;_classCallCheck$t(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$t(_assertThisInitialized$t(e=i.call.apply(i,[this].concat(n))),"priority",130),_defineProperty$t(_assertThisInitialized$t(e),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),e}return _createClass$u(o,[{key:"parse",value:function(e,t,n){function r(e){return{year:e,isTwoDigitYear:"yy"===t}}switch(t){case"y":return mapValue(parseNDigits(4,e),r);case"yo":return mapValue(n.ordinalNumber(e,{unit:"year"}),r);default:return mapValue(parseNDigits(t.length,e),r)}}},{key:"validate",value:function(e,t){return t.isTwoDigitYear||0<t.year}},{key:"set",value:function(e,t,n){var r=e.getUTCFullYear();return n.isTwoDigitYear?(r=normalizeTwoDigitYear(n.year,r),e.setUTCFullYear(r,0,1),e.setUTCHours(0,0,0,0)):(r="era"in t&&1!==t.era?1-n.year:n.year,e.setUTCFullYear(r,0,1),e.setUTCHours(0,0,0,0)),e}}]),o}();function _typeof$t(e){return(_typeof$t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$t(e,t,n){return t&&_defineProperties$t(e.prototype,t),n&&_defineProperties$t(e,n),e}function _inherits$s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$t(e,t)}function _setPrototypeOf$t(e,t){return(_setPrototypeOf$t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$s(n){var r=_isNativeReflectConstruct$t();return function(){var e,t=_getPrototypeOf$t(n);return _possibleConstructorReturn$s(this,r?(e=_getPrototypeOf$t(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$s(e,t){return!t||"object"!==_typeof$t(t)&&"function"!=typeof t?_assertThisInitialized$s(e):t}function _assertThisInitialized$s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$t(e){return(_getPrototypeOf$t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var LocalWeekYearParser=function(){_inherits$s(o,Parser);var i=_createSuper$s(o);function o(){var e;_classCallCheck$s(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$s(_assertThisInitialized$s(e=i.call.apply(i,[this].concat(n))),"priority",130),_defineProperty$s(_assertThisInitialized$s(e),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),e}return _createClass$t(o,[{key:"parse",value:function(e,t,n){function r(e){return{year:e,isTwoDigitYear:"YY"===t}}switch(t){case"Y":return mapValue(parseNDigits(4,e),r);case"Yo":return mapValue(n.ordinalNumber(e,{unit:"year"}),r);default:return mapValue(parseNDigits(t.length,e),r)}}},{key:"validate",value:function(e,t){return t.isTwoDigitYear||0<t.year}},{key:"set",value:function(e,t,n,r){var i=getUTCWeekYear(e,r);return n.isTwoDigitYear?(i=normalizeTwoDigitYear(n.year,i),e.setUTCFullYear(i,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0)):(i="era"in t&&1!==t.era?1-n.year:n.year,e.setUTCFullYear(i,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0)),startOfUTCWeek(e,r)}}]),o}();function _typeof$s(e){return(_typeof$s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$s(e,t,n){return t&&_defineProperties$s(e.prototype,t),n&&_defineProperties$s(e,n),e}function _inherits$r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$s(e,t)}function _setPrototypeOf$s(e,t){return(_setPrototypeOf$s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$r(n){var r=_isNativeReflectConstruct$s();return function(){var e,t=_getPrototypeOf$s(n);return _possibleConstructorReturn$r(this,r?(e=_getPrototypeOf$s(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$r(e,t){return!t||"object"!==_typeof$s(t)&&"function"!=typeof t?_assertThisInitialized$r(e):t}function _assertThisInitialized$r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$s(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$s(e){return(_getPrototypeOf$s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ISOWeekYearParser=function(){_inherits$r(o,Parser);var i=_createSuper$r(o);function o(){var e;_classCallCheck$r(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$r(_assertThisInitialized$r(e=i.call.apply(i,[this].concat(n))),"priority",130),_defineProperty$r(_assertThisInitialized$r(e),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),e}return _createClass$s(o,[{key:"parse",value:function(e,t){return parseNDigitsSigned("R"===t?4:t.length,e)}},{key:"set",value:function(e,t,n){var r=new Date(0);return r.setUTCFullYear(n,0,4),r.setUTCHours(0,0,0,0),startOfUTCISOWeek(r)}}]),o}();function _typeof$r(e){return(_typeof$r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$r(e,t,n){return t&&_defineProperties$r(e.prototype,t),n&&_defineProperties$r(e,n),e}function _inherits$q(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$r(e,t)}function _setPrototypeOf$r(e,t){return(_setPrototypeOf$r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$q(n){var r=_isNativeReflectConstruct$r();return function(){var e,t=_getPrototypeOf$r(n);return _possibleConstructorReturn$q(this,r?(e=_getPrototypeOf$r(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$q(e,t){return!t||"object"!==_typeof$r(t)&&"function"!=typeof t?_assertThisInitialized$q(e):t}function _assertThisInitialized$q(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$r(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$r(e){return(_getPrototypeOf$r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ExtendedYearParser=function(){_inherits$q(o,Parser);var i=_createSuper$q(o);function o(){var e;_classCallCheck$q(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$q(_assertThisInitialized$q(e=i.call.apply(i,[this].concat(n))),"priority",130),_defineProperty$q(_assertThisInitialized$q(e),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),e}return _createClass$r(o,[{key:"parse",value:function(e,t){return parseNDigitsSigned("u"===t?4:t.length,e)}},{key:"set",value:function(e,t,n){return e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e}}]),o}();function _typeof$q(e){return(_typeof$q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$q(e,t,n){return t&&_defineProperties$q(e.prototype,t),n&&_defineProperties$q(e,n),e}function _inherits$p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$q(e,t)}function _setPrototypeOf$q(e,t){return(_setPrototypeOf$q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$p(n){var r=_isNativeReflectConstruct$q();return function(){var e,t=_getPrototypeOf$q(n);return _possibleConstructorReturn$p(this,r?(e=_getPrototypeOf$q(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$p(e,t){return!t||"object"!==_typeof$q(t)&&"function"!=typeof t?_assertThisInitialized$p(e):t}function _assertThisInitialized$p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$q(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$q(e){return(_getPrototypeOf$q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var QuarterParser=function(){_inherits$p(o,Parser);var i=_createSuper$p(o);function o(){var e;_classCallCheck$p(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$p(_assertThisInitialized$p(e=i.call.apply(i,[this].concat(n))),"priority",120),_defineProperty$p(_assertThisInitialized$p(e),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),e}return _createClass$q(o,[{key:"parse",value:function(e,t,n){switch(t){case"Q":case"QQ":return parseNDigits(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return 1<=t&&t<=4}},{key:"set",value:function(e,t,n){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e}}]),o}();function _typeof$p(e){return(_typeof$p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$p(e,t,n){return t&&_defineProperties$p(e.prototype,t),n&&_defineProperties$p(e,n),e}function _inherits$o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$p(e,t)}function _setPrototypeOf$p(e,t){return(_setPrototypeOf$p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$o(n){var r=_isNativeReflectConstruct$p();return function(){var e,t=_getPrototypeOf$p(n);return _possibleConstructorReturn$o(this,r?(e=_getPrototypeOf$p(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$o(e,t){return!t||"object"!==_typeof$p(t)&&"function"!=typeof t?_assertThisInitialized$o(e):t}function _assertThisInitialized$o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$p(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$p(e){return(_getPrototypeOf$p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var StandAloneQuarterParser=function(){_inherits$o(o,Parser);var i=_createSuper$o(o);function o(){var e;_classCallCheck$o(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$o(_assertThisInitialized$o(e=i.call.apply(i,[this].concat(n))),"priority",120),_defineProperty$o(_assertThisInitialized$o(e),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),e}return _createClass$p(o,[{key:"parse",value:function(e,t,n){switch(t){case"q":case"qq":return parseNDigits(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,t){return 1<=t&&t<=4}},{key:"set",value:function(e,t,n){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e}}]),o}();function _typeof$o(e){return(_typeof$o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$o(e,t,n){return t&&_defineProperties$o(e.prototype,t),n&&_defineProperties$o(e,n),e}function _inherits$n(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$o(e,t)}function _setPrototypeOf$o(e,t){return(_setPrototypeOf$o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$n(n){var r=_isNativeReflectConstruct$o();return function(){var e,t=_getPrototypeOf$o(n);return _possibleConstructorReturn$n(this,r?(e=_getPrototypeOf$o(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$n(e,t){return!t||"object"!==_typeof$o(t)&&"function"!=typeof t?_assertThisInitialized$n(e):t}function _assertThisInitialized$n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$o(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$o(e){return(_getPrototypeOf$o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var MonthParser=function(){_inherits$n(o,Parser);var i=_createSuper$n(o);function o(){var e;_classCallCheck$n(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$n(_assertThisInitialized$n(e=i.call.apply(i,[this].concat(n))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),_defineProperty$n(_assertThisInitialized$n(e),"priority",110),e}return _createClass$o(o,[{key:"parse",value:function(e,t,n){function r(e){return e-1}switch(t){case"M":return mapValue(parseNumericPattern(numericPatterns.month,e),r);case"MM":return mapValue(parseNDigits(2,e),r);case"Mo":return mapValue(n.ordinalNumber(e,{unit:"month"}),r);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return 0<=t&&t<=11}},{key:"set",value:function(e,t,n){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e}}]),o}();function _typeof$n(e){return(_typeof$n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$n(e,t,n){return t&&_defineProperties$n(e.prototype,t),n&&_defineProperties$n(e,n),e}function _inherits$m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$n(e,t)}function _setPrototypeOf$n(e,t){return(_setPrototypeOf$n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$m(n){var r=_isNativeReflectConstruct$n();return function(){var e,t=_getPrototypeOf$n(n);return _possibleConstructorReturn$m(this,r?(e=_getPrototypeOf$n(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$m(e,t){return!t||"object"!==_typeof$n(t)&&"function"!=typeof t?_assertThisInitialized$m(e):t}function _assertThisInitialized$m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$n(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$n(e){return(_getPrototypeOf$n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var StandAloneMonthParser=function(){_inherits$m(o,Parser);var i=_createSuper$m(o);function o(){var e;_classCallCheck$m(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$m(_assertThisInitialized$m(e=i.call.apply(i,[this].concat(n))),"priority",110),_defineProperty$m(_assertThisInitialized$m(e),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),e}return _createClass$n(o,[{key:"parse",value:function(e,t,n){function r(e){return e-1}switch(t){case"L":return mapValue(parseNumericPattern(numericPatterns.month,e),r);case"LL":return mapValue(parseNDigits(2,e),r);case"Lo":return mapValue(n.ordinalNumber(e,{unit:"month"}),r);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,t){return 0<=t&&t<=11}},{key:"set",value:function(e,t,n){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e}}]),o}();function setUTCWeek(e,t,n){requiredArgs(2,arguments);var r=toDate$1(e),i=toInteger(t),i=getUTCWeek(r,n)-i;return r.setUTCDate(r.getUTCDate()-7*i),r}function _typeof$m(e){return(_typeof$m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$m(e,t,n){return t&&_defineProperties$m(e.prototype,t),n&&_defineProperties$m(e,n),e}function _inherits$l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$m(e,t)}function _setPrototypeOf$m(e,t){return(_setPrototypeOf$m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$l(n){var r=_isNativeReflectConstruct$m();return function(){var e,t=_getPrototypeOf$m(n);return _possibleConstructorReturn$l(this,r?(e=_getPrototypeOf$m(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$l(e,t){return!t||"object"!==_typeof$m(t)&&"function"!=typeof t?_assertThisInitialized$l(e):t}function _assertThisInitialized$l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$m(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$m(e){return(_getPrototypeOf$m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var LocalWeekParser=function(){_inherits$l(o,Parser);var i=_createSuper$l(o);function o(){var e;_classCallCheck$l(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$l(_assertThisInitialized$l(e=i.call.apply(i,[this].concat(n))),"priority",100),_defineProperty$l(_assertThisInitialized$l(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),e}return _createClass$m(o,[{key:"parse",value:function(e,t,n){switch(t){case"w":return parseNumericPattern(numericPatterns.week,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return parseNDigits(t.length,e)}}},{key:"validate",value:function(e,t){return 1<=t&&t<=53}},{key:"set",value:function(e,t,n,r){return startOfUTCWeek(setUTCWeek(e,n,r),r)}}]),o}();function setUTCISOWeek(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toInteger(t),r=getUTCISOWeek(n)-r;return n.setUTCDate(n.getUTCDate()-7*r),n}function _typeof$l(e){return(_typeof$l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$k(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$l(e,t,n){return t&&_defineProperties$l(e.prototype,t),n&&_defineProperties$l(e,n),e}function _inherits$k(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$l(e,t)}function _setPrototypeOf$l(e,t){return(_setPrototypeOf$l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$k(n){var r=_isNativeReflectConstruct$l();return function(){var e,t=_getPrototypeOf$l(n);return _possibleConstructorReturn$k(this,r?(e=_getPrototypeOf$l(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$k(e,t){return!t||"object"!==_typeof$l(t)&&"function"!=typeof t?_assertThisInitialized$k(e):t}function _assertThisInitialized$k(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$l(e){return(_getPrototypeOf$l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ISOWeekParser=function(){_inherits$k(o,Parser);var i=_createSuper$k(o);function o(){var e;_classCallCheck$k(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$k(_assertThisInitialized$k(e=i.call.apply(i,[this].concat(n))),"priority",100),_defineProperty$k(_assertThisInitialized$k(e),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),e}return _createClass$l(o,[{key:"parse",value:function(e,t,n){switch(t){case"I":return parseNumericPattern(numericPatterns.week,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return parseNDigits(t.length,e)}}},{key:"validate",value:function(e,t){return 1<=t&&t<=53}},{key:"set",value:function(e,t,n){return startOfUTCISOWeek(setUTCISOWeek(e,n))}}]),o}();function _typeof$k(e){return(_typeof$k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$k(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$k(e,t,n){return t&&_defineProperties$k(e.prototype,t),n&&_defineProperties$k(e,n),e}function _inherits$j(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$k(e,t)}function _setPrototypeOf$k(e,t){return(_setPrototypeOf$k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$j(n){var r=_isNativeReflectConstruct$k();return function(){var e,t=_getPrototypeOf$k(n);return _possibleConstructorReturn$j(this,r?(e=_getPrototypeOf$k(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$j(e,t){return!t||"object"!==_typeof$k(t)&&"function"!=typeof t?_assertThisInitialized$j(e):t}function _assertThisInitialized$j(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$k(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$k(e){return(_getPrototypeOf$k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var DAYS_IN_MONTH=[31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP_YEAR=[31,29,31,30,31,30,31,31,30,31,30,31],DateParser=function(){_inherits$j(o,Parser);var i=_createSuper$j(o);function o(){var e;_classCallCheck$j(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$j(_assertThisInitialized$j(e=i.call.apply(i,[this].concat(n))),"priority",90),_defineProperty$j(_assertThisInitialized$j(e),"subPriority",1),_defineProperty$j(_assertThisInitialized$j(e),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),e}return _createClass$k(o,[{key:"parse",value:function(e,t,n){switch(t){case"d":return parseNumericPattern(numericPatterns.date,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return parseNDigits(t.length,e)}}},{key:"validate",value:function(e,t){var n=isLeapYearIndex$1(e.getUTCFullYear()),e=e.getUTCMonth();return n?1<=t&&t<=DAYS_IN_MONTH_LEAP_YEAR[e]:1<=t&&t<=DAYS_IN_MONTH[e]}},{key:"set",value:function(e,t,n){return e.setUTCDate(n),e.setUTCHours(0,0,0,0),e}}]),o}();function _typeof$j(e){return(_typeof$j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$j(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$j(e,t,n){return t&&_defineProperties$j(e.prototype,t),n&&_defineProperties$j(e,n),e}function _inherits$i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$j(e,t)}function _setPrototypeOf$j(e,t){return(_setPrototypeOf$j=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$i(n){var r=_isNativeReflectConstruct$j();return function(){var e,t=_getPrototypeOf$j(n);return _possibleConstructorReturn$i(this,r?(e=_getPrototypeOf$j(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$i(e,t){return!t||"object"!==_typeof$j(t)&&"function"!=typeof t?_assertThisInitialized$i(e):t}function _assertThisInitialized$i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$j(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$j(e){return(_getPrototypeOf$j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var DayOfYearParser=function(){_inherits$i(o,Parser);var i=_createSuper$i(o);function o(){var e;_classCallCheck$i(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$i(_assertThisInitialized$i(e=i.call.apply(i,[this].concat(n))),"priority",90),_defineProperty$i(_assertThisInitialized$i(e),"subpriority",1),_defineProperty$i(_assertThisInitialized$i(e),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),e}return _createClass$j(o,[{key:"parse",value:function(e,t,n){switch(t){case"D":case"DD":return parseNumericPattern(numericPatterns.dayOfYear,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return parseNDigits(t.length,e)}}},{key:"validate",value:function(e,t){return isLeapYearIndex$1(e.getUTCFullYear())?1<=t&&t<=366:1<=t&&t<=365}},{key:"set",value:function(e,t,n){return e.setUTCMonth(0,n),e.setUTCHours(0,0,0,0),e}}]),o}();function setUTCDay(e,t,n){requiredArgs(2,arguments);var r,i,o=getDefaultOptions(),o=toInteger(null!=(r=null!=(r=null!=(r=null!=(r=null==n?void 0:n.weekStartsOn)?r:null==n||null==(r=n.locale)||null==(r=r.options)?void 0:r.weekStartsOn)?r:o.weekStartsOn)?r:null==(r=o.locale)||null==(o=r.options)?void 0:o.weekStartsOn)?r:0);if(0<=o&&o<=6)return r=toDate$1(e),o=((7+(i=toInteger(t))%7)%7<o?7:0)+i-r.getUTCDay(),r.setUTCDate(r.getUTCDate()+o),r;throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}function _typeof$i(e){return(_typeof$i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$i(e,t,n){return t&&_defineProperties$i(e.prototype,t),n&&_defineProperties$i(e,n),e}function _inherits$h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$i(e,t)}function _setPrototypeOf$i(e,t){return(_setPrototypeOf$i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$h(n){var r=_isNativeReflectConstruct$i();return function(){var e,t=_getPrototypeOf$i(n);return _possibleConstructorReturn$h(this,r?(e=_getPrototypeOf$i(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$h(e,t){return!t||"object"!==_typeof$i(t)&&"function"!=typeof t?_assertThisInitialized$h(e):t}function _assertThisInitialized$h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$i(e){return(_getPrototypeOf$i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var DayParser=function(){_inherits$h(o,Parser);var i=_createSuper$h(o);function o(){var e;_classCallCheck$h(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$h(_assertThisInitialized$h(e=i.call.apply(i,[this].concat(n))),"priority",90),_defineProperty$h(_assertThisInitialized$h(e),"incompatibleTokens",["D","i","e","c","t","T"]),e}return _createClass$i(o,[{key:"parse",value:function(e,t,n){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return 0<=t&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=setUTCDay(e,n,r)).setUTCHours(0,0,0,0),e}}]),o}();function _typeof$h(e){return(_typeof$h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$h(e,t,n){return t&&_defineProperties$h(e.prototype,t),n&&_defineProperties$h(e,n),e}function _inherits$g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$h(e,t)}function _setPrototypeOf$h(e,t){return(_setPrototypeOf$h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$g(n){var r=_isNativeReflectConstruct$h();return function(){var e,t=_getPrototypeOf$h(n);return _possibleConstructorReturn$g(this,r?(e=_getPrototypeOf$h(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$g(e,t){return!t||"object"!==_typeof$h(t)&&"function"!=typeof t?_assertThisInitialized$g(e):t}function _assertThisInitialized$g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$h(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$h(e){return(_getPrototypeOf$h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var LocalDayParser=function(){_inherits$g(o,Parser);var i=_createSuper$g(o);function o(){var e;_classCallCheck$g(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$g(_assertThisInitialized$g(e=i.call.apply(i,[this].concat(n))),"priority",90),_defineProperty$g(_assertThisInitialized$g(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),e}return _createClass$h(o,[{key:"parse",value:function(e,t,n,r){function i(e){var t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t}switch(t){case"e":case"ee":return mapValue(parseNDigits(t.length,e),i);case"eo":return mapValue(n.ordinalNumber(e,{unit:"day"}),i);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return 0<=t&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=setUTCDay(e,n,r)).setUTCHours(0,0,0,0),e}}]),o}();function _typeof$g(e){return(_typeof$g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$g(e,t,n){return t&&_defineProperties$g(e.prototype,t),n&&_defineProperties$g(e,n),e}function _inherits$f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$g(e,t)}function _setPrototypeOf$g(e,t){return(_setPrototypeOf$g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$f(n){var r=_isNativeReflectConstruct$g();return function(){var e,t=_getPrototypeOf$g(n);return _possibleConstructorReturn$f(this,r?(e=_getPrototypeOf$g(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$f(e,t){return!t||"object"!==_typeof$g(t)&&"function"!=typeof t?_assertThisInitialized$f(e):t}function _assertThisInitialized$f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$g(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$g(e){return(_getPrototypeOf$g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var StandAloneLocalDayParser=function(){_inherits$f(o,Parser);var i=_createSuper$f(o);function o(){var e;_classCallCheck$f(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$f(_assertThisInitialized$f(e=i.call.apply(i,[this].concat(n))),"priority",90),_defineProperty$f(_assertThisInitialized$f(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),e}return _createClass$g(o,[{key:"parse",value:function(e,t,n,r){function i(e){var t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t}switch(t){case"c":case"cc":return mapValue(parseNDigits(t.length,e),i);case"co":return mapValue(n.ordinalNumber(e,{unit:"day"}),i);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,t){return 0<=t&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=setUTCDay(e,n,r)).setUTCHours(0,0,0,0),e}}]),o}();function setUTCISODay(e,t){requiredArgs(2,arguments);var n=toInteger(t),r=(n%7==0&&(n-=7),toDate$1(e)),n=((7+n%7)%7<1?7:0)+n-r.getUTCDay();return r.setUTCDate(r.getUTCDate()+n),r}function _typeof$f(e){return(_typeof$f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$f(e,t,n){return t&&_defineProperties$f(e.prototype,t),n&&_defineProperties$f(e,n),e}function _inherits$e(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$f(e,t)}function _setPrototypeOf$f(e,t){return(_setPrototypeOf$f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$e(n){var r=_isNativeReflectConstruct$f();return function(){var e,t=_getPrototypeOf$f(n);return _possibleConstructorReturn$e(this,r?(e=_getPrototypeOf$f(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$e(e,t){return!t||"object"!==_typeof$f(t)&&"function"!=typeof t?_assertThisInitialized$e(e):t}function _assertThisInitialized$e(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$f(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$f(e){return(_getPrototypeOf$f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ISODayParser=function(){_inherits$e(o,Parser);var i=_createSuper$e(o);function o(){var e;_classCallCheck$e(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$e(_assertThisInitialized$e(e=i.call.apply(i,[this].concat(n))),"priority",90),_defineProperty$e(_assertThisInitialized$e(e),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),e}return _createClass$f(o,[{key:"parse",value:function(e,t,n){function r(e){return 0===e?7:e}switch(t){case"i":case"ii":return parseNDigits(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return mapValue(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiii":return mapValue(n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return mapValue(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);default:return mapValue(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r)}}},{key:"validate",value:function(e,t){return 1<=t&&t<=7}},{key:"set",value:function(e,t,n){return(e=setUTCISODay(e,n)).setUTCHours(0,0,0,0),e}}]),o}();function _typeof$e(e){return(_typeof$e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$e(e,t,n){return t&&_defineProperties$e(e.prototype,t),n&&_defineProperties$e(e,n),e}function _inherits$d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$e(e,t)}function _setPrototypeOf$e(e,t){return(_setPrototypeOf$e=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$d(n){var r=_isNativeReflectConstruct$e();return function(){var e,t=_getPrototypeOf$e(n);return _possibleConstructorReturn$d(this,r?(e=_getPrototypeOf$e(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$d(e,t){return!t||"object"!==_typeof$e(t)&&"function"!=typeof t?_assertThisInitialized$d(e):t}function _assertThisInitialized$d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$e(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$e(e){return(_getPrototypeOf$e=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var AMPMParser=function(){_inherits$d(o,Parser);var i=_createSuper$d(o);function o(){var e;_classCallCheck$d(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$d(_assertThisInitialized$d(e=i.call.apply(i,[this].concat(n))),"priority",80),_defineProperty$d(_assertThisInitialized$d(e),"incompatibleTokens",["b","B","H","k","t","T"]),e}return _createClass$e(o,[{key:"parse",value:function(e,t,n){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,t,n){return e.setUTCHours(dayPeriodEnumToHours(n),0,0,0),e}}]),o}();function _typeof$d(e){return(_typeof$d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$d(e,t,n){return t&&_defineProperties$d(e.prototype,t),n&&_defineProperties$d(e,n),e}function _inherits$c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$d(e,t)}function _setPrototypeOf$d(e,t){return(_setPrototypeOf$d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$c(n){var r=_isNativeReflectConstruct$d();return function(){var e,t=_getPrototypeOf$d(n);return _possibleConstructorReturn$c(this,r?(e=_getPrototypeOf$d(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$c(e,t){return!t||"object"!==_typeof$d(t)&&"function"!=typeof t?_assertThisInitialized$c(e):t}function _assertThisInitialized$c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$d(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$d(e){return(_getPrototypeOf$d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var AMPMMidnightParser=function(){_inherits$c(o,Parser);var i=_createSuper$c(o);function o(){var e;_classCallCheck$c(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$c(_assertThisInitialized$c(e=i.call.apply(i,[this].concat(n))),"priority",80),_defineProperty$c(_assertThisInitialized$c(e),"incompatibleTokens",["a","B","H","k","t","T"]),e}return _createClass$d(o,[{key:"parse",value:function(e,t,n){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,t,n){return e.setUTCHours(dayPeriodEnumToHours(n),0,0,0),e}}]),o}();function _typeof$c(e){return(_typeof$c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$c(e,t,n){return t&&_defineProperties$c(e.prototype,t),n&&_defineProperties$c(e,n),e}function _inherits$b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$c(e,t)}function _setPrototypeOf$c(e,t){return(_setPrototypeOf$c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$b(n){var r=_isNativeReflectConstruct$c();return function(){var e,t=_getPrototypeOf$c(n);return _possibleConstructorReturn$b(this,r?(e=_getPrototypeOf$c(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$b(e,t){return!t||"object"!==_typeof$c(t)&&"function"!=typeof t?_assertThisInitialized$b(e):t}function _assertThisInitialized$b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$c(e){return(_getPrototypeOf$c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var DayPeriodParser=function(){_inherits$b(o,Parser);var i=_createSuper$b(o);function o(){var e;_classCallCheck$b(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$b(_assertThisInitialized$b(e=i.call.apply(i,[this].concat(n))),"priority",80),_defineProperty$b(_assertThisInitialized$b(e),"incompatibleTokens",["a","b","t","T"]),e}return _createClass$c(o,[{key:"parse",value:function(e,t,n){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,t,n){return e.setUTCHours(dayPeriodEnumToHours(n),0,0,0),e}}]),o}();function _typeof$b(e){return(_typeof$b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$b(e,t,n){return t&&_defineProperties$b(e.prototype,t),n&&_defineProperties$b(e,n),e}function _inherits$a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$b(e,t)}function _setPrototypeOf$b(e,t){return(_setPrototypeOf$b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$a(n){var r=_isNativeReflectConstruct$b();return function(){var e,t=_getPrototypeOf$b(n);return _possibleConstructorReturn$a(this,r?(e=_getPrototypeOf$b(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$a(e,t){return!t||"object"!==_typeof$b(t)&&"function"!=typeof t?_assertThisInitialized$a(e):t}function _assertThisInitialized$a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$b(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$b(e){return(_getPrototypeOf$b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Hour1to12Parser=function(){_inherits$a(o,Parser);var i=_createSuper$a(o);function o(){var e;_classCallCheck$a(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$a(_assertThisInitialized$a(e=i.call.apply(i,[this].concat(n))),"priority",70),_defineProperty$a(_assertThisInitialized$a(e),"incompatibleTokens",["H","K","k","t","T"]),e}return _createClass$b(o,[{key:"parse",value:function(e,t,n){switch(t){case"h":return parseNumericPattern(numericPatterns.hour12h,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return parseNDigits(t.length,e)}}},{key:"validate",value:function(e,t){return 1<=t&&t<=12}},{key:"set",value:function(e,t,n){var r=12<=e.getUTCHours();return r&&n<12?e.setUTCHours(n+12,0,0,0):r||12!==n?e.setUTCHours(n,0,0,0):e.setUTCHours(0,0,0,0),e}}]),o}();function _typeof$a(e){return(_typeof$a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$a(e,t,n){return t&&_defineProperties$a(e.prototype,t),n&&_defineProperties$a(e,n),e}function _inherits$9(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$a(e,t)}function _setPrototypeOf$a(e,t){return(_setPrototypeOf$a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$9(n){var r=_isNativeReflectConstruct$a();return function(){var e,t=_getPrototypeOf$a(n);return _possibleConstructorReturn$9(this,r?(e=_getPrototypeOf$a(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$9(e,t){return!t||"object"!==_typeof$a(t)&&"function"!=typeof t?_assertThisInitialized$9(e):t}function _assertThisInitialized$9(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$a(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$a(e){return(_getPrototypeOf$a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$9(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Hour0to23Parser=function(){_inherits$9(o,Parser);var i=_createSuper$9(o);function o(){var e;_classCallCheck$9(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$9(_assertThisInitialized$9(e=i.call.apply(i,[this].concat(n))),"priority",70),_defineProperty$9(_assertThisInitialized$9(e),"incompatibleTokens",["a","b","h","K","k","t","T"]),e}return _createClass$a(o,[{key:"parse",value:function(e,t,n){switch(t){case"H":return parseNumericPattern(numericPatterns.hour23h,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return parseNDigits(t.length,e)}}},{key:"validate",value:function(e,t){return 0<=t&&t<=23}},{key:"set",value:function(e,t,n){return e.setUTCHours(n,0,0,0),e}}]),o}();function _typeof$9(e){return(_typeof$9="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$9(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$9(e,t,n){return t&&_defineProperties$9(e.prototype,t),n&&_defineProperties$9(e,n),e}function _inherits$8(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$9(e,t)}function _setPrototypeOf$9(e,t){return(_setPrototypeOf$9=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$8(n){var r=_isNativeReflectConstruct$9();return function(){var e,t=_getPrototypeOf$9(n);return _possibleConstructorReturn$8(this,r?(e=_getPrototypeOf$9(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$8(e,t){return!t||"object"!==_typeof$9(t)&&"function"!=typeof t?_assertThisInitialized$8(e):t}function _assertThisInitialized$8(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$9(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$9(e){return(_getPrototypeOf$9=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$8(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Hour0To11Parser=function(){_inherits$8(o,Parser);var i=_createSuper$8(o);function o(){var e;_classCallCheck$8(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$8(_assertThisInitialized$8(e=i.call.apply(i,[this].concat(n))),"priority",70),_defineProperty$8(_assertThisInitialized$8(e),"incompatibleTokens",["h","H","k","t","T"]),e}return _createClass$9(o,[{key:"parse",value:function(e,t,n){switch(t){case"K":return parseNumericPattern(numericPatterns.hour11h,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return parseNDigits(t.length,e)}}},{key:"validate",value:function(e,t){return 0<=t&&t<=11}},{key:"set",value:function(e,t,n){return 12<=e.getUTCHours()&&n<12?e.setUTCHours(n+12,0,0,0):e.setUTCHours(n,0,0,0),e}}]),o}();function _typeof$8(e){return(_typeof$8="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$8(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$8(e,t,n){return t&&_defineProperties$8(e.prototype,t),n&&_defineProperties$8(e,n),e}function _inherits$7(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$8(e,t)}function _setPrototypeOf$8(e,t){return(_setPrototypeOf$8=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$7(n){var r=_isNativeReflectConstruct$8();return function(){var e,t=_getPrototypeOf$8(n);return _possibleConstructorReturn$7(this,r?(e=_getPrototypeOf$8(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$7(e,t){return!t||"object"!==_typeof$8(t)&&"function"!=typeof t?_assertThisInitialized$7(e):t}function _assertThisInitialized$7(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$8(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$8(e){return(_getPrototypeOf$8=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$7(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Hour1To24Parser=function(){_inherits$7(o,Parser);var i=_createSuper$7(o);function o(){var e;_classCallCheck$7(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$7(_assertThisInitialized$7(e=i.call.apply(i,[this].concat(n))),"priority",70),_defineProperty$7(_assertThisInitialized$7(e),"incompatibleTokens",["a","b","h","H","K","t","T"]),e}return _createClass$8(o,[{key:"parse",value:function(e,t,n){switch(t){case"k":return parseNumericPattern(numericPatterns.hour24h,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return parseNDigits(t.length,e)}}},{key:"validate",value:function(e,t){return 1<=t&&t<=24}},{key:"set",value:function(e,t,n){return e.setUTCHours(n<=24?n%24:n,0,0,0),e}}]),o}();function _typeof$7(e){return(_typeof$7="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$7(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$7(e,t,n){return t&&_defineProperties$7(e.prototype,t),n&&_defineProperties$7(e,n),e}function _inherits$6(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$7(e,t)}function _setPrototypeOf$7(e,t){return(_setPrototypeOf$7=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$6(n){var r=_isNativeReflectConstruct$7();return function(){var e,t=_getPrototypeOf$7(n);return _possibleConstructorReturn$6(this,r?(e=_getPrototypeOf$7(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$6(e,t){return!t||"object"!==_typeof$7(t)&&"function"!=typeof t?_assertThisInitialized$6(e):t}function _assertThisInitialized$6(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$7(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$7(e){return(_getPrototypeOf$7=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$6(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var MinuteParser=function(){_inherits$6(o,Parser);var i=_createSuper$6(o);function o(){var e;_classCallCheck$6(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$6(_assertThisInitialized$6(e=i.call.apply(i,[this].concat(n))),"priority",60),_defineProperty$6(_assertThisInitialized$6(e),"incompatibleTokens",["t","T"]),e}return _createClass$7(o,[{key:"parse",value:function(e,t,n){switch(t){case"m":return parseNumericPattern(numericPatterns.minute,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return parseNDigits(t.length,e)}}},{key:"validate",value:function(e,t){return 0<=t&&t<=59}},{key:"set",value:function(e,t,n){return e.setUTCMinutes(n,0,0),e}}]),o}();function _typeof$6(e){return(_typeof$6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$5(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$6(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$6(e,t,n){return t&&_defineProperties$6(e.prototype,t),n&&_defineProperties$6(e,n),e}function _inherits$5(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$6(e,t)}function _setPrototypeOf$6(e,t){return(_setPrototypeOf$6=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$5(n){var r=_isNativeReflectConstruct$6();return function(){var e,t=_getPrototypeOf$6(n);return _possibleConstructorReturn$5(this,r?(e=_getPrototypeOf$6(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$5(e,t){return!t||"object"!==_typeof$6(t)&&"function"!=typeof t?_assertThisInitialized$5(e):t}function _assertThisInitialized$5(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$6(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$6(e){return(_getPrototypeOf$6=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$5(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var SecondParser=function(){_inherits$5(o,Parser);var i=_createSuper$5(o);function o(){var e;_classCallCheck$5(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$5(_assertThisInitialized$5(e=i.call.apply(i,[this].concat(n))),"priority",50),_defineProperty$5(_assertThisInitialized$5(e),"incompatibleTokens",["t","T"]),e}return _createClass$6(o,[{key:"parse",value:function(e,t,n){switch(t){case"s":return parseNumericPattern(numericPatterns.second,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return parseNDigits(t.length,e)}}},{key:"validate",value:function(e,t){return 0<=t&&t<=59}},{key:"set",value:function(e,t,n){return e.setUTCSeconds(n,0),e}}]),o}();function _typeof$5(e){return(_typeof$5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$5(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$5(e,t,n){return t&&_defineProperties$5(e.prototype,t),n&&_defineProperties$5(e,n),e}function _inherits$4(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$5(e,t)}function _setPrototypeOf$5(e,t){return(_setPrototypeOf$5=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$4(n){var r=_isNativeReflectConstruct$5();return function(){var e,t=_getPrototypeOf$5(n);return _possibleConstructorReturn$4(this,r?(e=_getPrototypeOf$5(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$4(e,t){return!t||"object"!==_typeof$5(t)&&"function"!=typeof t?_assertThisInitialized$4(e):t}function _assertThisInitialized$4(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$5(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$5(e){return(_getPrototypeOf$5=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$4(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var FractionOfSecondParser=function(){_inherits$4(o,Parser);var i=_createSuper$4(o);function o(){var e;_classCallCheck$4(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$4(_assertThisInitialized$4(e=i.call.apply(i,[this].concat(n))),"priority",30),_defineProperty$4(_assertThisInitialized$4(e),"incompatibleTokens",["t","T"]),e}return _createClass$5(o,[{key:"parse",value:function(e,t){return mapValue(parseNDigits(t.length,e),function(e){return Math.floor(e*Math.pow(10,3-t.length))})}},{key:"set",value:function(e,t,n){return e.setUTCMilliseconds(n),e}}]),o}();function _typeof$4(e){return(_typeof$4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$3(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$4(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$4(e,t,n){return t&&_defineProperties$4(e.prototype,t),n&&_defineProperties$4(e,n),e}function _inherits$3(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$4(e,t)}function _setPrototypeOf$4(e,t){return(_setPrototypeOf$4=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$3(n){var r=_isNativeReflectConstruct$4();return function(){var e,t=_getPrototypeOf$4(n);return _possibleConstructorReturn$3(this,r?(e=_getPrototypeOf$4(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$3(e,t){return!t||"object"!==_typeof$4(t)&&"function"!=typeof t?_assertThisInitialized$3(e):t}function _assertThisInitialized$3(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$4(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$4(e){return(_getPrototypeOf$4=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$3(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ISOTimezoneWithZParser=function(){_inherits$3(o,Parser);var i=_createSuper$3(o);function o(){var e;_classCallCheck$3(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$3(_assertThisInitialized$3(e=i.call.apply(i,[this].concat(n))),"priority",10),_defineProperty$3(_assertThisInitialized$3(e),"incompatibleTokens",["t","T","x"]),e}return _createClass$4(o,[{key:"parse",value:function(e,t){switch(t){case"X":return parseTimezonePattern(timezonePatterns.basicOptionalMinutes,e);case"XX":return parseTimezonePattern(timezonePatterns.basic,e);case"XXXX":return parseTimezonePattern(timezonePatterns.basicOptionalSeconds,e);case"XXXXX":return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds,e);default:return parseTimezonePattern(timezonePatterns.extended,e)}}},{key:"set",value:function(e,t,n){return t.timestampIsSet?e:new Date(e.getTime()-n)}}]),o}();function _typeof$3(e){return(_typeof$3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$3(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$3(e,t,n){return t&&_defineProperties$3(e.prototype,t),n&&_defineProperties$3(e,n),e}function _inherits$2(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$3(e,t)}function _setPrototypeOf$3(e,t){return(_setPrototypeOf$3=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$2(n){var r=_isNativeReflectConstruct$3();return function(){var e,t=_getPrototypeOf$3(n);return _possibleConstructorReturn$2(this,r?(e=_getPrototypeOf$3(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$2(e,t){return!t||"object"!==_typeof$3(t)&&"function"!=typeof t?_assertThisInitialized$2(e):t}function _assertThisInitialized$2(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$3(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$3(e){return(_getPrototypeOf$3=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$2(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ISOTimezoneParser=function(){_inherits$2(o,Parser);var i=_createSuper$2(o);function o(){var e;_classCallCheck$2(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$2(_assertThisInitialized$2(e=i.call.apply(i,[this].concat(n))),"priority",10),_defineProperty$2(_assertThisInitialized$2(e),"incompatibleTokens",["t","T","X"]),e}return _createClass$3(o,[{key:"parse",value:function(e,t){switch(t){case"x":return parseTimezonePattern(timezonePatterns.basicOptionalMinutes,e);case"xx":return parseTimezonePattern(timezonePatterns.basic,e);case"xxxx":return parseTimezonePattern(timezonePatterns.basicOptionalSeconds,e);case"xxxxx":return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds,e);default:return parseTimezonePattern(timezonePatterns.extended,e)}}},{key:"set",value:function(e,t,n){return t.timestampIsSet?e:new Date(e.getTime()-n)}}]),o}();function _typeof$2(e){return(_typeof$2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck$1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$2(e,t,n){return t&&_defineProperties$2(e.prototype,t),n&&_defineProperties$2(e,n),e}function _inherits$1(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$2(e,t)}function _setPrototypeOf$2(e,t){return(_setPrototypeOf$2=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$1(n){var r=_isNativeReflectConstruct$2();return function(){var e,t=_getPrototypeOf$2(n);return _possibleConstructorReturn$1(this,r?(e=_getPrototypeOf$2(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$1(e,t){return!t||"object"!==_typeof$2(t)&&"function"!=typeof t?_assertThisInitialized$1(e):t}function _assertThisInitialized$1(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$2(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$2(e){return(_getPrototypeOf$2=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty$1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var TimestampSecondsParser=function(){_inherits$1(o,Parser);var i=_createSuper$1(o);function o(){var e;_classCallCheck$1(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty$1(_assertThisInitialized$1(e=i.call.apply(i,[this].concat(n))),"priority",40),_defineProperty$1(_assertThisInitialized$1(e),"incompatibleTokens","*"),e}return _createClass$2(o,[{key:"parse",value:function(e){return parseAnyDigitsSigned(e)}},{key:"set",value:function(e,t,n){return[new Date(1e3*n),{timestampIsSet:!0}]}}]),o}();function _typeof$1(e){return(_typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$1(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$1(e,t,n){return t&&_defineProperties$1(e.prototype,t),n&&_defineProperties$1(e,n),e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$1(e,t)}function _setPrototypeOf$1(e,t){return(_setPrototypeOf$1=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(n){var r=_isNativeReflectConstruct$1();return function(){var e,t=_getPrototypeOf$1(n);return _possibleConstructorReturn(this,r?(e=_getPrototypeOf$1(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof$1(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$1(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$1(e){return(_getPrototypeOf$1=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var TimestampMillisecondsParser=function(){_inherits(o,Parser);var i=_createSuper(o);function o(){var e;_classCallCheck(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _defineProperty(_assertThisInitialized(e=i.call.apply(i,[this].concat(n))),"priority",20),_defineProperty(_assertThisInitialized(e),"incompatibleTokens","*"),e}return _createClass$1(o,[{key:"parse",value:function(e){return parseAnyDigitsSigned(e)}},{key:"set",value:function(e,t,n){return[new Date(n),{timestampIsSet:!0}]}}]),o}(),parsers={G:new EraParser,y:new YearParser,Y:new LocalWeekYearParser,R:new ISOWeekYearParser,u:new ExtendedYearParser,Q:new QuarterParser,q:new StandAloneQuarterParser,M:new MonthParser,L:new StandAloneMonthParser,w:new LocalWeekParser,I:new ISOWeekParser,d:new DateParser,D:new DayOfYearParser,E:new DayParser,e:new LocalDayParser,c:new StandAloneLocalDayParser,i:new ISODayParser,a:new AMPMParser,b:new AMPMMidnightParser,B:new DayPeriodParser,h:new Hour1to12Parser,H:new Hour0to23Parser,K:new Hour0To11Parser,k:new Hour1To24Parser,m:new MinuteParser,s:new SecondParser,S:new FractionOfSecondParser,X:new ISOTimezoneWithZParser,x:new ISOTimezoneParser,t:new TimestampSecondsParser,T:new TimestampMillisecondsParser};function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _createForOfIteratorHelper(e,t){var n,r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=_unsupportedIterableToArray$1(e))||t&&e&&"number"==typeof e.length)return n&&(e=n),r=0,{s:t=function(){},n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw i}}}}function _unsupportedIterableToArray$1(e,t){var n;if(e)return"string"==typeof e?_arrayLikeToArray$1(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray$1(e,t):void 0}function _arrayLikeToArray$1(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var formattingTokensRegExp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,longFormattingTokensRegExp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,escapedStringRegExp=/^'([^]*?)'?$/,doubleQuoteRegExp=/''/g,notWhitespaceRegExp=/\S/,unescapedLatinCharacterRegExp=/[a-zA-Z]/;function parse$2(o,e,t,a){requiredArgs(3,arguments);var s=String(o),l=String(e),n=getDefaultOptions(),c=null!=(r=null!=(r=null==a?void 0:a.locale)?r:n.locale)?r:defaultLocale$2;if(!c.match)throw new RangeError("locale must contain match property");var r=toInteger(null!=(r=null!=(r=null!=(r=null!=(r=null==a?void 0:a.firstWeekContainsDate)?r:null==a||null==(r=a.locale)||null==(r=r.options)?void 0:r.firstWeekContainsDate)?r:n.firstWeekContainsDate)?r:null==(r=n.locale)||null==(r=r.options)?void 0:r.firstWeekContainsDate)?r:1);if(!(1<=r&&r<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");n=toInteger(null!=(i=null!=(i=null!=(i=null!=(i=null==a?void 0:a.weekStartsOn)?i:null==a||null==(i=a.locale)||null==(i=i.options)?void 0:i.weekStartsOn)?i:n.weekStartsOn)?i:null==(i=n.locale)||null==(n=i.options)?void 0:n.weekStartsOn)?i:0);if(!(0<=n&&n<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===l)return""===s?toDate$1(t):new Date(NaN);var u,d={firstWeekContainsDate:r,weekStartsOn:n,locale:c},p=[new DateToSystemTimezoneSetter],i=l.match(longFormattingTokensRegExp).map(function(e){var t=e[0];return t in longFormatters$3?(0,longFormatters$3[t])(e,c.formatLong):e}).join("").match(formattingTokensRegExp),f=[],h=_createForOfIteratorHelper(i);try{for(h.s();!(u=h.n()).done;){var m=function(){var e=u.value,t=(null!=a&&a.useAdditionalWeekYearTokens||!isProtectedWeekYearToken(e)||throwProtectedError(e,l,o),null!=a&&a.useAdditionalDayOfYearTokens||!isProtectedDayOfYearToken(e)||throwProtectedError(e,l,o),e[0]),n=parsers[t];if(n){var r=n.incompatibleTokens;if(Array.isArray(r)){var i=f.find(function(e){return r.includes(e.token)||e.token===t});if(i)throw new RangeError("The format string mustn't contain `".concat(i.fullToken,"` and `").concat(e,"` at the same time"))}else if("*"===n.incompatibleTokens&&0<f.length)throw new RangeError("The format string mustn't contain `".concat(e,"` and any other token at the same time"));f.push({token:t,fullToken:e});i=n.run(s,e,c.match,d);if(!i)return{v:new Date(NaN)};p.push(i.setter),s=i.rest}else{if(t.match(unescapedLatinCharacterRegExp))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");if("''"===e?e="'":"'"===t&&(e=cleanEscapedString(e)),0!==s.indexOf(e))return{v:new Date(NaN)};s=s.slice(e.length)}}();if("object"===_typeof(m))return m.v}}catch(e){h.e(e)}finally{h.f()}if(0<s.length&&notWhitespaceRegExp.test(s))return new Date(NaN);r=p.map(function(e){return e.priority}).sort(function(e,t){return t-e}).filter(function(e,t,n){return n.indexOf(e)===t}).map(function(t){return p.filter(function(e){return e.priority===t}).sort(function(e,t){return t.subPriority-e.subPriority})}).map(function(e){return e[0]}),n=toDate$1(t);if(isNaN(n.getTime()))return new Date(NaN);var g,y=subMilliseconds(n,getTimezoneOffsetInMilliseconds(n)),v={},x=_createForOfIteratorHelper(r);try{for(x.s();!(g=x.n()).done;){var b=g.value;if(!b.validate(y,d))return new Date(NaN);var $=b.set(y,v,d);Array.isArray($)?(y=$[0],assign$1(v,$[1])):y=$}}catch(e){x.e(e)}finally{x.f()}return y}function cleanEscapedString(e){return e.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp,"'")}function setDate(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toInteger(t);return n.setDate(r),n}function setHours(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toInteger(t);return n.setHours(r),n}function setMinutes(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toInteger(t);return n.setMinutes(r),n}function setMonth(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toInteger(t),i=n.getFullYear(),o=n.getDate(),a=new Date(0),i=(a.setFullYear(i,r,15),a.setHours(0,0,0,0),getDaysInMonth(a));return n.setMonth(r,Math.min(o,i)),n}function setSeconds(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toInteger(t);return n.setSeconds(r),n}function setYear(e,t){requiredArgs(2,arguments);var n=toDate$1(e),r=toInteger(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(r),n)}function startOfMonth(e){requiredArgs(1,arguments);var t=toDate$1(e);return t.setDate(1),t.setHours(0,0,0,0),t}function startOfWeek(e,t){requiredArgs(1,arguments);var n,r,i=getDefaultOptions(),i=toInteger(null!=(n=null!=(n=null!=(n=null!=(n=null==t?void 0:t.weekStartsOn)?n:null==t||null==(n=t.locale)||null==(n=n.options)?void 0:n.weekStartsOn)?n:i.weekStartsOn)?n:null==(n=i.locale)||null==(i=n.options)?void 0:i.weekStartsOn)?n:0);if(0<=i&&i<=6)return r=((r=(n=toDate$1(e)).getDay())<i?7:0)+r-i,n.setDate(n.getDate()-r),n.setHours(0,0,0,0),n;throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}function startOfYear(e){requiredArgs(1,arguments);var t=toDate$1(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function parseISO(e,t){requiredArgs(1,arguments);var n,r,i=toInteger(null!=(i=null==t?void 0:t.additionalDigits)?i:2);if(2!==i&&1!==i&&0!==i)throw new RangeError("additionalDigits must be 0, 1 or 2");return"string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e)||!(n=(r=splitDateString(e)).date?parseDate((i=parseYear(r.date,i)).restDateString,i.year):n)||isNaN(n.getTime())||(i=n.getTime(),n=0,r.time&&(n=parseTime(r.time),isNaN(n)))?new Date(NaN):r.timezone?(r=parseTimezone(r.timezone),isNaN(r)?new Date(NaN):new Date(i+n+r)):(r=new Date(i+n),(i=new Date(0)).setFullYear(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate()),i.setHours(r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds()),i)}var patterns={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},dateRegex=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,timeRegex=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,timezoneRegex=/^([+-])(\d{2})(?::?(\d{2}))?$/;function splitDateString(e){var t,n={},r=e.split(patterns.dateTimeDelimiter);return 2<r.length||(/:/.test(r[0])?t=r[0]:(n.date=r[0],t=r[1],patterns.timeZoneDelimiter.test(n.date)&&(n.date=e.split(patterns.timeZoneDelimiter)[0],t=e.substr(n.date.length,e.length))),t&&((r=patterns.timezone.exec(t))?(n.time=t.replace(r[1],""),n.timezone=r[1]):n.time=t)),n}function parseYear(e,t){var n,r,t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),t=e.match(t);return t?(n=t[1]?parseInt(t[1]):null,{year:null===(r=t[2]?parseInt(t[2]):null)?n:100*r,restDateString:e.slice((t[1]||t[2]).length)}):{year:NaN,restDateString:""}}function parseDate(e,t){var n,r,i,o,a;return null!==t&&(e=e.match(dateRegex))?(a=!!e[4],n=parseDateUnit(e[1]),r=parseDateUnit(e[2])-1,i=parseDateUnit(e[3]),o=parseDateUnit(e[4]),e=parseDateUnit(e[5])-1,a?validateWeekDate(t,o,e)?dayOfISOWeekYear(t,o,e):new Date(NaN):(a=new Date(0),validateDate(t,r,i)&&validateDayOfYearDate(t,n)?(a.setUTCFullYear(t,r,Math.max(n,i)),a):new Date(NaN))):new Date(NaN)}function parseDateUnit(e){return e?parseInt(e):1}function parseTime(e){var t,n,e=e.match(timeRegex);return e&&validateTime(t=parseTimeUnit(e[1]),n=parseTimeUnit(e[2]),e=parseTimeUnit(e[3]))?t*millisecondsInHour+n*millisecondsInMinute+1e3*e:NaN}function parseTimeUnit(e){return e&&parseFloat(e.replace(",","."))||0}function parseTimezone(e){var t,n;return"Z"!==e&&(e=e.match(timezoneRegex))?(t="+"===e[1]?-1:1,validateTimezone(n=parseInt(e[2]),e=e[3]&&parseInt(e[3])||0)?t*(n*millisecondsInHour+e*millisecondsInMinute):NaN):0}function dayOfISOWeekYear(e,t,n){var r=new Date(0);r.setUTCFullYear(e,0,4);e=7*(t-1)+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+e),r}var daysInMonths=[31,null,31,30,31,30,31,31,30,31,30,31];function isLeapYearIndex(e){return e%400==0||e%4==0&&e%100!=0}function validateDate(e,t,n){return 0<=t&&t<=11&&1<=n&&n<=(daysInMonths[t]||(isLeapYearIndex(e)?29:28))}function validateDayOfYearDate(e,t){return 1<=t&&t<=(isLeapYearIndex(e)?366:365)}function validateWeekDate(e,t,n){return 1<=t&&t<=53&&0<=n&&n<=6}function validateTime(e,t,n){return 24===e?0===t&&0===n:0<=n&&n<60&&0<=t&&t<60&&0<=e&&e<25}function validateTimezone(e,t){return 0<=t&&t<=59}function formatISO(e,t){requiredArgs(1,arguments);var n=toDate$1(e);if(isNaN(n.getTime()))throw new RangeError("Invalid time value");var r=String(null!=(r=null==t?void 0:t.format)?r:"extended"),i=String(null!=(i=null==t?void 0:t.representation)?i:"complete");if("extended"!==r&&"basic"!==r)throw new RangeError("format must be 'extended' or 'basic'");if("date"!==i&&"time"!==i&&"complete"!==i)throw new RangeError("representation must be 'date', 'time', or 'complete'");var o,a,s,l="",c="",u="extended"===r?"-":"",r="extended"===r?":":"";return"time"!==i&&(a=addLeadingZeros(n.getDate(),2),s=addLeadingZeros(n.getMonth()+1,2),o=addLeadingZeros(n.getFullYear(),4),l="".concat(o).concat(u).concat(s).concat(u).concat(a)),"date"!==i&&(c=0!==(o=n.getTimezoneOffset())?(s=Math.abs(o),u=addLeadingZeros(Math.floor(s/60),2),a=addLeadingZeros(s%60,2),"".concat(o<0?"+":"-").concat(u,":").concat(a)):"Z",i=""===l?"":"T",s=[addLeadingZeros(n.getHours(),2),addLeadingZeros(n.getMinutes(),2),addLeadingZeros(n.getSeconds(),2)].join(r),l="".concat(l).concat(i).concat(s).concat(c)),l}function isWithinInterval(e,t){requiredArgs(2,arguments);var n=toDate$1(e).getTime(),r=toDate$1(t.start).getTime(),i=toDate$1(t.end).getTime();if(r<=i)return r<=n&&n<=i;throw new RangeError("Invalid interval")}var longFormatters$1={exports:{}},longFormatters=(!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;function o(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}}function a(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}}t.default={p:a,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],i=r[1],r=r[2];if(!r)return o(e,t);switch(i){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",o(i,t)).replace("{{time}}",a(r,t))}},e.exports=t.default}(longFormatters$1,longFormatters$1.exports),getDefaultExportFromCjs(longFormatters$1.exports)),defaultFormats={dayOfMonth:"d",fullDate:"PP",fullDateWithWeekday:"PPPP",fullDateTime:"PP p",fullDateTime12h:"PP hh:mm aaa",fullDateTime24h:"PP HH:mm",fullTime:"p",fullTime12h:"hh:mm aaa",fullTime24h:"HH:mm",hours12h:"hh",hours24h:"HH",keyboardDate:"P",keyboardDateTime:"P p",keyboardDateTime12h:"P hh:mm aaa",keyboardDateTime24h:"P HH:mm",minutes:"mm",month:"LLLL",monthAndDate:"MMMM d",monthAndYear:"LLLL yyyy",monthShort:"MMM",weekday:"EEEE",weekdayShort:"EEE",normalDate:"d MMMM",normalDateWithWeekday:"EEE, MMM d",seconds:"ss",shortDate:"MMM d",year:"yyyy"},DateFnsUtils=function(e){var c=this,t=(e=void 0===e?{}:e).locale,e=e.formats;this.lib="date-fns",this.is12HourCycleInCurrentLocale=function(){return!c.locale||/a/.test(c.locale.formatLong.time())},this.getFormatHelperText=function(e){var n=c.locale||defaultLocale$2;return e.match(/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g).map(function(e){var t=e[0];return"p"===t||"P"===t?(0,longFormatters[t])(e,n.formatLong,{}):e}).join("").replace(/(aaa|aa|a)/g,"(a|p)m").toLocaleLowerCase()},this.parseISO=function(e){return parseISO(e)},this.toISO=function(e){return formatISO(e,{format:"extended"})},this.getCurrentLocaleCode=function(){var e;return(null==(e=c.locale)?void 0:e.code)||"en-US"},this.addSeconds=function(e,t){return addSeconds(e,t)},this.addMinutes=function(e,t){return addMinutes(e,t)},this.addHours=function(e,t){return addHours(e,t)},this.addDays=function(e,t){return addDays(e,t)},this.addWeeks=function(e,t){return addWeeks(e,t)},this.addMonths=function(e,t){return addMonths(e,t)},this.addYears=function(e,t){return addYears(e,t)},this.isValid=function(e){return isValid(c.date(e))},this.getDiff=function(e,t,n){switch(n){case"years":return differenceInYears(e,c.date(t));case"quarters":return differenceInQuarters(e,c.date(t));case"months":return differenceInMonths(e,c.date(t));case"weeks":return differenceInWeeks(e,c.date(t));case"days":return differenceInDays(e,c.date(t));case"hours":return differenceInHours(e,c.date(t));case"minutes":return differenceInMinutes(e,c.date(t));case"seconds":return differenceInSeconds(e,c.date(t));default:return differenceInMilliseconds(e,c.date(t))}},this.isAfter=function(e,t){return isAfter(e,t)},this.isBefore=function(e,t){return isBefore(e,t)},this.startOfDay=function(e){return startOfDay(e)},this.endOfDay=function(e){return endOfDay(e)},this.getHours=function(e){return getHours(e)},this.setHours=function(e,t){return setHours(e,t)},this.setMinutes=function(e,t){return setMinutes(e,t)},this.getSeconds=function(e){return getSeconds(e)},this.setSeconds=function(e,t){return setSeconds(e,t)},this.isSameDay=function(e,t){return isSameDay(e,t)},this.isSameMonth=function(e,t){return isSameMonth(e,t)},this.isSameYear=function(e,t){return isSameYear(e,t)},this.isSameHour=function(e,t){return isSameHour(e,t)},this.startOfYear=function(e){return startOfYear(e)},this.endOfYear=function(e){return endOfYear(e)},this.startOfMonth=function(e){return startOfMonth(e)},this.endOfMonth=function(e){return endOfMonth(e)},this.startOfWeek=function(e){return startOfWeek(e,{locale:c.locale})},this.endOfWeek=function(e){return endOfWeek(e,{locale:c.locale})},this.getYear=function(e){return getYear(e)},this.setYear=function(e,t){return setYear(e,t)},this.date=function(e){return void 0===e?new Date:null===e?null:new Date(e)},this.toJsDate=function(e){return e},this.parse=function(e,t){return""===e?null:parse$2(e,t,new Date,{locale:c.locale})},this.format=function(e,t){return c.formatByString(e,c.formats[t])},this.formatByString=function(e,t){return format(e,t,{locale:c.locale})},this.isEqual=function(e,t){return null===e&&null===t||isEqual$3(e,t)},this.isNull=function(e){return null===e},this.isAfterDay=function(e,t){return isAfter(e,endOfDay(t))},this.isBeforeDay=function(e,t){return isBefore(e,startOfDay(t))},this.isBeforeYear=function(e,t){return isBefore(e,startOfYear(t))},this.isAfterYear=function(e,t){return isAfter(e,endOfYear(t))},this.isWithinRange=function(e,t){return isWithinInterval(e,{start:t[0],end:t[1]})},this.formatNumber=function(e){return e},this.getMinutes=function(e){return getMinutes(e)},this.getDate=function(e){return getDate(e)},this.setDate=function(e,t){return setDate(e,t)},this.getMonth=function(e){return getMonth(e)},this.getDaysInMonth=function(e){return getDaysInMonth(e)},this.setMonth=function(e,t){return setMonth(e,t)},this.getMeridiemText=function(e){return"am"===e?"AM":"PM"},this.getNextMonth=function(e){return addMonths(e,1)},this.getPreviousMonth=function(e){return addMonths(e,-1)},this.getMonthArray=function(e){for(var t=[startOfYear(e)];t.length<12;){var n=t[t.length-1];t.push(c.getNextMonth(n))}return t},this.mergeDateAndTime=function(e,t){return c.setSeconds(c.setMinutes(c.setHours(e,c.getHours(t)),c.getMinutes(t)),c.getSeconds(t))},this.getWeekdays=function(){var e=new Date;return eachDayOfInterval({start:startOfWeek(e,{locale:c.locale}),end:endOfWeek(e,{locale:c.locale})}).map(function(e){return c.formatByString(e,"EEEEEE")})},this.getWeekArray=function(e){for(var t=startOfWeek(startOfMonth(e),{locale:c.locale}),n=endOfWeek(endOfMonth(e),{locale:c.locale}),r=0,i=t,o=[],a=null;isBefore(i,n);){var s=Math.floor(r/7),l=(o[s]=o[s]||[],getDay(i));a!==l&&(a=l,o[s].push(i),r+=1),i=addDays(i,1)}return o},this.getYearRange=function(e,t){for(var e=startOfYear(e),n=endOfYear(t),r=[],i=e;isBefore(i,n);)r.push(i),i=addYears(i,1);return r},this.locale=t,this.formats=Object.assign({},defaultFormats,e)};const formatTokenMap={y:"year",yy:"year",yyy:"year",yyyy:"year",MMMM:"month",MM:"month",DD:"day",d:"day",dd:"day",H:"hour",HH:"hour",h:"hour",hh:"hour",mm:"minute",ss:"second",a:"am-pm",aa:"am-pm",aaa:"am-pm"};class AdapterDateFns extends DateFnsUtils{constructor(...e){super(...e),this.formatTokenMap=formatTokenMap,this.expandFormat=e=>{return e.match(/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g).map(e=>{var t=e[0];return"p"===t||"P"===t?(0,longFormatters[t])(e,(this.locale||defaultLocale$2).formatLong,{}):e}).join("")},this.getFormatHelperText=e=>this.expandFormat(e).replace(/(aaa|aa|a)/g,"(a|p)m").toLocaleLowerCase()}}var classCallCheck$1=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},createClass$1=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),_extends$2=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},inherits$1=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},possibleConstructorReturn$1=function(e,t){if(e)return!t||"object"!=typeof t&&"function"!=typeof t?e:t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")},slicedToArray=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){var n=t,r=[],i=!0,t=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(i=(a=s.next()).done)&&(r.push(a.value),!n||r.length!==n);i=!0);}catch(e){t=!0,o=e}finally{try{!i&&s.return&&s.return()}finally{if(t)throw o}}return r}throw new TypeError("Invalid attempt to destructure non-iterable instance")},windowObject=void 0,windowObject="undefined"!=typeof window?window:"undefined"!=typeof self?self:global,cancelFrame=null,requestFrame=null,TIMEOUT_DURATION=20,clearTimeoutFn=windowObject.clearTimeout,setTimeoutFn=windowObject.setTimeout,cancelAnimationFrameFn=windowObject.cancelAnimationFrame||windowObject.mozCancelAnimationFrame||windowObject.webkitCancelAnimationFrame,requestAnimationFrameFn=windowObject.requestAnimationFrame||windowObject.mozRequestAnimationFrame||windowObject.webkitRequestAnimationFrame;function createDetectElementResize(s){var l=void 0,c=void 0,u=void 0,d=void 0,p=void 0,f=void 0,h="undefined"!=typeof document&&document.attachEvent;if(!h){var p=function(e){var e=e.__resizeTriggers__,t=e.firstElementChild,e=e.lastElementChild,n=t.firstElementChild;e.scrollLeft=e.scrollWidth,e.scrollTop=e.scrollHeight,n.style.width=t.offsetWidth+1+"px",n.style.height=t.offsetHeight+1+"px",t.scrollLeft=t.scrollWidth,t.scrollTop=t.scrollHeight},e=function(e){return e.offsetWidth!==e.__resizeLast__.width||e.offsetHeight!==e.__resizeLast__.height},f=function(t){var n;t.target.className&&"function"==typeof t.target.className.indexOf&&t.target.className.indexOf("contract-trigger")<0&&t.target.className.indexOf("expand-trigger")<0||(p(n=this),this.__resizeRAF__&&cancelFrame(this.__resizeRAF__),this.__resizeRAF__=requestFrame(function(){e(n)&&(n.__resizeLast__.width=n.offsetWidth,n.__resizeLast__.height=n.offsetHeight,n.__resizeListeners__.forEach(function(e){e.call(n,t)}))}))},t=!1,n="",u="animationstart",r="Webkit Moz O ms".split(" "),i="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),o=document.createElement("fakeelement");if(!1===(t=void 0!==o.style.animationName?!0:t))for(var a=0;a<r.length;a++)if(void 0!==o.style[r[a]+"AnimationName"]){n="-"+r[a].toLowerCase()+"-",u=i[a],t=!0;break}l="@"+n+"keyframes "+(c="resizeanim")+" { from { opacity: 0; } to { opacity: 0; } } ",d=n+"animation: 1ms "+c+"; "}return{addResizeListener:function(t,e){var n,r,i,o,a;h?t.attachEvent("onresize",e):(t.__resizeTriggers__||(n=t.ownerDocument,(r=windowObject.getComputedStyle(t))&&"static"===r.position&&(t.style.position="relative"),(r=n).getElementById("detectElementResize")||(i=(l||"")+".resize-triggers { "+(d||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',o=r.head||r.getElementsByTagName("head")[0],(a=r.createElement("style")).id="detectElementResize",a.type="text/css",null!=s&&a.setAttribute("nonce",s),a.styleSheet?a.styleSheet.cssText=i:a.appendChild(r.createTextNode(i)),o.appendChild(a)),t.__resizeLast__={},t.__resizeListeners__=[],(t.__resizeTriggers__=n.createElement("div")).className="resize-triggers",(r=n.createElement("div")).className="expand-trigger",r.appendChild(n.createElement("div")),(i=n.createElement("div")).className="contract-trigger",t.__resizeTriggers__.appendChild(r),t.__resizeTriggers__.appendChild(i),t.appendChild(t.__resizeTriggers__),p(t),t.addEventListener("scroll",f,!0),u&&(t.__resizeTriggers__.__animationListener__=function(e){e.animationName===c&&p(t)},t.__resizeTriggers__.addEventListener(u,t.__resizeTriggers__.__animationListener__))),t.__resizeListeners__.push(e))},removeResizeListener:function(e,t){if(h)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",f,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(u,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}var requestFrame=null==cancelAnimationFrameFn||null==requestAnimationFrameFn?(cancelFrame=clearTimeoutFn,function(e){return setTimeoutFn(e,TIMEOUT_DURATION)}):(cancelFrame=function(e){var e=slicedToArray(e,2),t=e[0],e=e[1];cancelAnimationFrameFn(t),clearTimeoutFn(e)},function(e){var t=requestAnimationFrameFn(function(){clearTimeoutFn(n),e()}),n=setTimeoutFn(function(){cancelAnimationFrameFn(t),e()},TIMEOUT_DURATION);return[t,n]}),AutoSizer=function(e){function i(){var e,c;classCallCheck$1(this,i);for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=c=possibleConstructorReturn$1(this,(e=i.__proto__||Object.getPrototypeOf(i)).call.apply(e,[this].concat(n)))).state={height:c.props.defaultHeight||0,width:c.props.defaultWidth||0},c._onResize=function(){var e,t,n,r,i,o,a=c.props,s=a.disableHeight,l=a.disableWidth,a=a.onResize;c._parentNode&&(e=c._parentNode.offsetHeight||0,t=c._parentNode.offsetWidth||0,o=window.getComputedStyle(c._parentNode)||{},n=parseInt(o.paddingLeft,10)||0,r=parseInt(o.paddingRight,10)||0,i=parseInt(o.paddingTop,10)||0,o=parseInt(o.paddingBottom,10)||0,!s&&c.state.height!==e-i-o||!l&&c.state.width!==t-n-r)&&(c.setState({height:e-i-o,width:t-n-r}),a({height:e,width:t}))},c._setRef=function(e){c._autoSizer=e},possibleConstructorReturn$1(c,e)}return inherits$1(i,e),createClass$1(i,[{key:"componentDidMount",value:function(){var e=this.props.nonce;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._detectElementResize=createDetectElementResize(e),this._detectElementResize.addResizeListener(this._parentNode,this._onResize),this._onResize())}},{key:"componentWillUnmount",value:function(){this._detectElementResize&&this._parentNode&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.disableHeight,i=e.disableWidth,e=e.style,o=this.state,a=o.height,o=o.width,s={overflow:"visible"},l={},c=!1;return r||(0===a&&(c=!0),s.height=0,l.height=a),i||(0===o&&(c=!0),s.width=0,l.width=o),react$1.exports.createElement("div",{className:n,ref:this._setRef,style:_extends$2({},s,e)},!c&&t(l))}}]),i}(react$1.exports.PureComponent),safeIsNaN=(AutoSizer.defaultProps={onResize:function(){},disableHeight:!1,disableWidth:!1,style:{}},Number.isNaN||function(e){return"number"==typeof e&&e!=e});function isEqual$2(e,t){return e===t||!(!safeIsNaN(e)||!safeIsNaN(t))}function areInputsEqual$1(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!isEqual$2(e[n],t[n]))return!1;return!0}function memoizeOne(n,r){void 0===r&&(r=areInputsEqual$1);var i,o,a=[],s=!1;return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s&&i===this&&r(e,a)||(o=n.apply(this,e),s=!0,i=this,a=e),o}}var hasNativePerformanceNow="object"==typeof performance&&"function"==typeof performance.now,now$3=hasNativePerformanceNow?function(){return performance.now()}:function(){return Date.now()};function cancelTimeout(e){cancelAnimationFrame(e.id)}function requestTimeout(t,n){var r=now$3();var i={id:requestAnimationFrame(function e(){now$3()-r>=n?t.call(null):i.id=requestAnimationFrame(e)})};return i}var size=-1;function getScrollbarSize(e){var t;return void 0===e&&(e=!1),-1!==size&&!e||((t=(e=document.createElement("div")).style).width="50px",t.height="50px",t.overflow="scroll",document.body.appendChild(e),size=e.offsetWidth-e.clientWidth,document.body.removeChild(e)),size}var cachedRTLResult=null;function getRTLOffsetType(e){var t,n;return void 0===e&&(e=!1),null!==cachedRTLResult&&!e||((t=(e=document.createElement("div")).style).width="50px",t.height="50px",t.overflow="scroll",t.direction="rtl",(n=(t=document.createElement("div")).style).width="100px",n.height="100px",e.appendChild(t),document.body.appendChild(e),cachedRTLResult=0<e.scrollLeft?"positive-descending":(e.scrollLeft=1,0===e.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(e)),cachedRTLResult}var IS_SCROLLING_DEBOUNCE_INTERVAL$1=150,defaultItemKey$1=function(e,t){return e};function createListComponent(e){var c=e.getItemOffset,S=e.getEstimatedTotalSize,u=e.getItemSize,a=e.getOffsetForIndexAndAlignment,s=e.getStartIndexForOffset,l=e.getStopIndexForStartIndex,r=e.initInstanceProps,d=e.shouldResetStyleCacheOnItemSizeChange,i=e.validateProps,e=function(t){function e(e){var l=t.call(this,e)||this;return l._instanceProps=r(l.props,_assertThisInitialized$x(l)),l._outerRef=void 0,l._resetIsScrollingTimeoutId=null,l.state={instance:_assertThisInitialized$x(l),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof l.props.initialScrollOffset?l.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},l._callOnItemsRendered=void 0,l._callOnItemsRendered=memoizeOne(function(e,t,n,r){return l.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:r})}),l._callOnScroll=void 0,l._callOnScroll=memoizeOne(function(e,t,n){return l.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})}),l._getItemStyle=void 0,l._getItemStyle=function(e){var t,n,r,i,o=l.props,a=o.direction,s=o.itemSize,o=o.layout,s=l._getItemStyleCache(d&&s,d&&o,d&&a);return s.hasOwnProperty(e)?t=s[e]:(n=c(l.props,e,l._instanceProps),r=u(l.props,e,l._instanceProps),i=(o="horizontal"===a||"horizontal"===o)?n:0,s[e]=t={position:"absolute",left:(s="rtl"===a)?void 0:i,right:s?i:void 0,top:o?0:n,height:o?"100%":r,width:o?r:"100%"}),t},l._getItemStyleCache=void 0,l._getItemStyleCache=memoizeOne(function(e,t,n){return{}}),l._onScrollHorizontal=function(e){var e=e.currentTarget,r=e.clientWidth,i=e.scrollLeft,o=e.scrollWidth;l.setState(function(e){if(e.scrollOffset===i)return null;var t=l.props.direction,n=i;if("rtl"===t)switch(getRTLOffsetType()){case"negative":n=-i;break;case"positive-descending":n=o-r-i}return n=Math.max(0,Math.min(n,o-r)),{isScrolling:!0,scrollDirection:e.scrollOffset<i?"forward":"backward",scrollOffset:n,scrollUpdateWasRequested:!1}},l._resetIsScrollingDebounced)},l._onScrollVertical=function(e){var e=e.currentTarget,n=e.clientHeight,r=e.scrollHeight,i=e.scrollTop;l.setState(function(e){var t;return e.scrollOffset===i?null:(t=Math.max(0,Math.min(i,r-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1})},l._resetIsScrollingDebounced)},l._outerRefSetter=function(e){var t=l.props.outerRef;l._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},l._resetIsScrollingDebounced=function(){null!==l._resetIsScrollingTimeoutId&&cancelTimeout(l._resetIsScrollingTimeoutId),l._resetIsScrollingTimeoutId=requestTimeout(l._resetIsScrolling,IS_SCROLLING_DEBOUNCE_INTERVAL$1)},l._resetIsScrolling=function(){l._resetIsScrollingTimeoutId=null,l.setState({isScrolling:!1},function(){l._getItemStyleCache(-1,null)})},l}_inheritsLoose$2(e,t),e.getDerivedStateFromProps=function(e,t){return validateSharedProps$1(e,t),i(e),null};var n=e.prototype;return n.scrollTo=function(t){t=Math.max(0,t),this.setState(function(e){return e.scrollOffset===t?null:{scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},n.scrollToItem=function(e,t){void 0===t&&(t="auto");var n,r=this.props,i=r.itemCount,r=r.layout,o=this.state.scrollOffset,i=(e=Math.max(0,Math.min(e,i-1)),0);this._outerRef&&(n=this._outerRef,i="vertical"===r?n.scrollWidth>n.clientWidth?getScrollbarSize():0:n.scrollHeight>n.clientHeight?getScrollbarSize():0),this.scrollTo(a(this.props,e,t,o,this._instanceProps,i))},n.componentDidMount=function(){var e,t=this.props,n=t.direction,r=t.initialScrollOffset,t=t.layout;"number"==typeof r&&null!=this._outerRef&&(e=this._outerRef,"horizontal"===n||"horizontal"===t?e.scrollLeft=r:e.scrollTop=r),this._callPropsCallbacks()},n.componentDidUpdate=function(){var e=this.props,t=e.direction,e=e.layout,n=this.state,r=n.scrollOffset;if(n.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("horizontal"===t||"horizontal"===e)if("rtl"===t)switch(getRTLOffsetType()){case"negative":i.scrollLeft=-r;break;case"positive-ascending":i.scrollLeft=r;break;default:var o=i.clientWidth,a=i.scrollWidth;i.scrollLeft=a-o-r}else i.scrollLeft=r;else i.scrollTop=r}this._callPropsCallbacks()},n.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&cancelTimeout(this._resetIsScrollingTimeoutId)},n.render=function(){var e=this.props,t=e.children,n=e.className,r=e.direction,i=e.height,o=e.innerRef,a=e.innerElementType,s=e.innerTagName,l=e.itemCount,c=e.itemData,u=e.itemKey,d=void 0===u?defaultItemKey$1:u,u=e.layout,p=e.outerElementType,f=e.outerTagName,h=e.style,m=e.useIsScrolling,e=e.width,g=this.state.isScrolling,u="horizontal"===r||"horizontal"===u,y=u?this._onScrollHorizontal:this._onScrollVertical,v=this._getRangeToRender(),x=v[0],b=v[1],$=[];if(0<l)for(var C=x;C<=b;C++)$.push(react$1.exports.createElement(t,{data:c,key:d(C,c),index:C,isScrolling:m?g:void 0,style:this._getItemStyle(C)}));v=S(this.props,this._instanceProps);return react$1.exports.createElement(p||f||"div",{className:n,onScroll:y,ref:this._outerRefSetter,style:_extends$3({position:"relative",height:i,width:e,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:r},h)},react$1.exports.createElement(a||s||"div",{children:$,ref:o,style:{height:u?"100%":v,pointerEvents:g?"none":void 0,width:u?v:"100%"}}))},n._callPropsCallbacks=function(){var e,t,n,r;"function"==typeof this.props.onItemsRendered&&0<this.props.itemCount&&(e=(r=this._getRangeToRender())[0],t=r[1],n=r[2],r=r[3],this._callOnItemsRendered(e,t,n,r)),"function"==typeof this.props.onScroll&&(t=(e=this.state).scrollDirection,n=e.scrollOffset,r=e.scrollUpdateWasRequested,this._callOnScroll(t,n,r))},n._getRangeToRender=function(){var e,t,n=this.props,r=n.itemCount,n=n.overscanCount,i=this.state,o=i.isScrolling,a=i.scrollDirection,i=i.scrollOffset;return 0===r?[0,0,0,0]:(e=s(this.props,i,this._instanceProps),i=l(this.props,e,i,this._instanceProps),t=o&&"backward"!==a?1:Math.max(1,n),o=o&&"forward"!==a?1:Math.max(1,n),[Math.max(0,e-t),Math.max(0,Math.min(r-1,i+o)),e,i])},e}(react$1.exports.PureComponent);return e.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},e}var validateSharedProps$1=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},DEFAULT_ESTIMATED_ITEM_SIZE$1=50,getItemMetadata$1=function(e,t,n){var r=e.itemSize,i=n.itemMetadataMap,e=n.lastMeasuredIndex;if(e<t){var o,a=0;0<=e&&(a=(o=i[e]).offset+o.size);for(var s=e+1;s<=t;s++){var l=r(s);i[s]={offset:a,size:l},a+=l}n.lastMeasuredIndex=t}return i[t]},findNearestItem$1=function(e,t,n){var r=t.itemMetadataMap,i=t.lastMeasuredIndex;return n<=(0<i?r[i].offset:0)?findNearestItemBinarySearch$1(e,t,i,0,n):findNearestItemExponentialSearch$1(e,t,Math.max(0,i),n)},findNearestItemBinarySearch$1=function(e,t,n,r,i){for(;r<=n;){var o=r+Math.floor((n-r)/2),a=getItemMetadata$1(e,o,t).offset;if(a===i)return o;a<i?r=o+1:i<a&&(n=o-1)}return 0<r?r-1:0},findNearestItemExponentialSearch$1=function(e,t,n,r){for(var i=e.itemCount,o=1;n<i&&getItemMetadata$1(e,n,t).offset<r;)n+=o,o*=2;return findNearestItemBinarySearch$1(e,t,Math.min(n,i-1),Math.floor(n/2),r)},getEstimatedTotalSize=function(e,t){var e=e.itemCount,n=t.itemMetadataMap,r=t.estimatedItemSize,t=t.lastMeasuredIndex,i=0,e=e-(t=e<=t?e-1:t)-1;return(i=0<=t?(n=n[t]).offset+n.size:i)+e*r},VariableSizeList=createListComponent({getItemOffset:function(e,t,n){return getItemMetadata$1(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:getEstimatedTotalSize,getOffsetForIndexAndAlignment:function(e,t,n,r,i,o){var a=e.direction,s=e.height,l=e.layout,c=e.width,a="horizontal"===a||"horizontal"===l?c:s,l=getItemMetadata$1(e,t,i),c=getEstimatedTotalSize(e,i),u=Math.max(0,Math.min(c-a,l.offset)),d=Math.max(0,l.offset-a+l.size+o);switch(n="smart"===n?d-a<=r&&r<=u+a?"auto":"center":n){case"start":return u;case"end":return d;case"center":return Math.round(d+(u-d)/2);default:return d<=r&&r<=u?r:r<d?d:u}},getStartIndexForOffset:function(e,t,n){return findNearestItem$1(e,n,t)},getStopIndexForStartIndex:function(e,t,n,r){for(var i=e.direction,o=e.height,a=e.itemCount,s=e.layout,l=e.width,i="horizontal"===i||"horizontal"===s?l:o,s=getItemMetadata$1(e,t,r),c=n+i,u=s.offset+s.size,d=t;d<a-1&&u<c;)u+=getItemMetadata$1(e,++d,r).size;return d},initInstanceProps:function(e,n){var r={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||DEFAULT_ESTIMATED_ITEM_SIZE$1,lastMeasuredIndex:-1};return n.resetAfterIndex=function(e,t){void 0===t&&(t=!0),r.lastMeasuredIndex=Math.min(r.lastMeasuredIndex,e-1),n._getItemStyleCache(-1),t&&n.forceUpdate()},r},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}}),FixedSizeList=createListComponent({getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,n,r,i,o){var a=e.direction,s=e.height,l=e.itemCount,c=e.itemSize,u=e.layout,e=e.width,d="horizontal"===a||"horizontal"===u?e:s,p=Math.max(0,l*c-d),f=Math.min(p,t*c),h=Math.max(0,t*c-d+c+o);switch(n="smart"===n?h-d<=r&&r<=f+d?"auto":"center":n){case"start":return f;case"end":return h;case"center":var m=Math.round(h+(f-h)/2);return m<Math.ceil(d/2)?0:m>p+Math.floor(d/2)?p:m;default:return h<=r&&r<=f?r:r<h?h:f}},getStartIndexForOffset:function(e,t){var n=e.itemCount,e=e.itemSize;return Math.max(0,Math.min(n-1,Math.floor(t/e)))},getStopIndexForStartIndex:function(e,t,n){var r=e.direction,i=e.height,o=e.itemCount,a=e.itemSize,s=e.layout,e=e.width,r=Math.ceil((("horizontal"===r||"horizontal"===s?e:i)+n-t*a)/a);return Math.max(0,Math.min(o-1,t+r-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.itemSize}});function isRangeVisible(e){var t=e.lastRenderedStartIndex,n=e.lastRenderedStopIndex,r=e.startIndex,e=e.stopIndex;return!(n<r||e<t)}function scanForUnloadedRanges(e){for(var t=e.isItemLoaded,n=e.itemCount,r=e.minimumBatchSize,i=e.startIndex,o=e.stopIndex,a=[],s=null,l=null,c=i;c<=o;c++)t(c)?null!==l&&(a.push(s,l),s=l=null):(l=c,null===s&&(s=c));if(null!==l){for(var u=Math.min(Math.max(l,s+r-1),n-1),d=l+1;d<=u&&!t(d);d++)l=d;a.push(s,l)}if(a.length)for(;a[1]-a[0]+1<r&&0<a[0];){var p=a[0]-1;if(t(p))break;a[0]=p}return a}var classCallCheck=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},createClass=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),inherits=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},possibleConstructorReturn=function(e,t){if(e)return!t||"object"!=typeof t&&"function"!=typeof t?e:t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")},InfiniteLoader=function(e){function o(){var e,n;classCallCheck(this,o);for(var t=arguments.length,r=Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n=possibleConstructorReturn(this,(e=o.__proto__||Object.getPrototypeOf(o)).call.apply(e,[this].concat(r))))._lastRenderedStartIndex=-1,n._lastRenderedStopIndex=-1,n._memoizedUnloadedRanges=[],n._onItemsRendered=function(e){var t=e.visibleStartIndex,e=e.visibleStopIndex;n._lastRenderedStartIndex=t,n._lastRenderedStopIndex=e,n._ensureRowsLoaded(t,e)},n._setRef=function(e){n._listRef=e},possibleConstructorReturn(n,e)}return inherits(o,e),createClass(o,[{key:"resetloadMoreItemsCache",value:function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0];this._memoizedUnloadedRanges=[],e&&this._ensureRowsLoaded(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"componentDidMount",value:function(){}},{key:"render",value:function(){return(0,this.props.children)({onItemsRendered:this._onItemsRendered,ref:this._setRef})}},{key:"_ensureRowsLoaded",value:function(e,t){var n=this.props,r=n.isItemLoaded,i=n.itemCount,o=n.minimumBatchSize,n=n.threshold,n=void 0===n?15:n,a=scanForUnloadedRanges({isItemLoaded:r,itemCount:i,minimumBatchSize:void 0===o?10:o,startIndex:Math.max(0,e-n),stopIndex:Math.min(i-1,t+n)});this._memoizedUnloadedRanges.length===a.length&&!this._memoizedUnloadedRanges.some(function(e,t){return a[t]!==e})||(this._memoizedUnloadedRanges=a,this._loadUnloadedRanges(a))}},{key:"_loadUnloadedRanges",value:function(r){for(var i=this,o=this.props.loadMoreItems||this.props.loadMoreRows,e=0;e<r.length;e+=2)!function(e){var t=r[e],n=r[e+1],e=o(t,n);null!=e&&e.then(function(){isRangeVisible({lastRenderedStartIndex:i._lastRenderedStartIndex,lastRenderedStopIndex:i._lastRenderedStopIndex,startIndex:t,stopIndex:n})&&null!=i._listRef&&("function"==typeof i._listRef.resetAfterIndex?i._listRef.resetAfterIndex(t,!0):("function"==typeof i._listRef._getItemStyleCache&&i._listRef._getItemStyleCache(-1),i._listRef.forceUpdate()))})}(e)}}]),o}(react$1.exports.PureComponent);function getLoadingButtonUtilityClass(e){return generateUtilityClass("MuiLoadingButton",e)}const loadingButtonClasses=generateUtilityClasses("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]);var loadingButtonClasses$1=loadingButtonClasses;const _excluded$3=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],useUtilityClasses=e=>{var{loading:e,loadingPosition:t,classes:n}=e;return _extends$3({},n,composeClasses({root:["root",e&&"loading"],startIcon:[e&&"startIconLoading"+capitalize$2(t)],endIcon:[e&&"endIconLoading"+capitalize$2(t)],loadingIndicator:["loadingIndicator",e&&"loadingIndicator"+capitalize$2(t)]},getLoadingButtonUtilityClass,n))},rootShouldForwardProp=e=>"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e&&"classes"!==e,LoadingButtonRoot=styled$1(Button$1,{shouldForwardProp:e=>rootShouldForwardProp(e)||"classes"===e,name:"MuiLoadingButton",slot:"Root",overridesResolver:(e,t)=>[t.root,t.startIconLoadingStart&&{["& ."+loadingButtonClasses$1.startIconLoadingStart]:t.startIconLoadingStart},t.endIconLoadingEnd&&{["& ."+loadingButtonClasses$1.endIconLoadingEnd]:t.endIconLoadingEnd}]})(({ownerState:e,theme:t})=>_extends$3({[`& .${loadingButtonClasses$1.startIconLoadingStart}, & .`+loadingButtonClasses$1.endIconLoadingEnd]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},"center"===e.loadingPosition&&{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),["&."+loadingButtonClasses$1.loading]:{color:"transparent"}},"start"===e.loadingPosition&&e.fullWidth&&{[`& .${loadingButtonClasses$1.startIconLoadingStart}, & .`+loadingButtonClasses$1.endIconLoadingEnd]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginRight:-8}},"end"===e.loadingPosition&&e.fullWidth&&{[`& .${loadingButtonClasses$1.startIconLoadingStart}, & .`+loadingButtonClasses$1.endIconLoadingEnd]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginLeft:-8}})),LoadingButtonLoadingIndicator=styled$1("div",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>{e=e.ownerState;return[t.loadingIndicator,t["loadingIndicator"+capitalize$2(e.loadingPosition)]]}})(({theme:e,ownerState:t})=>_extends$3({position:"absolute",visibility:"visible",display:"flex"},"start"===t.loadingPosition&&("outlined"===t.variant||"contained"===t.variant)&&{left:"small"===t.size?10:14},"start"===t.loadingPosition&&"text"===t.variant&&{left:6},"center"===t.loadingPosition&&{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled},"end"===t.loadingPosition&&("outlined"===t.variant||"contained"===t.variant)&&{right:"small"===t.size?10:14},"end"===t.loadingPosition&&"text"===t.variant&&{right:6},"start"===t.loadingPosition&&t.fullWidth&&{position:"relative",left:-10},"end"===t.loadingPosition&&t.fullWidth&&{position:"relative",right:-10})),LoadingButton=react$1.exports.forwardRef(function(e,t){var e=useThemeProps({props:e,name:"MuiLoadingButton"}),{children:n,disabled:r=!1,id:i,loading:o=!1,loadingIndicator:a,loadingPosition:s="center",variant:l="text"}=e,c=_objectWithoutPropertiesLoose$2(e,_excluded$3),i=useId(i),a=null!=a?a:jsxRuntime.exports.jsx(CircularProgress$1,{"aria-labelledby":i,color:"inherit",size:16}),e=_extends$3({},e,{disabled:r,loading:o,loadingIndicator:a,loadingPosition:s,variant:l}),s=useUtilityClasses(e),a=o?jsxRuntime.exports.jsx(LoadingButtonLoadingIndicator,{className:s.loadingIndicator,ownerState:e,children:a}):null;return jsxRuntime.exports.jsxs(LoadingButtonRoot,_extends$3({disabled:r||o,id:i,ref:t},c,{variant:l,classes:s,ownerState:e,children:["end"===e.loadingPosition?n:a,"end"===e.loadingPosition?a:n]}))});var LoadingButton$1=LoadingButton,root$1=_root,now$2=function(){return root$1.Date.now()},now_1=now$2,isObject$9=isObject_1,now$1=now_1,toNumber=toNumber_1,FUNC_ERROR_TEXT="Expected a function",nativeMax=Math.max,nativeMin=Math.min;function debounce(r,n,e){var i,o,a,s,l,c,u=0,d=!1,p=!1,t=!0;if("function"!=typeof r)throw new TypeError(FUNC_ERROR_TEXT);function f(e){var t=i,n=o;return i=o=void 0,u=e,s=r.apply(n,t)}function h(e){var t=e-c;return void 0===c||n<=t||t<0||p&&a<=e-u}function m(){var e,t=now$1();if(h(t))return g(t);l=setTimeout(m,(e=n-((t=t)-c),p?nativeMin(e,a-(t-u)):e))}function g(e){return l=void 0,t&&i?f(e):(i=o=void 0,s)}function y(){var e=now$1(),t=h(e);if(i=arguments,o=this,c=e,t){if(void 0===l)return u=e=c,l=setTimeout(m,n),d?f(e):s;if(p)return clearTimeout(l),l=setTimeout(m,n),f(c)}return void 0===l&&(l=setTimeout(m,n)),s}return n=toNumber(n)||0,isObject$9(e)&&(d=!!e.leading,p="maxWait"in e,a=p?nativeMax(toNumber(e.maxWait)||0,n):a,t="trailing"in e?!!e.trailing:t),y.cancel=function(){void 0!==l&&clearTimeout(l),i=c=o=l=void(u=0)},y.flush=function(){return void 0===l?s:g(now$1())},y}var debounce_1=debounce,baseGetTag=_baseGetTag,isObjectLike=isObjectLike_1,numberTag="[object Number]";function isNumber$1(e){return"number"==typeof e||isObjectLike(e)&&baseGetTag(e)==numberTag}var isNumber_1=isNumber$1;const useStyles$8$2=makeStyles()(e=>({characterCount:{position:"absolute",margin:0,bottom:4,right:8,fontSize:12,fontWeight:400},wrapper:{width:"100%",position:"relative"}})),CharacterCountTextField=({handleChange:t,variant:e="outlined",shrinkAlways:n=!1,lines:r=5,maxChar:i=300,error:o=!1,label:a="",id:s,testId:l,required:c=!1,disabled:u=!1,value:d=""})=>{var p=useStyles$8$2()["classes"],f=d.length;return jsxRuntime.exports.jsxs(Box$1,Object.assign({className:p.wrapper},{children:[jsxRuntime.exports.jsx(TextField$1,{multiline:!0,label:a,rows:r,value:d,onChange:e=>{e.target.value.length>i||t(e.target.value)},"data-test":"reusable-char-count-text-"+l,id:s,variant:e,fullWidth:!0,error:o,required:c,InputLabelProps:0<d.length||n?{shrink:!0}:{},disabled:u}),jsxRuntime.exports.jsxs("div",Object.assign({"data-test":"reusable-char-count-text-count-"+l,className:p.characterCount},{children:[f,"/",i]}))]}))};var characterCountTextFieldJsx=Object.freeze({__proto__:null,CharacterCountTextField:CharacterCountTextField});function __rest$3(e,t){var n={};for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n}function __awaiter$5(e,a,s,l){return new(s=s||Promise)(function(n,t){function r(e){try{o(l.next(e))}catch(e){t(e)}}function i(e){try{o(l.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,i)}o((l=l.apply(e,a||[])).next())})}function getEngines(n,r,i){return __awaiter$5(this,void 0,void 0,function*(){var e="getEngines",t={edgeVersion:r},t=(i&&(t.state=i),yield baseGraphQLApiWithError(Object.assign({query:"\n query getEngines ($state: [EngineState], $edgeVersion: Int) {\n engines(\n offset: 0,\n limit: 500,\n state: $state,\n edgeVersion: $edgeVersion\n ) {\n count\n records {\n id\n name\n categoryId\n edgeVersion\n }\n }\n }\n ",variables:t,operationName:e},n)));return t.engines})}function getEngineCategories(n){return __awaiter$5(this,void 0,void 0,function*(){var e="getEngineCategories",t="engineCategories",e=yield baseGraphQLApiWithError(Object.assign({query:"\n query getEngineCategories {\n engineCategories(offset: 0, limit: 200) {\n count\n records {\n id\n name\n description\n }\n }\n }\n ",operationName:e},n));return e[t].records=e[t].records.map(e=>Object.assign(Object.assign({},e),{iconName:e.name.replace(/[^a-zA-Z]/g,"")})),e[t]})}var enginesFilterApi=Object.freeze({__proto__:null,getEngines:getEngines,getEngineCategories:getEngineCategories});const useStyles$7$2=makeStyles()(e=>({dateRangeDisplay:{display:"flex",alignItems:"center",justifyContent:"start",fontWeight:400,fontSize:"10px",lineHeight:"16px",border:"1px solid #D5DFE9",borderRadius:"5px",padding:"0px 7px",boxSizing:"border-box",minWidth:"120px",minHeight:"28px",cursor:"pointer"},menuItem:{marginLeft:"25px"},subheader:{fontWeight:"bold"},tooltipList:{margin:0,padding:0,listStyle:"none"},formControl:{marginRight:"12px"},label:{fontWeight:700,fontSize:14,color:"#2A323C",marginBottom:0,display:"flex",justifyContent:"space-between"},selectField:{width:150,height:28,fontSize:"10px",lineHeight:"16px",fontWeight:400},title:{textTransform:"capitalize"},clearButton:{color:"#0C53B0",cursor:"pointer",fontWeight:"400",fontSize:"14px"},field:{width:150},clearBtn:{color:"#0C53B0",cursor:"pointer",fontWeight:400}})),muiSelectStyleOverrides={height:"28px",fontSize:"0.8em","& fieldset":{borderColor:"#D5DFE9",borderWidth:"2px",borderRadius:"6px"},"&:hover":{"&& fieldset":{borderColor:"rgba(42,50,60,0.5)"}}},AiEngineFilter=({id:e,label:t,items:n,selectedValue:r,onChange:i,engineList:o,entity:a="jobs",clearAndApply:s})=>{const l=useStyles$7$2()["classes"];var c=useIntl();const u={engine:c.formatMessage({id:"reusable-utils.engine-label",defaultMessage:[{type:0,value:"Engine"}]}),engines:c.formatMessage({id:"reusable-utils.engines-label",defaultMessage:[{type:0,value:"Engines"}]})},d=react$1.exports.useCallback(e=>{var e=e["target"]["value"];i&&i("string"==typeof e?e.split(","):e)},[i]);const p=()=>jsxRuntime.exports.jsx("ul",Object.assign({className:l.tooltipList},{children:r.map(e=>jsxRuntime.exports.jsx("li",{children:o[e].name}))}));return jsxRuntime.exports.jsxs(FormControl$1,Object.assign({size:"small",className:l.formControl},{children:[jsxRuntime.exports.jsxs("label",Object.assign({htmlFor:e,className:l.label},{children:[t," ",0<r.length&&jsxRuntime.exports.jsx("span",Object.assign({onClick:()=>{d({target:{value:[]}}),s&&s()},className:l.clearBtn},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"shared-ai-search-results-filter-input-clear-button",defaultMessage:"Clear",description:"Search Filter input Clear butoon"})}))]})),jsxRuntime.exports.jsx(Select$1,Object.assign({id:e,"data-test":a+"-engines-select",sx:muiSelectStyleOverrides,variant:"outlined",value:r,multiple:!0,displayEmpty:!0,className:l.field,onChange:d,renderValue:e=>{return 0===e.length?jsxRuntime.exports.jsx("div",{children:"All"}):(e=e["length"],jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:jsxRuntime.exports.jsx(p,{})},{children:jsxRuntime.exports.jsxs("span",Object.assign({style:{display:"flex",alignItems:"center"}},{children:[jsxRuntime.exports.jsx(default_1$b,{sx:{fontSize:"16px",fill:"#555F7C",marginRight:"3px"}})," ",e," ",1<e?u.engines:u.engine]}))})))},MenuProps:{sx:{maxHeight:"50vh"},className:"aiware-el"}},{children:n.map(e=>{return t=(e=e).engines.map(e=>jsxRuntime.exports.jsx(MenuItem$1,Object.assign({className:l.menuItem,value:e.engineId,"data-testid":`processing-center.${a}.engine-filter-option-`+e.engineId},{children:e.engineName}),e.engineId)),[jsxRuntime.exports.jsx(ListSubheader$1,Object.assign({className:l.subheader},{children:e.categoryName})),t];var t})}))]}))};var enginesFilterJsx=Object.freeze({__proto__:null,AiEngineFilter:AiEngineFilter});const engineListItems=(e,t,r,i)=>e.map((n,e)=>({categoryName:t[n].name,id:t[n].id,engines:r.filter((e,t)=>{if(i[e].categoryId===n)return e}).map((e,t)=>({engineId:i[e].id,engineName:i[e].name}))}));var enginesFilterHelpers=Object.freeze({__proto__:null,engineListItems:engineListItems});function getImageURL(r,i){return __awaiter$5(this,void 0,void 0,function*(){var e={name:i.name},e=yield baseGraphQLApiWithError(Object.assign({query:`
1337
1337
  query getUrl($name: String!){
1338
1338
  getSignedWritableUrl(key: $name) {
1339
1339
  bucket
@@ -1507,7 +1507,7 @@ createScheduledJob(input:{
1507
1507
  }
1508
1508
  }
1509
1509
  }
1510
- }`,r=yield gqlIntrospection.queryParser(o,a,n),r=(null==r?void 0:r.query)||n;try{var i=(yield baseGraphQLApi({query:r,graphEndpoint:o,token:a,operationName:t}))["data"];if(i&&i[e])return i[e].aiWAREVersionHistory;throw new Error(`Operation ${t} failed. Please try again later`)}catch(e){throw devErrorLogger(e),new Error(`Operation ${t} failed. Please try again later`)}}),PANEL_SLICE="panel",VERSION_PANEL_NAMESPACE="versionPanel",initialState$3={status:"idle",currentVersion:null,previousVersion:null,platformProperties:null,selectedVersion:null},namespace$2=VERSION_PANEL_NAMESPACE,aiWareDesktopSlice=createSlice({name:PANEL_SLICE+"/"+namespace$2,initialState:initialState$3,reducers:{fetchVersionInfoStart(e,t){e.status="pending"},fetchVersionInfoSuccess(e,t){var{currentVersion:t,previousVersion:n,platformProperties:r}=t.payload;e.status="success",e.currentVersion=t,e.previousVersion=n,e.platformProperties=r},fetchHistoryVersionInfoSuccess(e,t){e.status="success",e.selectedVersion=t.payload},fetchVersionInfoFailure(e){e.status="failure"}}}),actions$1=aiWareDesktopSlice.actions;var versionPanel_state=aiWareDesktopSlice.reducer;function*fetchVersionInfoSaga(e){if(e.payload)yield call$j(fetchVersionHistory,e.payload);else try{var{graphQLEndpoint:t,token:n}=yield select(selectApiConfigs$2),r=yield call$j(fetchVersionInfo,t,n);r?yield put(actions$1.fetchVersionInfoSuccess(r)):yield put(actions$1.fetchVersionInfoFailure())}catch(e){devErrorLogger(e),yield put(actions$1.fetchVersionInfoFailure())}}function*fetchVersionHistory(t){try{var{graphQLEndpoint:e,token:n}=yield select(selectApiConfigs$2),r=(yield call$j(fetchVersionHistory$1,e,n)).find(e=>e.platformVersion.id===t);r?yield put(actions$1.fetchHistoryVersionInfoSuccess(r.platformVersion)):yield put(actions$1.fetchVersionInfoFailure())}catch(e){devErrorLogger(e),yield put(actions$1.fetchVersionInfoFailure())}}function*fetchVersionInfoWatcher(){yield takeEvery$1(actions$1.fetchVersionInfoStart.type,fetchVersionInfoSaga)}function*openAppUrlByShortcut(e){var{cmsAppUrl:t,adminAppUrl:n}=yield select(e=>e.configs.config);switch(e.payload){case"cms":yield put(openLinkOnNewTab({url:t}));break;case"admin":yield put(openLinkOnNewTab({url:n}))}}function*getPanelSaga(){yield takeEvery$1("panels/OPEN_APP_SHORTCUT",openAppUrlByShortcut),yield all$2([fetchVersionInfoWatcher()])}const actions$2={[namespace$2]:actions$1},rootReducer=combineReducers({[namespace$2]:versionPanel_state});function getPanelModule(){return{id:"os-panel",reducerMap:{panel:rootReducer},sagas:[getPanelSaga],initialActions:[]}}let _=e=>e,_t;const fadeInOut=keyframes(_t=_t||_`
1510
+ }`,r=yield gqlIntrospection.queryParser(o,a,n),r=(null==r?void 0:r.query)||n;try{var i=(yield baseGraphQLApi({query:r,graphEndpoint:o,token:a,operationName:t}))["data"];if(i&&i[e])return i[e].aiWAREVersionHistory;throw new Error(`Operation ${t} failed. Please try again later`)}catch(e){throw devErrorLogger(e),new Error(`Operation ${t} failed. Please try again later`)}}),PANEL_SLICE="panel",VERSION_PANEL_NAMESPACE="versionPanel",initialState$3={status:"idle",currentVersion:null,previousVersion:null,platformProperties:null,selectedVersion:null},namespace$2=VERSION_PANEL_NAMESPACE,aiWareDesktopSlice=createSlice({name:PANEL_SLICE+"/"+namespace$2,initialState:initialState$3,reducers:{fetchVersionInfoStart(e,t){e.status="pending",e.currentVersion=null,e.previousVersion=null,e.selectedVersion=null},fetchVersionInfoSuccess(e,t){var{currentVersion:t,previousVersion:n,platformProperties:r}=t.payload;e.status="success",e.currentVersion=t,e.previousVersion=n,e.platformProperties=r},fetchHistoryVersionInfoSuccess(e,t){e.status="success",e.selectedVersion=t.payload},fetchVersionInfoFailure(e){e.status="failure"}}}),actions$1=aiWareDesktopSlice.actions;var versionPanel_state=aiWareDesktopSlice.reducer;function*fetchVersionInfoSaga(e){if(e.payload)yield call$j(fetchVersionHistory,e.payload);else try{var{graphQLEndpoint:t,token:n}=yield select(selectApiConfigs$2),r=yield call$j(fetchVersionInfo,t,n);r?yield put(actions$1.fetchVersionInfoSuccess(r)):yield put(actions$1.fetchVersionInfoFailure())}catch(e){devErrorLogger(e),yield put(actions$1.fetchVersionInfoFailure())}}function*fetchVersionHistory(t){try{var{graphQLEndpoint:e,token:n}=yield select(selectApiConfigs$2),r=(yield call$j(fetchVersionHistory$1,e,n)).find(e=>e.platformVersion.id===t);r?yield put(actions$1.fetchHistoryVersionInfoSuccess(r.platformVersion)):yield put(actions$1.fetchVersionInfoFailure())}catch(e){devErrorLogger(e),yield put(actions$1.fetchVersionInfoFailure())}}function*fetchVersionInfoWatcher(){yield takeEvery$1(actions$1.fetchVersionInfoStart.type,fetchVersionInfoSaga)}function*openAppUrlByShortcut(e){var{cmsAppUrl:t,adminAppUrl:n}=yield select(e=>e.configs.config);switch(e.payload){case"cms":yield put(openLinkOnNewTab({url:t}));break;case"admin":yield put(openLinkOnNewTab({url:n}))}}function*getPanelSaga(){yield takeEvery$1("panels/OPEN_APP_SHORTCUT",openAppUrlByShortcut),yield all$2([fetchVersionInfoWatcher()])}const actions$2={[namespace$2]:actions$1},rootReducer=combineReducers({[namespace$2]:versionPanel_state});function getPanelModule(){return{id:"os-panel",reducerMap:{panel:rootReducer},sagas:[getPanelSaga],initialActions:[]}}let _=e=>e,_t;const fadeInOut=keyframes(_t=_t||_`
1511
1511
  0% {
1512
1512
  opacity: 0;
1513
1513
  }
@@ -1520,7 +1520,7 @@ createScheduledJob(input:{
1520
1520
  100% {
1521
1521
  opacity: 0;
1522
1522
  }
1523
- `),useStyles$2$1=makeStyles()(()=>({fullScreen:{position:"fixed",width:"100%",height:"100vh",top:"0",left:"0",backgroundColor:"#ffffff",display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",textAlign:"center",fontSize:"14px",zIndex:99999,animation:fadeInOut+" 5s linear forwards"},loaderBox:{height:"200px",width:"200px"},veritoneDarkLogo:{height:"200px",width:"200px"}})),useStyles$1$1=makeStyles()(e=>({flexContainer:{display:"flex",alignItems:"center"},header:{alignItems:"center",display:"flex",justifyContent:"space-between",height:"55px",padding:e.spacing(6,0,6,6),borderBottom:"1px solid rgb(219, 226, 234)"},headerActionContainer:{alignItems:"center",display:"flex",flexGrow:1,height:"100%",justifyContent:"flex-end",paddingRight:"10px"},title:{color:"#2A323C"},panelRoot:{padding:"15px",height:"calc(100% - 70px);",overflowY:"scroll"},row:{display:"flex","& svg":{marginRight:"12px",marginBottom:"24px"}},widgets:{"& svg":{fill:"#555F7C"}},veriLogo:{transform:"translate(3px, 2px)"},versionText:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",marginBottom:"5px"},wrapperBox:{padding:"15px 0 15px 0px",marginBottom:"14px"},aiwareLogo:{marginBottom:"10px",marginTop:"10px",width:"151px"},boldTitle:{fontWeight:700},labelGrid:{padding:"2px",flexShrink:1},valueGrid:{padding:"2px",flexGrow:1},gridBox:{background:"#F7F7F7",height:"100%",padding:"10px",color:"#2A323C"},valueBox:{background:"#F7F7F7",height:"100%",padding:"10px",color:"#2A323C",textTransform:"capitalize"},imageContainer:{textAlign:"center"},falconLogo:{width:"148px"},osInfo:{display:"flex",justifyContent:"center","& *":{textAlign:"center"}},osName:{margin:"2px 0 6px","& p":{display:"inline-block",minWidth:"80px",padding:"5px 8px",background:"#465364",color:"white",textTransform:"uppercase",fontSize:"12px",fontWeight:"700",borderRadius:"4px"}},osVersion:{color:"#5C6269"}})),versionPanelLabels=e=>({closePanelTooltip:e.formatMessage({id:"version-panel.header.close-btn-tooltip",defaultMessage:[{type:0,value:"Close panel"}]}),versionInformationLabel:e.formatMessage({id:"version-panel.version-information-title",defaultMessage:[{type:0,value:"Version Information"}]}),versionLabel:e.formatMessage({id:"version-panel.version-title",defaultMessage:[{type:0,value:"Version"}]}),sdkVersionLabel:e.formatMessage({id:"version-panel.sdk-version-title",defaultMessage:[{type:0,value:"Sdk Version"}]}),viewReleaseNotes:e.formatMessage({id:"version-panel.view-release-notes",defaultMessage:[{type:0,value:"View Release Notes"}]}),noVersionInfo:e.formatMessage({id:"version-panel.no-info-label",defaultMessage:[{type:0,value:"Cannot get version information"}]}),clusterSizeLabel:e.formatMessage({id:"version-panel.cluster-size-label",defaultMessage:[{type:0,value:"Size"}]}),environmentLabel:e.formatMessage({id:"version-panel.environment-label",defaultMessage:[{type:0,value:"Environment"}]}),hostingTypeLabel:e.formatMessage({id:"version-panel.hosting-type-label",defaultMessage:[{type:0,value:"Hosting Type"}]}),infrastructureLabel:e.formatMessage({id:"version-panel.infrastructure-label",defaultMessage:[{type:0,value:"Infrastructure"}]})}),Header$1=()=>{const e=useDispatch();var t=useStyles$1$1()["classes"],n=useIntl(),{versionInformationLabel:n,closePanelTooltip:r}=versionPanelLabels(n);return jsxRuntime.exports.jsxs("header",Object.assign({className:t.header,"data-testid":"create-or-update-token-panel.header"},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1","data-testid":"version-panel-header-title",className:t.title},{children:n})),jsxRuntime.exports.jsx("div",Object.assign({className:t.headerActionContainer},{children:jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:r},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({onClick:()=>e(hidePanel$1(VERSION_PANEL)),"aria-labelledby":"version-panel.close-button","data-testid":"version-panel.close-button",size:"large"},{children:jsxRuntime.exports.jsx(Close$1,{})}))}))}))]}))},selectLoadingStatus=e=>{return null==(e=null==(e=null==e?void 0:e[PANEL_SLICE])?void 0:e[VERSION_PANEL_NAMESPACE])?void 0:e.status},selectCurrentVersion=e=>{return null==(e=null==(e=null==e?void 0:e[PANEL_SLICE])?void 0:e[VERSION_PANEL_NAMESPACE])?void 0:e.currentVersion},selectPreviousVersion=e=>{return null==(e=null==(e=null==e?void 0:e[PANEL_SLICE])?void 0:e[VERSION_PANEL_NAMESPACE])?void 0:e.previousVersion},selectPlatformProperties=e=>{return null==(e=null==(e=null==e?void 0:e[PANEL_SLICE])?void 0:e[VERSION_PANEL_NAMESPACE])?void 0:e.platformProperties},selectSelectedVersion=e=>{return null==(e=null==(e=null==e?void 0:e[PANEL_SLICE])?void 0:e[VERSION_PANEL_NAMESPACE])?void 0:e.selectedVersion},VERSION_PANEL="VERSION_PANEL",VersionChangelogNullState=({label:e})=>{var t=useStyles$1$1()["classes"];return jsxRuntime.exports.jsx(Box$1,Object.assign({className:t.gridBox,sx:{fontWeight:700,textAlign:"center",mb:"5px"},"data-test":"version-changelog-null-state"},{children:e}))},VersionPanelComponent=({sdk:e,edge:t,core:n})=>{const r=useStyles$1$1()["classes"];var i=useIntl();const o=useDispatch();var{versionLabel:i,viewReleaseNotes:a,noVersionInfo:s,clusterSizeLabel:l,environmentLabel:c,hostingTypeLabel:u,infrastructureLabel:d,sdkVersionLabel:p}=versionPanelLabels(i),f=useSelector(selectCurrentVersion),h=useSelector(selectPlatformProperties);const m=useSelector(selectLoadingStatus);var g={sdk:e,core:n,edge:null!=t&&t.includes("<Error>")?void 0:t},i=(react$1.exports.useEffect(()=>{["idle","failure"].includes(m)&&o(actions$1.fetchVersionInfoStart())},[o,m]),jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.osInfo},{children:jsxRuntime.exports.jsxs(Box$1,{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.osName},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",sx:{fontWeight:700}},{children:"Falcon"}))})),jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.osVersion},{children:jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"caption","data-testid":"version-panel-version-info"},{children:[(null==f?void 0:f.version)&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[i," ",null==f?void 0:f.version]}),!(null!=f&&f.version)&&(null===g?void 0:g.sdk)&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[p," ",null===g?void 0:g.sdk]})]}))}))]})})));const y={Size:l,Environment:c,HostingType:u,Infrastructure:d};p=!!(e||t||n||h||f)&&["success","failure"].includes(m);return jsxRuntime.exports.jsxs(Box$1,{children:[jsxRuntime.exports.jsx(Header$1,{}),jsxRuntime.exports.jsxs("div",Object.assign({className:r.panelRoot},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.wrapperBox},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({sx:{p:"20px"}},{children:[p&&jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.imageContainer},{children:jsxRuntime.exports.jsx("img",{src:img$2,className:r.falconLogo,alt:"system-logo"})})),jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.imageContainer},{children:jsxRuntime.exports.jsx("img",{src:img$3,className:r.aiwareLogo,alt:"aiware-logo"})})),p&&i]})),p?jsxRuntime.exports.jsx(Grid$1,Object.assign({container:!0,sx:{mt:"10px"}},{children:h&&Object.entries(h).map(([e,t])=>y[e]&&jsxRuntime.exports.jsxs(react$1.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:6,className:r.labelGrid},{children:jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.gridBox,sx:{fontWeight:700}},{children:[y[e],":"]}))})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:6,className:r.valueGrid},{children:jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.valueBox},{children:t}))}))]},e))})):jsxRuntime.exports.jsx(VersionChangelogNullState,{label:s})]})),jsxRuntime.exports.jsx(Button$1,Object.assign({sx:{width:"100%",cursor:"pointer"},variant:"outlined",onClick:()=>{o(mountPanel$1({panelId:"CHANGELOG_PANEL",microFrontend:{name:"CHANGELOG_PANEL",config:{}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"small",zIndex:1003,parentPanelId:VERSION_PANEL,dimmed:0,dimmedStatus:"dimParent",borderBottom:!0}}))},"data-test":"version-panel-release-notes-btn"},{children:a}))]}))]})},VersionPanel=e=>jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getPanelModule()]},{children:jsxRuntime.exports.jsx(VersionPanelComponent,Object.assign({},e))})),dateFormatter=e=>{e=new Date(e||"");return(8<e.getMonth()?e.getMonth()+1:"0"+(e.getMonth()+1))+"/"+(9<e.getDate()?e.getDate():"0"+e.getDate())+"/"+e.getFullYear()};let lottieScript,audio;const theme=createTheme({palette:{secondary:{main:"#1871E8"}}}),Logo_=()=>{const n=useDispatch();var e=useStyles$2$1()["classes"];const[r,i]=react$1.exports.useState(0),[t,o]=react$1.exports.useState(!1),[a,s]=react$1.exports.useState(!1),l=jsxRuntime.exports.jsx("p",Object.assign({style:{pointerEvents:"none"}},{children:"Loading Beta Features"})),[c,u]=react$1.exports.useState(l),d=useSelector(organizations_selector.selectOrgSwitchInitiated),p=useSelector(e=>{return null==(e=null==(e=null==e?void 0:e.configs)?void 0:e.initConfig)?void 0:e.betaFeatures}),[f,h]=react$1.exports.useState(!1),[m,g]=react$1.exports.useState(""),[y,v]=react$1.exports.useState(""),[x,b]=react$1.exports.useState(""),[$,C]=react$1.exports.useState(!1),S=useSelector(selectLoadingStatus);var w=useSelector(selectCurrentVersion);react$1.exports.useEffect(()=>{["idle","failure"].includes(S)&&n(actions$1.fetchVersionInfoStart())},[n,S]),react$1.exports.useEffect(()=>{f||(h(!0),(lottieScript=document.createElement("script")).setAttribute("src","https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.7.8/lottie.min.js"),lottieScript.onload=()=>s(!0),(audio=document.createElement("audio")).id="player",audio.src="https://static.veritone.com/aiware-js-animation/sound-effects/chime.wav",document.head.appendChild(lottieScript),document.body.appendChild(audio)),has_1(window,"aiware.version")&&((t=null==(t=window.aiware)?void 0:t.version)&&"undefined"!==t&&g(t),t=null==(t=window.aiware)?void 0:t.releaseDate,v(dateFormatter(t)));var t=document.getElementsByTagName("script");if(t.length){let e=Array.from(t).find(e=>e.src.includes("get.aiware.com"));(e=e||Array.from(t).find(e=>e.src.includes("https://cdn.jsdelivr.net/npm/aiware-js")))&&fetch(e.getAttribute("src")).then(e=>{g(e.url.split("@")[1].split("/")[0])})}fetch("https://get.aiware.com/aiware-versions/aiware-latest.txt",{headers:{"Content-Type":"text/plain"}}).then(e=>e.text()).then(e=>b(e))},[]),react$1.exports.useEffect(()=>{if(p&&!d)return;d&&u(jsxRuntime.exports.jsx("p",{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-organization-panel.organizations-switching-loader-message",defaultMessage:"Changing your Organization",description:"organizations switching loader message"})}));const e=10===r;if((e||d)&&(o(!0),a)){const t=window.bodymovin.loadAnimation({container:document.getElementById("loaderAnimation"),path:"https://static.veritone.com/aiware-js-animation/particle-explosion.json",renderer:"svg",loop:!1,autoplay:!0,name:"unicorn"});t.onComplete=()=>{e?(n(enableBetaFeatures()),i(0)):d&&u(l),o(!1),t.destroy()},null!==audio&&void 0!==audio&&audio.play()}},[r,p,n,t,d]);return jsxRuntime.exports.jsxs(react$1.exports.Fragment,{children:[t&&jsxRuntime.exports.jsxs("div",Object.assign({className:e.fullScreen},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:e.loaderBox,id:"loaderAnimation"},{children:!a&&jsxRuntime.exports.jsx("img",{src:img$7,alt:"veritone-logo",className:e.veritoneDarkLogo})})),jsxRuntime.exports.jsxs("div",Object.assign({className:e.loaderBox},{children:[jsxRuntime.exports.jsx(StyledEngineProvider,Object.assign({injectFirst:!0},{children:jsxRuntime.exports.jsx(ThemeProvider,Object.assign({theme:theme},{children:jsxRuntime.exports.jsx(LinearProgress$1,{color:"secondary"})}))})),c]}))]})),jsxRuntime.exports.jsxs("div",{children:[w?jsxRuntime.exports.jsxs(Typography$1,Object.assign({"data-test":"veritone-panel.logo.version",sx:{color:"#9CA8B4",fontSize:"10px",textAlign:"center",cursor:"pointer",width:"60px",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},onClick:()=>{var e,t;$?(C(!1),n(hidePanel$1(VERSION_PANEL))):(C(!0),e={name:VERSION_PANEL,config:{name:"Version Information",sdk:m,sdkRelease:y,edge:x}},t={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"small",zIndex:1001,dimmed:0,borderBottom:!0},n(mountPanel$1({panelId:VERSION_PANEL,microFrontend:e,panelConfig:t})))}},{children:["V. ",w.version]})):null,jsxRuntime.exports.jsx("img",{onClick:()=>i(r+1),src:img$D,alt:"footer-icon",draggable:"false"})]})]})},Logo=injectIntl(Logo_);function getTabAction(e,t,n,r="APP_BAR_PANEL"){return{type:mountPanel$1({}).type,payload:{panelId:e,microFrontend:{name:r,config:{name:"Veritone",tabId:e,dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE"}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,fullScreen:!1,width:n,header:{divider:!0,title:t}}}}}const tabsListDefault=[{id:TabId.PERSONAL_PANEL,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.personalProfile",defaultMessage:"Personal Profile",description:"Tooltip pops on the sidebar for personal profile"}),iconComponent:jsxRuntime.exports.jsx(PersonalProfile$1,{}),role:"",action:getTabAction(TabId.PERSONAL_PANEL,jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.panelTitle.personalProfile",defaultMessage:"Personal Profile",description:"Header title for personal profile"}),410)},{id:TabId.ORGANIZATION_PANEL,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.organizations",defaultMessage:"Organizations",description:"Tooltip pops on the sidebar for organizations"}),iconComponent:jsxRuntime.exports.jsx(Organizations,{}),role:"",action:{type:mountPanel$1({}).type,payload:{panelId:TabId.ORGANIZATION_PANEL,microFrontend:{name:"ORGANIZATION_PANEL"},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,width:560,zIndex:1e3}}}},{id:TabId.CMS_SHORTCUT,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.dataCenter",defaultMessage:"Data Center",description:"Tooltip pops on the sidebar for data center"}),iconComponent:jsxRuntime.exports.jsx(DataCenter,{}),role:"cms",action:{type:"panels/OPEN_APP_SHORTCUT",payload:"cms"}},{id:TabId.DATA_CENTER,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.dataCenter",defaultMessage:"Data Center",description:"Tooltip pops on the sidebar for data center"}),iconComponent:jsxRuntime.exports.jsx(DataCenter,{}),role:"cms",action:{type:mountPanel$1({}).type,payload:{panelId:TabId.DATA_CENTER,microFrontend:{name:"DATA_CENTER"},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"xlarge",zIndex:1e3}}}},{id:TabId.PROCESSING_CENTER,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.processingCenter",defaultMessage:"Processing Center",description:"Tooltip pops on the sidebar for processing center"}),iconComponent:jsxRuntime.exports.jsx(Process,{}),role:"cms",action:{type:mountPanel$1({}).type,payload:{panelId:TabId.PROCESSING_CENTER,microFrontend:{name:"PROCESSING_CENTER"},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"xxlarge",zIndex:1e3}}}},{id:TabId.FLOW_CENTER,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.flowCenter",defaultMessage:"Flow Center",description:"Tooltip pops on the sidebar for flow center"}),iconComponent:jsxRuntime.exports.jsx(FlowCenter2,{}),role:"automate",action:{type:mountPanel$1({}).type,payload:{panelId:TabId.FLOW_CENTER,microFrontend:{name:"FLOW_CENTER",config:{name:"Veritone",tabId:TabId.FLOW_CENTER,dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE",zIndex:1200}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"xxlarge"}}}},{id:TabId.ENGINE_CENTER,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.developerCenter",defaultMessage:"Developer Center",description:"Tooltip pops on the sidebar for developer center"}),iconComponent:jsxRuntime.exports.jsx(DeveloperCenter,{}),role:"cms",action:{type:"panels/OPEN_APP_SHORTCUT",payload:"developer"}},{id:TabId.MARKETPLACE_CENTER,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.marketplaceCenter",defaultMessage:"Marketplace",description:"Tooltip pops on the sidebar for marketplace center"}),iconComponent:jsxRuntime.exports.jsx(Marketplace$1,{}),role:"cms",action:{type:"panels/OPEN_APP_SHORTCUT",payload:"marketplace"}},{id:TabId.LIBRARY_CENTER,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.libraryCenter",defaultMessage:"Library Center",description:"Tooltip pops on the sidebar for library center"}),iconComponent:jsxRuntime.exports.jsx(LibraryCenter,{}),role:"",action:{type:"panels/OPEN_APP_SHORTCUT",payload:"libray"}},{id:TabId.ADMIN_SHORTCUT,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.adminCenter",defaultMessage:"Admin Center",description:"Tooltip pops on the sidebar for admin center"}),iconComponent:jsxRuntime.exports.jsx(AdminCenter,{}),role:"admin",action:{type:mountPanel$1({}).type,payload:{panelId:TabId.ADMIN_SHORTCUT,microFrontend:{name:"ADMIN_CENTER"},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"xlarge",zIndex:1e3}}}},{id:TabId.INSTANCE_ADMIN_CENTER_BROWSE,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.instanceAdminCenter",defaultMessage:"Instance Admin Center",description:"Tooltip pops on the sidebar for instance admin center"}),iconComponent:jsxRuntime.exports.jsx(AdminTabIcon,{}),role:"admin",action:{type:mountPanel$1({}).type,payload:{panelId:TabId.INSTANCE_ADMIN_CENTER_BROWSE,microFrontend:{name:"INSTANCE_ADMIN_CENTER_BROWSE"},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"xlarge",zIndex:1e3}}}},{id:TabId.RESOURCE_CENTER,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.resourceCenter",defaultMessage:"Resource Center",description:"Tooltip pops on the sidebar for resource center"}),iconComponent:jsxRuntime.exports.jsx(Resources$1,{}),role:"",action:{type:mountPanel$1({}).type,payload:{panelId:TabId.RESOURCE_CENTER,microFrontend:{name:"RESOURCE_CENTER"},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"xxlarge",zIndex:1e3}}}},{id:TabId.PROCESSING_CENTER_DAG_BUILDER,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.dagBuilder",defaultMessage:"DAG Builder (Beta)",description:"Tooltip pops on the sidebar for dag builder"}),iconComponent:jsxRuntime.exports.jsx(DagBuilder,{}),role:"cms",action:{type:mountPanel$1({}).type,payload:{panelId:TabId.PROCESSING_CENTER_DAG_BUILDER,microFrontend:{name:"PROCESSING_CENTER_DAG_BUILDER"},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"xlarge",zIndex:1e3}}}}];function AppbarTabPanel({panelId:t,children:e,withTab:r=!0,withChild:n=!0}){const i=useDispatch(),[o,a]=react$1.exports.useState(),[s,l]=react$1.exports.useState([]),[c,u]=react$1.exports.useState(!1);var d=useSelector(e=>e.panels.find(e=>e.panelId===t))||{};const p=useSelector(e=>e.panels);const{microFrontend:f,panelConfig:h}=d,{minWidth:m,padding:g=0,header:y,footer:v,marginTop:x=0,marginStart:b=0,show:$,tabs:C=[],zIndex:S=1e3,userRoles:w=[],panelId:_,size:T,fullScreen:E,width:j,dimmed:R=0,parentPanelId:I,borderBottom:O}=h||{};const k=I?("ORGANIZATION_PANEL"!==I?"":"solid 5px #4D81B7")||("DATA_CENTER"!==I?"":"solid 5px #4D81B7"):"solid 5px #4D81B7",A=makeStyles()(e=>{return{container:{position:"fixed",top:x,right:E?0:b,height:`calc(100vh - ${x}px)`,minWidth:m,width:j||(E?"100%":getTabPanelWidthBySize(T)||560),borderBottom:O?"solid 5px #4D81B7":k,zIndex:E?1500:S,transitionTimingFunction:"ease-in-out !important"},padding:{padding:e.spacing(g),paddingTop:e.spacing(g/2)},margin:{margin:e.spacing()},headerContainer:{display:"flex",width:"100%",justifyContent:"space-between",alignItems:"center"},headerTitle:{margin:e.spacing(),marginTop:e.spacing(2)},actionButton:{margin:e.spacing()},footer:{},actionContainer:{"&:last-child":{marginRight:e.spacing(2)}},content:{overflow:"overlay",overflowX:"hidden",height:(t=y?64:0,n=v?64:0,`calc(100vh - ${x}px - ${t}px - ${n}px - 5px)`)},paperContainer:{top:56,backgroundColor:"unset !important",boxShadow:"none"},tabContainer:{overflow:"hidden",width:"100%"},tabSelect:{paddingTop:e.spacing(6),width:80,display:"flex",flexDirection:"column"},drawerContainer:{display:"flex",background:e.palette.background.default},tabName:{display:"flex",justifyContent:"space-between",alignItems:"center",height:"61px",padding:e.spacing(0,4,0,6)},actionIcons:{margin:e.spacing(-2.4)},title:{userSelect:"none",fontStyle:"normal",fontSize:"18px",lineHeight:e.spacing(5),letterSpacing:"0.25px",textTransform:"uppercase",color:e.palette.text.secondary},tabContent:{borderRight:r?"0.5px solid "+e.palette.divider:"none",overflowY:"auto",overflowX:"hidden",width:"100%"},buttonAction:{textTransform:"unset"},aiWareIcon:{padding:e.spacing(2.4,0),display:"flex",justifyContent:"center",position:"fixed",bottom:"0",right:"10px"},noShadow:{boxShadow:"none",borderLeft:"0.5px solid "+e.palette.divider},panelMask:{position:"absolute",zIndex:1150,width:"100%",height:"100%",backgroundColor:e.palette.grey[50],opacity:.5}};var t,n})()["classes"];react$1.exports.useEffect(()=>{0<C.length?l([...tabsListDefault,...C]):l(tabsListDefault)},[C]),react$1.exports.useEffect(()=>{var e;null!==f&&void 0!==f&&f.config&&null!=(e=f.config)&&e.tabId&&a(f.config.tabId)},[f]),react$1.exports.useEffect(()=>{0<p.length&&o&&r&&(p.find(e=>e.panelId===o)||a(void 0))},[p,o,r]);n=jsxRuntime.exports.jsxs(Paper$1,Object.assign({className:`${A.container} ${n?"":A.noShadow} `,elevation:3,id:t,square:!0,"data-test":"panel-"+(_||"unknown")},{children:[0<R&&jsxRuntime.exports.jsx("div",{className:A.panelMask}),jsxRuntime.exports.jsxs("div",Object.assign({className:A.drawerContainer},{children:[n&&jsxRuntime.exports.jsxs("div",Object.assign({className:A.tabContent},{children:[y&&jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:A.tabName},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1",className:A.title},{children:y.title||(null==(d=s.find(e=>e.id===o))?void 0:d.label)})),jsxRuntime.exports.jsxs("div",Object.assign({className:A.actionIcons},{children:[null==(n=y.actions)?void 0:n.map(e=>e.label?jsxRuntime.exports.jsx(Button$1,Object.assign({size:e.size,variant:e.variant,onClick:()=>i(e.action)},{children:e.label}),e.action.type):jsxRuntime.exports.jsxs(IconButton$1,Object.assign({onClick:()=>i(e.action),size:"large"},{children:[e.iconUrl&&jsxRuntime.exports.jsx("img",{src:e.iconUrl,alt:"icon",draggable:"false"}),e.icon&&jsxRuntime.exports.jsx("div",{children:e.icon})]}),e.action.type)),jsxRuntime.exports.jsx(IconButton$1,Object.assign({onClick:()=>i(hidePanel$1(t)),"data-test":"close-button-"+t,size:"large"},{children:jsxRuntime.exports.jsx("img",{src:I?img$W:img$X,alt:"icon",draggable:"false"})}))]}))]})),y.divider&&jsxRuntime.exports.jsx(Divider$1,{})]}),jsxRuntime.exports.jsx("div",Object.assign({className:A.content},{children:e?react$1.exports.cloneElement(e,Object.assign(Object.assign({},(null===f||void 0===f?void 0:f.config)||{}),{dataId:t,hidePanel:()=>i(hidePanel$1(t)),tabId:o,panelRendered:c})):jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx("h1",{children:"No micro frontend passed!"})})})),v&&jsxRuntime.exports.jsxs("div",Object.assign({className:A.footer},{children:[v.divider&&jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsx("div",Object.assign({className:A.headerContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({className:A.actionContainer},{children:null==(d=v.actions)?void 0:d.map(e=>{var t;if(e.iconUrl)return jsxRuntime.exports.jsxs(IconButton$1,Object.assign({className:A.actionButton,onClick:(t=e.action,()=>{i(t)}),size:"large"},{children:[e.iconUrl&&jsxRuntime.exports.jsx("img",{src:e.iconUrl,alt:"icon",draggable:"false"}),e.icon&&jsxRuntime.exports.jsx("div",{children:e.icon})]}),e.action.type);const n=e;return jsxRuntime.exports.jsx(Button$1,Object.assign({className:A.actionButton,size:n.size,variant:n.variant,onClick:()=>i(n.action)},{children:n.label}),e.action.type)})}))}))]}))]})),r&&jsxRuntime.exports.jsxs("div",Object.assign({id:"tabs-content",className:A.tabSelect},{children:[jsxRuntime.exports.jsx(Tabs,{selectedId:o,tabsList:s,onChangeTab:function(t){0<=p.map(e=>e.panelId).indexOf(VERSION_PANEL)&&i(hidePanel$1(VERSION_PANEL)),o&&i(hidePanel$1(o)),a(t);var e,n=s.find(e=>e.id===t);null!=(e=null==n?void 0:n.onClick)&&e.call(n,t),null!=n&&n.action&&i(n.action)},roles:w}),(null===v||void 0===v?void 0:v.logo)&&jsxRuntime.exports.jsx("div",Object.assign({className:A.aiWareIcon},{children:jsxRuntime.exports.jsx(Logo,{})}))]}))]}))]}));return jsxRuntime.exports.jsx(AIWareThemeProvider$1,{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getPanelModule()]},{children:jsxRuntime.exports.jsx(Slide$1,Object.assign({"data-id":"123456",in:$,direction:"left",onEntered:()=>u(!0),onExited:()=>i(unmountPanel$1(t))},{children:n}))}))})})}const AppbarPanel=e=>jsxRuntime.exports.jsx(AppbarTabPanel,Object.assign({},e,{withChild:!0,withTab:!1})),Tab=e=>jsxRuntime.exports.jsx(AppbarTabPanel,Object.assign({},e,{withChild:!1,withTab:!0})),changelogPanelLabels=e=>({changelog:e.formatMessage({id:"changelog-panel.header.title",defaultMessage:[{type:0,value:"Release Notes"}]}),closePanelTooltip:e.formatMessage({id:"changelog-panel.header.close-btn-tooltip",defaultMessage:[{type:0,value:"Close panel"}]}),versionLabel:e.formatMessage({id:"changelog-panel.version-title",defaultMessage:[{type:0,value:"Version"}]}),updateRequiredLabel:e.formatMessage({id:"changelog-panel.update-required",defaultMessage:[{type:0,value:"Update required"}]}),deploymentLabel:e.formatMessage({id:"changelog-panel.deployment",defaultMessage:[{type:0,value:"Deployment"}]}),apiUnavailable:e.formatMessage({id:"changelog-panel.no-api",defaultMessage:[{type:0,value:"Cannot retrieve platform information"}]}),current:e.formatMessage({id:"changelog-panel.current",defaultMessage:[{type:0,value:"Current"}]}),previous:e.formatMessage({id:"changelog-panel.previous",defaultMessage:[{type:0,value:"Previous"}]}),noHighlights:e.formatMessage({id:"changelog-panel.no-highlights",defaultMessage:[{type:0,value:"Cannot retrieve version highlights"}]}),unknown:e.formatMessage({id:"changelog-panel.unknown",defaultMessage:[{type:0,value:"unknown"}]}),viewReleaseNotes:e.formatMessage({id:"version-panel.view-release-notes",defaultMessage:[{type:0,value:"View Version History"}]}),error:e.formatMessage({id:"version-panel.error-state",defaultMessage:[{type:0,value:"Error while fetching release notes"}]}),errorHelperText:e.formatMessage({id:"version-panel.error-state-helper-text",defaultMessage:[{type:0,value:"Please try again later"}]}),"current-version":{label:e.formatMessage({id:"changelog-panel.current-version",defaultMessage:[{type:0,value:"Current Version"}]}),noVersionHighlights:e.formatMessage({id:"changelog-panel.no-current-version-highlights",defaultMessage:[{type:0,value:"No Release Notes for Current Version"}]})},"previous-version":{label:e.formatMessage({id:"changelog-panel.previous-version",defaultMessage:[{type:0,value:"Previous Version"}]}),noVersionHighlights:e.formatMessage({id:"changelog-panel.no-prev-version-highlights",defaultMessage:[{type:0,value:"No Release Notes for Previous Version"}]})},"selected-version":{label:null,noVersionHighlights:e.formatMessage({id:"changelog-panel.no-selected-version-highlights",defaultMessage:[{type:0,value:"No Release Notes for Selected Version"}]})}}),useStyles$5=makeStyles()(e=>({flexContainer:{display:"flex",alignItems:"center"},header:{alignItems:"center",display:"flex",justifyContent:"space-between",height:"55px",padding:e.spacing(6,0,6,6),borderBottom:"1px solid rgb(219, 226, 234)"},headerActionContainer:{alignItems:"center",display:"flex",flexGrow:1,height:"100%",justifyContent:"flex-end",paddingRight:"10px"},title:{color:"#2A323C"},panelRoot:{padding:"15px",height:"calc(100% - 70px);",overflowY:"scroll"},row:{display:"flex","& svg":{marginRight:"12px",marginBottom:"24px"}},widgets:{"& svg":{fill:"#555F7C"}},veriLogo:{transform:"translate(3px, 2px)"},versionText:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",marginBottom:"5px"},wrapperBox:{padding:"15px 0 15px 15px",border:".5px solid #D5DFE9",borderRadius:"4px",marginBottom:"14px","& iframe":{width:"100%",border:"none"}},aiwareLogo:{marginBottom:"10px"},boldTitle:{fontWeight:700},releaseNotesBtn:{width:"100%",cursor:"pointer",height:"36px",border:"1px solid #5C6269",color:"#5C6269",marginTop:"15px","&:hover":{border:"1px solid #5C6269"}},errorStateContainer:{padding:"40px",textAlign:"center","& img":{width:"40%",marginBottom:"20px"}}})),Header=()=>{const e=useDispatch();var t=useStyles$5()["classes"],n=useIntl(),{changelog:n,closePanelTooltip:r}=changelogPanelLabels(n);return jsxRuntime.exports.jsxs("header",Object.assign({className:t.header,"data-testid":"changelog-panel.header"},{children:[jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"h1","data-testid":"changelog-panel-title",className:t.title},{children:["AIWARE ",n]})),jsxRuntime.exports.jsx("div",Object.assign({className:t.headerActionContainer},{children:jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:r},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({onClick:()=>e(hidePanel$1(CHANGELOG_PANEL)),"aria-labelledby":"changelog-panel.close-button","data-testid":"changelog-panel-close-button",size:"large"},{children:jsxRuntime.exports.jsx(Close$1,{})}))}))}))]}))},VersionHeader=({version:e,updateIsRequired:t})=>{var n=useStyles$5()["classes"],r=useIntl(),{versionLabel:r,updateRequiredLabel:i,deploymentLabel:o,unknown:a}=changelogPanelLabels(r);return jsxRuntime.exports.jsxs(Box$1,Object.assign({className:n.wrapperBox},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({className:n.flexContainer},{children:[jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"h1","data-test":"changelog-panel-header-title"},{children:[r," ",null!=e&&e.version?null==e?void 0:e.version:a]})),t?jsxRuntime.exports.jsxs(Typography$1,Object.assign({sx:{ml:"10px"},variant:"caption"},{children:["(",i,")"]})):null]})),jsxRuntime.exports.jsx(Box$1,Object.assign({sx:{mt:"5px"}},{children:jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"body2"},{children:[o," -"," ",e&&e.createdAt?dateFormatter((null==e?void 0:e.createdAt)||null):a]}))}))]}))},isValidHttpUrl=(e="")=>{let t;try{t=new URL(e)}catch(e){return!1}return"http:"===t.protocol||"https:"===t.protocol},VersionContent=({id:e,version:t,height:n})=>{var r=useStyles$5()["classes"],i=useIntl(),{[e]:{label:i,noVersionHighlights:o}}=changelogPanelLabels(i);return isValidHttpUrl(null==t?void 0:t.highlightsUrl)?jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.wrapperBox},{children:[t&&i&&jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1",sx:{mb:"10px"}},{children:i})),jsxRuntime.exports.jsx("iframe",{id:e,title:e,src:null==t?void 0:t.highlightsUrl,height:n,onLoad:e=>{e.currentTarget.onerror=e=>console.log("ev",e)}})]})):jsxRuntime.exports.jsx(VersionChangelogNullState,{label:o})},CHANGELOG_PANEL="CHANGELOG_PANEL",RELEASE_NOTES_URL="https://docs.veritone.com/#/versions/readme",ChangelogPanelComponent=({id:t})=>{var e=useStyles$5()["classes"],n=useIntl(),{apiUnavailable:n,noHighlights:r,viewReleaseNotes:i,error:o,errorHelperText:a}=changelogPanelLabels(n);const s=useDispatch(),[l,c]=react$1.exports.useState(!1);var u=useSelector(selectLoadingStatus);const[d,p]=react$1.exports.useState({}),f=e=>{if("https://get.aiware.com"===e.origin){const{height:t,source:n}=e.data;p(e=>Object.assign(Object.assign({},e),{[n]:t+1}))}};var h=useSelector(betaFeaturesSelector),m=(react$1.exports.useEffect(()=>{var e=gqlIntrospection.getQueries().find(e=>"platformInfo"===e.name);return c(!!e),e&&s(actions$2.versionPanel.fetchVersionInfoStart(t)),window.addEventListener("message",f),()=>window.removeEventListener("message",f)},[s,t]),useSelector(selectCurrentVersion)),g=useSelector(selectPreviousVersion),y=useSelector(selectSelectedVersion),[v,,]=react$1.exports.useState(!1),x=jsxRuntime.exports.jsxs(Box$1,{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({sx:{display:"flex",flexDirection:"column",height:"100%"}},{children:[m&&!t?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(VersionHeader,{version:m,updateIsRequired:v}),jsxRuntime.exports.jsx(VersionContent,{id:"current-version",version:m,height:d[(null==(x=null==m?void 0:m.highlightsUrl)?void 0:x.toString())||""]})]}):null,y&&t?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(VersionHeader,{version:y,updateIsRequired:v}),jsxRuntime.exports.jsx(VersionContent,{id:"selected-version",version:y,height:d[(null==(x=null==y?void 0:y.highlightsUrl)?void 0:x.toString())||""]})]}):null]})),g&&!t?jsxRuntime.exports.jsx(VersionContent,{id:"previous-version",version:g,height:d[(null==(v=null==g?void 0:g.highlightsUrl)?void 0:v.toString())||""]}):null,!t&&!m&&!g&&jsxRuntime.exports.jsx(VersionChangelogNullState,{label:r}),t&&!y&&jsxRuntime.exports.jsx(VersionChangelogNullState,{label:r}),h&&jsxRuntime.exports.jsxs(Button$1,Object.assign({className:e.releaseNotesBtn,variant:"outlined",onClick:()=>{window.open(RELEASE_NOTES_URL,"_blank")}},{children:[jsxRuntime.exports.jsx(Launch,{sx:{mr:"5px",width:"18px"}})," ",i]}))]}),v=jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.errorStateContainer},{children:[jsxRuntime.exports.jsx("img",{src:img$c,alt:"error"}),jsxRuntime.exports.jsx(Box$1,{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",sx:{fontWeight:700}},{children:o}))}),jsxRuntime.exports.jsx(Box$1,{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:a}))})]}));return jsxRuntime.exports.jsxs(Box$1,Object.assign({sx:{height:"calc(100vh - 60px)",overflow:"hidden"}},{children:[jsxRuntime.exports.jsx(Header,{}),"pending"===u&&jsxRuntime.exports.jsx(Box$1,Object.assign({sx:{p:"15px",display:"flex",justifyContent:"center"}},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})),"success"===u&&jsxRuntime.exports.jsx("div",Object.assign({className:e.panelRoot},{children:l?x:jsxRuntime.exports.jsx(VersionChangelogNullState,{label:n})})),"failure"===u&&v]}))},ChangelogPanel=({id:e})=>jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getPanelModule()]},{children:jsxRuntime.exports.jsx(ChangelogPanelComponent,{id:e})}));var index_esm$2=Object.freeze({__proto__:null,AppbarPanel:AppbarPanel,AppbarTabPanel:AppbarTabPanel,ChangelogPanel:ChangelogPanel,TabPanel:Tab,VersionPanel:VersionPanel});const Panel=({panelId:t,children:e})=>{var n;const r=useDispatch(),{microFrontend:i,panelConfig:{minWidth:o,padding:a=0,header:s,footer:l,marginTop:c=0,marginStart:u=0,show:d,width:p=500,zIndex:f=1}}=useSelector(e=>e.panels.find(e=>e.panelId===t)),h=makeStyles()(e=>({container:{position:"fixed",top:c,right:u,height:"100%",minWidth:o,width:p,zIndex:f},padding:{padding:e.spacing(a),paddingTop:e.spacing(a/2)},margin:{margin:e.spacing()},headerContainer:{display:"flex",width:"100%",justifyContent:"space-between",alignItems:"center"},headerTitle:{margin:e.spacing()},actionButton:{margin:e.spacing()},actionContainer:{"&:last-child":{marginRight:e.spacing(2)}},footer:{}}))()["classes"],m=e=>{var t;return e.icon?jsxRuntime.exports.jsx(IconButton$1,Object.assign({className:h.actionButton,onClick:()=>r(e.action),size:"large"},{children:e.icon})):(t=e,jsxRuntime.exports.jsx(Button$1,Object.assign({className:h.actionButton,size:t.size,variant:t.variant,onClick:()=>r(e.action)},{children:t.label})))};return jsxRuntime.exports.jsx(Slide$1,Object.assign({in:d,direction:"left",onExited:()=>r(unmountPanel$1(t))},{children:jsxRuntime.exports.jsxs(Paper$1,Object.assign({elevation:3,id:t,"data-test":"panel-"+(t||"unknown"),className:h.container},{children:[s&&jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:h.headerContainer},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({gutterBottom:!0,className:h.headerTitle,variant:"h4"},{children:s.title})),jsxRuntime.exports.jsxs("div",Object.assign({className:h.actionContainer},{children:[null==(n=s.actions)?void 0:n.map(e=>m(e)),jsxRuntime.exports.jsx(IconButton$1,Object.assign({"data-test":"close-button-"+t,className:h.actionButton,onClick:()=>r(hidePanel$1(t)),size:"large"},{children:jsxRuntime.exports.jsx(default_1$6,{})}))]}))]})),s.divider&&jsxRuntime.exports.jsx(Divider$1,{})]}),jsxRuntime.exports.jsx("div",Object.assign({className:h.padding},{children:e?react$1.exports.cloneElement(e,Object.assign(Object.assign({},i.config||{}),{dataId:t,hidePanel:()=>r(hidePanel$1(t))})):jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx("h1",{children:"No micro frontend passed!"})})})),l&&jsxRuntime.exports.jsxs("div",Object.assign({className:h.footer},{children:[l.divider&&jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsxs("div",Object.assign({className:h.headerContainer},{children:[jsxRuntime.exports.jsx("div",{}),jsxRuntime.exports.jsx("div",Object.assign({className:h.actionContainer},{children:null==(n=l.actions)?void 0:n.map(e=>m(e))}))]}))]}))]}))}))},SamplePanel5=e=>jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx("h1",{children:"Welcome to SamplePanel5!"})}),SamplePanel4=e=>jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx("h1",{children:"Welcome to SamplePanel4!"})}),SamplePanel3=n=>{const r=useDispatch();return jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx("h1",{children:"Welcome to picker!"}),jsxRuntime.exports.jsx(Typography$1,Object.assign({id:"discrete-slider",gutterBottom:!0},{children:"Temperature"})),jsxRuntime.exports.jsx(Slider$1,{"data-test":"slider",defaultValue:n.value,value:n.value,"aria-labelledby":"discrete-slider",valueLabelDisplay:"auto",step:10,marks:!0,min:0,max:110,onChange:(e,t)=>{r(updatePanelMicroFrontendProps({id:n.dataId,props:Object.assign(Object.assign({},n),{value:t})}))},onChangeCommitted:(e,t)=>{r(updatePanelMicroFrontendProps({id:n.dataId,props:Object.assign(Object.assign({},n),{value:t})})),r(setData({id:n.dataId,data:t}))}})]})},SamplePanel2=e=>jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx("h1",{children:"Welcome to SamplePanel2!"})}),useStyles$3=makeStyles()(e=>({container:{},root:{minWidth:50},bullet:{display:"inline-block",margin:"0 2px",transform:"scale(0.8)"},title:{fontSize:14},pos:{marginBottom:12}})),SamplePanel1=e=>{var t=useStyles$3()["classes"],n=jsxRuntime.exports.jsx("span",Object.assign({className:t.bullet},{children:"•"}));return jsxRuntime.exports.jsxs("div",Object.assign({className:t.container},{children:[jsxRuntime.exports.jsxs("h1",{children:["Welcome to SamplePanel1 ",e.name||"Unknown Person","!"]}),jsxRuntime.exports.jsxs(Card$1,Object.assign({className:t.root},{children:[jsxRuntime.exports.jsxs(CardContent$1,{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({className:t.title,color:"textSecondary",gutterBottom:!0},{children:"Word of the Day"})),jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"h5",component:"h2"},{children:["be",n,"nev",n,"o",n,"lent"]})),jsxRuntime.exports.jsx(Typography$1,Object.assign({className:t.pos,color:"textSecondary"},{children:"adjective"})),jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"body2",component:"p"},{children:["well meaning and kindly.",jsxRuntime.exports.jsx("br",{}),'"a benevolent smile"']}))]}),jsxRuntime.exports.jsx(CardActions$1,{children:jsxRuntime.exports.jsx(Button$1,Object.assign({size:"small"},{children:"Learn More"}))})]}))]}))};var WidgetsStatus,index_esm$1=Object.freeze({__proto__:null,Panel:Panel,SamplePanel1:SamplePanel1,SamplePanel2:SamplePanel2,SamplePanel3:SamplePanel3,SamplePanel4:SamplePanel4,SamplePanel5:SamplePanel5});const registry={[AvailableWidgets.APP_BAR]:App,[AvailableComponents.APP_BAR_PANEL]:SettingPanelComponent,[AvailablePanels.APP_BAR_PANEL_TEMPLATE]:AppbarPanel,[AvailablePanels.TAB_TEMPLATE]:Tab,[AvailablePanels.SIMPLE_PANEL]:Panel},registryLookup=t=>__awaiter$e(void 0,void 0,void 0,function*(){if(registry[t])return yield registry[t];let e=Promise.resolve(null);switch(t){case AvailableWidgets.SAMPLE_APP_BAR:e=import("./js-core.esm2.js").then(e=>e.SampleAppBar);break;case AvailableWidgets.RESET_PASSWORD:e=import("./js-core.esm4.js").then(e=>e.ResetPassword);break;case AvailableWidgets.FLOW_CENTER:e=import("./js-core.esm11.js").then(e=>e.App);break;case AvailableWidgets.FLOW_WIDGET:e=import("./js-core.esm13.js").then(function(e){return e.i}).then(e=>e.App);break;case AvailableWidgets.ENGINE_CENTER_BROWSE:e=import("./js-core.esm22.js").then(e=>e.EngineCenterBrowse);break;case AvailablePanels.APP_BAR_TAB_PANEL_TEMPLATE:e=Promise.resolve().then(function(){return index_esm$2}).then(e=>e.AppbarTabPanel);break;case AvailableComponents.NOTIFICATION_PANEL:e=Promise.resolve().then(function(){return index_esm$5}).then(e=>e.NotificationPanel);break;case AvailableComponents.NOTIFICATION_DETAIL:e=Promise.resolve().then(function(){return index_esm$5}).then(e=>e.NotificationDetailPanel);break;case AvailableComponents.NOTIFICATION_SETTING:e=Promise.resolve().then(function(){return index_esm$5}).then(e=>e.NotificationSetting);break;case AvailableComponents.NOTIFICATION_UTILITY:e=Promise.resolve().then(function(){return index_esm$5}).then(e=>e.NotificationUtilityPanel);break;case AvailableComponents.NOTIFICATION_APPLICATION:e=Promise.resolve().then(function(){return index_esm$5}).then(e=>e.NotificationApplication);break;case AvailableComponents.HELP_PANEL:e=Promise.resolve().then(function(){return index_esm}).then(e=>e.HelpCenterPanel);break;case AvailableComponents.EDIT_PROFILE_PICTURE:e=Promise.resolve().then(function(){return index_esm$4}).then(e=>e.EditProFilePicture);break;case AvailableComponents.TEST_COMPONENT:e=Promise.resolve().then(function(){return index_esm$1}).then(e=>e.SamplePanel1);break;case AvailableComponents.TEST_COMPONENT2:e=Promise.resolve().then(function(){return index_esm$1}).then(e=>e.SamplePanel2);break;case AvailableComponents.TEST_COMPONENT3:e=Promise.resolve().then(function(){return index_esm$1}).then(e=>e.SamplePanel3);break;case AvailableComponents.SETTING_PREFERENCE:e=import("./js-core.esm33.js").then(e=>e.SettingsPreferencesPanel);break;case AvailableComponents.ORGANIZATION_PANEL:e=Promise.resolve().then(function(){return index_esm$3}).then(e=>e.OrganizationPanel);break;case AvailableComponents.INVITE_USERS_PANEL:e=Promise.resolve().then(function(){return index_esm$3}).then(e=>e.InviteUsersPanel);break;case AvailableComponents.INVITE_REQUESTS_PANEL:e=Promise.resolve().then(function(){return index_esm$3}).then(e=>e.InviteRequestsPanel);break;case AvailableComponents.REVIEW_ORG_INVITE_PANEL:e=Promise.resolve().then(function(){return index_esm$3}).then(e=>e.ReviewRequestPanel);break;case AvailableComponents.ADD_APPLICATIONS:e=Promise.resolve().then(function(){return index_esm$3}).then(e=>e.AddApplicationsPanel);break;case AvailableComponents.DATA_CENTER:e=import("./js-core.esm34.js").then(function(e){return e.c}).then(e=>e.DataCenterBrowse);break;case AvailableComponents.DATA_CENTER_FOLDERS_AND_FILES:e=import("./js-core.esm34.js").then(function(e){return e.c}).then(e=>e.FoldersAndFilesPanel);break;case AvailableComponents.DATA_CENTER_FILE_INFO_PANEL:e=import("./js-core.esm34.js").then(function(e){return e.c}).then(e=>e.FileInfoPanel);break;case AvailableComponents.DATA_CENTER_IMPORTER:e=import("./js-core.esm39.js").then(e=>e.DataCenterImporter);break;case AvailableComponents.DATA_LABELER:e=import("./js-core.esm40.js").then(e=>e.DataLabelerPanel);break;case AvailableComponents.ADMIN_CENTER_OPEN_ID:e=import("./js-core.esm41.js").then(e=>e.AdminCenterOpenId);break;case AvailableComponents.ADMIN_CENTER:e=import("./js-core.esm43.js").then(e=>e.AdminCenterBrowse);break;case AvailableComponents.DATA_CENTER_PROCESS_AI:e=import("./js-core.esm47.js").then(e=>e.DataCenterProcessAI);break;case AvailableComponents.ENGINE_CENTER_NEW:e=import("./js-core.esm23.js").then(function(e){return e.h}).then(e=>e.EngineCenterNew);break;case AvailableComponents.ENGINE_CENTER_FILTER:e=import("./js-core.esm22.js").then(e=>e.EngineCenterFilter);break;case AvailableComponents.APP_CENTER_FILTER:e=import("./js-core.esm48.js").then(e=>e.AppCenterFilter);break;case AvailableComponents.ENGINE_CENTER_DETAILS:e=import("./js-core.esm22.js").then(e=>e.EngineDetails);break;case AvailableComponents.ENGINE_CENTER_NEW_BUILD:e=import("./js-core.esm22.js").then(e=>e.CreateNewBuildPanel);break;case AvailableComponents.ENGINE_CENTER_CUSTOM_FIELDS_FORM:e=import("./js-core.esm23.js").then(function(e){return e.h}).then(e=>e.EngineCenterCustomFieldsForm);break;case AvailableComponents.ENGINE_CENTER_SCHEMAS_FORM_PANEL:e=import("./js-core.esm23.js").then(function(e){return e.h}).then(e=>e.SchemasFormPanel);break;case AvailableComponents.ENGINE_CENTER_INPUT_TYPE_FLYOUT:e=import("./js-core.esm23.js").then(function(e){return e.h}).then(e=>e.InputTypeFlyout);break;case AvailableComponents.ENGINE_CENTER_EDIT_RELEASE_NOTES:e=import("./js-core.esm22.js").then(e=>e.EditReleaseNotes);break;case AvailableComponents.ENGINE_CENTER_VERSION_HISTORY_PANEL:e=import("./js-core.esm22.js").then(e=>e.VersionHistoryPanel);break;case AvailableComponents.SUPPORTED_FILE_TYPES:e=import("./js-core.esm39.js").then(e=>e.SupportedFileTypes);break;case AvailableComponents.EDIT_FILE_METADATA:e=import("./js-core.esm39.js").then(e=>e.EditFileMetadata);break;case AvailableWidgets.APP_CENTER_BROWSE:e=import("./js-core.esm48.js").then(e=>e.AppCenterBrowse);break;case AvailableComponents.APP_CENTER_NEW:e=import("./js-core.esm49.js").then(e=>e.AppCenterNew);break;case AvailableComponents.APP_CENTER_CONFIG_FIELDS_FORM:e=import("./js-core.esm49.js").then(e=>e.AppCenterConfigFieldsForm);break;case AvailableComponents.APP_CENTER_CONTEXT_MENU_EXTENSIONS:e=import("./js-core.esm49.js").then(e=>e.AppCenterContextMenuExtensionPanel);break;case AvailableComponents.APP_CENTER_BROWSE:e=import("./js-core.esm48.js").then(e=>e.AppCenterBrowse);break;case AvailableComponents.APP_CENTER_DETAILS:e=import("./js-core.esm48.js").then(e=>e.AppCenterDetails);break;case AvailableComponents.DATA_CENTER_ENGINE_SELECTION:e=import("./js-core.esm47.js").then(e=>e.DataCenterEngineSelection);break;case AvailableComponents.ADMIN_CENTER_NEW_GROUP_PANEL:e=import("./js-core.esm38.js").then(e=>e.NewGroupPanel);break;case AvailableComponents.PERMISSIONS_PANEL:e=import("./js-core.esm35.js").then(e=>e.PermissionsPanel);break;case AvailableComponents.GROUP_INFO_PANEL:e=import("./js-core.esm35.js").then(e=>e.GroupInfoPanel);break;case AvailableComponents.NEW_PERMISSION_SET_PANEL:e=import("./js-core.esm35.js").then(e=>e.NewPermissionSetPanel);break;case AvailableComponents.PERMISSION_SET_DETAILS_PANEL:e=import("./js-core.esm35.js").then(e=>e.PermissionSetDetailsPanel);break;case AvailableComponents.DATA_CENTER_MDP_IFRAME_PANEL:e=import("./js-core.esm34.js").then(function(e){return e.c}).then(e=>e.MediaDetailsPanelIframe);break;case AvailableComponents.DATA_CENTER_INGESTION_CREATION_PANEL:e=import("./js-core.esm34.js").then(function(e){return e.c}).then(e=>e.IngestionCreationPanel);break;case AvailableComponents.DATA_CENTER_SELECT_IMPORT_SOURCE:e=import("./js-core.esm34.js").then(function(e){return e.c}).then(e=>e.SelectImportSource);break;case AvailableComponents.DATA_CENTER_SOURCE_CREATION_PANEL:e=import("./js-core.esm34.js").then(function(e){return e.c}).then(e=>e.SourceCreationPanel);break;case AvailableComponents.ADMIN_CENTER_GROUP_DETAILS_PANEL:e=import("./js-core.esm38.js").then(e=>e.GroupDetailsPanel);break;case AvailableComponents.ADMIN_CENTER_ADD_MEMBER_PANEL:e=import("./js-core.esm38.js").then(e=>e.AddMemberPanel);break;case AvailableComponents.APPLICATION_DETAILS_PANEL:e=import("./js-core.esm44.js").then(e=>e.ApplicationDetailsPanel);break;case AvailableComponents.PROCESSING_CENTER_SOURCES:e=import("./js-core.esm50.js").then(e=>e.ProcessingCenterSources);break;case AvailableComponents.PROCESSING_CENTER_ERROR_DETAIL:e=import("./js-core.esm50.js").then(e=>e.ErrorDetailPanel);break;case AvailableComponents.USER_APPLICATION_SETTINGS_PANEL:e=Promise.resolve().then(function(){return index_esm$6}).then(e=>e.UserApplicationSettingsPanel);break;case AvailableComponents.ADD_APPLICATION_USERS_PANEL:e=import("./js-core.esm44.js").then(e=>e.AddUsersPanel);break;case AvailableComponents.PROCESSING_CENTER:e=import("./js-core.esm53.js").then(e=>e.ProcessingCenterBrowse);break;case AvailableComponents.JOBS_TABLE_SETTINGS_PANEL:e=import("./js-core.esm54.js").then(e=>e.JobsTableSettingsPanel);break;case AvailableComponents.VERSION_PANEL:e=Promise.resolve().then(function(){return index_esm$2}).then(e=>e.VersionPanel);break;case AvailableComponents.CHANGELOG_PANEL:e=Promise.resolve().then(function(){return index_esm$2}).then(e=>e.ChangelogPanel);break;case AvailableComponents.PROCESSING_CENTER_DAG_BUILDER:e=import("./js-core.esm56.js").then(e=>e.DagBuilder);break;case AvailableComponents.PROCESSING_CENTER_INGESTION:e=import("./js-core.esm57.js").then(function(e){return e.at}).then(e=>e.ProcessingCenterIngestion);break;case AvailableComponents.PROCESSING_CENTER_ADVANCED_SETTINGS:e=import("./js-core.esm57.js").then(function(e){return e.at}).then(e=>e.ProcessingCenterAdvancedSettings);break;case AvailableComponents.PROCESSING_CENTER_AFFILIATE_PANEL:e=import("./js-core.esm57.js").then(function(e){return e.at}).then(e=>e.ProcessingCenterAffiliatePanel);break;case AvailableComponents.JOBS_DETAILS_PANEL:e=import("./js-core.esm54.js").then(e=>e.JobsDetailsPanel);break;case AvailableComponents.TASKS_TABLE_SETTINGS_PANEL:e=import("./js-core.esm55.js").then(e=>e.TasksTableSettingsPanel);break;case AvailableComponents.TASK_DETAILS_PANEL:e=import("./js-core.esm55.js").then(e=>e.TaskDetailsPanel);break;case AvailableComponents.RESOURCE_CENTER:e=import("./js-core.esm59.js").then(e=>e.ResourceCenterBrowse);break;case AvailableComponents.PACKAGE_DETAILS_PANEL:e=import("./js-core.esm63.js").then(e=>e.PackageDetails);break;case AvailableComponents.PACKAGE_MANAGER_PANEL:e=import("./js-core.esm64.js").then(function(e){return e.J}).then(e=>e.PackageManager);break;case AvailableComponents.INSTANCE_ADMIN_CENTER_BROWSE:e=import("./js-core.esm65.js").then(e=>e.InstanceAdminCenterBrowse);break;case AvailableComponents.MANAGE_GRANTS:e=import("./js-core.esm63.js").then(e=>e.ManageGrantsPanel);break;case AvailableComponents.SCHEMA_DETAILS_PANEL:e=import("./js-core.esm66.js").then(e=>e.SchemaDetailsPanel);break;case AvailableComponents.FLOW_TEMPLATE_DETAILS_PANEL:e=import("./js-core.esm66.js").then(e=>e.TemplateDetailsPanel);break;case AvailableComponents.USER_DETAILS_PANEL:e=import("./js-core.esm45.js").then(e=>e.UserDetailsPanel);break;case AvailableComponents.CREATE_OR_UPDATE_TOKEN_PANEL:e=import("./js-core.esm46.js").then(e=>e.CreateOrUpdateApiTokenPanel);break;case AvailableComponents.FLOW_DETAILS_PANEL:e=import("./js-core.esm13.js").then(function(e){return e.i}).then(e=>e.App);break;case AvailableComponents.NODE_DETAILS_PANEL:e=import("./js-core.esm66.js").then(e=>e.NodeDetailsPanel);break;case AvailableComponents.PALETTE_DETAILS_PANEL:e=import("./js-core.esm66.js").then(e=>e.PaletteDetailsPanel)}return yield registry[t]=e}),registerComponent=(e,t)=>{registry[e]=t},WIDGETS_FEATURE_KEY="widgets",initialState$2=(!function(e){e.idle="idle",e.mounting="mounting",e.unmounting="unmounting",e.error="error",e.eventing="eventing"}(WidgetsStatus=WidgetsStatus||{}),{value:[],status:WidgetsStatus.idle}),widgetsSelector=e=>e[name].value,callWidgetOnComplete=(e,t)=>{e=e.find(e=>e.widgetName===t);null!=e&&e.onComplete&&e.onComplete()},{name,reducer,actions:{mountWidget:mountWidget$1,mountWidgetSuccess,mountWidgetError,unmountWidget:unmountWidget$1,unmountWidgetSuccess,unmountWidgetFailure,triggerWidgetCallback,triggerWidgetCallbackSuccess}}=createSlice({name:WIDGETS_FEATURE_KEY,initialState:initialState$2,reducers:{mountWidget:(e,t)=>{e.value.push(t.payload),e.status=WidgetsStatus.mounting},mountWidgetSuccess:e=>{e.status=WidgetsStatus.idle},mountWidgetError:e=>{e.status=WidgetsStatus.error},triggerWidgetCallback:(e,t)=>{e.status=WidgetsStatus.eventing},triggerWidgetCallbackSuccess:e=>{e.status=WidgetsStatus.idle},unmountWidget:(e,t)=>{e.status=WidgetsStatus.unmounting},unmountWidgetSuccess:(e,t)=>{e.value=e.value.filter(e=>e.widgetId!==t.payload),e.status=WidgetsStatus.idle},unmountWidgetFailure:e=>{e.status=WidgetsStatus.error}}});function*mountWidgetListenerSaga(){let a;const s={};yield takeEvery$1(mountWidget$1({}).type,function*(e){try{var{widgetConfig:t={},widgetName:n,elementId:r}=null==e?void 0:e.payload,i=(yield call$j(registryLookup,n))||(()=>jsxRuntime.exports.jsx("div",{children:"Component Not Found."})),o=getElement(r,n);o.classList.add("aiware-el"),s[r]?a=s[r]:(a=client$1.createRoot(o),s[r]=a),a.render(jsxRuntime.exports.jsx(AIWareCacheProvider,{children:jsxRuntime.exports.jsx(AIWareThemeProvider$1,{children:jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$5},{children:jsxRuntime.exports.jsx(i,Object.assign({},t))}))})})),yield put(mountWidgetSuccess())}catch(e){yield put(mountWidgetError())}}),yield takeEvery$1(e=>/\/booted$/.test(e.type),function*(e){var[e]=e.type.split("/");yield put(triggerWidgetCallback(e))}),yield takeEvery$1(unmountWidget$1("").type,function*(t){try{const e=yield select(e=>{return(null==(e=widgetsSelector(e).find(e=>e.widgetId===t.payload))?void 0:e.elementId)||""});setTimeout(()=>{s[e]&&s[e].unmount(),delete s[e]}),yield put(unmountWidgetSuccess(t.payload))}catch(e){yield put(unmountWidgetFailure())}}),yield takeEvery$1(triggerWidgetCallback("").type,function*(e){var t=yield select(widgetsSelector);callWidgetOnComplete(t,e.payload),yield put(triggerWidgetCallbackSuccess())})}function getWidgetsModule(){return{id:name,reducerMap:{[name]:reducer},sagas:[mountWidgetListenerSaga],initialActions:[]}}function getDataModule(){return{id:"data",reducerMap:{data:(e,{type:t,payload:n})=>{return t===setData({}).type?[...e.filter(e=>e.id!==n.id),n]:e||[]}},sagas:[],initialActions:[]}}const useStyles$2=makeStyles()(e=>({sdkSnackbarContainer:{"& svg":{fill:"white"}}}));function CustomSnackbar(){const n=useDispatch(),[e,t]=react$1.exports.useState([]),[r,i]=react$1.exports.useState(!1),[o,a]=react$1.exports.useState(void 0),{message:s,duration:l}=useSelector(snackbarSelector);var c=useStyles$2()["classes"],u=(react$1.exports.useEffect(()=>{null!==s&&void 0!==s&&s.content&&t(e=>[...e,s])},[s]),react$1.exports.useEffect(()=>{e.length&&!o?(a(Object.assign({},e[0])),t(e=>e.slice(1)),i(!0)):e.length&&o&&r&&(n(clearMessage()),i(!1))},[e,o,r,n]),(e,t)=>{"clickaway"!==t&&(i(!1),n(clearMessage()))});return jsxRuntime.exports.jsx(Snackbar$1,Object.assign({anchorOrigin:{vertical:"bottom",horizontal:"right"},open:r,autoHideDuration:l||3e3,onClose:u,TransitionProps:{onExited:()=>{a(void 0),n(clearMessage())}},className:c.sdkSnackbarContainer,"data-snackbarid":(null===o||void 0===o?void 0:o.key)||"na","data-testid":"snackbar.message."+((null===o||void 0===o?void 0:o.severity)||"na")},{children:jsxRuntime.exports.jsx(Alert$1,Object.assign({onClose:u,severity:null===o||void 0===o?void 0:o.severity,elevation:6,variant:"filled"},{children:null===o||void 0===o?void 0:o.content}))}),o?o.key:void 0)}function validateConfig(e){return e.applicationId||console.info("@aiware/js: applicationId is required. Go to developer app to find your application id."),e.baseUrl||console.info("@aiware/js: baseUrl is required. It defaults to the US Commercial environment which is https://api.us-1.veritone.com/v3/graphql"),e.knowledgeBaseURL?(console.info("@aiware/js: knowledgeBaseURL is deprecated and scheduled to be removed in v3. Please use knowledgeBaseUrl instead."),Object.assign(Object.assign({},e),{knowledgeBaseUrl:e.knowledgeBaseURL})):e}const ID="openSupportChatButton",DATA_ATTR="open-support-chat-button";var SupportCenterPixel=()=>jsxRuntime.exports.jsx(Portal$1,{children:jsxRuntime.exports.jsx("div",{id:ID,"data-veritone-element":DATA_ATTR,style:{width:1,height:1,position:"fixed",right:55,bottom:20}})});const nameSpace="@helpPanel",updateSelectedTab=createAction(nameSpace+"/UPDATE_SELECTED_TAB",function(e,t){return{payload:{selectedTabId:e,tabLink:t}}}),setCustomKnowledgeBaseUrl=createAction(nameSpace+"/SET_CUSTOM_KNOWLEDGE_BASE_URL",function(e){return{payload:{url:e}}}),setCustomDocsUrl=createAction(nameSpace+"/SET_CUSTOM_DOCS_URL",function(e){return{payload:{url:e}}}),initialState$1={selectedTabId:0,tabLink:"https://support.veritone.com/",customKnowledgeBaseUrl:"",customDocsUrl:""},getTabLinkReducer=createReducer(initialState$1,e=>{e.addCase(updateSelectedTab,(e,t)=>Object.assign(Object.assign({},e),{tabLink:t.payload.tabLink,selectedTabId:t.payload.selectedTabId})),e.addCase(setCustomKnowledgeBaseUrl,(e,t)=>Object.assign(Object.assign({},e),{customKnowledgeBaseUrl:t.payload.url})),e.addCase(setCustomDocsUrl,(e,t)=>Object.assign(Object.assign({},e),{customDocsUrl:t.payload.url}))});function*helpSaga(){yield takeEvery$1("OPEN_HELP_LINK",function*(){var e=yield select(e=>e.helpPanel.tabLink);yield put(openLinkOnNewTab({url:e}))})}const namespace$1="helpPanel",helpCenterSelectedTabIdSelector=e=>null!=e&&e[namespace$1]?e[namespace$1].selectedTabId:0,customDocsUrlSelector=e=>null!=e&&e[namespace$1]?e[namespace$1].customDocsUrl:"",customKnowledgeBaseUrlSelector=e=>null!=e&&e[namespace$1]?e[namespace$1].customKnowledgeBaseUrl:"";function getHelpPanelModule(){return{id:"help",reducerMap:{[namespace$1]:getTabLinkReducer},sagas:[helpSaga],initialActions:[]}}var knowledgeBaseUrl$1="https://docs.veritone.com/help/index.html",documentUrl$1="https://docs.veritone.com",config={knowledgeBaseUrl:knowledgeBaseUrl$1,documentUrl:documentUrl$1};const useStyles$1=makeStyles()(e=>({root:{height:"calc(100% - 110px)",textAlign:"left","& .Sdk-MuiTab-root.Mui-selected":{color:e.palette.text.primary,fontWeight:600}},tabs:{padding:e.spacing(2.4,6,0,6)},tabPanels:{width:"100%",height:"100%"},aiWareIcon:{position:"relative",maxHeight:50,opacity:"inherit",padding:e.spacing(4,3.2,0,3.2),display:"flex",justifyContent:"flex-end"},customTabs:{margin:e.spacing(0,4)},kbRoot:{height:"100%",textAlign:"left"},loadingContainer:{position:"absolute",height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"white"},kbToolBarBox:{padding:e.spacing(6,6,1.6,6)},kbTabContent:{height:"calc(100% - 92px)"},kbTabPanel:{padding:e.spacing(6)},dRoot:{height:"100%",width:"100%"},dNavBar:{height:"100%",overflow:"hidden",background:"#F4F4F4"},dTitle:{color:"#2A323C",fontWeight:600,fontSize:"18px",lineHeight:"24px",padding:e.spacing(3.2)},dContent:{height:"100%",width:"100%",position:"relative"},dMenu:{overflowY:"auto",height:"calc(100% - 52px)"},drawerContainer:{display:"flex",height:"100%",background:e.palette.background.default},tabContainer:{borderRight:"0.5px solid #D5DFE9",overflow:"hidden",height:"100%",width:"100%"},tabName:{borderBottom:"0.5px solid #D5DFE9",display:"flex",justifyContent:"space-between",alignItems:"center",height:"64px",padding:e.spacing(0,6)},actionIcons:{margin:e.spacing(-2.4)},tabContent:{height:"calc(100vh - 57px - 60px)",overflowY:"auto",overflowX:"hidden"}})),documentUrl=config.documentUrl,Documentation=({path:e=documentUrl})=>{var t=useStyles$1()["classes"];const[n,r]=react$1.exports.useState(!0);return jsxRuntime.exports.jsxs("div",Object.assign({className:classNames(t.dRoot,"hide-in-percy")},{children:[n&&jsxRuntime.exports.jsx("div",Object.assign({className:t.loadingContainer},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})),jsxRuntime.exports.jsx("iframe",{"data-cy":"docs-iframe",title:"Document Iframe",style:{width:"100%",height:"100%"},src:e,frameBorder:"0",onLoad:function(){setTimeout(()=>{r(!1)},1e3)}})]}))},knowledgeBaseUrl=config["knowledgeBaseUrl"];function Knowledgebase({path:e=knowledgeBaseUrl}){var t=useStyles$1()["classes"];const[n,r]=react$1.exports.useState(!0);return jsxRuntime.exports.jsxs("div",Object.assign({className:t.kbRoot},{children:[n&&jsxRuntime.exports.jsx("div",Object.assign({className:t.loadingContainer},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})),jsxRuntime.exports.jsx("iframe",{"data-cy":"knowledgebase-iframe",title:"Knowledgebase Iframe",style:{width:"100%",height:"100%"},src:e,frameBorder:"0",onLoad:function(){r(!1)}})]}))}const defaultLocale="en-us",tabsList=[{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-help-panel.au1+VZ",defaultMessage:"Knowledgebase",description:"Help Panel: Knowledgebase tab label"}),disabled:!1,url:"https://support.veritone.com/"},{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-help-panel.8bnkm8",defaultMessage:"Documentation",description:"Help Panel: Documentation tab label"}),disabled:!1,url:"https://docs.veritone.com/#/aiware/"}];function HelpCenter(){var e=useSelector(initialConfigSelector),t=useSelector(customKnowledgeBaseUrlSelector),n=useSelector(customDocsUrlSelector),r=useSelector(helpCenterSelectedTabIdSelector),i=useSelector(e=>null==e?void 0:e.panels),o=useStyles$1()["classes"],[a]=react$1.exports.useState(defaultLocale);const s=useDispatch();i=null==i?void 0:i.find(e=>"CUSTOM_HELP_PANEL_ID"===e.panelId),t=i&&t?t:e.knowledgeBaseUrl,i=i&&n?n:e.docsURL;return jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getHelpPanelModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,Object.assign({locale:a},{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.drawerContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({id:"setting-content",className:o.tabContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.tabContent},{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.root},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:o.tabPanels},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:o.customTabs},{children:jsxRuntime.exports.jsx(CustomTabs,{selectedId:r,onChangeTab:e=>{s(updateSelectedTab(e,tabsList[e].url))},tabsList:tabsList})})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:o.tabPanels},{children:[jsxRuntime.exports.jsx(TabPanel,Object.assign({value:r,index:0},{children:jsxRuntime.exports.jsx(Knowledgebase,{path:t})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:r,index:1},{children:jsxRuntime.exports.jsx(Documentation,{path:i})}))]})),jsxRuntime.exports.jsx("div",Object.assign({className:o.aiWareIcon},{children:jsxRuntime.exports.jsx("img",{src:img$D,alt:"icon",draggable:"false"})}))]}))}))}))}))}))}))}))}var EPermissionAction,EAuthResourceType,EAuthSubResourceType,index_esm=Object.freeze({__proto__:null,HelpCenterPanel:HelpCenter,customDocsUrlSelector:customDocsUrlSelector,customKnowledgeBaseUrlSelector:customKnowledgeBaseUrlSelector,helpCenterSelectedTabIdSelector:helpCenterSelectedTabIdSelector,setCustomDocsUrl:setCustomDocsUrl,setCustomKnowledgeBaseUrl:setCustomKnowledgeBaseUrl,updateSelectedTab:updateSelectedTab});const useStyles=makeStyles()(()=>({dialog:{top:"125px",overflowX:"hidden",overflowY:"hidden",display:"flex",alignItems:"center",flexDirection:"column"},container:{borderRadius:"4px",backgroundColor:"#fff",width:"430px",overflow:"hidden",outline:0,boxShadow:"0px 0px 7px rgba(0, 0, 0, .25)"},header:{textTransform:"capitalize"},appListContainer:{width:"100%"},orgName:{fontWeight:"bold"}})),ApplicationDialog=()=>{const[e,t]=react$1.exports.useState(null),[n,r]=react$1.exports.useState(0);var i=useSelector(userSelector$2),o=useStyles()["classes"];const a=useSelector(initialConfigSelector),s=a.applicationId,l=useSelector(applicationSelector),c=useSelector(switchApiSelector);var u=(null===l||void 0===l?void 0:l.application)||[],d=null===l||void 0===l?void 0:l.status;var p=[...u].sort(function(e,t){return e.name>t.name?1:e.name<t.name?-1:0}),f=u.findIndex(e=>e.id===s);useInterval(()=>{t(e=>e&&e-1)},e&&n<3?1e3:null),react$1.exports.useEffect(()=>{"success"!==(null===l||void 0===l?void 0:l.status)||1!==(null===l||void 0===l?void 0:l.application.length)||(null===l||void 0===l?void 0:l.application[0].id)===a.applicationId||e||(0===e?window.open(c+"/"+(null===l||void 0===l?void 0:l.application[0].id),"_self"):t(10))},[a,l,c,e]);return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(s)&&f<0&&"success"===d?jsxRuntime.exports.jsx(Modal$1,Object.assign({className:o.dialog,open:!0},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:o.container},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"application-dialog-title",className:o.header,variant:"h1",sx:{px:"30px",pt:"30px"}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-title",defaultMessage:"Application Not Available",description:"Title for modal"})})),jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"10px"}},{children:[jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message1",defaultMessage:"Looks like you switched organizations, your current application is not available in the current",description:"Description current application not available"})," ",jsxRuntime.exports.jsx("span",Object.assign({className:o.orgName},{children:null!=(f=null==i?void 0:i.organization)&&f.organizationName?i.organization.organizationName:""}))," ",jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message2",defaultMessage:"organization you are viewing.",description:"Description current application not available"})]})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"20px"}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message3",defaultMessage:"Please select from the available applications below to be redirected.",description:"Instructions for current application not available"})})),e&&jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"20px"},onClick:()=>{r(e=>e+1)}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-countdown-message",defaultMessage:"You will be automatically forwarded to {appName} in {timeRemaining} seconds.",description:"Instructions for current application not available",values:{timeRemaining:e,appName:u[0].name}})})),jsxRuntime.exports.jsx("div",Object.assign({className:o.appListContainer},{children:jsxRuntime.exports.jsx(AppList,{title:"",selectedAppId:null,onSelectApplication:e=>{window.open(c+"/"+e,"_self")},applications:p,useGrid:!1,row:3})}))]}))})):null};class RateLimiter{constructor(){this.lastCall=null}checkIfCanCall(e=1){return e<1&&(e=1),(!this.lastCall||(new Date).getTime()-this.lastCall>=6e4*e)&&(this.lastCall=(new Date).getTime(),!0)}}!function(e){e.Create="create",e.Read="read",e.Update="update",e.Delete="delete",e.File="file",e.CustomerService="customerService",e.Access="access"}(EPermissionAction=EPermissionAction||{}),function(e){e.Folder="Folder",e.TDO="TDO",e.Organization="Organization",e.Source="Sources",e.Schedule="Schedules",e.Job="Job"}(EAuthResourceType=EAuthResourceType||{}),function(e){e.Group="group",e.Media="media",e.Package="package",e.User="user",e.Workflow="workflow",e.ProcessingCenter="processingCenter",e.ResourceCenter="resourceCenter"}(EAuthSubResourceType=EAuthSubResourceType||{});const orgRightsByObjectPermission={[EAuthResourceType.TDO]:{create:["cms.media.create","recording.create"],read:["cms.media.read","recording.read"],update:["cms.media.update","recording.update"],delete:["cms.media.delete","recording.delete"]},[EAuthResourceType.Folder]:{create:["cms.media.create","recording.create"],read:["cms.media.read","recording.read"],update:["cms.media.update","recording.update"],delete:["cms.media.delete","recording.delete"],file:["cms.media.create","recording.create"]},[EAuthResourceType.Source]:{create:["cms.media.create","recording.create"],read:["cms.media.read","recording.read"],update:["cms.media.update","recording.update","source.update"],delete:["cms.media.delete","recording.delete"]},[EAuthResourceType.Job]:{customerService:["cms.customerservice"],create:["job.create"],read:["job.read"],update:["job.update"],delete:["job.delete"]},[EAuthResourceType.Schedule]:{customerService:["cms.customerservice"],create:["job.create"],read:["job.read"],update:["job.update"],delete:["job.delete"]},[EAuthSubResourceType.User]:{create:["admin.user.create"],delete:["admin.user.delete"]},[EAuthSubResourceType.Group]:{create:["admin.group.create"],delete:["admin.group.delete"]},[EAuthSubResourceType.Package]:{update:["developer.build.update"]}},permissionActionsToFetchByObjectType={[EAuthResourceType.TDO]:{create:"AIWARE_TDO_CREATE",read:"AIWARE_TDO_READ",update:"AIWARE_TDO_UPDATE",delete:"AIWARE_TDO_DELETE"},[EAuthResourceType.Folder]:{create:"AIWARE_FOLDER_CREATE",read:"AIWARE_FOLDER_READ",update:"AIWARE_FOLDER_UPDATE",delete:"AIWARE_FOLDER_DELETE",file:"AIWARE_FOLDER_FILE"},[EAuthResourceType.Source]:{create:"AIWARE_SOURCES_CREATE",read:"AIWARE_SOURCES_READ",update:"AIWARE_SOURCES_UPDATE",delete:"AIWARE_SOURCES_DELETE"},[EAuthResourceType.Job]:{customerService:"CMS_CUSTOMERSERVICE",create:"AIWARE_JOB_CREATE",read:"AIWARE_JOB_READ",update:"AIWARE_JOB_UPDATE",delete:"AIWARE_JOB_DELETE"},[EAuthResourceType.Schedule]:{customerService:"CMS_CUSTOMERSERVICE",create:"AIWARE_JOB_CREATE",read:"AIWARE_JOB_READ",update:"AIWARE_JOB_UPDATE",delete:"AIWARE_JOB_DELETE"},[EAuthResourceType.Organization]:{[EAuthSubResourceType.Group]:{create:"AIWARE_GROUP_CREATE",delete:"AIWARE_GROUP_DELETE"},[EAuthSubResourceType.Package]:{create:"AIWARE_PACKAGE_CREATE",read:"AIWARE_PACKAGE_READ",update:"AIWARE_PACKAGE_UPDATE",delete:"AIWARE_PACKAGE_DELETE"},[EAuthSubResourceType.User]:{create:"AIWARE_USER_CREATE",delete:"AIWARE_USER_DELETE"},[EAuthSubResourceType.ResourceCenter]:{access:"AIWARE_RESOURCE_CENTER_ACCESS"}}},permissionTypeToFetchByEntityType={[EAuthResourceType.TDO]:[EAuthResourceType.TDO],[EAuthResourceType.Folder]:[EAuthResourceType.Folder],[EAuthResourceType.Source]:[EAuthResourceType.Source],[EAuthResourceType.Job]:[EAuthResourceType.Job],[EAuthResourceType.Schedule]:[EAuthResourceType.Schedule],[EAuthResourceType.Organization]:[EAuthResourceType.Organization,EAuthResourceType.TDO,EAuthResourceType.Folder,EAuthResourceType.Source,EAuthResourceType.Schedule,EAuthResourceType.Job]},authResourcesByEntityType={[EntityType.Folders]:EAuthResourceType.Folder,[EntityType.Tdos]:EAuthResourceType.TDO,[EntityType.Sources]:[EAuthResourceType.Source],[EntityType.Schedules]:[EAuthResourceType.Schedule]},convertEntityToAuthResource=e=>authResourcesByEntityType[e],convertPermissionsToRights=(e,t,n)=>{const r=(null==(e=orgRightsByObjectPermission[e])?void 0:e[t])||[];return 0<n.filter(e=>r&&r.includes(e)).length},permissionDetailIsActionPair=e=>Object.keys(e).some(e=>Object.values(EPermissionAction).includes(e)),getQueryActions=(e,t,n)=>({targetObjectType:e,targetActions:Object.keys(t).map(e=>({targetAction:e,serverName:t[e],resource:n}))}),getPermissionActions=(t,n)=>{return permissionDetailIsActionPair(t)?[getQueryActions(n,t)]:Object.keys(t).map(e=>getQueryActions(n,t[e]||{},e))},getPermissionTypesToQuery=e=>{return(permissionTypeToFetchByEntityType[e]||[]).flatMap(e=>getPermissionActions(permissionActionsToFetchByObjectType[e]||{},e))},isPermissionLoading=e=>!e||"pending"===e.status||"idle"===e.status,hasPermission=(e,t)=>!!e&&("failure"===e.status||e&&"success"===e.status&&e.permissions&&e.permissions[t]),namespace="permissions",initialState={permissionsByObject:{},rights:{status:"idle"}},slice=createSlice({name:namespace,initialState:initialState,reducers:{fetchObjectPermissionsStart(e,t){var{entityType:t,entityId:n}=t.payload;Object.prototype.hasOwnProperty.call(e.permissionsByObject,t)||(e.permissionsByObject[t]={}),Object.prototype.hasOwnProperty.call(e.permissionsByObject[t],n)||(e.permissionsByObject[t][n]={}),Object.prototype.hasOwnProperty.call(e.permissionsByObject[t][n],t)||(e.permissionsByObject[t][n][t]={status:"idle"})},fetchObjectPermissionsStarted(e,t){var{entityId:t,entityType:n}=t.payload;e.permissionsByObject[n][t][n].status="pending"},fetchObjectPermissionsSucceeded(t,e){const{entityType:n,entityId:r,permissions:i}=e.payload;Object.keys(i).forEach(e=>{t.permissionsByObject[n][r][e]={status:"success",permissions:i[e]}})},fetchObjectPermissionsFailed(e,t){var{entityType:t,entityId:n}=t.payload;e.permissionsByObject[t][n][t]={status:"failure"}},fetchMyRightsStarted(e){e.rights.status="pending"},fetchMyRightsSucceeded(e,t){e.rights.status="success",e.rights.myRights=t.payload},fetchMyRightsFailed(e){e.rights.status="failure"}}}),actions=slice.actions;var permissionsReducer=slice.reducer;function __awaiter(e,a,s,l){return new(s=s||Promise)(function(n,t){function r(e){try{o(l.next(e))}catch(e){t(e)}}function i(e){try{o(l.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,i)}o((l=l.apply(e,a||[])).next())})}function getObjectPermissions(u,d,p){var f;return __awaiter(this,void 0,void 0,function*(){var{entityType:e,entityId:t}=p,n="getPermissions",r=getPermissionTypesToQuery(e);let i=!1,o=[],a={};for(;!i;){var s=`
1523
+ `),useStyles$2$1=makeStyles()(()=>({fullScreen:{position:"fixed",width:"100%",height:"100vh",top:"0",left:"0",backgroundColor:"#ffffff",display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",textAlign:"center",fontSize:"14px",zIndex:99999,animation:fadeInOut+" 5s linear forwards"},loaderBox:{height:"200px",width:"200px"},veritoneDarkLogo:{height:"200px",width:"200px"}})),useStyles$1$1=makeStyles()(e=>({flexContainer:{display:"flex",alignItems:"center"},header:{alignItems:"center",display:"flex",justifyContent:"space-between",height:"55px",padding:e.spacing(6,0,6,6),borderBottom:"1px solid rgb(219, 226, 234)"},headerActionContainer:{alignItems:"center",display:"flex",flexGrow:1,height:"100%",justifyContent:"flex-end",paddingRight:"10px"},title:{color:"#2A323C"},panelRoot:{padding:"15px",height:"calc(100% - 70px);",overflowY:"scroll"},row:{display:"flex","& svg":{marginRight:"12px",marginBottom:"24px"}},widgets:{"& svg":{fill:"#555F7C"}},veriLogo:{transform:"translate(3px, 2px)"},versionText:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",marginBottom:"5px"},wrapperBox:{padding:"15px 0 15px 0px",marginBottom:"14px"},aiwareLogo:{marginBottom:"10px",marginTop:"10px",width:"151px"},boldTitle:{fontWeight:700},labelGrid:{padding:"2px",flexShrink:1},valueGrid:{padding:"2px",flexGrow:1},gridBox:{background:"#F7F7F7",height:"100%",padding:"10px",color:"#2A323C"},valueBox:{background:"#F7F7F7",height:"100%",padding:"10px",color:"#2A323C",textTransform:"capitalize"},imageContainer:{textAlign:"center"},falconLogo:{width:"148px"},osInfo:{display:"flex",justifyContent:"center","& *":{textAlign:"center"}},osName:{margin:"2px 0 6px","& p":{display:"inline-block",minWidth:"80px",padding:"5px 8px",background:"#465364",color:"white",textTransform:"uppercase",fontSize:"12px",fontWeight:"700",borderRadius:"4px"}},osVersion:{color:"#5C6269"}})),versionPanelLabels=e=>({closePanelTooltip:e.formatMessage({id:"version-panel.header.close-btn-tooltip",defaultMessage:[{type:0,value:"Close panel"}]}),versionInformationLabel:e.formatMessage({id:"version-panel.version-information-title",defaultMessage:[{type:0,value:"Version Information"}]}),versionLabel:e.formatMessage({id:"version-panel.version-title",defaultMessage:[{type:0,value:"Version"}]}),sdkVersionLabel:e.formatMessage({id:"version-panel.sdk-version-title",defaultMessage:[{type:0,value:"Sdk Version"}]}),viewReleaseNotes:e.formatMessage({id:"version-panel.view-release-notes",defaultMessage:[{type:0,value:"View Release Notes"}]}),noVersionInfo:e.formatMessage({id:"version-panel.no-info-label",defaultMessage:[{type:0,value:"Cannot get version information"}]}),clusterSizeLabel:e.formatMessage({id:"version-panel.cluster-size-label",defaultMessage:[{type:0,value:"Size"}]}),environmentLabel:e.formatMessage({id:"version-panel.environment-label",defaultMessage:[{type:0,value:"Environment"}]}),hostingTypeLabel:e.formatMessage({id:"version-panel.hosting-type-label",defaultMessage:[{type:0,value:"Hosting Type"}]}),infrastructureLabel:e.formatMessage({id:"version-panel.infrastructure-label",defaultMessage:[{type:0,value:"Infrastructure"}]})}),Header$1=()=>{const e=useDispatch();var t=useStyles$1$1()["classes"],n=useIntl(),{versionInformationLabel:n,closePanelTooltip:r}=versionPanelLabels(n);return jsxRuntime.exports.jsxs("header",Object.assign({className:t.header,"data-testid":"create-or-update-token-panel.header"},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1","data-testid":"version-panel-header-title",className:t.title},{children:n})),jsxRuntime.exports.jsx("div",Object.assign({className:t.headerActionContainer},{children:jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:r},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({onClick:()=>e(hidePanel$1(VERSION_PANEL)),"aria-labelledby":"version-panel.close-button","data-testid":"version-panel.close-button",size:"large"},{children:jsxRuntime.exports.jsx(Close$1,{})}))}))}))]}))},selectLoadingStatus=e=>{return null==(e=null==(e=null==e?void 0:e[PANEL_SLICE])?void 0:e[VERSION_PANEL_NAMESPACE])?void 0:e.status},selectCurrentVersion=e=>{return null==(e=null==(e=null==e?void 0:e[PANEL_SLICE])?void 0:e[VERSION_PANEL_NAMESPACE])?void 0:e.currentVersion},selectPreviousVersion=e=>{return null==(e=null==(e=null==e?void 0:e[PANEL_SLICE])?void 0:e[VERSION_PANEL_NAMESPACE])?void 0:e.previousVersion},selectPlatformProperties=e=>{return null==(e=null==(e=null==e?void 0:e[PANEL_SLICE])?void 0:e[VERSION_PANEL_NAMESPACE])?void 0:e.platformProperties},selectSelectedVersion=e=>{return null==(e=null==(e=null==e?void 0:e[PANEL_SLICE])?void 0:e[VERSION_PANEL_NAMESPACE])?void 0:e.selectedVersion},VERSION_PANEL="VERSION_PANEL",VersionChangelogNullState=({label:e})=>{var t=useStyles$1$1()["classes"];return jsxRuntime.exports.jsx(Box$1,Object.assign({className:t.gridBox,sx:{fontWeight:700,textAlign:"center",mb:"5px"},"data-test":"version-changelog-null-state"},{children:e}))},VersionPanelComponent=({sdk:e,edge:t,core:n})=>{const r=useStyles$1$1()["classes"];var i=useIntl();const o=useDispatch();var{versionLabel:i,viewReleaseNotes:a,noVersionInfo:s,clusterSizeLabel:l,environmentLabel:c,hostingTypeLabel:u,infrastructureLabel:d,sdkVersionLabel:p}=versionPanelLabels(i),f=useSelector(selectCurrentVersion),h=useSelector(selectPlatformProperties);const m=useSelector(selectLoadingStatus);var g={sdk:e,core:n,edge:null!=t&&t.includes("<Error>")?void 0:t},i=(react$1.exports.useEffect(()=>{["idle","failure"].includes(m)&&o(actions$1.fetchVersionInfoStart())},[o,m]),jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.osInfo},{children:jsxRuntime.exports.jsxs(Box$1,{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.osName},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",sx:{fontWeight:700}},{children:"Falcon"}))})),jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.osVersion},{children:jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"caption","data-testid":"version-panel-version-info"},{children:[(null==f?void 0:f.version)&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[i," ",null==f?void 0:f.version]}),!(null!=f&&f.version)&&(null===g?void 0:g.sdk)&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[p," ",null===g?void 0:g.sdk]})]}))}))]})})));const y={Size:l,Environment:c,HostingType:u,Infrastructure:d};p=!!(e||t||n||h||f)&&["success","failure"].includes(m);return jsxRuntime.exports.jsxs(Box$1,{children:[jsxRuntime.exports.jsx(Header$1,{}),jsxRuntime.exports.jsxs("div",Object.assign({className:r.panelRoot},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.wrapperBox},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({sx:{p:"20px"}},{children:[p&&jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.imageContainer},{children:jsxRuntime.exports.jsx("img",{src:img$2,className:r.falconLogo,alt:"system-logo"})})),jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.imageContainer},{children:jsxRuntime.exports.jsx("img",{src:img$3,className:r.aiwareLogo,alt:"aiware-logo"})})),p&&i]})),p?jsxRuntime.exports.jsx(Grid$1,Object.assign({container:!0,sx:{mt:"10px"}},{children:h&&Object.entries(h).map(([e,t])=>y[e]&&jsxRuntime.exports.jsxs(react$1.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:6,className:r.labelGrid},{children:jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.gridBox,sx:{fontWeight:700}},{children:[y[e],":"]}))})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0,xs:6,className:r.valueGrid},{children:jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.valueBox},{children:t}))}))]},e))})):jsxRuntime.exports.jsx(VersionChangelogNullState,{label:s})]})),jsxRuntime.exports.jsx(Button$1,Object.assign({sx:{width:"100%",cursor:"pointer"},variant:"outlined",onClick:()=>{o(mountPanel$1({panelId:"CHANGELOG_PANEL",microFrontend:{name:"CHANGELOG_PANEL",config:{}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"small",zIndex:1003,parentPanelId:VERSION_PANEL,dimmed:0,dimmedStatus:"dimParent",borderBottom:!0}}))},"data-test":"version-panel-release-notes-btn"},{children:a}))]}))]})},VersionPanel=e=>jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getPanelModule()]},{children:jsxRuntime.exports.jsx(VersionPanelComponent,Object.assign({},e))})),dateFormatter=e=>{e=new Date(e||"");return(8<e.getMonth()?e.getMonth()+1:"0"+(e.getMonth()+1))+"/"+(9<e.getDate()?e.getDate():"0"+e.getDate())+"/"+e.getFullYear()};let lottieScript,audio;const theme=createTheme({palette:{secondary:{main:"#1871E8"}}}),Logo_=()=>{const n=useDispatch();var e=useStyles$2$1()["classes"];const[r,i]=react$1.exports.useState(0),[t,o]=react$1.exports.useState(!1),[a,s]=react$1.exports.useState(!1),l=jsxRuntime.exports.jsx("p",Object.assign({style:{pointerEvents:"none"}},{children:"Loading Beta Features"})),[c,u]=react$1.exports.useState(l),d=useSelector(organizations_selector.selectOrgSwitchInitiated),p=useSelector(e=>{return null==(e=null==(e=null==e?void 0:e.configs)?void 0:e.initConfig)?void 0:e.betaFeatures}),[f,h]=react$1.exports.useState(!1),[m,g]=react$1.exports.useState(""),[y,v]=react$1.exports.useState(""),[x,b]=react$1.exports.useState(""),[$,C]=react$1.exports.useState(!1),S=useSelector(selectLoadingStatus);var w=useSelector(selectCurrentVersion);react$1.exports.useEffect(()=>{["idle","failure"].includes(S)&&n(actions$1.fetchVersionInfoStart())},[n,S]),react$1.exports.useEffect(()=>{f||(h(!0),(lottieScript=document.createElement("script")).setAttribute("src","https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.7.8/lottie.min.js"),lottieScript.onload=()=>s(!0),(audio=document.createElement("audio")).id="player",audio.src="https://static.veritone.com/aiware-js-animation/sound-effects/chime.wav",document.head.appendChild(lottieScript),document.body.appendChild(audio)),has_1(window,"aiware.version")&&((t=null==(t=window.aiware)?void 0:t.version)&&"undefined"!==t&&g(t),t=null==(t=window.aiware)?void 0:t.releaseDate,v(dateFormatter(t)));var t=document.getElementsByTagName("script");if(t.length){let e=Array.from(t).find(e=>e.src.includes("get.aiware.com"));(e=e||Array.from(t).find(e=>e.src.includes("https://cdn.jsdelivr.net/npm/aiware-js")))&&fetch(e.getAttribute("src")).then(e=>{g(e.url.split("@")[1].split("/")[0])})}fetch("https://get.aiware.com/aiware-versions/aiware-latest.txt",{headers:{"Content-Type":"text/plain"}}).then(e=>e.text()).then(e=>b(e))},[]),react$1.exports.useEffect(()=>{if(p&&!d)return;d&&u(jsxRuntime.exports.jsx("p",{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-organization-panel.organizations-switching-loader-message",defaultMessage:"Changing your Organization",description:"organizations switching loader message"})}));const e=10===r;if((e||d)&&(o(!0),a)){const t=window.bodymovin.loadAnimation({container:document.getElementById("loaderAnimation"),path:"https://static.veritone.com/aiware-js-animation/particle-explosion.json",renderer:"svg",loop:!1,autoplay:!0,name:"unicorn"});t.onComplete=()=>{e?(n(enableBetaFeatures()),i(0)):d&&u(l),o(!1),t.destroy()},null!==audio&&void 0!==audio&&audio.play()}},[r,p,n,t,d]);return jsxRuntime.exports.jsxs(react$1.exports.Fragment,{children:[t&&jsxRuntime.exports.jsxs("div",Object.assign({className:e.fullScreen},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:e.loaderBox,id:"loaderAnimation"},{children:!a&&jsxRuntime.exports.jsx("img",{src:img$7,alt:"veritone-logo",className:e.veritoneDarkLogo})})),jsxRuntime.exports.jsxs("div",Object.assign({className:e.loaderBox},{children:[jsxRuntime.exports.jsx(StyledEngineProvider,Object.assign({injectFirst:!0},{children:jsxRuntime.exports.jsx(ThemeProvider,Object.assign({theme:theme},{children:jsxRuntime.exports.jsx(LinearProgress$1,{color:"secondary"})}))})),c]}))]})),jsxRuntime.exports.jsxs("div",{children:[w?jsxRuntime.exports.jsxs(Typography$1,Object.assign({"data-test":"veritone-panel.logo.version",sx:{color:"#9CA8B4",fontSize:"10px",textAlign:"center",cursor:"pointer",width:"60px",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},onClick:()=>{var e,t;$?(C(!1),n(hidePanel$1(VERSION_PANEL))):(C(!0),e={name:VERSION_PANEL,config:{name:"Version Information",sdk:m,sdkRelease:y,edge:x}},t={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"small",zIndex:1001,dimmed:0,borderBottom:!0},n(mountPanel$1({panelId:VERSION_PANEL,microFrontend:e,panelConfig:t})))}},{children:["V. ",w.version]})):null,jsxRuntime.exports.jsx("img",{onClick:()=>i(r+1),src:img$D,alt:"footer-icon",draggable:"false"})]})]})},Logo=injectIntl(Logo_);function getTabAction(e,t,n,r="APP_BAR_PANEL"){return{type:mountPanel$1({}).type,payload:{panelId:e,microFrontend:{name:r,config:{name:"Veritone",tabId:e,dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE"}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,fullScreen:!1,width:n,header:{divider:!0,title:t}}}}}const tabsListDefault=[{id:TabId.PERSONAL_PANEL,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.personalProfile",defaultMessage:"Personal Profile",description:"Tooltip pops on the sidebar for personal profile"}),iconComponent:jsxRuntime.exports.jsx(PersonalProfile$1,{}),role:"",action:getTabAction(TabId.PERSONAL_PANEL,jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.panelTitle.personalProfile",defaultMessage:"Personal Profile",description:"Header title for personal profile"}),410)},{id:TabId.ORGANIZATION_PANEL,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.organizations",defaultMessage:"Organizations",description:"Tooltip pops on the sidebar for organizations"}),iconComponent:jsxRuntime.exports.jsx(Organizations,{}),role:"",action:{type:mountPanel$1({}).type,payload:{panelId:TabId.ORGANIZATION_PANEL,microFrontend:{name:"ORGANIZATION_PANEL"},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,width:560,zIndex:1e3}}}},{id:TabId.CMS_SHORTCUT,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.dataCenter",defaultMessage:"Data Center",description:"Tooltip pops on the sidebar for data center"}),iconComponent:jsxRuntime.exports.jsx(DataCenter,{}),role:"cms",action:{type:"panels/OPEN_APP_SHORTCUT",payload:"cms"}},{id:TabId.DATA_CENTER,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.dataCenter",defaultMessage:"Data Center",description:"Tooltip pops on the sidebar for data center"}),iconComponent:jsxRuntime.exports.jsx(DataCenter,{}),role:"cms",action:{type:mountPanel$1({}).type,payload:{panelId:TabId.DATA_CENTER,microFrontend:{name:"DATA_CENTER"},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"xlarge",zIndex:1e3}}}},{id:TabId.PROCESSING_CENTER,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.processingCenter",defaultMessage:"Processing Center",description:"Tooltip pops on the sidebar for processing center"}),iconComponent:jsxRuntime.exports.jsx(Process,{}),role:"cms",action:{type:mountPanel$1({}).type,payload:{panelId:TabId.PROCESSING_CENTER,microFrontend:{name:"PROCESSING_CENTER"},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"xxlarge",zIndex:1e3}}}},{id:TabId.FLOW_CENTER,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.flowCenter",defaultMessage:"Flow Center",description:"Tooltip pops on the sidebar for flow center"}),iconComponent:jsxRuntime.exports.jsx(FlowCenter2,{}),role:"automate",action:{type:mountPanel$1({}).type,payload:{panelId:TabId.FLOW_CENTER,microFrontend:{name:"FLOW_CENTER",config:{name:"Veritone",tabId:TabId.FLOW_CENTER,dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE",zIndex:1200}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"xxlarge"}}}},{id:TabId.ENGINE_CENTER,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.developerCenter",defaultMessage:"Developer Center",description:"Tooltip pops on the sidebar for developer center"}),iconComponent:jsxRuntime.exports.jsx(DeveloperCenter,{}),role:"cms",action:{type:"panels/OPEN_APP_SHORTCUT",payload:"developer"}},{id:TabId.MARKETPLACE_CENTER,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.marketplaceCenter",defaultMessage:"Marketplace",description:"Tooltip pops on the sidebar for marketplace center"}),iconComponent:jsxRuntime.exports.jsx(Marketplace$1,{}),role:"cms",action:{type:"panels/OPEN_APP_SHORTCUT",payload:"marketplace"}},{id:TabId.LIBRARY_CENTER,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.libraryCenter",defaultMessage:"Library Center",description:"Tooltip pops on the sidebar for library center"}),iconComponent:jsxRuntime.exports.jsx(LibraryCenter,{}),role:"",action:{type:"panels/OPEN_APP_SHORTCUT",payload:"libray"}},{id:TabId.ADMIN_SHORTCUT,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.adminCenter",defaultMessage:"Admin Center",description:"Tooltip pops on the sidebar for admin center"}),iconComponent:jsxRuntime.exports.jsx(AdminCenter,{}),role:"admin",action:{type:mountPanel$1({}).type,payload:{panelId:TabId.ADMIN_SHORTCUT,microFrontend:{name:"ADMIN_CENTER"},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"xlarge",zIndex:1e3}}}},{id:TabId.INSTANCE_ADMIN_CENTER_BROWSE,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.instanceAdminCenter",defaultMessage:"Instance Admin Center",description:"Tooltip pops on the sidebar for instance admin center"}),iconComponent:jsxRuntime.exports.jsx(AdminTabIcon,{}),role:"admin",action:{type:mountPanel$1({}).type,payload:{panelId:TabId.INSTANCE_ADMIN_CENTER_BROWSE,microFrontend:{name:"INSTANCE_ADMIN_CENTER_BROWSE"},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"xlarge",zIndex:1e3}}}},{id:TabId.RESOURCE_CENTER,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.resourceCenter",defaultMessage:"Resource Center",description:"Tooltip pops on the sidebar for resource center"}),iconComponent:jsxRuntime.exports.jsx(Resources$1,{}),role:"",action:{type:mountPanel$1({}).type,payload:{panelId:TabId.RESOURCE_CENTER,microFrontend:{name:"RESOURCE_CENTER"},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"xxlarge",zIndex:1e3}}}},{id:TabId.PROCESSING_CENTER_DAG_BUILDER,label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-panel.tabItems.dagBuilder",defaultMessage:"DAG Builder (Beta)",description:"Tooltip pops on the sidebar for dag builder"}),iconComponent:jsxRuntime.exports.jsx(DagBuilder,{}),role:"cms",action:{type:mountPanel$1({}).type,payload:{panelId:TabId.PROCESSING_CENTER_DAG_BUILDER,microFrontend:{name:"PROCESSING_CENTER_DAG_BUILDER"},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"xlarge",zIndex:1e3}}}}];function AppbarTabPanel({panelId:t,children:e,withTab:r=!0,withChild:n=!0}){const i=useDispatch(),[o,a]=react$1.exports.useState(),[s,l]=react$1.exports.useState([]),[c,u]=react$1.exports.useState(!1);var d=useSelector(e=>e.panels.find(e=>e.panelId===t))||{};const p=useSelector(e=>e.panels);const{microFrontend:f,panelConfig:h}=d,{minWidth:m,padding:g=0,header:y,footer:v,marginTop:x=0,marginStart:b=0,show:$,tabs:C=[],zIndex:S=1e3,userRoles:w=[],panelId:_,size:T,fullScreen:E,width:j,dimmed:R=0,parentPanelId:I,borderBottom:O}=h||{};const k=I?("ORGANIZATION_PANEL"!==I?"":"solid 5px #4D81B7")||("DATA_CENTER"!==I?"":"solid 5px #4D81B7"):"solid 5px #4D81B7",A=makeStyles()(e=>{return{container:{position:"fixed",top:x,right:E?0:b,height:`calc(100vh - ${x}px)`,minWidth:m,width:j||(E?"100%":getTabPanelWidthBySize(T)||560),borderBottom:O?"solid 5px #4D81B7":k,zIndex:E?1500:S,transitionTimingFunction:"ease-in-out !important"},padding:{padding:e.spacing(g),paddingTop:e.spacing(g/2)},margin:{margin:e.spacing()},headerContainer:{display:"flex",width:"100%",justifyContent:"space-between",alignItems:"center"},headerTitle:{margin:e.spacing(),marginTop:e.spacing(2)},actionButton:{margin:e.spacing()},footer:{},actionContainer:{"&:last-child":{marginRight:e.spacing(2)}},content:{overflow:"overlay",overflowX:"hidden",height:(t=y?64:0,n=v?64:0,`calc(100vh - ${x}px - ${t}px - ${n}px - 5px)`)},paperContainer:{top:56,backgroundColor:"unset !important",boxShadow:"none"},tabContainer:{overflow:"hidden",width:"100%"},tabSelect:{paddingTop:e.spacing(6),width:80,display:"flex",flexDirection:"column"},drawerContainer:{display:"flex",background:e.palette.background.default},tabName:{display:"flex",justifyContent:"space-between",alignItems:"center",height:"61px",padding:e.spacing(0,4,0,6)},actionIcons:{margin:e.spacing(-2.4)},title:{userSelect:"none",fontStyle:"normal",fontSize:"18px",lineHeight:e.spacing(5),letterSpacing:"0.25px",textTransform:"uppercase",color:e.palette.text.secondary},tabContent:{borderRight:r?"0.5px solid "+e.palette.divider:"none",overflowY:"auto",overflowX:"hidden",width:"100%"},buttonAction:{textTransform:"unset"},aiWareIcon:{padding:e.spacing(2.4,0),display:"flex",justifyContent:"center",position:"fixed",bottom:"0",right:"10px"},noShadow:{boxShadow:"none",borderLeft:"0.5px solid "+e.palette.divider},panelMask:{position:"absolute",zIndex:1150,width:"100%",height:"100%",backgroundColor:e.palette.grey[50],opacity:.5}};var t,n})()["classes"];react$1.exports.useEffect(()=>{0<C.length?l([...tabsListDefault,...C]):l(tabsListDefault)},[C]),react$1.exports.useEffect(()=>{var e;null!==f&&void 0!==f&&f.config&&null!=(e=f.config)&&e.tabId&&a(f.config.tabId)},[f]),react$1.exports.useEffect(()=>{0<p.length&&o&&r&&(p.find(e=>e.panelId===o)||a(void 0))},[p,o,r]);n=jsxRuntime.exports.jsxs(Paper$1,Object.assign({className:`${A.container} ${n?"":A.noShadow} `,elevation:3,id:t,square:!0,"data-test":"panel-"+(_||"unknown")},{children:[0<R&&jsxRuntime.exports.jsx("div",{className:A.panelMask}),jsxRuntime.exports.jsxs("div",Object.assign({className:A.drawerContainer},{children:[n&&jsxRuntime.exports.jsxs("div",Object.assign({className:A.tabContent},{children:[y&&jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:A.tabName},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1",className:A.title},{children:y.title||(null==(d=s.find(e=>e.id===o))?void 0:d.label)})),jsxRuntime.exports.jsxs("div",Object.assign({className:A.actionIcons},{children:[null==(n=y.actions)?void 0:n.map(e=>e.label?jsxRuntime.exports.jsx(Button$1,Object.assign({size:e.size,variant:e.variant,onClick:()=>i(e.action)},{children:e.label}),e.action.type):jsxRuntime.exports.jsxs(IconButton$1,Object.assign({onClick:()=>i(e.action),size:"large"},{children:[e.iconUrl&&jsxRuntime.exports.jsx("img",{src:e.iconUrl,alt:"icon",draggable:"false"}),e.icon&&jsxRuntime.exports.jsx("div",{children:e.icon})]}),e.action.type)),jsxRuntime.exports.jsx(IconButton$1,Object.assign({onClick:()=>i(hidePanel$1(t)),"data-test":"close-button-"+t,size:"large"},{children:jsxRuntime.exports.jsx("img",{src:I?img$W:img$X,alt:"icon",draggable:"false"})}))]}))]})),y.divider&&jsxRuntime.exports.jsx(Divider$1,{})]}),jsxRuntime.exports.jsx("div",Object.assign({className:A.content},{children:e?react$1.exports.cloneElement(e,Object.assign(Object.assign({},(null===f||void 0===f?void 0:f.config)||{}),{dataId:t,hidePanel:()=>i(hidePanel$1(t)),tabId:o,panelRendered:c})):jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx("h1",{children:"No micro frontend passed!"})})})),v&&jsxRuntime.exports.jsxs("div",Object.assign({className:A.footer},{children:[v.divider&&jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsx("div",Object.assign({className:A.headerContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({className:A.actionContainer},{children:null==(d=v.actions)?void 0:d.map(e=>{var t;if(e.iconUrl)return jsxRuntime.exports.jsxs(IconButton$1,Object.assign({className:A.actionButton,onClick:(t=e.action,()=>{i(t)}),size:"large"},{children:[e.iconUrl&&jsxRuntime.exports.jsx("img",{src:e.iconUrl,alt:"icon",draggable:"false"}),e.icon&&jsxRuntime.exports.jsx("div",{children:e.icon})]}),e.action.type);const n=e;return jsxRuntime.exports.jsx(Button$1,Object.assign({className:A.actionButton,size:n.size,variant:n.variant,onClick:()=>i(n.action)},{children:n.label}),e.action.type)})}))}))]}))]})),r&&jsxRuntime.exports.jsxs("div",Object.assign({id:"tabs-content",className:A.tabSelect},{children:[jsxRuntime.exports.jsx(Tabs,{selectedId:o,tabsList:s,onChangeTab:function(t){0<=p.map(e=>e.panelId).indexOf(VERSION_PANEL)&&i(hidePanel$1(VERSION_PANEL)),o&&i(hidePanel$1(o)),a(t);var e,n=s.find(e=>e.id===t);null!=(e=null==n?void 0:n.onClick)&&e.call(n,t),null!=n&&n.action&&i(n.action)},roles:w}),(null===v||void 0===v?void 0:v.logo)&&jsxRuntime.exports.jsx("div",Object.assign({className:A.aiWareIcon},{children:jsxRuntime.exports.jsx(Logo,{})}))]}))]}))]}));return jsxRuntime.exports.jsx(AIWareThemeProvider$1,{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getPanelModule()]},{children:jsxRuntime.exports.jsx(Slide$1,Object.assign({"data-id":"123456",in:$,direction:"left",onEntered:()=>u(!0),onExited:()=>i(unmountPanel$1(t))},{children:n}))}))})})}const AppbarPanel=e=>jsxRuntime.exports.jsx(AppbarTabPanel,Object.assign({},e,{withChild:!0,withTab:!1})),Tab=e=>jsxRuntime.exports.jsx(AppbarTabPanel,Object.assign({},e,{withChild:!1,withTab:!0})),changelogPanelLabels=e=>({changelog:e.formatMessage({id:"changelog-panel.header.title",defaultMessage:[{type:0,value:"Release Notes"}]}),closePanelTooltip:e.formatMessage({id:"changelog-panel.header.close-btn-tooltip",defaultMessage:[{type:0,value:"Close panel"}]}),versionLabel:e.formatMessage({id:"changelog-panel.version-title",defaultMessage:[{type:0,value:"Version"}]}),updateRequiredLabel:e.formatMessage({id:"changelog-panel.update-required",defaultMessage:[{type:0,value:"Update required"}]}),deploymentLabel:e.formatMessage({id:"changelog-panel.deployment",defaultMessage:[{type:0,value:"Deployment"}]}),apiUnavailable:e.formatMessage({id:"changelog-panel.no-api",defaultMessage:[{type:0,value:"Cannot retrieve platform information"}]}),current:e.formatMessage({id:"changelog-panel.current",defaultMessage:[{type:0,value:"Current"}]}),previous:e.formatMessage({id:"changelog-panel.previous",defaultMessage:[{type:0,value:"Previous"}]}),noHighlights:e.formatMessage({id:"changelog-panel.no-highlights",defaultMessage:[{type:0,value:"Cannot retrieve version highlights"}]}),unknown:e.formatMessage({id:"changelog-panel.unknown",defaultMessage:[{type:0,value:"unknown"}]}),viewReleaseNotes:e.formatMessage({id:"version-panel.view-release-notes",defaultMessage:[{type:0,value:"View Version History"}]}),error:e.formatMessage({id:"version-panel.error-state",defaultMessage:[{type:0,value:"Error while fetching release notes"}]}),errorHelperText:e.formatMessage({id:"version-panel.error-state-helper-text",defaultMessage:[{type:0,value:"Please try again later"}]}),"current-version":{label:e.formatMessage({id:"changelog-panel.current-version",defaultMessage:[{type:0,value:"Current Version"}]}),noVersionHighlights:e.formatMessage({id:"changelog-panel.no-current-version-highlights",defaultMessage:[{type:0,value:"No Release Notes for Current Version"}]})},"previous-version":{label:e.formatMessage({id:"changelog-panel.previous-version",defaultMessage:[{type:0,value:"Previous Version"}]}),noVersionHighlights:e.formatMessage({id:"changelog-panel.no-prev-version-highlights",defaultMessage:[{type:0,value:"No Release Notes for Previous Version"}]})},"selected-version":{label:null,noVersionHighlights:e.formatMessage({id:"changelog-panel.no-selected-version-highlights",defaultMessage:[{type:0,value:"No Release Notes for Selected Version"}]})}}),useStyles$5=makeStyles()(e=>({flexContainer:{display:"flex",alignItems:"center"},header:{alignItems:"center",display:"flex",justifyContent:"space-between",height:"55px",padding:e.spacing(6,0,6,6),borderBottom:"1px solid rgb(219, 226, 234)"},headerActionContainer:{alignItems:"center",display:"flex",flexGrow:1,height:"100%",justifyContent:"flex-end",paddingRight:"10px"},title:{color:"#2A323C"},panelRoot:{padding:"15px",height:"calc(100% - 70px);",overflowY:"scroll"},row:{display:"flex","& svg":{marginRight:"12px",marginBottom:"24px"}},widgets:{"& svg":{fill:"#555F7C"}},veriLogo:{transform:"translate(3px, 2px)"},versionText:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",marginBottom:"5px"},wrapperBox:{padding:"15px 0 15px 15px",border:".5px solid #D5DFE9",borderRadius:"4px",marginBottom:"14px","& iframe":{width:"100%",border:"none"}},aiwareLogo:{marginBottom:"10px"},boldTitle:{fontWeight:700},releaseNotesBtn:{width:"100%",cursor:"pointer",height:"36px",border:"1px solid #5C6269",color:"#5C6269",marginTop:"15px","&:hover":{border:"1px solid #5C6269"}},errorStateContainer:{padding:"40px",textAlign:"center","& img":{width:"40%",marginBottom:"20px"}}})),Header=()=>{const e=useDispatch();var t=useStyles$5()["classes"],n=useIntl(),{changelog:n,closePanelTooltip:r}=changelogPanelLabels(n);return jsxRuntime.exports.jsxs("header",Object.assign({className:t.header,"data-testid":"changelog-panel.header"},{children:[jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"h1","data-testid":"changelog-panel-title",className:t.title},{children:["AIWARE ",n]})),jsxRuntime.exports.jsx("div",Object.assign({className:t.headerActionContainer},{children:jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:r},{children:jsxRuntime.exports.jsx(IconButton$1,Object.assign({onClick:()=>e(hidePanel$1(CHANGELOG_PANEL)),"aria-labelledby":"changelog-panel.close-button","data-testid":"changelog-panel-close-button",size:"large"},{children:jsxRuntime.exports.jsx(Close$1,{})}))}))}))]}))},VersionHeader=({version:e,updateIsRequired:t})=>{var n=useStyles$5()["classes"],r=useIntl(),{versionLabel:r,updateRequiredLabel:i,deploymentLabel:o,unknown:a}=changelogPanelLabels(r);return jsxRuntime.exports.jsxs(Box$1,Object.assign({className:n.wrapperBox},{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({className:n.flexContainer},{children:[jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"h1","data-test":"changelog-panel-header-title"},{children:[r," ",null!=e&&e.version?null==e?void 0:e.version:a]})),t?jsxRuntime.exports.jsxs(Typography$1,Object.assign({sx:{ml:"10px"},variant:"caption"},{children:["(",i,")"]})):null]})),jsxRuntime.exports.jsx(Box$1,Object.assign({sx:{mt:"5px"}},{children:jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"body2"},{children:[o," -"," ",e&&e.createdAt?dateFormatter((null==e?void 0:e.createdAt)||null):a]}))}))]}))},isValidHttpUrl=(e="")=>{let t;try{t=new URL(e)}catch(e){return!1}return"http:"===t.protocol||"https:"===t.protocol},VersionContent=({id:e,version:t,height:n})=>{var r=useStyles$5()["classes"],i=useIntl(),{[e]:{label:i,noVersionHighlights:o}}=changelogPanelLabels(i);return isValidHttpUrl(null==t?void 0:t.highlightsUrl)?jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.wrapperBox},{children:[t&&i&&jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1",sx:{mb:"10px"}},{children:i})),jsxRuntime.exports.jsx("iframe",{id:e,title:e,src:null==t?void 0:t.highlightsUrl,height:n,onLoad:e=>{e.currentTarget.onerror=e=>console.log("ev",e)}})]})):jsxRuntime.exports.jsx(VersionChangelogNullState,{label:o})},CHANGELOG_PANEL="CHANGELOG_PANEL",RELEASE_NOTES_URL="https://docs.veritone.com/#/versions/readme",ChangelogPanelComponent=({id:t})=>{var e=useStyles$5()["classes"],n=useIntl(),{apiUnavailable:n,noHighlights:r,viewReleaseNotes:i,error:o,errorHelperText:a}=changelogPanelLabels(n);const s=useDispatch(),[l,c]=react$1.exports.useState(!1);var u=useSelector(selectLoadingStatus);const[d,p]=react$1.exports.useState({}),f=e=>{if("https://get.aiware.com"===e.origin){const{height:t,source:n}=e.data;p(e=>Object.assign(Object.assign({},e),{[n]:t+1}))}};react$1.exports.useEffect(()=>{var e=gqlIntrospection.getQueries().find(e=>"platformInfo"===e.name);return c(!!e),e&&s(actions$2.versionPanel.fetchVersionInfoStart(t)),window.addEventListener("message",f),()=>window.removeEventListener("message",f)},[s,t]);var h=useSelector(selectCurrentVersion),m=useSelector(selectPreviousVersion),g=useSelector(selectSelectedVersion),[y,,]=react$1.exports.useState(!1),v=jsxRuntime.exports.jsxs(Box$1,{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({sx:{display:"flex",flexDirection:"column",height:"100%"}},{children:[h&&!t?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(VersionHeader,{version:h,updateIsRequired:y}),jsxRuntime.exports.jsx(VersionContent,{id:"current-version",version:h,height:d[(null==(v=null==h?void 0:h.highlightsUrl)?void 0:v.toString())||""]})]}):null,g&&t?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(VersionHeader,{version:g,updateIsRequired:y}),jsxRuntime.exports.jsx(VersionContent,{id:"selected-version",version:g,height:d[(null==(v=null==g?void 0:g.highlightsUrl)?void 0:v.toString())||""]})]}):null]})),m&&!t?jsxRuntime.exports.jsx(VersionContent,{id:"previous-version",version:m,height:d[(null==(y=null==m?void 0:m.highlightsUrl)?void 0:y.toString())||""]}):null,!t&&!h&&!m&&jsxRuntime.exports.jsx(VersionChangelogNullState,{label:r}),t&&!g&&jsxRuntime.exports.jsx(VersionChangelogNullState,{label:r}),jsxRuntime.exports.jsxs(Button$1,Object.assign({className:e.releaseNotesBtn,variant:"outlined",onClick:()=>{window.open(RELEASE_NOTES_URL,"_blank")}},{children:[jsxRuntime.exports.jsx(Launch,{sx:{mr:"5px",width:"18px"}})," ",i]}))]}),y=jsxRuntime.exports.jsxs(Box$1,Object.assign({className:e.errorStateContainer},{children:[jsxRuntime.exports.jsx("img",{src:img$c,alt:"error"}),jsxRuntime.exports.jsx(Box$1,{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",sx:{fontWeight:700}},{children:o}))}),jsxRuntime.exports.jsx(Box$1,{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:a}))})]}));return jsxRuntime.exports.jsxs(Box$1,Object.assign({sx:{height:"calc(100vh - 60px)",overflow:"hidden"}},{children:[jsxRuntime.exports.jsx(Header,{}),"pending"===u&&jsxRuntime.exports.jsx(Box$1,Object.assign({sx:{p:"15px",display:"flex",justifyContent:"center"}},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})),"success"===u&&jsxRuntime.exports.jsx("div",Object.assign({className:e.panelRoot},{children:l?v:jsxRuntime.exports.jsx(VersionChangelogNullState,{label:n})})),"failure"===u&&y]}))},ChangelogPanel=({id:e})=>jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getPanelModule()]},{children:jsxRuntime.exports.jsx(ChangelogPanelComponent,{id:e})}));var index_esm$2=Object.freeze({__proto__:null,AppbarPanel:AppbarPanel,AppbarTabPanel:AppbarTabPanel,ChangelogPanel:ChangelogPanel,TabPanel:Tab,VersionPanel:VersionPanel});const Panel=({panelId:t,children:e})=>{var n;const r=useDispatch(),{microFrontend:i,panelConfig:{minWidth:o,padding:a=0,header:s,footer:l,marginTop:c=0,marginStart:u=0,show:d,width:p=500,zIndex:f=1}}=useSelector(e=>e.panels.find(e=>e.panelId===t)),h=makeStyles()(e=>({container:{position:"fixed",top:c,right:u,height:"100%",minWidth:o,width:p,zIndex:f},padding:{padding:e.spacing(a),paddingTop:e.spacing(a/2)},margin:{margin:e.spacing()},headerContainer:{display:"flex",width:"100%",justifyContent:"space-between",alignItems:"center"},headerTitle:{margin:e.spacing()},actionButton:{margin:e.spacing()},actionContainer:{"&:last-child":{marginRight:e.spacing(2)}},footer:{}}))()["classes"],m=e=>{var t;return e.icon?jsxRuntime.exports.jsx(IconButton$1,Object.assign({className:h.actionButton,onClick:()=>r(e.action),size:"large"},{children:e.icon})):(t=e,jsxRuntime.exports.jsx(Button$1,Object.assign({className:h.actionButton,size:t.size,variant:t.variant,onClick:()=>r(e.action)},{children:t.label})))};return jsxRuntime.exports.jsx(Slide$1,Object.assign({in:d,direction:"left",onExited:()=>r(unmountPanel$1(t))},{children:jsxRuntime.exports.jsxs(Paper$1,Object.assign({elevation:3,id:t,"data-test":"panel-"+(t||"unknown"),className:h.container},{children:[s&&jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:h.headerContainer},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({gutterBottom:!0,className:h.headerTitle,variant:"h4"},{children:s.title})),jsxRuntime.exports.jsxs("div",Object.assign({className:h.actionContainer},{children:[null==(n=s.actions)?void 0:n.map(e=>m(e)),jsxRuntime.exports.jsx(IconButton$1,Object.assign({"data-test":"close-button-"+t,className:h.actionButton,onClick:()=>r(hidePanel$1(t)),size:"large"},{children:jsxRuntime.exports.jsx(default_1$6,{})}))]}))]})),s.divider&&jsxRuntime.exports.jsx(Divider$1,{})]}),jsxRuntime.exports.jsx("div",Object.assign({className:h.padding},{children:e?react$1.exports.cloneElement(e,Object.assign(Object.assign({},i.config||{}),{dataId:t,hidePanel:()=>r(hidePanel$1(t))})):jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx("h1",{children:"No micro frontend passed!"})})})),l&&jsxRuntime.exports.jsxs("div",Object.assign({className:h.footer},{children:[l.divider&&jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsxs("div",Object.assign({className:h.headerContainer},{children:[jsxRuntime.exports.jsx("div",{}),jsxRuntime.exports.jsx("div",Object.assign({className:h.actionContainer},{children:null==(n=l.actions)?void 0:n.map(e=>m(e))}))]}))]}))]}))}))},SamplePanel5=e=>jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx("h1",{children:"Welcome to SamplePanel5!"})}),SamplePanel4=e=>jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx("h1",{children:"Welcome to SamplePanel4!"})}),SamplePanel3=n=>{const r=useDispatch();return jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx("h1",{children:"Welcome to picker!"}),jsxRuntime.exports.jsx(Typography$1,Object.assign({id:"discrete-slider",gutterBottom:!0},{children:"Temperature"})),jsxRuntime.exports.jsx(Slider$1,{"data-test":"slider",defaultValue:n.value,value:n.value,"aria-labelledby":"discrete-slider",valueLabelDisplay:"auto",step:10,marks:!0,min:0,max:110,onChange:(e,t)=>{r(updatePanelMicroFrontendProps({id:n.dataId,props:Object.assign(Object.assign({},n),{value:t})}))},onChangeCommitted:(e,t)=>{r(updatePanelMicroFrontendProps({id:n.dataId,props:Object.assign(Object.assign({},n),{value:t})})),r(setData({id:n.dataId,data:t}))}})]})},SamplePanel2=e=>jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx("h1",{children:"Welcome to SamplePanel2!"})}),useStyles$3=makeStyles()(e=>({container:{},root:{minWidth:50},bullet:{display:"inline-block",margin:"0 2px",transform:"scale(0.8)"},title:{fontSize:14},pos:{marginBottom:12}})),SamplePanel1=e=>{var t=useStyles$3()["classes"],n=jsxRuntime.exports.jsx("span",Object.assign({className:t.bullet},{children:"•"}));return jsxRuntime.exports.jsxs("div",Object.assign({className:t.container},{children:[jsxRuntime.exports.jsxs("h1",{children:["Welcome to SamplePanel1 ",e.name||"Unknown Person","!"]}),jsxRuntime.exports.jsxs(Card$1,Object.assign({className:t.root},{children:[jsxRuntime.exports.jsxs(CardContent$1,{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({className:t.title,color:"textSecondary",gutterBottom:!0},{children:"Word of the Day"})),jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"h5",component:"h2"},{children:["be",n,"nev",n,"o",n,"lent"]})),jsxRuntime.exports.jsx(Typography$1,Object.assign({className:t.pos,color:"textSecondary"},{children:"adjective"})),jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"body2",component:"p"},{children:["well meaning and kindly.",jsxRuntime.exports.jsx("br",{}),'"a benevolent smile"']}))]}),jsxRuntime.exports.jsx(CardActions$1,{children:jsxRuntime.exports.jsx(Button$1,Object.assign({size:"small"},{children:"Learn More"}))})]}))]}))};var WidgetsStatus,index_esm$1=Object.freeze({__proto__:null,Panel:Panel,SamplePanel1:SamplePanel1,SamplePanel2:SamplePanel2,SamplePanel3:SamplePanel3,SamplePanel4:SamplePanel4,SamplePanel5:SamplePanel5});const registry={[AvailableWidgets.APP_BAR]:App,[AvailableComponents.APP_BAR_PANEL]:SettingPanelComponent,[AvailablePanels.APP_BAR_PANEL_TEMPLATE]:AppbarPanel,[AvailablePanels.TAB_TEMPLATE]:Tab,[AvailablePanels.SIMPLE_PANEL]:Panel},registryLookup=t=>__awaiter$e(void 0,void 0,void 0,function*(){if(registry[t])return yield registry[t];let e=Promise.resolve(null);switch(t){case AvailableWidgets.SAMPLE_APP_BAR:e=import("./js-core.esm2.js").then(e=>e.SampleAppBar);break;case AvailableWidgets.RESET_PASSWORD:e=import("./js-core.esm4.js").then(e=>e.ResetPassword);break;case AvailableWidgets.FLOW_CENTER:e=import("./js-core.esm11.js").then(e=>e.App);break;case AvailableWidgets.FLOW_WIDGET:e=import("./js-core.esm13.js").then(function(e){return e.i}).then(e=>e.App);break;case AvailableWidgets.ENGINE_CENTER_BROWSE:e=import("./js-core.esm22.js").then(e=>e.EngineCenterBrowse);break;case AvailablePanels.APP_BAR_TAB_PANEL_TEMPLATE:e=Promise.resolve().then(function(){return index_esm$2}).then(e=>e.AppbarTabPanel);break;case AvailableComponents.NOTIFICATION_PANEL:e=Promise.resolve().then(function(){return index_esm$5}).then(e=>e.NotificationPanel);break;case AvailableComponents.NOTIFICATION_DETAIL:e=Promise.resolve().then(function(){return index_esm$5}).then(e=>e.NotificationDetailPanel);break;case AvailableComponents.NOTIFICATION_SETTING:e=Promise.resolve().then(function(){return index_esm$5}).then(e=>e.NotificationSetting);break;case AvailableComponents.NOTIFICATION_UTILITY:e=Promise.resolve().then(function(){return index_esm$5}).then(e=>e.NotificationUtilityPanel);break;case AvailableComponents.NOTIFICATION_APPLICATION:e=Promise.resolve().then(function(){return index_esm$5}).then(e=>e.NotificationApplication);break;case AvailableComponents.HELP_PANEL:e=Promise.resolve().then(function(){return index_esm}).then(e=>e.HelpCenterPanel);break;case AvailableComponents.EDIT_PROFILE_PICTURE:e=Promise.resolve().then(function(){return index_esm$4}).then(e=>e.EditProFilePicture);break;case AvailableComponents.TEST_COMPONENT:e=Promise.resolve().then(function(){return index_esm$1}).then(e=>e.SamplePanel1);break;case AvailableComponents.TEST_COMPONENT2:e=Promise.resolve().then(function(){return index_esm$1}).then(e=>e.SamplePanel2);break;case AvailableComponents.TEST_COMPONENT3:e=Promise.resolve().then(function(){return index_esm$1}).then(e=>e.SamplePanel3);break;case AvailableComponents.SETTING_PREFERENCE:e=import("./js-core.esm33.js").then(e=>e.SettingsPreferencesPanel);break;case AvailableComponents.ORGANIZATION_PANEL:e=Promise.resolve().then(function(){return index_esm$3}).then(e=>e.OrganizationPanel);break;case AvailableComponents.INVITE_USERS_PANEL:e=Promise.resolve().then(function(){return index_esm$3}).then(e=>e.InviteUsersPanel);break;case AvailableComponents.INVITE_REQUESTS_PANEL:e=Promise.resolve().then(function(){return index_esm$3}).then(e=>e.InviteRequestsPanel);break;case AvailableComponents.REVIEW_ORG_INVITE_PANEL:e=Promise.resolve().then(function(){return index_esm$3}).then(e=>e.ReviewRequestPanel);break;case AvailableComponents.ADD_APPLICATIONS:e=Promise.resolve().then(function(){return index_esm$3}).then(e=>e.AddApplicationsPanel);break;case AvailableComponents.DATA_CENTER:e=import("./js-core.esm34.js").then(function(e){return e.c}).then(e=>e.DataCenterBrowse);break;case AvailableComponents.DATA_CENTER_FOLDERS_AND_FILES:e=import("./js-core.esm34.js").then(function(e){return e.c}).then(e=>e.FoldersAndFilesPanel);break;case AvailableComponents.DATA_CENTER_FILE_INFO_PANEL:e=import("./js-core.esm34.js").then(function(e){return e.c}).then(e=>e.FileInfoPanel);break;case AvailableComponents.DATA_CENTER_IMPORTER:e=import("./js-core.esm39.js").then(e=>e.DataCenterImporter);break;case AvailableComponents.DATA_LABELER:e=import("./js-core.esm40.js").then(e=>e.DataLabelerPanel);break;case AvailableComponents.ADMIN_CENTER_OPEN_ID:e=import("./js-core.esm41.js").then(e=>e.AdminCenterOpenId);break;case AvailableComponents.ADMIN_CENTER:e=import("./js-core.esm43.js").then(e=>e.AdminCenterBrowse);break;case AvailableComponents.DATA_CENTER_PROCESS_AI:e=import("./js-core.esm47.js").then(e=>e.DataCenterProcessAI);break;case AvailableComponents.ENGINE_CENTER_NEW:e=import("./js-core.esm23.js").then(function(e){return e.h}).then(e=>e.EngineCenterNew);break;case AvailableComponents.ENGINE_CENTER_FILTER:e=import("./js-core.esm22.js").then(e=>e.EngineCenterFilter);break;case AvailableComponents.APP_CENTER_FILTER:e=import("./js-core.esm48.js").then(e=>e.AppCenterFilter);break;case AvailableComponents.ENGINE_CENTER_DETAILS:e=import("./js-core.esm22.js").then(e=>e.EngineDetails);break;case AvailableComponents.ENGINE_CENTER_NEW_BUILD:e=import("./js-core.esm22.js").then(e=>e.CreateNewBuildPanel);break;case AvailableComponents.ENGINE_CENTER_CUSTOM_FIELDS_FORM:e=import("./js-core.esm23.js").then(function(e){return e.h}).then(e=>e.EngineCenterCustomFieldsForm);break;case AvailableComponents.ENGINE_CENTER_SCHEMAS_FORM_PANEL:e=import("./js-core.esm23.js").then(function(e){return e.h}).then(e=>e.SchemasFormPanel);break;case AvailableComponents.ENGINE_CENTER_INPUT_TYPE_FLYOUT:e=import("./js-core.esm23.js").then(function(e){return e.h}).then(e=>e.InputTypeFlyout);break;case AvailableComponents.ENGINE_CENTER_EDIT_RELEASE_NOTES:e=import("./js-core.esm22.js").then(e=>e.EditReleaseNotes);break;case AvailableComponents.ENGINE_CENTER_VERSION_HISTORY_PANEL:e=import("./js-core.esm22.js").then(e=>e.VersionHistoryPanel);break;case AvailableComponents.SUPPORTED_FILE_TYPES:e=import("./js-core.esm39.js").then(e=>e.SupportedFileTypes);break;case AvailableComponents.EDIT_FILE_METADATA:e=import("./js-core.esm39.js").then(e=>e.EditFileMetadata);break;case AvailableWidgets.APP_CENTER_BROWSE:e=import("./js-core.esm48.js").then(e=>e.AppCenterBrowse);break;case AvailableComponents.APP_CENTER_NEW:e=import("./js-core.esm49.js").then(e=>e.AppCenterNew);break;case AvailableComponents.APP_CENTER_CONFIG_FIELDS_FORM:e=import("./js-core.esm49.js").then(e=>e.AppCenterConfigFieldsForm);break;case AvailableComponents.APP_CENTER_CONTEXT_MENU_EXTENSIONS:e=import("./js-core.esm49.js").then(e=>e.AppCenterContextMenuExtensionPanel);break;case AvailableComponents.APP_CENTER_BROWSE:e=import("./js-core.esm48.js").then(e=>e.AppCenterBrowse);break;case AvailableComponents.APP_CENTER_DETAILS:e=import("./js-core.esm48.js").then(e=>e.AppCenterDetails);break;case AvailableComponents.DATA_CENTER_ENGINE_SELECTION:e=import("./js-core.esm47.js").then(e=>e.DataCenterEngineSelection);break;case AvailableComponents.ADMIN_CENTER_NEW_GROUP_PANEL:e=import("./js-core.esm38.js").then(e=>e.NewGroupPanel);break;case AvailableComponents.PERMISSIONS_PANEL:e=import("./js-core.esm35.js").then(e=>e.PermissionsPanel);break;case AvailableComponents.GROUP_INFO_PANEL:e=import("./js-core.esm35.js").then(e=>e.GroupInfoPanel);break;case AvailableComponents.NEW_PERMISSION_SET_PANEL:e=import("./js-core.esm35.js").then(e=>e.NewPermissionSetPanel);break;case AvailableComponents.PERMISSION_SET_DETAILS_PANEL:e=import("./js-core.esm35.js").then(e=>e.PermissionSetDetailsPanel);break;case AvailableComponents.DATA_CENTER_MDP_IFRAME_PANEL:e=import("./js-core.esm34.js").then(function(e){return e.c}).then(e=>e.MediaDetailsPanelIframe);break;case AvailableComponents.DATA_CENTER_INGESTION_CREATION_PANEL:e=import("./js-core.esm34.js").then(function(e){return e.c}).then(e=>e.IngestionCreationPanel);break;case AvailableComponents.DATA_CENTER_SELECT_IMPORT_SOURCE:e=import("./js-core.esm34.js").then(function(e){return e.c}).then(e=>e.SelectImportSource);break;case AvailableComponents.DATA_CENTER_SOURCE_CREATION_PANEL:e=import("./js-core.esm34.js").then(function(e){return e.c}).then(e=>e.SourceCreationPanel);break;case AvailableComponents.ADMIN_CENTER_GROUP_DETAILS_PANEL:e=import("./js-core.esm38.js").then(e=>e.GroupDetailsPanel);break;case AvailableComponents.ADMIN_CENTER_ADD_MEMBER_PANEL:e=import("./js-core.esm38.js").then(e=>e.AddMemberPanel);break;case AvailableComponents.APPLICATION_DETAILS_PANEL:e=import("./js-core.esm44.js").then(e=>e.ApplicationDetailsPanel);break;case AvailableComponents.PROCESSING_CENTER_SOURCES:e=import("./js-core.esm50.js").then(e=>e.ProcessingCenterSources);break;case AvailableComponents.PROCESSING_CENTER_ERROR_DETAIL:e=import("./js-core.esm50.js").then(e=>e.ErrorDetailPanel);break;case AvailableComponents.USER_APPLICATION_SETTINGS_PANEL:e=Promise.resolve().then(function(){return index_esm$6}).then(e=>e.UserApplicationSettingsPanel);break;case AvailableComponents.ADD_APPLICATION_USERS_PANEL:e=import("./js-core.esm44.js").then(e=>e.AddUsersPanel);break;case AvailableComponents.PROCESSING_CENTER:e=import("./js-core.esm53.js").then(e=>e.ProcessingCenterBrowse);break;case AvailableComponents.JOBS_TABLE_SETTINGS_PANEL:e=import("./js-core.esm54.js").then(e=>e.JobsTableSettingsPanel);break;case AvailableComponents.VERSION_PANEL:e=Promise.resolve().then(function(){return index_esm$2}).then(e=>e.VersionPanel);break;case AvailableComponents.CHANGELOG_PANEL:e=Promise.resolve().then(function(){return index_esm$2}).then(e=>e.ChangelogPanel);break;case AvailableComponents.PROCESSING_CENTER_DAG_BUILDER:e=import("./js-core.esm56.js").then(e=>e.DagBuilder);break;case AvailableComponents.PROCESSING_CENTER_INGESTION:e=import("./js-core.esm57.js").then(function(e){return e.at}).then(e=>e.ProcessingCenterIngestion);break;case AvailableComponents.PROCESSING_CENTER_ADVANCED_SETTINGS:e=import("./js-core.esm57.js").then(function(e){return e.at}).then(e=>e.ProcessingCenterAdvancedSettings);break;case AvailableComponents.PROCESSING_CENTER_AFFILIATE_PANEL:e=import("./js-core.esm57.js").then(function(e){return e.at}).then(e=>e.ProcessingCenterAffiliatePanel);break;case AvailableComponents.JOBS_DETAILS_PANEL:e=import("./js-core.esm54.js").then(e=>e.JobsDetailsPanel);break;case AvailableComponents.TASKS_TABLE_SETTINGS_PANEL:e=import("./js-core.esm55.js").then(e=>e.TasksTableSettingsPanel);break;case AvailableComponents.TASK_DETAILS_PANEL:e=import("./js-core.esm55.js").then(e=>e.TaskDetailsPanel);break;case AvailableComponents.RESOURCE_CENTER:e=import("./js-core.esm59.js").then(e=>e.ResourceCenterBrowse);break;case AvailableComponents.PACKAGE_DETAILS_PANEL:e=import("./js-core.esm63.js").then(e=>e.PackageDetails);break;case AvailableComponents.PACKAGE_MANAGER_PANEL:e=import("./js-core.esm64.js").then(function(e){return e.J}).then(e=>e.PackageManager);break;case AvailableComponents.INSTANCE_ADMIN_CENTER_BROWSE:e=import("./js-core.esm65.js").then(e=>e.InstanceAdminCenterBrowse);break;case AvailableComponents.MANAGE_GRANTS:e=import("./js-core.esm63.js").then(e=>e.ManageGrantsPanel);break;case AvailableComponents.SCHEMA_DETAILS_PANEL:e=import("./js-core.esm66.js").then(e=>e.SchemaDetailsPanel);break;case AvailableComponents.FLOW_TEMPLATE_DETAILS_PANEL:e=import("./js-core.esm66.js").then(e=>e.TemplateDetailsPanel);break;case AvailableComponents.USER_DETAILS_PANEL:e=import("./js-core.esm45.js").then(e=>e.UserDetailsPanel);break;case AvailableComponents.CREATE_OR_UPDATE_TOKEN_PANEL:e=import("./js-core.esm46.js").then(e=>e.CreateOrUpdateApiTokenPanel);break;case AvailableComponents.FLOW_DETAILS_PANEL:e=import("./js-core.esm13.js").then(function(e){return e.i}).then(e=>e.App);break;case AvailableComponents.NODE_DETAILS_PANEL:e=import("./js-core.esm66.js").then(e=>e.NodeDetailsPanel);break;case AvailableComponents.PALETTE_DETAILS_PANEL:e=import("./js-core.esm66.js").then(e=>e.PaletteDetailsPanel)}return yield registry[t]=e}),registerComponent=(e,t)=>{registry[e]=t},WIDGETS_FEATURE_KEY="widgets",initialState$2=(!function(e){e.idle="idle",e.mounting="mounting",e.unmounting="unmounting",e.error="error",e.eventing="eventing"}(WidgetsStatus=WidgetsStatus||{}),{value:[],status:WidgetsStatus.idle}),widgetsSelector=e=>e[name].value,callWidgetOnComplete=(e,t)=>{e=e.find(e=>e.widgetName===t);null!=e&&e.onComplete&&e.onComplete()},{name,reducer,actions:{mountWidget:mountWidget$1,mountWidgetSuccess,mountWidgetError,unmountWidget:unmountWidget$1,unmountWidgetSuccess,unmountWidgetFailure,triggerWidgetCallback,triggerWidgetCallbackSuccess}}=createSlice({name:WIDGETS_FEATURE_KEY,initialState:initialState$2,reducers:{mountWidget:(e,t)=>{e.value.push(t.payload),e.status=WidgetsStatus.mounting},mountWidgetSuccess:e=>{e.status=WidgetsStatus.idle},mountWidgetError:e=>{e.status=WidgetsStatus.error},triggerWidgetCallback:(e,t)=>{e.status=WidgetsStatus.eventing},triggerWidgetCallbackSuccess:e=>{e.status=WidgetsStatus.idle},unmountWidget:(e,t)=>{e.status=WidgetsStatus.unmounting},unmountWidgetSuccess:(e,t)=>{e.value=e.value.filter(e=>e.widgetId!==t.payload),e.status=WidgetsStatus.idle},unmountWidgetFailure:e=>{e.status=WidgetsStatus.error}}});function*mountWidgetListenerSaga(){let a;const s={};yield takeEvery$1(mountWidget$1({}).type,function*(e){try{var{widgetConfig:t={},widgetName:n,elementId:r}=null==e?void 0:e.payload,i=(yield call$j(registryLookup,n))||(()=>jsxRuntime.exports.jsx("div",{children:"Component Not Found."})),o=getElement(r,n);o.classList.add("aiware-el"),s[r]?a=s[r]:(a=client$1.createRoot(o),s[r]=a),a.render(jsxRuntime.exports.jsx(AIWareCacheProvider,{children:jsxRuntime.exports.jsx(AIWareThemeProvider$1,{children:jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$5},{children:jsxRuntime.exports.jsx(i,Object.assign({},t))}))})})),yield put(mountWidgetSuccess())}catch(e){yield put(mountWidgetError())}}),yield takeEvery$1(e=>/\/booted$/.test(e.type),function*(e){var[e]=e.type.split("/");yield put(triggerWidgetCallback(e))}),yield takeEvery$1(unmountWidget$1("").type,function*(t){try{const e=yield select(e=>{return(null==(e=widgetsSelector(e).find(e=>e.widgetId===t.payload))?void 0:e.elementId)||""});setTimeout(()=>{s[e]&&s[e].unmount(),delete s[e]}),yield put(unmountWidgetSuccess(t.payload))}catch(e){yield put(unmountWidgetFailure())}}),yield takeEvery$1(triggerWidgetCallback("").type,function*(e){var t=yield select(widgetsSelector);callWidgetOnComplete(t,e.payload),yield put(triggerWidgetCallbackSuccess())})}function getWidgetsModule(){return{id:name,reducerMap:{[name]:reducer},sagas:[mountWidgetListenerSaga],initialActions:[]}}function getDataModule(){return{id:"data",reducerMap:{data:(e,{type:t,payload:n})=>{return t===setData({}).type?[...e.filter(e=>e.id!==n.id),n]:e||[]}},sagas:[],initialActions:[]}}const useStyles$2=makeStyles()(e=>({sdkSnackbarContainer:{"& svg":{fill:"white"}}}));function CustomSnackbar(){const n=useDispatch(),[e,t]=react$1.exports.useState([]),[r,i]=react$1.exports.useState(!1),[o,a]=react$1.exports.useState(void 0),{message:s,duration:l}=useSelector(snackbarSelector);var c=useStyles$2()["classes"],u=(react$1.exports.useEffect(()=>{null!==s&&void 0!==s&&s.content&&t(e=>[...e,s])},[s]),react$1.exports.useEffect(()=>{e.length&&!o?(a(Object.assign({},e[0])),t(e=>e.slice(1)),i(!0)):e.length&&o&&r&&(n(clearMessage()),i(!1))},[e,o,r,n]),(e,t)=>{"clickaway"!==t&&(i(!1),n(clearMessage()))});return jsxRuntime.exports.jsx(Snackbar$1,Object.assign({anchorOrigin:{vertical:"bottom",horizontal:"right"},open:r,autoHideDuration:l||3e3,onClose:u,TransitionProps:{onExited:()=>{a(void 0),n(clearMessage())}},className:c.sdkSnackbarContainer,"data-snackbarid":(null===o||void 0===o?void 0:o.key)||"na","data-testid":"snackbar.message."+((null===o||void 0===o?void 0:o.severity)||"na")},{children:jsxRuntime.exports.jsx(Alert$1,Object.assign({onClose:u,severity:null===o||void 0===o?void 0:o.severity,elevation:6,variant:"filled"},{children:null===o||void 0===o?void 0:o.content}))}),o?o.key:void 0)}function validateConfig(e){return e.applicationId||console.info("@aiware/js: applicationId is required. Go to developer app to find your application id."),e.baseUrl||console.info("@aiware/js: baseUrl is required. It defaults to the US Commercial environment which is https://api.us-1.veritone.com/v3/graphql"),e.knowledgeBaseURL?(console.info("@aiware/js: knowledgeBaseURL is deprecated and scheduled to be removed in v3. Please use knowledgeBaseUrl instead."),Object.assign(Object.assign({},e),{knowledgeBaseUrl:e.knowledgeBaseURL})):e}const ID="openSupportChatButton",DATA_ATTR="open-support-chat-button";var SupportCenterPixel=()=>jsxRuntime.exports.jsx(Portal$1,{children:jsxRuntime.exports.jsx("div",{id:ID,"data-veritone-element":DATA_ATTR,style:{width:1,height:1,position:"fixed",right:55,bottom:20}})});const nameSpace="@helpPanel",updateSelectedTab=createAction(nameSpace+"/UPDATE_SELECTED_TAB",function(e,t){return{payload:{selectedTabId:e,tabLink:t}}}),setCustomKnowledgeBaseUrl=createAction(nameSpace+"/SET_CUSTOM_KNOWLEDGE_BASE_URL",function(e){return{payload:{url:e}}}),setCustomDocsUrl=createAction(nameSpace+"/SET_CUSTOM_DOCS_URL",function(e){return{payload:{url:e}}}),initialState$1={selectedTabId:0,tabLink:"https://support.veritone.com/",customKnowledgeBaseUrl:"",customDocsUrl:""},getTabLinkReducer=createReducer(initialState$1,e=>{e.addCase(updateSelectedTab,(e,t)=>Object.assign(Object.assign({},e),{tabLink:t.payload.tabLink,selectedTabId:t.payload.selectedTabId})),e.addCase(setCustomKnowledgeBaseUrl,(e,t)=>Object.assign(Object.assign({},e),{customKnowledgeBaseUrl:t.payload.url})),e.addCase(setCustomDocsUrl,(e,t)=>Object.assign(Object.assign({},e),{customDocsUrl:t.payload.url}))});function*helpSaga(){yield takeEvery$1("OPEN_HELP_LINK",function*(){var e=yield select(e=>e.helpPanel.tabLink);yield put(openLinkOnNewTab({url:e}))})}const namespace$1="helpPanel",helpCenterSelectedTabIdSelector=e=>null!=e&&e[namespace$1]?e[namespace$1].selectedTabId:0,customDocsUrlSelector=e=>null!=e&&e[namespace$1]?e[namespace$1].customDocsUrl:"",customKnowledgeBaseUrlSelector=e=>null!=e&&e[namespace$1]?e[namespace$1].customKnowledgeBaseUrl:"";function getHelpPanelModule(){return{id:"help",reducerMap:{[namespace$1]:getTabLinkReducer},sagas:[helpSaga],initialActions:[]}}var knowledgeBaseUrl$1="https://docs.veritone.com/help/index.html",documentUrl$1="https://docs.veritone.com",config={knowledgeBaseUrl:knowledgeBaseUrl$1,documentUrl:documentUrl$1};const useStyles$1=makeStyles()(e=>({root:{height:"calc(100% - 110px)",textAlign:"left","& .Sdk-MuiTab-root.Mui-selected":{color:e.palette.text.primary,fontWeight:600}},tabs:{padding:e.spacing(2.4,6,0,6)},tabPanels:{width:"100%",height:"100%"},aiWareIcon:{position:"relative",maxHeight:50,opacity:"inherit",padding:e.spacing(4,3.2,0,3.2),display:"flex",justifyContent:"flex-end"},customTabs:{margin:e.spacing(0,4)},kbRoot:{height:"100%",textAlign:"left"},loadingContainer:{position:"absolute",height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"white"},kbToolBarBox:{padding:e.spacing(6,6,1.6,6)},kbTabContent:{height:"calc(100% - 92px)"},kbTabPanel:{padding:e.spacing(6)},dRoot:{height:"100%",width:"100%"},dNavBar:{height:"100%",overflow:"hidden",background:"#F4F4F4"},dTitle:{color:"#2A323C",fontWeight:600,fontSize:"18px",lineHeight:"24px",padding:e.spacing(3.2)},dContent:{height:"100%",width:"100%",position:"relative"},dMenu:{overflowY:"auto",height:"calc(100% - 52px)"},drawerContainer:{display:"flex",height:"100%",background:e.palette.background.default},tabContainer:{borderRight:"0.5px solid #D5DFE9",overflow:"hidden",height:"100%",width:"100%"},tabName:{borderBottom:"0.5px solid #D5DFE9",display:"flex",justifyContent:"space-between",alignItems:"center",height:"64px",padding:e.spacing(0,6)},actionIcons:{margin:e.spacing(-2.4)},tabContent:{height:"calc(100vh - 57px - 60px)",overflowY:"auto",overflowX:"hidden"}})),documentUrl=config.documentUrl,Documentation=({path:e=documentUrl})=>{var t=useStyles$1()["classes"];const[n,r]=react$1.exports.useState(!0);return jsxRuntime.exports.jsxs("div",Object.assign({className:classNames(t.dRoot,"hide-in-percy")},{children:[n&&jsxRuntime.exports.jsx("div",Object.assign({className:t.loadingContainer},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})),jsxRuntime.exports.jsx("iframe",{"data-cy":"docs-iframe",title:"Document Iframe",style:{width:"100%",height:"100%"},src:e,frameBorder:"0",onLoad:function(){setTimeout(()=>{r(!1)},1e3)}})]}))},knowledgeBaseUrl=config["knowledgeBaseUrl"];function Knowledgebase({path:e=knowledgeBaseUrl}){var t=useStyles$1()["classes"];const[n,r]=react$1.exports.useState(!0);return jsxRuntime.exports.jsxs("div",Object.assign({className:t.kbRoot},{children:[n&&jsxRuntime.exports.jsx("div",Object.assign({className:t.loadingContainer},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})),jsxRuntime.exports.jsx("iframe",{"data-cy":"knowledgebase-iframe",title:"Knowledgebase Iframe",style:{width:"100%",height:"100%"},src:e,frameBorder:"0",onLoad:function(){r(!1)}})]}))}const defaultLocale="en-us",tabsList=[{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-help-panel.au1+VZ",defaultMessage:"Knowledgebase",description:"Help Panel: Knowledgebase tab label"}),disabled:!1,url:"https://support.veritone.com/"},{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-help-panel.8bnkm8",defaultMessage:"Documentation",description:"Help Panel: Documentation tab label"}),disabled:!1,url:"https://docs.veritone.com/#/aiware/"}];function HelpCenter(){var e=useSelector(initialConfigSelector),t=useSelector(customKnowledgeBaseUrlSelector),n=useSelector(customDocsUrlSelector),r=useSelector(helpCenterSelectedTabIdSelector),i=useSelector(e=>null==e?void 0:e.panels),o=useStyles$1()["classes"],[a]=react$1.exports.useState(defaultLocale);const s=useDispatch();i=null==i?void 0:i.find(e=>"CUSTOM_HELP_PANEL_ID"===e.panelId),t=i&&t?t:e.knowledgeBaseUrl,i=i&&n?n:e.docsURL;return jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getHelpPanelModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,Object.assign({locale:a},{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.drawerContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({id:"setting-content",className:o.tabContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.tabContent},{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.root},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:o.tabPanels},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:o.customTabs},{children:jsxRuntime.exports.jsx(CustomTabs,{selectedId:r,onChangeTab:e=>{s(updateSelectedTab(e,tabsList[e].url))},tabsList:tabsList})})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:o.tabPanels},{children:[jsxRuntime.exports.jsx(TabPanel,Object.assign({value:r,index:0},{children:jsxRuntime.exports.jsx(Knowledgebase,{path:t})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:r,index:1},{children:jsxRuntime.exports.jsx(Documentation,{path:i})}))]})),jsxRuntime.exports.jsx("div",Object.assign({className:o.aiWareIcon},{children:jsxRuntime.exports.jsx("img",{src:img$D,alt:"icon",draggable:"false"})}))]}))}))}))}))}))}))}))}var EPermissionAction,EAuthResourceType,EAuthSubResourceType,index_esm=Object.freeze({__proto__:null,HelpCenterPanel:HelpCenter,customDocsUrlSelector:customDocsUrlSelector,customKnowledgeBaseUrlSelector:customKnowledgeBaseUrlSelector,helpCenterSelectedTabIdSelector:helpCenterSelectedTabIdSelector,setCustomDocsUrl:setCustomDocsUrl,setCustomKnowledgeBaseUrl:setCustomKnowledgeBaseUrl,updateSelectedTab:updateSelectedTab});const useStyles=makeStyles()(()=>({dialog:{top:"125px",overflowX:"hidden",overflowY:"hidden",display:"flex",alignItems:"center",flexDirection:"column"},container:{borderRadius:"4px",backgroundColor:"#fff",width:"430px",overflow:"hidden",outline:0,boxShadow:"0px 0px 7px rgba(0, 0, 0, .25)"},header:{textTransform:"capitalize"},appListContainer:{width:"100%"},orgName:{fontWeight:"bold"}})),ApplicationDialog=()=>{const[e,t]=react$1.exports.useState(null),[n,r]=react$1.exports.useState(0);var i=useSelector(userSelector$2),o=useStyles()["classes"];const a=useSelector(initialConfigSelector),s=a.applicationId,l=useSelector(applicationSelector),c=useSelector(switchApiSelector);var u=(null===l||void 0===l?void 0:l.application)||[],d=null===l||void 0===l?void 0:l.status;var p=[...u].sort(function(e,t){return e.name>t.name?1:e.name<t.name?-1:0}),f=u.findIndex(e=>e.id===s);useInterval(()=>{t(e=>e&&e-1)},e&&n<3?1e3:null),react$1.exports.useEffect(()=>{"success"!==(null===l||void 0===l?void 0:l.status)||1!==(null===l||void 0===l?void 0:l.application.length)||(null===l||void 0===l?void 0:l.application[0].id)===a.applicationId||e||(0===e?window.open(c+"/"+(null===l||void 0===l?void 0:l.application[0].id),"_self"):t(10))},[a,l,c,e]);return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(s)&&f<0&&"success"===d?jsxRuntime.exports.jsx(Modal$1,Object.assign({className:o.dialog,open:!0},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:o.container},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"application-dialog-title",className:o.header,variant:"h1",sx:{px:"30px",pt:"30px"}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-title",defaultMessage:"Application Not Available",description:"Title for modal"})})),jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"10px"}},{children:[jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message1",defaultMessage:"Looks like you switched organizations, your current application is not available in the current",description:"Description current application not available"})," ",jsxRuntime.exports.jsx("span",Object.assign({className:o.orgName},{children:null!=(f=null==i?void 0:i.organization)&&f.organizationName?i.organization.organizationName:""}))," ",jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message2",defaultMessage:"organization you are viewing.",description:"Description current application not available"})]})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"20px"}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message3",defaultMessage:"Please select from the available applications below to be redirected.",description:"Instructions for current application not available"})})),e&&jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"20px"},onClick:()=>{r(e=>e+1)}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-countdown-message",defaultMessage:"You will be automatically forwarded to {appName} in {timeRemaining} seconds.",description:"Instructions for current application not available",values:{timeRemaining:e,appName:u[0].name}})})),jsxRuntime.exports.jsx("div",Object.assign({className:o.appListContainer},{children:jsxRuntime.exports.jsx(AppList,{title:"",selectedAppId:null,onSelectApplication:e=>{window.open(c+"/"+e,"_self")},applications:p,useGrid:!1,row:3})}))]}))})):null};class RateLimiter{constructor(){this.lastCall=null}checkIfCanCall(e=1){return e<1&&(e=1),(!this.lastCall||(new Date).getTime()-this.lastCall>=6e4*e)&&(this.lastCall=(new Date).getTime(),!0)}}!function(e){e.Create="create",e.Read="read",e.Update="update",e.Delete="delete",e.File="file",e.CustomerService="customerService",e.Access="access"}(EPermissionAction=EPermissionAction||{}),function(e){e.Folder="Folder",e.TDO="TDO",e.Organization="Organization",e.Source="Sources",e.Schedule="Schedules",e.Job="Job"}(EAuthResourceType=EAuthResourceType||{}),function(e){e.Group="group",e.Media="media",e.Package="package",e.User="user",e.Workflow="workflow",e.ProcessingCenter="processingCenter",e.ResourceCenter="resourceCenter"}(EAuthSubResourceType=EAuthSubResourceType||{});const orgRightsByObjectPermission={[EAuthResourceType.TDO]:{create:["cms.media.create","recording.create"],read:["cms.media.read","recording.read"],update:["cms.media.update","recording.update"],delete:["cms.media.delete","recording.delete"]},[EAuthResourceType.Folder]:{create:["cms.media.create","recording.create"],read:["cms.media.read","recording.read"],update:["cms.media.update","recording.update"],delete:["cms.media.delete","recording.delete"],file:["cms.media.create","recording.create"]},[EAuthResourceType.Source]:{create:["cms.media.create","recording.create"],read:["cms.media.read","recording.read"],update:["cms.media.update","recording.update","source.update"],delete:["cms.media.delete","recording.delete"]},[EAuthResourceType.Job]:{customerService:["cms.customerservice"],create:["job.create"],read:["job.read"],update:["job.update"],delete:["job.delete"]},[EAuthResourceType.Schedule]:{customerService:["cms.customerservice"],create:["job.create"],read:["job.read"],update:["job.update"],delete:["job.delete"]},[EAuthSubResourceType.User]:{create:["admin.user.create"],delete:["admin.user.delete"]},[EAuthSubResourceType.Group]:{create:["admin.group.create"],delete:["admin.group.delete"]},[EAuthSubResourceType.Package]:{update:["developer.build.update"]}},permissionActionsToFetchByObjectType={[EAuthResourceType.TDO]:{create:"AIWARE_TDO_CREATE",read:"AIWARE_TDO_READ",update:"AIWARE_TDO_UPDATE",delete:"AIWARE_TDO_DELETE"},[EAuthResourceType.Folder]:{create:"AIWARE_FOLDER_CREATE",read:"AIWARE_FOLDER_READ",update:"AIWARE_FOLDER_UPDATE",delete:"AIWARE_FOLDER_DELETE",file:"AIWARE_FOLDER_FILE"},[EAuthResourceType.Source]:{create:"AIWARE_SOURCES_CREATE",read:"AIWARE_SOURCES_READ",update:"AIWARE_SOURCES_UPDATE",delete:"AIWARE_SOURCES_DELETE"},[EAuthResourceType.Job]:{customerService:"CMS_CUSTOMERSERVICE",create:"AIWARE_JOB_CREATE",read:"AIWARE_JOB_READ",update:"AIWARE_JOB_UPDATE",delete:"AIWARE_JOB_DELETE"},[EAuthResourceType.Schedule]:{customerService:"CMS_CUSTOMERSERVICE",create:"AIWARE_JOB_CREATE",read:"AIWARE_JOB_READ",update:"AIWARE_JOB_UPDATE",delete:"AIWARE_JOB_DELETE"},[EAuthResourceType.Organization]:{[EAuthSubResourceType.Group]:{create:"AIWARE_GROUP_CREATE",delete:"AIWARE_GROUP_DELETE"},[EAuthSubResourceType.Package]:{create:"AIWARE_PACKAGE_CREATE",read:"AIWARE_PACKAGE_READ",update:"AIWARE_PACKAGE_UPDATE",delete:"AIWARE_PACKAGE_DELETE"},[EAuthSubResourceType.User]:{create:"AIWARE_USER_CREATE",delete:"AIWARE_USER_DELETE"},[EAuthSubResourceType.ResourceCenter]:{access:"AIWARE_RESOURCE_CENTER_ACCESS"}}},permissionTypeToFetchByEntityType={[EAuthResourceType.TDO]:[EAuthResourceType.TDO],[EAuthResourceType.Folder]:[EAuthResourceType.Folder],[EAuthResourceType.Source]:[EAuthResourceType.Source],[EAuthResourceType.Job]:[EAuthResourceType.Job],[EAuthResourceType.Schedule]:[EAuthResourceType.Schedule],[EAuthResourceType.Organization]:[EAuthResourceType.Organization,EAuthResourceType.TDO,EAuthResourceType.Folder,EAuthResourceType.Source,EAuthResourceType.Schedule,EAuthResourceType.Job]},authResourcesByEntityType={[EntityType.Folders]:EAuthResourceType.Folder,[EntityType.Tdos]:EAuthResourceType.TDO,[EntityType.Sources]:[EAuthResourceType.Source],[EntityType.Schedules]:[EAuthResourceType.Schedule]},convertEntityToAuthResource=e=>authResourcesByEntityType[e],convertPermissionsToRights=(e,t,n)=>{const r=(null==(e=orgRightsByObjectPermission[e])?void 0:e[t])||[];return 0<n.filter(e=>r&&r.includes(e)).length},permissionDetailIsActionPair=e=>Object.keys(e).some(e=>Object.values(EPermissionAction).includes(e)),getQueryActions=(e,t,n)=>({targetObjectType:e,targetActions:Object.keys(t).map(e=>({targetAction:e,serverName:t[e],resource:n}))}),getPermissionActions=(t,n)=>{return permissionDetailIsActionPair(t)?[getQueryActions(n,t)]:Object.keys(t).map(e=>getQueryActions(n,t[e]||{},e))},getPermissionTypesToQuery=e=>{return(permissionTypeToFetchByEntityType[e]||[]).flatMap(e=>getPermissionActions(permissionActionsToFetchByObjectType[e]||{},e))},isPermissionLoading=e=>!e||"pending"===e.status||"idle"===e.status,hasPermission=(e,t)=>!!e&&("failure"===e.status||e&&"success"===e.status&&e.permissions&&e.permissions[t]),namespace="permissions",initialState={permissionsByObject:{},rights:{status:"idle"}},slice=createSlice({name:namespace,initialState:initialState,reducers:{fetchObjectPermissionsStart(e,t){var{entityType:t,entityId:n}=t.payload;Object.prototype.hasOwnProperty.call(e.permissionsByObject,t)||(e.permissionsByObject[t]={}),Object.prototype.hasOwnProperty.call(e.permissionsByObject[t],n)||(e.permissionsByObject[t][n]={}),Object.prototype.hasOwnProperty.call(e.permissionsByObject[t][n],t)||(e.permissionsByObject[t][n][t]={status:"idle"})},fetchObjectPermissionsStarted(e,t){var{entityId:t,entityType:n}=t.payload;e.permissionsByObject[n][t][n].status="pending"},fetchObjectPermissionsSucceeded(t,e){const{entityType:n,entityId:r,permissions:i}=e.payload;Object.keys(i).forEach(e=>{t.permissionsByObject[n][r][e]={status:"success",permissions:i[e]}})},fetchObjectPermissionsFailed(e,t){var{entityType:t,entityId:n}=t.payload;e.permissionsByObject[t][n][t]={status:"failure"}},fetchMyRightsStarted(e){e.rights.status="pending"},fetchMyRightsSucceeded(e,t){e.rights.status="success",e.rights.myRights=t.payload},fetchMyRightsFailed(e){e.rights.status="failure"}}}),actions=slice.actions;var permissionsReducer=slice.reducer;function __awaiter(e,a,s,l){return new(s=s||Promise)(function(n,t){function r(e){try{o(l.next(e))}catch(e){t(e)}}function i(e){try{o(l.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,i)}o((l=l.apply(e,a||[])).next())})}function getObjectPermissions(u,d,p){var f;return __awaiter(this,void 0,void 0,function*(){var{entityType:e,entityId:t}=p,n="getPermissions",r=getPermissionTypesToQuery(e);let i=!1,o=[],a={};for(;!i;){var s=`
1524
1524
  query ${n}($entityType: AuthResourceType!, $entityId: ID!) {
1525
1525
  ${r.reduce((n,e)=>{const{targetObjectType:r,targetActions:t}=e;return t.forEach(e=>{var t=e.resource?`${r}__${e.resource}__`+e.targetAction:r+"__"+e.targetAction;o.includes(e.serverName)||n.push(`
1526
1526
  ${t}: hasPermissions(resourceType: $entityType, ids: [$entityId], permissions: [${e.serverName}]) {
@@ -1528,4 +1528,4 @@ createScheduledJob(input:{
1528
1528
  }
1529
1529
  `)}),n},[]).join("\r\n")}
1530
1530
  }
1531
- `,l={entityId:t,entityType:e};try{a=yield baseGraphQLApi({query:s,operationName:n,variables:l,graphEndpoint:u,token:d})}catch(e){i=!0}if(a.errors){if(0===(o=a.errors.filter(({message:e})=>e.includes(' does not exist in "AuthPermissionType" enum.')).map(({message:e})=>{var t='Value "',n=e.substring(t.length).indexOf('"');return e.substring(t.length,t.length+n)})).length)throw i=!0,a={},new Error((null==(f=(a.errors||[])[0])?void 0:f.message)||"Error")}else i=!0}const c=a.data||{};return Object.keys(c).map(e=>{var t=e.split("__");return 3===t.length?{fetchedTargetEntityType:t[0],fetchedTargetGroupType:t[1],fetchedTargetAction:t[2],hasPermission:c[e][0].hasPermission}:{fetchedTargetEntityType:t[0],fetchedTargetAction:t[1],hasPermission:c[e][0].hasPermission}}).reduce((e,t)=>{var n=t.fetchedTargetGroupType||t.fetchedTargetEntityType;return t.hasPermission&&(e[n]||(e[n]={}),e[n][t.fetchedTargetAction]=t.hasPermission),e},{})})}function getMyRights(t){return __awaiter(this,void 0,void 0,function*(){var e="getMyRights";return(yield baseGraphQLApiWithError(Object.assign({query:"\n query getMyRights {\n myRights {\n operations\n }\n }\n ",operationName:e},t))).myRights.operations})}const selectPermissionsByEntity=(t,n,r)=>e=>{return t&&n&&(e=e[namespace].permissionsByObject[t])&&e[n]?e[n][r||t]:void 0},selectMyRights=e=>e[namespace].rights;var index=Object.freeze({__proto__:null,selectPermissionsByEntity:selectPermissionsByEntity,selectMyRights:selectMyRights});function*fetchObjectPermissions(t){var{entityId:t,entityType:n}=t.payload,i=yield select(selectApiConfigs$2),e=yield select(graphEndpointSelector),o=yield select(sessionTokenSelector),a=yield select(selectIsOLPEnabled),r=yield select(selectPermissionsByEntity(n,t));if(!r||"success"!==r.status&&"pending"!==r.status){yield put(actions.fetchObjectPermissionsStarted({entityId:t,entityType:n}));try{let r={};if(a)r=yield call$j(getObjectPermissions,e,o,{entityType:n,entityId:t});else{let e=yield select(selectMyRights);if("success"!==e.status&&"pending"!==e.status){yield put(actions.fetchMyRightsStarted);try{var s=yield call$j(getMyRights,i);yield put(actions.fetchMyRightsSucceeded(s)),e=yield select(selectMyRights)}catch(e){throw yield put(actions.fetchMyRightsFailed),e}}else"pending"===e.status&&(yield take([actions.fetchMyRightsFailed,actions.fetchMyRightsSucceeded]),e=yield select(selectMyRights));const l=e["myRights"];getPermissionTypesToQuery(n).forEach(n=>{var{action:e,resource:t}=n.targetActions.reduce((e,t)=>(e.action[t.targetAction]=convertPermissionsToRights(t.resource||n.targetObjectType,t.targetAction,l),e.resource=t.resource,e),{action:{}});r[t||n.targetObjectType]=e})}yield put(actions.fetchObjectPermissionsSucceeded({entityId:t,entityType:n,permissions:r}))}catch(e){actions.fetchObjectPermissionsFailed({entityId:t,entityType:n})}}}function*watchPermissionsStart(){yield takeEvery$1(actions.fetchObjectPermissionsStart.type,fetchObjectPermissions)}function*rootSaga(){yield all$2([watchPermissionsStart()])}function getPermissionsModule(){return{id:namespace,reducerMap:{[namespace]:permissionsReducer},sagas:[rootSaga],initialActions:[]}}const useOrganizationPermissions=e=>{const t=react$1.exports.useRef(),n=useDispatch(),r=null==(o=useSelector(userSelector$2).organization)?void 0:o.organizationId,i=useSelector(selectPermissionsByEntity(EAuthResourceType.Organization,String(r),e));react$1.exports.useEffect(()=>{!r||i&&"failure"!==i.status&&"idle"!==i.status&&t.current===r||(t.current=r,n(actions.fetchObjectPermissionsStart({entityType:EAuthResourceType.Organization,entityId:String(r)})))},[n,r,i]);var o=react$1.exports.useCallback(e=>{return!isPermissionLoading(i)&&hasPermission(i,e)},[i]);return{permissions:i,hasPermission:o}},rateLimiter=new RateLimiter,checkAndDecodeBase64String=t=>{if(null==t||!t.trim())return t;try{return window.btoa(window.atob(t))==t?window.atob(t):t}catch(e){return t}};function SnackbarRenderer(){return jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$5},{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getSnackbarModule()]},{children:jsxRuntime.exports.jsx(CustomSnackbar,{})}))}))}store$5.addModules([getWidgetsModule(),getPanelsModule(registry,registryLookup),getDataModule(),getConfigModule(),getAuthModule(),getPermissionsModule()]);let hasLoaded=!1;const AppBarPreLoader=()=>{var e=useSelector(authSelector);return(null==(e=null==e?void 0:e.user)?void 0:e.token)&&!hasLoaded&&(hasLoaded=!0,setTimeout(()=>{store$5.addModules([getAppbarPanelModule()])},0)),null};function ApplicationDialogPreLoader(){var e=useSelector(authSelector);return(null==(e=null==e?void 0:e.user)?void 0:e.token)&&hasLoaded?jsxRuntime.exports.jsx(ApplicationDialog,{}):null}const authHelpers={updateToken(e){e?store$5.dispatch(updateTokenRequest({token:e})):console.error("[AiWARE JS]: Please provide a valid token!")},logout(e){"function"==typeof e?(e(),setTimeout(()=>{store$5.dispatch(logout())},1e3)):store$5.dispatch(logout())},reportAppActivity(e){rateLimiter.checkIfCanCall(e)&&store$5.dispatch(updateActivityStatus$1())}};function PortalRenderer(){return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(SupportCenterPixel,{}),jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$5},{children:jsxRuntime.exports.jsx(AppBarPreLoader,{})}))]})}function ApplicationDialogRenderer(){return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$5},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(ApplicationDialogPreLoader,{})})}))})}const ThemeInitializer=()=>(useTheme(),null),root=getElement("aiWARE"),reactDOMroot=(root.classList.add("aiware-el"),client$1.createRoot(root)),mountWidget=("_auth"===window.name?handleImplicitRedirect(window.location.hash,window.opener):reactDOMroot.render(jsxRuntime.exports.jsx(AIWareCacheProvider,{children:jsxRuntime.exports.jsxs(AIWareThemeProvider$1,{children:[jsxRuntime.exports.jsx(PortalRenderer,{}),jsxRuntime.exports.jsx(SnackbarRenderer,{}),jsxRuntime.exports.jsx(ApplicationDialogRenderer,{}),jsxRuntime.exports.jsx(ThemeInitializer,{})]})})),(e,t)=>{var n=getUniqueID(),{name:e,elementId:r,config:i}=e;return e&&r&&i||console.error("[aiwarejs-error]: `mountWidget` function should include all the following params: name, elementId, config"),store$5.dispatch(mountWidget$1({elementId:r,widgetName:e,widgetConfig:i,widgetId:n,onComplete:t})),n}),unmountWidget=e=>(store$5.dispatch(unmountWidget$1(e)),!0),mountPanel=(e,t)=>{const n=e.panelId||getUniqueID();var{microFrontend:e,panelConfig:r}=e;store$5.dispatch(mountPanel$1({microFrontend:e,panelId:n,panelConfig:r}));const i=[...(null==(e=null==r?void 0:r.header)?void 0:e.actions)||[],...(null==(e=null==r?void 0:r.footer)?void 0:e.actions)||[]].filter(e=>e.submit).map(e=>e.action);r={id:n,sagas:[function*(){yield takeEvery$1(i.map(e=>e.type),function*(){var e=(yield select(e=>e.data.find(e=>e.id===n)))["data"];t&&t(e)})}]};return store$5.addModule(r),n},unmountPanel=e=>(store$5.dispatch(unmountPanel$1(e)),!0),hidePanel=e=>(store$5.dispatch(hidePanel$1(e)),!0),unmountAllPanel=()=>{store$5.dispatch(unmountAllPanel$1(""))};function init(e,t){var n,e=validateConfig(e);e?(n=e["authToken"],n=checkAndDecodeBase64String(n||""),store$5.dispatch(getInitConfig(Object.assign(Object.assign({},e),{authToken:n,onComplete:t})))):console.error("@aiware/js initialization failed. Please pass valid configuration object.")}function helpCenter(){var e=new HelpCenter$2({actions:{setCustomKnowledgeBaseUrlAction:setCustomKnowledgeBaseUrl,setCustomDocsUrlAction:setCustomDocsUrl,updateSelectedTabAction:updateSelectedTab}});return{openKnowledgeBasePanel:e.openKnowledgeBasePanel.bind(e),openDocsPanel:e.openDocsPanel.bind(e)}}function dataCenter(){var e=new DataCenter$1;return{openImporterPanel:e.openImporterPanel.bind(e)}}function handleEvents(){function n(e){if(!e||"string"!=typeof e)throw new SdkError("Please provide a valid event name!");if(!SdkEvents[e])throw new SdkError("Unknown event: "+e)}return{on:function(e,t){n(e),sdkEventManager.on.call(sdkEventManager,e,t)},off:function(e){n(e),sdkEventManager.off.call(sdkEventManager,e)}}}const mountPanelForResponse=e=>mountPanelForResponse$1(e,store$5),aiwareEvents=handleEvents();window&&(window.aiWare_initTesting=()=>{window.aiWare_store=store$5,window.aiWare_theme={darkTheme:darkTheme$1,lightTheme:lightTheme$1}},window.aiware={init:init,auth:authHelpers,helpCenter:helpCenter(),dataCenter:dataCenter(),on:aiwareEvents.on,off:aiwareEvents.off,hidePanel:hidePanel,unmountPanel:unmountPanel,store:store$5,registry:registry,registerComponent:registerComponent,AvailableWidgets:AvailableWidgets,mountPanelAction:mountPanel$1,unmountPanelAction:unmountPanel$1,hidePanelAction:hidePanel$1,updatePanelMicroFrontendPropsAction:updatePanelMicroFrontendProps,setData:setData,mountWidget:mountWidget,mountPanel:mountPanel,mountPanelForResponse:mountPanelForResponse,unmountWidget:unmountWidget,version:"sdk_release_version",commit:"ca24191ed",releaseDate:"2023-08-29T19:53:19.300Z"});export{Select$1 as $,AIWareIntlProvider as A,Box$1 as B,devErrorLogger as C,useLocation as D,DynamicModuleLoader as E,FormattedMessage$1 as F,Button$1 as G,useSearchParams as H,img$5 as I,StyledEngineProvider as J,LoadingButton$1 as K,LinearProgress$1 as L,authErrorMessage as M,Grid$1 as N,FormControl$1 as O,Provider$2 as P,TextField$1 as Q,Routes as R,Switch$1 as S,Typography$1 as T,classNames as U,resetPasswordRequest as V,InputLabel$1 as W,OutlinedInput$1 as X,InputAdornment$1 as Y,IconButton$1 as Z,_extends$3 as _,generateUtilityClasses as a,takeLatest$1 as a$,Location as a0,MenuItem$1 as a1,Divider$1 as a2,enableBetaFeatures as a3,Popover$1 as a4,all$2 as a5,CheckmarkFilled as a6,Bullet as a7,debounce_1 as a8,takeEvery$1 as a9,ENGINE_OWNER_TYPES as aA,ENGINE_FILTER_TYPES as aB,preferredLanguageSelector as aC,baseUrlSelector as aD,rootApiSelector as aE,sessionTokenSelector as aF,graphEndpointSelector as aG,controllerNodeRedImageSelector as aH,controllerUrlSelector as aI,automateControllerUrlSelector as aJ,flowCenterDialogSelector as aK,automateUrlSelector as aL,Portal$1 as aM,flowCenterDialogReducer as aN,List$2 as aO,ListItem$1 as aP,ListItemIcon$1 as aQ,ListItemText$1 as aR,flowCenterDialogAction as aS,img$q as aT,img$r as aU,img$t as aV,img$u as aW,Tooltip$1 as aX,img$k as aY,img$J as aZ,Skeleton$1 as a_,select as aa,call$j as ab,put as ac,showMessage as ad,MessageSeverity as ae,createTheme$1 as af,systemStyled as ag,useThemeProps$1 as ah,useId as ai,useControlled$1 as aj,usePreviousProps$1 as ak,useEventCallback as al,setRef as am,inputClasses$1 as an,inputBaseClasses$1 as ao,outlinedInputClasses$1 as ap,filledInputClasses$1 as aq,Popper$1 as ar,alpha as as,ListSubheader$1 as at,ClearIcon as au,ArrowDropDownIcon as av,Chip$1 as aw,createBox$1 as ax,createAction as ay,createReducer as az,styled$1 as b,__generator$2 as b$,fetchAllTags as b0,fetchFlows as b1,fetchTemplateGallery as b2,isRevisionsExistOnServerRequest as b3,FormLabel$1 as b4,default_1$e as b5,FormGroup$1 as b6,FormControlLabel$1 as b7,Checkbox$1 as b8,fetchTemplateGalleryFallback as b9,DialogContent$1 as bA,DialogActions$1 as bB,Snackbar$1 as bC,default_1$6 as bD,Search$1 as bE,img$l as bF,img$n as bG,img$X as bH,Tabs$2 as bI,Tab$2 as bJ,deleteEngine as bK,fetchEngine as bL,img$m as bM,AIWareFormatMessage as bN,FormattedDate as bO,fetchVeritoneGraphQLApi as bP,useTheme as bQ,KeyboardArrowRight as bR,KeyboardArrowLeft as bS,InputUnstyled as bT,isHostComponent as bU,getDefaultExportFromNamespaceIfNotNamed as bV,commonjsRequire as bW,reactDom as bX,Transition$1 as bY,_defineProperty$x as bZ,__awaiter$e as b_,Card$1 as ba,CardContent$1 as bb,img$o as bc,CardActions$1 as bd,flowStyles as be,NoResults as bf,CircularProgress$1 as bg,img$e as bh,Dialog$1 as bi,setApiEndpoint as bj,TableContainer$1 as bk,Table$1 as bl,TableHead$1 as bm,TableRow$1 as bn,TableCell$1 as bo,TableSortLabel$1 as bp,TableBody$1 as bq,img$j as br,default_1 as bs,ClickAwayListener as bt,Fade$1 as bu,img$v as bv,img$s as bw,img$T as bx,img$F as by,DialogTitle$1 as bz,Paper$1 as c,ReactMarkdown as c$,__spread as c0,React5 as c1,PropTypes as c2,TransitionGroup$1 as c3,connect$1 as c4,Bookmark as c5,EngineFlagIcons as c6,createAsyncThunk as c7,withStyles as c8,getConfigModule as c9,lightTheme$1 as cA,CssBaseline as cB,Hide as cC,has_1 as cD,Radio$2 as cE,createSvgIcon$2 as cF,_createCompounder as cG,_typeof$D as cH,_assertThisInitialized$x as cI,_setPrototypeOf$z as cJ,_toPropertyKey as cK,_inheritsLoose$2 as cL,hoistNonReactStatics_cjs as cM,commonjsGlobal$2 as cN,combineReducers as cO,createSelector$1 as cP,fork as cQ,statusPill as cR,AIWareThemeProvider$1 as cS,LocalizationProvider as cT,AdapterDateFns as cU,CalendarPicker as cV,Stack$4 as cW,Close$1 as cX,FullscreenExit as cY,Fullscreen as cZ,TabPanel as c_,getAuthModule as ca,getSnackbarModule as cb,AIWareCacheProvider as cc,img$U as cd,img$g as ce,img$f as cf,isEmpty_1 as cg,find_1 as ch,Backdrop$1 as ci,getDefaultMiddleware as cj,isNil_1 as ck,useForm as cl,UpDown as cm,Icon$1 as cn,get_1 as co,map_1 as cp,keys_1 as cq,RadioGroup$1 as cr,Avatar$1 as cs,img$z as ct,baseGraphQLApi as cu,default_1$9 as cv,Controller as cw,FormHelperText$2 as cx,img$i as cy,ThemeProvider as cz,capitalize$2 as d,CurlyBraces as d$,default_1$8 as d0,unmountPanel$1 as d1,AvailableComponents as d2,delay$1 as d3,hidePanel$1 as d4,mountPanel$1 as d5,DialogContentText$1 as d6,userSelector$2 as d7,MoreVert$1 as d8,Menu$1 as d9,_baseTrim as dA,_castSlice as dB,_stringToArray as dC,toString_1 as dD,upperFirst_1 as dE,isArrayLike_1 as dF,isString_1 as dG,toInteger_1 as dH,_baseGet as dI,_baseSlice as dJ,_castPath as dK,_toKey as dL,_isIndex as dM,channel$2 as dN,useFormContext as dO,useIntl as dP,useFieldArray as dQ,VideoCamera as dR,Image$1 as dS,Sound as dT,Description as dU,toNumber_1 as dV,FormProvider as dW,ProgressStepper as dX,size_1 as dY,findIndex_1 as dZ,take as d_,Edit as da,Upload as db,Delete$1 as dc,CustomTabs as dd,useBackupImg as de,img$1C as df,validate as dg,configSelector as dh,baseGraphQLApiWithError as di,VerifiedFilled as dj,Add as dk,ExpandLess$1 as dl,ExpandMore$1 as dm,Collapse$1 as dn,img$19 as dp,Filter$1 as dq,DynamicTable as dr,useTheme$3 as ds,getThemeProps as dt,useEnhancedEffect$3 as du,React as dv,_arrayPush as dw,isArray_1 as dx,_baseIteratee as dy,_baseToString as dz,_objectWithoutPropertiesLoose$2 as e,Information as e$,UnknownDocument as e0,VariableSizeList as e1,sdkEventManager as e2,SdkEvents as e3,SdkError as e4,distributionTypes as e5,EngineClassIcons as e6,Mode2 as e7,EngineModeIcons as e8,DeploymentModelIcons as e9,isSymbol_1 as eA,_baseMap as eB,_baseUnary as eC,_baseFindIndex as eD,_Set as eE,_setToArray as eF,_SetCache as eG,_cacheHas as eH,img$Q as eI,img$P as eJ,img$1y as eK,img$1x as eL,img$1w as eM,img$N as eN,img$1A as eO,img$M as eP,authSelector as eQ,ListItemAvatar$1 as eR,emphasize as eS,useSlotProps as eT,_arraySome as eU,EntityType as eV,generateState as eW,injectIntl as eX,ErrorBoundary$1 as eY,EPermissionAction as eZ,Process as e_,markdown as ea,guid as eb,EditList as ec,ButtonBase$1 as ed,isObject_1 as ee,_arrayMap as ef,_Symbol as eg,isArguments_1 as eh,_baseEach as ei,_arrayFilter as ej,_getNative as ek,eq_1 as el,_root as em,_Uint8Array as en,_overArg as eo,_isPrototype as ep,isObjectLike_1 as eq,_baseGetTag as er,_arrayLikeKeys as es,isBuffer$5 as et,isFunction_1 as eu,isTypedArray_1 as ev,_Stack as ew,_baseFor as ex,identity_1 as ey,_isIterateeCall as ez,clsx as f,index$1 as f$,Download as f0,NewFolder as f1,SpecialFolder as f2,User as f3,Source as f4,Search$2 as f5,selectIsOLPEnabled as f6,ListItemSecondaryAction$1 as f7,getLibraryModule as f8,cmsUrlSelector as f9,FixedSizeList as fA,selectUserOrgEdgeVersion as fB,EditAttributes as fC,gqlIntrospection as fD,ProcessingDetail as fE,img$y as fF,img$A as fG,img$6 as fH,FilterRemove as fI,AlarmTwo as fJ,tableInfiniteScroll as fK,CheckCircle as fL,FolderOpen as fM,Voice as fN,useDoubleClick as fO,FolderFilled as fP,Time as fQ,img$B as fR,Undefined as fS,PodcastSource as fT,YoutubeSource as fU,TVSource as fV,RadioSource as fW,selectOrgId as fX,navSectionStyles as fY,selectIsUserAdmin as fZ,AvatarGroup$1 as f_,SearchStructuredData as fa,Grow$1 as fb,index as fc,actions as fd,hasPermission as fe,UserAddFilled as ff,MenuList$1 as fg,MoveFolder as fh,EAuthResourceType as fi,Slide$1 as fj,img$c as fk,selectApiConfigs$2 as fl,selectPanelByPanelName as fm,FullScreenContainer as fn,EngineCategoryIcons as fo,isPermissionLoading as fp,Settings$2 as fq,Hamburger as fr,List as fs,enginesFilter as ft,panelsSelector as fu,Badge$1 as fv,MoreHor as fw,convertEntityToAuthResource as fx,AutoSizer as fy,InfiniteLoader as fz,generateUtilityClass as g,View as g$,ErrorState$2 as g0,Stepper$1 as g1,StepConnector$1 as g2,Step$1 as g3,StepLabel$1 as g4,isEqual_1 as g5,NullState$2 as g6,Group as g7,PermissionChangedAction as g8,Lock as g9,green$1 as gA,md5 as gB,selectIsSuperAdmin as gC,organizations_selector as gD,actions$5 as gE,AddUser as gF,selectors as gG,LibraryDropdown as gH,Remove as gI,Save as gJ,Input$3 as gK,getElement as gL,client$1 as gM,Copy as gN,ArrowForward as gO,Modal$1 as gP,Slider$1 as gQ,getDefaultExportFromCjs as gR,_getSymbols as gS,stubArray_1 as gT,_baseGetAllKeys as gU,_getTag as gV,_nodeUtil as gW,_getAllKeys as gX,_castFunction as gY,Article as gZ,Task as g_,useOrganizationPermissions as ga,EAuthSubResourceType as gb,AddGroup as gc,initialConfigSelector as gd,EMessageTypes as ge,errors as gf,ConfirmationModal as gg,EnumHelpers as gh,formatBytes as gi,NotInterested as gj,mountPanelForResponse$1 as gk,default_1$a as gl,tableStyles as gm,ArrowDown as gn,ArrowUp as go,useInterval as gp,Iam as gq,safeFormatMessage as gr,contextMenuStyles as gs,Users as gt,SecurityGroup as gu,getOrganizationPanelModule as gv,Lock2 as gw,EApplicationConfigLevel as gx,NoApps as gy,EApplicationConfigType as gz,composeClasses as h,mountPanel as h$,_objectSpread2 as h0,serialize as h1,stringify$4 as h2,compile as h3,isNumber_1 as h4,Check as h5,EngineIconsRenderer as h6,FormattedRelativeTime$1 as h7,BottomQueue as h8,TopQueue as h9,PackagesAvatar as hA,actionChannel as hB,cancelled as hC,flush$4 as hD,tableSearchComponents as hE,cancel as hF,FlowTemplate as hG,Node as hH,Palette as hI,FlowCenter2 as hJ,ArrowBack as hK,Schema$1 as hL,panelComponents as hM,img$1 as hN,img$x as hO,AutomateNode as hP,Clear as hQ,ExpandLess as hR,ExpandMore as hS,registry as hT,registerComponent as hU,AvailableWidgets as hV,updatePanelMicroFrontendProps as hW,setData as hX,root as hY,mountWidget as hZ,unmountWidget as h_,Pause as ha,Cancel as hb,Folder as hc,Hidden as hd,dateRangeFilter as he,statusFilter as hf,TableLoadingState as hg,setDuration as hh,resetDuration as hi,createStack as hj,ButtonGroupContext$1 as hk,toFinite_1 as hl,_baseForOwn as hm,_arrayReduce as hn,hasIn_1 as ho,now_1 as hp,useSyncExternalStoreExports as hq,Engines as hr,EngineComponentLoader as hs,EngineFieldType as ht,imageUpload as hu,characterCountTextField as hv,tabsClasses$1 as hw,Packages as hx,Resources$1 as hy,selectUserCanCreatePackage as hz,createSvgIcon$1 as i,unmountPanel as i0,hidePanel as i1,unmountAllPanel as i2,init as i3,aiwareEvents as i4,jsxRuntime as j,interopRequireDefault as k,createSlice as l,makeStyles as m,Route as n,useDispatch as o,useSelector as p,authStatusSelector as q,react$1 as r,store$5 as s,authContextSelector as t,useThemeProps as u,AuthContext as v,lodash as w,Alert$1 as x,betaFeaturesSelector as y,useNavigate as z};
1531
+ `,l={entityId:t,entityType:e};try{a=yield baseGraphQLApi({query:s,operationName:n,variables:l,graphEndpoint:u,token:d})}catch(e){i=!0}if(a.errors){if(0===(o=a.errors.filter(({message:e})=>e.includes(' does not exist in "AuthPermissionType" enum.')).map(({message:e})=>{var t='Value "',n=e.substring(t.length).indexOf('"');return e.substring(t.length,t.length+n)})).length)throw i=!0,a={},new Error((null==(f=(a.errors||[])[0])?void 0:f.message)||"Error")}else i=!0}const c=a.data||{};return Object.keys(c).map(e=>{var t=e.split("__");return 3===t.length?{fetchedTargetEntityType:t[0],fetchedTargetGroupType:t[1],fetchedTargetAction:t[2],hasPermission:c[e][0].hasPermission}:{fetchedTargetEntityType:t[0],fetchedTargetAction:t[1],hasPermission:c[e][0].hasPermission}}).reduce((e,t)=>{var n=t.fetchedTargetGroupType||t.fetchedTargetEntityType;return t.hasPermission&&(e[n]||(e[n]={}),e[n][t.fetchedTargetAction]=t.hasPermission),e},{})})}function getMyRights(t){return __awaiter(this,void 0,void 0,function*(){var e="getMyRights";return(yield baseGraphQLApiWithError(Object.assign({query:"\n query getMyRights {\n myRights {\n operations\n }\n }\n ",operationName:e},t))).myRights.operations})}const selectPermissionsByEntity=(t,n,r)=>e=>{return t&&n&&(e=e[namespace].permissionsByObject[t])&&e[n]?e[n][r||t]:void 0},selectMyRights=e=>e[namespace].rights;var index=Object.freeze({__proto__:null,selectPermissionsByEntity:selectPermissionsByEntity,selectMyRights:selectMyRights});function*fetchObjectPermissions(t){var{entityId:t,entityType:n}=t.payload,i=yield select(selectApiConfigs$2),e=yield select(graphEndpointSelector),o=yield select(sessionTokenSelector),a=yield select(selectIsOLPEnabled),r=yield select(selectPermissionsByEntity(n,t));if(!r||"success"!==r.status&&"pending"!==r.status){yield put(actions.fetchObjectPermissionsStarted({entityId:t,entityType:n}));try{let r={};if(a)r=yield call$j(getObjectPermissions,e,o,{entityType:n,entityId:t});else{let e=yield select(selectMyRights);if("success"!==e.status&&"pending"!==e.status){yield put(actions.fetchMyRightsStarted);try{var s=yield call$j(getMyRights,i);yield put(actions.fetchMyRightsSucceeded(s)),e=yield select(selectMyRights)}catch(e){throw yield put(actions.fetchMyRightsFailed),e}}else"pending"===e.status&&(yield take([actions.fetchMyRightsFailed,actions.fetchMyRightsSucceeded]),e=yield select(selectMyRights));const l=e["myRights"];getPermissionTypesToQuery(n).forEach(n=>{var{action:e,resource:t}=n.targetActions.reduce((e,t)=>(e.action[t.targetAction]=convertPermissionsToRights(t.resource||n.targetObjectType,t.targetAction,l),e.resource=t.resource,e),{action:{}});r[t||n.targetObjectType]=e})}yield put(actions.fetchObjectPermissionsSucceeded({entityId:t,entityType:n,permissions:r}))}catch(e){actions.fetchObjectPermissionsFailed({entityId:t,entityType:n})}}}function*watchPermissionsStart(){yield takeEvery$1(actions.fetchObjectPermissionsStart.type,fetchObjectPermissions)}function*rootSaga(){yield all$2([watchPermissionsStart()])}function getPermissionsModule(){return{id:namespace,reducerMap:{[namespace]:permissionsReducer},sagas:[rootSaga],initialActions:[]}}const useOrganizationPermissions=e=>{const t=react$1.exports.useRef(),n=useDispatch(),r=null==(o=useSelector(userSelector$2).organization)?void 0:o.organizationId,i=useSelector(selectPermissionsByEntity(EAuthResourceType.Organization,String(r),e));react$1.exports.useEffect(()=>{!r||i&&"failure"!==i.status&&"idle"!==i.status&&t.current===r||(t.current=r,n(actions.fetchObjectPermissionsStart({entityType:EAuthResourceType.Organization,entityId:String(r)})))},[n,r,i]);var o=react$1.exports.useCallback(e=>{return!isPermissionLoading(i)&&hasPermission(i,e)},[i]);return{permissions:i,hasPermission:o}},rateLimiter=new RateLimiter,checkAndDecodeBase64String=t=>{if(null==t||!t.trim())return t;try{return window.btoa(window.atob(t))==t?window.atob(t):t}catch(e){return t}};function SnackbarRenderer(){return jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$5},{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getSnackbarModule()]},{children:jsxRuntime.exports.jsx(CustomSnackbar,{})}))}))}store$5.addModules([getWidgetsModule(),getPanelsModule(registry,registryLookup),getDataModule(),getConfigModule(),getAuthModule(),getPermissionsModule()]);let hasLoaded=!1;const AppBarPreLoader=()=>{var e=useSelector(authSelector);return(null==(e=null==e?void 0:e.user)?void 0:e.token)&&!hasLoaded&&(hasLoaded=!0,setTimeout(()=>{store$5.addModules([getAppbarPanelModule()])},0)),null};function ApplicationDialogPreLoader(){var e=useSelector(authSelector);return(null==(e=null==e?void 0:e.user)?void 0:e.token)&&hasLoaded?jsxRuntime.exports.jsx(ApplicationDialog,{}):null}const authHelpers={updateToken(e){e?store$5.dispatch(updateTokenRequest({token:e})):console.error("[AiWARE JS]: Please provide a valid token!")},logout(e){"function"==typeof e?(e(),setTimeout(()=>{store$5.dispatch(logout())},1e3)):store$5.dispatch(logout())},reportAppActivity(e){rateLimiter.checkIfCanCall(e)&&store$5.dispatch(updateActivityStatus$1())}};function PortalRenderer(){return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(SupportCenterPixel,{}),jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$5},{children:jsxRuntime.exports.jsx(AppBarPreLoader,{})}))]})}function ApplicationDialogRenderer(){return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$5},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(ApplicationDialogPreLoader,{})})}))})}const ThemeInitializer=()=>(useTheme(),null),root=getElement("aiWARE"),reactDOMroot=(root.classList.add("aiware-el"),client$1.createRoot(root)),mountWidget=("_auth"===window.name?handleImplicitRedirect(window.location.hash,window.opener):reactDOMroot.render(jsxRuntime.exports.jsx(AIWareCacheProvider,{children:jsxRuntime.exports.jsxs(AIWareThemeProvider$1,{children:[jsxRuntime.exports.jsx(PortalRenderer,{}),jsxRuntime.exports.jsx(SnackbarRenderer,{}),jsxRuntime.exports.jsx(ApplicationDialogRenderer,{}),jsxRuntime.exports.jsx(ThemeInitializer,{})]})})),(e,t)=>{var n=getUniqueID(),{name:e,elementId:r,config:i}=e;return e&&r&&i||console.error("[aiwarejs-error]: `mountWidget` function should include all the following params: name, elementId, config"),store$5.dispatch(mountWidget$1({elementId:r,widgetName:e,widgetConfig:i,widgetId:n,onComplete:t})),n}),unmountWidget=e=>(store$5.dispatch(unmountWidget$1(e)),!0),mountPanel=(e,t)=>{const n=e.panelId||getUniqueID();var{microFrontend:e,panelConfig:r}=e;store$5.dispatch(mountPanel$1({microFrontend:e,panelId:n,panelConfig:r}));const i=[...(null==(e=null==r?void 0:r.header)?void 0:e.actions)||[],...(null==(e=null==r?void 0:r.footer)?void 0:e.actions)||[]].filter(e=>e.submit).map(e=>e.action);r={id:n,sagas:[function*(){yield takeEvery$1(i.map(e=>e.type),function*(){var e=(yield select(e=>e.data.find(e=>e.id===n)))["data"];t&&t(e)})}]};return store$5.addModule(r),n},unmountPanel=e=>(store$5.dispatch(unmountPanel$1(e)),!0),hidePanel=e=>(store$5.dispatch(hidePanel$1(e)),!0),unmountAllPanel=()=>{store$5.dispatch(unmountAllPanel$1(""))};function init(e,t){var n,e=validateConfig(e);e?(n=e["authToken"],n=checkAndDecodeBase64String(n||""),store$5.dispatch(getInitConfig(Object.assign(Object.assign({},e),{authToken:n,onComplete:t})))):console.error("@aiware/js initialization failed. Please pass valid configuration object.")}function helpCenter(){var e=new HelpCenter$2({actions:{setCustomKnowledgeBaseUrlAction:setCustomKnowledgeBaseUrl,setCustomDocsUrlAction:setCustomDocsUrl,updateSelectedTabAction:updateSelectedTab}});return{openKnowledgeBasePanel:e.openKnowledgeBasePanel.bind(e),openDocsPanel:e.openDocsPanel.bind(e)}}function dataCenter(){var e=new DataCenter$1;return{openImporterPanel:e.openImporterPanel.bind(e)}}function handleEvents(){function n(e){if(!e||"string"!=typeof e)throw new SdkError("Please provide a valid event name!");if(!SdkEvents[e])throw new SdkError("Unknown event: "+e)}return{on:function(e,t){n(e),sdkEventManager.on.call(sdkEventManager,e,t)},off:function(e){n(e),sdkEventManager.off.call(sdkEventManager,e)}}}const mountPanelForResponse=e=>mountPanelForResponse$1(e,store$5),aiwareEvents=handleEvents();window&&(window.aiWare_initTesting=()=>{window.aiWare_store=store$5,window.aiWare_theme={darkTheme:darkTheme$1,lightTheme:lightTheme$1}},window.aiware={init:init,auth:authHelpers,helpCenter:helpCenter(),dataCenter:dataCenter(),on:aiwareEvents.on,off:aiwareEvents.off,hidePanel:hidePanel,unmountPanel:unmountPanel,store:store$5,registry:registry,registerComponent:registerComponent,AvailableWidgets:AvailableWidgets,mountPanelAction:mountPanel$1,unmountPanelAction:unmountPanel$1,hidePanelAction:hidePanel$1,updatePanelMicroFrontendPropsAction:updatePanelMicroFrontendProps,setData:setData,mountWidget:mountWidget,mountPanel:mountPanel,mountPanelForResponse:mountPanelForResponse,unmountWidget:unmountWidget,version:"sdk_release_version",commit:"d24cae2ce",releaseDate:"2023-08-29T23:44:45.348Z"});export{Select$1 as $,AIWareIntlProvider as A,Box$1 as B,devErrorLogger as C,useLocation as D,DynamicModuleLoader as E,FormattedMessage$1 as F,Button$1 as G,useSearchParams as H,img$5 as I,StyledEngineProvider as J,LoadingButton$1 as K,LinearProgress$1 as L,authErrorMessage as M,Grid$1 as N,FormControl$1 as O,Provider$2 as P,TextField$1 as Q,Routes as R,Switch$1 as S,Typography$1 as T,classNames as U,resetPasswordRequest as V,InputLabel$1 as W,OutlinedInput$1 as X,InputAdornment$1 as Y,IconButton$1 as Z,_extends$3 as _,generateUtilityClasses as a,takeLatest$1 as a$,Location as a0,MenuItem$1 as a1,Divider$1 as a2,enableBetaFeatures as a3,Popover$1 as a4,all$2 as a5,CheckmarkFilled as a6,Bullet as a7,debounce_1 as a8,takeEvery$1 as a9,ENGINE_OWNER_TYPES as aA,ENGINE_FILTER_TYPES as aB,preferredLanguageSelector as aC,baseUrlSelector as aD,rootApiSelector as aE,sessionTokenSelector as aF,graphEndpointSelector as aG,controllerNodeRedImageSelector as aH,controllerUrlSelector as aI,automateControllerUrlSelector as aJ,flowCenterDialogSelector as aK,automateUrlSelector as aL,Portal$1 as aM,flowCenterDialogReducer as aN,List$2 as aO,ListItem$1 as aP,ListItemIcon$1 as aQ,ListItemText$1 as aR,flowCenterDialogAction as aS,img$q as aT,img$r as aU,img$t as aV,img$u as aW,Tooltip$1 as aX,img$k as aY,img$J as aZ,Skeleton$1 as a_,select as aa,call$j as ab,put as ac,showMessage as ad,MessageSeverity as ae,createTheme$1 as af,systemStyled as ag,useThemeProps$1 as ah,useId as ai,useControlled$1 as aj,usePreviousProps$1 as ak,useEventCallback as al,setRef as am,inputClasses$1 as an,inputBaseClasses$1 as ao,outlinedInputClasses$1 as ap,filledInputClasses$1 as aq,Popper$1 as ar,alpha as as,ListSubheader$1 as at,ClearIcon as au,ArrowDropDownIcon as av,Chip$1 as aw,createBox$1 as ax,createAction as ay,createReducer as az,styled$1 as b,__generator$2 as b$,fetchAllTags as b0,fetchFlows as b1,fetchTemplateGallery as b2,isRevisionsExistOnServerRequest as b3,FormLabel$1 as b4,default_1$e as b5,FormGroup$1 as b6,FormControlLabel$1 as b7,Checkbox$1 as b8,fetchTemplateGalleryFallback as b9,DialogContent$1 as bA,DialogActions$1 as bB,Snackbar$1 as bC,default_1$6 as bD,Search$1 as bE,img$l as bF,img$n as bG,img$X as bH,Tabs$2 as bI,Tab$2 as bJ,deleteEngine as bK,fetchEngine as bL,img$m as bM,AIWareFormatMessage as bN,FormattedDate as bO,fetchVeritoneGraphQLApi as bP,useTheme as bQ,KeyboardArrowRight as bR,KeyboardArrowLeft as bS,InputUnstyled as bT,isHostComponent as bU,getDefaultExportFromNamespaceIfNotNamed as bV,commonjsRequire as bW,reactDom as bX,Transition$1 as bY,_defineProperty$x as bZ,__awaiter$e as b_,Card$1 as ba,CardContent$1 as bb,img$o as bc,CardActions$1 as bd,flowStyles as be,NoResults as bf,CircularProgress$1 as bg,img$e as bh,Dialog$1 as bi,setApiEndpoint as bj,TableContainer$1 as bk,Table$1 as bl,TableHead$1 as bm,TableRow$1 as bn,TableCell$1 as bo,TableSortLabel$1 as bp,TableBody$1 as bq,img$j as br,default_1 as bs,ClickAwayListener as bt,Fade$1 as bu,img$v as bv,img$s as bw,img$T as bx,img$F as by,DialogTitle$1 as bz,Paper$1 as c,ReactMarkdown as c$,__spread as c0,React5 as c1,PropTypes as c2,TransitionGroup$1 as c3,connect$1 as c4,Bookmark as c5,EngineFlagIcons as c6,createAsyncThunk as c7,withStyles as c8,getConfigModule as c9,lightTheme$1 as cA,CssBaseline as cB,Hide as cC,has_1 as cD,Radio$2 as cE,createSvgIcon$2 as cF,_createCompounder as cG,_typeof$D as cH,_assertThisInitialized$x as cI,_setPrototypeOf$z as cJ,_toPropertyKey as cK,_inheritsLoose$2 as cL,hoistNonReactStatics_cjs as cM,commonjsGlobal$2 as cN,combineReducers as cO,createSelector$1 as cP,fork as cQ,statusPill as cR,AIWareThemeProvider$1 as cS,LocalizationProvider as cT,AdapterDateFns as cU,CalendarPicker as cV,Stack$4 as cW,Close$1 as cX,FullscreenExit as cY,Fullscreen as cZ,TabPanel as c_,getAuthModule as ca,getSnackbarModule as cb,AIWareCacheProvider as cc,img$U as cd,img$g as ce,img$f as cf,isEmpty_1 as cg,find_1 as ch,Backdrop$1 as ci,getDefaultMiddleware as cj,isNil_1 as ck,useForm as cl,UpDown as cm,Icon$1 as cn,get_1 as co,map_1 as cp,keys_1 as cq,RadioGroup$1 as cr,Avatar$1 as cs,img$z as ct,baseGraphQLApi as cu,default_1$9 as cv,Controller as cw,FormHelperText$2 as cx,img$i as cy,ThemeProvider as cz,capitalize$2 as d,CurlyBraces as d$,default_1$8 as d0,unmountPanel$1 as d1,AvailableComponents as d2,delay$1 as d3,hidePanel$1 as d4,mountPanel$1 as d5,DialogContentText$1 as d6,userSelector$2 as d7,MoreVert$1 as d8,Menu$1 as d9,_baseTrim as dA,_castSlice as dB,_stringToArray as dC,toString_1 as dD,upperFirst_1 as dE,isArrayLike_1 as dF,isString_1 as dG,toInteger_1 as dH,_baseGet as dI,_baseSlice as dJ,_castPath as dK,_toKey as dL,_isIndex as dM,channel$2 as dN,useFormContext as dO,useIntl as dP,useFieldArray as dQ,VideoCamera as dR,Image$1 as dS,Sound as dT,Description as dU,toNumber_1 as dV,FormProvider as dW,ProgressStepper as dX,size_1 as dY,findIndex_1 as dZ,take as d_,Edit as da,Upload as db,Delete$1 as dc,CustomTabs as dd,useBackupImg as de,img$1C as df,validate as dg,configSelector as dh,baseGraphQLApiWithError as di,VerifiedFilled as dj,Add as dk,ExpandLess$1 as dl,ExpandMore$1 as dm,Collapse$1 as dn,img$19 as dp,Filter$1 as dq,DynamicTable as dr,useTheme$3 as ds,getThemeProps as dt,useEnhancedEffect$3 as du,React as dv,_arrayPush as dw,isArray_1 as dx,_baseIteratee as dy,_baseToString as dz,_objectWithoutPropertiesLoose$2 as e,Information as e$,UnknownDocument as e0,VariableSizeList as e1,sdkEventManager as e2,SdkEvents as e3,SdkError as e4,distributionTypes as e5,EngineClassIcons as e6,Mode2 as e7,EngineModeIcons as e8,DeploymentModelIcons as e9,isSymbol_1 as eA,_baseMap as eB,_baseUnary as eC,_baseFindIndex as eD,_Set as eE,_setToArray as eF,_SetCache as eG,_cacheHas as eH,img$Q as eI,img$P as eJ,img$1y as eK,img$1x as eL,img$1w as eM,img$N as eN,img$1A as eO,img$M as eP,authSelector as eQ,ListItemAvatar$1 as eR,emphasize as eS,useSlotProps as eT,_arraySome as eU,EntityType as eV,generateState as eW,injectIntl as eX,ErrorBoundary$1 as eY,EPermissionAction as eZ,Process as e_,markdown as ea,guid as eb,EditList as ec,ButtonBase$1 as ed,isObject_1 as ee,_arrayMap as ef,_Symbol as eg,isArguments_1 as eh,_baseEach as ei,_arrayFilter as ej,_getNative as ek,eq_1 as el,_root as em,_Uint8Array as en,_overArg as eo,_isPrototype as ep,isObjectLike_1 as eq,_baseGetTag as er,_arrayLikeKeys as es,isBuffer$5 as et,isFunction_1 as eu,isTypedArray_1 as ev,_Stack as ew,_baseFor as ex,identity_1 as ey,_isIterateeCall as ez,clsx as f,index$1 as f$,Download as f0,NewFolder as f1,SpecialFolder as f2,User as f3,Source as f4,Search$2 as f5,selectIsOLPEnabled as f6,ListItemSecondaryAction$1 as f7,getLibraryModule as f8,cmsUrlSelector as f9,FixedSizeList as fA,selectUserOrgEdgeVersion as fB,EditAttributes as fC,gqlIntrospection as fD,ProcessingDetail as fE,img$y as fF,img$A as fG,img$6 as fH,FilterRemove as fI,AlarmTwo as fJ,tableInfiniteScroll as fK,CheckCircle as fL,FolderOpen as fM,Voice as fN,useDoubleClick as fO,FolderFilled as fP,Time as fQ,img$B as fR,Undefined as fS,PodcastSource as fT,YoutubeSource as fU,TVSource as fV,RadioSource as fW,selectOrgId as fX,navSectionStyles as fY,selectIsUserAdmin as fZ,AvatarGroup$1 as f_,SearchStructuredData as fa,Grow$1 as fb,index as fc,actions as fd,hasPermission as fe,UserAddFilled as ff,MenuList$1 as fg,MoveFolder as fh,EAuthResourceType as fi,Slide$1 as fj,img$c as fk,selectApiConfigs$2 as fl,selectPanelByPanelName as fm,FullScreenContainer as fn,EngineCategoryIcons as fo,isPermissionLoading as fp,Settings$2 as fq,Hamburger as fr,List as fs,enginesFilter as ft,panelsSelector as fu,Badge$1 as fv,MoreHor as fw,convertEntityToAuthResource as fx,AutoSizer as fy,InfiniteLoader as fz,generateUtilityClass as g,View as g$,ErrorState$2 as g0,Stepper$1 as g1,StepConnector$1 as g2,Step$1 as g3,StepLabel$1 as g4,isEqual_1 as g5,NullState$2 as g6,Group as g7,PermissionChangedAction as g8,Lock as g9,green$1 as gA,md5 as gB,selectIsSuperAdmin as gC,organizations_selector as gD,actions$5 as gE,AddUser as gF,selectors as gG,LibraryDropdown as gH,Remove as gI,Save as gJ,Input$3 as gK,getElement as gL,client$1 as gM,Copy as gN,ArrowForward as gO,Modal$1 as gP,Slider$1 as gQ,getDefaultExportFromCjs as gR,_getSymbols as gS,stubArray_1 as gT,_baseGetAllKeys as gU,_getTag as gV,_nodeUtil as gW,_getAllKeys as gX,_castFunction as gY,Article as gZ,Task as g_,useOrganizationPermissions as ga,EAuthSubResourceType as gb,AddGroup as gc,initialConfigSelector as gd,EMessageTypes as ge,errors as gf,ConfirmationModal as gg,EnumHelpers as gh,formatBytes as gi,NotInterested as gj,mountPanelForResponse$1 as gk,default_1$a as gl,tableStyles as gm,ArrowDown as gn,ArrowUp as go,useInterval as gp,Iam as gq,safeFormatMessage as gr,contextMenuStyles as gs,Users as gt,SecurityGroup as gu,getOrganizationPanelModule as gv,Lock2 as gw,EApplicationConfigLevel as gx,NoApps as gy,EApplicationConfigType as gz,composeClasses as h,mountPanel as h$,_objectSpread2 as h0,serialize as h1,stringify$4 as h2,compile as h3,isNumber_1 as h4,Check as h5,EngineIconsRenderer as h6,FormattedRelativeTime$1 as h7,BottomQueue as h8,TopQueue as h9,PackagesAvatar as hA,actionChannel as hB,cancelled as hC,flush$4 as hD,tableSearchComponents as hE,cancel as hF,FlowTemplate as hG,Node as hH,Palette as hI,FlowCenter2 as hJ,ArrowBack as hK,Schema$1 as hL,panelComponents as hM,img$1 as hN,img$x as hO,AutomateNode as hP,Clear as hQ,ExpandLess as hR,ExpandMore as hS,registry as hT,registerComponent as hU,AvailableWidgets as hV,updatePanelMicroFrontendProps as hW,setData as hX,root as hY,mountWidget as hZ,unmountWidget as h_,Pause as ha,Cancel as hb,Folder as hc,Hidden as hd,dateRangeFilter as he,statusFilter as hf,TableLoadingState as hg,setDuration as hh,resetDuration as hi,createStack as hj,ButtonGroupContext$1 as hk,toFinite_1 as hl,_baseForOwn as hm,_arrayReduce as hn,hasIn_1 as ho,now_1 as hp,useSyncExternalStoreExports as hq,Engines as hr,EngineComponentLoader as hs,EngineFieldType as ht,imageUpload as hu,characterCountTextField as hv,tabsClasses$1 as hw,Packages as hx,Resources$1 as hy,selectUserCanCreatePackage as hz,createSvgIcon$1 as i,unmountPanel as i0,hidePanel as i1,unmountAllPanel as i2,init as i3,aiwareEvents as i4,jsxRuntime as j,interopRequireDefault as k,createSlice as l,makeStyles as m,Route as n,useDispatch as o,useSelector as p,authStatusSelector as q,react$1 as r,store$5 as s,authContextSelector as t,useThemeProps as u,AuthContext as v,lodash as w,Alert$1 as x,betaFeaturesSelector as y,useNavigate as z};