1&&void 0!==arguments[1]&&arguments[1];e.persist&&e.persist();var o=e.target,n=o.name,p=o.id;o.outerHTML,l(t||n||p,!0)}),[l]),d=ge((function(e){if("string"==typeof e)return function(t){return O(t,e)};O(e)})),u=(0,e.useCallback)((function(e,t,o){if(null==o||!o.isPro||!1!==Boolean(p.is_pro_active)){var n=B(e,t),b=n.field,r=n.val;b&&(i(b,r),(0,c.doAction)("quickBuilder_setFieldValue",b,r,o))}}),[i,p.values]),A=ge((function(e,t){var o;if(null!=t&&t.isPro&&!1===Boolean(p.is_pro_active)&&(null===(o=p.alerts)||void 0===o||null===(o=o.pro_alert(null==t?void 0:t.popup))||void 0===o||o.fire()),"string"==typeof e)return function(o){return u(e,o,t)};u(e,null,t)})),f=(0,e.useCallback)((function(e){var t,o=me({},e),n=C(o),b=n.name,r=n.type,a=n.parent,M=n.parenttype;if(null!=o&&o.is_pro&&(n.is_pro=!(null!=o&&o.is_pro&&!0===Boolean(p.is_pro_active))),a&&"group"===M){var i,z,s=null!==(i=L(p.values,a))&&void 0!==i?i:{};t=null!==(z=null==s?void 0:s[b])&&void 0!==z?z:null==o?void 0:o.default}else if(a&&"repeater"===M){var l,O,u,f=null!==(l=L(p.values,a))&&void 0!==l?l:[];t=null!==(O=null==f||null===(u=f[n.index])||void 0===u?void 0:u[b])&&void 0!==O?O:null==o?void 0:o.default}else{var q;t=null!==(q=L(p.values,b))&&void 0!==q?q:null==o?void 0:o.default}n.onChange=A,n.onBlur=d;var W=n.value;return"checkbox"!==r||n.multiple?"radio"===r?(n.checked=t===W,n.value=W):n.value="date"===r?(0,c.applyFilters)("builder_date_format",t,n):t:(n.checked=!!t,n.value=!!t,m(t)&&"0"===t?(n.checked=!1,n.value=!1):(n.checked=Boolean(t),n.value=Boolean(t))),n.visible=w(p.values,e),n}),[d,A,p.values]),q=(0,e.useCallback)((function(e,t){var o,n,c,b=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return o=null!==b?null===(n=L(p.values,b))||void 0===n?void 0:n[e]:L(p.values,e)||(null===(c=t.meta)||void 0===c?void 0:c.default),me(me({},t.meta),{},{value:o,error:L(p.errors,e),touched:!!L(p.touched,e),visible:w(p.values,t),initialValue:"",initialTouched:"",initialError:""})}),[p.errors,p.touched,p.values]),W=(0,e.useCallback)((function(e){return e.length>0?e.filter((function(e){return null!=e&&e.rules?H(e.rules,p.values):e})):e}),[p.errors,p.touched,p.values]),h=(0,e.useCallback)((function(e,t){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e.length){var n=[];return o&&v(t)?n=e.filter((function(e){return t.includes(e.value)})):(n=e.filter((function(e){return e.value==t}))).length>0?n[0]:""}return e}),[p.errors,p.touched,p.values]),g=(0,e.useCallback)((function(){return{setValue:function(e,t){return i(e,t)},getValue:function(e){return L(p.values,e)},getValueForDefault:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return(null===t||L(p.savedValues,t)===L(p.values,t))&&L(p.savedValues,e)}}}),[p.errors,p.touched,p.values,p.savedValues]),R=(0,e.useCallback)((function(e){return L(p.tabs,e)}),[p]),y=ge((function(e){b({type:"SET_ISSUBMITTING",payload:e})})),E=ge((function(e){b({type:"SET_ACTIVE_TAB",payload:e})})),S=ge((function(e){b({type:"SET_REDIRECT",payload:e})})),T=ge((function(e,t){b({type:"SET_ICONS",payload:{name:e,icons:t}})})),X=ge((function(e,t){b({type:"SET_COMMONS",payload:{name:e,value:t}})})),k=ge((function(e,t){b({type:"SET_ALERTS",payload:{name:e,value:t}})}));return me(me(me({},t),p),{},{setContext:r,values:p.values,savedValues:p.savedValues,errors:p.errors,touched:p.touched,isSubmitting:!1,setActiveTab:E,setRedirect:S,setSubmitting:y,setValues:a,setSavedValues:M,setFieldValue:i,getFieldValue:s,handleBlur:d,handleChange:A,getFieldProps:f,getFieldMeta:q,getFieldHelpers:g,eligibleOptions:W,eligibleOption:h,getTabFields:R,setFormField:z,registerIcons:T,registerCommon:X,registerAlert:k})}(n.settings);return t().createElement(t().Fragment,null,t().createElement(Wt,{image_path:null==n?void 0:n.image_path}),t().createElement(r,{value:p},t().createElement(qt,$t({},n)),t().createElement(jt,null)))};o(255);const to=function(e){var o=e.props,n=a();if("tab-sidebar-layout"!==o.id||"layout_calendar"===n.config.active)return null;var p=wpspSettingsGlobal.pro_version;return t().createElement("div",{className:"wpsp-admin-sidebar"},p&&t().createElement("div",{className:"manage-license card"},t().createElement("img",{src:"".concat(null===wpspSettingsGlobal||void 0===wpspSettingsGlobal?void 0:wpspSettingsGlobal.image_path,"upgrade-pro-new.png"),alt:(0,k.__)("upgrade-pro-img","wp-scheduled-posts")}),t().createElement("div",{className:"content"},t().createElement("h3",null,(0,k.__)("Manage License","wp-scheduled-posts")),t().createElement("p",null,(0,k.__)("Supercharge your content schedule and ave a peace in mind","wp-scheduled-posts")),t().createElement("a",{target:"_blank",href:"https://store.wpdeveloper.com/"},(0,k.__)("Manage License","wp-scheduled-posts")))),!p&&t().createElement("div",{className:"upgrade-pro card"},t().createElement("img",{src:"".concat(null===wpspSettingsGlobal||void 0===wpspSettingsGlobal?void 0:wpspSettingsGlobal.image_path,"upgrade-pro-new.png"),alt:(0,k.__)("upgrade-pro-img","wp-scheduled-posts")}),t().createElement("div",{className:"content"},t().createElement("h3",null,(0,k.__)("Get Unlimited Features","wp-scheduled-posts")),t().createElement("p",null,(0,k.__)("Supercharge your content schedule and have a peace in mind","wp-scheduled-posts")),t().createElement("a",{target:"_blank",href:"https://schedulepress.com/#pricing"},(0,k.__)("Upgrade To Pro","wp-scheduled-posts")))),t().createElement("div",{className:"card"},t().createElement("i",{className:"wpsp-icon wpsp-file"}),t().createElement("h3",null,(0,k.__)("Documentation","wp-scheduled-posts")),t().createElement("p",null,(0,k.__)("Get started spending some time with the documentation to get familiar with SchedulePress.","wp-scheduled-posts")),t().createElement("a",{target:"_blank",href:"https://wpdeveloper.com/docs-category/wp-scheduled-posts/"},(0,k.__)("Documentation","wp-scheduled-posts"))),t().createElement("div",{className:"card"},t().createElement("i",{className:"wpsp-icon wpsp-puzzle"}),t().createElement("h3",null,(0,k.__)("Contribute to SchedulePress","wp-scheduled-posts")),t().createElement("p",null,(0,k.__)("You can contribute to making SchedulePress better by reporting bugs","wp-scheduled-posts")),t().createElement("a",{target:"_blank",href:"https://wordpress.org/support/plugin/wp-scheduled-posts/"},(0,k.__)("Report A Bug","wp-scheduled-posts"))),t().createElement("div",{className:"card"},t().createElement("i",{className:"wpsp-icon wpsp-comment"}),t().createElement("h3",null,(0,k.__)("Need Help?","wp-scheduled-posts")),t().createElement("p",null,(0,k.__)("Stuck with something? Get help from the community WPDeveloper Forum or Facebook Community.","wp-scheduled-posts")),t().createElement("a",{target:"_blank",href:"https://wpdeveloper.com/support/"},(0,k.__)("Get Support","wp-scheduled-posts"))),t().createElement("div",{className:"card"},t().createElement("i",{className:"wpsp-icon wpsp-chat-2"}),t().createElement("h3",null,(0,k.__)("Show your Love","wp-scheduled-posts")),t().createElement("p",null,(0,k.__)("We love to have you in the SchedulePress family. We are making it more awesome every day.","wp-scheduled-posts")),t().createElement("a",{target:"_blank",href:"https://wordpress.org/support/plugin/wp-scheduled-posts/reviews/"},(0,k.__)("Show your Love","wp-scheduled-posts"))))},oo=function(e){var o=null==e?void 0:e.content,n=o.heading,p=o.button_text,c=o.button_link,b=o.options;return t().createElement("div",{className:J()("wprf-control","wprf-features","wprf-".concat(e.name,"-features"),null==e?void 0:e.classes)},t().createElement("div",{className:"header"},t().createElement("h3",null,n),t().createElement("a",{target:"_blank",href:c},p)),t().createElement("div",{className:"content"},null==b?void 0:b.map((function(e){return t().createElement("a",{href:null==e?void 0:e.link,target:"_blank",key:Math.random()},t().createElement("div",{className:"single-content"},t().createElement("i",{className:"wpsp-icon ".concat(null==e?void 0:e.icon)}),t().createElement("h5",null,null==e?void 0:e.title)))}))))};var no=o(312),po=o.n(no),co=function(e,t,o,n){return new(o||(o=Promise))((function(p,c){function b(e){try{a(n.next(e))}catch(e){c(e)}}function r(e){try{a(n.throw(e))}catch(e){c(e)}}function a(e){var t;e.done?p(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(b,r)}a((n=n.apply(e,t||[])).next())}))},bo=function(e,t){var o,n,p,c,b={label:0,sent:function(){if(1&p[0])throw p[1];return p[1]},trys:[],ops:[]};return c={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function r(r){return function(a){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;c&&(c=0,r[0]&&(b=0)),b;)try{if(o=1,n&&(p=2&r[0]?n.return:r[0]?n.throw||((p=n.return)&&p.call(n),0):n.next)&&!(p=p.call(n,r[1])).done)return p;switch(n=0,p&&(r=[2&r[0],p.value]),r[0]){case 0:case 1:p=r;break;case 4:return b.label++,{value:r[1],done:!1};case 5:b.label++,n=r[1],r=[0];continue;case 7:r=b.ops.pop(),b.trys.pop();continue;default:if(!((p=(p=b.trys).length>0&&p[p.length-1])||6!==r[0]&&2!==r[0])){b=0;continue}if(3===r[0]&&(!p||r[1]>p[0]&&r[1]=12,c=parseInt(o,10)%12;return"".concat(c=0===c?12:c,":").concat(n," ").concat(p?"PM":"AM")}return e},zo=function(e){if(/\d{1,2}:\d{2} [ap]m/i.test(e)){var t=e.match(/\d+/g),o=t[0],n=t[1],p=e.toLowerCase().indexOf("pm")>-1,c=parseInt(o,10)+(p&&"12"!==o?12:0)-("12"!==o||p?0:12),b=(24===c?0:c).toString().padStart(2,"0"),r=n.padStart(2,"0");return"".concat(b,":").concat(r,":00")}return e},so=function(){var e=[],t=new Date;t.setHours(0,0,0,0);for(var o=0;o<96;o++){var n=new Date(t.getTime()+15*o*6e4),p=n.getHours(),c=n.getMinutes();p>=24&&(p%=24);var b=n.toLocaleString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}),r="".concat(p.toString().padStart(2,"0"),":").concat(c.toString().padStart(2,"0"));e.push({value:r,label:b})}return e},lo=function(e,t){if(e[t])return{value:t,label:e[t].label};for(var o in e)if("object"==typeof e[o]&&e[o].value===t)return{value:t,label:e[o].label};for(var o in e)if("object"==typeof e[o]&&e[o].options){var n=lo(e[o].options,t);if(n)return n}return null},Oo=function(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)},uo=o(399);const Ao=function(o){var n,p,c,b=o.props,r=o.platform,a=o.requestHandler,M=o.appInfo,i=void 0===M?[]:M,z=(0,e.useState)(i.app_id?i.app_id:""),s=z[0],l=z[1],O=(0,e.useState)(i.app_secret?i.app_secret:""),d=O[0],u=O[1],A=(0,e.useState)(!1),f=A[0],q=A[1],W=(0,e.useState)(!1),m=W[0],h=W[1],g=(0,e.useState)(),v=g[0],R=g[1],w=(0,e.useState)(!1),y=w[0],L=w[1],N=(0,e.useState)(!1),B=N[0],E=N[1],C=(0,e.useState)("https://api.schedulepress.com/callback.php"),S=C[0],T=C[1],X="linkedin"==r||"pinterest"==r,_=function(e){e.preventDefault(),(S&&s&&d||s&&"medium"==r)&&a(S,s,d,r,B).then((function(e){return(null==e?void 0:e.error)&&(h(!0),R(null==e?void 0:e.message)),e}))},x=function(){L(!0),setTimeout((function(){L(!1)}),2e3)},D=localStorage.getItem("account_type");return t().createElement(t().Fragment,null,t().createElement("div",{className:"modalbody ".concat(r?r+"_wrapper":"")},m?t().createElement("div",{className:"wpsp-multi-account-error"},t().createElement("p",{dangerouslySetInnerHTML:{__html:v}})):t().createElement("div",{className:"wpsp-social-account-insert-modal"},t().createElement("div",{className:"platform-info"},t().createElement("img",{width:"30px",src:"".concat(null===(n=null==b?void 0:b.modal)||void 0===n?void 0:n.logo),alt:"".concat(null==b?void 0:b.label)}),t().createElement("h4",null,null==b?void 0:b.label)),X&&t().createElement("div",{className:"menual_connection_checker"},t().createElement("label",{className:"toggler_wrapper"},t().createElement("div",{className:"status"},t().createElement("div",{className:"switcher"},t().createElement("input",{id:"app_credential_toggle",type:"checkbox",className:"wprf-switcher-checkbox",checked:f,onChange:function(e){q(e.target.checked)}}),t().createElement("label",{className:"wprf-switcher-label",htmlFor:"app_credential_toggle",style:{background:f&&"#02AC6E"}},t().createElement("span",{className:"wprf-switcher-button"})))),t().createElement("span",{className:"text"},(0,k.__)("Connect with","wp-scheduled-posts")," ",f?(0,k.__)("Account","wp-scheduled-posts"):(0,k.__)("App credentials","wp-scheduled-posts")))),t().createElement("input",{type:"hidden",name:"tempmodaltype",value:"twitter"}),(f||"instagram"==r||"facebook"==r||"twitter"==r||"threads"==r)&&t().createElement("form",{onSubmit:_},t().createElement("div",{className:"form-group"},t().createElement("label",{htmlFor:""},(0,k.__)("Redirect URI:","wp-scheduled-posts")),t().createElement("span",{className:"redirect_url_wrapper"},t().createElement("input",{type:"text",required:!0,value:S,placeholder:(0,k.__)("Redirect URI","wp-scheduled-posts"),style:{marginRight:30},onChange:function(e){return T(e.target.value)},readOnly:!0}),t().createElement(uo.CopyToClipboard,{text:S,onCopy:function(){return x()}},t().createElement("span",{className:"copyButton",onClick:function(){return x()}},t().createElement("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABmJLR0QA/wD/AP+gvaeTAAACuElEQVR4nO2bPWgUQRiGn9PAiUZBQQknghYW/jQWNqL4U5giWqsINpIgWqa10MpCEBQsJFiIIPYmhRAwFnaHiBCtLESD50/EQxQiBi0mK7Ozu7nMztx+u+s8MLAzszO88zJ/d/cdBP5vGg7tTgKngd3Aem+K/LIIdIAZ4A4w56PTLcAT4E/F0k9g1HXwg8DLEgzGJTmZcL0EA/AxE7ZFA7LZA5rAZ+LrvQvcBt5a9FMkTWAEGDbKrwJXbDs7QNLNo44Ci+Ixcd1Po4pVFp1sMvLfULtrFZg08kPRg40BbeC7ln+EcrMKLBj5gcTDCuigpvwY8B644a4rUBRjxPeAN1FFrxkwtJRW901aPr4C74Df/eh8ALgAvEb+zF4uzQO3UDfTXmTOAJN1JI+Msqc5YF9eA8xT4C5wvEdnZaOFOuY252msG3AYOOVDkQAt4HKehvomeM6oWwAuAVMkz1FJGsAe1MfbXVr5WWAch42xTXyd3MyvsRAOkdwPtme8u6I9YKPR6JUvpX1iNqXMvK73ZLmrcNmvuWn6rL/hsvksUEuCAdICpAkGSAuQJhggLUCaYIC0AGmCAdICpAkGSAuQJhggLUCaYIC0AGmCAdICpAkGSAuQJhggLUCaYIC0AGmCAdICCmKHke9GDzZRYlWkARwDLhrl/35YresMGAQeoIKppoENRv3D6KGuM2AcOJNRN40K+gDqOwNaGeUvMIypqwETxMN6u8A14CDwRX+xrkugDewE9qMG/Bz4lfZiXQ0A+EgySjyBvgQWjbqmVzn+WZNSZh0hphvQMepGbDsrmBMpZR9sO9GXwAwq9CxiGBU2O0n54gT3okLfdGaBTy4dt4AfyMf+5k3nXQYfYQYUViVN4TGkf5RqzYT7wNq8g80KLNy6ZMQR1NIo2x8m5lG3unvAM2EtgUrzFzG21zF8JcAYAAAAAElFTkSuQmCC"}),y&&t().createElement("span",{className:"copyTooltip"},(0,k.__)("Copied","wp-scheduled-posts"))))),t().createElement("span",{className:"redirect-note"},null===(p=null==b?void 0:b.modal)||void 0===p?void 0:p.redirect_url_desc)),"linkedin"==r&&t().createElement("div",{className:"linkedin-openid"},t().createElement("div",{className:"toggler_wrapper"},t().createElement("span",{className:"text"},(0,k.__)("OpenID Connect","wp-scheduled-posts")),t().createElement("div",{className:"status"},t().createElement("div",{className:"switcher"},t().createElement("input",{id:"linkedin_openid_status",type:"checkbox",className:"wprf-switcher-checkbox",checked:B,onChange:function(e){E(e.target.checked)}}),t().createElement("label",{className:"wprf-switcher-label",htmlFor:"linkedin_openid_status",style:{background:B&&"#02AC6E"}},t().createElement("span",{className:"wprf-switcher-button"})))))),"medium"!=r&&t().createElement("div",{className:"form-group"},t().createElement("label",{htmlFor:""},(0,k.__)("App ID:","wp-scheduled-posts")," "),t().createElement("input",{type:"text",required:!0,value:s,disabled:"group"==D,placeholder:"twitter"===r?(0,k.__)("API ID","wp-scheduled-posts"):(0,k.__)("App ID","wp-scheduled-posts"),onChange:function(e){return l(e.target.value)}})),t().createElement("div",{className:"form-group"},t().createElement("label",{htmlFor:""},(0,k.__)("App Secret:","wp-scheduled-posts")," "),t().createElement("input",{className:"test",type:"text",disabled:"group"==D,required:!0,value:d,placeholder:"twitter"===r?(0,k.__)("API Secret Key","wp-scheduled-posts"):(0,k.__)("App Secret","wp-scheduled-posts"),onChange:function(e){return u(e.target.value)}})),"group"==D&&t().createElement("div",{className:"wpsp-fb-group-warning",dangerouslySetInnerHTML:{__html:'Meta shut down its Facebook Groups API as of April 22, 2024, and SchedulePress will no longer be able to post to Facebook Groups on your behalf.'}}),t().createElement("button",{type:"submit",disabled:"group"==D,className:"wpsp-modal-generate-token-button"},(0,k.__)("Connect Your Account","wp-scheduled-posts"))),X&&!f&&t().createElement(t().Fragment,null,t().createElement("div",{className:"wpsp-separator-connect"},(0,k.__)("OR","wp-scheduled-posts")),t().createElement("div",{className:"wpsp-modal-generate-token-button-wrapper"},t().createElement("a",{onClick:function(){a("https://api.schedulepress.com/v2/callback.php","","",r).then((function(e){(null==e?void 0:e.error)&&(h(!0),R(null==e?void 0:e.message))}))},className:"wpsp-modal-generate-token-button"},(0,k.__)("Connect your account","wp-scheduled-posts")))),"medium"==r&&t().createElement("form",{onSubmit:_},"medium"==r&&t().createElement("div",{className:"form-group"},t().createElement("label",{htmlFor:""},(0,k.__)("Access Token:","wp-scheduled-posts")," "),t().createElement("input",{type:"text",required:!0,value:s,placeholder:(0,k.__)("Access Token","wp-scheduled-posts"),onChange:function(e){return l(e.target.value)}})),t().createElement("button",{type:"submit",disabled:"group"==D,className:"wpsp-modal-generate-token-button"},(0,k.__)("Connect Your Account","wp-scheduled-posts"))),t().createElement("p",{dangerouslySetInnerHTML:{__html:null===(c=null==b?void 0:b.modal)||void 0===c?void 0:c.desc}}))))},fo=function(){return t().createElement(t().Fragment,null,t().createElement("div",{className:"error-message"},(0,k.__)("Multi Profile is a Premium Feature. To use this feature,","wp-scheduled-posts")," ",t().createElement("a",{target:"_blank",href:"https://wpdeveloper.com/in/schedulepress-pro"},(0,k.__)("Upgrade to PRO.","wp-scheduled-posts"))))};function qo(o){var n=o.page,p=o.group,c=o.addProfileToggle,b=o.savedProfile,r=(0,e.useState)(!1);return r[0],r[1],t().createElement(t().Fragment,null,t().createElement("div",{className:"wpsp-modal-social-platform"},t().createElement("ul",null,n.length>0&&t().createElement("li",{className:"group-title"},(0,k.__)("Pages:","wp-scheduled-posts")," "),n.map((function(e,o){return t().createElement("li",{id:"facebook_page_"+o,key:o},t().createElement("div",{className:"item-content"},t().createElement("div",{className:"entry-thumbnail"},t().createElement("img",{src:e.thumbnail_url,alt:"logo"}),t().createElement("h4",{className:"entry-title"},e.name)),t().createElement("div",{className:"control"},t().createElement("input",{type:"checkbox",onChange:function(t){return c(e,o,t)}}),t().createElement("div",null))))})),p.length>0&&t().createElement("li",{className:"group-title"},(0,k.__)("Group:","wp-scheduled-posts")," "),p.map((function(e,o){return t().createElement("li",{id:"facebook_group_"+o,key:o},t().createElement("div",{className:"item-content"},t().createElement("div",{className:"entry-thumbnail"},t().createElement("img",{src:e.thumbnail_url,alt:"logo"}),t().createElement("h4",{className:"entry-title"},e.name)),t().createElement("div",{className:"control"},t().createElement("input",{type:"checkbox",onChange:function(t){return c(e,o,t)}}),t().createElement("div",null))))}))),t().createElement("button",{type:"submit",className:"wpsp-modal-save-account",onClick:function(e){e.preventDefault(),b(e)}},(0,k.__)("Save","wp-scheduled-posts"))))}var Wo=function(){return Wo=Object.assign||function(e){for(var t,o=1,n=arguments.length;o0&&t().createElement("li",{className:"group-title"},(0,k.__)("Pages:","wp-scheduled-posts")," "),i.map((function(e,o){return t().createElement("li",{key:o},t().createElement("div",{className:"item-content"},t().createElement("div",{className:"entry-thumbnail"},t().createElement("img",{src:null==e?void 0:e.thumbnail_url,alt:(0,k.__)("page-thumbnail","wp-scheduled-posts")}),t().createElement("h4",{className:"entry-title"},null==e?void 0:e.name)),t().createElement("div",{className:"control"},t().createElement("input",{type:"checkbox",onChange:function(t){return n(e,o,t)}}),t().createElement("div",null))))}))),t().createElement("ul",null,M.length>0&&t().createElement("li",{className:"group-title"},(0,k.__)("Profile:","wp-scheduled-posts")," "),M.map((function(e,o){return t().createElement("li",{key:o},t().createElement("div",{className:"item-content"},t().createElement("div",{className:"entry-thumbnail"},t().createElement("img",{src:null==e?void 0:e.thumbnail_url,alt:(0,k.__)("profile-thumbnail","wp-scheduled-posts")}),t().createElement("h4",{className:"entry-title"},null==e?void 0:e.name)),t().createElement("div",{className:"control"},t().createElement("input",{type:"checkbox",onChange:function(t){n(e,o,t)}}),t().createElement("div",null))))}))),t().createElement("button",{type:"submit",className:"wpsp-modal-save-account",onClick:function(e){e.preventDefault(),p(e)}},(0,k.__)("Save","wp-scheduled-posts"))))}function ho(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function go(e){for(var t=1;t0?ko(Vo,--Fo):0,jo--,10===Uo&&(jo=1,Io--),Uo}function Ko(){return Uo=Fo2||en(Uo)>3?"":" "}function cn(e,t){for(;--t&&Ko()&&!(Uo<48||Uo>102||Uo>57&&Uo<65||Uo>70&&Uo<97););return $o(e,Zo()+(t<6&&32==Jo()&&32==Ko()))}function bn(e){for(;Ko();)switch(Uo){case e:return Fo;case 34:case 39:34!==e&&39!==e&&bn(Uo);break;case 40:41===e&&bn(e);break;case 92:Ko()}return Fo}function rn(e,t){for(;Ko()&&e+Uo!==57&&(e+Uo!==84||47!==Jo()););return"/*"+$o(t,Fo-1)+"*"+Eo(47===e?e:Ko())}function an(e){for(;!en(Jo());)Ko();return $o(e,Fo)}var Mn="-ms-",zn="-moz-",sn="-webkit-",ln="comm",On="rule",dn="decl",un="@keyframes";function An(e,t){for(var o="",n=Do(e),p=0;p0&&xo(g)-z&&Po(l>32?gn(g+";",n,o,z-1):gn(To(g," ","")+";",n,o,z-2),a);break;case 59:g+=";";default:if(Po(h=mn(g,t,o,M,i,p,r,q,W=[],m=[],z),c),123===f)if(0===i)Wn(g,t,h,h,W,c,z,r,m);else switch(99===s&&110===ko(g,3)?100:s){case 100:case 108:case 109:case 115:Wn(e,h,h,n&&Po(mn(e,h,h,0,0,p,r,q,p,W=[],z),m),p,m,z,r,n?W:m);break;default:Wn(g,h,h,h,[""],m,0,r,m)}}M=i=l=0,d=A=1,q=g="",z=b;break;case 58:z=1+xo(g),l=O;default:if(d<1)if(123==f)--d;else if(125==f&&0==d++&&125==Qo())continue;switch(g+=Eo(f),f*d){case 38:A=i>0?1:(g+="\f",-1);break;case 44:r[M++]=(xo(g)-1)*A,A=1;break;case 64:45===Jo()&&(g+=nn(Ko())),s=Jo(),i=z=xo(q=g+=an(Zo())),f++;break;case 45:45===O&&2==xo(g)&&(d=0)}}return c}function mn(e,t,o,n,p,c,b,r,a,M,i){for(var z=p-1,s=0===p?c:[""],l=Do(s),O=0,d=0,u=0;O0?s[A]+" "+f:To(f,/&\f/g,s[A])))&&(a[u++]=q);return Go(e,t,o,0===p?On:r,a,M,i)}function hn(e,t,o){return Go(e,t,o,ln,Eo(Uo),_o(e,2,-2),0)}function gn(e,t,o,n){return Go(e,t,o,dn,_o(e,0,n),_o(e,n+1,-1),n)}var vn=function(e,t,o){for(var n=0,p=0;n=p,p=Jo(),38===n&&12===p&&(t[o]=1),!en(p);)Ko();return $o(e,Fo)},Rn=new WeakMap,wn=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,o=e.parent,n=e.column===o.column&&e.line===o.line;"rule"!==o.type;)if(!(o=o.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Rn.get(o))&&!n){Rn.set(e,!0);for(var p=[],c=function(e,t){return on(function(e,t){var o=-1,n=44;do{switch(en(n)){case 0:38===n&&12===Jo()&&(t[o]=1),e[o]+=vn(Fo-1,t,o);break;case 2:e[o]+=nn(n);break;case 4:if(44===n){e[++o]=58===Jo()?"&\f":"",t[o]=e[o].length;break}default:e[o]+=Eo(n)}}while(n=Ko());return e}(tn(e),t))}(t,p),b=o.props,r=0,a=0;r6)switch(ko(e,t+1)){case 109:if(45!==ko(e,t+4))break;case 102:return To(e,/(.+:)(.+)-([^]+)/,"$1"+sn+"$2-$3$1"+zn+(108==ko(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Xo(e,"stretch")?Ln(To(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==ko(e,t+1))break;case 6444:switch(ko(e,xo(e)-3-(~Xo(e,"!important")&&10))){case 107:return To(e,":",":"+sn)+e;case 101:return To(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+sn+(45===ko(e,14)?"inline-":"")+"box$3$1"+sn+"$2$3$1"+Mn+"$2box$3")+e}break;case 5936:switch(ko(e,t+11)){case 114:return sn+e+Mn+To(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return sn+e+Mn+To(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return sn+e+Mn+To(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return sn+e+Mn+e+e}return e}var Nn=[function(e,t,o,n){if(e.length>-1&&!e.return)switch(e.type){case dn:e.return=Ln(e.value,e.length);break;case un:return An([Yo(e,{value:To(e.value,"@","@"+sn)})],n);case On:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return An([Yo(e,{props:[To(t,/:(read-\w+)/,":-moz-$1")]})],n);case"::placeholder":return An([Yo(e,{props:[To(t,/:(plac\w+)/,":"+sn+"input-$1")]}),Yo(e,{props:[To(t,/:(plac\w+)/,":-moz-$1")]}),Yo(e,{props:[To(t,/:(plac\w+)/,Mn+"input-$1")]})],n)}return""}))}}],Bn=function(e){var t=e.key;if("css"===t){var o=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(o,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var n,p,c=e.stylisPlugins||Nn,b={},r=[];n=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),o=1;o=4;++n,p-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),o=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&o)+(59797*(o>>>16)<<16);switch(p){case 3:o^=(255&e.charCodeAt(n+2))<<16;case 2:o^=(255&e.charCodeAt(n+1))<<8;case 1:o=1540483477*(65535&(o^=255&e.charCodeAt(n)))+(59797*(o>>>16)<<16)}return(((o=1540483477*(65535&(o^=o>>>13))+(59797*(o>>>16)<<16))^o>>>15)>>>0).toString(36)}(p)+a;return{name:M,styles:p,next:jn}},Un=!!e.useInsertionEffect&&e.useInsertionEffect,Vn=Un||function(e){return e()},Gn=(Un||e.useLayoutEffect,{}.hasOwnProperty),Yn=e.createContext("undefined"!=typeof HTMLElement?Bn({key:"css"}):null);Yn.Provider;var Qn=function(t){return(0,e.forwardRef)((function(o,n){var p=(0,e.useContext)(Yn);return t(o,p,n)}))},Kn=e.createContext({}),Jn="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Zn=function(e){var t=e.cache,o=e.serialized,n=e.isStringTag;return En(t,o,n),Vn((function(){return function(e,t,o){En(e,t,o);var n=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var p=t;do{e.insert(t===p?"."+n:"",p,e.sheet,!0),p=p.next}while(void 0!==p)}}(t,o,n)})),null},$n=Qn((function(t,o,n){var p=t.css;"string"==typeof p&&void 0!==o.registered[p]&&(p=o.registered[p]);var c=t[Jn],b=[p],r="";"string"==typeof t.className?r=function(e,t,o){var n="";return o.split(" ").forEach((function(o){void 0!==e[o]?t.push(e[o]+";"):n+=o+" "})),n}(o.registered,b,t.className):null!=t.className&&(r=t.className+" ");var a=Fn(b,void 0,e.useContext(Kn));r+=o.key+"-"+a.name;var M={};for(var i in t)Gn.call(t,i)&&"css"!==i&&i!==Jn&&(M[i]=t[i]);return M.ref=n,M.className=r,e.createElement(e.Fragment,null,e.createElement(Zn,{cache:o,serialized:a,isStringTag:"string"==typeof c}),e.createElement(c,M))})),ep=$n,tp=o(146),op=o.n(tp),np=function(t,o){var n=arguments;if(null==o||!Gn.call(o,"css"))return e.createElement.apply(void 0,n);var p=n.length,c=new Array(p);c[0]=ep,c[1]=function(e,t){var o={};for(var n in t)Gn.call(t,n)&&(o[n]=t[n]);return o[Jn]=e,o}(t,o);for(var b=2;b({x:e,y:e});function ip(e){return lp(e)?(e.nodeName||"").toLowerCase():"#document"}function zp(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function sp(e){var t;return null==(t=(lp(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function lp(e){return e instanceof Node||e instanceof zp(e).Node}function Op(e){return e instanceof Element||e instanceof zp(e).Element}function dp(e){return e instanceof HTMLElement||e instanceof zp(e).HTMLElement}function up(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof zp(e).ShadowRoot)}function Ap(e){const{overflow:t,overflowX:o,overflowY:n,display:p}=fp(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&!["inline","contents"].includes(p)}function fp(e){return zp(e).getComputedStyle(e)}function qp(e){const t=function(e){if("html"===ip(e))return e;const t=e.assignedSlot||e.parentNode||up(e)&&e.host||sp(e);return up(t)?t.host:t}(e);return function(e){return["html","body","#document"].includes(ip(e))}(t)?e.ownerDocument?e.ownerDocument.body:e.body:dp(t)&&Ap(t)?t:qp(t)}function Wp(e,t,o){var n;void 0===t&&(t=[]),void 0===o&&(o=!0);const p=qp(e),c=p===(null==(n=e.ownerDocument)?void 0:n.body),b=zp(p);return c?t.concat(b,b.visualViewport||[],Ap(p)?p:[],b.frameElement&&o?Wp(b.frameElement):[]):t.concat(p,Wp(p,[],o))}function mp(e){return Op(e)?e:e.contextElement}function hp(e){const t=mp(e);if(!dp(t))return Mp(1);const o=t.getBoundingClientRect(),{width:n,height:p,$:c}=function(e){const t=fp(e);let o=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const p=dp(e),c=p?e.offsetWidth:o,b=p?e.offsetHeight:n,r=rp(o)!==c||rp(n)!==b;return r&&(o=c,n=b),{width:o,height:n,$:r}}(t);let b=(c?rp(o.width):o.width)/n,r=(c?rp(o.height):o.height)/p;return b&&Number.isFinite(b)||(b=1),r&&Number.isFinite(r)||(r=1),{x:b,y:r}}const gp=Mp(0);function vp(e){const t=zp(e);return"undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:gp}function Rp(e,t,o,n){void 0===t&&(t=!1),void 0===o&&(o=!1);const p=e.getBoundingClientRect(),c=mp(e);let b=Mp(1);t&&(n?Op(n)&&(b=hp(n)):b=hp(e));const r=function(e,t,o){return void 0===t&&(t=!1),!(!o||t&&o!==zp(e))&&t}(c,o,n)?vp(c):Mp(0);let a=(p.left+r.x)/b.x,M=(p.top+r.y)/b.y,i=p.width/b.x,z=p.height/b.y;if(c){const e=zp(c),t=n&&Op(n)?zp(n):n;let o=e,p=o.frameElement;for(;p&&n&&t!==o;){const e=hp(p),t=p.getBoundingClientRect(),n=fp(p),c=t.left+(p.clientLeft+parseFloat(n.paddingLeft))*e.x,b=t.top+(p.clientTop+parseFloat(n.paddingTop))*e.y;a*=e.x,M*=e.y,i*=e.x,z*=e.y,a+=c,M+=b,o=zp(p),p=o.frameElement}}return function(e){const{x:t,y:o,width:n,height:p}=e;return{width:n,height:p,top:o,left:t,right:t+n,bottom:o+p,x:t,y:o}}({width:i,height:z,x:a,y:M})}const wp=e.useLayoutEffect;var yp=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Lp=function(){};function Np(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function Bp(e,t){for(var o=arguments.length,n=new Array(o>2?o-2:0),p=2;p-1}function Xp(e){return Tp(e)?window.pageYOffset:e.scrollTop}function kp(e,t){Tp(e)?window.scrollTo(0,t):e.scrollTop=t}function _p(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Lp,p=Xp(e),c=t-p,b=0;!function t(){var r=function(e,t,o,n){return o*((e=e/n-1)*e*e+1)+t}(b+=10,p,c,o);kp(e,r),bo.bottom?kp(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+p,e.scrollHeight)):n.top-p=O)return{placement:"bottom",maxHeight:t};if(v>=O&&!b)return c&&_p(a,R,y),{placement:"bottom",maxHeight:t};if(!b&&v>=n||b&&h>=n)return c&&_p(a,R,y),{placement:"bottom",maxHeight:b?h-q:v-q};if("auto"===p||b){var L=t,N=b?m:g;return N>=n&&(L=Math.min(N-q-r,t)),{placement:"top",maxHeight:L}}if("bottom"===p)return c&&kp(a,R),{placement:"bottom",maxHeight:t};break;case"top":if(m>=O)return{placement:"top",maxHeight:t};if(g>=O&&!b)return c&&_p(a,w,y),{placement:"top",maxHeight:t};if(!b&&g>=n||b&&m>=n){var B=t;return(!b&&g>=n||b&&m>=n)&&(B=b?m-W:g-W),c&&_p(a,w,y),{placement:"top",maxHeight:B}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(p,'".'))}return M}({maxHeight:p,menuEl:e,minHeight:n,placement:c,shouldScroll:r&&!t,isFixedPosition:t,controlHeight:A});l(o.maxHeight),u(o.placement),null==M||M(o.placement)}}),[p,c,b,r,n,M,A]),o({ref:i,placerProps:go(go({},t),{},{placement:d||Qp(c),maxHeight:s})})},Zp=function(e,t){var o=e.theme,n=o.spacing.baseUnit,p=o.colors;return go({textAlign:"center"},t?{}:{color:p.neutral40,padding:"".concat(2*n,"px ").concat(3*n,"px")})},$p=Zp,ec=Zp,tc=["size"],oc=["innerProps","isRtl","size"],nc={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},pc=function(e){var t=e.size,o=$(e,tc);return np("svg",Y({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:nc},o))},cc=function(e){return np(pc,Y({size:20},e),np("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},bc=function(e){return np(pc,Y({size:20},e),np("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},rc=function(e,t){var o=e.isFocused,n=e.theme,p=n.spacing.baseUnit,c=n.colors;return go({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:o?c.neutral60:c.neutral20,padding:2*p,":hover":{color:o?c.neutral80:c.neutral40}})},ac=rc,Mc=rc,ic=function(){var e=pp.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(Yp||(Yp=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"]))),zc=function(e){var t=e.delay,o=e.offset;return np("span",{css:pp({animation:"".concat(ic," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:o?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},sc=["data"],lc=["innerRef","isDisabled","isHidden","inputClassName"],Oc={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},dc={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":go({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Oc)},uc=function(e){return go({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},Oc)},Ac=function(e){var t=e.children,o=e.innerProps;return np("div",o,t)},fc={ClearIndicator:function(e){var t=e.children,o=e.innerProps;return np("div",Y({},Sp(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),o),t||np(cc,null))},Control:function(e){var t=e.children,o=e.isDisabled,n=e.isFocused,p=e.innerRef,c=e.innerProps,b=e.menuIsOpen;return np("div",Y({ref:p},Sp(e,"control",{control:!0,"control--is-disabled":o,"control--is-focused":n,"control--menu-is-open":b}),c,{"aria-disabled":o||void 0}),t)},DropdownIndicator:function(e){var t=e.children,o=e.innerProps;return np("div",Y({},Sp(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),o),t||np(bc,null))},DownChevron:bc,CrossIcon:cc,Group:function(e){var t=e.children,o=e.cx,n=e.getStyles,p=e.getClassNames,c=e.Heading,b=e.headingProps,r=e.innerProps,a=e.label,M=e.theme,i=e.selectProps;return np("div",Y({},Sp(e,"group",{group:!0}),r),np(c,Y({},b,{selectProps:i,theme:M,getStyles:n,getClassNames:p,cx:o}),a),np("div",null,t))},GroupHeading:function(e){var t=Cp(e);t.data;var o=$(t,sc);return np("div",Y({},Sp(e,"groupHeading",{"group-heading":!0}),o))},IndicatorsContainer:function(e){var t=e.children,o=e.innerProps;return np("div",Y({},Sp(e,"indicatorsContainer",{indicators:!0}),o),t)},IndicatorSeparator:function(e){var t=e.innerProps;return np("span",Y({},t,Sp(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,o=e.value,n=Cp(e),p=n.innerRef,c=n.isDisabled,b=n.isHidden,r=n.inputClassName,a=$(n,lc);return np("div",Y({},Sp(e,"input",{"input-container":!0}),{"data-value":o||""}),np("input",Y({className:t({input:!0},r),ref:p,style:uc(b),disabled:c},a)))},LoadingIndicator:function(e){var t=e.innerProps,o=e.isRtl,n=e.size,p=void 0===n?4:n,c=$(e,oc);return np("div",Y({},Sp(go(go({},c),{},{innerProps:t,isRtl:o,size:p}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),np(zc,{delay:0,offset:o}),np(zc,{delay:160,offset:!0}),np(zc,{delay:320,offset:!o}))},Menu:function(e){var t=e.children,o=e.innerRef,n=e.innerProps;return np("div",Y({},Sp(e,"menu",{menu:!0}),{ref:o},n),t)},MenuList:function(e){var t=e.children,o=e.innerProps,n=e.innerRef,p=e.isMulti;return np("div",Y({},Sp(e,"menuList",{"menu-list":!0,"menu-list--is-multi":p}),{ref:n},o),t)},MenuPortal:function(t){var o=t.appendTo,p=t.children,c=t.controlElement,b=t.innerProps,r=t.menuPlacement,a=t.menuPosition,M=(0,e.useRef)(null),i=(0,e.useRef)(null),z=Q((0,e.useState)(Qp(r)),2),s=z[0],l=z[1],O=(0,e.useMemo)((function(){return{setPortalPlacement:l}}),[]),d=Q((0,e.useState)(null),2),u=d[0],A=d[1],f=(0,e.useCallback)((function(){if(c){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(c),t="fixed"===a?0:window.pageYOffset,o=e[s]+t;o===(null==u?void 0:u.offset)&&e.left===(null==u?void 0:u.rect.left)&&e.width===(null==u?void 0:u.rect.width)||A({offset:o,rect:e})}}),[c,a,s,null==u?void 0:u.offset,null==u?void 0:u.rect.left,null==u?void 0:u.rect.width]);wp((function(){f()}),[f]);var q=(0,e.useCallback)((function(){"function"==typeof i.current&&(i.current(),i.current=null),c&&M.current&&(i.current=function(e,t,o,n){void 0===n&&(n={});const{ancestorScroll:p=!0,ancestorResize:c=!0,elementResize:b="function"==typeof ResizeObserver,layoutShift:r="function"==typeof IntersectionObserver,animationFrame:a=!1}=n,M=mp(e),i=p||c?[...M?Wp(M):[],...Wp(t)]:[];i.forEach((e=>{p&&e.addEventListener("scroll",o,{passive:!0}),c&&e.addEventListener("resize",o)}));const z=M&&r?function(e,t){let o,n=null;const p=sp(e);function c(){var e;clearTimeout(o),null==(e=n)||e.disconnect(),n=null}return function b(r,a){void 0===r&&(r=!1),void 0===a&&(a=1),c();const{left:M,top:i,width:z,height:s}=e.getBoundingClientRect();if(r||t(),!z||!s)return;const l={rootMargin:-ap(i)+"px "+-ap(p.clientWidth-(M+z))+"px "+-ap(p.clientHeight-(i+s))+"px "+-ap(M)+"px",threshold:bp(0,cp(1,a))||1};let O=!0;function d(e){const t=e[0].intersectionRatio;if(t!==a){if(!O)return b();t?b(!1,t):o=setTimeout((()=>{b(!1,1e-7)}),1e3)}O=!1}try{n=new IntersectionObserver(d,{...l,root:p.ownerDocument})}catch(e){n=new IntersectionObserver(d,l)}n.observe(e)}(!0),c}(M,o):null;let s,l=-1,O=null;b&&(O=new ResizeObserver((e=>{let[n]=e;n&&n.target===M&&O&&(O.unobserve(t),cancelAnimationFrame(l),l=requestAnimationFrame((()=>{var e;null==(e=O)||e.observe(t)}))),o()})),M&&!a&&O.observe(M),O.observe(t));let d=a?Rp(e):null;return a&&function t(){const n=Rp(e);!d||n.x===d.x&&n.y===d.y&&n.width===d.width&&n.height===d.height||o(),d=n,s=requestAnimationFrame(t)}(),o(),()=>{var e;i.forEach((e=>{p&&e.removeEventListener("scroll",o),c&&e.removeEventListener("resize",o)})),null==z||z(),null==(e=O)||e.disconnect(),O=null,a&&cancelAnimationFrame(s)}}(c,M.current,f,{elementResize:"ResizeObserver"in window}))}),[c,f]);wp((function(){q()}),[q]);var W=(0,e.useCallback)((function(e){M.current=e,q()}),[q]);if(!o&&"fixed"!==a||!u)return null;var m=np("div",Y({ref:W},Sp(go(go({},t),{},{offset:u.offset,position:a,rect:u.rect}),"menuPortal",{"menu-portal":!0}),b),p);return np(Kp.Provider,{value:O},o?(0,n.createPortal)(m,o):m)},LoadingMessage:function(e){var t=e.children,o=void 0===t?"Loading...":t,n=e.innerProps,p=$(e,Gp);return np("div",Y({},Sp(go(go({},p),{},{children:o,innerProps:n}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),n),o)},NoOptionsMessage:function(e){var t=e.children,o=void 0===t?"No options":t,n=e.innerProps,p=$(e,Vp);return np("div",Y({},Sp(go(go({},p),{},{children:o,innerProps:n}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),n),o)},MultiValue:function(e){var t=e.children,o=e.components,n=e.data,p=e.innerProps,c=e.isDisabled,b=e.removeProps,r=e.selectProps,a=o.Container,M=o.Label,i=o.Remove;return np(a,{data:n,innerProps:go(go({},Sp(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":c})),p),selectProps:r},np(M,{data:n,innerProps:go({},Sp(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:r},t),np(i,{data:n,innerProps:go(go({},Sp(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},b),selectProps:r}))},MultiValueContainer:Ac,MultiValueLabel:Ac,MultiValueRemove:function(e){var t=e.children,o=e.innerProps;return np("div",Y({role:"button"},o),t||np(cc,{size:14}))},Option:function(e){var t=e.children,o=e.isDisabled,n=e.isFocused,p=e.isSelected,c=e.innerRef,b=e.innerProps;return np("div",Y({},Sp(e,"option",{option:!0,"option--is-disabled":o,"option--is-focused":n,"option--is-selected":p}),{ref:c,"aria-disabled":o},b),t)},Placeholder:function(e){var t=e.children,o=e.innerProps;return np("div",Y({},Sp(e,"placeholder",{placeholder:!0}),o),t)},SelectContainer:function(e){var t=e.children,o=e.innerProps,n=e.isDisabled,p=e.isRtl;return np("div",Y({},Sp(e,"container",{"--is-disabled":n,"--is-rtl":p}),o),t)},SingleValue:function(e){var t=e.children,o=e.isDisabled,n=e.innerProps;return np("div",Y({},Sp(e,"singleValue",{"single-value":!0,"single-value--is-disabled":o}),n),t)},ValueContainer:function(e){var t=e.children,o=e.innerProps,n=e.isMulti,p=e.hasValue;return np("div",Y({},Sp(e,"valueContainer",{"value-container":!0,"value-container--is-multi":n,"value-container--has-value":p}),o),t)}},qc=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Wc(e,t){if(e.length!==t.length)return!1;for(var o=0;o1?"s":""," ").concat(p.join(","),", selected.");case"select-option":return"option ".concat(n,c?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,o=e.focused,n=e.options,p=e.label,c=void 0===p?"":p,b=e.selectValue,r=e.isDisabled,a=e.isSelected,M=e.isAppleDevice,i=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&b)return"value ".concat(c," focused, ").concat(i(b,o),".");if("menu"===t&&M){var z=r?" disabled":"",s="".concat(a?" selected":"").concat(z);return"".concat(c).concat(s,", ").concat(i(n,o),".")}return""},onFilter:function(e){var t=e.inputValue,o=e.resultsMessage;return"".concat(o).concat(t?" for search term "+t:"",".")}},vc=function(t){var o=t.ariaSelection,n=t.focusedOption,p=t.focusedValue,c=t.focusableOptions,b=t.isFocused,r=t.selectValue,a=t.selectProps,M=t.id,i=t.isAppleDevice,z=a.ariaLiveMessages,s=a.getOptionLabel,l=a.inputValue,O=a.isMulti,d=a.isOptionDisabled,u=a.isSearchable,A=a.menuIsOpen,f=a.options,q=a.screenReaderStatus,W=a.tabSelectsValue,m=a.isLoading,h=a["aria-label"],g=a["aria-live"],v=(0,e.useMemo)((function(){return go(go({},gc),z||{})}),[z]),R=(0,e.useMemo)((function(){var e,t="";if(o&&v.onChange){var n=o.option,p=o.options,c=o.removedValue,b=o.removedValues,a=o.value,M=c||n||(e=a,Array.isArray(e)?null:e),i=M?s(M):"",z=p||b||void 0,l=z?z.map(s):[],O=go({isDisabled:M&&d(M,r),label:i,labels:l},o);t=v.onChange(O)}return t}),[o,v,d,r,s]),w=(0,e.useMemo)((function(){var e="",t=n||p,o=!!(n&&r&&r.includes(n));if(t&&v.onFocus){var b={focused:t,label:s(t),isDisabled:d(t,r),isSelected:o,options:c,context:t===n?"menu":"value",selectValue:r,isAppleDevice:i};e=v.onFocus(b)}return e}),[n,p,s,d,v,c,r,i]),y=(0,e.useMemo)((function(){var e="";if(A&&f.length&&!m&&v.onFilter){var t=q({count:c.length});e=v.onFilter({inputValue:l,resultsMessage:t})}return e}),[c,l,A,v,f,q,m]),L="initial-input-focus"===(null==o?void 0:o.action),N=(0,e.useMemo)((function(){var e="";if(v.guidance){var t=p?"value":A?"menu":"input";e=v.guidance({"aria-label":h,context:t,isDisabled:n&&d(n,r),isMulti:O,isSearchable:u,tabSelectsValue:W,isInitialFocus:L})}return e}),[h,n,p,O,d,u,A,v,r,W,L]),B=np(e.Fragment,null,np("span",{id:"aria-selection"},R),np("span",{id:"aria-focused"},w),np("span",{id:"aria-results"},y),np("span",{id:"aria-guidance"},N));return np(e.Fragment,null,np(hc,{id:M},L&&B),np(hc,{"aria-live":g,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},b&&!L&&B))},Rc=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],wc=new RegExp("["+Rc.map((function(e){return e.letters})).join("")+"]","g"),yc={},Lc=0;Lc1?t-1:0),n=1;n0,d=z-s-M,u=!1;d>t&&r.current&&(p&&p(e),r.current=!1),O&&a.current&&(b&&b(e),a.current=!1),O&&t>d?(n&&!r.current&&n(e),l.scrollTop=z,u=!0,r.current=!0):!O&&-t>M&&(c&&!a.current&&c(e),l.scrollTop=0,u=!0,a.current=!0),u&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}}),[n,p,c,b]),s=(0,e.useCallback)((function(e){z(e,e.deltaY)}),[z]),l=(0,e.useCallback)((function(e){M.current=e.changedTouches[0].clientY}),[]),O=(0,e.useCallback)((function(e){var t=M.current-e.changedTouches[0].clientY;z(e,t)}),[z]),d=(0,e.useCallback)((function(e){if(e){var t=!!Hp&&{passive:!1};e.addEventListener("wheel",s,t),e.addEventListener("touchstart",l,t),e.addEventListener("touchmove",O,t)}}),[O,l,s]),u=(0,e.useCallback)((function(e){e&&(e.removeEventListener("wheel",s,!1),e.removeEventListener("touchstart",l,!1),e.removeEventListener("touchmove",O,!1))}),[O,l,s]);return(0,e.useEffect)((function(){if(o){var e=i.current;return d(e),function(){u(e)}}}),[o,d,u]),function(e){i.current=e}}({isEnabled:void 0===p||p,onBottomArrive:t.onBottomArrive,onBottomLeave:t.onBottomLeave,onTopArrive:t.onTopArrive,onTopLeave:t.onTopLeave}),b=function(t){var o=t.isEnabled,n=t.accountForScrollbars,p=void 0===n||n,c=(0,e.useRef)({}),b=(0,e.useRef)(null),r=(0,e.useCallback)((function(e){if(Hc){var t=document.body,o=t&&t.style;if(p&&_c.forEach((function(e){var t=o&&o[e];c.current[e]=t})),p&&Fc<1){var n=parseInt(c.current.paddingRight,10)||0,b=document.body?document.body.clientWidth:0,r=window.innerWidth-b+n||0;Object.keys(xc).forEach((function(e){var t=xc[e];o&&(o[e]=t)})),o&&(o.paddingRight="".concat(r,"px"))}t&&jc()&&(t.addEventListener("touchmove",Dc,Uc),e&&(e.addEventListener("touchstart",Ic,Uc),e.addEventListener("touchmove",Pc,Uc))),Fc+=1}}),[p]),a=(0,e.useCallback)((function(e){if(Hc){var t=document.body,o=t&&t.style;Fc=Math.max(Fc-1,0),p&&Fc<1&&_c.forEach((function(e){var t=c.current[e];o&&(o[e]=t)})),t&&jc()&&(t.removeEventListener("touchmove",Dc,Uc),e&&(e.removeEventListener("touchstart",Ic,Uc),e.removeEventListener("touchmove",Pc,Uc)))}}),[p]);return(0,e.useEffect)((function(){if(o){var e=b.current;return r(e),function(){a(e)}}}),[o,r,a]),function(e){b.current=e}}({isEnabled:n});return np(e.Fragment,null,n&&np("div",{onClick:Vc,css:Gc}),o((function(e){c(e),b(e)})))}var Qc={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Kc=function(e){var t=e.name,o=e.onFocus;return np("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:o,css:Qc,value:"",onChange:function(){}})};function Jc(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function Zc(){return Jc(/^Mac/i)}var $c={clearIndicator:Mc,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var o=e.isDisabled,n=e.isFocused,p=e.theme,c=p.colors,b=p.borderRadius;return go({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:p.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:o?c.neutral5:c.neutral0,borderColor:o?c.neutral10:n?c.primary:c.neutral20,borderRadius:b,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(c.primary):void 0,"&:hover":{borderColor:n?c.primary:c.neutral30}})},dropdownIndicator:ac,group:function(e,t){var o=e.theme.spacing;return t?{}:{paddingBottom:2*o.baseUnit,paddingTop:2*o.baseUnit}},groupHeading:function(e,t){var o=e.theme,n=o.colors,p=o.spacing;return go({label:"group",cursor:"default",display:"block"},t?{}:{color:n.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*p.baseUnit,paddingRight:3*p.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var o=e.isDisabled,n=e.theme,p=n.spacing.baseUnit,c=n.colors;return go({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:o?c.neutral10:c.neutral20,marginBottom:2*p,marginTop:2*p})},input:function(e,t){var o=e.isDisabled,n=e.value,p=e.theme,c=p.spacing,b=p.colors;return go(go({visibility:o?"hidden":"visible",transform:n?"translateZ(0)":""},dc),t?{}:{margin:c.baseUnit/2,paddingBottom:c.baseUnit/2,paddingTop:c.baseUnit/2,color:b.neutral80})},loadingIndicator:function(e,t){var o=e.isFocused,n=e.size,p=e.theme,c=p.colors,b=p.spacing.baseUnit;return go({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"},t?{}:{color:o?c.neutral60:c.neutral20,padding:2*b})},loadingMessage:ec,menu:function(e,t){var o,n=e.placement,p=e.theme,c=p.borderRadius,b=p.spacing,r=p.colors;return go((z(o={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n),"100%"),z(o,"position","absolute"),z(o,"width","100%"),z(o,"zIndex",1),o),t?{}:{backgroundColor:r.neutral0,borderRadius:c,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:b.menuGutter,marginTop:b.menuGutter})},menuList:function(e,t){var o=e.maxHeight,n=e.theme.spacing.baseUnit;return go({maxHeight:o,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:n,paddingTop:n})},menuPortal:function(e){var t=e.rect,o=e.offset,n=e.position;return{left:t.left,position:n,top:o,width:t.width,zIndex:1}},multiValue:function(e,t){var o=e.theme,n=o.spacing,p=o.borderRadius,c=o.colors;return go({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:c.neutral10,borderRadius:p/2,margin:n.baseUnit/2})},multiValueLabel:function(e,t){var o=e.theme,n=o.borderRadius,p=o.colors,c=e.cropWithEllipsis;return go({overflow:"hidden",textOverflow:c||void 0===c?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:n/2,color:p.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var o=e.theme,n=o.spacing,p=o.borderRadius,c=o.colors,b=e.isFocused;return go({alignItems:"center",display:"flex"},t?{}:{borderRadius:p/2,backgroundColor:b?c.dangerLight:void 0,paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:c.dangerLight,color:c.danger}})},noOptionsMessage:$p,option:function(e,t){var o=e.isDisabled,n=e.isFocused,p=e.isSelected,c=e.theme,b=c.spacing,r=c.colors;return go({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:p?r.primary:n?r.primary25:"transparent",color:o?r.neutral20:p?r.neutral0:"inherit",padding:"".concat(2*b.baseUnit,"px ").concat(3*b.baseUnit,"px"),":active":{backgroundColor:o?void 0:p?r.primary:r.primary50}})},placeholder:function(e,t){var o=e.theme,n=o.spacing,p=o.colors;return go({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:p.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2})},singleValue:function(e,t){var o=e.isDisabled,n=e.theme,p=n.spacing,c=n.colors;return go({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:o?c.neutral40:c.neutral80,marginLeft:p.baseUnit/2,marginRight:p.baseUnit/2})},valueContainer:function(e,t){var o=e.theme.spacing,n=e.isMulti,p=e.hasValue,c=e.selectProps.controlShouldRenderValue;return go({alignItems:"center",display:n&&p&&c?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(o.baseUnit/2,"px ").concat(2*o.baseUnit,"px")})}},eb={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},tb={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Dp(),captureMenuScroll:!Dp(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var o=go({ignoreCase:!0,ignoreAccents:!0,stringify:Tc,trim:!0,matchFrom:"any"},void 0),n=o.ignoreCase,p=o.ignoreAccents,c=o.stringify,b=o.trim,r=o.matchFrom,a=b?Sc(t):t,M=b?Sc(c(e)):c(e);return n&&(a=a.toLowerCase(),M=M.toLowerCase()),p&&(a=Cc(a),M=Ec(M)),"start"===r?M.substr(0,a.length)===a:M.indexOf(a)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function ob(e,t,o,n){return{type:"option",data:t,isDisabled:ib(e,t,o),isSelected:zb(e,t,o),label:ab(e,t),value:Mb(e,t),index:n}}function nb(e,t){return e.options.map((function(o,n){if("options"in o){var p=o.options.map((function(o,n){return ob(e,o,t,n)})).filter((function(t){return bb(e,t)}));return p.length>0?{type:"group",data:o,options:p,index:n}:void 0}var c=ob(e,o,t,n);return bb(e,c)?c:void 0})).filter(Fp)}function pb(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,d(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function cb(e,t){return e.reduce((function(e,o){return"group"===o.type?e.push.apply(e,d(o.options.map((function(e){return{data:e.data,id:"".concat(t,"-").concat(o.index,"-").concat(e.index)}})))):e.push({data:o.data,id:"".concat(t,"-").concat(o.index)}),e}),[])}function bb(e,t){var o=e.inputValue,n=void 0===o?"":o,p=t.data,c=t.isSelected,b=t.label,r=t.value;return(!lb(e)||!c)&&sb(e,{label:b,value:r,data:p},n)}var rb=function(e,t){var o;return(null===(o=e.find((function(e){return e.data===t})))||void 0===o?void 0:o.id)||null},ab=function(e,t){return e.getOptionLabel(t)},Mb=function(e,t){return e.getOptionValue(t)};function ib(e,t,o){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,o)}function zb(e,t,o){if(o.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,o);var n=Mb(e,t);return o.some((function(t){return Mb(e,t)===n}))}function sb(e,t,o){return!e.filterOption||e.filterOption(t,o)}var lb=function(e){var t=e.hideSelectedOptions,o=e.isMulti;return void 0===t?o:t},Ob=1,db=function(t){!function(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wo(e,t)}(n,t);var o=function(e){var t=Lo();return function(){var o,n=yo(e);if(t){var p=yo(this).constructor;o=Reflect.construct(n,arguments,p)}else o=n.apply(this,arguments);return function(e,t){if(t&&("object"==M(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,o)}}(n);function n(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(t=o.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},t.blockOptionHover=!1,t.isComposing=!1,t.commonProps=void 0,t.initialTouchX=0,t.initialTouchY=0,t.openAfterFocus=!1,t.scrollToFocusedOptionOnUpdate=!1,t.userIsDragging=void 0,t.isAppleDevice=Zc()||Jc(/^iPhone/i)||Jc(/^iPad/i)||Zc()&&navigator.maxTouchPoints>1,t.controlRef=null,t.getControlRef=function(e){t.controlRef=e},t.focusedOptionRef=null,t.getFocusedOptionRef=function(e){t.focusedOptionRef=e},t.menuListRef=null,t.getMenuListRef=function(e){t.menuListRef=e},t.inputRef=null,t.getInputRef=function(e){t.inputRef=e},t.focus=t.focusInput,t.blur=t.blurInput,t.onChange=function(e,o){var n=t.props,p=n.onChange,c=n.name;o.name=c,t.ariaOnChange(e,o),p(e,o)},t.setValue=function(e,o,n){var p=t.props,c=p.closeMenuOnSelect,b=p.isMulti,r=p.inputValue;t.onInputChange("",{action:"set-value",prevInputValue:r}),c&&(t.setState({inputIsHiddenAfterUpdate:!b}),t.onMenuClose()),t.setState({clearFocusValueOnUpdate:!0}),t.onChange(e,{action:o,option:n})},t.selectOption=function(e){var o=t.props,n=o.blurInputOnSelect,p=o.isMulti,c=o.name,b=t.state.selectValue,r=p&&t.isOptionSelected(e,b),a=t.isOptionDisabled(e,b);if(r){var M=t.getOptionValue(e);t.setValue(b.filter((function(e){return t.getOptionValue(e)!==M})),"deselect-option",e)}else{if(a)return void t.ariaOnChange(e,{action:"select-option",option:e,name:c});p?t.setValue([].concat(d(b),[e]),"select-option",e):t.setValue(e,"select-option")}n&&t.blurInput()},t.removeValue=function(e){var o=t.props.isMulti,n=t.state.selectValue,p=t.getOptionValue(e),c=n.filter((function(e){return t.getOptionValue(e)!==p})),b=Up(o,c,c[0]||null);t.onChange(b,{action:"remove-value",removedValue:e}),t.focusInput()},t.clearValue=function(){var e=t.state.selectValue;t.onChange(Up(t.props.isMulti,[],null),{action:"clear",removedValues:e})},t.popValue=function(){var e=t.props.isMulti,o=t.state.selectValue,n=o[o.length-1],p=o.slice(0,o.length-1),c=Up(e,p,p[0]||null);t.onChange(c,{action:"pop-value",removedValue:n})},t.getFocusedOptionId=function(e){return rb(t.state.focusableOptionsWithIds,e)},t.getFocusableOptionsWithIds=function(){return cb(nb(t.props,t.state.selectValue),t.getElementId("option"))},t.getValue=function(){return t.state.selectValue},t.cx=function(){for(var e=arguments.length,o=new Array(e),n=0;n5||c>5}},t.onTouchEnd=function(e){t.userIsDragging||(t.controlRef&&!t.controlRef.contains(e.target)&&t.menuListRef&&!t.menuListRef.contains(e.target)&&t.blurInput(),t.initialTouchX=0,t.initialTouchY=0)},t.onControlTouchEnd=function(e){t.userIsDragging||t.onControlMouseDown(e)},t.onClearIndicatorTouchEnd=function(e){t.userIsDragging||t.onClearIndicatorMouseDown(e)},t.onDropdownIndicatorTouchEnd=function(e){t.userIsDragging||t.onDropdownIndicatorMouseDown(e)},t.handleInputChange=function(e){var o=t.props.inputValue,n=e.currentTarget.value;t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange(n,{action:"input-change",prevInputValue:o}),t.props.menuIsOpen||t.onMenuOpen()},t.onInputFocus=function(e){t.props.onFocus&&t.props.onFocus(e),t.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(t.openAfterFocus||t.props.openMenuOnFocus)&&t.openMenu("first"),t.openAfterFocus=!1},t.onInputBlur=function(e){var o=t.props.inputValue;t.menuListRef&&t.menuListRef.contains(document.activeElement)?t.inputRef.focus():(t.props.onBlur&&t.props.onBlur(e),t.onInputChange("",{action:"input-blur",prevInputValue:o}),t.onMenuClose(),t.setState({focusedValue:null,isFocused:!1}))},t.onOptionHover=function(e){if(!t.blockOptionHover&&t.state.focusedOption!==e){var o=t.getFocusableOptions().indexOf(e);t.setState({focusedOption:e,focusedOptionId:o>-1?t.getFocusedOptionId(e):null})}},t.shouldHideSelectedOptions=function(){return lb(t.props)},t.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),t.focus()},t.onKeyDown=function(e){var o=t.props,n=o.isMulti,p=o.backspaceRemovesValue,c=o.escapeClearsValue,b=o.inputValue,r=o.isClearable,a=o.isDisabled,M=o.menuIsOpen,i=o.onKeyDown,z=o.tabSelectsValue,s=o.openMenuOnFocus,l=t.state,O=l.focusedOption,d=l.focusedValue,u=l.selectValue;if(!(a||"function"==typeof i&&(i(e),e.defaultPrevented))){switch(t.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||b)return;t.focusValue("previous");break;case"ArrowRight":if(!n||b)return;t.focusValue("next");break;case"Delete":case"Backspace":if(b)return;if(d)t.removeValue(d);else{if(!p)return;n?t.popValue():r&&t.clearValue()}break;case"Tab":if(t.isComposing)return;if(e.shiftKey||!M||!z||!O||s&&t.isOptionSelected(O,u))return;t.selectOption(O);break;case"Enter":if(229===e.keyCode)break;if(M){if(!O)return;if(t.isComposing)return;t.selectOption(O);break}return;case"Escape":M?(t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange("",{action:"menu-close",prevInputValue:b}),t.onMenuClose()):r&&c&&t.clearValue();break;case" ":if(b)return;if(!M){t.openMenu("first");break}if(!O)return;t.selectOption(O);break;case"ArrowUp":M?t.focusOption("up"):t.openMenu("last");break;case"ArrowDown":M?t.focusOption("down"):t.openMenu("first");break;case"PageUp":if(!M)return;t.focusOption("pageup");break;case"PageDown":if(!M)return;t.focusOption("pagedown");break;case"Home":if(!M)return;t.focusOption("first");break;case"End":if(!M)return;t.focusOption("last");break;default:return}e.preventDefault()}},t.state.instancePrefix="react-select-"+(t.props.instanceId||++Ob),t.state.selectValue=Ep(e.value),e.menuIsOpen&&t.state.selectValue.length){var p=t.getFocusableOptionsWithIds(),c=t.buildFocusableOptions(),b=c.indexOf(t.state.selectValue[0]);t.state.focusableOptionsWithIds=p,t.state.focusedOption=c[b],t.state.focusedOptionId=rb(p,c[b])}return t}return function(e,t,o){t&&Ro(e.prototype,t),o&&Ro(e,o),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&xp(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,o=t.isDisabled,n=t.menuIsOpen,p=this.state.isFocused;(p&&!o&&e.isDisabled||p&&n&&!e.menuIsOpen)&&this.focusInput(),p&&o&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):p||o||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(xp(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,o=this.state,n=o.selectValue,p=o.isFocused,c=this.buildFocusableOptions(),b="first"===e?0:c.length-1;if(!this.props.isMulti){var r=c.indexOf(n[0]);r>-1&&(b=r)}this.scrollToFocusedOptionOnUpdate=!(p&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:c[b],focusedOptionId:this.getFocusedOptionId(c[b])},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,o=t.selectValue,n=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var p=o.indexOf(n);n||(p=-1);var c=o.length-1,b=-1;if(o.length){switch(e){case"previous":b=0===p?0:-1===p?c:p-1;break;case"next":p>-1&&p0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,o=this.state.focusedOption,n=this.getFocusableOptions();if(n.length){var p=0,c=n.indexOf(o);o||(c=-1),"up"===e?p=c>0?c-1:n.length-1:"down"===e?p=(c+1)%n.length:"pageup"===e?(p=c-t)<0&&(p=0):"pagedown"===e?(p=c+t)>n.length-1&&(p=n.length-1):"last"===e&&(p=n.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:n[p],focusedValue:null,focusedOptionId:this.getFocusedOptionId(n[p])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(eb):go(go({},eb),this.props.theme):eb}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,o=this.getStyles,n=this.getClassNames,p=this.getValue,c=this.selectOption,b=this.setValue,r=this.props,a=r.isMulti,M=r.isRtl,i=r.options;return{clearValue:e,cx:t,getStyles:o,getClassNames:n,getValue:p,hasValue:this.hasValue(),isMulti:a,isRtl:M,options:i,selectOption:c,selectProps:r,setValue:b,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,o=e.isMulti;return void 0===t?o:t}},{key:"isOptionDisabled",value:function(e,t){return ib(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return zb(this.props,e,t)}},{key:"filterOption",value:function(e,t){return sb(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var o=this.props.inputValue,n=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:o,selectValue:n})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var t=this.props,o=t.isDisabled,n=t.isSearchable,p=t.inputId,c=t.inputValue,b=t.tabIndex,r=t.form,a=t.menuIsOpen,M=t.required,i=this.getComponents().Input,z=this.state,s=z.inputIsHidden,l=z.ariaSelection,O=this.commonProps,d=p||this.getElementId("input"),u=go(go(go({"aria-autocomplete":"list","aria-expanded":a,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":M,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},a&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==l?void 0:l.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?e.createElement(i,Y({},O,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:d,innerRef:this.getInputRef,isDisabled:o,isHidden:s,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:b,form:r,type:"text",value:c},u)):e.createElement(kc,Y({id:d,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Lp,onFocus:this.onInputFocus,disabled:o,tabIndex:b,inputMode:"none",form:r,value:""},u))}},{key:"renderPlaceholderOrValue",value:function(){var t=this,o=this.getComponents(),n=o.MultiValue,p=o.MultiValueContainer,c=o.MultiValueLabel,b=o.MultiValueRemove,r=o.SingleValue,a=o.Placeholder,M=this.commonProps,i=this.props,z=i.controlShouldRenderValue,s=i.isDisabled,l=i.isMulti,O=i.inputValue,d=i.placeholder,u=this.state,A=u.selectValue,f=u.focusedValue,q=u.isFocused;if(!this.hasValue()||!z)return O?null:e.createElement(a,Y({},M,{key:"placeholder",isDisabled:s,isFocused:q,innerProps:{id:this.getElementId("placeholder")}}),d);if(l)return A.map((function(o,r){var a=o===f,i="".concat(t.getOptionLabel(o),"-").concat(t.getOptionValue(o));return e.createElement(n,Y({},M,{components:{Container:p,Label:c,Remove:b},isFocused:a,isDisabled:s,key:i,index:r,removeProps:{onClick:function(){return t.removeValue(o)},onTouchEnd:function(){return t.removeValue(o)},onMouseDown:function(e){e.preventDefault()}},data:o}),t.formatOptionLabel(o,"value"))}));if(O)return null;var W=A[0];return e.createElement(r,Y({},M,{data:W,isDisabled:s}),this.formatOptionLabel(W,"value"))}},{key:"renderClearIndicator",value:function(){var t=this.getComponents().ClearIndicator,o=this.commonProps,n=this.props,p=n.isDisabled,c=n.isLoading,b=this.state.isFocused;if(!this.isClearable()||!t||p||!this.hasValue()||c)return null;var r={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return e.createElement(t,Y({},o,{innerProps:r,isFocused:b}))}},{key:"renderLoadingIndicator",value:function(){var t=this.getComponents().LoadingIndicator,o=this.commonProps,n=this.props,p=n.isDisabled,c=n.isLoading,b=this.state.isFocused;return t&&c?e.createElement(t,Y({},o,{innerProps:{"aria-hidden":"true"},isDisabled:p,isFocused:b})):null}},{key:"renderIndicatorSeparator",value:function(){var t=this.getComponents(),o=t.DropdownIndicator,n=t.IndicatorSeparator;if(!o||!n)return null;var p=this.commonProps,c=this.props.isDisabled,b=this.state.isFocused;return e.createElement(n,Y({},p,{isDisabled:c,isFocused:b}))}},{key:"renderDropdownIndicator",value:function(){var t=this.getComponents().DropdownIndicator;if(!t)return null;var o=this.commonProps,n=this.props.isDisabled,p=this.state.isFocused,c={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return e.createElement(t,Y({},o,{innerProps:c,isDisabled:n,isFocused:p}))}},{key:"renderMenu",value:function(){var t=this,o=this.getComponents(),n=o.Group,p=o.GroupHeading,c=o.Menu,b=o.MenuList,r=o.MenuPortal,a=o.LoadingMessage,M=o.NoOptionsMessage,i=o.Option,z=this.commonProps,s=this.state.focusedOption,l=this.props,O=l.captureMenuScroll,d=l.inputValue,u=l.isLoading,A=l.loadingMessage,f=l.minMenuHeight,q=l.maxMenuHeight,W=l.menuIsOpen,m=l.menuPlacement,h=l.menuPosition,g=l.menuPortalTarget,v=l.menuShouldBlockScroll,R=l.menuShouldScrollIntoView,w=l.noOptionsMessage,y=l.onMenuScrollToTop,L=l.onMenuScrollToBottom;if(!W)return null;var N,B=function(o,n){var p=o.type,c=o.data,b=o.isDisabled,r=o.isSelected,a=o.label,M=o.value,l=s===c,O=b?void 0:function(){return t.onOptionHover(c)},d=b?void 0:function(){return t.selectOption(c)},u="".concat(t.getElementId("option"),"-").concat(n),A={id:u,onClick:d,onMouseMove:O,onMouseOver:O,tabIndex:-1,role:"option","aria-selected":t.isAppleDevice?void 0:r};return e.createElement(i,Y({},z,{innerProps:A,data:c,isDisabled:b,isSelected:r,key:u,label:a,type:p,value:M,isFocused:l,innerRef:l?t.getFocusedOptionRef:void 0}),t.formatOptionLabel(o.data,"menu"))};if(this.hasOptions())N=this.getCategorizedOptions().map((function(o){if("group"===o.type){var c=o.data,b=o.options,r=o.index,a="".concat(t.getElementId("group"),"-").concat(r),M="".concat(a,"-heading");return e.createElement(n,Y({},z,{key:a,data:c,options:b,Heading:p,headingProps:{id:M,data:o.data},label:t.formatGroupLabel(o.data)}),o.options.map((function(e){return B(e,"".concat(r,"-").concat(e.index))})))}if("option"===o.type)return B(o,"".concat(o.index))}));else if(u){var E=A({inputValue:d});if(null===E)return null;N=e.createElement(a,z,E)}else{var C=w({inputValue:d});if(null===C)return null;N=e.createElement(M,z,C)}var S={minMenuHeight:f,maxMenuHeight:q,menuPlacement:m,menuPosition:h,menuShouldScrollIntoView:R},T=e.createElement(Jp,Y({},z,S),(function(o){var n=o.ref,p=o.placerProps,r=p.placement,a=p.maxHeight;return e.createElement(c,Y({},z,S,{innerRef:n,innerProps:{onMouseDown:t.onMenuMouseDown,onMouseMove:t.onMenuMouseMove},isLoading:u,placement:r}),e.createElement(Yc,{captureEnabled:O,onTopArrive:y,onBottomArrive:L,lockEnabled:v},(function(o){return e.createElement(b,Y({},z,{innerRef:function(e){t.getMenuListRef(e),o(e)},innerProps:{role:"listbox","aria-multiselectable":z.isMulti,id:t.getElementId("listbox")},isLoading:u,maxHeight:a,focusedOption:s}),N)})))}));return g||"fixed"===h?e.createElement(r,Y({},z,{appendTo:g,controlElement:this.controlRef,menuPlacement:m,menuPosition:h}),T):T}},{key:"renderFormField",value:function(){var t=this,o=this.props,n=o.delimiter,p=o.isDisabled,c=o.isMulti,b=o.name,r=o.required,a=this.state.selectValue;if(r&&!this.hasValue()&&!p)return e.createElement(Kc,{name:b,onFocus:this.onValueInputFocus});if(b&&!p){if(c){if(n){var M=a.map((function(e){return t.getOptionValue(e)})).join(n);return e.createElement("input",{name:b,type:"hidden",value:M})}var i=a.length>0?a.map((function(o,n){return e.createElement("input",{key:"i-".concat(n),name:b,type:"hidden",value:t.getOptionValue(o)})})):e.createElement("input",{name:b,type:"hidden",value:""});return e.createElement("div",null,i)}var z=a[0]?this.getOptionValue(a[0]):"";return e.createElement("input",{name:b,type:"hidden",value:z})}}},{key:"renderLiveRegion",value:function(){var t=this.commonProps,o=this.state,n=o.ariaSelection,p=o.focusedOption,c=o.focusedValue,b=o.isFocused,r=o.selectValue,a=this.getFocusableOptions();return e.createElement(vc,Y({},t,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:p,focusedValue:c,isFocused:b,selectValue:r,focusableOptions:a,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var t=this.getComponents(),o=t.Control,n=t.IndicatorsContainer,p=t.SelectContainer,c=t.ValueContainer,b=this.props,r=b.className,a=b.id,M=b.isDisabled,i=b.menuIsOpen,z=this.state.isFocused,s=this.commonProps=this.getCommonProps();return e.createElement(p,Y({},s,{className:r,innerProps:{id:a,onKeyDown:this.onKeyDown},isDisabled:M,isFocused:z}),this.renderLiveRegion(),e.createElement(o,Y({},s,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:M,isFocused:z,menuIsOpen:i}),e.createElement(c,Y({},s,{isDisabled:M}),this.renderPlaceholderOrValue(),this.renderInput()),e.createElement(n,Y({},s,{isDisabled:M}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var o=t.prevProps,n=t.clearFocusValueOnUpdate,p=t.inputIsHiddenAfterUpdate,c=t.ariaSelection,b=t.isFocused,r=t.prevWasFocused,a=t.instancePrefix,M=e.options,i=e.value,z=e.menuIsOpen,s=e.inputValue,l=e.isMulti,O=Ep(i),d={};if(o&&(i!==o.value||M!==o.options||z!==o.menuIsOpen||s!==o.inputValue)){var u=z?function(e,t){return pb(nb(e,t))}(e,O):[],A=z?cb(nb(e,O),"".concat(a,"-option")):[],f=n?function(e,t){var o=e.focusedValue,n=e.selectValue.indexOf(o);if(n>-1){if(t.indexOf(o)>-1)return o;if(n-1?o:t[0]}(t,u);d={selectValue:O,focusedOption:q,focusedOptionId:rb(A,q),focusableOptionsWithIds:A,focusedValue:f,clearFocusValueOnUpdate:!1}}var W=null!=p&&e!==o?{inputIsHidden:p,inputIsHiddenAfterUpdate:void 0}:{},m=c,h=b&&r;return b&&!h&&(m={value:Up(l,O,O[0]||null),options:O,action:"initial-input-focus"},h=!r),"initial-input-focus"===(null==c?void 0:c.action)&&(m=null),go(go(go({},d),W),{},{prevProps:e,ariaSelection:m,prevWasFocused:h})}}]),n}(e.Component);db.defaultProps=tb;var ub=(0,e.forwardRef)((function(t,o){var n=function(t){var o=t.defaultInputValue,n=void 0===o?"":o,p=t.defaultMenuIsOpen,c=void 0!==p&&p,b=t.defaultValue,r=void 0===b?null:b,a=t.inputValue,M=t.menuIsOpen,i=t.onChange,z=t.onInputChange,s=t.onMenuClose,l=t.onMenuOpen,O=t.value,d=$(t,vo),u=Q((0,e.useState)(void 0!==a?a:n),2),A=u[0],f=u[1],q=Q((0,e.useState)(void 0!==M?M:c),2),W=q[0],m=q[1],h=Q((0,e.useState)(void 0!==O?O:r),2),g=h[0],v=h[1],R=(0,e.useCallback)((function(e,t){"function"==typeof i&&i(e,t),v(e)}),[i]),w=(0,e.useCallback)((function(e,t){var o;"function"==typeof z&&(o=z(e,t)),f(void 0!==o?o:e)}),[z]),y=(0,e.useCallback)((function(){"function"==typeof l&&l(),m(!0)}),[l]),L=(0,e.useCallback)((function(){"function"==typeof s&&s(),m(!1)}),[s]),N=void 0!==a?a:A,B=void 0!==M?M:W,E=void 0!==O?O:g;return go(go({},d),{},{inputValue:N,menuIsOpen:B,onChange:R,onInputChange:w,onMenuClose:L,onMenuOpen:y,value:E})}(t);return e.createElement(db,Y({ref:o},n))})),Ab=ub,fb=function(){return fb=Object.assign||function(e){for(var t,o=1,n=arguments.length;o0){var t=null==i?void 0:i.findIndex((function(e){return e.board===(null==c?void 0:c.value)}));-1!==t&&i.splice(t,1),i.push(Wb(Wb({},e),{board:null==c?void 0:c.value})),M(i)}else i.push(Wb(Wb({},e),{board:null==c?void 0:c.value})),M(i)},styles:qb,options:a,className:"main-select"})}function hb(o){o.platform;var n,p=o.data,c=o.boards,b=o.fetchSectionData,r=o.noSection,a=o.addProfileToggle,M=o.savedProfile,i=o.singlePinterestBoard,z=o.setProfileEditModal,s=null==c?void 0:c.map((function(e){return{label:e.name||e.id,value:e.id}})),l=(0,e.useState)(r?[r]:[]),O=l[0],d=l[1],u=(0,e.useState)(null!==(n=null==i?void 0:i.defaultSection)&&void 0!==n?n:[]),A=u[0],f=u[1],q=(0,e.useState)([r]),W=q[0],m=q[1],h=(0,e.useState)([]),g=h[0],v=h[1],R=(0,e.useState)(!1),w=R[0],y=R[1];(0,e.useEffect)((function(){z||y(!1)}),[z]),(0,e.useEffect)((function(){i&&(v([null==i?void 0:i.default_board_name]),f([null==i?void 0:i.defaultSection]))}),[i]);var L="";return s.length<=0&&(L=(0,k.__)("It seems that there are no Pinterest Board associated to your Pinterest profile.","wp-scheduled-posts")),t().createElement(t().Fragment,null,t().createElement("div",{className:"wpsp-modal-social-platform"},!i&&(null==p?void 0:p.map((function(e,o){return t().createElement("div",{className:"pinterest-model-wrapper"},t().createElement("div",{className:"author-details"},t().createElement("img",{src:null==e?void 0:e.thumbnail_url,alt:null==e?void 0:e.name}),t().createElement("h3",null,null==e?void 0:e.name)),t().createElement("div",{className:"profile-info"},s.length>0&&t().createElement("ul",null,s.map((function(o,n){return t().createElement("li",{key:n},t().createElement("div",{className:"item-content"},t().createElement("h4",{className:"entry-title"},null==o?void 0:o.label),t().createElement("div",{className:"control pinterest-select"},t().createElement(mb,{noSection:r,fetchSectionData:b,board:o,item:e,setSectionOptions:m,sectionOptions:W,setBoardDefaultSection:d,prevDefaultSection:O})),t().createElement("input",{type:"checkbox",onChange:function(t){var n=O.find((function(e){return e.board===(null==o?void 0:o.value)}));a(e,n,t,o)}})))}))),s.length<=0&&t().createElement("span",{className:"profile-not-found-message"},L),t().createElement("button",{type:"submit",className:"wpsp-modal-save-account",onClick:function(e){M(e)}},(0,k.__)("Save","wp-scheduled-posts"))))}))),i&&t().createElement("div",{className:"profile-info"},t().createElement("div",{className:"author-details"},t().createElement("img",{src:null==i?void 0:i.thumbnail_url,alt:null==i?void 0:i.name}),t().createElement("h3",null,null==i?void 0:i.name)),g.length>0&&t().createElement("ul",null,null==g?void 0:g.map((function(e,o){return t().createElement("li",{key:o},t().createElement("div",{className:"item-content"},t().createElement("h4",{className:"entry-title"},null==e?void 0:e.label),t().createElement("div",{className:"control pinterest-select"},t().createElement(Ab,{value:A,onMenuOpen:function(){return b(null==e?void 0:e.value,i,m)},styles:qb,className:"main-select",onChange:function(e){f(e),y(!0)},options:W}))))})),t().createElement("button",{type:"submit",className:"wpsp-modal-save-account",onClick:function(e){w?(M(e),a(i,A,"save-edit",null==i?void 0:i.default_board_name)):z(!1)}},(0,k.__)("Save","wp-scheduled-posts"))))))}function gb(o){o.platform;var n=o.data,p=o.addProfileToggle,c=o.savedProfile,b=(0,e.useState)(!1);return b[0],b[1],t().createElement(t().Fragment,null,t().createElement("div",{className:"wpsp-modal-social-platform"},t().createElement("ul",null,n.map((function(e,o){return t().createElement("li",{key:o},t().createElement("div",{className:"item-content"},t().createElement("div",{className:"entry-thumbnail"},t().createElement("img",{src:e.thumbnail_url,alt:"logo"}),t().createElement("h4",{className:"entry-title"},e.name)),t().createElement("div",{className:"control"},t().createElement("input",{type:"checkbox",onChange:function(t){p(e,o,t)}}),t().createElement("div",null))))}))),t().createElement("button",{type:"submit",className:"wpsp-modal-save-account",onClick:function(e){e.preventDefault(),c(e)}},(0,k.__)("Save","wp-scheduled-posts"))))}function vb(e){e.platform;var o=e.data,n=e.addProfileToggle,p=e.savedProfile,c="";return o.length<=0&&(c=(0,k.__)("It seems that there are no Instagram accounts associated to your Facebook profile.","wp-scheduled-posts")),t().createElement(t().Fragment,null,t().createElement("div",{className:"wpsp-modal-social-platform"},o.length>0&&t().createElement("ul",null,o.map((function(e,o){return t().createElement("li",{key:o},t().createElement("div",{className:"item-content"},t().createElement("div",{className:"entry-thumbnail"},t().createElement("img",{src:e.thumbnail_url,alt:"logo"}),t().createElement("h4",{className:"entry-title"},e.name)),t().createElement("div",{className:"control"},t().createElement("input",{type:"checkbox",onChange:function(t){n(e,o,t)}}),t().createElement("div",null))))}))),o.length<=0&&t().createElement("span",{className:"profile-not-found-message"},c),t().createElement("button",{type:"submit",className:"wpsp-modal-save-account",onClick:function(e){e.preventDefault(),p(e)}},(0,k.__)("Save","wp-scheduled-posts"))))}const Rb=function(e){var o=e.profiles,n=e.addProfileToggle,p=e.savedProfile;return console.log("profiles",o),t().createElement(t().Fragment,null,t().createElement("div",{className:"wpsp-modal-social-platform"},t().createElement("ul",null,o.length>0&&t().createElement("li",{className:"group-title"},(0,k.__)("Profiles:","wp-scheduled-posts")," "),o.map((function(e,o){return t().createElement("li",{id:"facebook_page_"+o,key:o},t().createElement("div",{className:"item-content"},t().createElement("div",{className:"entry-thumbnail"},t().createElement("img",{src:e.thumbnail_url,alt:"logo"}),t().createElement("h4",{className:"entry-title"},e.name)),t().createElement("div",{className:"control"},t().createElement("input",{type:"checkbox",onChange:function(t){return n(e,o,t)}}),t().createElement("div",null))))}))),t().createElement("button",{type:"submit",className:"wpsp-modal-save-account",onClick:function(e){e.preventDefault(),p(e)}},(0,k.__)("Save","wp-scheduled-posts"))))};var wb=function(){return wb=Object.assign||function(e){for(var t,o=1,n=arguments.length;o',confirmButtonText:(0,k.__)("Yes, Enable it!","wp-scheduled-posts")}).then((function(t){if(t.isConfirmed){var o=u.map((function(t){return Tb(Tb({},t),{status:t.id===e.id&&n})}));A(o)}})):(o=u.map((function(t){return Tb(Tb({},t),{status:t.id===e.id&&n})})),A(o))}},T=function(e){dt({item:e},X)},X=function(e){var t=u.filter((function(t){return t.id!==e.id}));A(t)};(0,e.useEffect)((function(){r.setFieldValue([o.name],u);var e=0;u&&u.forEach((function(t){t.status&&e++,B(e)}))}),[u]);var _=o.onChange;(0,e.useEffect)((function(){_({target:{type:"checkbox-select",name:"facebook_profile_status",value:R}})}),[R]);var x=[];return u&&q?x=u:u&&!q&&(x=u.slice(0,2)),t().createElement("div",{className:J()("wprf-control","wprf-social-profile","wprf-".concat(o.name,"-social-profile"),null==o?void 0:o.classes)},t().createElement("div",{className:"social-profile-card"},t().createElement("div",{className:"main-profile"},t().createElement(Eb,{props:o,handleProfileStatusChange:function(e){w(e.target.checked);var t=u.map((function(t){return e.target.checked?Tb(Tb({},t),{status:null!=(null==h?void 0:h[t.id])&&(null==h?void 0:h[t.id])}):(g((function(e){var o;return Tb(Tb({},e),((o={})[t.id]=null==t?void 0:t.status,o))})),Tb(Tb({},t),{status:!1}))}));A(t)},profileStatus:R,openApiCredentialsModal:function(e){localStorage.setItem("account_type",e),O("facebook"),z(!0)}})),t().createElement("div",{className:"selected-profile"},(!u||0==u.length)&&t().createElement("img",{className:"empty-image",src:"".concat(null===wpspSettingsGlobal||void 0===wpspSettingsGlobal?void 0:wpspSettingsGlobal.image_path,"EmptyCard.svg"),alt:"mainLogo"}),t().createElement("div",{className:"selected-facebook-scrollbar"},u&&x.map((function(e,o){return t().createElement("div",{className:"selected-facebook-wrapper",key:o},t().createElement(Cb,{platform:"facebook",item:e,handleSelectedProfileStatusChange:S,handleDeleteSelectedProfile:T,handleEditSelectedProfile:"",profileStatus:R}))}))),!q&&u&&u.length>=3&&t().createElement(Sb,{setSelectedProfileViewMore:W}))),t().createElement(po(),{isOpen:i,onRequestClose:C,ariaHideApp:!1,shouldCloseOnOverlayClick:!1,className:"modal_wrapper"},t().createElement("button",{className:"close-button",onClick:C},t().createElement("i",{className:"wpsp-icon wpsp-close"})),t().createElement(Ao,{props:o,platform:l,requestHandler:Mo,appInfo:y})),t().createElement(Lb,{setSelectedProfile:A,props:o,type:"facebook",profileStatus:R}))};var kb=function(){return kb=Object.assign||function(e){for(var t,o=1,n=arguments.length;o',confirmButtonText:(0,k.__)("Yes, Enable it!","wp-scheduled-posts")}).then((function(t){if(t.isConfirmed){var o=u.map((function(t){return kb(kb({},t),{status:t.id===e.id&&n})}));A(o)}})):(o=u.map((function(t){return kb(kb({},t),{status:t.id===e.id&&n})})),A(o))}}else Ot()},j=function(e){dt({item:e},H)},H=function(e){var t=u.filter((function(t){return t.id!==e.id}));A(t)};(0,e.useEffect)((function(){r.setFieldValue([o.name],u);var e=0;u&&u.forEach((function(t){t.status&&e++,w(e)}))}),[u]);var F=o.onChange;(0,e.useEffect)((function(){F({target:{type:"checkbox-select",name:"linkedin_profile_status",value:L}})}),[L]);var U=[];return u&&q?U=u:u&&!q&&(U=u.slice(0,2)),t().createElement("div",{className:J()("wprf-control","wprf-social-profile","wprf-".concat(o.name,"-social-profile"),null==o?void 0:o.classes)},t().createElement("div",{className:"social-profile-card"},t().createElement("div",{className:"main-profile"},t().createElement(Eb,{props:o,handleProfileStatusChange:function(e){N(e.target.checked);var t=u.map((function(t){var o;return e.target.checked?kb(kb({},t),{status:null==(null==h?void 0:h[t.id])?null===(o=null==r?void 0:r.savedValues)||void 0===o?void 0:o.linkedin_profile_status:null==h?void 0:h[t.id]}):(g((function(e){var o;return kb(kb({},e),((o={})[t.id]=null==t?void 0:t.status,o))})),kb(kb({},t),{status:!1}))}));A(t)},profileStatus:L,openApiCredentialsModal:function(e){localStorage.setItem("account_type",e),O("linkedin"),z(!0)}})),t().createElement("div",{className:"selected-profile"},(!u||0==u.length)&&t().createElement("img",{className:"empty-image",src:"".concat(null===wpspSettingsGlobal||void 0===wpspSettingsGlobal?void 0:wpspSettingsGlobal.image_path,"EmptyCard.svg"),alt:"mainLogo"}),t().createElement("div",{className:"selected-linkedin-scrollbar"},U.map((function(e,o){return t().createElement("div",{className:"selected-linkedin-wrapper",key:o},t().createElement(Cb,{platform:"linkedin",item:e,handleSelectedProfileStatusChange:I,handleDeleteSelectedProfile:j,handleEditSelectedProfile:"",profileStatus:L}))}))),!q&&u&&u.length>=3&&t().createElement(Sb,{setSelectedProfileViewMore:W}))),t().createElement(po(),{isOpen:i,onRequestClose:C,ariaHideApp:!1,shouldCloseOnOverlayClick:!1,className:"modal_wrapper"},t().createElement("button",{className:"close-button",onClick:C},t().createElement("i",{className:"wpsp-icon wpsp-close"})),t().createElement(Ao,{props:o,platform:l,requestHandler:Mo,appInfo:E})),t().createElement(Lb,{setSelectedProfile:A,props:o,type:"linkedin",profileStatus:L}))};var xb=function(){return xb=Object.assign||function(e){for(var t,o=1,n=arguments.length;o',confirmButtonText:(0,k.__)("Yes, Enable it!","wp-scheduled-posts")}).then((function(t){if(t.isConfirmed){var o=u.map((function(t){return xb(xb({},t),{status:t.default_board_name.value===e.default_board_name.value&&n})}));A(o)}})):(o=u.map((function(t){return xb(xb({},t),{status:t.default_board_name.value===e.default_board_name.value&&n})})),A(o))}},I=function(e){dt({item:e},j)},j=function(e){var t=u.filter((function(t){return t.default_board_name.value!==e.default_board_name.value}));A(t)};(0,e.useEffect)((function(){r.setFieldValue([o.name],u);var e=0;u&&u.forEach((function(t){t.status&&e++,X(e)}))}),[u]);var H=o.onChange;(0,e.useEffect)((function(){H({target:{type:"checkbox-select",name:"pinterest_profile_status",value:E}})}),[E]);var F=function(e){W(!0),g(e)},U=[];return u&&L?U=u:u&&!L&&(U=u.slice(0,2)),t().createElement("div",{className:J()("wprf-control","wprf-social-profile","wprf-".concat(o.name,"-social-profile"),null==o?void 0:o.classes)},t().createElement("div",{className:"social-profile-card"},t().createElement("div",{className:"main-profile"},t().createElement(Eb,{props:o,handleProfileStatusChange:function(e){C(e.target.checked);var t=u.map((function(t){var o;return e.target.checked?xb(xb({},t),{status:null==(null==R?void 0:R[t.default_board_name.value])?null===(o=null==r?void 0:r.savedValues)||void 0===o?void 0:o.pinterest_profile_status:null==R?void 0:R[t.default_board_name.value]}):(w((function(e){var o;return xb(xb({},e),((o={})[t.id]=null==t?void 0:t.status,o))})),xb(xb({},t),{status:!1}))}));A(t)},profileStatus:E,openApiCredentialsModal:function(e){O("pinterest"),z(!0)}})),t().createElement("div",{className:"selected-profile"},(!u||0==u.length)&&t().createElement("img",{className:"empty-image",src:"".concat(null===wpspSettingsGlobal||void 0===wpspSettingsGlobal?void 0:wpspSettingsGlobal.image_path,"EmptyCard.svg"),alt:"mainLogo"}),t().createElement("div",{className:"selected-pinterest-scrollbar"},U&&U.map((function(e,o){return t().createElement("div",{className:"selected-pinterest-wrapper",key:o},t().createElement(Cb,{platform:"pinterest",item:e,handleSelectedProfileStatusChange:P,handleDeleteSelectedProfile:I,handleEditSelectedProfile:F,profileStatus:E}))}))),!L&&u&&u.length>=3&&t().createElement(Sb,{setSelectedProfileViewMore:N}))),t().createElement(po(),{isOpen:i,onRequestClose:D,ariaHideApp:!1,shouldCloseOnOverlayClick:!1,className:"modal_wrapper"},t().createElement("button",{className:"close-button",onClick:D},t().createElement("i",{className:"wpsp-icon wpsp-close"})),t().createElement(Ao,{props:o,platform:l,requestHandler:Mo,appInfo:x})),t().createElement(Lb,{setSelectedProfile:A,props:o,type:"pinterest",profileItem:h,isProfileEditModal:q,setProfileEditModal:W,profileStatus:E,selectedProfile:u}))};var Pb=function(){return Pb=Object.assign||function(e){for(var t,o=1,n=arguments.length;o',confirmButtonText:(0,k.__)("Yes, Enable it!","wp-scheduled-posts")}).then((function(t){if(t.isConfirmed){var o=q.map((function(t){return Pb(Pb({},t),{status:t.id===e.id&&n})}));W(o)}})):(o=q.map((function(t){return Pb(Pb({},t),{status:t.id===e.id&&n})})),W(o))}};(0,e.useEffect)((function(){r.setFieldValue([o.name],q);var e=0;q&&q.forEach((function(t){t.status&&e++,w(e)}))}),[q]);var _=o.onChange;(0,e.useEffect)((function(){_({target:{type:"checkbox-select",name:"instagram_profile_status",value:L}})}),[L]);var x=[];return q&&l?x=q:q&&!l&&(x=q.slice(0,2)),t().createElement("div",{className:J()("wprf-control","wprf-social-profile","wprf-".concat(o.name,"-social-profile"),null==o?void 0:o.classes)},t().createElement("div",{className:"social-profile-card"},t().createElement("div",{className:"main-profile"},t().createElement(Eb,{props:o,handleProfileStatusChange:function(e){N(e.target.checked);var t=q.map((function(t){return e.target.checked?Pb(Pb({},t),{status:null!=(null==h?void 0:h[t.id])&&(null==h?void 0:h[t.id])}):(g((function(e){var o;return Pb(Pb({},e),((o={})[t.id]=null==t?void 0:t.status,o))})),Pb(Pb({},t),{status:!1}))}));W(t)},profileStatus:L,openApiCredentialsModal:function(e){localStorage.setItem("account_type",e),A("instagram"),z(!0)}})),t().createElement("div",{className:"selected-profile"},(!q||0==q.length)&&t().createElement("img",{className:"empty-image",src:"".concat(null===wpspSettingsGlobal||void 0===wpspSettingsGlobal?void 0:wpspSettingsGlobal.image_path,"EmptyCard.svg"),alt:"mainLogo"}),t().createElement("div",{className:"selected-facebook-scrollbar"},q&&x.map((function(e,o){return t().createElement("div",{className:"selected-facebook-wrapper",key:o},t().createElement(Cb,{platform:"instagram",item:e,handleSelectedProfileStatusChange:X,handleDeleteSelectedProfile:E,handleEditSelectedProfile:"",profileStatus:L}))}))),!l&&q&&q.length>=3&&t().createElement(Sb,{setSelectedProfileViewMore:O}))),t().createElement(po(),{isOpen:i,onRequestClose:T,ariaHideApp:!1,shouldCloseOnOverlayClick:!1,className:"modal_wrapper"},t().createElement("button",{className:"close-button",onClick:T},t().createElement("i",{className:"wpsp-icon wpsp-close"})),t().createElement(Ao,{props:o,platform:u,requestHandler:Mo,appInfo:B})),t().createElement(Lb,{setSelectedProfile:W,props:o,type:"instagram",profileStatus:L}))};var jb=function(){return jb=Object.assign||function(e){for(var t,o=1,n=arguments.length;o',confirmButtonText:(0,k.__)("Yes, Enable it!","wp-scheduled-posts")}).then((function(t){if(t.isConfirmed){var o=A.map((function(t){return jb(jb({},t),{status:t.id===e.id&&n})}));f(o)}})):(o=A.map((function(t){return jb(jb({},t),{status:t.id===e.id&&n})})),f(o))}},X=function(e){dt({item:e},_)},_=function(e){var t=A.filter((function(t){return t.id!==e.id}));f(t)};(0,e.useEffect)((function(){M.setFieldValue([o.name],A);var e=0;A&&A.forEach((function(t){t.status&&e++,B(e)}))}),[A]);var x=o.onChange;(0,e.useEffect)((function(){x({target:{type:"checkbox-select",name:"twitter_profile_status",value:w}})}),[w]);var D=[];return A&&g?D=A:A&&!g&&(D=A.slice(0,2)),t().createElement("div",{className:J()("wprf-control","wprf-social-profile","wprf-".concat(o.name,"-social-profile"),null==o?void 0:o.classes)},t().createElement("div",{className:"social-profile-card"},t().createElement("div",{className:"main-profile"},t().createElement(Eb,{props:o,handleProfileStatusChange:function(e){y(e.target.checked);var t=A.map((function(t){var o;return e.target.checked?jb(jb({},t),{status:null==(null==W?void 0:W[t.id])?null===(o=null==M?void 0:M.savedValues)||void 0===o?void 0:o.twitter_profile_status:null==W?void 0:W[t.id]}):(m((function(e){var o;return jb(jb({},e),((o={})[t.id]=null==t?void 0:t.status,o))})),jb(jb({},t),{status:!1}))}));f(t)},profileStatus:w,openApiCredentialsModal:function(e){d("twitter"),s(!0)}})),t().createElement("div",{className:"selected-profile"},(!A||0==A.length)&&t().createElement("img",{className:"empty-image",src:"".concat(null===wpspSettingsGlobal||void 0===wpspSettingsGlobal?void 0:wpspSettingsGlobal.image_path,"EmptyCard.svg"),alt:"mainLogo"}),t().createElement("div",{className:"selected-twitter-scrollbar"},D.map((function(e,o){return t().createElement("div",{className:"selected-twitter-wrapper",key:o},t().createElement(Cb,{key:o,platform:"twitter",item:e,handleSelectedProfileStatusChange:T,handleDeleteSelectedProfile:X,handleEditSelectedProfile:"",profileStatus:w}))}))),!g&&A&&A.length>=3&&t().createElement(Sb,{setSelectedProfileViewMore:v}))),t().createElement(po(),{isOpen:z,onRequestClose:S,ariaHideApp:!1,className:"modal_wrapper",shouldCloseOnOverlayClick:!1},t().createElement("button",{className:"close-button",onClick:S},t().createElement("i",{className:"wpsp-icon wpsp-close"})),t().createElement(Ao,{props:o,platform:O,requestHandler:Mo,appInfo:C})),t().createElement(Lb,{setSelectedProfile:f,props:o,type:"twitter",profileStatus:w}))};var Fb=function(){return Fb=Object.assign||function(e){for(var t,o=1,n=arguments.length;o2&&(b.children=arguments.length>3?Yb.call(arguments,2):o),"function"==typeof e&&null!=e.defaultProps)for(c in e.defaultProps)void 0===b[c]&&(b[c]=e.defaultProps[c]);return Mr(e,b,n,p,null)}function Mr(e,t,o,n,p){var c={type:e,props:t,key:o,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==p?++Kb:p};return null==p&&null!=Qb.vnode&&Qb.vnode(c),c}function ir(e){return e.children}function zr(e,t,o){"-"===t[0]?e.setProperty(t,null==o?"":o):e[t]=null==o?"":"number"!=typeof o||cr.test(t)?o:o+"px"}function sr(e,t,o,n,p){var c;e:if("style"===t)if("string"==typeof o)e.style.cssText=o;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)o&&t in o||zr(e.style,t,"");if(o)for(t in o)n&&o[t]===n[t]||zr(e.style,t,o[t])}else if("o"===t[0]&&"n"===t[1])c=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+c]=o,o?n||e.addEventListener(t,c?Or:lr,c):e.removeEventListener(t,c?Or:lr,c);else if("dangerouslySetInnerHTML"!==t){if(p)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==o?"":o;break e}catch(e){}"function"==typeof o||(null==o||!1===o&&-1==t.indexOf("-")?e.removeAttribute(t):e.setAttribute(t,o))}}function lr(e){Zb=!0;try{return this.l[e.type+!1](Qb.event?Qb.event(e):e)}finally{Zb=!1}}function Or(e){Zb=!0;try{return this.l[e.type+!0](Qb.event?Qb.event(e):e)}finally{Zb=!1}}function dr(e,t){this.props=e,this.context=t}function ur(e,t){if(null==t)return e.__?ur(e.__,e.__.__k.indexOf(e)+1):null;for(var o;tt&&$b.sort((function(e,t){return e.__v.__b-t.__v.__b})));Wr.__r=0}function mr(e,t,o,n,p,c,b,r,a,M){var i,z,s,l,O,d,u,A=n&&n.__k||pr,f=A.length;for(o.__k=[],i=0;i0?Mr(l.type,l.props,l.key,l.ref?l.ref:null,l.__v):l)){if(l.__=o,l.__b=o.__b+1,null===(s=A[i])||s&&l.key==s.key&&l.type===s.type)A[i]=void 0;else for(z=0;z=0;t--)if((o=e.__k[t])&&(n=Rr(o)))return n;return null}function wr(e,t,o,n,p,c,b,r,a){var M,i,z,s,l,O,d,u,A,f,q,W,m,h,g,v=t.type;if(void 0!==t.constructor)return null;null!=o.__h&&(a=o.__h,r=t.__e=o.__e,t.__h=null,c=[r]),(M=Qb.__b)&&M(t);try{e:if("function"==typeof v){if(u=t.props,A=(M=v.contextType)&&n[M.__c],f=M?A?A.props.value:M.__:n,o.__c?d=(i=t.__c=o.__c).__=i.__E:("prototype"in v&&v.prototype.render?t.__c=i=new v(u,f):(t.__c=i=new dr(u,f),i.constructor=v,i.render=Er),A&&A.sub(i),i.props=u,i.state||(i.state={}),i.context=f,i.__n=n,z=i.__d=!0,i.__h=[],i._sb=[]),null==i.__s&&(i.__s=i.state),null!=v.getDerivedStateFromProps&&(i.__s==i.state&&(i.__s=br({},i.__s)),br(i.__s,v.getDerivedStateFromProps(u,i.__s))),s=i.props,l=i.state,i.__v=t,z)null==v.getDerivedStateFromProps&&null!=i.componentWillMount&&i.componentWillMount(),null!=i.componentDidMount&&i.__h.push(i.componentDidMount);else{if(null==v.getDerivedStateFromProps&&u!==s&&null!=i.componentWillReceiveProps&&i.componentWillReceiveProps(u,f),!i.__e&&null!=i.shouldComponentUpdate&&!1===i.shouldComponentUpdate(u,i.__s,f)||t.__v===o.__v){for(t.__v!==o.__v&&(i.props=u,i.state=i.__s,i.__d=!1),t.__e=o.__e,t.__k=o.__k,t.__k.forEach((function(e){e&&(e.__=t)})),q=0;q3;)o.pop()();if(o[1]>>1,1),t.i.removeChild(e)}}),Cr(ar(ca,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}(na.prototype=new dr).__a=function(e){var t=this,o=oa(t.__v),n=t.o.get(e);return n[0]++,function(p){var c=function(){t.props.revealOrder?(n.push(p),pa(t,e,n)):p()};o?o(c):c()}},na.prototype.render=function(e){this.u=null,this.o=new Map;var t=gr(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var o=t.length;o--;)this.o.set(t[o],this.u=[1,0,this.u]);return e.children},na.prototype.componentDidUpdate=na.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,o){pa(e,o,t)}))};var ra="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,aa=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ma="undefined"!=typeof document,ia=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};dr.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(dr.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var za=Qb.event;function sa(){}function la(){return this.cancelBubble}function Oa(){return this.defaultPrevented}Qb.event=function(e){return za&&(e=za(e)),e.persist=sa,e.isPropagationStopped=la,e.isDefaultPrevented=Oa,e.nativeEvent=e};var da={configurable:!0,get:function(){return this.class}},ua=Qb.vnode;Qb.vnode=function(e){var t=e.type,o=e.props,n=o;if("string"==typeof t){var p=-1===t.indexOf("-");for(var c in n={},o){var b=o[c];Ma&&"children"===c&&"noscript"===t||"value"===c&&"defaultValue"in o&&null==b||("defaultValue"===c&&"value"in o&&null==o.value?c="value":"download"===c&&!0===b?b="":/ondoubleclick/i.test(c)?c="ondblclick":/^onchange(textarea|input)/i.test(c+t)&&!ia(o.type)?c="oninput":/^onfocus$/i.test(c)?c="onfocusin":/^onblur$/i.test(c)?c="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(c)?c=c.toLowerCase():p&&aa.test(c)?c=c.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===b&&(b=void 0),/^oninput$/i.test(c)&&(c=c.toLowerCase(),n[c]&&(c="oninputCapture")),n[c]=b)}"select"==t&&n.multiple&&Array.isArray(n.value)&&(n.value=gr(o.children).forEach((function(e){e.props.selected=-1!=n.value.indexOf(e.props.value)}))),"select"==t&&null!=n.defaultValue&&(n.value=gr(o.children).forEach((function(e){e.props.selected=n.multiple?-1!=n.defaultValue.indexOf(e.props.value):n.defaultValue==e.props.value}))),e.props=n,o.class!=o.className&&(da.enumerable="className"in o,null!=o.className&&(n.class=o.className),Object.defineProperty(n,"className",da))}e.$$typeof=ra,ua&&ua(e)};var Aa=Qb.__r;Qb.__r=function(e){Aa&&Aa(e),e.__c};const fa=[],qa=new Map;function Wa(e){fa.push(e),qa.forEach((t=>{ha(t,e)}))}function ma(e){let t=qa.get(e);if(!t||!t.isConnected){if(t=e.querySelector("style[data-fullcalendar]"),!t){t=document.createElement("style"),t.setAttribute("data-fullcalendar","");const o=(void 0===ga&&(ga=function(){const e=document.querySelector('meta[name="csp-nonce"]');if(e&&e.hasAttribute("content"))return e.getAttribute("content");const t=document.querySelector("script[nonce]");return t&&t.nonce||""}()),ga);o&&(t.nonce=o);const n=e===document?document.head:e,p=e===document?n.querySelector("script,link[rel=stylesheet],link[as=style],style"):n.firstChild;n.insertBefore(t,p)}qa.set(e,t),function(e){for(const t of fa)ha(e,t)}(t)}}function ha(e,t){const{sheet:o}=e,n=o.cssRules.length;t.split("}").forEach(((e,t)=>{(e=e.trim())&&o.insertRule(e+"}",n+t)}))}let ga;"undefined"!=typeof document&&ma(document),Wa(':root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("truetype")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:"\\e900"}.fc-icon-chevron-right:before{content:"\\e901"}.fc-icon-chevrons-left:before{content:"\\e902"}.fc-icon-chevrons-right:before{content:"\\e903"}.fc-icon-minus-square:before{content:"\\e904"}.fc-icon-plus-square:before{content:"\\e905"}.fc-icon-x:before{content:"\\e906"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:"";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:"";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}');class va{constructor(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}request(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),null==e?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))}pause(e=""){let{pauseDepths:t}=this;t[e]=(t[e]||0)+1,this.clearTimeout()}resume(e="",t){let{pauseDepths:o}=this;e in o&&(t?delete o[e]:(o[e]-=1,o[e]<=0&&delete o[e]),this.tryDrain())}isPaused(){return Object.keys(this.pauseDepths).length}tryDrain(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}}clear(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}}clearTimeout(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)}drained(){this.drainedOption&&this.drainedOption()}}function Ra(e){e.parentNode&&e.parentNode.removeChild(e)}function wa(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(ya(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}function ya(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}const La=/(top|left|right|bottom|width|height)$/i;function Na(e,t){for(let o in t)Ba(e,o,t[o])}function Ba(e,t,o){null==o?e.style[t]="":"number"==typeof o&&La.test(t)?e.style[t]=`${o}px`:e.style[t]=o}function Ea(e){var t,o;return null!==(o=null===(t=e.composedPath)||void 0===t?void 0:t.call(e)[0])&&void 0!==o?o:e.target}let Ca=0;function Sa(){return Ca+=1,"fc-dom-"+Ca}function Ta(e){e.preventDefault()}function Xa(e,t,o,n){let p=function(e,t){return o=>{let n=wa(o.target,e);n&&t.call(n,o,n)}}(o,n);return e.addEventListener(t,p),()=>{e.removeEventListener(t,p)}}const ka=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function _a(e){return Object.assign({onClick:e},xa(e))}function xa(e){return{tabIndex:0,onKeyDown(t){"Enter"!==t.key&&" "!==t.key||(e(t),t.preventDefault())}}}let Da=0;function Pa(){return Da+=1,String(Da)}function Ia(){document.body.classList.add("fc-not-allowed")}function ja(){document.body.classList.remove("fc-not-allowed")}function Ha(e,t,o){return o.func?o.func(e,t):function(e,t){return e||t?null==t?-1:null==e?1:"string"==typeof e||"string"==typeof t?String(e).localeCompare(String(t)):e-t:0}(e[o.field],t[o.field])*(o.order||1)}function Fa(e,t){let o=String(e);return"000".substr(0,t-o.length)+o}function Ua(e,t,o){return"function"==typeof e?e(...t):"string"==typeof e?t.reduce(((e,t,o)=>e.replace("$"+o,t||"")),e):o}function Va(e,t){return e-t}function Ga(e){return e%1==0}function Ya(e){let t=e.querySelector(".fc-scrollgrid-shrink-frame"),o=e.querySelector(".fc-scrollgrid-shrink-cushion");if(!t)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!o)throw new Error("needs fc-scrollgrid-shrink-cushion className");return e.getBoundingClientRect().width-t.getBoundingClientRect().width+o.getBoundingClientRect().width}const Qa=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function Ka(e,t){return"string"==typeof e?function(e){let t=Qa.exec(e);if(t){let e=t[1]?-1:1;return{years:0,months:0,days:e*(t[2]?parseInt(t[2],10):0),milliseconds:e*(60*(t[3]?parseInt(t[3],10):0)*60*1e3+60*(t[4]?parseInt(t[4],10):0)*1e3+1e3*(t[5]?parseInt(t[5],10):0)+(t[6]?parseInt(t[6],10):0))}}return null}(e):"object"==typeof e&&e?Ja(e):"number"==typeof e?Ja({[t||"milliseconds"]:e}):null}function Ja(e){let t={years:e.years||e.year||0,months:e.months||e.month||0,days:e.days||e.day||0,milliseconds:60*(e.hours||e.hour||0)*60*1e3+60*(e.minutes||e.minute||0)*1e3+1e3*(e.seconds||e.second||0)+(e.milliseconds||e.millisecond||e.ms||0)},o=e.weeks||e.week;return o&&(t.days+=7*o,t.specifiedWeeks=!0),t}function Za(e){return $a(e)/864e5}function $a(e){return 31536e6*e.years+2592e6*e.months+864e5*e.days+e.milliseconds}function eM(e){let t=e.milliseconds;if(t){if(t%1e3!=0)return{unit:"millisecond",value:t};if(t%6e4!=0)return{unit:"second",value:t/1e3};if(t%36e5!=0)return{unit:"minute",value:t/6e4};if(t)return{unit:"hour",value:t/36e5}}return e.days?e.specifiedWeeks&&e.days%7==0?{unit:"week",value:e.days/7}:{unit:"day",value:e.days}:e.months?{unit:"month",value:e.months}:e.years?{unit:"year",value:e.years}:{unit:"millisecond",value:0}}function tM(e,t,o){if(e===t)return!0;let n,p=e.length;if(p!==t.length)return!1;for(n=0;n{if(n){if(!ZM(n,c)){o&&o(p);let n=e.call(this,c);t&&t(n,p)||(p=n)}}else p=e.call(this,c);return n=c,p}}const mM={week:3,separator:0,omitZeroMinute:0,meridiem:0,omitCommas:0},hM={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},gM=/\s*([ap])\.?m\.?/i,vM=/,/g,RM=/\s+/g,wM=/\u200e/g,yM=/UTC|GMT/;class LM{constructor(e){let t={},o={},n=0;for(let p in e)p in mM?(o[p]=e[p],n=Math.max(mM[p],n)):(t[p]=e[p],p in hM&&(n=Math.max(hM[p],n)));this.standardDateProps=t,this.extendedSettings=o,this.severity=n,this.buildFormattingFunc=qM(NM)}format(e,t){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,t)(e)}formatRange(e,t,o,n){let{standardDateProps:p,extendedSettings:c}=this,b=(r=e.marker,a=t.marker,(M=o.calendarSystem).getMarkerYear(r)!==M.getMarkerYear(a)?5:M.getMarkerMonth(r)!==M.getMarkerMonth(a)?4:M.getMarkerDay(r)!==M.getMarkerDay(a)?2:uM(r)!==uM(a)?1:0);var r,a,M;if(!b)return this.format(e,o);let i=b;!(i>1)||"numeric"!==p.year&&"2-digit"!==p.year||"numeric"!==p.month&&"2-digit"!==p.month||"numeric"!==p.day&&"2-digit"!==p.day||(i=1);let z=this.format(e,o),s=this.format(t,o);if(z===s)return z;let l=function(e,t){let o={};for(let n in e)(!(n in hM)||hM[n]<=t)&&(o[n]=e[n]);return o}(p,i),O=NM(l,c,o),d=O(e),u=O(t),A=function(e,t,o,n){let p=0;for(;pfM(e.timeZoneOffset):0===n&&t.week?e=>function(e,t,o,n,p){let c=[];return"long"===p?c.push(o):"short"!==p&&"narrow"!==p||c.push(t),"long"!==p&&"short"!==p||c.push(" "),c.push(n.simpleNumberFormat.format(e)),"rtl"===n.options.direction&&c.reverse(),c.join("")}(o.computeWeekNumber(e.marker),o.weekText,o.weekTextLong,o.locale,t.week):function(e,t,o){e=Object.assign({},e),t=Object.assign({},t),function(e,t){e.timeZoneName&&(e.hour||(e.hour="2-digit"),e.minute||(e.minute="2-digit")),"long"===e.timeZoneName&&(e.timeZoneName="short"),t.omitZeroMinute&&(e.second||e.millisecond)&&delete t.omitZeroMinute}(e,t),e.timeZone="UTC";let n,p=new Intl.DateTimeFormat(o.locale.codes,e);if(t.omitZeroMinute){let t=Object.assign({},e);delete t.minute,n=new Intl.DateTimeFormat(o.locale.codes,t)}return c=>{let b,{marker:r}=c;return b=n&&!r.getUTCMinutes()?n:p,function(e,t,o,n,p){return e=e.replace(wM,""),"short"===o.timeZoneName&&(e=function(e,t){let o=!1;return e=e.replace(yM,(()=>(o=!0,t))),o||(e+=` ${t}`),e}(e,"UTC"===p.timeZone||null==t.timeZoneOffset?"UTC":fM(t.timeZoneOffset))),n.omitCommas&&(e=e.replace(vM,"").trim()),n.omitZeroMinute&&(e=e.replace(":00","")),!1===n.meridiem?e=e.replace(gM,"").trim():"narrow"===n.meridiem?e=e.replace(gM,((e,t)=>t.toLocaleLowerCase())):"short"===n.meridiem?e=e.replace(gM,((e,t)=>`${t.toLocaleLowerCase()}m`)):"lowercase"===n.meridiem&&(e=e.replace(gM,(e=>e.toLocaleLowerCase()))),e=(e=e.replace(RM," ")).trim()}(b.format(r),c,e,t,o)}}(e,t,o)}function BM(e,t){let o=t.markerToArray(e.marker);return{marker:e.marker,timeZoneOffset:e.timeZoneOffset,array:o,year:o[0],month:o[1],day:o[2],hour:o[3],minute:o[4],second:o[5],millisecond:o[6]}}function EM(e,t,o,n){let p=BM(e,o.calendarSystem);return{date:p,start:p,end:t?BM(t,o.calendarSystem):null,timeZone:o.timeZone,localeCodes:o.locale.codes,defaultSeparator:n||o.defaultSeparator}}class CM{constructor(e){this.cmdStr=e}format(e,t,o){return t.cmdFormatter(this.cmdStr,EM(e,null,t,o))}formatRange(e,t,o,n){return o.cmdFormatter(this.cmdStr,EM(e,t,o,n))}}class SM{constructor(e){this.func=e}format(e,t,o){return this.func(EM(e,null,t,o))}formatRange(e,t,o,n){return this.func(EM(e,t,o,n))}}function TM(e){return"object"==typeof e&&e?new LM(e):"string"==typeof e?new CM(e):"function"==typeof e?new SM(e):null}const XM={navLinkDayClick:UM,navLinkWeekClick:UM,duration:Ka,bootstrapFontAwesome:UM,buttonIcons:UM,customButtons:UM,defaultAllDayEventDuration:Ka,defaultTimedEventDuration:Ka,nextDayThreshold:Ka,scrollTime:Ka,scrollTimeReset:Boolean,slotMinTime:Ka,slotMaxTime:Ka,dayPopoverFormat:TM,slotDuration:Ka,snapDuration:Ka,headerToolbar:UM,footerToolbar:UM,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:TM,dayHeaderClassNames:UM,dayHeaderContent:UM,dayHeaderDidMount:UM,dayHeaderWillUnmount:UM,dayCellClassNames:UM,dayCellContent:UM,dayCellDidMount:UM,dayCellWillUnmount:UM,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:UM,weekNumbers:Boolean,weekNumberClassNames:UM,weekNumberContent:UM,weekNumberDidMount:UM,weekNumberWillUnmount:UM,editable:Boolean,viewClassNames:UM,viewDidMount:UM,viewWillUnmount:UM,nowIndicator:Boolean,nowIndicatorClassNames:UM,nowIndicatorContent:UM,nowIndicatorDidMount:UM,nowIndicatorWillUnmount:UM,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:UM,locale:UM,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:UM,eventOrder:function(e){let t,o,n=[],p=[];for("string"==typeof e?p=e.split(/\s*,\s*/):"function"==typeof e?p=[e]:Array.isArray(e)&&(p=e),t=0;t=0;p-=1){let c=e[p][n];if("object"==typeof c&&c)t.unshift(c);else if(void 0!==c){o[n]=c;break}}t.length&&(o[n]=GM(t))}for(let t=e.length-1;t>=0;t-=1){let n=e[t];for(let e in n)e in o||(o[e]=n[e])}return o}function YM(e,t){let o={};for(let n in e)t(e[n],n)&&(o[n]=e[n]);return o}function QM(e,t){let o={};for(let n in e)o[n]=t(e[n],n);return o}function KM(e){let t={};for(let o of e)t[o]=!0;return t}function JM(e){let t=[];for(let o in e)t.push(e[o]);return t}function ZM(e,t){if(e===t)return!0;for(let o in e)if(VM.call(e,o)&&!(o in t))return!1;for(let o in t)if(VM.call(t,o)&&e[o]!==t[o])return!1;return!0}const $M=/^on[A-Z]/;function ei(e,t){let o=[];for(let n in e)VM.call(e,n)&&(n in t||o.push(n));for(let n in t)VM.call(t,n)&&e[n]!==t[n]&&o.push(n);return o}function ti(e,t,o={}){if(e===t)return!0;for(let b in t)if(!(b in e&&(n=e[b],p=t[b],c=o[b],n===p||!0===c||c&&c(n,p))))return!1;var n,p,c;for(let o in e)if(!(o in t))return!1;return!0}let oi={};var ni;ni=class{getMarkerYear(e){return e.getUTCFullYear()}getMarkerMonth(e){return e.getUTCMonth()}getMarkerDay(e){return e.getUTCDate()}arrayToMarker(e){return OM(e)}markerToArray(e){return lM(e)}},oi.gregory=ni;const pi=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;class ci{constructor(e){let t=this.timeZone=e.timeZone,o="local"!==t&&"UTC"!==t;e.namedTimeZoneImpl&&o&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(t)),this.canComputeOffset=Boolean(!o||this.namedTimeZoneImpl),this.calendarSystem=function(e){return new oi[e]}(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,"ISO"===e.weekNumberCalculation&&(this.weekDow=1,this.weekDoy=4),"number"==typeof e.firstDay&&(this.weekDow=e.firstDay),"function"==typeof e.weekNumberCalculation&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=null!=e.weekText?e.weekText:e.locale.options.weekText,this.weekTextLong=(null!=e.weekTextLong?e.weekTextLong:e.locale.options.weekTextLong)||this.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}createMarker(e){let t=this.createMarkerMeta(e);return null===t?null:t.marker}createNowMarker(){return this.canComputeOffset?this.timestampToMarker((new Date).valueOf()):OM(zM(new Date))}createMarkerMeta(e){if("string"==typeof e)return this.parse(e);let t=null;return"number"==typeof e?t=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(t=this.timestampToMarker(e))):Array.isArray(e)&&(t=OM(e)),null!==t&&dM(t)?{marker:t,isTimeUnspecified:!1,forcedTzo:null}:null}parse(e){let t=function(e){let t=pi.exec(e);if(t){let e=new Date(Date.UTC(Number(t[1]),t[3]?Number(t[3])-1:0,Number(t[5]||1),Number(t[7]||0),Number(t[8]||0),Number(t[10]||0),t[12]?1e3*Number(`0.${t[12]}`):0));if(dM(e)){let o=null;return t[13]&&(o=("-"===t[15]?-1:1)*(60*Number(t[16]||0)+Number(t[18]||0))),{marker:e,isTimeUnspecified:!t[6],timeZoneOffset:o}}}return null}(e);if(null===t)return null;let{marker:o}=t,n=null;return null!==t.timeZoneOffset&&(this.canComputeOffset?o=this.timestampToMarker(o.valueOf()-60*t.timeZoneOffset*1e3):n=t.timeZoneOffset),{marker:o,isTimeUnspecified:t.isTimeUnspecified,forcedTzo:n}}getYear(e){return this.calendarSystem.getMarkerYear(e)}getMonth(e){return this.calendarSystem.getMarkerMonth(e)}getDay(e){return this.calendarSystem.getMarkerDay(e)}add(e,t){let o=this.calendarSystem.markerToArray(e);return o[0]+=t.years,o[1]+=t.months,o[2]+=t.days,o[6]+=t.milliseconds,this.calendarSystem.arrayToMarker(o)}subtract(e,t){let o=this.calendarSystem.markerToArray(e);return o[0]-=t.years,o[1]-=t.months,o[2]-=t.days,o[6]-=t.milliseconds,this.calendarSystem.arrayToMarker(o)}addYears(e,t){let o=this.calendarSystem.markerToArray(e);return o[0]+=t,this.calendarSystem.arrayToMarker(o)}addMonths(e,t){let o=this.calendarSystem.markerToArray(e);return o[1]+=t,this.calendarSystem.arrayToMarker(o)}diffWholeYears(e,t){let{calendarSystem:o}=this;return uM(e)===uM(t)&&o.getMarkerDay(e)===o.getMarkerDay(t)&&o.getMarkerMonth(e)===o.getMarkerMonth(t)?o.getMarkerYear(t)-o.getMarkerYear(e):null}diffWholeMonths(e,t){let{calendarSystem:o}=this;return uM(e)===uM(t)&&o.getMarkerDay(e)===o.getMarkerDay(t)?o.getMarkerMonth(t)-o.getMarkerMonth(e)+12*(o.getMarkerYear(t)-o.getMarkerYear(e)):null}greatestWholeUnit(e,t){let o=this.diffWholeYears(e,t);return null!==o?{unit:"year",value:o}:(o=this.diffWholeMonths(e,t),null!==o?{unit:"month",value:o}:(o=function(e,t){let o=rM(e,t);return null!==o&&o%7==0?o/7:null}(e,t),null!==o?{unit:"week",value:o}:(o=rM(e,t),null!==o?{unit:"day",value:o}:(o=function(e,t){return(t.valueOf()-e.valueOf())/36e5}(e,t),Ga(o)?{unit:"hour",value:o}:(o=function(e,t){return(t.valueOf()-e.valueOf())/6e4}(e,t),Ga(o)?{unit:"minute",value:o}:(o=function(e,t){return(t.valueOf()-e.valueOf())/1e3}(e,t),Ga(o)?{unit:"second",value:o}:{unit:"millisecond",value:t.valueOf()-e.valueOf()}))))))}countDurationsBetween(e,t,o){let n;return o.years&&(n=this.diffWholeYears(e,t),null!==n)?n/(Za(o)/365):o.months&&(n=this.diffWholeMonths(e,t),null!==n)?n/(Za(o)/30):o.days&&(n=rM(e,t),null!==n)?n/Za(o):(t.valueOf()-e.valueOf())/$a(o)}startOf(e,t){return"year"===t?this.startOfYear(e):"month"===t?this.startOfMonth(e):"week"===t?this.startOfWeek(e):"day"===t?aM(e):"hour"===t?function(e){return OM([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}(e):"minute"===t?function(e){return OM([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}(e):"second"===t?function(e){return OM([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds()])}(e):null}startOfYear(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])}startOfMonth(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])}startOfWeek(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])}computeWeekNumber(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):function(e,t,o){let n=e.getUTCFullYear(),p=MM(e,n,t,o);if(p<1)return MM(e,n-1,t,o);let c=MM(e,n+1,t,o);return c>=1?Math.min(p,c):p}(e,this.weekDow,this.weekDoy)}format(e,t,o={}){return t.format({marker:e,timeZoneOffset:null!=o.forcedTzo?o.forcedTzo:this.offsetForMarker(e)},this)}formatRange(e,t,o,n={}){return n.isEndExclusive&&(t=cM(t,-1)),o.formatRange({marker:e,timeZoneOffset:null!=n.forcedStartTzo?n.forcedStartTzo:this.offsetForMarker(e)},{marker:t,timeZoneOffset:null!=n.forcedEndTzo?n.forcedEndTzo:this.offsetForMarker(t)},this,n.defaultSeparator)}formatIso(e,t={}){let o=null;return t.omitTimeZoneOffset||(o=null!=t.forcedTzo?t.forcedTzo:this.offsetForMarker(e)),function(e,t,o=!1){let n=e.toISOString();return n=n.replace(".000",""),o&&(n=n.replace("T00:00:00Z","")),n.length>10&&(null==t?n=n.replace("Z",""):0!==t&&(n=n.replace("Z",fM(t,!0)))),n}(e,o,t.omitTime)}timestampToMarker(e){return"local"===this.timeZone?OM(zM(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?OM(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)}offsetForMarker(e){return"local"===this.timeZone?-sM(lM(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(lM(e)):null}toDate(e,t){return"local"===this.timeZone?sM(lM(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(lM(e))*60):new Date(e.valueOf()-(t||0))}}class bi{constructor(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}setIconOverride(e){let t,o;if("object"==typeof e&&e){for(o in t=Object.assign({},this.iconClasses),e)t[o]=this.applyIconOverridePrefix(e[o]);this.iconClasses=t}else!1===e&&(this.iconClasses={})}applyIconOverridePrefix(e){let t=this.iconOverridePrefix;return t&&0!==e.indexOf(t)&&(e=t+e),e}getClass(e){return this.classes[e]||""}getIconClass(e,t){let o;return o=t&&this.rtlIconClasses&&this.rtlIconClasses[e]||this.iconClasses[e],o?`${this.baseIconClass} ${o}`:""}getCustomButtonIconClass(e){let t;return this.iconOverrideCustomButtonOption&&(t=e[this.iconOverrideCustomButtonOption],t)?`${this.baseIconClass} ${this.applyIconOverridePrefix(t)}`:""}}function ri(e){e();let t=Qb.debounceRendering,o=[];for(Qb.debounceRendering=function(e){o.push(e)},Cr(ar(ai,{}),document.createElement("div"));o.length;)o.shift()();Qb.debounceRendering=t}bi.prototype.classes={},bi.prototype.iconClasses={},bi.prototype.baseIconClass="",bi.prototype.iconOverridePrefix="";class ai extends dr{render(){return ar("div",{})}componentDidMount(){this.setState({})}}function Mi(e){let t=function(e,t){var o={__c:t="__cC"+or++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var o,n;return this.getChildContext||(o=[],(n={})[t]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&o.some((function(e){e.__e=!0,qr(e)}))},this.sub=function(e){o.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){o.splice(o.indexOf(e),1),t&&t.call(e)}}),e.children}};return o.Provider.__=o.Consumer.contextType=o}(e),o=t.Provider;return t.Provider=function(){let e=!this.getChildContext,t=o.apply(this,arguments);if(e){let e=[];this.shouldComponentUpdate=t=>{this.props.value!==t.value&&e.forEach((e=>{e.context=t.value,e.forceUpdate()}))},this.sub=t=>{e.push(t);let o=t.componentWillUnmount;t.componentWillUnmount=()=>{e.splice(e.indexOf(t),1),o&&o.call(t)}}}return t},t}class ii{constructor(e,t,o,n){this.execFunc=e,this.emitter=t,this.scrollTime=o,this.scrollTimeReset=n,this.handleScrollRequest=e=>{this.queuedRequest=Object.assign({},this.queuedRequest||{},e),this.drain()},t.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}detach(){this.emitter.off("_scrollRequest",this.handleScrollRequest)}update(e){e&&this.scrollTimeReset?this.fireInitialScroll():this.drain()}fireInitialScroll(){this.handleScrollRequest({time:this.scrollTime})}drain(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)}}const zi=Mi({});function si(e,t,o,n,p,c,b,r,a,M,i,z,s){return{dateEnv:p,options:o,pluginHooks:b,emitter:M,dispatch:r,getCurrentData:a,calendarApi:i,viewSpec:e,viewApi:t,dateProfileGenerator:n,theme:c,isRtl:"rtl"===o.direction,addResizeHandler(e){M.on("_resize",e)},removeResizeHandler(e){M.off("_resize",e)},createScrollResponder:e=>new ii(e,M,Ka(o.scrollTime),o.scrollTimeReset),registerInteractiveComponent:z,unregisterInteractiveComponent:s}}class li extends dr{shouldComponentUpdate(e,t){return this.debug&&console.log(ei(e,this.props),ei(t,this.state)),!ti(this.props,e,this.propEquality)||!ti(this.state,t,this.stateEquality)}safeSetState(e){ti(this.state,Object.assign(Object.assign({},this.state),e),this.stateEquality)||this.setState(e)}}li.addPropsEquality=function(e){let t=Object.create(this.prototype.propEquality);Object.assign(t,e),this.prototype.propEquality=t},li.addStateEquality=function(e){let t=Object.create(this.prototype.stateEquality);Object.assign(t,e),this.prototype.stateEquality=t},li.contextType=zi,li.prototype.propEquality={},li.prototype.stateEquality={};class Oi extends li{}function di(e,t){"function"==typeof e?e(t):e&&(e.current=t)}Oi.contextType=zi;class ui extends Oi{constructor(){super(...arguments),this.id=Pa(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=e=>{const{options:t}=this.context,{generatorName:o}=this.props;t.customRenderingReplaces&&Ai(o,t)||this.updateElRef(e)},this.updateElRef=e=>{this.props.elRef&&di(this.props.elRef,e)}}render(){const{props:e,context:t}=this,{options:o}=t,{customGenerator:n,defaultGenerator:p,renderProps:c}=e,b=fi(e,[],this.handleEl);let r,a,M=!1,i=[];if(null!=n){const e="function"==typeof n?n(c,ar):n;if(!0===e)M=!0;else{const t=e&&"object"==typeof e;t&&"html"in e?b.dangerouslySetInnerHTML={__html:e.html}:t&&"domNodes"in e?i=Array.prototype.slice.call(e.domNodes):(t?Jb(e):"function"!=typeof e)?r=e:a=e}}else M=!Ai(e.generatorName,o);return M&&p&&(r=p(c)),this.queuedDomNodes=i,this.currentGeneratorMeta=a,ar(e.elTag,b,r)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(e){var t;const{props:o,context:n}=this,{handleCustomRendering:p,customRenderingMetaMap:c}=n.options;if(p){const n=null!==(t=this.currentGeneratorMeta)&&void 0!==t?t:null==c?void 0:c[o.generatorName];n&&p(Object.assign(Object.assign({id:this.id,isActive:e,containerEl:this.base,reportNewContainerEl:this.updateElRef,generatorMeta:n},o),{elClasses:(o.elClasses||[]).filter(qi)}))}}applyQueueudDomNodes(){const{queuedDomNodes:e,currentDomNodes:t}=this,o=this.base;if(!tM(e,t)){t.forEach(Ra);for(let t of e)o.appendChild(t);this.currentDomNodes=e}}}function Ai(e,t){var o;return Boolean(t.handleCustomRendering&&e&&(null===(o=t.customRenderingMetaMap)||void 0===o?void 0:o[e]))}function fi(e,t,o){const n=Object.assign(Object.assign({},e.elAttrs),{ref:o});return(e.elClasses||t)&&(n.className=(e.elClasses||[]).concat(t||[]).concat(n.className||[]).filter(Boolean).join(" ")),e.elStyle&&(n.style=e.elStyle),n}function qi(e){return Boolean(e)}ui.addPropsEquality({elClasses:tM,elStyle:ZM,elAttrs:function(e,t){const o=ei(e,t);for(let e of o)if(!$M.test(e))return!1;return!0},renderProps:ZM});const Wi=Mi(0);class mi extends dr{constructor(){super(...arguments),this.InnerContent=hi.bind(void 0,this),this.handleEl=e=>{this.el=e,this.props.elRef&&(di(this.props.elRef,e),e&&this.didMountMisfire&&this.componentDidMount())}}render(){const{props:e}=this,t=function(e,t){const o="function"==typeof e?e(t):e||[];return"string"==typeof o?[o]:o}(e.classNameGenerator,e.renderProps);if(e.children){const o=fi(e,t,this.handleEl),n=e.children(this.InnerContent,e.renderProps,o);return e.elTag?ar(e.elTag,o,n):n}return ar(ui,Object.assign(Object.assign({},e),{elRef:this.handleEl,elTag:e.elTag||"div",elClasses:(e.elClasses||[]).concat(t),renderId:this.context}))}componentDidMount(){var e,t;this.el?null===(t=(e=this.props).didMount)||void 0===t||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el})):this.didMountMisfire=!0}componentWillUnmount(){var e,t;null===(t=(e=this.props).willUnmount)||void 0===t||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el}))}}function hi(e,t){const o=e.props;return ar(ui,Object.assign({renderProps:o.renderProps,generatorName:o.generatorName,customGenerator:o.customGenerator,defaultGenerator:o.defaultGenerator,renderId:e.context},t))}mi.contextType=Wi;class gi extends Oi{render(){let{props:e,context:t}=this,{options:o}=t,n={view:t.viewApi};return ar(mi,Object.assign({},e,{elTag:e.elTag||"div",elClasses:[...vi(e.viewSpec),...e.elClasses||[]],renderProps:n,classNameGenerator:o.viewClassNames,generatorName:void 0,didMount:o.viewDidMount,willUnmount:o.viewWillUnmount}),(()=>e.children))}}function vi(e){return[`fc-${e.type}-view`,"fc-view"]}function Ri(e,t){let o,n,p=[],{start:c}=t;for(e.sort(wi),o=0;oc&&p.push({start:c,end:n.start}),n.end>c&&(c=n.end);return ct.start)&&(null===e.start||null===t.end||e.start=e.start)&&(null===e.end||null!==t.end&&t.end<=e.end)}function Bi(e,t){return(null===e.start||t>=e.start)&&(null===e.end||t=$a(t)&&(n=pM(n,1))}return e.start&&(o=aM(e.start),n&&n<=o&&(n=pM(o,1))),{start:o,end:n}}function Si(e,t,o,n){return"year"===n?Ka(o.diffWholeYears(e,t),"year"):"month"===n?Ka(o.diffWholeMonths(e,t),"month"):function(e,t){let o=aM(e),n=aM(t);return{years:0,months:0,days:Math.round(bM(o,n)),milliseconds:t.valueOf()-n.valueOf()-(e.valueOf()-o.valueOf())}}(e,t)}function Ti(e,t){return"function"==typeof e&&(e=e()),null==e?t.createNowMarker():t.createMarker(e)}class Xi{constructor(e){this.props=e,this.nowDate=Ti(e.nowInput,e.dateEnv),this.initHiddenDays()}buildPrev(e,t,o){let{dateEnv:n}=this.props,p=n.subtract(n.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(p,-1,o)}buildNext(e,t,o){let{dateEnv:n}=this.props,p=n.add(n.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(p,1,o)}build(e,t,o=!0){let n,p,c,b,r,a,{props:M}=this;var i,z;return n=this.buildValidRange(),n=this.trimHiddenDays(n),o&&(i=e,e=null!=(z=n).start&&i=z.end?new Date(z.end.valueOf()-1):i),p=this.buildCurrentRangeInfo(e,t),c=/^(year|month|week|day)$/.test(p.unit),b=this.buildRenderRange(this.trimHiddenDays(p.range),p.unit,c),b=this.trimHiddenDays(b),r=b,M.showNonCurrentDates||(r=yi(r,p.range)),r=this.adjustActiveRange(r),r=yi(r,n),a=Li(p.range,n),Bi(b,e)||(e=b.start),{currentDate:e,validRange:n,currentRange:p.range,currentRangeUnit:p.unit,isRangeAllDay:c,activeRange:r,renderRange:b,slotMinTime:M.slotMinTime,slotMaxTime:M.slotMaxTime,isValid:a,dateIncrement:this.buildDateIncrement(p.duration)}}buildValidRange(){let e=this.props.validRangeInput,t="function"==typeof e?e.call(this.props.calendarApi,this.nowDate):e;return this.refineRange(t)||{start:null,end:null}}buildCurrentRangeInfo(e,t){let o,{props:n}=this,p=null,c=null,b=null;return n.duration?(p=n.duration,c=n.durationUnit,b=this.buildRangeFromDuration(e,t,p,c)):(o=this.props.dayCount)?(c="day",b=this.buildRangeFromDayCount(e,t,o)):(b=this.buildCustomVisibleRange(e))?c=n.dateEnv.greatestWholeUnit(b.start,b.end).unit:(p=this.getFallbackDuration(),c=eM(p).unit,b=this.buildRangeFromDuration(e,t,p,c)),{duration:p,unit:c,range:b}}getFallbackDuration(){return Ka({day:1})}adjustActiveRange(e){let{dateEnv:t,usesMinMaxTime:o,slotMinTime:n,slotMaxTime:p}=this.props,{start:c,end:b}=e;return o&&(Za(n)<0&&(c=aM(c),c=t.add(c,n)),Za(p)>1&&(b=aM(b),b=pM(b,-1),b=t.add(b,p))),{start:c,end:b}}buildRangeFromDuration(e,t,o,n){let p,c,b,{dateEnv:r,dateAlignment:a}=this.props;if(!a){let{dateIncrement:e}=this.props;a=e&&$a(e)<$a(o)?eM(e).unit:n}function M(){p=r.startOf(e,a),c=r.add(p,o),b={start:p,end:c}}return Za(o)<=1&&this.isHiddenDay(p)&&(p=this.skipHiddenDays(p,t),p=aM(p)),M(),this.trimHiddenDays(b)||(e=this.skipHiddenDays(e,t),M()),b}buildRangeFromDayCount(e,t,o){let n,{dateEnv:p,dateAlignment:c}=this.props,b=0,r=e;c&&(r=p.startOf(r,c)),r=aM(r),r=this.skipHiddenDays(r,t),n=r;do{n=pM(n,1),this.isHiddenDay(n)||(b+=1)}while(b!b[e.defId].recurringDef));for(let e in b){let o=b[e];if(o.recurringDef){let{duration:b}=o.recurringDef;b||(b=o.allDay?c.defaultAllDayEventDuration:c.defaultTimedEventDuration);let a=xi(o,b,t,n,p.recurringTypes);for(let t of a){let o=ki(e,{start:t,end:n.add(t,b)});r[o.instanceId]=o}}}return{defs:b,instances:r}}function xi(e,t,o,n,p){let c=p[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:n.subtract(o.start,t),end:o.end},n);return e.allDay&&(c=c.map(aM)),c}const Di={id:String,groupId:String,title:String,url:String,interactive:Boolean},Pi={start:UM,end:UM,date:UM,allDay:Boolean},Ii=Object.assign(Object.assign(Object.assign({},Di),Pi),{extendedProps:UM});function ji(e,t,o,n,p=Fi(o),c,b){let{refined:r,extra:a}=Hi(e,o,p),M=function(e,t){let o=null;return e&&(o=e.defaultAllDay),null==o&&(o=t.options.defaultAllDay),o}(t,o),i=function(e,t,o,n){for(let p=0;p{return o=t,n=e,Boolean(o.groupId&&o.groupId===n.groupId);var o,n}));return n.defs[t.defId]=t,n.instances[o.instanceId]=o,n}return{defs:{},instances:{}}}function Qi(e,t){return{defs:Object.assign(Object.assign({},e.defs),t.defs),instances:Object.assign(Object.assign({},e.instances),t.instances)}}function Ki(e,t){let o=YM(e.defs,t),n=YM(e.instances,(e=>o[e.defId]));return{defs:o,instances:n}}function Ji(e){return Array.isArray(e)?e:"string"==typeof e?e.split(/\s+/):[]}const Zi={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:UM,overlap:UM,allow:UM,className:Ji,classNames:Ji,color:String,backgroundColor:String,borderColor:String,textColor:String},$i={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function ez(e,t){let o=function(e,t){return Array.isArray(e)?Vi(e,null,t,!0):"object"==typeof e&&e?Vi([e],null,t,!0):null!=e?String(e):null}(e.constraint,t);return{display:e.display||null,startEditable:null!=e.startEditable?e.startEditable:e.editable,durationEditable:null!=e.durationEditable?e.durationEditable:e.editable,constraints:null!=o?[o]:[],overlap:null!=e.overlap?e.overlap:null,allows:null!=e.allow?[e.allow]:[],backgroundColor:e.backgroundColor||e.color||"",borderColor:e.borderColor||e.color||"",textColor:e.textColor||"",classNames:(e.className||[]).concat(e.classNames||[])}}function tz(e,t){return{display:null!=t.display?t.display:e.display,startEditable:null!=t.startEditable?t.startEditable:e.startEditable,durationEditable:null!=t.durationEditable?t.durationEditable:e.durationEditable,constraints:e.constraints.concat(t.constraints),overlap:"boolean"==typeof t.overlap?t.overlap:e.overlap,allows:e.allows.concat(t.allows),backgroundColor:t.backgroundColor||e.backgroundColor,borderColor:t.borderColor||e.borderColor,textColor:t.textColor||e.textColor,classNames:e.classNames.concat(t.classNames)}}const oz={id:String,defaultAllDay:Boolean,url:String,format:String,events:UM,eventDataTransform:UM,success:UM,failure:UM};function nz(e,t,o=pz(t)){let n;if("string"==typeof e?n={url:e}:"function"==typeof e||Array.isArray(e)?n={events:e}:"object"==typeof e&&e&&(n=e),n){let{refined:p,extra:c}=FM(n,o),b=function(e,t){let o=t.pluginHooks.eventSourceDefs;for(let t=o.length-1;t>=0;t-=1){let n=o[t].parseMeta(e);if(n)return{sourceDefId:t,meta:n}}return null}(p,t);if(b)return{_raw:e,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:p.defaultAllDay,eventDataTransform:p.eventDataTransform,success:p.success,failure:p.failure,publicId:p.id||"",sourceId:Pa(),sourceDefId:b.sourceDefId,meta:b.meta,ui:ez(p,t),extendedProps:c}}return null}function pz(e){return Object.assign(Object.assign(Object.assign({},Zi),oz),e.pluginHooks.eventSourceRefiners)}function cz(e,t,o){let n=o.options.eventDataTransform,p=t?t.eventDataTransform:null;return p&&(e=bz(e,p)),n&&(e=bz(e,n)),e}function bz(e,t){let o;if(t){o=[];for(let n of e){let e=t(n);e?o.push(e):null==e&&o.push(n)}}else o=e;return o}function rz(e,t,o){let{defs:n}=e,p=QM(e.instances,(e=>n[e.defId].allDay?e:Object.assign(Object.assign({},e),{range:{start:o.createMarker(t.toDate(e.range.start,e.forcedStartTzo)),end:o.createMarker(t.toDate(e.range.end,e.forcedEndTzo))},forcedStartTzo:o.canComputeOffset?null:e.forcedStartTzo,forcedEndTzo:o.canComputeOffset?null:e.forcedEndTzo})));return{defs:n,instances:p}}function az(e,t){return Ki(e,(e=>e.sourceId!==t))}class Mz{constructor(){this.handlers={},this.thisContext=null}setThisContext(e){this.thisContext=e}setOptions(e){this.options=e}on(e,t){!function(e,t,o){(e[t]||(e[t]=[])).push(o)}(this.handlers,e,t)}off(e,t){!function(e,t,o){o?e[t]&&(e[t]=e[t].filter((e=>e!==o))):delete e[t]}(this.handlers,e,t)}trigger(e,...t){let o=this.handlers[e]||[],n=this.options&&this.options[e],p=[].concat(n||[],o);for(let e of p)e.apply(this.thisContext,t)}hasHandlers(e){return Boolean(this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e])}}const iz={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function zz(e,t,o){o.emitter.trigger("select",Object.assign(Object.assign({},sz(e,o)),{jsEvent:t?t.origEvent:null,view:o.viewApi||o.calendarApi.view}))}function sz(e,t){let o={};for(let n of t.pluginHooks.dateSpanTransforms)Object.assign(o,n(e,t));var n,p;return Object.assign(o,(n=e,p=t.dateEnv,Object.assign(Object.assign({},kz(n.range,p,n.allDay)),{allDay:n.allDay}))),o}function lz(e,t,o){let{dateEnv:n,options:p}=o,c=t;return e?(c=aM(c),c=n.add(c,p.defaultAllDayEventDuration)):c=n.add(c,p.defaultTimedEventDuration),c}function Oz(e,t,o,n){let p=vz(e.defs,t),c={defs:{},instances:{}};for(let t in e.defs){let b=e.defs[t];c.defs[t]=dz(b,p[t],o,n)}for(let t in e.instances){let b=e.instances[t],r=c.defs[b.defId];c.instances[t]=uz(b,r,p[b.defId],o,n)}return c}function dz(e,t,o,n){let p=o.standardProps||{};null==p.hasEnd&&t.durationEditable&&(o.startDelta||o.endDelta)&&(p.hasEnd=!0);let c=Object.assign(Object.assign(Object.assign({},e),p),{ui:Object.assign(Object.assign({},e.ui),p.ui)});o.extendedProps&&(c.extendedProps=Object.assign(Object.assign({},c.extendedProps),o.extendedProps));for(let e of n.pluginHooks.eventDefMutationAppliers)e(c,o,n);return!c.hasEnd&&n.options.forceEventDuration&&(c.hasEnd=!0),c}function uz(e,t,o,n,p){let{dateEnv:c}=p,b=n.standardProps&&!0===n.standardProps.allDay,r=n.standardProps&&!1===n.standardProps.hasEnd,a=Object.assign({},e);return b&&(a.range=Ei(a.range)),n.datesDelta&&o.startEditable&&(a.range={start:c.add(a.range.start,n.datesDelta),end:c.add(a.range.end,n.datesDelta)}),n.startDelta&&o.durationEditable&&(a.range={start:c.add(a.range.start,n.startDelta),end:a.range.end}),n.endDelta&&o.durationEditable&&(a.range={start:a.range.start,end:c.add(a.range.end,n.endDelta)}),r&&(a.range={start:a.range.start,end:lz(t.allDay,a.range.start,p)}),t.allDay&&(a.range={start:aM(a.range.start),end:aM(a.range.end)}),a.range.endRz(e,t)))}function Rz(e,t){let o=[];return t[""]&&o.push(t[""]),t[e.defId]&&o.push(t[e.defId]),o.push(e.ui),function(e){return e.reduce(tz,$i)}(o)}function wz(e){let{eventRange:t}=e,o=t.def,n=t.instance?t.instance.range:t.range,p=n.start?n.start.valueOf():0,c=n.end?n.end.valueOf():0;return Object.assign(Object.assign(Object.assign({},o.extendedProps),o),{id:o.publicId,start:p,end:c,duration:c-p,allDay:Number(o.allDay),_seg:e})}function yz(e,t){let{pluginHooks:o}=t,n=o.isDraggableTransformers,{def:p,ui:c}=e.eventRange,b=c.startEditable;for(let e of n)b=e(b,p,c,t);return b}function Lz(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function Nz(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function Bz(e,t,o,n,p,c,b){let{dateEnv:r,options:a}=o,{displayEventTime:M,displayEventEnd:i}=a,z=e.eventRange.def,s=e.eventRange.instance;null==M&&(M=!1!==n),null==i&&(i=!1!==p);let l=s.range.start,O=s.range.end,d=c||e.start||e.eventRange.range.start,u=b||e.end||e.eventRange.range.end,A=aM(l).valueOf()===aM(d).valueOf(),f=aM(cM(O,-1)).valueOf()===aM(cM(u,-1)).valueOf();return M&&!z.allDay&&(A||f)?(d=A?l:d,u=f?O:u,i&&z.hasEnd?r.formatRange(d,u,t,{forcedStartTzo:c?null:s.forcedStartTzo,forcedEndTzo:b?null:s.forcedEndTzo}):r.format(d,t,{forcedTzo:c?null:s.forcedStartTzo})):""}function Ez(e,t,o){let n=e.eventRange.range;return{isPast:n.end<=(o||t.start),isFuture:n.start>=(o||t.end),isToday:t&&Bi(t,n.start)}}function Cz(e){let t=["fc-event"];return e.isMirror&&t.push("fc-event-mirror"),e.isDraggable&&t.push("fc-event-draggable"),(e.isStartResizable||e.isEndResizable)&&t.push("fc-event-resizable"),e.isDragging&&t.push("fc-event-dragging"),e.isResizing&&t.push("fc-event-resizing"),e.isSelected&&t.push("fc-event-selected"),e.isStart&&t.push("fc-event-start"),e.isEnd&&t.push("fc-event-end"),e.isPast&&t.push("fc-event-past"),e.isToday&&t.push("fc-event-today"),e.isFuture&&t.push("fc-event-future"),t}function Sz(e,t){let{def:o,instance:n}=e.eventRange,{url:p}=o;if(p)return{href:p};let{emitter:c,options:b}=t,{eventInteractive:r}=b;return null==r&&(r=o.interactive,null==r&&(r=Boolean(c.hasHandlers("eventClick")))),r?xa((e=>{c.trigger("eventClick",{el:e.target,event:new fz(t,o,n),jsEvent:e,view:t.viewApi})})):{}}const Tz={start:UM,end:UM,allDay:Boolean};function Xz(e,t,o){return Object.assign(Object.assign({},kz(e,t,o)),{timeZone:t.timeZone})}function kz(e,t,o){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:o}),endStr:t.formatIso(e.end,{omitTime:o})}}class _z extends Error{constructor(e,t){super(e),this.response=t}}let xz;function Dz(){return null==xz&&(xz=function(){if("undefined"==typeof document)return!0;let e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.innerHTML="",e.querySelector("table").style.height="100px",e.querySelector("div").style.height="100%",document.body.appendChild(e);let t=e.querySelector("div").offsetHeight>0;return document.body.removeChild(e),t}()),xz}class Pz extends Oi{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{ri((()=>{this.setState({forPrint:!0})}))},this.handleAfterPrint=()=>{ri((()=>{this.setState({forPrint:!1})}))}}render(){let{props:e}=this,{options:t}=e,{forPrint:o}=this.state,n=o||"auto"===t.height||"auto"===t.contentHeight,p=n||null==t.height?"":t.height,c=["fc",o?"fc-media-print":"fc-media-screen",`fc-direction-${t.direction}`,e.theme.getClass("root")];return Dz()||c.push("fc-liquid-hack"),e.children(c,p,n,o)}componentDidMount(){let{emitter:e}=this.props;e.on("_beforeprint",this.handleBeforePrint),e.on("_afterprint",this.handleAfterPrint)}componentWillUnmount(){let{emitter:e}=this.props;e.off("_beforeprint",this.handleBeforePrint),e.off("_afterprint",this.handleAfterPrint)}}class Iz{constructor(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}destroy(){}}function jz(e){return{[e.component.uid]:e}}const Hz={};class Fz{getCurrentData(){return this.currentDataManager.getCurrentData()}dispatch(e){this.currentDataManager.dispatch(e)}get view(){return this.getCurrentData().viewApi}batchRendering(e){e()}updateSize(){this.trigger("_resize",!0)}setOption(e,t){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:t})}getOption(e){return this.currentDataManager.currentCalendarOptionsInput[e]}getAvailableLocaleCodes(){return Object.keys(this.getCurrentData().availableRawLocales)}on(e,t){let{currentDataManager:o}=this;o.currentCalendarOptionsRefiners[e]?o.emitter.on(e,t):console.warn(`Unknown listener name '${e}'`)}off(e,t){this.currentDataManager.emitter.off(e,t)}trigger(e,...t){this.currentDataManager.emitter.trigger(e,...t)}changeView(e,t){this.batchRendering((()=>{if(this.unselect(),t)if(t.start&&t.end)this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e}),this.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:t});else{let{dateEnv:o}=this.getCurrentData();this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:o.createMarker(t)})}else this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})}))}zoomTo(e,t){let o;t=t||"day",o=this.getCurrentData().viewSpecs[t]||this.getUnitViewSpec(t),this.unselect(),o?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:o.type,dateMarker:e}):this.dispatch({type:"CHANGE_DATE",dateMarker:e})}getUnitViewSpec(e){let t,o,{viewSpecs:n,toolbarConfig:p}=this.getCurrentData(),c=[].concat(p.header?p.header.viewsWithButtons:[],p.footer?p.footer.viewsWithButtons:[]);for(let e in n)c.push(e);for(t=0;t{this.dispatch({type:"REMOVE_EVENTS",eventStore:qz(e)})}})}getEventById(e){let t=this.getCurrentData(),{defs:o,instances:n}=t.eventStore;e=String(e);for(let p in o){let c=o[p];if(c.publicId===e){if(c.recurringDef)return new fz(t,c,null);for(let e in n){let o=n[e];if(o.defId===c.defId)return new fz(t,c,o)}}}return null}getEvents(){let e=this.getCurrentData();return Wz(e.eventStore,e)}removeAllEvents(){this.dispatch({type:"REMOVE_ALL_EVENTS"})}getEventSources(){let e=this.getCurrentData(),t=e.eventSources,o=[];for(let n in t)o.push(new Az(e,t[n]));return o}getEventSourceById(e){let t=this.getCurrentData(),o=t.eventSources;e=String(e);for(let n in o)if(o[n].publicId===e)return new Az(t,o[n]);return null}addEventSource(e){let t=this.getCurrentData();if(e instanceof Az)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;let o=nz(e,t);return o?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[o]}),new Az(t,o)):null}removeAllEventSources(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})}refetchEvents(){this.dispatch({type:"FETCH_EVENT_SOURCES",isRefetch:!0})}scrollToTime(e){let t=Ka(e);t&&this.trigger("_scrollRequest",{time:t})}}function Uz(e,t){return e.left>=t.left&&e.left=t.top&&e.topo:!!t&&e>=t.end)}}function Yz(e,t){let o=["fc-day",`fc-day-${oM[e.dow]}`];return e.isDisabled?o.push("fc-day-disabled"):(e.isToday&&(o.push("fc-day-today"),o.push(t.getClass("today"))),e.isPast&&o.push("fc-day-past"),e.isFuture&&o.push("fc-day-future"),e.isOther&&o.push("fc-day-other")),o}const Qz=TM({year:"numeric",month:"long",day:"numeric"}),Kz=TM({week:"long"});function Jz(e,t,o="day",n=!0){const{dateEnv:p,options:c,calendarApi:b}=e;let r=p.format(t,"week"===o?Kz:Qz);if(c.navLinks){let e=p.toDate(t);const a=e=>{let n="day"===o?c.navLinkDayClick:"week"===o?c.navLinkWeekClick:null;"function"==typeof n?n.call(b,p.toDate(t),e):("string"==typeof n&&(o=n),b.zoomTo(t,o))};return Object.assign({title:Ua(c.navLinkHint,[r,e],r),"data-navlink":""},n?_a(a):{onClick:a})}return{"aria-label":r}}let Zz,$z=null;function es(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}function ts(e,t=!1,o){let n=o?e.getBoundingClientRect():os(e),p=function(e,t=!1){let o=window.getComputedStyle(e),n=parseInt(o.borderLeftWidth,10)||0,p=parseInt(o.borderRightWidth,10)||0,c=parseInt(o.borderTopWidth,10)||0,b=parseInt(o.borderBottomWidth,10)||0,r=es(e),a=r.y-n-p,M={borderLeft:n,borderRight:p,borderTop:c,borderBottom:b,scrollbarBottom:r.x-c-b,scrollbarLeft:0,scrollbarRight:0};return null===$z&&($z=function(){let e=document.createElement("div");Na(e,{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}),e.innerHTML="",document.body.appendChild(e);let t=e.firstChild.getBoundingClientRect().left>e.getBoundingClientRect().left;return Ra(e),t}()),$z&&"rtl"===o.direction?M.scrollbarLeft=a:M.scrollbarRight=a,t&&(M.paddingLeft=parseInt(o.paddingLeft,10)||0,M.paddingRight=parseInt(o.paddingRight,10)||0,M.paddingTop=parseInt(o.paddingTop,10)||0,M.paddingBottom=parseInt(o.paddingBottom,10)||0),M}(e,t),c={left:n.left+p.borderLeft+p.scrollbarLeft,right:n.right-p.borderRight-p.scrollbarRight,top:n.top+p.borderTop,bottom:n.bottom-p.borderBottom-p.scrollbarBottom};return t&&(c.left+=p.paddingLeft,c.right-=p.paddingRight,c.top+=p.paddingTop,c.bottom-=p.paddingBottom),c}function os(e){let t=e.getBoundingClientRect();return{left:t.left+window.scrollX,top:t.top+window.scrollY,right:t.right+window.scrollX,bottom:t.bottom+window.scrollY}}function ns(e){let t=[];for(;e instanceof HTMLElement;){let o=window.getComputedStyle(e);if("fixed"===o.position)break;/(auto|scroll)/.test(o.overflow+o.overflowY+o.overflowX)&&t.push(e),e=e.parentNode}return t}class ps{constructor(e,t,o,n){this.els=t;let p=this.originClientRect=e.getBoundingClientRect();o&&this.buildElHorizontals(p.left),n&&this.buildElVerticals(p.top)}buildElHorizontals(e){let t=[],o=[];for(let n of this.els){let p=n.getBoundingClientRect();t.push(p.left-e),o.push(p.right-e)}this.lefts=t,this.rights=o}buildElVerticals(e){let t=[],o=[];for(let n of this.els){let p=n.getBoundingClientRect();t.push(p.top-e),o.push(p.bottom-e)}this.tops=t,this.bottoms=o}leftToIndex(e){let t,{lefts:o,rights:n}=this,p=o.length;for(t=0;t=o[t]&&e=o[t]&&e0}canScrollHorizontally(){return this.getMaxScrollLeft()>0}canScrollUp(){return this.getScrollTop()>0}canScrollDown(){return this.getScrollTop()0}canScrollRight(){return this.getScrollLeft()e.thickness||1)){this.getEntryThickness=e,this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}addSegs(e){let t=[];for(let o of e)this.insertEntry(o,t);return t}insertEntry(e,t){let o=this.findInsertion(e);this.isInsertionValid(o,e)?this.insertEntryAt(e,o):this.handleInvalidInsertion(o,e,t)}isInsertionValid(e,t){return(-1===this.maxCoord||e.levelCoord+this.getEntryThickness(t)<=this.maxCoord)&&(-1===this.maxStackCnt||e.stackCntp.end&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:p.end,end:n.end}},o)}insertEntryAt(e,t){let{entriesByLevel:o,levelCoords:n}=this;-1===t.lateral?(ds(n,t.level,t.levelCoord),ds(o,t.level,[e])):ds(o[t.level],t.lateral,e),this.stackCnts[ls(e)]=t.stackCnt}findInsertion(e){let{levelCoords:t,entriesByLevel:o,strictOrder:n,stackCnts:p}=this,c=t.length,b=0,r=-1,a=-1,M=null,i=0;for(let z=0;z=b+this.getEntryThickness(e))break;let s,l=o[z],O=us(l,e.span.start,ss),d=O[0]+O[1];for(;(s=l[d])&&s.span.startb&&(b=e,M=s,r=z,a=d),e===b&&(i=Math.max(i,p[ls(s)]+1)),d+=1}}let z=0;if(M)for(z=r+1;zo(e[p-1]))return[p,0];for(;nb))return[c,1];n=c+1}}return[n,0]}class As{constructor(e,t){this.emitter=new Mz}destroy(){}setMirrorIsVisible(e){}setMirrorNeedsRevert(e){}setAutoScrollEnabled(e){}}const fs={},qs={startTime:Ka,duration:Ka,create:Boolean,sourceId:String};function Ws(e){let{refined:t,extra:o}=FM(e,qs);return{startTime:t.startTime||null,duration:t.duration||null,create:null==t.create||t.create,sourceId:t.sourceId,leftoverProps:o}}const ms="fc-col-header-cell";function hs(e){return e.text}class gs extends Oi{render(){let{dateEnv:e,options:t,theme:o,viewApi:n}=this.context,{props:p}=this,{date:c,dateProfile:b}=p,r=Gz(c,p.todayRange,null,b),a=[ms].concat(Yz(r,o)),M=e.format(c,p.dayHeaderFormat),i=!r.isDisabled&&p.colCnt>1?Jz(this.context,c):{},z=Object.assign(Object.assign(Object.assign({date:e.toDate(c),view:n},p.extraRenderProps),{text:M}),r);return ar(mi,{elTag:"th",elClasses:a,elAttrs:Object.assign({role:"columnheader",colSpan:p.colSpan,"data-date":r.isDisabled?void 0:AM(c)},p.extraDataAttrs),renderProps:z,generatorName:"dayHeaderContent",customGenerator:t.dayHeaderContent,defaultGenerator:hs,classNameGenerator:t.dayHeaderClassNames,didMount:t.dayHeaderDidMount,willUnmount:t.dayHeaderWillUnmount},(e=>ar("div",{className:"fc-scrollgrid-sync-inner"},!r.isDisabled&&ar(e,{elTag:"a",elAttrs:i,elClasses:["fc-col-header-cell-cushion",p.isSticky&&"fc-sticky"]}))))}}const vs=TM({weekday:"long"});class Rs extends Oi{render(){let{props:e}=this,{dateEnv:t,theme:o,viewApi:n,options:p}=this.context,c=pM(new Date(2592e5),e.dow),b={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},r=t.format(c,e.dayHeaderFormat),a=Object.assign(Object.assign(Object.assign(Object.assign({date:c},b),{view:n}),e.extraRenderProps),{text:r});return ar(mi,{elTag:"th",elClasses:[ms,...Yz(b,o),...e.extraClassNames||[]],elAttrs:Object.assign({role:"columnheader",colSpan:e.colSpan},e.extraDataAttrs),renderProps:a,generatorName:"dayHeaderContent",customGenerator:p.dayHeaderContent,defaultGenerator:hs,classNameGenerator:p.dayHeaderClassNames,didMount:p.dayHeaderDidMount,willUnmount:p.dayHeaderWillUnmount},(o=>ar("div",{className:"fc-scrollgrid-sync-inner"},ar(o,{elTag:"a",elClasses:["fc-col-header-cell-cushion",e.isSticky&&"fc-sticky"],elAttrs:{"aria-label":t.format(c,vs)}}))))}}class ws extends dr{constructor(e,t){super(e,t),this.initialNowDate=Ti(t.options.now,t.dateEnv),this.initialNowQueriedMs=(new Date).valueOf(),this.state=this.computeTiming().currentState}render(){let{props:e,state:t}=this;return e.children(t.nowDate,t.todayRange)}componentDidMount(){this.setTimeout()}componentDidUpdate(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())}componentWillUnmount(){this.clearTimeout()}computeTiming(){let{props:e,context:t}=this,o=cM(this.initialNowDate,(new Date).valueOf()-this.initialNowQueriedMs),n=t.dateEnv.startOf(o,e.unit),p=t.dateEnv.add(n,Ka(1,e.unit)),c=p.valueOf()-o.valueOf();return c=Math.min(864e5,c),{currentState:{nowDate:n,todayRange:ys(n)},nextState:{nowDate:p,todayRange:ys(p)},waitMs:c}}setTimeout(){let{nextState:e,waitMs:t}=this.computeTiming();this.timeoutId=setTimeout((()=>{this.setState(e,(()=>{this.setTimeout()}))}),t)}clearTimeout(){this.timeoutId&&clearTimeout(this.timeoutId)}}function ys(e){let t=aM(e);return{start:t,end:pM(t,1)}}ws.contextType=zi;class Ls extends Oi{constructor(){super(...arguments),this.createDayHeaderFormatter=qM(Ns)}render(){let{context:e}=this,{dates:t,dateProfile:o,datesRepDistinctDays:n,renderIntro:p}=this.props,c=this.createDayHeaderFormatter(e.options.dayHeaderFormat,n,t.length);return ar(ws,{unit:"day"},((e,b)=>ar("tr",{role:"row"},p&&p("day"),t.map((e=>n?ar(gs,{key:e.toISOString(),date:e,dateProfile:o,todayRange:b,colCnt:t.length,dayHeaderFormat:c}):ar(Rs,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:c}))))))}}function Ns(e,t,o){return e||function(e,t){return TM(!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}(t,o)}class Bs{constructor(e,t){let o=e.start,{end:n}=e,p=[],c=[],b=-1;for(;o=t.length?t[t.length-1]+1:t[o]}}class Es{constructor(e,t){let o,n,p,{dates:c}=e;if(t){for(n=c[0].getUTCDay(),o=1;o!d[e.instanceId]))}),z=i.defs,s=i.instances,l=vz(z,e.eventUiBases);var O,d;for(let n in a){let b=a[n],O=b.range,d=M[b.defId],u=r[b.defId];if(!_s(d.constraints,O,i,e.businessHours,t))return!1;let{eventOverlap:A}=t.options,f="function"==typeof A?A:null;for(let e in s){let o=s[e];if(Li(O,o.range)){if(!1===l[o.defId].overlap&&c.isEvent)return!1;if(!1===d.overlap)return!1;if(f&&!f(new fz(t,z[o.defId],o),new fz(t,u,b)))return!1}}let q=p.eventStore;for(let e of d.allows){let p,c=Object.assign(Object.assign({},o),{range:b.range,allDay:u.allDay}),r=q.defs[u.defId],a=q.instances[n];if(p=r?new fz(t,r,a):new fz(t,u),!e(sz(c,t),p))return!1}}return!0}(e,t,o,n)||e.dateSelection&&!function(e,t,o,n){let p=e.eventStore,c=p.defs,b=p.instances,r=e.dateSelection,a=r.range,{selectionConfig:M}=t.getCurrentData();if(n&&(M=n(M)),!_s(M.constraints,a,p,e.businessHours,t))return!1;let{selectOverlap:i}=t.options,z="function"==typeof i?i:null;for(let e in b){let o=b[e];if(Li(a,o.range)){if(!1===M.overlap)return!1;if(z&&!z(new fz(t,c[o.defId],o),null))return!1}}for(let e of M.allows)if(!e(sz(Object.assign(Object.assign({},o),r),t),null))return!1;return!0}(e,t,o,n))}function _s(e,t,o,n,p){for(let c of e)if(!Ps(xs(c,t,o,n,p),t))return!1;return!0}function xs(e,t,o,n,p){return"businessHours"===e?Ds(_i(n,t,p)):"string"==typeof e?Ds(Ki(o,(t=>t.groupId===e))):"object"==typeof e&&e?Ds(_i(e,t,p)):[]}function Ds(e){let{instances:t}=e,o=[];for(let e in t)o.push(t[e].range);return o}function Ps(e,t){for(let o of e)if(Ni(o,t))return!0;return!1}const Is=/^(visible|hidden)$/;class js extends Oi{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,di(this.props.elRef,e)}}render(){let{props:e}=this,{liquid:t,liquidIsAbsolute:o}=e,n=t&&o,p=["fc-scroller"];return t&&(o?p.push("fc-scroller-liquid-absolute"):p.push("fc-scroller-liquid")),ar("div",{ref:this.handleEl,className:p.join(" "),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:n&&-(e.overcomeLeft||0)||"",right:n&&-(e.overcomeRight||0)||"",bottom:n&&-(e.overcomeBottom||0)||"",marginLeft:!n&&-(e.overcomeLeft||0)||"",marginRight:!n&&-(e.overcomeRight||0)||"",marginBottom:!n&&-(e.overcomeBottom||0)||"",maxHeight:e.maxHeight||""}},e.children)}needsXScrolling(){if(Is.test(this.props.overflowX))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),{children:o}=e;for(let e=0;et)return!0;return!1}needsYScrolling(){if(Is.test(this.props.overflowY))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),{children:o}=e;for(let e=0;et)return!0;return!1}getXScrollbarWidth(){return Is.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight}getYScrollbarWidth(){return Is.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth}}class Hs{constructor(e){this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=(e,t)=>{let{depths:o,currentMap:n}=this,p=!1,c=!1;null!==e?(p=t in n,n[t]=e,o[t]=(o[t]||0)+1,c=!0):(o[t]-=1,o[t]||(delete n[t],delete this.callbackMap[t],p=!0)),this.masterCallback&&(p&&this.masterCallback(null,String(t)),c&&this.masterCallback(e,String(t)))}}createRef(e){let t=this.callbackMap[e];return t||(t=this.callbackMap[e]=t=>{this.handleValue(t,String(e))}),t}collect(e,t,o){return function(e,t=0,o,n=1){let p=[];null==o&&(o=Object.keys(e).length);for(let c=t;ce),Us),this.renderMicroColGroup=qM(Vs),this.scrollerRefs=new Hs,this.scrollerElRefs=new Hs(this._handleScrollerEl.bind(this)),this.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},this.handleSizing=()=>{this.safeSetState(Object.assign({shrinkWidth:this.computeShrinkWidth()},this.computeScrollerDims()))}}render(){let{props:e,state:t,context:o}=this,n=e.sections||[],p=this.processCols(e.cols),c=this.renderMicroColGroup(p,t.shrinkWidth),b=function(e,t){let o=["fc-scrollgrid",t.theme.getClass("table")];return e&&o.push("fc-scrollgrid-liquid"),o}(e.liquid,o);e.collapsibleWidth&&b.push("fc-scrollgrid-collapsible");let r,a=n.length,M=0,i=[],z=[],s=[];for(;M{}},n);return ar(n?"th":"td",{ref:o.elRef,role:"presentation"},ar("div",{className:"fc-scroller-harness"+(M?" fc-scroller-harness-liquid":"")},ar(js,{ref:this.scrollerRefs.createRef(z),elRef:this.scrollerElRefs.createRef(z),overflowY:i,overflowX:p.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:M,liquidIsAbsolute:!0},s)))}_handleScrollerEl(e,t){let o=function(e,t){for(let o of e)if(o.key===t)return o;return null}(this.props.sections,t);o&&di(o.chunk.scrollerElRef,e)}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(){this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}computeShrinkWidth(){return function(e){for(let t of e)if("shrink"===t.width)return!0;return!1}(this.props.cols)?function(e){let t=function(e,t){let o=e instanceof HTMLElement?[e]:e,n=[];for(let e=0;e{this.el=e,e&&hz(e,this.props.seg)}}render(){const{props:e,context:t}=this,{options:o}=t,{seg:n}=e,{eventRange:p}=n,{ui:c}=p,b={event:new fz(t,p.def,p.instance),view:t.viewApi,timeText:e.timeText,textColor:c.textColor,backgroundColor:c.backgroundColor,borderColor:c.borderColor,isDraggable:!e.disableDragging&&yz(n,t),isStartResizable:!e.disableResizing&&Lz(n,t),isEndResizable:!e.disableResizing&&Nz(n),isMirror:Boolean(e.isDragging||e.isResizing||e.isDateSelecting),isStart:Boolean(n.isStart),isEnd:Boolean(n.isEnd),isPast:Boolean(e.isPast),isFuture:Boolean(e.isFuture),isToday:Boolean(e.isToday),isSelected:Boolean(e.isSelected),isDragging:Boolean(e.isDragging),isResizing:Boolean(e.isResizing)};return ar(mi,Object.assign({},e,{elRef:this.handleEl,elClasses:[...Cz(b),...n.eventRange.ui.classNames,...e.elClasses||[]],renderProps:b,generatorName:"eventContent",customGenerator:o.eventContent,defaultGenerator:e.defaultGenerator,classNameGenerator:o.eventClassNames,didMount:o.eventDidMount,willUnmount:o.eventWillUnmount}))}componentDidUpdate(e){this.el&&this.props.seg!==e.seg&&hz(this.el,this.props.seg)}}class $s extends Oi{render(){let{props:e,context:t}=this,{options:o}=t,{seg:n}=e,{ui:p}=n.eventRange,c=Bz(n,o.eventTimeFormat||e.defaultTimeFormat,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return ar(Zs,Object.assign({},e,{elTag:"a",elStyle:{borderColor:p.borderColor,backgroundColor:p.backgroundColor},elAttrs:Sz(n,t),defaultGenerator:el,timeText:c}),((e,t)=>ar(ir,null,ar(e,{elTag:"div",elClasses:["fc-event-main"],elStyle:{color:t.textColor}}),Boolean(t.isStartResizable)&&ar("div",{className:"fc-event-resizer fc-event-resizer-start"}),Boolean(t.isEndResizable)&&ar("div",{className:"fc-event-resizer fc-event-resizer-end"}))))}}function el(e){return ar("div",{className:"fc-event-main-frame"},e.timeText&&ar("div",{className:"fc-event-time"},e.timeText),ar("div",{className:"fc-event-title-container"},ar("div",{className:"fc-event-title fc-sticky"},e.event.title||ar(ir,null," "))))}const tl=TM({day:"numeric"});class ol extends Oi{constructor(){super(...arguments),this.refineRenderProps=WM(pl)}render(){let{props:e,context:t}=this,{options:o}=t,n=this.refineRenderProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,isMonthStart:e.isMonthStart||!1,showDayNumber:e.showDayNumber,extraRenderProps:e.extraRenderProps,viewApi:t.viewApi,dateEnv:t.dateEnv,monthStartFormat:o.monthStartFormat});return ar(mi,Object.assign({},e,{elClasses:[...Yz(n,t.theme),...e.elClasses||[]],elAttrs:Object.assign(Object.assign({},e.elAttrs),n.isDisabled?{}:{"data-date":AM(e.date)}),renderProps:n,generatorName:"dayCellContent",customGenerator:o.dayCellContent,defaultGenerator:e.defaultGenerator,classNameGenerator:n.isDisabled?void 0:o.dayCellClassNames,didMount:o.dayCellDidMount,willUnmount:o.dayCellWillUnmount}))}}function nl(e){return Boolean(e.dayCellContent||Ai("dayCellContent",e))}function pl(e){let{date:t,dateEnv:o,dateProfile:n,isMonthStart:p}=e,c=Gz(t,e.todayRange,null,n),b=e.showDayNumber?o.format(t,p?e.monthStartFormat:tl):"";return Object.assign(Object.assign(Object.assign({date:o.toDate(t),view:e.viewApi},c),{isMonthStart:p,dayNumberText:b}),e.extraRenderProps)}class cl extends Oi{render(){let{props:e}=this,{seg:t}=e;return ar(Zs,{elTag:"div",elClasses:["fc-bg-event"],elStyle:{backgroundColor:t.eventRange.ui.backgroundColor},defaultGenerator:bl,seg:t,timeText:"",isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,disableDragging:!0,disableResizing:!0})}}function bl(e){let{title:t}=e.event;return t&&ar("div",{className:"fc-event-title"},e.event.title)}function rl(e){return ar("div",{className:`fc-${e}`})}const al=e=>ar(zi.Consumer,null,(t=>{let{dateEnv:o,options:n}=t,{date:p}=e,c=n.weekNumberFormat||e.defaultFormat,b={num:o.computeWeekNumber(p),text:o.format(p,c),date:p};return ar(mi,Object.assign({},e,{renderProps:b,generatorName:"weekNumberContent",customGenerator:n.weekNumberContent,defaultGenerator:Ml,classNameGenerator:n.weekNumberClassNames,didMount:n.weekNumberDidMount,willUnmount:n.weekNumberWillUnmount}))}));function Ml(e){return e.text}class il extends Oi{constructor(){super(...arguments),this.state={titleId:Sa()},this.handleRootEl=e=>{this.rootEl=e,this.props.elRef&&di(this.props.elRef,e)},this.handleDocumentMouseDown=e=>{const t=Ea(e);this.rootEl.contains(t)||this.handleCloseClick()},this.handleDocumentKeyDown=e=>{"Escape"===e.key&&this.handleCloseClick()},this.handleCloseClick=()=>{let{onClose:e}=this.props;e&&e()}}render(){let{theme:e,options:t}=this.context,{props:o,state:n}=this,p=["fc-popover",e.getClass("popover")].concat(o.extraClassNames||[]);return function(e,t){var o=ar(ba,{__v:e,i:t});return o.containerInfo=t,o}(ar("div",Object.assign({},o.extraAttrs,{id:o.id,className:p.join(" "),"aria-labelledby":n.titleId,ref:this.handleRootEl}),ar("div",{className:"fc-popover-header "+e.getClass("popoverHeader")},ar("span",{className:"fc-popover-title",id:n.titleId},o.title),ar("span",{className:"fc-popover-close "+e.getIconClass("close"),title:t.closeHint,onClick:this.handleCloseClick})),ar("div",{className:"fc-popover-body "+e.getClass("popoverContent")},o.children)),o.parentEl)}componentDidMount(){document.addEventListener("mousedown",this.handleDocumentMouseDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.updateSize()}componentWillUnmount(){document.removeEventListener("mousedown",this.handleDocumentMouseDown),document.removeEventListener("keydown",this.handleDocumentKeyDown)}updateSize(){let{isRtl:e}=this.context,{alignmentEl:t,alignGridTop:o}=this.props,{rootEl:n}=this,p=function(e){let t=ns(e),o=e.getBoundingClientRect();for(let e of t){let t=Vz(o,e.getBoundingClientRect());if(!t)return null;o=t}return o}(t);if(p){let c=n.getBoundingClientRect(),b=o?wa(t,".fc-scrollgrid").getBoundingClientRect().top:p.top,r=e?p.right-c.width:p.left;b=Math.max(b,10),r=Math.min(r,document.documentElement.clientWidth-10-c.width),r=Math.max(r,10);let a=n.offsetParent.getBoundingClientRect();Na(n,{top:b-a.top,left:r-a.left})}}}class zl extends Ms{constructor(){super(...arguments),this.handleRootEl=e=>{this.rootEl=e,e?this.context.registerInteractiveComponent(this,{el:e,useEventCenter:!1}):this.context.unregisterInteractiveComponent(this)}}render(){let{options:e,dateEnv:t}=this.context,{props:o}=this,{startDate:n,todayRange:p,dateProfile:c}=o,b=t.format(n,e.dayPopoverFormat);return ar(ol,{elRef:this.handleRootEl,date:n,dateProfile:c,todayRange:p},((t,n,p)=>ar(il,{elRef:p.ref,id:o.id,title:b,extraClassNames:["fc-more-popover"].concat(p.className||[]),extraAttrs:p,parentEl:o.parentEl,alignmentEl:o.alignmentEl,alignGridTop:o.alignGridTop,onClose:o.onClose},nl(e)&&ar(t,{elTag:"div",elClasses:["fc-more-popover-misc"]}),o.children)))}queryHit(e,t,o,n){let{rootEl:p,props:c}=this;return e>=0&&e=0&&t{this.linkEl=e,this.props.elRef&&di(this.props.elRef,e)},this.handleClick=e=>{let{props:t,context:o}=this,{moreLinkClick:n}=o.options,p=Ol(t).start;function c(e){let{def:t,instance:n,range:p}=e.eventRange;return{event:new fz(o,t,n),start:o.dateEnv.toDate(p.start),end:o.dateEnv.toDate(p.end),isStart:e.isStart,isEnd:e.isEnd}}"function"==typeof n&&(n=n({date:p,allDay:Boolean(t.allDayDate),allSegs:t.allSegs.map(c),hiddenSegs:t.hiddenSegs.map(c),jsEvent:e,view:o.viewApi})),n&&"popover"!==n?"string"==typeof n&&o.calendarApi.zoomTo(p,n):this.setState({isPopoverOpen:!0})},this.handlePopoverClose=()=>{this.setState({isPopoverOpen:!1})}}render(){let{props:e,state:t}=this;return ar(zi.Consumer,null,(o=>{let{viewApi:n,options:p,calendarApi:c}=o,{moreLinkText:b}=p,{moreCnt:r}=e,a=Ol(e),M="function"==typeof b?b.call(c,r):`+${r} ${b}`,i=Ua(p.moreLinkHint,[r],M),z={num:r,shortText:`+${r}`,text:M,view:n};return ar(ir,null,Boolean(e.moreCnt)&&ar(mi,{elTag:e.elTag||"a",elRef:this.handleLinkEl,elClasses:[...e.elClasses||[],"fc-more-link"],elStyle:e.elStyle,elAttrs:Object.assign(Object.assign(Object.assign({},e.elAttrs),_a(this.handleClick)),{title:i,"aria-expanded":t.isPopoverOpen,"aria-controls":t.isPopoverOpen?t.popoverId:""}),renderProps:z,generatorName:"moreLinkContent",customGenerator:p.moreLinkContent,defaultGenerator:e.defaultGenerator||ll,classNameGenerator:p.moreLinkClassNames,didMount:p.moreLinkDidMount,willUnmount:p.moreLinkWillUnmount},e.children),t.isPopoverOpen&&ar(zl,{id:t.popoverId,startDate:a.start,endDate:a.end,dateProfile:e.dateProfile,todayRange:e.todayRange,extraDateSpan:e.extraDateSpan,parentEl:this.parentEl,alignmentEl:e.alignmentElRef?e.alignmentElRef.current:this.linkEl,alignGridTop:e.alignGridTop,forceTimed:e.forceTimed,onClose:this.handlePopoverClose},e.popoverContent()))}))}componentDidMount(){this.updateParentEl()}componentDidUpdate(){this.updateParentEl()}updateParentEl(){this.linkEl&&(this.parentEl=wa(this.linkEl,".fc-view-harness"))}}function ll(e){return e.text}function Ol(e){if(e.allDayDate)return{start:e.allDayDate,end:pM(e.allDayDate,1)};let{hiddenSegs:t}=e;return{start:(o=t,o.reduce(dl).eventRange.range.start),end:ul(t)};var o}function dl(e,t){return e.eventRange.range.startt.eventRange.range.end?e:t}class fl{constructor(){this.handlers=[]}set(e){this.currentValue=e;for(let t of this.handlers)t(e)}subscribe(e){this.handlers.push(e),void 0!==this.currentValue&&e(this.currentValue)}}class ql extends fl{constructor(){super(...arguments),this.map=new Map}handle(e){const{map:t}=this;let o=!1;e.isActive?(t.set(e.id,e),o=!0):t.has(e.id)&&(t.delete(e.id),o=!0),o&&this.set(t)}}const Wl=[],ml={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",weekTextLong:"Week",closeHint:"Close",timeHint:"Time",eventHint:"Event",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"},hl=Object.assign(Object.assign({},ml),{buttonHints:{prev:"Previous $0",next:"Next $0",today:(e,t)=>"day"===t?"Today":`This ${e}`},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:e=>`Show ${e} more event${1===e?"":"s"}`});function gl(e){let t=e.length>0?e[0].code:"en",o=Wl.concat(e),n={en:hl};for(let e of o)n[e.code]=e;return{map:n,defaultCode:t}}function vl(e,t){return"object"!=typeof e||Array.isArray(e)?function(e,t){let o=[].concat(e||[]),n=function(e,t){for(let o=0;o0;e-=1){let o=n.slice(0,e).join("-");if(t[o])return t[o]}}return null}(o,t)||hl;return Rl(e,o,n)}(e,t):Rl(e.code,[e.code],e)}function Rl(e,t,o){let n=GM([ml,o],["buttonText"]);delete n.code;let{week:p}=n;return delete n.week,{codeArg:e,codes:t,week:p,simpleNumberFormat:new Intl.NumberFormat(e),options:n}}function wl(e){return{id:Pa(),name:e.name,premiumReleaseDate:e.premiumReleaseDate?new Date(e.premiumReleaseDate):void 0,deps:e.deps||[],reducers:e.reducers||[],isLoadingFuncs:e.isLoadingFuncs||[],contextInit:[].concat(e.contextInit||[]),eventRefiners:e.eventRefiners||{},eventDefMemberAdders:e.eventDefMemberAdders||[],eventSourceRefiners:e.eventSourceRefiners||{},isDraggableTransformers:e.isDraggableTransformers||[],eventDragMutationMassagers:e.eventDragMutationMassagers||[],eventDefMutationAppliers:e.eventDefMutationAppliers||[],dateSelectionTransformers:e.dateSelectionTransformers||[],datePointTransforms:e.datePointTransforms||[],dateSpanTransforms:e.dateSpanTransforms||[],views:e.views||{},viewPropsTransformers:e.viewPropsTransformers||[],isPropsValid:e.isPropsValid||null,externalDefTransforms:e.externalDefTransforms||[],viewContainerAppends:e.viewContainerAppends||[],eventDropTransformers:e.eventDropTransformers||[],componentInteractions:e.componentInteractions||[],calendarInteractions:e.calendarInteractions||[],themeClasses:e.themeClasses||{},eventSourceDefs:e.eventSourceDefs||[],cmdFormatter:e.cmdFormatter,recurringTypes:e.recurringTypes||[],namedTimeZonedImpl:e.namedTimeZonedImpl,initialView:e.initialView||"",elementDraggingImpl:e.elementDraggingImpl,optionChangeHandlers:e.optionChangeHandlers||{},scrollGridImpl:e.scrollGridImpl||null,listenerRefiners:e.listenerRefiners||{},optionRefiners:e.optionRefiners||{},propSetHandlers:e.propSetHandlers||{}}}class yl extends bi{}function Ll(e,t,o,n){if(t[e])return t[e];let p=function(e,t,o,n){let p=o[e],c=n[e],b=e=>p&&null!==p[e]?p[e]:c&&null!==c[e]?c[e]:null,r=b("component"),a=b("superType"),M=null;if(a){if(a===e)throw new Error("Can't have a custom view type that references itself");M=Ll(a,t,o,n)}return!r&&M&&(r=M.component),r?{type:e,component:r,defaults:Object.assign(Object.assign({},M?M.defaults:{}),p?p.rawOptions:{}),overrides:Object.assign(Object.assign({},M?M.overrides:{}),c?c.rawOptions:{})}:null}(e,t,o,n);return p&&(t[e]=p),p}function Nl(e){return QM(e,Bl)}function Bl(e){let t="function"==typeof e?{component:e}:e,{component:o}=t;return t.content?o=El(t):!o||o.prototype instanceof Oi||(o=El(Object.assign(Object.assign({},t),{content:o}))),{superType:t.type,component:o,rawOptions:t}}function El(e){return t=>ar(zi.Consumer,null,(o=>ar(mi,{elTag:"div",elClasses:vi(o.viewSpec),renderProps:Object.assign(Object.assign({},t),{nextDayThreshold:o.options.nextDayThreshold}),generatorName:void 0,customGenerator:e.content,classNameGenerator:e.classNames,didMount:e.didMount,willUnmount:e.willUnmount})))}function Cl(e,t,o,n){let p=Nl(e),c=Nl(t.views),b=function(e,t){let o,n={};for(o in e)Ll(o,n,e,t);for(o in t)Ll(o,n,e,t);return n}(p,c);return QM(b,(e=>function(e,t,o,n,p){let c=e.overrides.duration||e.defaults.duration||n.duration||o.duration,b=null,r="",a="",M={};if(c&&(b=function(e){let t=JSON.stringify(e),o=Sl[t];return void 0===o&&(o=Ka(e),Sl[t]=o),o}(c),b)){let e=eM(b);r=e.unit,1===e.value&&(a=r,M=t[r]?t[r].rawOptions:{})}let i=t=>{let o=t.buttonText||{},n=e.defaults.buttonTextKey;return null!=n&&null!=o[n]?o[n]:null!=o[e.type]?o[e.type]:null!=o[a]?o[a]:null},z=t=>{let o=t.buttonHints||{},n=e.defaults.buttonTextKey;return null!=n&&null!=o[n]?o[n]:null!=o[e.type]?o[e.type]:null!=o[a]?o[a]:null};return{type:e.type,component:e.component,duration:b,durationUnit:r,singleUnit:a,optionDefaults:e.defaults,optionOverrides:Object.assign(Object.assign({},M),e.overrides),buttonTextOverride:i(n)||i(o)||e.overrides.buttonText,buttonTextDefault:i(p)||e.defaults.buttonText||i(kM)||e.type,buttonTitleOverride:z(n)||z(o)||e.overrides.buttonHint,buttonTitleDefault:z(p)||e.defaults.buttonHint||z(kM)}}(e,c,t,o,n)))}yl.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"},yl.prototype.baseIconClass="fc-icon",yl.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"},yl.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"},yl.prototype.iconOverrideOption="buttonIcons",yl.prototype.iconOverrideCustomButtonOption="icon",yl.prototype.iconOverridePrefix="fc-icon-";let Sl={};function Tl(e){for(let t in e)if(e[t].isFetching)return!0;return!1}function Xl(e,t,o,n){let p={};for(let e of t)p[e.sourceId]=e;return o&&(p=kl(p,o,n)),Object.assign(Object.assign({},e),p)}function kl(e,t,o){return _l(e,YM(e,(e=>function(e,t,o){return Pl(e,o)?!o.options.lazyFetching||!e.fetchRange||e.isFetching||t.starte.fetchRange.end:!e.latestFetchId}(e,t,o))),t,!1,o)}function _l(e,t,o,n,p){let c={};for(let b in e){let r=e[b];t[b]?c[b]=xl(r,o,n,p):c[b]=r}return c}function xl(e,t,o,n){let{options:p,calendarApi:c}=n,b=n.pluginHooks.eventSourceDefs[e.sourceDefId],r=Pa();return b.fetch({eventSource:e,range:t,isRefetch:o,context:n},(o=>{let{rawEvents:b}=o;p.eventSourceSuccess&&(b=p.eventSourceSuccess.call(c,b,o.response)||b),e.success&&(b=e.success.call(c,b,o.response)||b),n.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:r,fetchRange:t,rawEvents:b})}),(o=>{let b=!1;p.eventSourceFailure&&(p.eventSourceFailure.call(c,o),b=!0),e.failure&&(e.failure(o),b=!0),b||console.warn(o.message,o),n.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:r,fetchRange:t,error:o})})),Object.assign(Object.assign({},e),{isFetching:!0,latestFetchId:r})}function Dl(e,t){return YM(e,(e=>Pl(e,t)))}function Pl(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function Il(e,t){switch(t.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return t.selection;default:return e}}function jl(e,t){switch(t.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return t.eventInstanceId;default:return e}}function Hl(e,t){let o;switch(t.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return o=t.state,{affectedEvents:o.affectedEvents,mutatedEvents:o.mutatedEvents,isEvent:o.isEvent};default:return e}}function Fl(e,t){let o;switch(t.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return o=t.state,{affectedEvents:o.affectedEvents,mutatedEvents:o.mutatedEvents,isEvent:o.isEvent};default:return e}}function Ul(e,t,o,n,p){return{header:e.headerToolbar?Vl(e.headerToolbar,e,t,o,n,p):null,footer:e.footerToolbar?Vl(e.footerToolbar,e,t,o,n,p):null}}function Vl(e,t,o,n,p,c){let b={},r=[],a=!1;for(let M in e){let i=Gl(e[M],t,o,n,p,c);b[M]=i.widgets,r.push(...i.viewsWithButtons),a=a||i.hasTitle}return{sectionWidgets:b,viewsWithButtons:r,hasTitle:a}}function Gl(e,t,o,n,p,c){let b="rtl"===t.direction,r=t.customButtons||{},a=o.buttonText||{},M=t.buttonText||{},i=o.buttonHints||{},z=t.buttonHints||{},s=e?e.split(" "):[],l=[],O=!1;return{widgets:s.map((e=>e.split(",").map((e=>{if("title"===e)return O=!0,{buttonName:e};let o,s,d,u,A,f;if(o=r[e])d=e=>{o.click&&o.click.call(e.target,e,e.target)},(u=n.getCustomButtonIconClass(o))||(u=n.getIconClass(e,b))||(A=o.text),f=o.hint||o.text;else if(s=p[e]){l.push(e),d=()=>{c.changeView(e)},(A=s.buttonTextOverride)||(u=n.getIconClass(e,b))||(A=s.buttonTextDefault);let o=s.buttonTextOverride||s.buttonTextDefault;f=Ua(s.buttonTitleOverride||s.buttonTitleDefault||t.viewHint,[o,e],o)}else if(c[e])if(d=()=>{c[e]()},(A=a[e])||(u=n.getIconClass(e,b))||(A=M[e]),"prevYear"===e||"nextYear"===e){let t="prevYear"===e?"prev":"next";f=Ua(i[t]||z[t],[M.year||"year","year"],M[e])}else f=t=>Ua(i[e]||z[e],[M[t]||t,t],M[e]);return{buttonName:e,buttonClick:d,buttonIcon:u,buttonText:A,buttonHint:f}})))),viewsWithButtons:l,hasTitle:O}}class Yl{constructor(e,t,o){this.type=e,this.getCurrentData=t,this.dateEnv=o}get calendar(){return this.getCurrentData().calendarApi}get title(){return this.getCurrentData().viewTitle}get activeStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)}get activeEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)}get currentStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)}get currentEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)}getOption(e){return this.getCurrentData().options[e]}}const Ql=wl({name:"array-event-source",eventSourceDefs:[{ignoreRange:!0,parseMeta:e=>Array.isArray(e.events)?e.events:null,fetch(e,t){t({rawEvents:e.eventSource.meta})}}]}),Kl=wl({name:"func-event-source",eventSourceDefs:[{parseMeta:e=>"function"==typeof e.events?e.events:null,fetch(e,t,o){const{dateEnv:n}=e.context;!function(e,o,n){let p=!1,c=function(e){p||(p=!0,t({rawEvents:e}))},b=function(e){p||(p=!0,n(e))},r=e(c,b);r&&"function"==typeof r.then&&r.then(c,b)}(e.eventSource.meta.bind(null,Xz(e.range,n)),0,o)}}]}),Jl={method:String,extraParams:UM,startParam:String,endParam:String,timeZoneParam:String};let Zl={parseMeta:e=>!e.url||"json"!==e.format&&e.format?null:{url:e.url,format:"json",method:(e.method||"GET").toUpperCase(),extraParams:e.extraParams,startParam:e.startParam,endParam:e.endParam,timeZoneParam:e.timeZoneParam},fetch(e,t,o){const{meta:n}=e.eventSource,p=function(e,t,o){let n,p,c,b,{dateEnv:r,options:a}=o,M={};return n=e.startParam,null==n&&(n=a.startParam),p=e.endParam,null==p&&(p=a.endParam),c=e.timeZoneParam,null==c&&(c=a.timeZoneParam),b="function"==typeof e.extraParams?e.extraParams():e.extraParams||{},Object.assign(M,b),M[n]=r.formatIso(t.start),M[p]=r.formatIso(t.end),"local"!==r.timeZone&&(M[c]=r.timeZone),M}(n,e.range,e.context);(function(e,t,o){const n={method:e=e.toUpperCase()};return"GET"===e?t+=(-1===t.indexOf("?")?"?":"&")+new URLSearchParams(o):(n.body=new URLSearchParams(o),n.headers={"Content-Type":"application/x-www-form-urlencoded"}),fetch(t,n).then((e=>{if(e.ok)return e.json().then((t=>[t,e]),(()=>{throw new _z("Failure parsing JSON",e)}));throw new _z("Request failed",e)}))})(n.method,n.url,p).then((([e,o])=>{t({rawEvents:e,response:o})}),o)}};const $l={daysOfWeek:UM,startTime:Ka,endTime:Ka,duration:Ka,startRecur:UM,endRecur:UM};function eO(e,t){let o=JM(t.getCurrentData().eventSources);if(1===o.length&&1===e.length&&Array.isArray(o[0]._raw)&&Array.isArray(e[0]))return void t.dispatch({type:"RESET_RAW_EVENTS",sourceId:o[0].sourceId,rawEvents:e[0]});let n=[];for(let t of e){let e=!1;for(let n=0;nTl(e.eventSources)],propSetHandlers:{dateProfile:function(e,t){t.emitter.trigger("datesSet",Object.assign(Object.assign({},Xz(e.activeRange,t.dateEnv)),{view:t.viewApi}))},eventStore:function(e,t){let{emitter:o}=t;o.hasHandlers("eventsSet")&&o.trigger("eventsSet",Wz(e,t))}}})];class oO{constructor(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new va(this.drain.bind(this))}request(e,t){this.queue.push(e),this.delayedRunner.request(t)}pause(e){this.delayedRunner.pause(e)}resume(e,t){this.delayedRunner.resume(e,t)}drain(){let{queue:e}=this;for(;e.length;){let t,o=[];for(;t=e.shift();)this.runTask(t),o.push(t);this.drained(o)}}runTask(e){this.runTaskOption&&this.runTaskOption(e)}drained(e){this.drainedOption&&this.drainedOption(e)}}function nO(e,t,o){let n;return n=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,o.formatRange(n.start,n.end,TM(t.titleFormat||function(e){let{currentRangeUnit:t}=e;if("year"===t)return{year:"numeric"};if("month"===t)return{year:"numeric",month:"long"};let o=rM(e.currentRange.start,e.currentRange.end);return null!==o&&o>1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}class pO{constructor(e){this.computeCurrentViewData=qM(this._computeCurrentViewData),this.organizeRawLocales=qM(gl),this.buildLocale=qM(vl),this.buildPluginHooks=function(){let e,t=[],o=[];return(n,p)=>(e&&tM(n,t)&&tM(p,o)||(e=function(e,t){let o={},n={premiumReleaseDate:void 0,reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function p(e){for(let a of e){const e=a.name,M=o[e];void 0===M?(o[e]=a.id,p(a.deps),r=a,n={premiumReleaseDate:(t=(b=n).premiumReleaseDate,c=r.premiumReleaseDate,void 0===t?c:void 0===c?t:new Date(Math.max(t.valueOf(),c.valueOf()))),reducers:b.reducers.concat(r.reducers),isLoadingFuncs:b.isLoadingFuncs.concat(r.isLoadingFuncs),contextInit:b.contextInit.concat(r.contextInit),eventRefiners:Object.assign(Object.assign({},b.eventRefiners),r.eventRefiners),eventDefMemberAdders:b.eventDefMemberAdders.concat(r.eventDefMemberAdders),eventSourceRefiners:Object.assign(Object.assign({},b.eventSourceRefiners),r.eventSourceRefiners),isDraggableTransformers:b.isDraggableTransformers.concat(r.isDraggableTransformers),eventDragMutationMassagers:b.eventDragMutationMassagers.concat(r.eventDragMutationMassagers),eventDefMutationAppliers:b.eventDefMutationAppliers.concat(r.eventDefMutationAppliers),dateSelectionTransformers:b.dateSelectionTransformers.concat(r.dateSelectionTransformers),datePointTransforms:b.datePointTransforms.concat(r.datePointTransforms),dateSpanTransforms:b.dateSpanTransforms.concat(r.dateSpanTransforms),views:Object.assign(Object.assign({},b.views),r.views),viewPropsTransformers:b.viewPropsTransformers.concat(r.viewPropsTransformers),isPropsValid:r.isPropsValid||b.isPropsValid,externalDefTransforms:b.externalDefTransforms.concat(r.externalDefTransforms),viewContainerAppends:b.viewContainerAppends.concat(r.viewContainerAppends),eventDropTransformers:b.eventDropTransformers.concat(r.eventDropTransformers),calendarInteractions:b.calendarInteractions.concat(r.calendarInteractions),componentInteractions:b.componentInteractions.concat(r.componentInteractions),themeClasses:Object.assign(Object.assign({},b.themeClasses),r.themeClasses),eventSourceDefs:b.eventSourceDefs.concat(r.eventSourceDefs),cmdFormatter:r.cmdFormatter||b.cmdFormatter,recurringTypes:b.recurringTypes.concat(r.recurringTypes),namedTimeZonedImpl:r.namedTimeZonedImpl||b.namedTimeZonedImpl,initialView:b.initialView||r.initialView,elementDraggingImpl:b.elementDraggingImpl||r.elementDraggingImpl,optionChangeHandlers:Object.assign(Object.assign({},b.optionChangeHandlers),r.optionChangeHandlers),scrollGridImpl:r.scrollGridImpl||b.scrollGridImpl,listenerRefiners:Object.assign(Object.assign({},b.listenerRefiners),r.listenerRefiners),optionRefiners:Object.assign(Object.assign({},b.optionRefiners),r.optionRefiners),propSetHandlers:Object.assign(Object.assign({},b.propSetHandlers),r.propSetHandlers)}):M!==a.id&&console.warn(`Duplicate plugin '${e}'`)}var t,c,b,r}return e&&p(e),p(t),n}(n,p)),t=n,o=p,e)}(),this.buildDateEnv=qM(cO),this.buildTheme=qM(bO),this.parseToolbars=qM(Ul),this.buildViewSpecs=qM(Cl),this.buildDateProfileGenerator=WM(rO),this.buildViewApi=qM(aO),this.buildViewUiProps=WM(zO),this.buildEventUiBySource=qM(MO,ZM),this.buildEventUiBases=qM(iO),this.parseContextBusinessHours=WM(lO),this.buildTitle=qM(nO),this.emitter=new Mz,this.actionRunner=new oO(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.optionsForRefining=[],this.optionsForHandling=[],this.getCurrentData=()=>this.data,this.dispatch=e=>{this.actionRunner.request(e)},this.props=e,this.actionRunner.pause();let t={},o=this.computeOptionsData(e.optionOverrides,t,e.calendarApi),n=o.calendarOptions.initialView||o.pluginHooks.initialView,p=this.computeCurrentViewData(n,o,e.optionOverrides,t);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(p.options);let c=function(e,t){let o=e.initialDate;return null!=o?t.createMarker(o):Ti(e.now,t)}(o.calendarOptions,o.dateEnv),b=p.dateProfileGenerator.build(c);Bi(b.activeRange,c)||(c=b.currentRange.start);let r={dateEnv:o.dateEnv,options:o.calendarOptions,pluginHooks:o.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData};for(let e of o.pluginHooks.contextInit)e(r);let a=function(e,t,o){let n=t?t.activeRange:null;return Xl({},function(e,t){let o=pz(t),n=[].concat(e.eventSources||[]),p=[];e.initialEvents&&n.unshift(e.initialEvents),e.events&&n.unshift(e.events);for(let e of n){let n=nz(e,t,o);n&&p.push(n)}return p}(e,o),n,o)}(o.calendarOptions,b,r),M={dynamicOptionOverrides:t,currentViewType:n,currentDate:c,dateProfile:b,businessHours:this.parseContextBusinessHours(r),eventSources:a,eventUiBases:{},eventStore:{defs:{},instances:{}},renderableEventStore:{defs:{},instances:{}},dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(r).selectionConfig},i=Object.assign(Object.assign({},r),M);for(let e of o.pluginHooks.reducers)Object.assign(M,e(null,null,i));sO(M,r)&&this.emitter.trigger("loading",!0),this.state=M,this.updateData(),this.actionRunner.resume()}resetOptions(e,t){let{props:o}=this;void 0===t?o.optionOverrides=e:(o.optionOverrides=Object.assign(Object.assign({},o.optionOverrides||{}),e),this.optionsForRefining.push(...t)),(void 0===t||t.length)&&this.actionRunner.request({type:"NOTHING"})}_handleAction(e){let{props:t,state:o,emitter:n}=this,p=function(e,t){return"SET_OPTION"===t.type?Object.assign(Object.assign({},e),{[t.optionName]:t.rawOptionValue}):e}(o.dynamicOptionOverrides,e),c=this.computeOptionsData(t.optionOverrides,p,t.calendarApi),b=function(e,t){return"CHANGE_VIEW_TYPE"===t.type&&(e=t.viewType),e}(o.currentViewType,e),r=this.computeCurrentViewData(b,c,t.optionOverrides,p);t.calendarApi.currentDataManager=this,n.setThisContext(t.calendarApi),n.setOptions(r.options);let a={dateEnv:c.dateEnv,options:c.calendarOptions,pluginHooks:c.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:n,getCurrentData:this.getCurrentData},{currentDate:M,dateProfile:i}=o;this.data&&this.data.dateProfileGenerator!==r.dateProfileGenerator&&(i=r.dateProfileGenerator.build(M)),M=function(e,t){return"CHANGE_DATE"===t.type?t.dateMarker:e}(M,e),i=function(e,t,o,n){let p;switch(t.type){case"CHANGE_VIEW_TYPE":return n.build(t.dateMarker||o);case"CHANGE_DATE":return n.build(t.dateMarker);case"PREV":if(p=n.buildPrev(e,o),p.isValid)return p;break;case"NEXT":if(p=n.buildNext(e,o),p.isValid)return p}return e}(i,e,M,r.dateProfileGenerator),"PREV"!==e.type&&"NEXT"!==e.type&&Bi(i.currentRange,M)||(M=i.currentRange.start);let z=function(e,t,o,n){let p=o?o.activeRange:null;switch(t.type){case"ADD_EVENT_SOURCES":return Xl(e,t.sources,p,n);case"REMOVE_EVENT_SOURCE":return c=e,b=t.sourceId,YM(c,(e=>e.sourceId!==b));case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return o?kl(e,p,n):e;case"FETCH_EVENT_SOURCES":return _l(e,t.sourceIds?KM(t.sourceIds):Dl(e,n),p,t.isRefetch||!1,n);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return function(e,t,o,n){let p=e[t];return p&&o===p.latestFetchId?Object.assign(Object.assign({},e),{[t]:Object.assign(Object.assign({},p),{isFetching:!1,fetchRange:n})}):e}(e,t.sourceId,t.fetchId,t.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return e}var c,b}(o.eventSources,e,i,a),s=function(e,t,o,n,p){switch(t.type){case"RECEIVE_EVENTS":return function(e,t,o,n,p,c){if(t&&o===t.latestFetchId){let o=Vi(cz(p,t,c),t,c);return n&&(o=_i(o,n,c)),Qi(az(e,t.sourceId),o)}return e}(e,o[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,p);case"RESET_RAW_EVENTS":return function(e,t,o,n,p){const{defIdMap:c,instanceIdMap:b}=function(e){const{defs:t,instances:o}=e,n={},p={};for(let e in t){const o=t[e],{publicId:p}=o;p&&(n[p]=e)}for(let e in o){const n=t[o[e].defId],{publicId:c}=n;c&&(p[c]=e)}return{defIdMap:n,instanceIdMap:p}}(e);return _i(Vi(cz(o,t,p),t,p,!1,c,b),n,p)}(e,o[t.sourceId],t.rawEvents,n.activeRange,p);case"ADD_EVENTS":return function(e,t,o,n){return o&&(t=_i(t,o,n)),Qi(e,t)}(e,t.eventStore,n?n.activeRange:null,p);case"RESET_EVENTS":return t.eventStore;case"MERGE_EVENTS":return Qi(e,t.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?_i(e,n.activeRange,p):e;case"REMOVE_EVENTS":return function(e,t){let{defs:o,instances:n}=e,p={},c={};for(let e in o)t.defs[e]||(p[e]=o[e]);for(let e in n)!t.instances[e]&&p[n[e].defId]&&(c[e]=n[e]);return{defs:p,instances:c}}(e,t.eventStore);case"REMOVE_EVENT_SOURCE":return az(e,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return Ki(e,(e=>!e.sourceId));case"REMOVE_ALL_EVENTS":return{defs:{},instances:{}};default:return e}}(o.eventStore,e,z,i,a),l=Tl(z)&&!r.options.progressiveEventRendering&&o.renderableEventStore||s,{eventUiSingleBase:O,selectionConfig:d}=this.buildViewUiProps(a),u=this.buildEventUiBySource(z),A={dynamicOptionOverrides:p,currentViewType:b,currentDate:M,dateProfile:i,eventSources:z,eventStore:s,renderableEventStore:l,selectionConfig:d,eventUiBases:this.buildEventUiBases(l.defs,O,u),businessHours:this.parseContextBusinessHours(a),dateSelection:Il(o.dateSelection,e),eventSelection:jl(o.eventSelection,e),eventDrag:Hl(o.eventDrag,e),eventResize:Fl(o.eventResize,e)},f=Object.assign(Object.assign({},a),A);for(let t of c.pluginHooks.reducers)Object.assign(A,t(o,e,f));let q=sO(o,a),W=sO(A,a);!q&&W?n.trigger("loading",!0):q&&!W&&n.trigger("loading",!1),this.state=A,t.onAction&&t.onAction(e)}updateData(){let{props:e,state:t}=this,o=this.data,n=this.computeOptionsData(e.optionOverrides,t.dynamicOptionOverrides,e.calendarApi),p=this.computeCurrentViewData(t.currentViewType,n,e.optionOverrides,t.dynamicOptionOverrides),c=this.data=Object.assign(Object.assign(Object.assign({viewTitle:this.buildTitle(t.dateProfile,p.options,n.dateEnv),calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},n),p),t),b=n.pluginHooks.optionChangeHandlers,r=o&&o.calendarOptions,a=n.calendarOptions;if(r&&r!==a){r.timeZone!==a.timeZone&&(t.eventSources=c.eventSources=function(e,t,o){let n=t?t.activeRange:null;return _l(e,Dl(e,o),n,!0,o)}(c.eventSources,t.dateProfile,c),t.eventStore=c.eventStore=rz(c.eventStore,o.dateEnv,c.dateEnv),t.renderableEventStore=c.renderableEventStore=rz(c.renderableEventStore,o.dateEnv,c.dateEnv));for(let e in b)-1===this.optionsForHandling.indexOf(e)&&r[e]===a[e]||b[e](a[e],c)}this.optionsForHandling=[],e.onData&&e.onData(c)}computeOptionsData(e,t,o){if(!this.optionsForRefining.length&&e===this.stableOptionOverrides&&t===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:n,pluginHooks:p,localeDefaults:c,availableLocaleData:b,extra:r}=this.processRawCalendarOptions(e,t);OO(r);let a=this.buildDateEnv(n.timeZone,n.locale,n.weekNumberCalculation,n.firstDay,n.weekText,p,b,n.defaultRangeSeparator),M=this.buildViewSpecs(p.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides,c),i=this.buildTheme(n,p),z=this.parseToolbars(n,this.stableOptionOverrides,i,M,o);return this.stableCalendarOptionsData={calendarOptions:n,pluginHooks:p,dateEnv:a,viewSpecs:M,theme:i,toolbarConfig:z,localeDefaults:c,availableRawLocales:b.map}}processRawCalendarOptions(e,t){let{locales:o,locale:n}=HM([kM,e,t]),p=this.organizeRawLocales(o),c=p.map,b=this.buildLocale(n||p.defaultCode,c).options,r=this.buildPluginHooks(e.plugins||[],tO),a=this.currentCalendarOptionsRefiners=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},XM),_M),xM),r.listenerRefiners),r.optionRefiners),M={},i=HM([kM,b,e,t]),z={},s=this.currentCalendarOptionsInput,l=this.currentCalendarOptionsRefined,O=!1;for(let e in i)-1===this.optionsForRefining.indexOf(e)&&(i[e]===s[e]||DM[e]&&e in s&&DM[e](s[e],i[e]))?z[e]=l[e]:a[e]?(z[e]=a[e](i[e]),O=!0):M[e]=s[e];return O&&(this.currentCalendarOptionsInput=i,this.currentCalendarOptionsRefined=z,this.stableOptionOverrides=e,this.stableDynamicOptionOverrides=t),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:r,availableLocaleData:p,localeDefaults:b,extra:M}}_computeCurrentViewData(e,t,o,n){let p=t.viewSpecs[e];if(!p)throw new Error(`viewType "${e}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:c,extra:b}=this.processRawViewOptions(p,t.pluginHooks,t.localeDefaults,o,n);return OO(b),{viewSpec:p,options:c,dateProfileGenerator:this.buildDateProfileGenerator({dateProfileGeneratorClass:p.optionDefaults.dateProfileGeneratorClass,duration:p.duration,durationUnit:p.durationUnit,usesMinMaxTime:p.optionDefaults.usesMinMaxTime,dateEnv:t.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:c.slotMinTime,slotMaxTime:c.slotMaxTime,showNonCurrentDates:c.showNonCurrentDates,dayCount:c.dayCount,dateAlignment:c.dateAlignment,dateIncrement:c.dateIncrement,hiddenDays:c.hiddenDays,weekends:c.weekends,nowInput:c.now,validRangeInput:c.validRange,visibleRangeInput:c.visibleRange,fixedWeekCount:c.fixedWeekCount}),viewApi:this.buildViewApi(e,this.getCurrentData,t.dateEnv)}}processRawViewOptions(e,t,o,n,p){let c=HM([kM,e.optionDefaults,o,n,e.optionOverrides,p]),b=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},XM),_M),xM),jM),t.listenerRefiners),t.optionRefiners),r={},a=this.currentViewOptionsInput,M=this.currentViewOptionsRefined,i=!1,z={};for(let e in c)c[e]===a[e]||DM[e]&&DM[e](c[e],a[e])?r[e]=M[e]:(c[e]===this.currentCalendarOptionsInput[e]||DM[e]&&DM[e](c[e],this.currentCalendarOptionsInput[e])?e in this.currentCalendarOptionsRefined&&(r[e]=this.currentCalendarOptionsRefined[e]):b[e]?r[e]=b[e](c[e]):z[e]=c[e],i=!0);return i&&(this.currentViewOptionsInput=c,this.currentViewOptionsRefined=r),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:z}}}function cO(e,t,o,n,p,c,b,r){let a=vl(t||b.defaultCode,b.map);return new ci({calendarSystem:"gregory",timeZone:e,namedTimeZoneImpl:c.namedTimeZonedImpl,locale:a,weekNumberCalculation:o,firstDay:n,weekText:p,cmdFormatter:c.cmdFormatter,defaultSeparator:r})}function bO(e,t){return new(t.themeClasses[e.themeSystem]||yl)(e)}function rO(e){return new(e.dateProfileGeneratorClass||Xi)(e)}function aO(e,t,o){return new Yl(e,t,o)}function MO(e){return QM(e,(e=>e.ui))}function iO(e,t,o){let n={"":t};for(let t in e){let p=e[t];p.sourceId&&o[p.sourceId]&&(n[t]=o[p.sourceId])}return n}function zO(e){let{options:t}=e;return{eventUiSingleBase:ez({display:t.eventDisplay,editable:t.editable,startEditable:t.eventStartEditable,durationEditable:t.eventDurationEditable,constraint:t.eventConstraint,overlap:"boolean"==typeof t.eventOverlap?t.eventOverlap:void 0,allow:t.eventAllow,backgroundColor:t.eventBackgroundColor,borderColor:t.eventBorderColor,textColor:t.eventTextColor,color:t.eventColor},e),selectionConfig:ez({constraint:t.selectConstraint,overlap:"boolean"==typeof t.selectOverlap?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function sO(e,t){for(let o of t.pluginHooks.isLoadingFuncs)if(o(e))return!0;return!1}function lO(e){return t=e.options.businessHours,o=e,Vi(function(e){let t;return t=!0===e?[{}]:Array.isArray(e)?e.filter((e=>e.daysOfWeek)):"object"==typeof e&&e?[e]:[],t=t.map((e=>Object.assign(Object.assign({},iz),e))),t}(t),null,o);var t,o}function OO(e,t){for(let o in e)console.warn(`Unknown option '${o}'`+(t?` for view '${t}'`:""))}class dO extends Oi{render(){return ar("div",{className:"fc-toolbar-chunk"},...this.props.widgetGroups.map((e=>this.renderWidgetGroup(e))))}renderWidgetGroup(e){let{props:t}=this,{theme:o}=this.context,n=[],p=!0;for(let c of e){let{buttonName:e,buttonClick:b,buttonText:r,buttonIcon:a,buttonHint:M}=c;if("title"===e)p=!1,n.push(ar("h2",{className:"fc-toolbar-title",id:t.titleId},t.title));else{let p=e===t.activeButton,c=!t.isTodayEnabled&&"today"===e||!t.isPrevEnabled&&"prev"===e||!t.isNextEnabled&&"next"===e,i=[`fc-${e}-button`,o.getClass("button")];p&&i.push(o.getClass("buttonActive")),n.push(ar("button",{type:"button",title:"function"==typeof M?M(t.navUnit):M,disabled:c,"aria-pressed":p,className:i.join(" "),onClick:b},r||(a?ar("span",{className:a,role:"img"}):"")))}}return n.length>1?ar("div",{className:p&&o.getClass("buttonGroup")||""},...n):n[0]}}class uO extends Oi{render(){let e,t,{model:o,extraClassName:n}=this.props,p=!1,c=o.sectionWidgets,b=c.center;return c.left?(p=!0,e=c.left):e=c.start,c.right?(p=!0,t=c.right):t=c.end,ar("div",{className:[n||"","fc-toolbar",p?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",e||[]),this.renderSection("center",b||[]),this.renderSection("end",t||[]))}renderSection(e,t){let{props:o}=this;return ar(dO,{key:e,widgetGroups:t,title:o.title,navUnit:o.navUnit,activeButton:o.activeButton,isTodayEnabled:o.isTodayEnabled,isPrevEnabled:o.isPrevEnabled,isNextEnabled:o.isNextEnabled,titleId:o.titleId})}}class AO extends Oi{constructor(){super(...arguments),this.state={availableWidth:null},this.handleEl=e=>{this.el=e,di(this.props.elRef,e),this.updateAvailableWidth()},this.handleResize=()=>{this.updateAvailableWidth()}}render(){let{props:e,state:t}=this,{aspectRatio:o}=e,n=["fc-view-harness",o||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],p="",c="";return o?null!==t.availableWidth?p=t.availableWidth/o:c=1/o*100+"%":p=e.height||"",ar("div",{"aria-labelledby":e.labeledById,ref:this.handleEl,className:n.join(" "),style:{height:p,paddingBottom:c}},e.children)}componentDidMount(){this.context.addResizeHandler(this.handleResize)}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateAvailableWidth(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})}}class fO extends Iz{constructor(e){super(e),this.handleSegClick=(e,t)=>{let{component:o}=this,{context:n}=o,p=gz(t);if(p&&o.isValidSegDownEl(e.target)){let c=wa(e.target,".fc-event-forced-url"),b=c?c.querySelector("a[href]").href:"";n.emitter.trigger("eventClick",{el:t,event:new fz(o.context,p.eventRange.def,p.eventRange.instance),jsEvent:e,view:n.viewApi}),b&&!e.defaultPrevented&&(window.location.href=b)}},this.destroy=Xa(e.el,"click",".fc-event",this.handleSegClick)}}class qO extends Iz{constructor(e){super(e),this.handleEventElRemove=e=>{e===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(e,t)=>{gz(t)&&(this.currentSegEl=t,this.triggerEvent("eventMouseEnter",e,t))},this.handleSegLeave=(e,t)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent("eventMouseLeave",e,t))},this.removeHoverListeners=function(e,t,o,n){let p;return Xa(e,"mouseover",".fc-event",((e,t)=>{if(t!==p){p=t,o(e,t);let c=e=>{p=null,n(e,t),t.removeEventListener("mouseleave",c)};t.addEventListener("mouseleave",c)}}))}(e.el,0,this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(e,t,o){let{component:n}=this,{context:p}=n,c=gz(o);t&&!n.isValidSegDownEl(t.target)||p.emitter.trigger(e,{el:o,event:new fz(p,c.eventRange.def,c.eventRange.instance),jsEvent:t,view:p.viewApi})}}class WO extends li{constructor(){super(...arguments),this.buildViewContext=qM(si),this.buildViewPropTransformers=qM(hO),this.buildToolbarProps=qM(mO),this.headerRef={current:null},this.footerRef={current:null},this.interactionsStore={},this.state={viewLabelId:Sa()},this.registerInteractiveComponent=(e,t)=>{let o=function(e,t){return{component:e,el:t.el,useEventCenter:null==t.useEventCenter||t.useEventCenter,isHitComboAllowed:t.isHitComboAllowed||null}}(e,t),n=[fO,qO].concat(this.props.pluginHooks.componentInteractions).map((e=>new e(o)));this.interactionsStore[e.uid]=n,Hz[e.uid]=o},this.unregisterInteractiveComponent=e=>{let t=this.interactionsStore[e.uid];if(t){for(let e of t)e.destroy();delete this.interactionsStore[e.uid]}delete Hz[e.uid]},this.resizeRunner=new va((()=>{this.props.emitter.trigger("_resize",!0),this.props.emitter.trigger("windowResize",{view:this.props.viewApi})})),this.handleWindowResize=e=>{let{options:t}=this.props;t.handleWindowResize&&e.target===window&&this.resizeRunner.request(t.windowResizeDelay)}}render(){let e,{props:t}=this,{toolbarConfig:o,options:n}=t,p=this.buildToolbarProps(t.viewSpec,t.dateProfile,t.dateProfileGenerator,t.currentDate,Ti(t.options.now,t.dateEnv),t.viewTitle),c=!1,b="";t.isHeightAuto||t.forPrint?b="":null!=n.height?c=!0:null!=n.contentHeight?b=n.contentHeight:e=Math.max(n.aspectRatio,.5);let r=this.buildViewContext(t.viewSpec,t.viewApi,t.options,t.dateProfileGenerator,t.dateEnv,t.theme,t.pluginHooks,t.dispatch,t.getCurrentData,t.emitter,t.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),a=o.header&&o.header.hasTitle?this.state.viewLabelId:void 0;return ar(zi.Provider,{value:r},o.header&&ar(uO,Object.assign({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:o.header,titleId:a},p)),ar(AO,{liquid:c,height:b,aspectRatio:e,labeledById:a},this.renderView(t),this.buildAppendContent()),o.footer&&ar(uO,Object.assign({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:o.footer,titleId:""},p)))}componentDidMount(){let{props:e}=this;this.calendarInteractions=e.pluginHooks.calendarInteractions.map((t=>new t(e))),window.addEventListener("resize",this.handleWindowResize);let{propSetHandlers:t}=e.pluginHooks;for(let o in t)t[o](e[o],e)}componentDidUpdate(e){let{props:t}=this,{propSetHandlers:o}=t.pluginHooks;for(let n in o)t[n]!==e[n]&&o[n](t[n],t)}componentWillUnmount(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(let e of this.calendarInteractions)e.destroy();this.props.emitter.trigger("_unmount")}buildAppendContent(){let{props:e}=this;return ar(ir,{},...e.pluginHooks.viewContainerAppends.map((t=>t(e))))}renderView(e){let{pluginHooks:t}=e,{viewSpec:o}=e,n={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},p=this.buildViewPropTransformers(t.viewPropsTransformers);for(let t of p)Object.assign(n,t.transform(n,e));return ar(o.component,Object.assign({},n))}}function mO(e,t,o,n,p,c){let b=o.build(p,void 0,!1),r=o.buildPrev(t,n,!1),a=o.buildNext(t,n,!1);return{title:c,activeButton:e.type,navUnit:e.singleUnit,isTodayEnabled:b.isValid&&!Bi(t.currentRange,p),isPrevEnabled:r.isValid,isNextEnabled:a.isValid}}function hO(e){return e.map((e=>new e))}class gO extends Fz{constructor(e,t={}){super(),this.isRendering=!1,this.isRendered=!1,this.currentClassNames=[],this.customContentRenderId=0,this.handleAction=e=>{switch(e.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":this.renderRunner.tryDrain()}},this.handleData=e=>{this.currentData=e,this.renderRunner.request(e.calendarOptions.rerenderDelay)},this.handleRenderRequest=()=>{if(this.isRendering){this.isRendered=!0;let{currentData:e}=this;ri((()=>{Cr(ar(Pz,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},((t,o,n,p)=>(this.setClassNames(t),this.setHeight(o),ar(Wi.Provider,{value:this.customContentRenderId},ar(WO,Object.assign({isHeightAuto:n,forPrint:p},e)))))),this.el)}))}else this.isRendered&&(this.isRendered=!1,Cr(null,this.el),this.setClassNames([]),this.setHeight(""))},function(e){e.isConnected&&e.getRootNode&&ma(e.getRootNode())}(e),this.el=e,this.renderRunner=new va(this.handleRenderRequest),new pO({optionOverrides:t,calendarApi:this,onAction:this.handleAction,onData:this.handleData})}render(){let e=this.isRendering;e?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()}destroy(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())}updateSize(){ri((()=>{super.updateSize()}))}batchRendering(e){this.renderRunner.pause("batchRendering"),e(),this.renderRunner.resume("batchRendering")}pauseRendering(){this.renderRunner.pause("pauseRendering")}resumeRendering(){this.renderRunner.resume("pauseRendering",!0)}resetOptions(e,t){this.currentDataManager.resetOptions(e,t)}setClassNames(e){if(!tM(e,this.currentClassNames)){let{classList:t}=this.el;for(let e of this.currentClassNames)t.remove(e);for(let o of e)t.add(o);this.currentClassNames=e}}setHeight(e){Ba(this.el,"height",e)}}class vO extends Ms{constructor(){super(...arguments),this.headerElRef={current:null}}renderSimpleLayout(e,t){let{props:o,context:n}=this,p=[],c=Ks(n.options);return e&&p.push({type:"header",key:"header",isSticky:c,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),p.push({type:"body",key:"body",liquid:!0,chunk:{content:t}}),ar(gi,{elClasses:["fc-daygrid"],viewSpec:n.viewSpec},ar(Js,{liquid:!o.isHeightAuto&&!o.forPrint,collapsibleWidth:o.forPrint,cols:[],sections:p}))}renderHScrollLayout(e,t,o,n){let p=this.context.pluginHooks.scrollGridImpl;if(!p)throw new Error("No ScrollGrid implementation");let{props:c,context:b}=this,r=!c.forPrint&&Ks(b.options),a=!c.forPrint&&function(e){let{stickyFooterScrollbar:t}=e;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}(b.options),M=[];return e&&M.push({type:"header",key:"header",isSticky:r,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),M.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:t}]}),a&&M.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:Qs}]}),ar(gi,{elClasses:["fc-daygrid"],viewSpec:b.viewSpec},ar(p,{liquid:!c.isHeightAuto&&!c.forPrint,forPrint:c.forPrint,collapsibleWidth:c.forPrint,colGroups:[{cols:[{span:o,minWidth:n}]}],sections:M}))}}function RO(e,t){let o=[];for(let e=0;e{let o=(e.eventDrag?e.eventDrag.affectedInstances:null)||(e.eventResize?e.eventResize.affectedInstances:null)||{};return ar(ir,null,t.map((t=>{let n=t.eventRange.instance.instanceId;return ar("div",{className:"fc-daygrid-event-harness",key:n,style:{visibility:o[n]?"hidden":""}},NO(t)?ar(EO,Object.assign({seg:t,isDragging:!1,isSelected:n===e.eventSelection,defaultDisplayEventEnd:!1},Ez(t,e.todayRange))):ar(BO,Object.assign({seg:t,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:n===e.eventSelection,defaultDisplayEventEnd:!1},Ez(t,e.todayRange))))})))}})}}function TO(e){let t=[],o=[];for(let n of e)t.push(n.seg),n.isVisible||o.push(n.seg);return{allSegs:t,invisibleSegs:o}}const XO=TM({week:"narrow"});class kO extends Ms{constructor(){super(...arguments),this.rootElRef={current:null},this.state={dayNumberId:Sa()},this.handleRootEl=e=>{di(this.rootElRef,e),di(this.props.elRef,e)}}render(){let{context:e,props:t,state:o,rootElRef:n}=this,{options:p,dateEnv:c}=e,{date:b,dateProfile:r}=t;const a=t.showDayNumber&&function(e,t,o){const{start:n,end:p}=t,c=cM(p,-1),b=o.getYear(n),r=o.getMonth(n),a=o.getYear(c),M=o.getMonth(c);return!(b===a&&r===M)&&Boolean(e.valueOf()===n.valueOf()||1===o.getDay(e)&&e.valueOf()ar("div",{ref:t.innerElRef,className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",style:{minHeight:t.minHeight}},t.showWeekNumber&&ar(al,{elTag:"a",elClasses:["fc-daygrid-week-number"],elAttrs:Jz(e,b,"week"),date:b,defaultFormat:XO}),!r.isDisabled&&(t.showDayNumber||nl(p)||t.forceDayTop)?ar("div",{className:"fc-daygrid-day-top"},ar(c,{elTag:"a",elClasses:["fc-daygrid-day-number",a&&"fc-daygrid-month-start"],elAttrs:Object.assign(Object.assign({},Jz(e,b)),{id:o.dayNumberId})})):t.showDayNumber?ar("div",{className:"fc-daygrid-day-top",style:{visibility:"hidden"}},ar("a",{className:"fc-daygrid-day-number"}," ")):void 0,ar("div",{className:"fc-daygrid-day-events",ref:t.fgContentElRef},t.fgContent,ar("div",{className:"fc-daygrid-day-bottom",style:{marginTop:t.moreMarginTop}},ar(SO,{allDayDate:b,singlePlacements:t.singlePlacements,moreCnt:t.moreCnt,alignmentElRef:n,alignGridTop:!t.showDayNumber,extraDateSpan:t.extraDateSpan,dateProfile:t.dateProfile,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,todayRange:t.todayRange}))),ar("div",{className:"fc-daygrid-day-bg"},t.bgContent))))}}function _O(e){return e.dayNumberText||ar(ir,null," ")}function xO(e){return e.eventRange.instance.instanceId+":"+e.firstCol}function DO(e){return xO(e)+":"+e.lastCol}function PO(e,t,o,n){if(e.firstCol===t&&e.lastCol===o-1)return e;let p=e.eventRange,c=p.range,b=yi(c,{start:n[t].date,end:pM(n[o-1].date,1)});return Object.assign(Object.assign({},e),{firstCol:t,lastCol:o-1,eventRange:{def:p.def,ui:Object.assign(Object.assign({},p.ui),{durationEditable:!1}),instance:p.instance,range:b},isStart:e.isStart&&b.start.valueOf()===c.start.valueOf(),isEnd:e.isEnd&&b.end.valueOf()===c.end.valueOf()})}class IO extends zs{constructor(){super(...arguments),this.hiddenConsumes=!1,this.forceHidden={}}addSegs(e){const t=super.addSegs(e),{entriesByLevel:o}=this,n=e=>!this.forceHidden[ls(e)];for(let e=0;e{e&&this.updateSizing(!0)}}render(){let{props:e,state:t,context:o}=this,{options:n}=o,p=e.cells.length,c=wO(e.businessHourSegs,p),b=wO(e.bgEventSegs,p),r=wO(this.getHighlightSegs(),p),a=wO(this.getMirrorSegs(),p),{singleColPlacements:M,multiColPlacements:i,moreCnts:z,moreMarginTops:s}=function(e,t,o,n,p,c,b){let r=new IO((t=>{let o=e[t.index].eventRange.instance.instanceId+":"+t.span.start+":"+(t.span.end-1);return p[o]||1}));r.allowReslicing=!0,r.strictOrder=n,!0===t||!0===o?(r.maxCoord=c,r.hiddenConsumes=!0):"number"==typeof t?r.maxStackCnt=t:"number"==typeof o&&(r.maxStackCnt=o,r.hiddenConsumes=!0);let a=[],M=[];for(let t=0;t1,b=n.span.start===e;i+=n.levelCoord-M,M=n.levelCoord+n.thickness,c?(i+=n.thickness,b&&z.push({seg:PO(p,n.span.start,n.span.end,o),isVisible:!0,isAbsolute:!0,absoluteTop:n.levelCoord,marginTop:0})):b&&(z.push({seg:PO(p,n.span.start,n.span.end,o),isVisible:!0,isAbsolute:!1,absoluteTop:n.levelCoord,marginTop:i}),i=0)}p.push(a),c.push(z),b.push(i)}return{singleColPlacements:p,multiColPlacements:c,leftoverMargins:b}}(z,e,b),d=[],u=[];for(let e of M){l[e.firstCol].push({seg:e,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let t=e.firstCol;t<=e.lastCol;t+=1)s[t].push({seg:PO(e,t,t+1,b),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let e=0;efunction(e,t,o){let n,p;for(n=0;ne._seg))}(e.fgEventSegs,n.eventOrder),e.dayMaxEvents,e.dayMaxEventRows,n.eventOrderStrict,t.segHeights,t.maxContentHeight,e.cells),l=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{};return ar("tr",{ref:this.rootElRef,role:"row"},e.renderIntro&&e.renderIntro(),e.cells.map(((t,o)=>{let n=this.renderFgSegs(o,e.forPrint?M[o]:i[o],e.todayRange,l),p=this.renderFgSegs(o,function(e,t){if(!e.length)return[];let o=function(e){let t={};for(let o of e)for(let e of o)t[e.seg.eventRange.instance.instanceId]=e.absoluteTop;return t}(t);return e.map((e=>({seg:e,isVisible:!0,isAbsolute:!0,absoluteTop:o[e.eventRange.instance.instanceId],marginTop:0})))}(a[o],i),e.todayRange,{},Boolean(e.eventDrag),Boolean(e.eventResize),!1);return ar(kO,{key:t.key,elRef:this.cellElRefs.createRef(t.key),innerElRef:this.frameElRefs.createRef(t.key),dateProfile:e.dateProfile,date:t.date,showDayNumber:e.showDayNumbers,showWeekNumber:e.showWeekNumbers&&0===o,forceDayTop:e.showWeekNumbers,todayRange:e.todayRange,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,extraRenderProps:t.extraRenderProps,extraDataAttrs:t.extraDataAttrs,extraClassNames:t.extraClassNames,extraDateSpan:t.extraDateSpan,moreCnt:z[o],moreMarginTop:s[o],singlePlacements:M[o],fgContentElRef:this.fgElRefs.createRef(t.key),fgContent:ar(ir,null,ar(ir,null,n),ar(ir,null,p)),bgContent:ar(ir,null,this.renderFillSegs(r[o],"highlight"),this.renderFillSegs(c[o],"non-business"),this.renderFillSegs(b[o],"bg-event")),minHeight:e.cellMinHeight})})))}componentDidMount(){this.updateSizing(!0),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(e,t){let o=this.props;this.updateSizing(!ZM(e,o))}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}getHighlightSegs(){let{props:e}=this;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs}getMirrorSegs(){let{props:e}=this;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]}renderFgSegs(e,t,o,n,p,c,b){let{context:r}=this,{eventSelection:a}=this.props,{framePositions:M}=this.state,i=1===this.props.cells.length,z=p||c||b,s=[];if(M)for(let e of t){let{seg:t}=e,{instanceId:l}=t.eventRange.instance,O=e.isVisible&&!n[l],d=e.isAbsolute,u="",A="";d&&(r.isRtl?(A=0,u=M.lefts[t.lastCol]-M.lefts[t.firstCol]):(u=0,A=M.rights[t.firstCol]-M.rights[t.lastCol])),s.push(ar("div",{className:"fc-daygrid-event-harness"+(d?" fc-daygrid-event-harness-abs":""),key:xO(t),ref:z?null:this.segHarnessRefs.createRef(DO(t)),style:{visibility:O?"":"hidden",marginTop:d?"":e.marginTop,top:d?e.absoluteTop:"",left:u,right:A}},NO(t)?ar(EO,Object.assign({seg:t,isDragging:p,isSelected:l===a,defaultDisplayEventEnd:i},Ez(t,o))):ar(BO,Object.assign({seg:t,isDragging:p,isResizing:c,isDateSelecting:b,isSelected:l===a,defaultDisplayEventEnd:i},Ez(t,o)))))}return s}renderFillSegs(e,t){let{isRtl:o}=this.context,{todayRange:n}=this.props,{framePositions:p}=this.state,c=[];if(p)for(let r of e){let e=o?{right:0,left:p.lefts[r.lastCol]-p.lefts[r.firstCol]}:{left:0,right:p.rights[r.firstCol]-p.rights[r.lastCol]};c.push(ar("div",{key:(b=r.eventRange,b.instance?b.instance.instanceId:`${b.def.defId}:${b.range.start.toISOString()}`),className:"fc-daygrid-bg-harness",style:e},"bg-event"===t?ar(cl,Object.assign({seg:r},Ez(r,n))):rl(t)))}var b;return ar(ir,{},...c)}updateSizing(e){let{props:t,state:o,frameElRefs:n}=this;if(!t.forPrint&&null!==t.clientWidth){if(e){let e=t.cells.map((e=>n.currentMap[e.key]));if(e.length){let t=this.rootElRef.current,n=new ps(t,e,!0,!1);o.framePositions&&o.framePositions.similarTo(n)||this.setState({framePositions:new ps(t,e,!0,!1)})}}const p=this.state.segHeights,c=this.querySegHeights(),b=!0===t.dayMaxEvents||!0===t.dayMaxEventRows;this.safeSetState({segHeights:Object.assign(Object.assign({},p),c),maxContentHeight:b?this.computeMaxContentHeight():null})}}querySegHeights(){let e=this.segHarnessRefs.currentMap,t={};for(let o in e){let n=Math.round(e[o].getBoundingClientRect().height);t[o]=Math.max(t[o]||0,n)}return t}computeMaxContentHeight(){let e=this.props.cells[0].key,t=this.cellElRefs.currentMap[e],o=this.fgElRefs.currentMap[e];return t.getBoundingClientRect().bottom-o.getBoundingClientRect().top}getCellEls(){let e=this.cellElRefs.currentMap;return this.props.cells.map((t=>e[t.key]))}}jO.addStateEquality({segHeights:ZM});class HO extends Ms{constructor(){super(...arguments),this.splitBusinessHourSegs=qM(RO),this.splitBgEventSegs=qM(RO),this.splitFgEventSegs=qM(RO),this.splitDateSelectionSegs=qM(RO),this.splitEventDrag=qM(yO),this.splitEventResize=qM(yO),this.rowRefs=new Hs}render(){let{props:e,context:t}=this,o=e.cells.length,n=this.splitBusinessHourSegs(e.businessHourSegs,o),p=this.splitBgEventSegs(e.bgEventSegs,o),c=this.splitFgEventSegs(e.fgEventSegs,o),b=this.splitDateSelectionSegs(e.dateSelectionSegs,o),r=this.splitEventDrag(e.eventDrag,o),a=this.splitEventResize(e.eventResize,o),M=o>=7&&e.clientWidth?e.clientWidth/t.options.aspectRatio/6:null;return ar(ws,{unit:"day"},((t,i)=>ar(ir,null,e.cells.map(((t,z)=>ar(jO,{ref:this.rowRefs.createRef(z),key:t.length?t[0].date.toISOString():z,showDayNumbers:o>1,showWeekNumbers:e.showWeekNumbers,todayRange:i,dateProfile:e.dateProfile,cells:t,renderIntro:e.renderRowIntro,businessHourSegs:n[z],eventSelection:e.eventSelection,bgEventSegs:p[z].filter(FO),fgEventSegs:c[z],dateSelectionSegs:b[z],eventDrag:r[z],eventResize:a[z],dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,clientWidth:e.clientWidth,clientHeight:e.clientHeight,cellMinHeight:M,forPrint:e.forPrint}))))))}componentDidMount(){this.registerInteractiveComponent()}componentDidUpdate(){this.registerInteractiveComponent()}registerInteractiveComponent(){if(!this.rootEl){const e=this.rowRefs.currentMap[0].getCellEls()[0],t=e?e.closest(".fc-daygrid-body"):null;t&&(this.rootEl=t,this.context.registerInteractiveComponent(this,{el:t,isHitComboAllowed:this.props.isHitComboAllowed}))}}componentWillUnmount(){this.rootEl&&(this.context.unregisterInteractiveComponent(this),this.rootEl=null)}prepareHits(){this.rowPositions=new ps(this.rootEl,this.rowRefs.collect().map((e=>e.getCellEls()[0])),!1,!0),this.colPositions=new ps(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)}queryHit(e,t){let{colPositions:o,rowPositions:n}=this,p=o.leftToIndex(e),c=n.topToIndex(t);if(null!=c&&null!=p){let e=this.props.cells[c][p];return{dateProfile:this.props.dateProfile,dateSpan:Object.assign({range:this.getCellRange(c,p),allDay:!0},e.extraDateSpan),dayEl:this.getCellEl(c,p),rect:{left:o.lefts[p],right:o.rights[p],top:n.tops[c],bottom:n.bottoms[c]},layer:0}}return null}getCellEl(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]}getCellRange(e,t){let o=this.props.cells[e][t].date;return{start:o,end:pM(o,1)}}}function FO(e){return e.eventRange.def.allDay}class UO extends Ms{constructor(){super(...arguments),this.elRef={current:null},this.needsScrollReset=!1}render(){let{props:e}=this,{dayMaxEventRows:t,dayMaxEvents:o,expandRows:n}=e,p=!0===o||!0===t;p&&!n&&(p=!1,t=null,o=null);let c=["fc-daygrid-body",p?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",n?"":"fc-daygrid-body-natural"];return ar("div",{ref:this.elRef,className:c.join(" "),style:{width:e.clientWidth,minWidth:e.tableMinWidth}},ar("table",{role:"presentation",className:"fc-scrollgrid-sync-table",style:{width:e.clientWidth,minWidth:e.tableMinWidth,height:n?e.clientHeight:""}},e.colGroupNode,ar("tbody",{role:"presentation"},ar(HO,{dateProfile:e.dateProfile,cells:e.cells,renderRowIntro:e.renderRowIntro,showWeekNumbers:e.showWeekNumbers,clientWidth:e.clientWidth,clientHeight:e.clientHeight,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,dayMaxEvents:o,dayMaxEventRows:t,forPrint:e.forPrint,isHitComboAllowed:e.isHitComboAllowed}))))}componentDidMount(){this.requestScrollReset()}componentDidUpdate(e){e.dateProfile!==this.props.dateProfile?this.requestScrollReset():this.flushScrollReset()}requestScrollReset(){this.needsScrollReset=!0,this.flushScrollReset()}flushScrollReset(){if(this.needsScrollReset&&this.props.clientWidth){const e=function(e,t){let o;var n;return t.currentRangeUnit.match(/year|month/)&&(o=e.querySelector(`[data-date="${n=t.currentDate,n.toISOString().match(/^\d{4}-\d{2}/)[0]}-01"]`)),o||(o=e.querySelector(`[data-date="${AM(t.currentDate)}"]`)),o}(this.elRef.current,this.props.dateProfile);if(e){const t=e.closest(".fc-daygrid-body"),o=t.closest(".fc-scroller"),n=e.getBoundingClientRect().top-t.getBoundingClientRect().top;o.scrollTop=n?n+1:0}this.needsScrollReset=!1}}}class VO extends Cs{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(e,t){return t.sliceRange(e)}}class GO extends Ms{constructor(){super(...arguments),this.slicer=new VO,this.tableRef={current:null}}render(){let{props:e,context:t}=this;return ar(UO,Object.assign({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))}}function YO(e,t){let o=new Bs(e.renderRange,t);return new Es(o,/year|month|week/.test(e.currentRangeUnit))}Wa(':root{--fc-daygrid-event-dot-width:8px}.fc-daygrid-day-events:after,.fc-daygrid-day-events:before,.fc-daygrid-day-frame:after,.fc-daygrid-day-frame:before,.fc-daygrid-event-harness:after,.fc-daygrid-event-harness:before{clear:both;content:"";display:table}.fc .fc-daygrid-body{position:relative;z-index:1}.fc .fc-daygrid-day.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-daygrid-day-frame{min-height:100%;position:relative}.fc .fc-daygrid-day-top{display:flex;flex-direction:row-reverse}.fc .fc-day-other .fc-daygrid-day-top{opacity:.3}.fc .fc-daygrid-day-number{padding:4px;position:relative;z-index:4}.fc .fc-daygrid-month-start{font-size:1.1em;font-weight:700}.fc .fc-daygrid-day-events{margin-top:1px}.fc .fc-daygrid-body-balanced .fc-daygrid-day-events{left:0;position:absolute;right:0}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{min-height:2em;position:relative}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:1em}.fc .fc-daygrid-event-harness{position:relative}.fc .fc-daygrid-event-harness-abs{left:0;position:absolute;right:0;top:0}.fc .fc-daygrid-bg-harness{bottom:0;position:absolute;top:0}.fc .fc-daygrid-day-bg .fc-non-business{z-index:1}.fc .fc-daygrid-day-bg .fc-bg-event{z-index:2}.fc .fc-daygrid-day-bg .fc-highlight{z-index:3}.fc .fc-daygrid-event{margin-top:1px;z-index:6}.fc .fc-daygrid-event.fc-event-mirror{z-index:7}.fc .fc-daygrid-day-bottom{font-size:.85em;margin:0 2px}.fc .fc-daygrid-day-bottom:after,.fc .fc-daygrid-day-bottom:before{clear:both;content:"";display:table}.fc .fc-daygrid-more-link{border-radius:3px;cursor:pointer;line-height:1;margin-top:1px;max-width:100%;overflow:hidden;padding:2px;position:relative;white-space:nowrap;z-index:4}.fc .fc-daygrid-more-link:hover{background-color:rgba(0,0,0,.1)}.fc .fc-daygrid-week-number{background-color:var(--fc-neutral-bg-color);color:var(--fc-neutral-text-color);min-width:1.5em;padding:2px;position:absolute;text-align:center;top:0;z-index:5}.fc .fc-more-popover .fc-popover-body{min-width:220px;padding:10px}.fc-direction-ltr .fc-daygrid-event.fc-event-start,.fc-direction-rtl .fc-daygrid-event.fc-event-end{margin-left:2px}.fc-direction-ltr .fc-daygrid-event.fc-event-end,.fc-direction-rtl .fc-daygrid-event.fc-event-start{margin-right:2px}.fc-direction-ltr .fc-daygrid-more-link{float:left}.fc-direction-ltr .fc-daygrid-week-number{border-radius:0 0 3px 0;left:0}.fc-direction-rtl .fc-daygrid-more-link{float:right}.fc-direction-rtl .fc-daygrid-week-number{border-radius:0 0 0 3px;right:0}.fc-liquid-hack .fc-daygrid-day-frame{position:static}.fc-daygrid-event{border-radius:3px;font-size:var(--fc-small-font-size);position:relative;white-space:nowrap}.fc-daygrid-block-event .fc-event-time{font-weight:700}.fc-daygrid-block-event .fc-event-time,.fc-daygrid-block-event .fc-event-title{padding:1px}.fc-daygrid-dot-event{align-items:center;display:flex;padding:2px 0}.fc-daygrid-dot-event .fc-event-title{flex-grow:1;flex-shrink:1;font-weight:700;min-width:0;overflow:hidden}.fc-daygrid-dot-event.fc-event-mirror,.fc-daygrid-dot-event:hover{background:rgba(0,0,0,.1)}.fc-daygrid-dot-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-daygrid-event-dot{border:calc(var(--fc-daygrid-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-daygrid-event-dot-width)/2);box-sizing:content-box;height:0;margin:0 4px;width:0}.fc-direction-ltr .fc-daygrid-event .fc-event-time{margin-right:3px}.fc-direction-rtl .fc-daygrid-event .fc-event-time{margin-left:3px}');var QO=wl({name:"@fullcalendar/daygrid",initialView:"dayGridMonth",views:{dayGrid:{component:class extends vO{constructor(){super(...arguments),this.buildDayTableModel=qM(YO),this.headerRef={current:null},this.tableRef={current:null}}render(){let{options:e,dateProfileGenerator:t}=this.context,{props:o}=this,n=this.buildDayTableModel(o.dateProfile,t),p=e.dayHeaders&&ar(Ls,{ref:this.headerRef,dateProfile:o.dateProfile,dates:n.headerDates,datesRepDistinctDays:1===n.rowCnt}),c=t=>ar(GO,{ref:this.tableRef,dateProfile:o.dateProfile,dayTableModel:n,businessHours:o.businessHours,dateSelection:o.dateSelection,eventStore:o.eventStore,eventUiBases:o.eventUiBases,eventSelection:o.eventSelection,eventDrag:o.eventDrag,eventResize:o.eventResize,nextDayThreshold:e.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.weekNumbers,expandRows:!o.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:o.forPrint});return e.dayMinWidth?this.renderHScrollLayout(p,c,n.colCnt,e.dayMinWidth):this.renderSimpleLayout(p,c)}},dateProfileGeneratorClass:class extends Xi{buildRenderRange(e,t,o){let n=super.buildRenderRange(e,t,o),{props:p}=this;return function(e){let t,{dateEnv:o,currentRange:n}=e,{start:p,end:c}=n;if(e.snapToWeek&&(p=o.startOfWeek(p),t=o.startOfWeek(c),t.valueOf()!==c.valueOf()&&(c=nM(t,1))),e.fixedWeekCount){let e=o.startOfWeek(o.startOfMonth(pM(n.end,-1)));c=nM(c,6-Math.ceil(bM(e,c)/7))}return{start:p,end:c}}({currentRange:n,snapToWeek:/^(year|month)$/.test(t),fixedWeekCount:p.fixedWeekCount,dateEnv:p.dateEnv})}}},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},fixedWeekCount:!0},dayGridYear:{type:"dayGrid",duration:{years:1}}}});fs.touchMouseIgnoreWait=500;let KO=0,JO=0,ZO=!1;class $O{constructor(e){this.subjectEl=null,this.selector="",this.handleSelector="",this.shouldIgnoreMove=!1,this.shouldWatchScroll=!0,this.isDragging=!1,this.isTouchDragging=!1,this.wasTouchScroll=!1,this.handleMouseDown=e=>{if(!this.shouldIgnoreMouse()&&function(e){return 0===e.button&&!e.ctrlKey}(e)&&this.tryStart(e)){let t=this.createEventFromMouse(e,!0);this.emitter.trigger("pointerdown",t),this.initScrollWatch(t),this.shouldIgnoreMove||document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp)}},this.handleMouseMove=e=>{let t=this.createEventFromMouse(e);this.recordCoords(t),this.emitter.trigger("pointermove",t)},this.handleMouseUp=e=>{document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),this.emitter.trigger("pointerup",this.createEventFromMouse(e)),this.cleanup()},this.handleTouchStart=e=>{if(this.tryStart(e)){this.isTouchDragging=!0;let t=this.createEventFromTouch(e,!0);this.emitter.trigger("pointerdown",t),this.initScrollWatch(t);let o=e.target;this.shouldIgnoreMove||o.addEventListener("touchmove",this.handleTouchMove),o.addEventListener("touchend",this.handleTouchEnd),o.addEventListener("touchcancel",this.handleTouchEnd),window.addEventListener("scroll",this.handleTouchScroll,!0)}},this.handleTouchMove=e=>{let t=this.createEventFromTouch(e);this.recordCoords(t),this.emitter.trigger("pointermove",t)},this.handleTouchEnd=e=>{if(this.isDragging){let t=e.target;t.removeEventListener("touchmove",this.handleTouchMove),t.removeEventListener("touchend",this.handleTouchEnd),t.removeEventListener("touchcancel",this.handleTouchEnd),window.removeEventListener("scroll",this.handleTouchScroll,!0),this.emitter.trigger("pointerup",this.createEventFromTouch(e)),this.cleanup(),this.isTouchDragging=!1,KO+=1,setTimeout((()=>{KO-=1}),fs.touchMouseIgnoreWait)}},this.handleTouchScroll=()=>{this.wasTouchScroll=!0},this.handleScroll=e=>{if(!this.shouldIgnoreMove){let t=window.scrollX-this.prevScrollX+this.prevPageX,o=window.scrollY-this.prevScrollY+this.prevPageY;this.emitter.trigger("pointermove",{origEvent:e,isTouch:this.isTouchDragging,subjectEl:this.subjectEl,pageX:t,pageY:o,deltaX:t-this.origPageX,deltaY:o-this.origPageY})}},this.containerEl=e,this.emitter=new Mz,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),JO+=1,1===JO&&window.addEventListener("touchmove",ed,{passive:!1})}destroy(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),JO-=1,JO||window.removeEventListener("touchmove",ed,{passive:!1})}tryStart(e){let t=this.querySubjectEl(e),o=e.target;return!(!t||this.handleSelector&&!wa(o,this.handleSelector)||(this.subjectEl=t,this.isDragging=!0,this.wasTouchScroll=!1,0))}cleanup(){ZO=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()}querySubjectEl(e){return this.selector?wa(e.target,this.selector):this.containerEl}shouldIgnoreMouse(){return KO||this.isTouchDragging}cancelTouchScroll(){this.isDragging&&(ZO=!0)}initScrollWatch(e){this.shouldWatchScroll&&(this.recordCoords(e),window.addEventListener("scroll",this.handleScroll,!0))}recordCoords(e){this.shouldWatchScroll&&(this.prevPageX=e.pageX,this.prevPageY=e.pageY,this.prevScrollX=window.scrollX,this.prevScrollY=window.scrollY)}destroyScrollWatch(){this.shouldWatchScroll&&window.removeEventListener("scroll",this.handleScroll,!0)}createEventFromMouse(e,t){let o=0,n=0;return t?(this.origPageX=e.pageX,this.origPageY=e.pageY):(o=e.pageX-this.origPageX,n=e.pageY-this.origPageY),{origEvent:e,isTouch:!1,subjectEl:this.subjectEl,pageX:e.pageX,pageY:e.pageY,deltaX:o,deltaY:n}}createEventFromTouch(e,t){let o,n,p=e.touches,c=0,b=0;return p&&p.length?(o=p[0].pageX,n=p[0].pageY):(o=e.pageX,n=e.pageY),t?(this.origPageX=o,this.origPageY=n):(c=o-this.origPageX,b=n-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:o,pageY:n,deltaX:c,deltaY:b}}}function ed(e){ZO&&e.preventDefault()}class td{constructor(){this.isVisible=!1,this.sourceEl=null,this.mirrorEl=null,this.sourceElRect=null,this.parentNode=document.body,this.zIndex=9999,this.revertDuration=0}start(e,t,o){this.sourceEl=e,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=t-window.scrollX,this.origScreenY=o-window.scrollY,this.deltaX=0,this.deltaY=0,this.updateElPosition()}handleMove(e,t){this.deltaX=e-window.scrollX-this.origScreenX,this.deltaY=t-window.scrollY-this.origScreenY,this.updateElPosition()}setIsVisible(e){e?this.isVisible||(this.mirrorEl&&(this.mirrorEl.style.display=""),this.isVisible=e,this.updateElPosition()):this.isVisible&&(this.mirrorEl&&(this.mirrorEl.style.display="none"),this.isVisible=e)}stop(e,t){let o=()=>{this.cleanup(),t()};e&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(o,this.revertDuration):setTimeout(o,0)}doRevertAnimation(e,t){let o=this.mirrorEl,n=this.sourceEl.getBoundingClientRect();o.style.transition="top "+t+"ms,left "+t+"ms",Na(o,{left:n.left,top:n.top}),function(e,t){let o=n=>{t(),ka.forEach((t=>{e.removeEventListener(t,o)}))};ka.forEach((t=>{e.addEventListener(t,o)}))}(o,(()=>{o.style.transition="",e()}))}cleanup(){this.mirrorEl&&(Ra(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null}updateElPosition(){this.sourceEl&&this.isVisible&&Na(this.getMirrorEl(),{left:this.sourceElRect.left+this.deltaX,top:this.sourceElRect.top+this.deltaY})}getMirrorEl(){let e=this.sourceElRect,t=this.mirrorEl;return t||(t=this.mirrorEl=this.sourceEl.cloneNode(!0),t.style.userSelect="none",t.style.webkitUserSelect="none",t.style.pointerEvents="none",t.classList.add("fc-event-dragging"),Na(t,{position:"fixed",zIndex:this.zIndex,visibility:"",boxSizing:"border-box",width:e.right-e.left,height:e.bottom-e.top,right:"auto",bottom:"auto",margin:0}),this.parentNode.appendChild(t)),t}}class od extends bs{constructor(e,t){super(),this.handleScroll=()=>{this.scrollTop=this.scrollController.getScrollTop(),this.scrollLeft=this.scrollController.getScrollLeft(),this.handleScrollChange()},this.scrollController=e,this.doesListening=t,this.scrollTop=this.origScrollTop=e.getScrollTop(),this.scrollLeft=this.origScrollLeft=e.getScrollLeft(),this.scrollWidth=e.getScrollWidth(),this.scrollHeight=e.getScrollHeight(),this.clientWidth=e.getClientWidth(),this.clientHeight=e.getClientHeight(),this.clientRect=this.computeClientRect(),this.doesListening&&this.getEventTarget().addEventListener("scroll",this.handleScroll)}destroy(){this.doesListening&&this.getEventTarget().removeEventListener("scroll",this.handleScroll)}getScrollTop(){return this.scrollTop}getScrollLeft(){return this.scrollLeft}setScrollTop(e){this.scrollController.setScrollTop(e),this.doesListening||(this.scrollTop=Math.max(Math.min(e,this.getMaxScrollTop()),0),this.handleScrollChange())}setScrollLeft(e){this.scrollController.setScrollLeft(e),this.doesListening||(this.scrollLeft=Math.max(Math.min(e,this.getMaxScrollLeft()),0),this.handleScrollChange())}getClientWidth(){return this.clientWidth}getClientHeight(){return this.clientHeight}getScrollWidth(){return this.scrollWidth}getScrollHeight(){return this.scrollHeight}handleScrollChange(){}}class nd extends od{constructor(e,t){super(new rs(e),t)}getEventTarget(){return this.scrollController.el}computeClientRect(){return ts(this.scrollController.el)}}class pd extends od{constructor(e){super(new as,e)}getEventTarget(){return window}computeClientRect(){return{left:this.scrollLeft,right:this.scrollLeft+this.clientWidth,top:this.scrollTop,bottom:this.scrollTop+this.clientHeight}}handleScrollChange(){this.clientRect=this.computeClientRect()}}const cd="function"==typeof performance?performance.now:Date.now;class bd{constructor(){this.isEnabled=!0,this.scrollQuery=[window,".fc-scroller"],this.edgeThreshold=50,this.maxVelocity=300,this.pointerScreenX=null,this.pointerScreenY=null,this.isAnimating=!1,this.scrollCaches=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.animate=()=>{if(this.isAnimating){let e=this.computeBestEdge(this.pointerScreenX+window.scrollX,this.pointerScreenY+window.scrollY);if(e){let t=cd();this.handleSide(e,(t-this.msSinceRequest)/1e3),this.requestAnimation(t)}else this.isAnimating=!1}}}start(e,t,o){this.isEnabled&&(this.scrollCaches=this.buildCaches(o),this.pointerScreenX=null,this.pointerScreenY=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.handleMove(e,t))}handleMove(e,t){if(this.isEnabled){let o=e-window.scrollX,n=t-window.scrollY,p=null===this.pointerScreenY?0:n-this.pointerScreenY,c=null===this.pointerScreenX?0:o-this.pointerScreenX;p<0?this.everMovedUp=!0:p>0&&(this.everMovedDown=!0),c<0?this.everMovedLeft=!0:c>0&&(this.everMovedRight=!0),this.pointerScreenX=o,this.pointerScreenY=n,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(cd()))}}stop(){if(this.isEnabled){this.isAnimating=!1;for(let e of this.scrollCaches)e.destroy();this.scrollCaches=null}}requestAnimation(e){this.msSinceRequest=e,requestAnimationFrame(this.animate)}handleSide(e,t){let{scrollCache:o}=e,{edgeThreshold:n}=this,p=n-e.distance,c=p*p/(n*n)*this.maxVelocity*t,b=1;switch(e.name){case"left":b=-1;case"right":o.setScrollLeft(o.getScrollLeft()+c*b);break;case"top":b=-1;case"bottom":o.setScrollTop(o.getScrollTop()+c*b)}}computeBestEdge(e,t){let{edgeThreshold:o}=this,n=null,p=this.scrollCaches||[];for(let c of p){let p=c.clientRect,b=e-p.left,r=p.right-e,a=t-p.top,M=p.bottom-t;b>=0&&r>=0&&a>=0&&M>=0&&(a<=o&&this.everMovedUp&&c.canScrollUp()&&(!n||n.distance>a)&&(n={scrollCache:c,name:"top",distance:a}),M<=o&&this.everMovedDown&&c.canScrollDown()&&(!n||n.distance>M)&&(n={scrollCache:c,name:"bottom",distance:M}),b<=o&&this.everMovedLeft&&c.canScrollLeft()&&(!n||n.distance>b)&&(n={scrollCache:c,name:"left",distance:b}),r<=o&&this.everMovedRight&&c.canScrollRight()&&(!n||n.distance>r)&&(n={scrollCache:c,name:"right",distance:r}))}return n}buildCaches(e){return this.queryScrollEls(e).map((e=>e===window?new pd(!1):new nd(e,!1)))}queryScrollEls(e){let t=[];for(let o of this.scrollQuery)"object"==typeof o?t.push(o):t.push(...Array.prototype.slice.call(e.getRootNode().querySelectorAll(o)));return t}}class rd extends As{constructor(e,t){super(e),this.containerEl=e,this.delay=null,this.minDistance=0,this.touchScrollAllowed=!0,this.mirrorNeedsRevert=!1,this.isInteracting=!1,this.isDragging=!1,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,this.delayTimeoutId=null,this.onPointerDown=e=>{var t;this.isDragging||(this.isInteracting=!0,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,(t=document.body).style.userSelect="none",t.style.webkitUserSelect="none",t.addEventListener("selectstart",Ta),document.body.addEventListener("contextmenu",Ta),e.isTouch||e.origEvent.preventDefault(),this.emitter.trigger("pointerdown",e),this.isInteracting&&!this.pointer.shouldIgnoreMove&&(this.mirror.setIsVisible(!1),this.mirror.start(e.subjectEl,e.pageX,e.pageY),this.startDelay(e),this.minDistance||this.handleDistanceSurpassed(e)))},this.onPointerMove=e=>{if(this.isInteracting){if(this.emitter.trigger("pointermove",e),!this.isDistanceSurpassed){let t,o=this.minDistance,{deltaX:n,deltaY:p}=e;t=n*n+p*p,t>=o*o&&this.handleDistanceSurpassed(e)}this.isDragging&&("scroll"!==e.origEvent.type&&(this.mirror.handleMove(e.pageX,e.pageY),this.autoScroller.handleMove(e.pageX,e.pageY)),this.emitter.trigger("dragmove",e))}},this.onPointerUp=e=>{var t;this.isInteracting&&(this.isInteracting=!1,(t=document.body).style.userSelect="",t.style.webkitUserSelect="",t.removeEventListener("selectstart",Ta),document.body.removeEventListener("contextmenu",Ta),this.emitter.trigger("pointerup",e),this.isDragging&&(this.autoScroller.stop(),this.tryStopDrag(e)),this.delayTimeoutId&&(clearTimeout(this.delayTimeoutId),this.delayTimeoutId=null))};let o=this.pointer=new $O(e);o.emitter.on("pointerdown",this.onPointerDown),o.emitter.on("pointermove",this.onPointerMove),o.emitter.on("pointerup",this.onPointerUp),t&&(o.selector=t),this.mirror=new td,this.autoScroller=new bd}destroy(){this.pointer.destroy(),this.onPointerUp({})}startDelay(e){"number"==typeof this.delay?this.delayTimeoutId=setTimeout((()=>{this.delayTimeoutId=null,this.handleDelayEnd(e)}),this.delay):this.handleDelayEnd(e)}handleDelayEnd(e){this.isDelayEnded=!0,this.tryStartDrag(e)}handleDistanceSurpassed(e){this.isDistanceSurpassed=!0,this.tryStartDrag(e)}tryStartDrag(e){this.isDelayEnded&&this.isDistanceSurpassed&&(this.pointer.wasTouchScroll&&!this.touchScrollAllowed||(this.isDragging=!0,this.mirrorNeedsRevert=!1,this.autoScroller.start(e.pageX,e.pageY,this.containerEl),this.emitter.trigger("dragstart",e),!1===this.touchScrollAllowed&&this.pointer.cancelTouchScroll()))}tryStopDrag(e){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,e))}stopDrag(e){this.isDragging=!1,this.emitter.trigger("dragend",e)}setIgnoreMove(e){this.pointer.shouldIgnoreMove=e}setMirrorIsVisible(e){this.mirror.setIsVisible(e)}setMirrorNeedsRevert(e){this.mirrorNeedsRevert=e}setAutoScrollEnabled(e){this.autoScroller.isEnabled=e}}class ad{constructor(e){this.el=e,this.origRect=os(e),this.scrollCaches=ns(e).map((e=>new nd(e,!0)))}destroy(){for(let e of this.scrollCaches)e.destroy()}computeLeft(){let e=this.origRect.left;for(let t of this.scrollCaches)e+=t.origScrollLeft-t.getScrollLeft();return e}computeTop(){let e=this.origRect.top;for(let t of this.scrollCaches)e+=t.origScrollTop-t.getScrollTop();return e}isWithinClipping(e,t){let o={left:e,top:t};for(let e of this.scrollCaches)if(!Md(e.getEventTarget())&&!Uz(o,e.clientRect))return!1;return!0}}function Md(e){let t=e.tagName;return"HTML"===t||"BODY"===t}class id{constructor(e,t){this.useSubjectCenter=!1,this.requireInitial=!0,this.disablePointCheck=!1,this.initialHit=null,this.movingHit=null,this.finalHit=null,this.handlePointerDown=e=>{let{dragging:t}=this;this.initialHit=null,this.movingHit=null,this.finalHit=null,this.prepareHits(),this.processFirstCoord(e),this.initialHit||!this.requireInitial?(t.setIgnoreMove(!1),this.emitter.trigger("pointerdown",e)):t.setIgnoreMove(!0)},this.handleDragStart=e=>{this.emitter.trigger("dragstart",e),this.handleMove(e,!0)},this.handleDragMove=e=>{this.emitter.trigger("dragmove",e),this.handleMove(e)},this.handlePointerUp=e=>{this.releaseHits(),this.emitter.trigger("pointerup",e)},this.handleDragEnd=e=>{this.movingHit&&this.emitter.trigger("hitupdate",null,!0,e),this.finalHit=this.movingHit,this.movingHit=null,this.emitter.trigger("dragend",e)},this.droppableStore=t,e.emitter.on("pointerdown",this.handlePointerDown),e.emitter.on("dragstart",this.handleDragStart),e.emitter.on("dragmove",this.handleDragMove),e.emitter.on("pointerup",this.handlePointerUp),e.emitter.on("dragend",this.handleDragEnd),this.dragging=e,this.emitter=new Mz}processFirstCoord(e){let t,o={left:e.pageX,top:e.pageY},n=o,p=e.subjectEl;var c,b;p instanceof HTMLElement&&(t=os(p),c=n,b=t,n={left:Math.min(Math.max(c.left,b.left),b.right),top:Math.min(Math.max(c.top,b.top),b.bottom)});let r=this.initialHit=this.queryHitForOffset(n.left,n.top);if(r){if(this.useSubjectCenter&&t){let e=Vz(t,r.rect);e&&(n=function(e){return{left:(e.left+e.right)/2,top:(e.top+e.bottom)/2}}(e))}this.coordAdjust=(M=o,{left:(a=n).left-M.left,top:a.top-M.top})}else this.coordAdjust={left:0,top:0};var a,M}handleMove(e,t){let o=this.queryHitForOffset(e.pageX+this.coordAdjust.left,e.pageY+this.coordAdjust.top);!t&&zd(this.movingHit,o)||(this.movingHit=o,this.emitter.trigger("hitupdate",o,!1,e))}prepareHits(){this.offsetTrackers=QM(this.droppableStore,(e=>(e.component.prepareHits(),new ad(e.el))))}releaseHits(){let{offsetTrackers:e}=this;for(let t in e)e[t].destroy();this.offsetTrackers={}}queryHitForOffset(e,t){let{droppableStore:o,offsetTrackers:n}=this,p=null;for(let c in o){let b=o[c].component,r=n[c];if(r&&r.isWithinClipping(e,t)){let o=r.computeLeft(),n=r.computeTop(),a=e-o,M=t-n,{origRect:i}=r,z=i.right-i.left,s=i.bottom-i.top;if(a>=0&&a=0&&Mp.layer)&&(e.componentId=c,e.context=b.context,e.rect.left+=o,e.rect.right+=o,e.rect.top+=n,e.rect.bottom+=n,p=e)}}}return p}}function zd(e,t){return!e&&!t||Boolean(e)===Boolean(t)&&(o=e.dateSpan,n=t.dateSpan,p=o.range,c=n.range,(null===p.start?null:p.start.valueOf())===(null===c.start?null:c.start.valueOf())&&(null===p.end?null:p.end.valueOf())===(null===c.end?null:c.end.valueOf())&&o.allDay===n.allDay&&function(e,t){for(let o in t)if("range"!==o&&"allDay"!==o&&e[o]!==t[o])return!1;for(let o in e)if(!(o in t))return!1;return!0}(o,n));var o,n,p,c}function sd(e,t){let o={};for(let n of t.pluginHooks.datePointTransforms)Object.assign(o,n(e,t));var n,p;return Object.assign(o,(n=e,{date:(p=t.dateEnv).toDate(n.range.start),dateStr:p.formatIso(n.range.start,{omitTime:n.allDay}),allDay:n.allDay})),o}class ld extends Iz{constructor(e){super(e),this.subjectEl=null,this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=e=>{let t=e.origEvent.target,{component:o,dragging:n}=this,{mirror:p}=n,{options:c}=o.context,b=o.context;this.subjectEl=e.subjectEl;let r=this.subjectSeg=gz(e.subjectEl),a=(this.eventRange=r.eventRange).instance.instanceId;this.relevantEvents=Yi(b.getCurrentData().eventStore,a),n.minDistance=e.isTouch?0:c.eventDragMinDistance,n.delay=e.isTouch&&a!==o.props.eventSelection?function(e){let{options:t}=e.context,o=t.eventLongPressDelay;return null==o&&(o=t.longPressDelay),o}(o):null,c.fixedMirrorParent?p.parentNode=c.fixedMirrorParent:p.parentNode=wa(t,".fc"),p.revertDuration=c.dragRevertDuration;let M=o.isValidSegDownEl(t)&&!wa(t,".fc-event-resizer");n.setIgnoreMove(!M),this.isDragging=M&&e.subjectEl.classList.contains("fc-event-draggable")},this.handleDragStart=e=>{let t=this.component.context,o=this.eventRange,n=o.instance.instanceId;e.isTouch?n!==this.component.props.eventSelection&&t.dispatch({type:"SELECT_EVENT",eventInstanceId:n}):t.dispatch({type:"UNSELECT_EVENT"}),this.isDragging&&(t.calendarApi.unselect(e),t.emitter.trigger("eventDragStart",{el:this.subjectEl,event:new fz(t,o.def,o.instance),jsEvent:e.origEvent,view:t.viewApi}))},this.handleHitUpdate=(e,t)=>{if(!this.isDragging)return;let o=this.relevantEvents,n=this.hitDragging.initialHit,p=this.component.context,c=null,b=null,r=null,a=!1,M={affectedEvents:o,mutatedEvents:{defs:{},instances:{}},isEvent:!0};if(e){c=e.context;let t=c.options;p===c||t.editable&&t.droppable?(b=function(e,t,o,n){let p=e.dateSpan,c=t.dateSpan,b=p.range.start,r=c.range.start,a={};p.allDay!==c.allDay&&(a.allDay=c.allDay,a.hasEnd=t.context.options.allDayMaintainDuration,b=c.allDay?aM(o):o);let M=Si(b,r,e.context.dateEnv,e.componentId===t.componentId?e.largeUnit:null);M.milliseconds&&(a.allDay=!1);let i={datesDelta:M,standardProps:a};for(let o of n)o(i,e,t);return i}(n,e,this.eventRange.instance.range.start,c.getCurrentData().pluginHooks.eventDragMutationMassagers),b&&(r=Oz(o,c.getCurrentData().eventUiBases,b,c),M.mutatedEvents=r,Ts(M,e.dateProfile,c)||(a=!0,b=null,r=null,M.mutatedEvents={defs:{},instances:{}}))):c=null}this.displayDrag(c,M),a?Ia():ja(),t||(p===c&&zd(n,e)&&(b=null),this.dragging.setMirrorNeedsRevert(!b),this.dragging.setMirrorIsVisible(!e||!this.subjectEl.getRootNode().querySelector(".fc-event-mirror")),this.receivingContext=c,this.validMutation=b,this.mutatedRelevantEvents=r)},this.handlePointerUp=()=>{this.isDragging||this.cleanup()},this.handleDragEnd=e=>{if(this.isDragging){let t=this.component.context,o=t.viewApi,{receivingContext:n,validMutation:p}=this,c=this.eventRange.def,b=this.eventRange.instance,r=new fz(t,c,b),a=this.relevantEvents,M=this.mutatedRelevantEvents,{finalHit:i}=this.hitDragging;if(this.clearDrag(),t.emitter.trigger("eventDragStop",{el:this.subjectEl,event:r,jsEvent:e.origEvent,view:o}),p){if(n===t){let n=new fz(t,M.defs[c.defId],b?M.instances[b.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:M});let i={oldEvent:r,event:n,relatedEvents:Wz(M,t,b),revert(){t.dispatch({type:"MERGE_EVENTS",eventStore:a})}},z={};for(let e of t.getCurrentData().pluginHooks.eventDropTransformers)Object.assign(z,e(p,t));t.emitter.trigger("eventDrop",Object.assign(Object.assign(Object.assign({},i),z),{el:e.subjectEl,delta:p.datesDelta,jsEvent:e.origEvent,view:o})),t.emitter.trigger("eventChange",i)}else if(n){let p={event:r,relatedEvents:Wz(a,t,b),revert(){t.dispatch({type:"MERGE_EVENTS",eventStore:a})}};t.emitter.trigger("eventLeave",Object.assign(Object.assign({},p),{draggedEl:e.subjectEl,view:o})),t.dispatch({type:"REMOVE_EVENTS",eventStore:a}),t.emitter.trigger("eventRemove",p);let z=M.defs[c.defId],s=M.instances[b.instanceId],l=new fz(n,z,s);n.dispatch({type:"MERGE_EVENTS",eventStore:M});let O={event:l,relatedEvents:Wz(M,n,s),revert(){n.dispatch({type:"REMOVE_EVENTS",eventStore:M})}};n.emitter.trigger("eventAdd",O),e.isTouch&&n.dispatch({type:"SELECT_EVENT",eventInstanceId:b.instanceId}),n.emitter.trigger("drop",Object.assign(Object.assign({},sd(i.dateSpan,n)),{draggedEl:e.subjectEl,jsEvent:e.origEvent,view:i.context.viewApi})),n.emitter.trigger("eventReceive",Object.assign(Object.assign({},O),{draggedEl:e.subjectEl,view:i.context.viewApi}))}}else t.emitter.trigger("_noEventDrop")}this.cleanup()};let{component:t}=this,{options:o}=t.context,n=this.dragging=new rd(e.el);n.pointer.selector=ld.SELECTOR,n.touchScrollAllowed=!1,n.autoScroller.isEnabled=o.dragScroll;let p=this.hitDragging=new id(this.dragging,Hz);p.useSubjectCenter=e.useEventCenter,p.emitter.on("pointerdown",this.handlePointerDown),p.emitter.on("dragstart",this.handleDragStart),p.emitter.on("hitupdate",this.handleHitUpdate),p.emitter.on("pointerup",this.handlePointerUp),p.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}displayDrag(e,t){let o=this.component.context,n=this.receivingContext;n&&n!==e&&(n===o?n.dispatch({type:"SET_EVENT_DRAG",state:{affectedEvents:t.affectedEvents,mutatedEvents:{defs:{},instances:{}},isEvent:!0}}):n.dispatch({type:"UNSET_EVENT_DRAG"})),e&&e.dispatch({type:"SET_EVENT_DRAG",state:t})}clearDrag(){let e=this.component.context,{receivingContext:t}=this;t&&t.dispatch({type:"UNSET_EVENT_DRAG"}),e!==t&&e.dispatch({type:"UNSET_EVENT_DRAG"})}cleanup(){this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null}}ld.SELECTOR=".fc-event-draggable, .fc-event-resizable";const Od={fixedMirrorParent:UM},dd={dateClick:UM,eventDragStart:UM,eventDragStop:UM,eventDrop:UM,eventResizeStart:UM,eventResizeStop:UM,eventResize:UM,drop:UM,eventReceive:UM,eventLeave:UM};class ud{constructor(e,t){this.receivingContext=null,this.droppableEvent=null,this.suppliedDragMeta=null,this.dragMeta=null,this.handleDragStart=e=>{this.dragMeta=this.buildDragMeta(e.subjectEl)},this.handleHitUpdate=(e,t,o)=>{let{dragging:n}=this.hitDragging,p=null,c=null,b=!1,r={affectedEvents:{defs:{},instances:{}},mutatedEvents:{defs:{},instances:{}},isEvent:this.dragMeta.create};e&&(p=e.context,this.canDropElOnCalendar(o.subjectEl,p)&&(c=function(e,t,o){let n=Object.assign({},t.leftoverProps);for(let p of o.pluginHooks.externalDefTransforms)Object.assign(n,p(e,t));let{refined:p,extra:c}=Hi(n,o),b=Ui(p,c,t.sourceId,e.allDay,o.options.forceEventDuration||Boolean(t.duration),o),r=e.range.start;e.allDay&&t.startTime&&(r=o.dateEnv.add(r,t.startTime));let a=t.duration?o.dateEnv.add(r,t.duration):lz(e.allDay,r,o);return{def:b,instance:ki(b.defId,{start:r,end:a})}}(e.dateSpan,this.dragMeta,p),r.mutatedEvents=Gi(c),b=!Ts(r,e.dateProfile,p),b&&(r.mutatedEvents={defs:{},instances:{}},c=null))),this.displayDrag(p,r),n.setMirrorIsVisible(t||!c||!document.querySelector(".fc-event-mirror")),b?Ia():ja(),t||(n.setMirrorNeedsRevert(!c),this.receivingContext=p,this.droppableEvent=c)},this.handleDragEnd=e=>{let{receivingContext:t,droppableEvent:o}=this;if(this.clearDrag(),t&&o){let n=this.hitDragging.finalHit,p=n.context.viewApi,c=this.dragMeta;if(t.emitter.trigger("drop",Object.assign(Object.assign({},sd(n.dateSpan,t)),{draggedEl:e.subjectEl,jsEvent:e.origEvent,view:p})),c.create){let n=Gi(o);t.dispatch({type:"MERGE_EVENTS",eventStore:n}),e.isTouch&&t.dispatch({type:"SELECT_EVENT",eventInstanceId:o.instance.instanceId}),t.emitter.trigger("eventReceive",{event:new fz(t,o.def,o.instance),relatedEvents:[],revert(){t.dispatch({type:"REMOVE_EVENTS",eventStore:n})},draggedEl:e.subjectEl,view:p})}}this.receivingContext=null,this.droppableEvent=null};let o=this.hitDragging=new id(e,Hz);o.requireInitial=!1,o.emitter.on("dragstart",this.handleDragStart),o.emitter.on("hitupdate",this.handleHitUpdate),o.emitter.on("dragend",this.handleDragEnd),this.suppliedDragMeta=t}buildDragMeta(e){return"object"==typeof this.suppliedDragMeta?Ws(this.suppliedDragMeta):"function"==typeof this.suppliedDragMeta?Ws(this.suppliedDragMeta(e)):function(e){let t=function(e,t){let o=fs.dataAttrPrefix,n=(o?o+"-":"")+"event";return e.getAttribute("data-"+n)||""}(e);return Ws(t?JSON.parse(t):{create:!1})}(e)}displayDrag(e,t){let o=this.receivingContext;o&&o!==e&&o.dispatch({type:"UNSET_EVENT_DRAG"}),e&&e.dispatch({type:"SET_EVENT_DRAG",state:t})}clearDrag(){this.receivingContext&&this.receivingContext.dispatch({type:"UNSET_EVENT_DRAG"})}canDropElOnCalendar(e,t){let o=t.options.dropAccept;return"function"==typeof o?o.call(t.calendarApi,e):"string"!=typeof o||!o||Boolean(ya(e,o))}}fs.dataAttrPrefix="";class Ad{constructor(e,t={}){this.handlePointerDown=e=>{let{dragging:t}=this,{minDistance:o,longPressDelay:n}=this.settings;t.minDistance=null!=o?o:e.isTouch?0:kM.eventDragMinDistance,t.delay=e.isTouch?null!=n?n:kM.longPressDelay:0},this.handleDragStart=e=>{e.isTouch&&this.dragging.delay&&e.subjectEl.classList.contains("fc-event")&&this.dragging.mirror.getMirrorEl().classList.add("fc-event-selected")},this.settings=t;let o=this.dragging=new rd(e);o.touchScrollAllowed=!1,null!=t.itemSelector&&(o.pointer.selector=t.itemSelector),null!=t.appendTo&&(o.mirror.parentNode=t.appendTo),o.emitter.on("pointerdown",this.handlePointerDown),o.emitter.on("dragstart",this.handleDragStart),new ud(o,t.eventData)}destroy(){this.dragging.destroy()}}var fd=wl({name:"@fullcalendar/interaction",componentInteractions:[class extends Iz{constructor(e){super(e),this.handlePointerDown=e=>{let{dragging:t}=this,o=e.origEvent.target;t.setIgnoreMove(!this.component.isValidDateDownEl(o))},this.handleDragEnd=e=>{let{component:t}=this,{pointer:o}=this.dragging;if(!o.wasTouchScroll){let{initialHit:o,finalHit:n}=this.hitDragging;if(o&&n&&zd(o,n)){let{context:n}=t,p=Object.assign(Object.assign({},sd(o.dateSpan,n)),{dayEl:o.dayEl,jsEvent:e.origEvent,view:n.viewApi||n.calendarApi.view});n.emitter.trigger("dateClick",p)}}},this.dragging=new rd(e.el),this.dragging.autoScroller.isEnabled=!1;let t=this.hitDragging=new id(this.dragging,jz(e));t.emitter.on("pointerdown",this.handlePointerDown),t.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}},class extends Iz{constructor(e){super(e),this.dragSelection=null,this.handlePointerDown=e=>{let{component:t,dragging:o}=this,{options:n}=t.context,p=n.selectable&&t.isValidDateDownEl(e.origEvent.target);o.setIgnoreMove(!p),o.delay=e.isTouch?function(e){let{options:t}=e.context,o=t.selectLongPressDelay;return null==o&&(o=t.longPressDelay),o}(t):null},this.handleDragStart=e=>{this.component.context.calendarApi.unselect(e)},this.handleHitUpdate=(e,t)=>{let{context:o}=this.component,n=null,p=!1;if(e){let t=this.hitDragging.initialHit;e.componentId===t.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(t,e)||(n=function(e,t,o){let n=e.dateSpan,p=t.dateSpan,c=[n.range.start,n.range.end,p.range.start,p.range.end];c.sort(Va);let b={};for(let n of o){let o=n(e,t);if(!1===o)return null;o&&Object.assign(b,o)}return b.range={start:c[0],end:c[3]},b.allDay=n.allDay,b}(t,e,o.pluginHooks.dateSelectionTransformers)),n&&function(e,t,o){return!!Ni(t.validRange,e.range)&&Xs({dateSelection:e},o)}(n,e.dateProfile,o)||(p=!0,n=null)}n?o.dispatch({type:"SELECT_DATES",selection:n}):t||o.dispatch({type:"UNSELECT_DATES"}),p?Ia():ja(),t||(this.dragSelection=n)},this.handlePointerUp=e=>{this.dragSelection&&(zz(this.dragSelection,e,this.component.context),this.dragSelection=null)};let{component:t}=e,{options:o}=t.context,n=this.dragging=new rd(e.el);n.touchScrollAllowed=!1,n.minDistance=o.selectMinDistance||0,n.autoScroller.isEnabled=o.dragScroll;let p=this.hitDragging=new id(this.dragging,jz(e));p.emitter.on("pointerdown",this.handlePointerDown),p.emitter.on("dragstart",this.handleDragStart),p.emitter.on("hitupdate",this.handleHitUpdate),p.emitter.on("pointerup",this.handlePointerUp)}destroy(){this.dragging.destroy()}},ld,class extends Iz{constructor(e){super(e),this.draggingSegEl=null,this.draggingSeg=null,this.eventRange=null,this.relevantEvents=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=e=>{let{component:t}=this,o=gz(this.querySegEl(e)),n=this.eventRange=o.eventRange;this.dragging.minDistance=t.context.options.eventDragMinDistance,this.dragging.setIgnoreMove(!this.component.isValidSegDownEl(e.origEvent.target)||e.isTouch&&this.component.props.eventSelection!==n.instance.instanceId)},this.handleDragStart=e=>{let{context:t}=this.component,o=this.eventRange;this.relevantEvents=Yi(t.getCurrentData().eventStore,this.eventRange.instance.instanceId);let n=this.querySegEl(e);this.draggingSegEl=n,this.draggingSeg=gz(n),t.calendarApi.unselect(),t.emitter.trigger("eventResizeStart",{el:n,event:new fz(t,o.def,o.instance),jsEvent:e.origEvent,view:t.viewApi})},this.handleHitUpdate=(e,t,o)=>{let{context:n}=this.component,p=this.relevantEvents,c=this.hitDragging.initialHit,b=this.eventRange.instance,r=null,a=null,M=!1,i={affectedEvents:p,mutatedEvents:{defs:{},instances:{}},isEvent:!0};e&&(e.componentId===c.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(c,e)||(r=function(e,t,o,n){let p=e.context.dateEnv,c=Si(e.dateSpan.range.start,t.dateSpan.range.start,p,e.largeUnit);if(o){if(p.add(n.start,c)n.start)return{endDelta:c};return null}(c,e,o.subjectEl.classList.contains("fc-event-resizer-start"),b.range))),r&&(a=Oz(p,n.getCurrentData().eventUiBases,r,n),i.mutatedEvents=a,Ts(i,e.dateProfile,n)||(M=!0,r=null,a=null,i.mutatedEvents=null)),a?n.dispatch({type:"SET_EVENT_RESIZE",state:i}):n.dispatch({type:"UNSET_EVENT_RESIZE"}),M?Ia():ja(),t||(r&&zd(c,e)&&(r=null),this.validMutation=r,this.mutatedRelevantEvents=a)},this.handleDragEnd=e=>{let{context:t}=this.component,o=this.eventRange.def,n=this.eventRange.instance,p=new fz(t,o,n),c=this.relevantEvents,b=this.mutatedRelevantEvents;if(t.emitter.trigger("eventResizeStop",{el:this.draggingSegEl,event:p,jsEvent:e.origEvent,view:t.viewApi}),this.validMutation){let r=new fz(t,b.defs[o.defId],n?b.instances[n.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:b});let a={oldEvent:p,event:r,relatedEvents:Wz(b,t,n),revert(){t.dispatch({type:"MERGE_EVENTS",eventStore:c})}};t.emitter.trigger("eventResize",Object.assign(Object.assign({},a),{el:this.draggingSegEl,startDelta:this.validMutation.startDelta||Ka(0),endDelta:this.validMutation.endDelta||Ka(0),jsEvent:e.origEvent,view:t.viewApi})),t.emitter.trigger("eventChange",a)}else t.emitter.trigger("_noEventResize");this.draggingSeg=null,this.relevantEvents=null,this.validMutation=null};let{component:t}=e,o=this.dragging=new rd(e.el);o.pointer.selector=".fc-event-resizer",o.touchScrollAllowed=!1,o.autoScroller.isEnabled=t.context.options.dragScroll;let n=this.hitDragging=new id(this.dragging,jz(e));n.emitter.on("pointerdown",this.handlePointerDown),n.emitter.on("dragstart",this.handleDragStart),n.emitter.on("hitupdate",this.handleHitUpdate),n.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}querySegEl(e){return wa(e.subjectEl,".fc-event")}}],calendarInteractions:[class{constructor(e){this.context=e,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=e=>{e.jsEvent&&(this.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=e=>{let t=this.context.options.unselectCancel,o=Ea(e.origEvent);this.matchesCancel=!!wa(o,t),this.matchesEvent=!!wa(o,ld.SELECTOR)},this.onDocumentPointerUp=e=>{let{context:t}=this,{documentPointer:o}=this,n=t.getCurrentData();if(!o.wasTouchScroll){if(n.dateSelection&&!this.isRecentPointerDateSelect){let o=t.options.unselectAuto;!o||o&&this.matchesCancel||t.calendarApi.unselect(e)}n.eventSelection&&!this.matchesEvent&&t.dispatch({type:"UNSELECT_EVENT"})}this.isRecentPointerDateSelect=!1};let t=this.documentPointer=new $O(document);t.shouldIgnoreMove=!0,t.shouldWatchScroll=!1,t.emitter.on("pointerdown",this.onDocumentPointerDown),t.emitter.on("pointerup",this.onDocumentPointerUp),e.emitter.on("select",this.onSelect)}destroy(){this.context.emitter.off("select",this.onSelect),this.documentPointer.destroy()}}],elementDraggingImpl:rd,optionRefiners:Od,listenerRefiners:dd}),qd=o(743),Wd=wl({name:"@fullcalendar/moment-timezone",namedTimeZonedImpl:class extends is{offsetForArray(e){return qd.tz(e,this.timeZoneName).utcOffset()}timestampToArray(e){return qd.tz(e,this.timeZoneName).toArray()}}});const md=parseInt(String(e.version).split(".")[0])<18;class hd extends e.Component{constructor(){super(...arguments),this.elRef=(0,e.createRef)(),this.isUpdating=!1,this.isUnmounting=!1,this.state={customRenderingMap:new Map},this.requestResize=()=>{this.isUnmounting||(this.cancelResize(),this.resizeId=requestAnimationFrame((()=>{this.doResize()})))}}render(){const t=[];for(const o of this.state.customRenderingMap.values())t.push(e.createElement(gd,{key:o.id,customRendering:o}));return e.createElement("div",{ref:this.elRef},t)}componentDidMount(){this.isUnmounting=!1;const e=new ql;let t;this.handleCustomRendering=e.handle.bind(e),this.calendar=new gO(this.elRef.current,Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.calendar.render(),e.subscribe((e=>{const o=Date.now(),p=!t;(md||p||this.isUpdating||this.isUnmounting||o-t<100?vd:n.flushSync)((()=>{this.setState({customRenderingMap:e},(()=>{t=o,p?this.doResize():this.requestResize()}))}))}))}componentDidUpdate(){this.isUpdating=!0,this.calendar.resetOptions(Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.isUpdating=!1}componentWillUnmount(){this.isUnmounting=!0,this.cancelResize(),this.calendar.destroy()}doResize(){this.calendar.updateSize()}cancelResize(){void 0!==this.resizeId&&(cancelAnimationFrame(this.resizeId),this.resizeId=void 0)}getApi(){return this.calendar}}hd.act=vd;class gd extends e.PureComponent{render(){const{customRendering:e}=this.props,{generatorMeta:t}=e,o="function"==typeof t?t(e.renderProps):t;return(0,n.createPortal)(o,e.containerEl)}}function vd(e){e()}const Rd=window.wp.htmlEntities,wd=window.wp.url;var yd=function(e,t){void 0===t&&(t=!1);var o=e.title,n=e.start,p=e.end,c=e.allDay,b=e.extendedProps,r=b.postId,a=b.href,M=b.edit,i=b.status,z=b.postType;return{postId:r,postTime:b.postTime,postType:z,status:i,title:o,href:a,edit:M,start:n,end:p,allDay:c}},Ld=function(e,t){var o=yd(e,!0);return f()({method:"POST",path:"/wpscp/v1/post",data:{type:t,ID:o.postId,post_type:o.postType,post_status:o.status,date:o.end}})};const Nd=function(o){var n=o.post,p=o.editAreaToggle,c=o.setEditAreaToggle,b=o.openModal,r=o.setEvents,a=o.getPostTypeColor,M=o.status,i=void 0===M?null:M,z=o.setStatus,s=void 0===z?null:z,l=a(n.postType),O=function(){var e,t;c(((e={})[n.postId]=null===(t=!(null==p?void 0:p[n.postId]))||void 0===t||t,e)),s(n.status)},d=function(e){return O(),function(e,t){return f()({path:(0,wd.addQueryArgs)("/wpscp/v1/post",{ID:e,status:t}),method:"DELETE"}).then((function(e){"id"in e&&r((function(t){return t.filter((function(t){return"Adv. Scheduled"==e.status?t.postId!=parseInt(e.id)||t.status!=e.status:t.postId!==parseInt(e.id)}))}))}))}(e.postId,e.status)},u=function(){document.removeEventListener("mousedown",A)},A=function(e){var t,o;(null===(o=e.target)||void 0===o?void 0:o.closest(".wpsp-event-card"))||(c(((t={})[n.postId]=!1,t)),u())};return(0,e.useEffect)((function(){return(null==p?void 0:p[n.postId])?document.addEventListener("mousedown",A):u(),function(){u()}}),[null==p?void 0:p[n.postId]]),t().createElement("div",{className:"wpsp-event-card card ".concat(l)},(null==p?void 0:p[n.postId])&&n.status==i&&t().createElement("ul",{className:"edit-area"},t().createElement("li",null,t().createElement(be.Button,{variant:"secondary",onClick:function(e){e.preventDefault(),O(),window.open(decodeURIComponent(n.href),"_blank")}},"View")),t().createElement("li",null,t().createElement(be.Button,{variant:"secondary",onClick:function(e){e.preventDefault(),O(),window.open(decodeURIComponent(n.edit),"_blank")}},"Edit")),"Adv. Scheduled"!=i&&t().createElement("li",null,t().createElement(be.Button,{variant:"secondary",onClick:function(e){e.preventDefault(),O(),b({post:n,eventType:"editEvent"})}},"Quick Edit")),t().createElement("li",null,t().createElement(be.Button,{variant:"secondary",onClick:function(e){var t;e.preventDefault(),"Adv. Scheduled"==(t=n).status?ut({item:t,text:(0,k.__)("Deleting Advanced Scheduling will result in the loss of any changes made using this feature.","wp-scheduled-posts"),successTitle:(0,k.__)("Your scheduled data has been deleted!","wp-scheduled-posts"),buttonText:(0,k.__)("Delete Scheduled Data!","wp-scheduled-posts")},d):ut({item:t},d)}},"Delete"))),t().createElement("div",{className:"wpsp-event-card-content"},t().createElement("i",{className:"wpsp-icon wpsp-dots",onClick:O}),t().createElement("span",{className:"set-time "+("Published"===n.status?"published":"scheduled")},n.postTime),t().createElement("h3",null,(0,Rd.decodeEntities)(n.title)),t().createElement("span",{className:"badge-wrapper"},t().createElement("span",{className:"Unscheduled-badge"},n.postType),t().createElement("span",{className:"status-badge"},n.status))))};var Bd=function(){return Bd=Object.assign||function(e){for(var t,o=1,n=arguments.length;o0&&p[p.length-1])||6!==r[0]&&2!==r[0])){b=0;continue}if(3===r[0]&&(!p||r[1]>p[0]&&r[1]1&&W(u)}),[u]),t().createElement(t().Fragment,null,t().createElement(Ab,Td({},a,{options:i,value:p,onChange:m,components:{Option:kd},styles:qb,closeMenuOnSelect:!1,hideSelectedOptions:!1,autoFocus:!1,controlShouldRenderValue:!1,className:"checkbox-select",classNamePrefix:"checkbox-select",isMulti:!0,onMenuScrollToBottom:function(){p.some((function(e){return"all"===e.value}))||l||A((function(e){return e+1}))}})),r&&t().createElement("div",{className:"selected-options"},t().createElement("ul",null,(null==p?void 0:p.some((function(e){return"all"===e.value})))?t().createElement("li",null,"All",t().createElement("button",{onClick:function(){return!a.isDisabled&&h({value:"all",label:"All"})}},t().createElement("i",{className:"wpsp-icon wpsp-close"}))):null==p?void 0:p.filter((function(e){return"all"!==e.value})).map((function(e,o){return t().createElement("li",{key:o},null==e?void 0:e.label,t().createElement("button",{onClick:function(){return!a.isDisabled&&h(e)}},t().createElement("i",{className:"wpsp-icon wpsp-close"})))})))))};var Pd=function(e,t,o){if(o||2===arguments.length)for(var n,p=0,c=t.length;p0){var t=e[0];A(t)}O(!1)})).catch((function(e){A({}),O(!1)}))}else if((null==n?void 0:n.post_date)||(null==n?void 0:n.openModal)){var o={post_type:Yd(b)},p=(null===(e=null==q?void 0:q.values)||void 0===e?void 0:e.calendar_schedule_time)||r||"12:00:00";(null==n?void 0:n.post_date)?o.post_date=(0,jd.format)("Y-m-d",n.post_date)+" "+p:o.post_date=(0,jd.date)("Y-m-d",void 0,void 0)+" "+p,z(!0),A(o)}else A({})}),[n]);var W=function(){p(!1),A({}),z(!1)};return(0,e.useEffect)((function(){return function(){W()}}),[]),t().createElement(po(),{isOpen:i,onRequestClose:W,ariaHideApp:!1,className:"modal_wrapper"},t().createElement("div",{className:"modalhead"},t().createElement("button",{className:"close-button",onClick:W},t().createElement("i",{className:"wpsp-icon wpsp-close"})),t().createElement("div",{className:"platform-info"},"editEvent"==(null==n?void 0:n.eventType)||"editDraft"==(null==n?void 0:n.eventType)?t().createElement("h4",null,"Edit ",u.post_type):t().createElement("h4",null,"Add New ",u.post_type))),t().createElement("div",{className:"modalbody"},l&&t().createElement("div",null,"Loading..."),!l&&t().createElement("form",{onSubmit:function(e){(function(e){return e.preventDefault(),f()({method:"POST",path:"/wpscp/v1/post",data:{type:null==n?void 0:n.eventType,ID:u.ID,post_type:u.post_type,postTitle:u.post_title,postContent:u.post_content,date:u.post_date}}).then((function(e){c(e,null==n?void 0:n.post)})).then((function(){var e;switch(null==n?void 0:n.eventType){case"addEvent":e=(0,k.__)("New Post has been Successfully Created","wp-scheduled-posts");break;case"editEvent":e=(0,k.__)("Post has been Successfully Edited","wp-scheduled-posts");break;case"newDraft":e=(0,k.__)("New Draft Post has been Successfully Created","wp-scheduled-posts");break;case"editDraft":e=(0,k.__)("Draft Post has been Successfully Edited","wp-scheduled-posts")}lt({title:e}).fire()})).catch((function(e){var t=(null==e?void 0:e.message)||(0,k.__)("Something went wrong","wp-scheduled-posts");lt({type:"error",title:t}).fire()})).finally((function(){W()}))})(e).then()}},t().createElement("div",{className:"form-group"},t().createElement(Je,{type:"text",id:"title",label:"Title",placeholder:"Title",value:u.post_title,required:!0,onChange:function(e){return A((function(t){return Qd(Qd({},t),{post_title:e.target.value})}))}})),t().createElement("div",{className:"form-group"},t().createElement(Vd,{id:"content",label:"Content",placeholder:"Content",required:!0,value:u.post_content,onChange:function(e){return A((function(t){return Qd(Qd({},t),{post_content:e.target.value})}))}})),t().createElement(be.TimePicker,{currentTime:u.post_date,onChange:function(e){return A((function(t){return Qd(Qd({},t),{post_date:e})}))},is12Hour:!0}),t().createElement("button",{type:"submit"},"Save"))))},Jd=function(){return Jd=Object.assign||function(e){for(var t,o=1,n=arguments.length;o=o-100&&L((function(e){return e+1}))}}},200,function(){for(var e=[],t=0;t=200&&(p.apply(o,e),b=Date.now())}),200-(Date.now()-b))):(p.apply(o,e),b=Date.now())}),k=function(e,t){return void 0===t&&(t=!1),function(e,t,o,n){return new(o||(o=Promise))((function(p,c){function b(e){try{a(n.next(e))}catch(e){c(e)}}function r(e){try{a(n.throw(e))}catch(e){c(e)}}function a(e){var t;e.done?p(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(b,r)}a((n=n.apply(e,t||[])).next())}))}(void 0,void 0,void 0,(function(){var o,n,p,c;return function(e,t){var o,n,p,c,b={label:0,sent:function(){if(1&p[0])throw p[1];return p[1]},trys:[],ops:[]};return c={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function r(r){return function(a){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;c&&(c=0,r[0]&&(b=0)),b;)try{if(o=1,n&&(p=2&r[0]?n.return:r[0]?n.throw||((p=n.return)&&p.call(n),0):n.next)&&!(p=p.call(n,r[1])).done)return p;switch(n=0,p&&(r=[2&r[0],p.value]),r[0]){case 0:case 1:p=r;break;case 4:return b.label++,{value:r[1],done:!1};case 5:b.label++,n=r[1],r=[0];continue;case 7:r=b.ops.pop(),b.trys.pop();continue;default:if(!((p=(p=b.trys).length>0&&p[p.length-1])||6!==r[0]&&2!==r[0])){b=0;continue}if(3===r[0]&&(!p||r[1]>p[0]&&r[1]0?(T(!0),1==e&&M([]),M((function(e){return Zd(Zd([],e,!0),n,!0)}))):t?(T(!0),M(Zd([],n,!0))):M((function(e){return Zd(Zd([],e,!0),n,!0)})),[3,5];case 3:return p=b.sent(),console.error("Error fetching posts:",p),[3,5];case 4:return E(!1),[7];case 5:return[2]}}))}))};return(0,e.useEffect)((function(){new Ad(n.current,{itemSelector:".fc-event",eventData:function(e){var t=JSON.parse(e.getAttribute("data-event"));return t._end=t.end,t}});var e=document.getElementById("sidebar-post-wrapper");return e&&e.addEventListener("scroll",X),function(){e&&e.removeEventListener("scroll",X)}}),[r,O]),(0,e.useEffect)((function(){k(y)}),[y]),(0,e.useEffect)((function(){L(1),k(y,!0)}),[O]),t().createElement("div",{id:"wpsp-sidebar",className:"sidebar",ref:n},t().createElement("div",{id:"external-events"},t().createElement("div",{id:"external-events-listing"},t().createElement("h4",{className:"unscheduled"},"Unscheduled Posts ",t().createElement("span",{className:"spinner"})),t().createElement(Id,{selectedPostType:r,onChange:function(e){d(Zd([],e,!0))},showTags:!0}),t().createElement("div",{className:"event-wrapper",id:"sidebar-post-wrapper"},a.sort((function(e,t){return new Date(t.end).getTime()-new Date(e.end).getTime()})).map((function(e){return t().createElement("div",{key:e.postId,className:"fc-event","data-event":JSON.stringify(e)},t().createElement(Nd,{post:e,editAreaToggle:A,setEditAreaToggle:q,openModal:function(e){return R(Jd(Jd({},e),{eventType:"editDraft"}))},setEvents:M,getPostTypeColor:i,status:m,setStatus:h}))})))),t().createElement("p",null,t().createElement("a",{className:"btn-draft-post-create",href:"#",rel:"modal:open","data-type":"draft",onClick:function(e){e.preventDefault(),R({post:null,eventType:"newDraft",openModal:!0})}},"New Draft"))),t().createElement(Kd,{modalData:v,setModalData:R,onSubmit:function(e,t){var o=a.filter((function(e){return e.postId!==(null==t?void 0:t.postId)}));M(Zd(Zd([],o,!0),[e],!1))},selectedPostType:r,schedule_time:s}))};const eu=(0,e.forwardRef)($d);var tu=o(556),ou=o.n(tu),nu=o(363),pu=o(833),cu=o.n(pu);const bu=function(e){function t(e,n,a,M,s){for(var l,O,d,u,W,h=0,g=0,v=0,R=0,w=0,C=0,T=d=l=0,k=0,_=0,x=0,D=0,P=a.length,I=P-1,j="",H="",F="",U="";k
l)&&(D=(j=j.replace(" ",":")).length),0n&&(n=(t=t.trim()).charCodeAt(0)),n){case 38:return t.replace(u,"$1"+e.trim());case 58:return e.trim()+t.replace(u,"$1"+e.trim());default:if(0<1*o&&0a.charCodeAt(8))break;case 115:b=b.replace(a,"-webkit-"+a)+";"+b;break;case 207:case 102:b=b.replace(a,"-webkit-"+(102n.charCodeAt(0)&&(n=n.trim()),n=[n],01?t-1:0),n=1;n0?" Args: "+o.join(", "):""))}var hu=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,o=0;o=this.groupSizes.length){for(var o=this.groupSizes,n=o.length,p=n;e>=p;)(p<<=1)<0&&mu(16,""+e);this.groupSizes=new Uint32Array(p),this.groupSizes.set(o),this.length=p;for(var c=n;c